mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
tests/webrtc: Validate peer connection stats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2127>
This commit is contained in:
parent
2661bf6d9a
commit
2a79f23e9d
1 changed files with 13 additions and 0 deletions
|
@ -1680,6 +1680,18 @@ validate_candidate_stats (const GstStructure * s, const GstStructure * stats)
|
|||
g_free (protocol);
|
||||
}
|
||||
|
||||
static void
|
||||
validate_peer_connection_stats (const GstStructure * s)
|
||||
{
|
||||
guint opened, closed;
|
||||
|
||||
fail_unless (gst_structure_get (s, "data-channels-opened", G_TYPE_UINT,
|
||||
&opened, NULL));
|
||||
fail_unless (gst_structure_get (s, "data-channels-closed", G_TYPE_UINT,
|
||||
&closed, NULL));
|
||||
fail_unless (opened >= closed);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
validate_stats_foreach (GQuark field_id, const GValue * value,
|
||||
const GstStructure * stats)
|
||||
|
@ -1708,6 +1720,7 @@ validate_stats_foreach (GQuark field_id, const GValue * value,
|
|||
validate_remote_outbound_rtp_stats (s, stats);
|
||||
} else if (type == GST_WEBRTC_STATS_CSRC) {
|
||||
} else if (type == GST_WEBRTC_STATS_PEER_CONNECTION) {
|
||||
validate_peer_connection_stats (s);
|
||||
} else if (type == GST_WEBRTC_STATS_DATA_CHANNEL) {
|
||||
} else if (type == GST_WEBRTC_STATS_STREAM) {
|
||||
} else if (type == GST_WEBRTC_STATS_TRANSPORT) {
|
||||
|
|
Loading…
Reference in a new issue