set srtp-key to udpsrc caps

Alicia Romero alromor84 at gmail.com
Wed Jul 22 00:41:06 PDT 2015


Thanks for your answer.
The crash was about another mistake I did, but I solve it.
I use GST_TYPE_BUFFER and the problem is that I think the buffer was not
correctly created, because in the log file I can see that it was another
key inserted:

srtp-key=(buffer)303132333435363738393031323334353637383930313233343536373839,
srtp-cipher=(string)aes-128-icm, srtp-auth=(string)hmac-sha1-80 [...]

And the key I am trying to insert is char
key[]="0123456789012345678901234567890

Why is this happening?
Thanks!!

2015-07-21 20:56 GMT+02:00 Tim Müller <tim at centricular.com>:

> 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
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150722/7d31640c/attachment.html>


More information about the gstreamer-devel mailing list