[gst-devel] Playback Rate

Edward Hervey bilboed at gmail.com
Fri Jul 13 10:52:34 CEST 2007


Hi,

  You can't send the event if the pipeline isn't in PAUSED or PLAYING.
That's why it's failing.

    Edward

On 7/10/07, Ryan Ayers <rayers.public at dividia.net> wrote:
> I am developing a streaming server that will stream avi files onto the network as MJPEG streams.  I am using the python bindings.  I am trying to change the playback rate using the event_new_seek function, but I am unable to make this work.  I can make it work using the decodebin or playbin however.  Here is the following code I am working on:
>
> self._pipeline = gst.parse_launch("filesrc location=/home/test/test.avi ! avidemux ! queue ! ffdec_msmpeg4v2 ! jpegenc ! multipartmux ! multifdsink name=multifd")
> event = gst.event_new_seek(2.0, gst.FORMAT_TIME, gst.SEEK_FLAG_FLUSH | gst.SEEK_FLAG_ACCURATE, gst.SEEK_TYPE_NONE, 0, gst.SEEK_TYPE_NONE, 0)
> if not self._pipeline.send_event(event):
>     print 'always fails here'
> state = self._pipeline.set_state(gst.STATE_PLAYING)
> if state == gst.STATE_CHANGE_FAILURE:
>     print 'do not get here, since we succeed'
>
> However, when I connect to the stream, I get normal 1.0 playback speed.  Of course, this sounds right since the send_event failed.  Additionally, I have tried the above code by sending the event to the avidemux element and the send_event succeeds, but the stream still plays back at 1.0 speed.
>
> Do you have any suggestions on how to achieve variable speed playback using the python bindings?
>
> Ryan
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>


-- 
Edward Hervey
Multimedia editing developer
http://www.pitivi.org/




More information about the gstreamer-devel mailing list