Need Help Regarding SRTPDEC request_key_callback

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

Need Help Regarding SRTPDEC request_key_callback

sameer_evon

Hello All,

I am trying to record audio received in form srtp in a custom application. For this I set up following pipeline programatically:

udpsrc port=5906 caps="application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)0,srtp-key=(buffer)344d2b7943556a5679644c53724d7232314478784a766e7075674446717172414639736c52717467,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0" ! srtpdec ! rtppcmudepay ! filesink location=/home/audio.pcmu

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

Thanks & Regards.


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

Re: Need Help Regarding SRTPDEC request_key_callback

Olivier Crête-3
Hi,

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.


You probably unref the srtpdec object somewhere where you shouldn't.

-- 
Olivier Crête [hidden email]

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

Re: Need Help Regarding SRTPDEC request_key_callback

sameer_evon

Thank you for the quick reply!

We have not unref the srtpdec object anywhere. Even made the srtpdec object global.

Following is our implementation of callback:

g_signal_connect(G_OBJECT(srtpdec), "request-key", G_CALLBACK (request_key_callback), &masterKey);

// masterKey is string

// srtpdec is global GstElement

GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

{  
    string *key = (string*)udata;
    GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
      "payload", G_TYPE_INT, 0,
      "ssrc", G_TYPE_UINT, ssrc,
      "srtp-key", G_TYPE_STRING, key->c_str(),
      "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
      "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtcp-cipher", G_TYPE_STRING, "aes-128-icm",
      "roc", G_TYPE_UINT, 0,
      NULL);
    return *caps;
}

Is it the correct way?

Thanks

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 3:52 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

 

You probably unref the srtpdec object somewhere where you shouldn't.

 

-- 
Olivier Crête
[hidden email]

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

Re: Need Help Regarding SRTPDEC request_key_callback

Olivier Crête-3
Hi,

On Wed, 2020-04-08 at 18:52 +0530, sameer wrote:

Thank you for the quick reply!

We have not unref the srtpdec object anywhere. Even made the srtpdec object global.

Following is our implementation of callback:

g_signal_connect(G_OBJECT(srtpdec), "request-key", G_CALLBACK (request_key_callback), &masterKey);

// masterKey is string

// srtpdec is global GstElement

GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The return value should be a "GstCaps *"

{  
    string *key = (string*)udata;
    GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
      "payload", G_TYPE_INT, 0,
      "ssrc", G_TYPE_UINT, ssrc,
      "srtp-key", G_TYPE_STRING, key->c_str(),
      "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
      "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtcp-cipher", G_TYPE_STRING, "aes-128-icm",
      "roc", G_TYPE_UINT, 0,
      NULL);
    return *caps;
}

And you should "return caps;"

Olivier

Is it the correct way?

Thanks

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 3:52 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

 

You probably unref the srtpdec object somewhere where you shouldn't.

 

-- 
Olivier Crête
[hidden email]
_______________________________________________
gstreamer-devel mailing list
[hidden email]

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Olivier Crête [hidden email]

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

Re: Need Help Regarding SRTPDEC request_key_callback

sameer_evon

On returning caps instead of *caps the app is crashing without showing any errorlogs.

Do I need to add the callback method in the class as a member method?

On 08/04/20 7:20 pm, Lefteris Diakakis wrote:

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 4:47 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 18:52 +0530, sameer wrote:

Thank you for the quick reply!

We have not unref the srtpdec object anywhere. Even made the srtpdec object global.

Following is our implementation of callback:

g_signal_connect(G_OBJECT(srtpdec), "request-key", G_CALLBACK (request_key_callback), &masterKey);

// masterKey is string

// srtpdec is global GstElement

GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The return value should be a "GstCaps *"

 

{  
    string *key = (string*)udata;
    GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
      "payload", G_TYPE_INT, 0,
      "ssrc", G_TYPE_UINT, ssrc,
      "srtp-key", G_TYPE_STRING, key->c_str(),
      "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
      "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtcp-cipher", G_TYPE_STRING, "aes-128-icm",
      "roc", G_TYPE_UINT, 0,
      NULL);
    return *caps;
}

And you should "return caps;"

 

Olivier

 

Is it the correct way?

Thanks

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 3:52 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

 

You probably unref the srtpdec object somewhere where you shouldn't.

 

-- 
Olivier Crête

[hidden email]

[hidden email]

 

_______________________________________________
gstreamer-devel mailing list

[hidden email]

[hidden email]

 

 

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 

 
-- 
Olivier Crête
[hidden email]

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

Re: Need Help Regarding SRTPDEC request_key_callback

sameer_evon

We are running pipeline in a different thread other than the main thread of application. Can the unref issue be related to different thread context?

On 08/04/20 9:03 pm, sameer wrote:

On returning caps instead of *caps the app is crashing without showing any errorlogs.

Do I need to add the callback method in the class as a member method?

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 4:47 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 18:52 +0530, sameer wrote:

Thank you for the quick reply!

We have not unref the srtpdec object anywhere. Even made the srtpdec object global.

Following is our implementation of callback:

g_signal_connect(G_OBJECT(srtpdec), "request-key", G_CALLBACK (request_key_callback), &masterKey);

// masterKey is string

// srtpdec is global GstElement

GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The return value should be a "GstCaps *"

 

{  
    string *key = (string*)udata;
    GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
      "payload", G_TYPE_INT, 0,
      "ssrc", G_TYPE_UINT, ssrc,
      "srtp-key", G_TYPE_STRING, key->c_str(),
      "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
      "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtcp-cipher", G_TYPE_STRING, "aes-128-icm",
      "roc", G_TYPE_UINT, 0,
      NULL);
    return *caps;
}

And you should "return caps;"

 

Olivier

 

Is it the correct way?

Thanks

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 3:52 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

 

You probably unref the srtpdec object somewhere where you shouldn't.

 

-- 
Olivier Crête

[hidden email]

[hidden email]

 

_______________________________________________
gstreamer-devel mailing list

[hidden email]

[hidden email]

 

 

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 

 
-- 
Olivier Crête
[hidden email]

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

Re: Need Help Regarding SRTPDEC request_key_callback

sameer_evon

Any updates on this? We are stuck for some while in this issue and it is crucial for us to get the srtp recording going.

On 09/04/20 2:58 pm, sameer wrote:

We are running pipeline in a different thread other than the main thread of application. Can the unref issue be related to different thread context?

On 08/04/20 9:03 pm, sameer wrote:

On returning caps instead of *caps the app is crashing without showing any errorlogs.

Do I need to add the callback method in the class as a member method?

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 4:47 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 18:52 +0530, sameer wrote:

Thank you for the quick reply!

We have not unref the srtpdec object anywhere. Even made the srtpdec object global.

Following is our implementation of callback:

g_signal_connect(G_OBJECT(srtpdec), "request-key", G_CALLBACK (request_key_callback), &masterKey);

// masterKey is string

// srtpdec is global GstElement

GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The return value should be a "GstCaps *"

 

{  
    string *key = (string*)udata;
    GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
      "payload", G_TYPE_INT, 0,
      "ssrc", G_TYPE_UINT, ssrc,
      "srtp-key", G_TYPE_STRING, key->c_str(),
      "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
      "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtcp-cipher", G_TYPE_STRING, "aes-128-icm",
      "roc", G_TYPE_UINT, 0,
      NULL);
    return *caps;
}

And you should "return caps;"

 

Olivier

 

Is it the correct way?

Thanks

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 3:52 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

 

You probably unref the srtpdec object somewhere where you shouldn't.

 

-- 
Olivier Crête

[hidden email]

[hidden email]

 

_______________________________________________
gstreamer-devel mailing list

[hidden email]

[hidden email]

 

 

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 

 
-- 
Olivier Crête
[hidden email]

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

Re: Need Help Regarding SRTPDEC request_key_callback

sameer_evon

Hello All,

It seems like callback for signal "request-key" is being invoked on a different context and user_data is not accesible. App crashes when I try to access user_data.

I have tried to use GMainContext from this link to get signal callback in the same context but nothing helps.

Any help would be much appreciated.

Thanks

On 09/04/20 7:44 pm, sameer wrote:

Any updates on this? We are stuck for some while in this issue and it is crucial for us to get the srtp recording going.

On 09/04/20 2:58 pm, sameer wrote:

We are running pipeline in a different thread other than the main thread of application. Can the unref issue be related to different thread context?

On 08/04/20 9:03 pm, sameer wrote:

On returning caps instead of *caps the app is crashing without showing any errorlogs.

Do I need to add the callback method in the class as a member method?

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 4:47 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 18:52 +0530, sameer wrote:

Thank you for the quick reply!

We have not unref the srtpdec object anywhere. Even made the srtpdec object global.

Following is our implementation of callback:

g_signal_connect(G_OBJECT(srtpdec), "request-key", G_CALLBACK (request_key_callback), &masterKey);

// masterKey is string

// srtpdec is global GstElement

GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The return value should be a "GstCaps *"

 

{  
    string *key = (string*)udata;
    GstCaps *caps = gst_caps_new_simple ("application/x-srtp",
      "payload", G_TYPE_INT, 0,
      "ssrc", G_TYPE_UINT, ssrc,
      "srtp-key", G_TYPE_STRING, key->c_str(),
      "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
      "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80",
      "srtcp-cipher", G_TYPE_STRING, "aes-128-icm",
      "roc", G_TYPE_UINT, 0,
      NULL);
    return *caps;
}

And you should "return caps;"

 

Olivier

 

Is it the correct way?

Thanks

 

 

From: Olivier Crête [hidden email]
Sent: Wednesday, April 8, 2020 3:52 PM
To: Discussion of the development of and with GStreamer [hidden email]
Cc: Lefteris Diakakis [hidden email]
Subject: Re: Need Help Regarding SRTPDEC request_key_callback

 

Hi,

 

On Wed, 2020-04-08 at 14:37 +0530, sameer wrote:

The ssrc is not received in sdp. I have implemented the callback function to return capstring as mentioned in the documentation :

static GstCaps request_key_callback (GstElement  gstsrtpdec, guint  ssrc, gpointer  udata)

The capstring returned is like:

" application/x-srtp,channels=(int)1,media=(string)audio,payload=(int)0,clock-rate=(int)8000,encoding-name=(string)PCMU,ssrc=(uint)1932929554,srtp-key=(buffer)4d73554e564e334354466141365042324168614444436c4a456a754a497673747a354e5961694d5a,srtp-cipher=(string)aes-128-icm,srtp-auth=(string)hmac-sha1-32,srtcp-cipher=(string)aes-128-icm,srtcp-auth=(string)hmac-sha1-32,roc=(uint)0 "

But after the callback invokes I am receiving following error:

(recorder:32537): GLib-GObject-CRITICAL **: 14:18:06.064: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (recorder:32537): CRITICAL **: 14:18:06.064: update_session_stream_from_caps: assertion 'GST_IS_SRTP_DEC (filter)' failed

and the app crashes.

Can anyone tell me what mistake I am making. I am not able to find much in the documentation or any examples.

 

You probably unref the srtpdec object somewhere where you shouldn't.

 

-- 
Olivier Crête

[hidden email]

[hidden email]

 

_______________________________________________
gstreamer-devel mailing list

[hidden email]

[hidden email]

 

 

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 

 
-- 
Olivier Crête
[hidden email]

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