[gst-devel] RFC: A Timeline

MDK mdk at mdk.org.pl
Sun Jun 26 16:45:11 CEST 2005


Hi, 

I'm thinking about the ways to implement a "Timeline" in Gstreamer (many
clips aligned in time at given positions) I know we have gnonlin
(probe_fired based) but I'm wondering if there are better ways to do
that. 

I'm thinking about the following:

Write a bin element (let's call it a SOURCE), that manages another
supplied bin making it "infinite" in time. In the simplest form it has
"in" point and "out" points. As soon as the playback reaches "In" it
adds/links the managed bin to itself. As soon as it goes past "Out" it
unlinks/removes the bin from itself. For all the time > "Out" && time <
"In" it somehow (?) generates "no data" on it's sink pad. It's seek
aware and "does the right thing" on seek events (add/link ,
unlink/remove). SOURCE never generates EOS. 

An arbitrary number of SOURCES is linked to a TIMELINE element - which
is a modified videomixer thing. It has infinite number of src pads and
one sink pad. In a loopfunc TIMELINE pulls all of it's src pads trying
to find a first one that returns a buffer ( != "no data"). It pushes it
to the sink pad. 

Explaining it the other way round - let's say I've got a composition
(movie) that consists of 50 clips aligned one after another (one
"track", they do not overlap). This gives me 50 SOURCE bins linked to a
TIMELINE all the time. All the 50 are iterated at each moment. But only
1 actually performs any real work. 49 are "idle" returning "no data". 

The advantages I see:

	* Simplicity
	* Each element (SOURCE) is responsible only for itself. Operations like
changing "In" and "Out" points require minimal pipeline rebuilding.
TIMELINE doesn't need to know anything about the SOURCES. 
	* It fits with my concept of just two elements (no "tracks", no
"compositions"). Possible effects (like: transitions) can happen at the
TIMELINE level (video mixing). 

Possible disadvantages:
	
	* Performance. All the clips are itarated, even if they're not used.
It's a dummy iteration (without any data processing), but might be a
significant overhead (let's imagine I have a movie composed of 100
shots...)

	* Having an element with 100 src pads allocated might be a problem
(???)

	* Is it actually possible to push "no data" on a pad? 


Let me know if that sounds sane to you. Perhaps there are other ways to
do that? 
	
In other news: I've the playskipper plugin ready (for automatic frame
dropping if playback isn't "smooth"). I'm going to post it for a wider
testing soon. 

Best regards,


-- 
MDK
mdk at mdk.org.pl
www.mdk.org.pl


 




More information about the gstreamer-devel mailing list