[Bug 732741] v4l2src: EBUSY when doing quick PLAYING -> READY -> PLAYING transition

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jul 7 02:18:05 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=732741
  GStreamer | gst-plugins-good | 1.3.90

--- Comment #1 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> 2014-07-07 09:17:59 UTC ---
The following test seems to work fine for me (not quite master, but pretty
recent). Does it fail for you ?


#! /usr/bin/python
import gobject
gobject.threads_init()
import gst
import sys

def reswitch_pipeline():
        print "changing state to PLAYING"
        playbin.set_state(gst.STATE_PLAYING)
        playbin.get_state()
        print "Now in PLAYING"

def switch_pipeline():
        print "changing state to READY"
        playbin.set_state(gst.STATE_READY)
        playbin.get_state()
        print "Now in READY"
        gobject.timeout_add(1, reswitch_pipeline)

if __name__ == '__main__':
        print "start"
        playbin = gst.element_factory_make("playbin")
        v4l2src = gst.element_factory_make("v4l2src")
        fakesink = gst.element_factory_make("fakesink")
        #playbin.set_property('video-sink',fakesink)
        playbin.set_property("uri","v4l2:///dev/video0")
        print "changing state to PAUSED"
        playbin.set_state(gst.STATE_PAUSED)
        print "changing state to PLAYING"
        playbin.set_state(gst.STATE_PLAYING)
        print "Now in PLAYING"
        gobject.timeout_add_seconds(2, switch_pipeline)

        loop = gobject.MainLoop()
        loop.run()
        playbin.set_state(gst.STATE_NULL)
        print "done"

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list