[gstreamer-bugs] [Bug 370836] Looping feature for gnlobject

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Aug 31 01:22:33 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=370836
  GStreamer | gnonlin | git

--- Comment #11 from Edward Hervey <bilboed at gmail.com> 2010-08-31 08:22:30 UTC ---
(In reply to comment #10)
> Thanks for the detailed review.  I've updated the patch with most of your
> comments.
> 
> >A couple of minor issues, it would make a lot more sense (and cleaner code) if
> >the handling was done in gnlghostpad and just having to add a boolean regarding
> >how to behave if duration != media_duration.
> 
> I should have been clearer about my goal.  I'll try to clarify here.
> 
> loop-duration is how long one loop will take.  If this is longer than
> media-duration, there will be silence after the clip plays for (loop-duration -
> media-duration) on every single pass through the loop.
> 
> The total amount of time the gnlobject will loop is specified by duration.
> 
> If we have a boolean regarding how to behave if duration != media_duration, how
> can we specify how much silence to have between loop iterations?  My use case
> for this is looping for a metronome sound.  loop-duration is the length of the
> beat.

It'll still create a valid stream.

If the file your source controls has a 40ms clip (the metronome tick), you can
still set the media-duration to whatever you want, either less than that
duration, the same... or more (like 1s).

Therefore, if you have:
* media-duration : 1s
* duration : 60s
* loop : TRUE

it will loop 60 times, and your file will playback every second

For the technical details, you will end up with the outgoing stream:
* NEWSEGMENT (start:0, stop:40ms, position:0) <= the stop value doesn't matter
that much, depending on the decoders/demuxers it will be 40ms (the *real* end
of the clip) or 1s (the stop value from the seek))
* DATA (0-40ms)
* NEWSEGMENT (0, 40ms, 1s) <== the segment will playback the second loop *at*
1s
* DATA (0-40ms)
* NEWSEGMENT (0, 40ms, 2s)
* ....

  Or is there something else I'm missing ?

> 
> I'll submit another patch once we come to agreement on this.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list