<div dir="ltr"><div>Hi Chuck, </div><div><br></div><div>This might also be useful. I remember I struggled for a while to properly build Gstreamer with Android Studio. Place your Android.mk and Application.mk inside src/main/jni</div><div>Add these snippets to your local.properties file</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">android{</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">    //otherstuff</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">    sourceSets.main {<br></font><font face="monospace, monospace">        jniLibs.srcDir 'src/main/libs'<br></font><font face="monospace, monospace">        jni.srcDirs = [];<br></font><font face="monospace, monospace">    }</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">    tasks.withType(JavaCompile) {<br></font><font face="monospace, monospace">        compileTask -> compileTask.dependsOn ndkBuild<br></font><font face="monospace, monospace">    }</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">    task('ndkBuild', type: Exec) {<br></font><font face="monospace, monospace">        // normal building tool<br></font><font face="monospace, monospace">        commandLine 'ndk-build', 'clean'<br></font><font face="monospace, monospace">        commandLine 'ndk-build', 'APP_PLATFORM=<i><replace with target version e.g. android-19></i>', '-C', file('src/main').absolutePath<br></font><font face="monospace, monospace">    }<br></font><font face="monospace, monospace">}</font></blockquote><div><br></div><div>This ensures your ndk code will always be compiled before your java code, and that the Gstreamer.java will be already in your src folder. </div><div><br></div><div>Cheers</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-20 9:41 GMT+01:00 Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Do, 2015-03-19 at 22:30 -0400, Chuck Crisler wrote:<br>
> I am trying to learn Java and Android development at the same time.<br>
> Fortunately, I know GStreamer fairly well. I have the Android Studio, the<br>
> SDK and the NDK installed on my Linux system and have downloaded the<br>
> GStreamer 1.4.5 ARM v7 binaries. I have also downloaded the GStreamer SDK<br>
> and have been looking at ~slomo/gst-sdk-tutorials. I am confused and can't<br>
> seem to 'put it all together'. I have read and built and executed (on my<br>
> Android phone) some of the pure Android samples, including JNI samples. I<br>
> feel that I could convert a GStreamer Android SDK based tutorial to the<br>
> Android Studio structure.<br>
><br>
> Here are the questions that I immediately don't understand.<br>
> 1. Do I need both the 1.4.5 binaries and the GStreamer SDK?<br>
<br>
</span>The GStreamer 1.4.5 binaries contain everything that the "GStreamer SDK"<br>
contains, just 3 years newer.<br>
<span class=""><br>
> 2. Do I need to build anything to get started working with the GStreamer<br>
> tutorials?<br>
<br>
</span>You just need to extract the binaries to some please and then set<br>
GSTREAMER_ROOT_ANDROID in the environment to that place. Then you can<br>
just build them like any other Android project.<br>
<span class=""><br>
> 3. Tutorial #1 imports package org.freedesktop.gstreamer.GStreamer, which I<br>
> don't think that I have. How should I build it, or where is it?<br>
<br>
</span>That's autogenerated by ndk-build.<br>
<span class=""><br>
> 4. Which tutorials are more current, ~slomo or the GStreamer SDK?<br>
<br>
</span>See above :)<br>
<span class=""><br>
> 5. Is it possible to run something like the command line gst-launch<br>
> application on Android to test pipelines and installations?<br>
<br>
</span>Yes but command line applications don't have access to the hardware<br>
codecs and other things, and you need a rooted device.<br>
<br>
See<br>
<a href="https://coaxion.net/blog/2014/10/gstreamer-remote-controlled-testing-application-for-android-ios-and-more/" target="_blank">https://coaxion.net/blog/2014/10/gstreamer-remote-controlled-testing-application-for-android-ios-and-more/</a><br>
for some gst-launch style application for Android/iOS.<br>
<br>
Also see<br>
<a href="https://github.com/sdroege/gst-player" target="_blank">https://github.com/sdroege/gst-player</a><br>
for some (hopefully) cleaner code (than the tutorials) for how to do<br>
GStreamer Android development by properly splitting the backend (C) and<br>
the frontend (Java).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>