[gstreamer-bugs] [Bug 518010] New: gnlfilesource has unexpected media-start behavior
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Thu Feb 21 20:40:24 PST 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=518010
GStreamer | gnonlin | Ver: 0.10.9
Summary: gnlfilesource has unexpected media-start behavior
Product: GStreamer
Version: 0.10.9
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gnonlin
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: dskippy at ccs.neu.edu
QAContact: bilboed at bilboed.com
CC: dskippy at ccs.neu.edu
GNOME version: Unspecified
GNOME milestone: Unspecified
# In this program the first filesource plays the first two seconds of my audio
# file (passed in the first argument) and the second plays the next two
seconds.
# The start time of the second filesource is 2, which means that it should
start
# right after the first filesource but it does not, it waits for 2 more seconds
# and starts 4 seconds in. When I make the media-start property of the second
# filesource 0, it does start right after the first filesource with not pause.
# Of course it then plays the first two seconds of the file over again, rather
# than the next two.
#!/usr/bin/python
import pygst
pygst.require("0.10")
import gst
import gobject
import sys
def OnPad(comp, pad):
convpad = compconvert.get_compatible_pad(pad, pad.get_caps())
pad.link(convpad)
pipeline = gst.Pipeline()
comp = gst.element_factory_make("gnlcomposition")
pipeline.add(comp)
comp.connect("pad-added", OnPad)
compconvert = gst.element_factory_make("audioconvert")
pipeline.add(compconvert)
sink = gst.element_factory_make("alsasink")
pipeline.add(sink)
compconvert.link(sink)
audio1 = gst.element_factory_make("gnlfilesource")
comp.add(audio1)
audio1.set_property("location", sys.argv[1])
audio1.set_property("start", 0 * gst.SECOND)
audio1.set_property("duration", 2 * gst.SECOND)
audio1.set_property("media-start", 0 * gst.SECOND)
audio1.set_property("media-duration", 2 * gst.SECOND)
audio2 = gst.element_factory_make("gnlfilesource")
comp.add(audio2)
audio2.set_property("location", sys.argv[1])
audio2.set_property("start", 2 * gst.SECOND)
audio2.set_property("duration", 2 * gst.SECOND)
audio2.set_property("media-start", 2 * gst.SECOND)
audio2.set_property("media-duration", 2 * gst.SECOND)
pipeline.set_state(gst.STATE_PLAYING)
gobject.MainLoop().run()
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=518010.
More information about the Gstreamer-bugs
mailing list