<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 22 févr. 2020 17 h 00, jeyp4 <<a href="mailto:jaiforfriend@gmail.com">jaiforfriend@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
I want to use appsrc as opussrc.<br>
I have set the all caps parameters<br>
caps = gst_caps_new_simple("audio/x-opus",<br>
                                       "rate", G_TYPE_INT, 16000,<br>
                                       "channels", G_TYPE_INT, 1,<br>
                                       "channel-mapping-family", G_TYPE_INT,<br>
0,<br>
                                       "stream-count", G_TYPE_INT, 1,<br>
                                       "coupled-count", G_TYPE_INT, 0,<br>
                                       NULL<br>
                                       );<br>
<br>
But I think I have to set streamheader also, in order to avoid using<br>
opusparse. Because parsing may result in being a source of latency.<br>
<br>
I can know the stream headers by just simple command line.<br>
gst-launch-1.0 pulsesrc buffer-time=20000 ! opusenc frame-size=20 ! opusdec<br>
! pulsesink buffer-time=20000 -v<br>
<br>
/GstPipeline:pipeline0/GstOpusEnc:opusenc0.GstPad:src: caps =<br>
"audio/x-opus\,\ rate\=\(int\)16000\,\<br>
channels\=\(int\)1\,\channel-mapping-family\=\(int\)0\,\<br>
stream-count\=\(int\)1\,\ coupled-count\=\(int\)0\,\<br>
streamheader\=\(buffer\)\<\4f7075734865616401013801803e0000000000\,\4f707573546167731e000000456e636f6465642077697468204753747265616d6572206f707573656e630000000001\<br>
\>"<br>
<br>
So, the stream headers are: 4f7075734865616401013801803e0000000000,<br>
4f707573546167731e000000456e636f6465642077697468204753747265616d6572206f707573656e630000000001.<br>
<br>
How can I set these in appsrc's caps?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You need a GstBuffer, propably use new and allocate helper. The you have to write this data in. You could also use an guint8 array, with the data in hex, then use new wrap helper.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>