[gst-devel] Problem trying to fix dvdnavsrc.

Stefan Kost ensonic at hora-obscura.de
Thu Sep 6 22:19:05 CEST 2007


Simone Gotti wrote:
> Hi,
> On Wed, 2007-09-05 at 20:21 +0300, Stefan Kost wrote:
>> Hi,
>> Simone Gotti wrote:
>>> Hi all,
>>> I'm trying to fix and complete the dvdnavsrc element.
>> Cool!
> :)
> [...]
>>> The problem is:
>>> when the flush event is sent gst_pad_push will finally return with a
>>> GST_FLOW_WRONG_STATE and gst_base_src_loop will pause itself so it's
>>> never called again.
>>> To reschedule it a call to gst_pad_start_task is needed after the flush
>>> but gst_base_src_loop isn't exported so it cannot be used inside
>>> dvdnavsrc.
>> I think you shoudl call gst_pad_start_task() yourself. Look at qtdemux or
>> avidemux in gst-plugins-good. They do this after they perormed a seek.
> Thanks. I'll take a look at them! The problem is that gst_base_src_loop
> isn't exported by gstBaseSrc and I cannot call it. But I think this
> isn't needed anymore (I hope so), see below:
> But, in the meantime I found the cause: I was playing the pipeline
> attacching only to the video src pad of the demuxer. With this "static"
> piece of video mpeg2dec correctly emitted only two Buffers (images in
> this case) to xvimagesink, the firs had timestamp X, the second
> timestamp X+20s, so xvimagesink waited 20s to call the second chain
> function and all was blocked.
> I didn't connected also the audio src pad ad it was blocking the
> pipeline in prerolling. Now I digged in it and it looks related to the
> still frame management, by now as a workaround I added a flush during a
> still frame (looks like what vlc does) and this made the pipeline work!
> On
> http://webcvs.freedesktop.org/gstreamer/gstreamer/docs/design/part-sparsestreams.txt?revision=1.2
> there're some hint on how to manage still frames. I'll take a look at
> them and try to implement them in a correct way. The problem is that
> looks like the DRAIN event isn't implemented, am I wrong?
> So after adding also the audio source, the pipeline received various
> audio frames between the 2 video frames and this let everything work!

If you have a element with multiple outputs, the pipleine should first connect a
queue before anything else:

elem name=d ! queue ! elem
         d. ! queue ! elem

This avoids the blocking. Regarding the sparse video stream can you have a look
at the subtitle elements. I belive they don't emit new picture for every frme.

>>> To test it I changed gstbasesrc to export it and all worked quite well.
>>> But I'm searching for a correct solution (if there's one) without
>>> changing the code of gstbasesrc.
>>> Has anyone an hint?
>>> Thanks a lot!
>>> Bye!
>> It would rock, if you could add a top-level comment to dvdnavsrc.c (like other
>> plugin have) that has a brief description and an example gst-launch line.
> I've got some basic working pipelines. I'll also try understand how to
> mix all with subtitles displaying and Menu highlights (if this is
> possible with gst-launch).
Try to talk to thaytan on IRC.
> I've got also a couple of other various question. I'll expose them here,
> if you prefer I'll open other threads on them:
> 1) by now dvdnavsrc doesn't implement seeking. From what I know seeking
> should not be allowed during menu navigation as it doesn't have much
> sense.
> Another problem is that libdvdnav only support sector seeking and not
> time based seeking and to implement it is needed to read the ifo files,
> a task already done by dvdreadsrc.
> From the point of view of a video player would be better to create 2
> pipelines using dvdnavsrc for the menus and dvdreadsrc for the normal
> playing or will be better to use only one pipeline with dvdnavsrc and
> implement seeking in it?
I don't know enough here, sorry.

> 2) Is there someone other that is working on dvdnavsrc and his work
> isn't already in CVS? (just to avoid reinventing the wheel)

I don't think that someone works on these elements right now.
> Thanks!
> Bye!


More information about the gstreamer-devel mailing list