set srtp-key to udpsrc caps

Tim Müller tim at centricular.com
Tue Jul 21 11:56:11 PDT 2015


On Tue, 2015-07-21 at 14:36 +0200, Alicia Romero wrote:
> Hi!
> 
> I want to set to udpsrc the srtp-key for using the plugin srtp:
> 
> [...]
> char key[]="0123456789012345678901234567890"
> 
> GstBuffer *buf = gst_buffer_new_wrapped ( g_memdup(key,
> strlen(key_ptr)),
> 
> strlen(key_ptr));
> 
> GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
>       "media", G_TYPE_STRING, "video",
>       "clock-rate", G_TYPE_INT, 90000,
>       "srtp-key", G_TYPE_POINTER, buf,
>       NULL);
> 
> [..]
> 
> 
> But this is not workin, in fact there is a SIGSEGV.
> 
> I don't know how to do that, can anyone help me?

Try ..., "srtp-key", GST_TYPE_BUFFER, buf, ...

and gst_buffer_unref (buf) afterwards.

But it should not have crashed anyway. Do you have a stack trace of the
crash?

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list