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 594490 - gstrtpbin always uses pt to demux
gstrtpbin always uses pt to demux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.16
Other Linux
: Normal enhancement
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-08 12:53 UTC by Marc Leeman
Modified: 2009-09-08 15:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
disable ptdemux behaviour in gstrtpbin (8.53 KB, patch)
2009-09-08 12:53 UTC, Marc Leeman
committed Details | Review

Description Marc Leeman 2009-09-08 12:53:03 UTC
Created attachment 142696 [details] [review]
disable ptdemux behaviour in gstrtpbin

gstrtpbin uses gstrtpptdemux to demux the streams based on their PT value.
However, some encoders send out I (and other frames) on different PT values; as
a result; those streams cannot be decoded or in a slideshow (I-Frames) fashion
only.

The attached patch adds a parameter 'ignore-pt' that disables creating a
gstrtpptdemux module and ghosts the pads of gstrtpjitterbuffer instead of the
ones of gstrtpptdemux.
Comment 1 Olivier Crête 2009-09-08 13:58:51 UTC
that seems wrong.. your decoder should have multiple input pads I think.
Comment 2 Marc Leeman 2009-09-08 14:13:25 UTC
(In reply to comment #1)
> that seems wrong.. your decoder should have multiple input pads I think.

That would require a rewrite for every decoder possible (decodebin && mpeg2dec, ffdec_mpeg4, ...) or having a new module that re-multiplexes the stream :-/ The latter would break gstrtpbin alltogether. 

Furthermore, I believe most of the current decoder modules have only one static sink pad.

We've had (IIRC) already two hardware encoders that take this approach (one of them is some VerInt network encoder).

Both seem to split I frames from the B and P frames for some reason. Disabling the multiplexing based on the pt value, while leaving the default behaviour as it was, seems the simplest solution with minimal impact.

I used to do this on my own very limited version of gstrtpbin; but this seemed silly. I think I discussed this a couple of months ago on IRC and this this seemed a valid extension.
Comment 3 Olivier Crête 2009-09-08 14:25:51 UTC
Well, if the encoder separates packets belonging to the same codec, it seems pretty wrong. With your setup, how will you know if the other side changes codecs? etc
Comment 4 Marc Leeman 2009-09-08 14:37:35 UTC
> Well, if the encoder separates packets belonging to the same codec, it seems
> pretty wrong. 

You are preaching to the choir.

Unfortunately, we're talking about hardware encoders; not software encoders :-/ As such their are out of our control.

A lot of decisions by hardware encoder manufacturers seem devoid of much logic; we just try to support them since we; on the decoder side; are always the first point customers address if 'it does not work'.
Comment 5 Olivier Crête 2009-09-08 14:45:30 UTC
You can just re-write the PT after the encoder...
Comment 6 Marc Leeman 2009-09-08 15:06:33 UTC
I'm not certain if I get it:

We have a hardware encoder on the network; which is completely closed and a black box; of which the manufacturer does not care about breaking standards but is sending data on some multicast address.

The only thing we can do is configure the address and port.

You are suggesting that; on the decoder side; I receive the data using udpsrc/gstrtpbin; capture the generated pads of gstrtpbin multiplex them again before feeding (by optionally changing the pt to some dynamic value ) it to rtpmp4vdepay?

Did I get that right?
Comment 7 Olivier Crête 2009-09-08 15:17:02 UTC
ah, I though you had a hardware encoder chip under your software, not some crappy third party box. Maybe I could suggest you could use gstrtpsession directly, so you dont have to bother with ssrc/pt demux at all ?
Comment 8 Wim Taymans 2009-09-08 15:22:20 UTC
Unfortunately rtpsession does not do jitterbuffer or lip-sync by itself. 

The best solution IMO would be to combine the different pts again with a rtpmux or something, right before the decoder.

I'm considering adding the property to rtpbin because it seems a little silly to first demux and then mux again.
Comment 9 Wim Taymans 2009-09-08 15:40:50 UTC
commit 6b46aeb6a3352f77a0c31322f6231a9a3dc09115
Author: Marc Leeman <marc.leeman@gmail.com>
Date:   Tue Sep 8 17:37:15 2009 +0200

    rtpbin: add ignore-pt parameter
    
    Add a parameter 'ignore-pt' that disables creating a gstrtpptdemux module and
    ghosts the pads of gstrtpjitterbuffer instead of the ones of gstrtpptdemux.
    
    Fixes #594490