change h264Parser caps while pipe is running

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

change h264Parser caps while pipe is running

Patrick Fischer
Hello

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 :-(


regards

Patrick



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: change h264Parser caps while pipe is running

Nicolas Dufresne-5
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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: change h264Parser caps while pipe is running

Baby Octopus
Administrator
In reply to this post by Patrick Fischer
May be you should consider adding a tee before h264parse, and have both the
formats concurrently

~BO



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel