androidmedia plugin doesn't register with gstreamer 1.8.3

Martin Vachovski Martin.Vachovski at skytek.com
Tue Sep 20 10:23:11 UTC 2016


Hello everybody,


My name is Martin, I am new to this list.


I am trying to build a pipeline which uses the ahcsrc element

Here it is what I have:


gst_init (NULL, NULL);
gst_version (&major, &minor, &micro, &nano);

GST_PLUGIN_STATIC_REGISTER(coreelements);
GST_PLUGIN_STATIC_REGISTER(androidmedia);

pPipe = gst_parse_launch("ahcsrc device=1 ! fakesink", &pError);
factory = gst_element_factory_find("ahcsrc");
if(factory)
    pElement = gst_element_factory_create (factory, "source");

sprintf (str, "This program is linked against GStreamer %d.%d.%d\n"
    "pipeline %x\n"
        "factory %x\n"
    "element(ahcsrc) %x\n"
    "Error: %s\n",
    major, minor, micro,
    (void*) pPipe, (void*) factory, (void*) pElement, pError ? pError->message : "None");

plugins = pnode = gst_registry_get_plugin_list(gst_registry_get());
while(pnode)
{
    GstPlugin* plugin = (GstPlugin*)pnode->data;
    sprintf (str, "%s%s\n", str, gst_plugin_get_name(plugin));
    pnode = g_list_next(pnode);
}
__android_log_write(ANDROID_LOG_INFO, "gst-test", str);



The output of the program is:

09-20 10:36:47.314  5112  5112 I gst-test: This program is linked against GStreamer 1.8.3
09-20 10:36:47.314  5112  5112 I gst-test: pipeline b3658280
09-20 10:36:47.314  5112  5112 I gst-test: factory 0
09-20 10:36:47.314  5112  5112 I gst-test: element(ahcsrc) 0
09-20 10:36:47.314  5112  5112 I gst-test: Error: no element "ahcsrc"
09-20 10:36:47.314  5112  5112 I gst-test: coreelements
09-20 10:36:47.314  5112  5112 I gst-test: staticelements


So, after trying to instantiate the ahcsrc element using different methods,

I queried the available plugins and it seems that the androidmedia is missing

(Note that the coreelements plugin registers correctly with the same method).


If it matters, it is an Adroid Studio project using gradle and NDK, the target platform

is Android API level 19 (Android 4.4.4).

I am using the prebuilt binaries for gstreamer 1.8.3 (android), all the gstreamer

libraries are static.

I've installed and tested the app on both Android 4.4.4 (rooted) and 6.0.1 (non-rooted)-

the results are the same.

Also I've satisfied all the linker-time dependencies which occur after including

the line

GST_PLUGIN_STATIC_REGISTER(androidmedia);


As a last thing, I also added

<uses-permission android:name="android.permission.CAMERA" />

to the

AndroidManifest.xml

file.

Still no luck.


To me it seems that the androidmedia plugin fails to register with

gstreamer in runtime, but I can't figure what is the reason.

Any suggestions would be appreciated!


Best Regards

Martin




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20160920/af5006ff/attachment-0001.html>


More information about the gstreamer-android mailing list