Problem with Vorbis and Theora file on Android

doon don-prog at mail.ru
Fri Apr 29 01:42:58 UTC 2016


Sebastian Dröge-3 wrote
> On So, 2016-04-24 at 18:19 -0700, doon wrote:
>> I try to play audio from the video and audio file, but have strange 
>> problem with the pads linking
> 
> Please get a full debug log, and also read what happens there right
> before linking fails. This is apparently a problem with caps
> incompatibilities and the log should point at the exact problem.
> 
> You might be missing an audioresample element between the audioconvert
> and sink for example.
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> 
> 
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (968 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4677087/0/signature.asc>

Thanks, pipeline works with audioresample!
Now I try to display video on Android like on other platforms:
        GstElement *pipeline;
        GError *error = NULL;
        pipeline = gst_parse_launch("videotestsrc ! glimagesink", &error);
        if (!pipeline) {
            ui->label->setText("error");
            return;
        }
        if(error != NULL){
            qDebug("GST error: ");
            qDebug(error->message);
        }
        else{
            qDebug("GST without errors");
        }

        gst_element_set_state(pipeline, GST_STATE_READY);

        GstElement *video_sink = gst_bin_get_by_interface(GST_BIN(pipeline),
GST_TYPE_VIDEO_OVERLAY);
        if (!video_sink) {
            qDebug ("Could not retrieve video sink");
            return;
        }
        gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(video_sink),
this->ui->playback_widget->winId());

        gst_element_set_state(pipeline, GST_STATE_PLAYING);

But this code doesn't works, after gst_video_overlay_set_window_handle()
function I get:
F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x5e in tid 3154
(gstglcontext)
*
So, I think I need to use <gst/gl/android/gstglwindow_android_egl.h>(is it
right?), but how can I do this? And why I can display video by default way
on other platforms(e.g. iOS) but not on Android?*

P.S. Full output:
  registered static plugin "coreelements"
  added static plugin "coreelements", result: 1
  registered static plugin "app"
  added static plugin "app", result: 1
  registered static plugin "gio"
  added static plugin "gio", result: 1
  registered static plugin "videotestsrc"
  added static plugin "videotestsrc", result: 1
  intializing child proxy interface
  registered static plugin "opengl"
  added static plugin "opengl", result: 1
  parsing pipeline description 'videotestsrc ! glimagesink'
  creating element "videotestsrc"
  adding pad 'src'
  creating element "glimagesink"
  creating element "glupload"
  adding pad 'sink'
  adding pad 'src'
  creating element "glcolorconvert"
  adding pad 'sink'
  adding pad 'src'
  creating element "glcolorbalance"
  adding pad 'sink'
  adding pad 'src'
  trying to link element gluploadelement0:src to element
glcolorconvertelement0:sink
  found pad gluploadelement0:src
  found pad glcolorconvertelement0:sink
  gluploadelement0 and glcolorconvertelement0 in same bin, no need for ghost
pads
  trying to link gluploadelement0:src and glcolorconvertelement0:sink
  pad has no peer
  pad has no peer
  linked gluploadelement0:src and glcolorconvertelement0:sink, successful
  creating reconfigure event
  Received event on flushing pad. Discarding
  trying to link element glcolorconvertelement0:src to element
glcolorbalance0:sink
  found pad glcolorconvertelement0:src
  found pad glcolorbalance0:sink
  glcolorconvertelement0 and glcolorbalance0 in same bin, no need for ghost
pads
  trying to link glcolorconvertelement0:src and glcolorbalance0:sink
  pad has no peer
  pad has no peer
  linked glcolorconvertelement0:src and glcolorbalance0:sink, successful
  creating reconfigure event
  Received event on flushing pad. Discarding
  found pad gluploadelement0:sink
  trying to link sink:proxypad0 and gluploadelement0:sink
  linked sink:proxypad0 and gluploadelement0:sink, successful
  creating reconfigure event
  adding pad 'sink'
  trying to put property 'contrast' under control
  trying to put property 'brightness' under control
  trying to put property 'hue' under control
  trying to put property 'saturation' under control
  adding pad 'sink'
  trying to link element glcolorbalance0:src to element sink:sink
  found pad glcolorbalance0:src
  found pad sink:sink
  glcolorbalance0 and sink in same bin, no need for ghost pads
  trying to link glcolorbalance0:src and sink:sink
  pad has no peer
  linked glcolorbalance0:src and sink:sink, successful
  creating reconfigure event
  Received event on flushing pad. Discarding
  creating element "pipeline"
  linking some pad of GstVideoTestSrc named videotestsrc0 to some pad of
GstGLImageSinkBin named glimagesinkbin0 (0/0) with caps "(NULL)"
  trying to link element videotestsrc0:(any) to element
glimagesinkbin0:(any)
  trying to link videotestsrc0:src and glimagesinkbin0:sink
  videotestsrc0 and glimagesinkbin0 in same bin, no need for ghost pads
  trying to link videotestsrc0:src and glimagesinkbin0:sink
  linked videotestsrc0:src and glimagesinkbin0:sink, successful
  creating reconfigure event
  Received event on flushing pad. Discarding
D libandroid_test.so: ../android_test/mainwindow.cpp:302 (void
MainWindow::play()): GST without errors
  current NULL pending VOID_PENDING, desired next READY
  current NULL pending VOID_PENDING, desired next READY
  pad peer query failed
  posting need context message
  creating a display, user choice:(NULL) (platform: (NULL))
  posting have context (0xa31b1a30) message with display (0xa3259678)
  pad peer query failed
  posting need context message
  creating a context for display <gldisplayegl0>, user choice:(null)
  creating a window, user choice:(null)
  Attempting to create opengl context. user chosen api(s) (any), compiled
api support (gles2) display api (opengl opengl3 gles2)
  egl initialized, version: 1.4
  Bound OpenGL|ES
D         : HostConnection::get() New Host Connection established
0xa31b7130, tid 3154
  config set: 2, 1
  gl context created: 2737534912
  surface created
  created context
  available GL APIs: gles2
  GL_VERSION: OpenGL ES 2.0 (3.0 Mesa 11.0.2)
  GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.0.17
  GL_VENDOR: Google (Intel Open Source Technology Center)
  GL_RENDERER: Android Emulator OpenGL ES Translator (Mesa DRI Intel(R) HD
Graphics 5500 (Broadwell GT2) )
  No debugging support available
  gl thread running
  gl thread created
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  child 'sink' changed state to 2(READY) successfully
  current NULL pending VOID_PENDING, desired next READY
  found context (0xa31b1980) in downstream query
  pad peer query failed
  pad peer query failed
  posting need context message
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  child 'glcolorbalance0' changed state to 2(READY) successfully
  current NULL pending VOID_PENDING, desired next READY
  found context (0xa318d2c0) in downstream query
  pad peer query failed
  pad peer query failed
  posting need context message
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  child 'glcolorconvertelement0' changed state to 2(READY) successfully
  current NULL pending VOID_PENDING, desired next READY
  found context (0xa31b18f0) in downstream query
  pad peer query failed
  pad peer query failed
  posting need context message
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  child 'gluploadelement0' changed state to 2(READY) successfully
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  child 'glimagesinkbin0' changed state to 2(READY) successfully
  current NULL pending VOID_PENDING, desired next READY
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  child 'videotestsrc0' changed state to 2(READY) successfully
  completed state change to READY
  notifying about state-changed NULL to READY (VOID_PENDING pending)
  current READY pending VOID_PENDING, desired next PAUSED
  current READY pending VOID_PENDING, desired next PAUSED
  child 'sink' is changing state asynchronously to PAUSED
  current READY pending VOID_PENDING, desired next PAUSED
  completed state change to PAUSED
  notifying about state-changed READY to PAUSED (VOID_PENDING pending)
  child 'glcolorbalance0' changed state to 3(PAUSED) successfully
  current READY pending VOID_PENDING, desired next PAUSED
  completed state change to PAUSED
  notifying about state-changed READY to PAUSED (VOID_PENDING pending)
  child 'glcolorconvertelement0' changed state to 3(PAUSED) successfully
  current READY pending VOID_PENDING, desired next PAUSED
  completed state change to PAUSED
  notifying about state-changed READY to PAUSED (VOID_PENDING pending)
  child 'gluploadelement0' changed state to 3(PAUSED) successfully
  child 'glimagesinkbin0' is changing state asynchronously to PAUSED
  current READY pending VOID_PENDING, desired next PAUSED
  seeking: time segment start=0:00:00.000000000, offset=0:00:00.000000000,
stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00,
time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000,
duration 99:99:99.999999999
  setting stream lock 0xa319a08c on task 0xa1d57028
  created task 0xa1d57028
  completed state change to PAUSED
  notifying about state-changed READY to PAUSED (VOID_PENDING pending)
  child 'videotestsrc0' changed state to 3(PAUSED) successfully
  no such pad 'sink' in element "videotestsrc0"
  Creating random stream-id, consider implementing a deterministic way of
creating a stream-id
  creating caps event video/x-raw, format=(string)RGBA, width=(int)320,
height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive
  creating caps event video/x-raw(memory:GLMemory), width=(int)320,
height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive, format=(string)RGBA,
texture-target=(string)2D
  reuse caps
  creating caps event video/x-raw(memory:GLMemory), width=(int)320,
height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive, format=(string)RGBA,
texture-target=(string)2D
  reuse caps
  creating caps event video/x-raw(memory:GLMemory), width=(int)320,
height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive, format=(string)RGBA,
texture-target=(string)2D
  No value transform to serialize field 'params' of type
'GstAllocationParams'
  Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig,
caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive\,\ format\=\(string\)RGBA\,\
texture-target\=\(string\)2D", size=(uint)307200, min-buffers=(uint)0,
max-buffers=(uint)0, allocator=(GstAllocator)"NULL",
params=(GstAllocationParams)NULL, options=(string)<
GstBufferPoolOptionGLSyncMeta >;
  No value transform to serialize field 'params' of type
'GstAllocationParams'
  Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig,
caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive\,\ format\=\(string\)RGBA\,\
texture-target\=\(string\)2D", size=(uint)307200, min-buffers=(uint)2,
max-buffers=(uint)0, allocator=(GstAllocator)"NULL",
params=(GstAllocationParams)NULL, options=(string)<
GstBufferPoolOptionGLSyncMeta >;
  No value transform to serialize field 'params' of type
'GstAllocationParams'
  Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig,
caps=(GstCaps)"video/x-raw\,\ format\=\(string\)RGBA\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive", size=(uint)307200,
min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL",
params=(GstAllocationParams)NULL, options=(string)<
GstBufferPoolOptionGLSyncMeta, GstBufferPoolOptionGLTextureTarget2D >;
  No value transform to serialize field 'params' of type
'GstAllocationParams'
  Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig,
caps=(GstCaps)"video/x-raw\,\ format\=\(string\)RGBA\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive", size=(uint)307200,
min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"NULL",
params=(GstAllocationParams)NULL, options=(string)<
GstBufferPoolOptionGLSyncMeta, GstBufferPoolOptionGLTextureTarget2D,
GstBufferPoolOptionVideoMeta >;
  creating segment event time segment start=0:00:00.000000000,
offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000,
applied_rate=1.000000, flags=0x00, time=0:00:00.000000000,
base=0:00:00.000000000, position 0:00:00.000000000, duration
99:99:99.999999999
  marking pending DISCONT



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-with-Vorbis-and-Theora-file-on-Android-tp4677085p4677215.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list