* @stream: The #GstWebRTCICEStream
* @local_stats: A pointer to #GstWebRTCICECandidateStats for local candidate
* @remote_stats: A pointer to #GstWebRTCICECandidateStats for remote candidate
- *
+ *
* Returns: FALSE on failure, otherwise @local_stats @remote_stats will be set
* Since: 1.22
*/
/**
* gst_webrtc_ice_candidate_stats_free:
* @stats: The #GstWebRTCICECandidateStats to be free'd
- *
+ *
* Helper function to free #GstWebRTCICECandidateStats
* Since: 1.22
*/
}
/**
+ * gst_webrtc_ice_candidate_stats_copy:
+ * @stats: The #GstWebRTCICE
+ *
+ * Returns: (transfer full): A copy of @stats
+ * Since: 1.22
+ */
+GstWebRTCICECandidateStats *
+gst_webrtc_ice_candidate_stats_copy (GstWebRTCICECandidateStats * stats)
+{
+ GstWebRTCICECandidateStats *copy =
+ g_malloc (sizeof (GstWebRTCICECandidateStats));
+
+ *copy = *stats;
+
+ copy->ipaddr = g_strdup (stats->ipaddr);
+ copy->url = g_strdup (stats->url);
+
+ return copy;
+}
+
+G_DEFINE_BOXED_TYPE (GstWebRTCICECandidateStats, gst_webrtc_ice_candidate_stats,
+ (GBoxedCopyFunc) gst_webrtc_ice_candidate_stats_copy,
+ (GBoxedFreeFunc) gst_webrtc_ice_candidate_stats_free);
+
+/**
* gst_webrtc_ice_set_on_ice_candidate:
* @ice: The #GstWebRTCICE
* @func: The #GstWebRTCICEOnCandidateFunc callback function
GST_WEBRTC_API
void gst_webrtc_ice_candidate_stats_free (GstWebRTCICECandidateStats * stats);
+GST_WEBRTC_API
+GType gst_webrtc_ice_candidate_stats_get_type (void);
+
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstWebRTCICE, gst_object_unref)
+GST_WEBRTC_API
+GstWebRTCICECandidateStats * gst_webrtc_ice_candidate_stats_copy (GstWebRTCICECandidateStats *stats);
+
G_END_DECLS
#endif /* __GST_WEBRTC_ICE_H__ */