Mercurial > libavformat.hg
comparison rtp_internal.h @ 1445:db97355877b1 libavformat
add valid statistics for the RTCP receiver report.
Basically taken verbatim from RFC 1889.
Patch by Ryan Martell % rdm4 A martellventures P com %
Original thread:
Date: Oct 31, 2006 12:43 AM
Subject: [Ffmpeg-devel] [PATCH] RTCP valid receiver statistics....
author | gpoirier |
---|---|
date | Fri, 03 Nov 2006 07:55:57 +0000 |
parents | 2d8a17631520 |
children | a6d6b2b19341 |
comparison
equal
deleted
inserted
replaced
1444:74cb68ad9dce | 1445:db97355877b1 |
---|---|
20 */ | 20 */ |
21 | 21 |
22 // this is a bit of a misnomer, because rtp & rtsp internal structures and prototypes are in here. | 22 // this is a bit of a misnomer, because rtp & rtsp internal structures and prototypes are in here. |
23 #ifndef RTP_INTERNAL_H | 23 #ifndef RTP_INTERNAL_H |
24 #define RTP_INTERNAL_H | 24 #define RTP_INTERNAL_H |
25 | |
26 // these statistics are used for rtcp receiver reports... | |
27 typedef struct { | |
28 uint16_t max_seq; ///< highest sequence number seen | |
29 uint32_t cycles; ///< shifted count of sequence number cycles | |
30 uint32_t base_seq; ///< base sequence number | |
31 uint32_t bad_seq; ///< last bad sequence number + 1 | |
32 int probation; ///< sequence packets till source is valid | |
33 int received; ///< packets received | |
34 int expected_prior; ///< packets expected in last interval | |
35 int received_prior; ///< packets received in last interval | |
36 uint32_t transit; ///< relative transit time for previous packet | |
37 uint32_t jitter; ///< estimated jitter. | |
38 } RTPStatistics; | |
39 | |
25 | 40 |
26 typedef int (*DynamicPayloadPacketHandlerProc) (struct RTPDemuxContext * s, | 41 typedef int (*DynamicPayloadPacketHandlerProc) (struct RTPDemuxContext * s, |
27 AVPacket * pkt, | 42 AVPacket * pkt, |
28 uint32_t *timestamp, | 43 uint32_t *timestamp, |
29 const uint8_t * buf, | 44 const uint8_t * buf, |
62 int read_buf_size; | 77 int read_buf_size; |
63 /* used to send back RTCP RR */ | 78 /* used to send back RTCP RR */ |
64 URLContext *rtp_ctx; | 79 URLContext *rtp_ctx; |
65 char hostname[256]; | 80 char hostname[256]; |
66 | 81 |
82 RTPStatistics statistics; ///< Statistics for this stream (used by RTCP receiver reports) | |
83 | |
67 /* rtcp sender statistics receive */ | 84 /* rtcp sender statistics receive */ |
68 int64_t last_rtcp_ntp_time; // TODO: move into statistics | 85 int64_t last_rtcp_ntp_time; // TODO: move into statistics |
69 int64_t first_rtcp_ntp_time; // TODO: move into statistics | 86 int64_t first_rtcp_ntp_time; // TODO: move into statistics |
70 uint32_t last_rtcp_timestamp; // TODO: move into statistics | 87 uint32_t last_rtcp_timestamp; // TODO: move into statistics |
71 | 88 |
85 DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied from the dynamic protocol handler structure | 102 DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied from the dynamic protocol handler structure |
86 void *dynamic_protocol_context; ///< This is a copy from the values setup from the sdp parsing, in rtsp.c don't free me. | 103 void *dynamic_protocol_context; ///< This is a copy from the values setup from the sdp parsing, in rtsp.c don't free me. |
87 }; | 104 }; |
88 | 105 |
89 extern RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler; | 106 extern RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler; |
107 | |
108 int rtsp_next_attr_and_value(const char **p, char *attr, int attr_size, char *value, int value_size); ///< from rtsp.c, but used by rtp dynamic protocol handlers. | |
90 #endif /* RTP_INTERNAL_H */ | 109 #endif /* RTP_INTERNAL_H */ |
91 | 110 |