[gst-devel] totem and osssink? (long)

Ronald Bultje rbultje at ronald.bitfreak.net
Thu Mar 11 11:55:21 CET 2004


Hi Martin,

On Thu, 11 Mar 2004, Martin Soto wrote:
> On Wed, 2004-03-10 at 23:57, Ronald S. Bultje wrote:
> > Would you mind copying this to gstreamer/docs/pwg/advanced-clock.xml so
> > other people can enjoy this story, too?
> Yeah, I'll do it as soon as I have CVS access (it's already requested).

Great, thanks!

> > It only
> > requires that demuxers send out the same event (refcounted, of course)
> > to all their sink pads. I think all demuxers already do this.
>
> Hmm, no, it's just the opposite, I guess. When implementing dvddemux, I
> noticed that mpegdemux actually creates a new discont event for every
> pad. I wondered if that was sort of a bug in mpegdemux and checked
> around only to find that other demuxers do the same (admittedly I didn't
> check all of them). I thought it was necessary for some obscure reason
> and proceeded to implement dvddemux the same way. Is there actually a
> reason for doing that? Would it be ok to start changing demuxers to just
> refcount and forward disconts?

Imo, yes. But I'd tend to say that we won't include it in 0.8.0 (I'm
careful right now. ;) ). 0.8.1 or 0.9.x sounds fine, though. If demuxers
do this, it's (imo) a bug.

> As far as I can see, these are all backwards compatible changes. In
> order for this new infrastructure to work in general, however, we need
> two things:
>
> - Elements forwarding discontinuities must just refcount discont events
> properly and forward them. Elements creating new discont events should
> create one event and send it properly refcounted to all output pads.
>
> - Sink elements must handle disconts somewhat differently:
>
>   case GST_EVENT_DISCONTINUOUS:
>     {
>       GstClockTime time;
>
>       if (gst_event_discont_get_value (event, GST_FORMAT_TIME, &time)) {
>         gst_element_set_time_serial (GST_ELEMENT (sink), time,
>             gst_event_discont_get_serial (event));
>       }
>     }

Actually, you need to add this code to the default dispatcher, that's
where the clocking code is called, too. No need for implementing this in
each element specifically.

Ronald





More information about the gstreamer-devel mailing list