diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.c b/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.c index bebad88826..596ef0f0a3 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.c @@ -244,10 +244,10 @@ gst_webrtc_ice_set_tos (GstWebRTCICE * ice, GstWebRTCICEStream * stream, * gst_webrtc_ice_get_local_candidates: * @ice: The #GstWebRTCICE * @stream: The #GstWebRTCICEStream - * Returns: (transfer full) (element-type GstWebRTCICECandidateStats): List of local candidates + * Returns: (transfer full)(array zero-terminated=1): List of local candidates * Since: 1.22 */ -GArray * +GstWebRTCICECandidateStats * gst_webrtc_ice_get_local_candidates (GstWebRTCICE * ice, GstWebRTCICEStream * stream) { @@ -262,10 +262,10 @@ gst_webrtc_ice_get_local_candidates (GstWebRTCICE * ice, * gst_webrtc_ice_get_remote_candidates: * @ice: The #GstWebRTCICE * @stream: The #GstWebRTCICEStream - * Returns: (transfer full) (element-type GstWebRTCICECandidateStats): List of remote candidates + * Returns: (transfer full) (array zero-terminated=1): List of remote candidates * Since: 1.22 */ -GArray * +GstWebRTCICECandidateStats * gst_webrtc_ice_get_remote_candidates (GstWebRTCICE * ice, GstWebRTCICEStream * stream) { diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.h b/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.h index ea16441f25..ee5036f011 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/ice.h @@ -111,9 +111,11 @@ struct _GstWebRTCICEClass { GstWebRTCICEOnCandidateFunc func, gpointer user_data, GDestroyNotify notify); - GArray * (*get_local_candidates) (GstWebRTCICE * ice, + GstWebRTCICECandidateStats* + (*get_local_candidates) (GstWebRTCICE * ice, GstWebRTCICEStream * stream); - GArray * (*get_remote_candidates) (GstWebRTCICE * ice, + GstWebRTCICECandidateStats* + (get_remote_candidates) (GstWebRTCICE * ice, GstWebRTCICEStream * stream); gboolean (*get_selected_pair) (GstWebRTCICE * ice, GstWebRTCICEStream * stream, @@ -196,11 +198,11 @@ void gst_webrtc_ice_set_tos (GstWebRTCIC guint tos); GST_WEBRTC_API -GArray * gst_webrtc_ice_get_local_candidates (GstWebRTCICE * ice, +GstWebRTCICECandidateStats* gst_webrtc_ice_get_local_candidates (GstWebRTCICE * ice, GstWebRTCICEStream * stream); GST_WEBRTC_API -GArray * gst_webrtc_ice_get_remote_candidates (GstWebRTCICE * ice, +GstWebRTCICECandidateStats* gst_webrtc_ice_get_remote_candidates (GstWebRTCICE * ice, GstWebRTCICEStream * stream); GST_WEBRTC_API diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/nice/nice.c b/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/nice/nice.c index 94b47ba851..2248c79d23 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/nice/nice.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/webrtc/nice/nice.c @@ -1189,7 +1189,7 @@ _populate_candidate_list_stats (GstWebRTCNice * ice, GSList * cands, } } -static GArray * +static GstWebRTCICECandidateStats * gst_webrtc_nice_get_local_candidates (GstWebRTCICE * ice, GstWebRTCICEStream * stream) { @@ -1197,7 +1197,7 @@ gst_webrtc_nice_get_local_candidates (GstWebRTCICE * ice, GSList *cands = NULL; GArray *result = - g_array_new (FALSE, TRUE, sizeof (GstWebRTCICECandidateStats)); + g_array_new (TRUE, TRUE, sizeof (GstWebRTCICECandidateStats)); cands = nice_agent_get_local_candidates (nice->priv->nice_agent, stream->stream_id, NICE_COMPONENT_TYPE_RTP); @@ -1205,10 +1205,10 @@ gst_webrtc_nice_get_local_candidates (GstWebRTCICE * ice, _populate_candidate_list_stats (nice, cands, stream, result, TRUE); g_slist_free_full (cands, (GDestroyNotify) nice_candidate_free); - return result; + return (GstWebRTCICECandidateStats *) g_array_free (result, FALSE); } -static GArray * +static GstWebRTCICECandidateStats * gst_webrtc_nice_get_remote_candidates (GstWebRTCICE * ice, GstWebRTCICEStream * stream) { @@ -1216,7 +1216,7 @@ gst_webrtc_nice_get_remote_candidates (GstWebRTCICE * ice, GSList *cands = NULL; GArray *result = - g_array_new (FALSE, TRUE, sizeof (GstWebRTCICECandidateStats)); + g_array_new (TRUE, TRUE, sizeof (GstWebRTCICECandidateStats)); cands = nice_agent_get_remote_candidates (nice->priv->nice_agent, stream->stream_id, NICE_COMPONENT_TYPE_RTP); @@ -1224,7 +1224,7 @@ gst_webrtc_nice_get_remote_candidates (GstWebRTCICE * ice, _populate_candidate_list_stats (nice, cands, stream, result, FALSE); g_slist_free_full (cands, (GDestroyNotify) nice_candidate_free); - return result; + return (GstWebRTCICECandidateStats *) g_array_free (result, FALSE); } static gboolean