GNOME Bugzilla – Bug 747217
dtlssrtpenc/dec: Should reset its state when going back to NULL
Last modified: 2018-11-03 13:32:53 UTC
Currently, setting the srtp-*/srtcp-* properties destroys the dtls element, but there is not way to restore it when changing states. It should probably re-create the sub-elements when going from NULL->READY if none of those propertties are set. Probalby also makes sense to re-create it if they are all resets to NULL.
IMHO, creating vmethod create_dtls_element in dtlssrtpbin and calling it in change_state method is a possible way as you said.
Created attachment 311036 [details] [review] dtlssrtp: recreate dtls element when going from NULL to READY
Review of attachment 311036 [details] [review]: ::: ext/dtls/gstdtlssrtpdec.c @@ +442,3 @@ + } + + bin->dtls_element = gst_element_factory_make ("dtlsdec", "dtls-decoder"); Can you leave the name as NULL because having specific names makes it harder to grep through debug logs. @@ +456,3 @@ + + g_signal_connect (bin->dtls_element, "notify::peer-pem", + G_CALLBACK (on_peer_pem), self); Don't you want to connect the signal before you link the pads ?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/227.