change h264Parser caps while pipe is running

Nicolas Dufresne nicolas at ndufresne.ca
Thu Jan 31 15:09:39 UTC 2019


Le jeudi 31 janvier 2019 à 14:19 +0000, Patrick Fischer a écrit :
> is it possible to change the caps of the h264Parser during runtime?
> I would like to change the "stream-format" from avc to byte-stream at runtime to get NAL units at the output.
> The pipe is in the running state:
> 
> i have tested
> ...
> gst_element_link_many(data.h264Parser, data.h264parseCapsfilter, data.videoAppSink, NULL);
> ...
> GstCaps *h264ParserFiltercaps = gst_caps_new_simple ("video/x-h264",
>                                             "stream-format", G_TYPE_STRING, "byte-stream",  //  <--- change from avc to byte-stream
>                                             "parsed", G_TYPE_BOOLEAN, "true",
>                                             "alignment", G_TYPE_STRING, "au",
>                                             NULL);
> g_object_set (G_OBJECT (data.h264parseCapsfilter), "caps", h264ParserFiltercaps, NULL);
> gst_caps_unref (h264ParserFiltercaps);
> 
> 
> did't change the stream-format :-(

I don't think this element handle renegotiation event. H264 is a
complex format and h264parse need to maintain a state, so renegotiation
might be a complex task.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190131/d71bb5c1/attachment.sig>


More information about the gstreamer-devel mailing list