After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 395476 - gst_element_get_state hangs when reading an ogm file
gst_element_get_state hangs when reading an ogm file
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-11 17:34 UTC by Vincent Torri
Modified: 2007-01-11 18:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Torri 2007-01-11 17:34:58 UTC
I've built a pipeline (filesrc, oggdemux, ffdec_mpeg4, and a specific sink) to read an ogm video file (with xvid + vorbis streams).

When I set the pipeline to PAUSED, it hangs when I call gst_element_get_state. Here is the backtrace:

  • #0 __kernel_vsyscall
  • #1 pthread_cond_wait
    from /lib/tls/libpthread.so.0
  • #2 g_cond_timed_wait_posix_impl
    at gthread-posix.c line 220
  • #3 gst_element_get_state_func
    at gstelement.c line 1786
  • #4 gst_bin_get_state_func
    at gstbin.c line 1294
  • #5 gst_element_get_state
    at gstelement.c line 1890
  • #6 _buid_pipeline_ogm
    at seek_ogm.c line 61
  • #7 main
    at seek_ogm.c line 99

you can download the program I use there:

http://www.maths.univ-evry.fr/pages_perso/vtorri/files/gstreamer_test_seek/gst_seek.tar.bz2

just untar the archive, go into gst_seek and run make. It install the sink in ~/.gstreamer-0.10/plugins and create the test program seek_ogm. Pass the ogm file as an argument to that prog.

The file I use : http://www.maths.univ-evry.fr/pages_perso/vtorri/files/gstreamer_test_seek/blood.ogm
Comment 1 Wim Taymans 2007-01-11 17:53:22 UTC
for ogm, the demuxer will create a application/x-ogm-video pad that you should connect to ogmvideoparse and then to the video decoder.

The reason this pipeline blocks waiting for preroll is because the sink is never connected and thus doesn't preroll. You get an error, though (all pads unlinked), which you would have catched on the bus.
Comment 2 Tim-Philipp Müller 2007-01-11 18:05:55 UTC
(Bah, Wim was faster than me, but since I typed all this I might just as well post ;-))

This is a bug in your application.

For one, you must at least watch for ERROR messages on the bus (so you can shut down your pipeline and _get_state() will return in case of an ERROR).


 $ GST_DEBUG=*:2 ./seek_ogm ~/samples/video/ogm/351790.ogm 

WARN gstoggdemux.c:2291:gst_ogg_demux_read_chain:<demuxer> failed to read chain
new pad (str='application/x-ogm-video')
new pad (str='audio/x-vorbis')
new pad (str='audio/x-vorbis')
new pad (str='application/x-ogm-text')
WARN gstoggdemux.c:3000:gst_ogg_demux_loop:<demuxer> error: Internal data stream error.
WARN gstoggdemux.c:3000:gst_ogg_demux_loop:<demuxer> error: stream stopped, reason not-linked

The first warning is harmless, the second not so much. It describes the error message that has been posted on the bus.

The bug in your application is that you are assuming that oggdemux creates pad of video/* type, which is not the case. You need to plug a ogmvideoparse after oggdemux in this case.

You might also want to connect to the 'no-more-pads' signal and shut down the pipeline if you get it but haven't connected a video pad yet.