diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2021-04-21 15:34:07 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2021-05-13 15:05:00 -0400 |
commit | 5fd0ee322754f16b895ae43e59b2ed02a4d37366 (patch) | |
tree | 0a7f68cb1a76e6942140ef44c124c87e5cc37fc8 /gst-libs | |
parent | 7e7678f4cbfb755de65bb446dcdf703504a9f0bf (diff) | |
download | gstreamer-plugins-bad-5fd0ee322754f16b895ae43e59b2ed02a4d37366.tar.gz |
webrtc rtptransceiver: Implement "current-direction" property
Implement the property as read-only to follow the WebRTC spec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/webrtc/rtptransceiver.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gst-libs/gst/webrtc/rtptransceiver.c b/gst-libs/gst/webrtc/rtptransceiver.c index 7cd213202..98d7ce817 100644 --- a/gst-libs/gst/webrtc/rtptransceiver.c +++ b/gst-libs/gst/webrtc/rtptransceiver.c @@ -56,6 +56,7 @@ enum PROP_DIRECTION, PROP_MLINE, PROP_MID, + PROP_CURRENT_DIRECTION, PROP_STOPPED, // FIXME }; @@ -108,6 +109,9 @@ gst_webrtc_rtp_transceiver_get_property (GObject * object, guint prop_id, case PROP_DIRECTION: g_value_set_enum (value, webrtc->direction); break; + case PROP_CURRENT_DIRECTION: + g_value_set_enum (value, webrtc->current_direction); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -225,6 +229,24 @@ gst_webrtc_rtp_transceiver_class_init (GstWebRTCRTPTransceiverClass * klass) " m-line is rejected by either a remote offer or any answer.", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + /** + * GstWebRTCRTPTransceiver:current-direction: + * + * The transceiver's current directionality, or none if the + * transceiver is stopped or has never participated in an exchange + * of offers and answers. To change the transceiver's + * directionality, set the value of the direction property. + * + * Since: 1.20 + **/ + g_object_class_install_property (gobject_class, + PROP_DIRECTION, + g_param_spec_enum ("current-direction", "Current Direction", + "Transceiver current direction", + GST_TYPE_WEBRTC_RTP_TRANSCEIVER_DIRECTION, + GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + } static void |