[gst-devel] rate change not very responsive

arturo castro arturo at openframeworks.cc
Mon Jan 19 14:48:25 CET 2009


Hi

I'm one of the developers of the openframeworks project:
http://openframeworks.cc , a framework for creative coding. Since now
we've been using some object oriented wrapper around FFMPEG as our video
backend in the linux version but it's being problematic and super slow
so i've decided to give gstreamer a try.

With the new version of appsink in base everything has gone more or less
smooth except for one little problem. When i try to change a video
playing speed from a gui control like a slider or just mapping that
property to the mouse position, the video stops playing while speed is
changing and only continues playing again when speed stops changing.

I'm using a pipeline like:

filesrc location=... ! decodebin ! ffmpegcolorspace ! appsink

also using signals in appsink to notify new buffers and polling the
pipeline for messages with:

while(gst_bus_have_pending(bus)){
   GstMessage* msg = gst_bus_pop(bus);
   ...

as i cannot get callbacks from the bus since i cannot run in the
gstreamer loop because our framework already has it's own.

I've tried with diferent seek flags but have more or less the same
result.

This is the code i'm using to change speed directly mapped to gui
control:

void ofVideoPlayer::setSpeed(speed)
    GstFormat format = GST_FORMAT_TIME;
    GstSeekFlags flags = (GstSeekFlags) (GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE);

    if(!gst_element_seek(GST_ELEMENT(gstPipeline),speed, format,
			flags,
			GST_SEEK_TYPE_NONE,
			0,
			GST_SEEK_TYPE_NONE,
			-1)) {
			ofLog(OF_WARNING,"GStreamer: unable to seek");
   }
}


also attached is the full code for our videoPlayer class. 

Is there anything i can do to make speed change more responsive, or is
this just a limitation of the current implementation of gstreamer?

thanks and keep the good work


//------------------------------------------
arturo castro

oF core developer
barcelona
	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ofVideoPlayerOnlyGst.cpp
Type: text/x-c++src
Size: 15931 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090119/13e039aa/attachment.cpp>


More information about the gstreamer-devel mailing list