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 617318 - matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction
matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal enhancement
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 617314
Blocks:
 
 
Reported: 2010-04-30 20:01 UTC by Arun Raghavan
Modified: 2010-10-01 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction (8.18 KB, patch)
2010-04-30 20:01 UTC, Arun Raghavan
none Details | Review
matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction (8.60 KB, patch)
2010-05-08 16:34 UTC, Arun Raghavan
none Details | Review
matroskademux, qtdemux: Use pbutils for H.264 profile/level extraction (8.49 KB, patch)
2010-05-30 20:13 UTC, Arun Raghavan
committed Details | Review

Description Arun Raghavan 2010-04-30 20:01:05 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.
Comment 1 Arun Raghavan 2010-04-30 20:01:08 UTC
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.
Comment 2 Arun Raghavan 2010-05-08 16:34:04 UTC
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 3 Arun Raghavan 2010-05-30 20:13:06 UTC
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.
Comment 4 Arun Raghavan 2010-05-30 20:13:10 UTC
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 5 Tim-Philipp Müller 2010-10-01 16:13:28 UTC
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");
Comment 6 Tim-Philipp Müller 2010-10-01 16:15:50 UTC
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