GStreamer decodebin3 failure on Android

Viewed 46

I've written a GStreamer implementation which works perfectly for me on Windows. When I test on Android, it fails. I'm using GST version 1.18.5 (and do not really have an option for changing that detail).

In summary, I have a decodebin3 element which is receiving h264 data. I'm trying to convert that to a raw format. I link it to a capsfilter, that to a videoconvert, and that to an appsink.

Here's the caps on the filter and my attempt to link:

GstCaps *filterCaps( gst_caps_new_simple( "video/x-raw",
    "format",    G_TYPE_STRING, "I420",
    "width",     G_TYPE_INT,    640,
    "height",    G_TYPE_INT,    360,
    "framerate", GST_TYPE_FRACTION, 60, 1,
    NULL
) );
g_object_set( G_OBJECT( filter_ ), "caps", filterCaps, NULL );
gst_caps_unref( filterCaps );

if( !gst_element_link( decoder_, filter_) ) 
    // error handling stuff...

// More element linkage...

The call to gst_element_link fails! I get this my in log:

GStreamerAPILog: (NULL) trying to link element decodebin3-1:(any) to element filter:(any)
GStreamerAPILog: (NULL) trying to link decodebin3-1:video_0 and filter:sink
GStreamerAPILog: <filter:src> pad has no peer
GStreamerAPILog: (NULL) found pad filter:sink
GStreamerAPILog: (NULL) decodebin3-1 and filter in same bin, no need for ghost pads
GStreamerAPILog: (NULL) trying to link decodebin3-1:video_0 and filter:sink
GStreamerAPILog: <filter:src> pad has no peer
GStreamerAPILog: (NULL) caps are incompatible
GStreamerAPILog: (NULL) link between decodebin3-1:video_0 and filter:sink failed: no common format
GStreamerAPILog: (NULL) trying to link decodebin3-1:video_0 and filter:sink
GStreamerAPILog: <filter:src> pad has no peer
GStreamerAPILog: <filter:src> pad has no peer
GStreamerAPILog: (NULL) no such pad 'video_%u' in element "decodebin3-1"
GStreamerAPILog: <decodebin3-1> Could not find a compatible pad to link to filter:sink

IMPORTANT: If I replace the decodebin3 with an avdec_h264, this works! But, I have many other stream types to decode, based on runtime context (different cameras), so I want to just use a dynamic decoder. I expected decodebin3 would automatically employ avdec_h264 under the hood, but it doesn't apparently? It does on Windows...

And, yes I'm doing this in a callback after decodebin3 has spawned its "sometimes" pad. The problem seems to be that plugin internally fails to detect that avdec_h264 is what it needs to use... but why on this platform and not another? Could this be a GST plugin "registration" issue?

0 Answers
Related