[gst-devel] Problem trying to fix dvdnavsrc.

Simone Gotti simone.gotti at email.it
Wed Sep 5 22:20:14 CEST 2007


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!


> 
> > 
> > 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).


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?

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

Thanks!

Bye!

> 
> Ciao
>   Stefan
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
-- 
Simone Gotti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070905/b52e27f5/attachment.pgp>


More information about the gstreamer-devel mailing list