A problem in playing a streamed H264 video over a network
Tim-Philipp Müller
t.i.m at zen.co.uk
Tue Sep 27 02:01:23 PDT 2011
> You could do something like this:
>
> const guint8 codec_data[] = { 0x01, 0x4d, .... };
> GstBuffer *buf;
> guint size;
>
> size = sizeof (codec_data);
> buf = gst_buffer_new_and_alloc (size);
> memcpy (GST_BUFFER_DATA (buf), codec_data, size);
> gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, buf, NULL);
> gst_buffer_unref (buf);
PS: but of course there's also gst_caps_new_from_string() ...
More information about the gstreamer-devel
mailing list