Application for Android with Qt/C++

Nicolas Dufresne nicolas.dufresne at collabora.com
Tue Jun 23 08:49:10 PDT 2015


Le mardi 23 juin 2015 à 11:58 +0200, Sebastian Dröge a écrit :
> But note that the new signature of that function is a bit different:
> http://cgit.freedesktop.org/gstreamer/cerbero/tree/data/ndk
> -build/gstreamer_android-1.0.c.in#n417
> 
> You only need the JNIEnv* and the android.context.Context instance of
> your application.

For the env, see QAndroidJniEnvironment() (* operator). And for the
jobject I believe this is the activity, see androidActivity(). Getting
the activity is asynchronous, so that new API is still very
inconvenient.

In a internal project (non-public sorry), I've rewritten this init
function in plane C, using GResource instead of Java equivalent, and
passing the path manually (instead of using JNI to figure-it-out).
Imho, I believe we need gst_static_init() somewhere that would deal
with the non-Android bits in a friendlier way. gst_android_init() could
then we simplified a lot, and only deal with the Android specifics
(which are not needed when running Qt for Android).

http://doc.qt.io/qt-5/qandroidjnienvironment.html
http://doc.qt.io/qt-5/qtandroid.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150623/f5434d5b/attachment.sig>


More information about the gstreamer-devel mailing list