"construct": false,
"construct-only": false,
"controllable": false,
- "default": "application/x-rtp-source-stats, ssrc=(uint)0, internal=(boolean)false, validated=(boolean)false, received-bye=(boolean)false, is-csrc=(boolean)false, is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1, octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0, packets-received=(guint64)0, bytes-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0, jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0, recv-packet-rate=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0, sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0, sent-rb=(boolean)false, sent-rb-fractionlost=(uint)0, sent-rb-packetslost=(int)0, sent-rb-exthighestseq=(uint)0, sent-rb-jitter=(uint)0, sent-rb-lsr=(uint)0, sent-rb-dlsr=(uint)0, have-rb=(boolean)false, rb-fractionlost=(uint)0, rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0, rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;",
+ "default": "application/x-rtp-source-stats, ssrc=(uint)0, internal=(boolean)false, validated=(boolean)false, received-bye=(boolean)false, is-csrc=(boolean)false, is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1, octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0, packets-received=(guint64)0, bytes-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0, jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0, recv-packet-rate=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0, sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0, sent-rb=(boolean)false, sent-rb-fractionlost=(uint)0, sent-rb-packetslost=(int)0, sent-rb-exthighestseq=(uint)0, sent-rb-jitter=(uint)0, sent-rb-lsr=(uint)0, sent-rb-dlsr=(uint)0, have-rb=(boolean)false, rb-ssrc=(uint)0, rb-fractionlost=(uint)0, rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0, rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;",
"mutable": "null",
"readable": true,
"type": "GstStructure",
* the sender of the RTCP message. We could also compare our stats against
* the other sender to see if we are better or worse. */
/* FIXME, need to keep track who the RB block is from */
- rtp_source_process_rb (source, pinfo->ntpnstime, fractionlost,
+ rtp_source_process_rb (source, ssrc, pinfo->ntpnstime, fractionlost,
packetslost, exthighestseq, jitter, lsr, dlsr);
}
}
{
guint32 round_trip = 0;
- rtp_source_get_last_rb (src, NULL, NULL, NULL, NULL, NULL, NULL, &round_trip);
+ rtp_source_get_last_rb (src, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ &round_trip);
if (src->last_keyframe_request != GST_CLOCK_TIME_NONE && round_trip) {
GstClockTime round_trip_in_ns = gst_util_uint64_scale (round_trip,
/* store last generated RR packet */
source->last_rr.is_valid = TRUE;
+ source->last_rr.ssrc = data->source->ssrc;
source->last_rr.fractionlost = fractionlost;
source->last_rr.packetslost = packetslost;
source->last_rr.exthighestseq = exthighestseq;
gboolean internal = src->internal;
gchar *address_str;
gboolean have_rb;
+ guint32 ssrc = 0;
guint8 fractionlost = 0;
gint32 packetslost = 0;
guint32 exthighestseq = 0;
(guint) src->last_rr.dlsr, NULL);
/* get the last RB */
- have_rb = rtp_source_get_last_rb (src, &fractionlost, &packetslost,
- &exthighestseq, &jitter, &lsr, &dlsr, &round_trip);
+ have_rb = rtp_source_get_last_rb (src, &ssrc, &fractionlost,
+ &packetslost, &exthighestseq, &jitter, &lsr, &dlsr, &round_trip);
gst_structure_set (s,
"have-rb", G_TYPE_BOOLEAN, have_rb,
+ "rb-ssrc", G_TYPE_UINT, ssrc,
"rb-fractionlost", G_TYPE_UINT, (guint) fractionlost,
"rb-packetslost", G_TYPE_INT, (gint) packetslost,
"rb-exthighestseq", G_TYPE_UINT, (guint) exthighestseq,
/**
* rtp_source_process_rb:
* @src: an #RTPSource
+ * @ssrc: SSRC of the local source for this this RB was sent
* @ntpnstime: the current time in nanoseconds since 1970
* @fractionlost: fraction lost since last SR/RR
* @packetslost: the cumulative number of packets lost
* Update the report block in @src.
*/
void
-rtp_source_process_rb (RTPSource * src, guint64 ntpnstime,
+rtp_source_process_rb (RTPSource * src, guint32 ssrc, guint64 ntpnstime,
guint8 fractionlost, gint32 packetslost, guint32 exthighestseq,
guint32 jitter, guint32 lsr, guint32 dlsr)
{
/* update current */
curr->is_valid = TRUE;
+ curr->ssrc = ssrc;
curr->fractionlost = fractionlost;
curr->packetslost = packetslost;
curr->exthighestseq = exthighestseq;
/**
* rtp_source_get_last_rb:
* @src: an #RTPSource
+ * @ssrc: SSRC of the local source for this this RB was sent
* @fractionlost: fraction lost since last SR/RR
* @packetslost: the cumulative number of packets lost
* @exthighestseq: the extended last sequence number received
* Returns: %TRUE if there was a valid SB report.
*/
gboolean
-rtp_source_get_last_rb (RTPSource * src, guint8 * fractionlost,
- gint32 * packetslost, guint32 * exthighestseq, guint32 * jitter,
- guint32 * lsr, guint32 * dlsr, guint32 * round_trip)
+rtp_source_get_last_rb (RTPSource * src, guint32 * ssrc,
+ guint8 * fractionlost, gint32 * packetslost, guint32 * exthighestseq,
+ guint32 * jitter, guint32 * lsr, guint32 * dlsr, guint32 * round_trip)
{
RTPReceiverReport *curr;
if (!curr->is_valid)
return FALSE;
+ if (ssrc)
+ *ssrc = curr->ssrc;
if (fractionlost)
*fractionlost = curr->fractionlost;
if (packetslost)
/* RTCP messages */
void rtp_source_process_sr (RTPSource *src, GstClockTime time, guint64 ntptime,
guint32 rtptime, guint32 packet_count, guint32 octet_count);
-void rtp_source_process_rb (RTPSource *src, guint64 ntpnstime, guint8 fractionlost,
+void rtp_source_process_rb (RTPSource *src, guint32 ssrc, guint64 ntpnstime, guint8 fractionlost,
gint32 packetslost, guint32 exthighestseq, guint32 jitter,
guint32 lsr, guint32 dlsr);
gboolean rtp_source_get_last_sr (RTPSource *src, GstClockTime *time, guint64 *ntptime,
guint32 *rtptime, guint32 *packet_count,
guint32 *octet_count);
-gboolean rtp_source_get_last_rb (RTPSource *src, guint8 *fractionlost, gint32 *packetslost,
+gboolean rtp_source_get_last_rb (RTPSource *src, guint32 * ssrc, guint8 *fractionlost, gint32 *packetslost,
guint32 *exthighestseq, guint32 *jitter,
guint32 *lsr, guint32 *dlsr, guint32 *round_trip);
*/
typedef struct {
gboolean is_valid;
- guint32 ssrc; /* who the report is from */
+ guint32 ssrc; /* which source is the report about */
guint8 fractionlost;
guint32 packetslost;
guint32 exthighestseq;