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

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 10 06:21:40 PDT 2009


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

--- Comment #3 from Edward Hervey <bilboed at gmail.com> 2009-09-10 13:21:36 UTC ---
Here's how it should be done (IMHO).

First of all : only do it on gnlsource (my brain lost some cells while trying
to figure out how to do it for any kind of gnlobject).

You want to translate the seek event coming from outside the gnlsource. For
that, modify the incoming seek handler in gnlghostpad. That part should be
*roughly* straightforward, you basically want to send a seek for the first
'chunk' you want to loop on. Don't forget the seek event might not start from
the beginning.

It gets slightly trickier for the following chunks.

Put an event handler on the controlled object source pad (that is : the pad
that you're setting as the target of the gnlghostpad).

When you get an event on that pad:
* If it's not EOS, just return TRUE (to let the event go through).
* If it's EOS:
  * Figure out if you're done looping, if so return TRUE to let EOS go through
  * Compute the new seek you need to send upstream
  * Call g_idle_add with a method that will send that new seek upstream
  * Return FALSE (you don't want THAT EOS to go through)

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