[gst-devel] gst-python: how to use BaseSink.set_sync()
Edward Hervey
bilboed at gmail.com
Fri Oct 20 13:50:20 CEST 2006
On 10/20/06, Antoine Pitrou <antoine.pitrou at wengo.fr> wrote:
>
> Hi,
>
> Thanks a lot for your help.
>
> Le vendredi 20 octobre 2006 à 12:11 +0200, Edward Hervey a écrit :
> > Those are virtual methods. To implement virtual methods with
> > pygobject (and therefore gst-python), you need to implement a
> > do_<virtualmethod name>.
> > If you implement do_render() it will be called.
>
> Ok, now it works! The pygobject doc doesn't mention this.
pydoc gst is the only valid documentation AFAIK.
>
> > The sync property is to synchronize the call to render(), it has
> > nothing to do with the *speed* at which buffers arrive in the sync.
>
> What do you mean ?
> Now that I've implemented a simplistic do_render(), set_sync() does have
> an influence over at which speed the buffers arrive. If I set it to
> True, they arrive on sync with the clock, while if I set it to False,
> they arrive at max speed (eating 100% CPU).
>
> (or perhaps it's just a matter of vocabulary: by speed, you mean
> datarate?)
The data is pushed in a stream, when it arrives on the basesink sink
pad the following happens:
* data arrives on sinkpad
* if (sync==true) && render : wait for sync time and then call render
* else if render: call render without waiting
* else : discard buffer
* Thread goes back to whatever pushes the data (a function in a
source element for ex)
The datastream is one thread continuously pushing buffers through
the various elements. If at one point that thread needs to wait for
synchronization... it will slow down the rate at which buffers are
pushed.
>
> Regards
>
> Antoine.
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
--
Edward Hervey
Multimedia editing developer / Fluendo S.A.
http://www.pitivi.org/
More information about the gstreamer-devel
mailing list