<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello everybody,</p>
<p><br>
</p>
<p>My name is Martin, I am new to this list.</p>
<p><br>
</p>
<p>I am trying to build a pipeline which uses the ahcsrc element<br>
</p>
<p>Here it is what I have:</p>
<p><br>
</p>
<p>gst_init (NULL, NULL);<br>
gst_version (&major, &minor, &micro, &nano);<br>
<br>
GST_PLUGIN_STATIC_REGISTER(coreelements);<br>
GST_PLUGIN_STATIC_REGISTER(androidmedia);<br>
<br>
pPipe = gst_parse_launch("ahcsrc device=1 ! fakesink", &pError);<br>
factory = gst_element_factory_find("ahcsrc");<br>
if(factory)<br>
    pElement = gst_element_factory_create (factory, "source");<br>
<br>
sprintf (str, "This program is linked against GStreamer %d.%d.%d\n"<br>
    "pipeline %x\n"<br>
        "factory %x\n"<br>
    "element(ahcsrc) %x\n"<br>
    "Error: %s\n",<br>
    major, minor, micro,<br>
    (void*) pPipe, (void*) factory, (void*) pElement, pError ? pError->message : "None");<br>
<br>
plugins = pnode = gst_registry_get_plugin_list(gst_registry_get());<br>
while(pnode)<br>
{<br>
    GstPlugin* plugin = (GstPlugin*)pnode->data;<br>
    sprintf (str, "%s%s\n", str, gst_plugin_get_name(plugin));<br>
    pnode = g_list_next(pnode);<br>
}<br>
__android_log_write(ANDROID_LOG_INFO, "gst-test", str);</p>
<p><br>
</p>
<p><br>
</p>
<p>The output of the program is:</p>
<p>09-20 10:36:47.314  5112  5112 I gst-test: This program is linked against GStreamer 1.8.3  <br>
09-20 10:36:47.314  5112  5112 I gst-test: pipeline b3658280 <br>
09-20 10:36:47.314  5112  5112 I gst-test: factory 0 <br>
09-20 10:36:47.314  5112  5112 I gst-test: element(ahcsrc) 0 <br>
09-20 10:36:47.314  5112  5112 I gst-test: Error: no element "ahcsrc" <br>
09-20 10:36:47.314  5112  5112 I gst-test: coreelements <br>
09-20 10:36:47.314  5112  5112 I gst-test: staticelements</p>
<p><br>
</p>
<p>So, after trying to instantiate the ahcsrc element using different methods,</p>
<p>I queried the available plugins and it seems that the androidmedia is missing<br>
</p>
<p>(Note that the coreelements plugin registers correctly with the same method).<br>
</p>
<p><br>
</p>
<p>If it matters, it is an Adroid Studio project using gradle and NDK, the target platform</p>
<p>is Android API level 19 (Android 4.4.4).</p>
<p>I am using the prebuilt binaries for gstreamer 1.8.3 (android), all the gstreamer</p>
<p>libraries are static.<br>
</p>
<p>I've installed and tested the app on both Android 4.4.4 (rooted) and 6.0.1 (non-rooted)-</p>
<p>the results are the same.</p>
<p>Also I've satisfied all the linker-time dependencies which occur after including</p>
<p>the line</p>
<p>GST_PLUGIN_STATIC_REGISTER(androidmedia); <br>
</p>
<p><br>
</p>
<p>As a last thing, I also added <br>
</p>
<p><uses-permission android:name="android.permission.CAMERA" /><br>
</p>
<p>to the</p>
<p>AndroidManifest.xml</p>
<p>file.</p>
<p>Still no luck.</p>
<p><br>
</p>
<p>To me it seems that the androidmedia plugin fails to register with</p>
<p>gstreamer in runtime, but I can't figure what is the reason.<br>
</p>
<p>Any suggestions would be appreciated!</p>
<p><br>
</p>
<p>Best Regards</p>
<p>Martin<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>