How to: test GStreamer-droid based camera support in Ubuntu Touch (for Halium 7.1 based port)

  • As you might already know, I'm currently making GStreamer-droid works properly in Ubuntu Touch as a replacement for qtubuntu-camera. This will make video recording works for Halium 7.1 based port, as otherwise a set of custom patches on the Android side (which isn't easy to backport) is required.

    How can you test this out?

    If you're interested in testing this out, please follow these instructions:

    Halium-side preparation

    There's a custom patch for droidmedia (the underlying Android lib that powers GStreamer-droid) that you need to apply to prevent a crash. This patch is in the process of upstreaming, so soon you won't have to do this.

    To apply the patch to your tree, change directory to <Halium source root>/halium/droidmedia and run:

    git fetch fix-raw-data && git cherry-pick FETCH_HEAD

    You might need to do this again if you run repo sync.

    Install GStreamer-droid

    1. Make sure you're running the latest devel or edge channel image. If you're interested in testing video recording too, please make sure that audio for your port works correctly.
    2. Run sudo umount /lib/udev/rules.d/70-android.rules. This prevents failure in the following step.
    3. Run sudo ubports-qa install xenial_-_gst-droid to add the repository containing the packages. UBports-qa will upgrade the already installed packages to the latest version.
    4. Install additional packages. Run sudo mount -o remount,rw /, then sudo apt install gstreamer1.0-droid nemo-qtmultimedia-plugins.
    5. Reboot your phone to make sure everything is in place.

    UPDATED: You no longer have to hide qtubuntu-camera manually as a script in lxc-android-config will do that for you at boot.

    Install updated camera-app

    You'll also need the updated camera-app. To install, grab the binary from GitLab CI my server, then install with pkcon install-local --allow-untrusted <file name>.

    How to debug

    If things don't go as it should, you can add additional debug information by running the camera-app from the command line.

    (cd /opt/ && GST_DEBUG=droidcamsrc:4 ./camera-app --desktop_file_hint=~/.local/share/applications/com.ubuntu.camera_camera_3.1.1+gstdroid1.desktop)

Log in to reply