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 724856 - mpegpsdemux for python unnormal
mpegpsdemux for python unnormal
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.1.1
Other All
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-21 05:34 UTC by troy
Modified: 2014-02-21 08:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description troy 2014-02-21 05:34:48 UTC
Hi all:
    Recently I use gstreamer to develop a program.I wanna exchanging H.264 ps stream to es stream.When I use below pipeline ,it works well:

gst-launch-0.10 filesrc location=test.264 ! typefind !  mpegpsdemux  !  filesink location=es.264  

But ,When I change this way to use a python program,the es.264(filesink) is 0.

My program is :

import gi
gi.require_version('Gst', '1.0')

from gi.repository import GObject, Gst
import os,sys,threading
#from ctypes import *

GObject.threads_init()
Gst.init(None)

pipeline = Gst.Pipeline()
filesrc = Gst.ElementFactory.make('filesrc','filesrc')
filesrc.set_property('location', 'E:\\test.264')
pipeline.add(filesrc)


typefind = Gst.ElementFactory.make('typefind','typefind')
pipeline.add(typefind)


mpegpsdemux = Gst.ElementFactory.make('mpegpsdemux','mpegpsdemux')
pipeline.add(mpegpsdemux)


filesink = Gst.ElementFactory.make('filesink','filesink')
filesink.set_property('location', 'E:\\es.264')
pipeline.add(filesink)

filesrc.link(typefind)
typefind.link(mpegpsdemux)
mpegpsdemux.link(filesink)
#typefind.link(filesink)

pipeline.set_state(Gst.State.PLAYING)
print "start..."

GObject.MainLoop().run()



what is the problem????
Comment 1 Tim-Philipp Müller 2014-02-21 08:03:32 UTC
This is not a bug, but expected behaviour.

The link() between mpegpsdemux and filesink will fail, because the demuxer doesn't have any source pads yet before dataflow starts.

use the pad-added signal to wait for a pad on the demuxer, or build the pipeline using Gst.parse_launch(), which will handle that automatically for you.

Please use the gstreamer-devel mailing list for any further support questions, thanks.