From e66d448c7564424e958332212083beecbc6e1868 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 11 Dec 2012 19:35:03 +0200 Subject: rtpdec: Remove unused context variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These stem from back when both the rtp muxer and rtp depacketizing shared the same struct. Signed-off-by: Martin Storsjö --- libavformat/rtpdec.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'libavformat/rtpdec.h') diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index da3680d6ab..f643fa20a9 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -176,15 +176,12 @@ struct RTPDemuxContext { unsigned int packet_count; // TODO: move into statistics (outgoing) unsigned int octet_count; // TODO: move into statistics (outgoing) unsigned int last_octet_count; // TODO: move into statistics (outgoing) - int first_packet; /* buffer for output */ uint8_t buf[RTP_MAX_PACKET_LENGTH]; - uint8_t *buf_ptr; /* dynamic payload stuff */ DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied from the dynamic protocol handler structure PayloadContext *dynamic_protocol_context; ///< This is a copy from the values setup from the sdp parsing, in rtsp.c don't free me. - int max_frames_per_packet; }; void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler); -- cgit v1.2.3 From d6ec745246fc39eb885fde1b296026467becbd33 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 11 Dec 2012 19:57:18 +0200 Subject: rtpdec: Improve some comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous comment about the buffer was wildly inaccurate and misleading. Signed-off-by: Martin Storsjö --- libavformat/rtpdec.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavformat/rtpdec.h') diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index f643fa20a9..4a920a90b5 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -94,7 +94,8 @@ typedef struct RTPStatistics { * @param s stream context * @param st stream that this packet belongs to * @param pkt packet in which to write the parsed data - * @param timestamp pointer in which to write the timestamp of this RTP packet + * @param timestamp pointer to the RTP timestamp of the input data, can be + * updated by the function if returning older, buffered data * @param buf pointer to raw RTP packet data * @param len length of buf * @param flags flags from the RTP packet header (RTP_FLAG_*) @@ -176,7 +177,7 @@ struct RTPDemuxContext { unsigned int packet_count; // TODO: move into statistics (outgoing) unsigned int octet_count; // TODO: move into statistics (outgoing) unsigned int last_octet_count; // TODO: move into statistics (outgoing) - /* buffer for output */ + /* buffer for partially parsed packets */ uint8_t buf[RTP_MAX_PACKET_LENGTH]; /* dynamic payload stuff */ -- cgit v1.2.3 From 7941159df6aad2d219e2a7184489be7a735dd944 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 11 Dec 2012 18:50:10 +0200 Subject: rtpdec/enc: Remove outdated/useless/misleading comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec.h | 22 ++++++++++------------ libavformat/rtpenc.h | 10 +++++----- 2 files changed, 15 insertions(+), 17 deletions(-) (limited to 'libavformat/rtpdec.h') diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index 4a920a90b5..415b77d0d8 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -31,7 +31,7 @@ typedef struct PayloadContext PayloadContext; typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler; #define RTP_MIN_PACKET_LENGTH 12 -#define RTP_MAX_PACKET_LENGTH 1500 /* XXX: suppress this define */ +#define RTP_MAX_PACKET_LENGTH 1500 #define RTP_REORDER_QUEUE_DEFAULT_SIZE 10 @@ -109,8 +109,7 @@ typedef int (*DynamicPayloadPacketHandlerProc) (AVFormatContext *ctx, int len, int flags); struct RTPDynamicProtocolHandler_s { - // fields from AVRtpDynamicPayloadType_s - const char enc_name[50]; /* XXX: still why 50 ? ;-) */ + const char enc_name[50]; enum AVMediaType codec_type; enum AVCodecID codec_id; int static_payload_id; /* 0 means no payload id is set. 0 is a valid @@ -138,7 +137,6 @@ typedef struct RTPPacket { struct RTPPacket *next; } RTPPacket; -// moved out of rtp.c, because the h264 decoder needs to know about this structure.. struct RTPDemuxContext { AVFormatContext *ic; AVStream *st; @@ -168,21 +166,21 @@ struct RTPDemuxContext { /*@}*/ /* rtcp sender statistics receive */ - int64_t last_rtcp_ntp_time; // TODO: move into statistics - int64_t first_rtcp_ntp_time; // TODO: move into statistics - uint32_t last_rtcp_timestamp; // TODO: move into statistics + int64_t last_rtcp_ntp_time; + int64_t first_rtcp_ntp_time; + uint32_t last_rtcp_timestamp; int64_t rtcp_ts_offset; /* rtcp sender statistics */ - unsigned int packet_count; // TODO: move into statistics (outgoing) - unsigned int octet_count; // TODO: move into statistics (outgoing) - unsigned int last_octet_count; // TODO: move into statistics (outgoing) + unsigned int packet_count; + unsigned int octet_count; + unsigned int last_octet_count; /* buffer for partially parsed packets */ uint8_t buf[RTP_MAX_PACKET_LENGTH]; /* dynamic payload stuff */ - DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied from the dynamic protocol handler structure - PayloadContext *dynamic_protocol_context; ///< This is a copy from the values setup from the sdp parsing, in rtsp.c don't free me. + DynamicPayloadPacketHandlerProc parse_packet; + PayloadContext *dynamic_protocol_context; }; void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler); diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h index 5351b4590c..369b413e9d 100644 --- a/libavformat/rtpenc.h +++ b/libavformat/rtpenc.h @@ -38,13 +38,13 @@ struct RTPMuxContext { int num_frames; /* rtcp sender statistics receive */ - int64_t last_rtcp_ntp_time; // TODO: move into statistics - int64_t first_rtcp_ntp_time; // TODO: move into statistics + int64_t last_rtcp_ntp_time; + int64_t first_rtcp_ntp_time; /* rtcp sender statistics */ - unsigned int packet_count; // TODO: move into statistics (outgoing) - unsigned int octet_count; // TODO: move into statistics (outgoing) - unsigned int last_octet_count; // TODO: move into statistics (outgoing) + unsigned int packet_count; + unsigned int octet_count; + unsigned int last_octet_count; int first_packet; /* buffer for output */ uint8_t *buf; -- cgit v1.2.3