mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-12 04:11:31 +00:00
webrtc: Use properties to access the inside of the transceiver object
This will allow hiding the insides from unsafe application access. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/36>
This commit is contained in:
parent
5f9ba620ce
commit
ba079092f8
1 changed files with 18 additions and 6 deletions
|
@ -259,22 +259,34 @@ create_receiver_entry (SoupWebsocketConnection * connection)
|
||||||
&transceivers);
|
&transceivers);
|
||||||
g_assert (transceivers != NULL && transceivers->len > 1);
|
g_assert (transceivers != NULL && transceivers->len > 1);
|
||||||
trans = g_array_index (transceivers, GstWebRTCRTPTransceiver *, 0);
|
trans = g_array_index (transceivers, GstWebRTCRTPTransceiver *, 0);
|
||||||
trans->direction = GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY;
|
g_object_set (trans, "direction",
|
||||||
|
GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY, NULL);
|
||||||
if (video_priority) {
|
if (video_priority) {
|
||||||
GstWebRTCPriorityType priority;
|
GstWebRTCPriorityType priority;
|
||||||
|
|
||||||
priority = _priority_from_string (video_priority);
|
priority = _priority_from_string (video_priority);
|
||||||
if (priority)
|
if (priority) {
|
||||||
gst_webrtc_rtp_sender_set_priority (trans->sender, priority);
|
GstWebRTCRTPSender *sender;
|
||||||
|
|
||||||
|
g_object_get (trans, "sender", &sender, NULL);
|
||||||
|
gst_webrtc_rtp_sender_set_priority (sender, priority);
|
||||||
|
g_object_unref (sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
trans = g_array_index (transceivers, GstWebRTCRTPTransceiver *, 1);
|
trans = g_array_index (transceivers, GstWebRTCRTPTransceiver *, 1);
|
||||||
trans->direction = GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY;
|
g_object_set (trans, "direction",
|
||||||
|
GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY, NULL);
|
||||||
if (audio_priority) {
|
if (audio_priority) {
|
||||||
GstWebRTCPriorityType priority;
|
GstWebRTCPriorityType priority;
|
||||||
|
|
||||||
priority = _priority_from_string (audio_priority);
|
priority = _priority_from_string (audio_priority);
|
||||||
if (priority)
|
if (priority) {
|
||||||
gst_webrtc_rtp_sender_set_priority (trans->sender, priority);
|
GstWebRTCRTPSender *sender;
|
||||||
|
|
||||||
|
g_object_get (trans, "sender", &sender, NULL);
|
||||||
|
gst_webrtc_rtp_sender_set_priority (sender, priority);
|
||||||
|
g_object_unref (sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g_array_unref (transceivers);
|
g_array_unref (transceivers);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue