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 686988 - tsparse: Fix per-program handling
tsparse: Fix per-program handling
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-27 15:45 UTC by Sebastian Pölsterl
Modified: 2018-11-03 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log file with gstreamer-0.10 (13.84 KB, application/x-bzip)
2012-10-27 15:45 UTC, Sebastian Pölsterl
Details
Log file with gstreamer-1.0 from git master (9.84 KB, application/x-bzip)
2012-10-27 15:46 UTC, Sebastian Pölsterl
Details
Log file for gst 1.0 when reading from file (245.48 KB, text/x-log)
2012-11-01 12:45 UTC, Sebastian Pölsterl
Details

Description Sebastian Pölsterl 2012-10-27 15:45:33 UTC
Running dvbbasebin via gst-launch-1.0 will result every time into

gstbasesrc.c(2791): gst_base_src_loop (): /GstPipeline:pipeline0/DvbBaseBin:dvbbasebin0/GstDvbSrc:dvbsrc0:
streaming task paused, reason not-linked (-1)

Using the same pipeline with gst-launch-0.10 works just fine. This is a serious regression which results in dvbbasebin not being usable at all!
Comment 1 Sebastian Pölsterl 2012-10-27 15:45:59 UTC
Created attachment 227403 [details]
Log file with gstreamer-0.10
Comment 2 Sebastian Pölsterl 2012-10-27 15:46:22 UTC
Created attachment 227404 [details]
Log file with gstreamer-1.0 from git master
Comment 3 Sebastian Pölsterl 2012-11-01 12:45:33 UTC
Created attachment 227795 [details]
Log file for gst 1.0 when reading from file

It seems that tsparse is to blame, because when read from a file I get the same error. Please find attached the log when running the following pipeline:

gst-launch-1.0 location=sample.mpeg ! tsparse .program_16398 ! fakesink

The sample file is available at http://k-d-w.org/clipboard/sample.mpeg
Comment 4 Tim-Philipp Müller 2012-11-13 10:19:57 UTC
The flow aggregation seems to be a bit messed up. For what it's worth, you can work around it by connecting the "src" pad to queue ! fakesink or so.
Comment 5 Sebastian Pölsterl 2012-12-16 17:49:09 UTC
The workaround is really not helpful when what I ultimately want is to watch the file using Totem. This is a major regression which deserves more attention, IMHO.
Comment 6 Tim-Philipp Müller 2012-12-16 17:58:08 UTC
Perhaps you could have a look at it then?
Comment 7 Sebastian Pölsterl 2012-12-16 18:06:06 UTC
To be honest I would have no idea where to start looking for the cause or a fix thereof. I'm not familiar with the tsparse internals.
Comment 8 Edward Hervey 2013-07-17 13:22:36 UTC
confirmed this is still an issue with current git.
Comment 9 Edward Hervey 2013-07-17 13:37:54 UTC
Hmm... actually wait. I was only commenting on the pipeline from comment 3.

dvbbasebin works perfectly fine.

Note that the behaviour between tsparse (and therefore dvbbasebin) 0.10 and 1.0 changed

in 0.10 you had dynamic source pads for each programs

In 1.0 you have one static source pad for all input and you only request a specific program source pad if you want a specific program filtered out.

the reason for that change is that:
* In normal use-cases (within dvbbasebin), you select a program and only the program/pat/pmt/es pids are selected on dvbsource, so you've essentially already filtered out one program
* The filtering per-program caused massive overhead (creating plenty of small buffers).

Sebastian, does that help ?
Comment 10 Sebastian Dröge (slomo) 2013-07-17 13:47:53 UTC
Yes, let's consider this fixed then.
Comment 11 Tim-Philipp Müller 2013-07-17 13:49:27 UTC
He might have meant the other Sebastian ;)
Comment 12 Edward Hervey 2013-07-17 14:20:36 UTC
I did mean Sebastian Polsterl. Reopening
Comment 13 Sebastian Pölsterl 2013-07-18 16:13:51 UTC
I can confirm that the pipeline works when not using ".program_16398". But I'm still confused why it doesn't work if specified. Usually, you have multiple programs on the same multiplex, how do you choose the program you want to watch with Gst 1.0?
Comment 14 Edward Hervey 2013-07-18 17:14:40 UTC
Several ways:

* if you're using dvbbasebin, the output only contains one program. Nothing to do.

* if you're using a single file/stream containing  multi-program, use the tsdemux program property (there's another bug open about that with patches which I should push)

* Finally ... if you have a multi-program file or stream, and you want to extract individual streams (for storage, forwarding or whatever) then you need to use tsparse (but not dvbbasebin) and the request pads.

Keeping the bug open to fix the tsparse request_pad issue.
Comment 15 Edward Hervey 2013-08-21 06:27:58 UTC
After further investigations, tsparse needs to be refactored a bit to:
* Not push out per-program packets individually, but instead aggregate them all until the incoming buffer has been fully parsed
* On input-done, create *one* buffer per program pad and set the incoming buffer timestamp on it
* Be smarter about which packets should go on which program pad:
 1) If it's from a pid that the program handles take it (we know we need it)
 2) Else if it's from a pid of another program refuse it (we know we don't need it)
 3) Else take it (It's a global/generic MPTS pid)

Furthermore, we need to make sure that if a program/bin is listening synchronously to the bus messages, and especially the PAT, it can request/release a program pad *before* the data for that program goes out.
Comment 16 GStreamer system administrator 2018-11-03 13:13:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/81.