After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 518010 - gnlfilesource has unexpected media-start behavior
gnlfilesource has unexpected media-start behavior
Status: RESOLVED DUPLICATE of bug 575972
Product: GStreamer
Classification: Platform
Component: gnonlin
0.10.9
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
Edward Hervey
Depends on:
Blocks:
 
 
Reported: 2008-02-22 04:40 UTC by Mike MacHenry
Modified: 2009-03-19 15:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike MacHenry 2008-02-22 04:40:23 UTC
# 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()
Comment 1 Mike MacHenry 2008-03-10 05:33:05 UTC
This only happens with mp3 and ogg (and probably other compressed file formats I have discovered) It works fine with wav.
Comment 2 Edward Hervey 2009-03-19 15:48:21 UTC
issue with gnlfilesource and segment-done. Marking as duplicate of #575972

*** This bug has been marked as a duplicate of 575972 ***