GNOME Bugzilla – Bug 705425
x264enc: doesn't consider subset relations of profiles during negotiation
Last modified: 2013-08-27 13:21:32 UTC
Both of these pipelines fail to get to PLAYING: gst-launch-1.0 -v \ videotestsrc ! \ x264enc speed-preset=1 ! \ video/x-h264,profile=main ! \ fakesink silent=false gst-launch-1.0 -v \ videotestsrc ! \ x264enc ! \ video/x-h264,profile=baseline ! \ fakesink name=sink0 silent=false
I tracked this down to gst_codec_utils_h264_caps_set_level_and_profile() creating caps that are not the same as the filter caps. In both cases (but for different reasons), the profile is set to contrained-baseline. I'm somewhat surprised this doesn't cause a negotiation error.
> I'm somewhat surprised this doesn't cause a negotiation error. commit e0ae81ebacbe48300aece22dfef519088d8c5ae8 Author: Tim-Philipp Müller <tim@centricular.net> Date: Wed Aug 21 12:31:23 2013 +0100 x264enc: propagate flow return back to base class and upstream https://bugzilla.gnome.org/show_bug.cgi?id=705425
So additionally x264enc should check if it outputs constraint-baseline if downstream actually wants baseline. And if it does, just put that in the caps. As constrained-baseline is a strict subset of baseline there should be no problem, right?
commit aab5534573e318402ab5795f3310a739c8e8dc06 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Wed Aug 21 18:32:17 2013 +0200 x264enc: Consider subset relations of profiles when setting srcpad caps constrained-baseline is a subset of baseline, is a subset of main, is a subset of high profile. https://bugzilla.gnome.org/show_bug.cgi?id=705425
Bit unfortunate that now the profile signalled in the codec data / SPS doesn't match the caps, but I'd be surprised if anything cares..
Well, we could change the codec data and SPS too if you think that's a good idea ;)
Cherry-picked into 1.0 branch.