And use plain null terminated C arrays instead.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
* 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)
{
* 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)
{
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,
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
}
}
-static GArray *
+static GstWebRTCICECandidateStats *
gst_webrtc_nice_get_local_candidates (GstWebRTCICE * ice,
GstWebRTCICEStream * stream)
{
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);
_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)
{
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);
_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