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 650228 - Fix h264parse negotiation
Fix h264parse negotiation
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 578926
 
 
Reported: 2011-05-15 11:24 UTC by Alessandro Decina
Modified: 2011-05-25 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (10.00 KB, patch)
2011-05-15 11:24 UTC, Alessandro Decina
committed Details | Review

Description Alessandro Decina 2011-05-15 11:24:02 UTC
Negotiation in h264parse is currently broken. It negotiates caps with downstream only if the incoming stream is packetized and the split-packetized properties is set to TRUE (the default is FALSE).

These are two pipelines that fail to negotiate because of this:

gst-launch videotestsrc ! x264enc byte-stream=false ! h264parse ! avimux ! fakesink

gst-launch videotestsrc ! x264enc byte-stream=false ! h264parse ! mpegtsmux ! fakesink
Comment 1 Alessandro Decina 2011-05-15 11:24:46 UTC
Created attachment 187843 [details] [review]
fix
Comment 2 Mark Nauwelaerts 2011-05-16 10:05:34 UTC
Then again, the following pipeline negotiates fine:

gst-launch videotestsrc ! x264enc byte-stream=false ! 
h264parse split-packetized=true ! avimux ! fakesink

So, not splitting packetized input unless explicitly allowed is a bit a matter of choice, rather than necessarily "broken".  If felt this should happen sufficiently automagically to warrant api/abi breakage, then ok.
In any case, a bit more description/documentation on this / such choices than "fix negotiation" seems in order.

Also, if I read the original description properly, it would seem to suggest that negotiation does not work at all if incoming data is bytestream, which is not the case (should work ok regardless of any property)
Comment 3 Alessandro Decina 2011-05-16 10:32:24 UTC
(In reply to comment #2)
> Then again, the following pipeline negotiates fine:
> 
> gst-launch videotestsrc ! x264enc byte-stream=false ! 
> h264parse split-packetized=true ! avimux ! fakesink
> 
> So, not splitting packetized input unless explicitly allowed is a bit a matter
> of choice, rather than necessarily "broken".  If felt this should happen
> sufficiently automagically to warrant api/abi breakage, then ok.

The end goal is to make h264parse autopluggable, so yeah. Also considering we just renamed the old parser to legacyh264parse and changed API in the process, this is a good time to fix the API some more IMO.


> In any case, a bit more description/documentation on this / such choices than
> "fix negotiation" seems in order.

The reason for the generic description is that i'm not sure of exactly what combinations of input/output are broken without the patch. In some cases it doesn't negotiate correctly unless split-packetized is TRUE. Looking at the code it's obvious what needs to be changed so I did that :)


> Also, if I read the original description properly, it would seem to suggest
> that negotiation does not work at all if incoming data is bytestream, which is
> not the case (should work ok regardless of any property)

True, sorry about that. It should have been:

"When input is packetized it negotiates with downstream only if split-packetized is set"
Comment 4 Tim-Philipp Müller 2011-05-17 08:40:24 UTC
Some unit tests would be really nice..
Comment 5 Mark Nauwelaerts 2011-05-24 18:00:13 UTC
FWIW, I'm looking into some unit tests for videoparsers, so a.o. h264parse, to be determined in how much it can cover this particular situation.
Comment 6 Mark Nauwelaerts 2011-05-25 19:53:57 UTC
commit 6a8d66728f0c88c4e087d489084ecc31071dc251
Author: Alessandro Decina <alessandro.d@gmail.com>
Date:   Sun May 15 13:23:39 2011 +0200

    h264parse: allow full negotiation for packetized input
    
    ... by defaulting to allow splitting packetized input and having
    negotiation with downstream deciding whether or not this applies.
    
    Also enable pass-through parsing mode if input and output format
    (stream-format and alignment) match.
    
    API: GstH264Parse:split-packetized (removed)
    
    Fixes #650228.