summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKnut Inge Hvidsten <knut.hvidsten@pexip.com>2021-03-26 11:57:42 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-08-25 08:36:06 +0000
commit0440cb12debc4db811489227258418d98837474d (patch)
tree6f2b9bfbabd33cc3a80e6ee6d31b3932a4b12c43
parent8194ab13f7f7bb00d3ba2f4eda9dc5e18fb6ff2a (diff)
downloadgstreamer-plugins-good-0440cb12debc4db811489227258418d98837474d.tar.gz
rtptwcc: add payloadtype to RTPTWCCPacket
The consumer of the stats can then separate between different media-types, and do individual stats for each of them. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
-rw-r--r--gst/rtpmanager/rtpstats.c1
-rw-r--r--gst/rtpmanager/rtptwcc.c3
-rw-r--r--gst/rtpmanager/rtptwcc.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpstats.c b/gst/rtpmanager/rtpstats.c
index 45fff3705..0f35046f1 100644
--- a/gst/rtpmanager/rtpstats.c
+++ b/gst/rtpmanager/rtpstats.c
@@ -484,6 +484,7 @@ rtp_twcc_stats_get_packets_structure (GArray * twcc_packets)
"seqnum", G_TYPE_UINT, pkt->seqnum,
"local-ts", G_TYPE_UINT64, pkt->local_ts,
"remote-ts", G_TYPE_UINT64, pkt->remote_ts,
+ "payload-type", G_TYPE_UCHAR, pkt->pt,
"size", G_TYPE_UINT, pkt->size,
"lost", G_TYPE_BOOLEAN, pkt->status == RTP_TWCC_PACKET_STATUS_NOT_RECV,
NULL);
diff --git a/gst/rtpmanager/rtptwcc.c b/gst/rtpmanager/rtptwcc.c
index 47cf8ae0a..bcb4fc02c 100644
--- a/gst/rtpmanager/rtptwcc.c
+++ b/gst/rtpmanager/rtptwcc.c
@@ -65,6 +65,7 @@ typedef struct
GstClockTime socket_ts;
GstClockTime remote_ts;
guint16 seqnum;
+ guint8 pt;
guint size;
gboolean lost;
} SentPacket;
@@ -842,6 +843,7 @@ sent_packet_init (SentPacket * packet, guint16 seqnum, RTPPacketInfo * pinfo)
packet->seqnum = seqnum;
packet->ts = pinfo->running_time;
packet->size = pinfo->payload_len;
+ packet->pt = pinfo->pt;
packet->remote_ts = GST_CLOCK_TIME_NONE;
packet->socket_ts = GST_CLOCK_TIME_NONE;
packet->lost = FALSE;
@@ -1095,6 +1097,7 @@ rtp_twcc_manager_parse_fci (RTPTWCCManager * twcc,
pkt->local_ts = found->ts;
}
pkt->size = found->size;
+ pkt->pt = found->pt;
GST_LOG ("matching pkt: #%u with local_ts: %" GST_TIME_FORMAT
" size: %u", pkt->seqnum, GST_TIME_ARGS (pkt->local_ts), pkt->size);
diff --git a/gst/rtpmanager/rtptwcc.h b/gst/rtpmanager/rtptwcc.h
index 79b56877a..a826e9a4c 100644
--- a/gst/rtpmanager/rtptwcc.h
+++ b/gst/rtpmanager/rtptwcc.h
@@ -49,6 +49,7 @@ struct _RTPTWCCPacket
RTPTWCCPacketStatus status;
guint16 seqnum;
guint size;
+ guint8 pt;
};
RTPTWCCManager * rtp_twcc_manager_new (guint mtu);