How can I deserialize codec_data from h.264 (avc) caps

David Ing ding at panopto.com
Fri Sep 7 00:54:14 UTC 2018


Yes, it is just a hex representation of a byte array.

To clarify my question:  How can I extract the information from the byte
array?

I found some code inside gst-plugins-bad (gsth264parse.c) that seems like
it might work.  I am probably going to hack something together from that
(unless anyone knows of a better solution).

On Thu, Sep 6, 2018 at 4:44 PM Nicolas Dufresne <nicolas at ndufresne.ca>
wrote:

> Le jeudi 06 septembre 2018 à 14:25 -0700, David Ing a écrit :
> > I can't figure out how to deserialize the codec_data within a caps
> > structure like this one:
> >
> > video/x-h264
> > > stream-format=(string)avc
> > > alignment=(string)au
> > > level=(string)4.2
> > > profile=(string)main
> > > codec_data=(buffer)014d402affe10029674d402a965403c0113f2e02d4040405
> > > 00000300010000030032e04000fa000005dc026a540ed0913501000468ce3520
>
> I believe this is just hex representation of the bytes, isn't it ? From
> API point of view, gst_caps_from_string() will handle this. I believe
> we use a GValue transform to do string to GstBuffer, and have a handle
> for that transform registered into GLib.
>
> > > width=(int)1920
> > > height=(int)1080
> > > framerate=(fraction)25/1
> > > pixel-aspect-ratio=(fraction)1/1
> > > interlace-mode=(string)progressive, parsed=(boolean)true
> > >
> > Can someone point me in the right direction?
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180906/7c14c8f0/attachment.html>


More information about the gstreamer-devel mailing list