Collabora and Fluendo Release GStreamer SDK for Android

Collabora and Fluendo have recently announced the availability of GStreamer’s Software Development Kit for Android, which allows developers to create multimedia playback applications for Android smartphones and tablets using Gstreamer and the Android NDK..

The GStreamer SDK for Android targets Android 2.3.1 Gingerbread or higher (API Level 9 or greater). However, due to some of the restrictions of previous versions of Android, some features such as hardware acceleration are only available on Android 4.1 Jelly Bean (API Level 16 up).

Normally, you’d need the GStreamer SDK which can be installed on Linux (Ubuntu, Fedora and Debian), Windows (XP/Vista/7/8) and Mac OS X (10.6 to 10.8). But for developing Android applications using Gstreamer, you don’t. What you do need first is a typical Android development environment with the latest Android SDK, the latest Android NDK, and optionally, but recommended, the Eclipse IDE with Android ADT and NDK plugins. Once everything is setup correctly, and you have made sure you can build NDK apps, you can download and install GStreamer SDK for Android (ARM only).

I’ve tried the instructions in Eclipse 4.2.1 with Android NDK 8b and Android Tools SDK 21 following the the instructions to install GStreamer for Android development. In Eclipse IDE, make sure the Android SDK and NDK paths are correctly setup (Window->Preferences->Android->NDK), and set  GSTREAMER_SDK_ROOT_ANDROID to the folder where you unzipped the SDK, by going to Window->Preferences->C/C++->Build->Build Variables and defining GSTREAMER_SDK_ROOT_ANDROID.

There are 5 tutorials provided in the GStreamer SDK for Android:

  • Tutorial 1: Link against GStreamer
  • Tutorial 2: A running pipeline
  • Tutorial 3: Video
  • Tutorial 4: A basic media player
  • Tutorial 5: A Complete media player

Eventually, it will be possible to add GStreamer code to Java apps, but language bindings for the GStreamer API are not complete yet. The tutorial are written in both C and Java code with Java used for the User Interface, and C for the GStreamer code, with both parts interacting through JNI.

To import a tutorial into the Eclipse workspace, click on File->New->Project… ->Android->Android Project from Existing Code, and select the folder android-tutorial-1 in GSTREAMER_SDK_ROOT_ANDROID/share/gst-sdk/tutorials.

At this stage, Eclipse might complain about missing files, but this is normal, and we need to add native development support by right-clicking on the project tutorial1 and selecting Android tools->Add Native Support… The NDK plugin should ask for a library name, just keep the default (libTutorial1.so) and accept. Click on Project->Build Project in the top menu. Once the build is complete, run the project: Run->Run, and after a little while, the demo should appear in the emulator or your Android device.

You should be able to reproduce the same steps with tutorial 2 to 5. Details are available on GStreamer’s Android tutorials page.

Support CNX Software - Donate via PayPal or become a Patron on Patreon

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
ZOPO ZP900S Leader Smartphone Unboxing and Review Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
trackback

[…] also include links to stock firmware files. I’ve used this device with the Android SDK for my GStreamer for Android post and the developer options are easily accessible in the Settings menu. There seems to be a lot […]