mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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>
This commit is contained in:
parent
7e7678f4cb
commit
5fd0ee3227
1 changed files with 22 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue