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 311413 - use gst-launch to start a pipeline with thread, but that never works
use gst-launch to start a pipeline with thread, but that never works
Status: VERIFIED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.x
Other All
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-24 14:43 UTC by honggang xu
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description honggang xu 2005-07-24 14:43:01 UTC
Please describe the problem:
run: gst-launch filesrc location=<a mpeg file> ! mpegdemux ! queue { ! 
mpeg2dec ! xvimagesink }
Always gets error like this:
Warning : erroneous pipeline: could not link queue0 to mpeg2dec

Steps to reproduce:
1. as above words
2. 
3. 


Actual results:
as above words

Expected results:
we should link queue and mpeg2dec correctly

Does this happen every time?
Yes

Other information:
After ddd into _gst_parse_launch() function, the input str is fine and match 
command line parameters well. But in after yyparse(&g), g.chain contains 
element --- thread, but nowhere find elements that should be in thread element.
in g.links, all src/sink pair are there. So after all elements in g.chain are 
put in bin but elements inside {} are not put in thread element, then try to 
link src/sink, we get error, I think the problem is here
Comment 1 Andy Wingo 2005-08-02 13:54:13 UTC
honggang: can you try as ! { insead of { ! ? Not sure if it makes a difference,
but it seems a bit more normal. Also, does it work without threads?

Dropping severity, versioning as 0.8.x
Comment 2 honggang xu 2005-08-03 10:29:33 UTC
wingo, we tried both, but the result is the same. it works fine without thread. 
Here we have a team trying to build up application based Gstreamer, we need 
time to pick up confidence about Gstreamer, do think it is reasonable to build 
commercial product based on it? Is it mature enough? Thanks -Honggang 
Comment 3 honggang xu 2005-08-12 08:52:04 UTC
The problem is not caused by thread,it is our wrong usage of connect Mpeg2demux 
and queue, since queue has any type pad, so it is unknown it will be connected 
with which pad of Mpeg2demux, to solve it, don't connect queue with Mpeg2demux.
P.S. in info gstlaunch gives wrong information by connecting queue with 
mpeg2demux.
Comment 4 Jan Schmidt 2005-08-12 23:24:03 UTC
Yes, this is correct. In this example, queue ends up being linked to a pad that
isn't shown in the pad template for mpegdemux, which is there because mpegdemux
derives from mpegparse and isn't removing the pad (which it probably should do)

In any case, the correct solution is to ensure that queue gets linked to the
correct pad of mpegdemux by either:
a) specifying a pad in the launch line, eg "gst-launch filesrc location=<a mpeg
file> ! mpegdemux .video_00 ! queue { ! mpeg2dec ! xvimagesink }"
b) In an application, perform the link yourself by connecting to the 'new-pad'
signal of mpegdemux and linking it to the queue only when a video/mpeg pad is
created.
Comment 5 honggang xu 2005-08-15 09:18:56 UTC
Jan, thanks for your comments, but we tried your suggestion that connect 
mpegdemux.video_00 with queue, we got another error -- says " Link without 
source element", I think it is caused by no video output from video_00 pad or 
maybe the pad name is wrong?