GNOME Bugzilla – Bug 617318
matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction
Last modified: 2010-10-01 16:24:54 UTC
I've moved the profile/level extraction code to pbutils (bug 617314). Posting a patch to use this in matroskademux and qtdemux, and thus avoid code duplication.
Created attachment 160007 [details] [review] matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction The functions used to extract this data have been moved to gstpbutils to facilitate reuse.
Created attachment 160596 [details] [review] matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction Updating the previous patch - there was a line missing from Makefile.am.
Comment on attachment 160596 [details] [review] matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction Obsoleting and attaching an updated patch to use a setter function.
Created attachment 162338 [details] [review] matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction The functions used to extract this data have been moved to gstpbutils to facilitate reuse.
Comment on attachment 162338 [details] [review] matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction Pushed this, with one commit per element (mostly because it didn't apply as it was and it was easier to apply individually). I added calls to gst_pb_utils_init() to the plugin init function (doesn't do much at the moment, but should be there). Also fixed up what I presume were off-by-one errors (size parameter should be -1): >+ /* First byte is the version, second is the profile indication, and third >+ * is the 5 contraint_set_flags and 3 reserved bits. Fourth byte is the >+ * level indication. */ >+ gst_codec_utils_h264_caps_set_profile (caps, data + 1, size); >+ gst_codec_utils_h264_caps_set_level (caps, data + 1, size); > > memcpy (GST_BUFFER_DATA (priv), data, size); > gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, priv, NULL); >+ /* First 4 bytes are the length of the atom, the next 4 bytes >+ * are the fourcc, the next 1 byte is the version, and the >+ * subsequent bytes are sequence parameter set like data. */ >+ gst_codec_utils_h264_caps_set_profile (stream->caps, >+ avc_data + 0x9, size); >+ gst_codec_utils_h264_caps_set_level (stream->caps, >+ avc_data + 0x9, size); > > GST_DEBUG_OBJECT (qtdemux, "found avcC codec_data in stsd");
commit c65305d70e65f3d9c3d4cb37407b762ba6db16ca Author: Arun Raghavan <arun.raghavan@collabora.co.uk> Date: Fri Apr 30 21:00:31 2010 +0530 qtdemux: Use pbutils for H.264 profile/level extraction The functions used to extract this data have been moved to gstpbutils to facilitate reuse. https://bugzilla.gnome.org/show_bug.cgi?id=617318 commit 9e786de9c818b3d6af964b39afbfdf97eeb54b42 Author: Arun Raghavan <arun.raghavan@collabora.co.uk> Date: Fri Apr 30 21:00:31 2010 +0530 matroskademux: Use pbutils for H.264 profile/level extraction The functions used to extract this data have been moved to gstpbutils to facilitate reuse. https://bugzilla.gnome.org/show_bug.cgi?id=617318