Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: patched-ffmpeg-mt/libavformat/rtpdec.h

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * RTP demuxer definitions 2 * RTP demuxer definitions
3 * Copyright (c) 2002 Fabrice Bellard 3 * Copyright (c) 2002 Fabrice Bellard
4 * Copyright (c) 2006 Ryan Martell <rdm4@martellventures.com> 4 * Copyright (c) 2006 Ryan Martell <rdm4@martellventures.com>
5 * 5 *
6 * This file is part of FFmpeg. 6 * This file is part of FFmpeg.
7 * 7 *
8 * FFmpeg is free software; you can redistribute it and/or 8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const uint8_t *buf, int len); 67 const uint8_t *buf, int len);
68 void rtp_parse_close(RTPDemuxContext *s); 68 void rtp_parse_close(RTPDemuxContext *s);
69 69
70 int rtp_get_local_port(URLContext *h); 70 int rtp_get_local_port(URLContext *h);
71 int rtp_set_remote_url(URLContext *h, const char *uri); 71 int rtp_set_remote_url(URLContext *h, const char *uri);
72 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) 72 #if (LIBAVFORMAT_VERSION_MAJOR <= 52)
73 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd); 73 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd);
74 #endif 74 #endif
75 75
76 /** 76 /**
77 * Send a dummy packet on both port pairs to set up the connection
78 * state in potential NAT routers, so that we're able to receive
79 * packets.
80 *
81 * Note, this only works if the NAT router doesn't remap ports. This
82 * isn't a standardized procedure, but it works in many cases in practice.
83 *
84 * The same routine is used with RDT too, even if RDT doesn't use normal
85 * RTP packets otherwise.
86 */
87 void rtp_send_punch_packets(URLContext* rtp_handle);
88
89 /**
77 * some rtp servers assume client is dead if they don't hear from them... 90 * some rtp servers assume client is dead if they don't hear from them...
78 * so we send a Receiver Report to the provided ByteIO context 91 * so we send a Receiver Report to the provided ByteIO context
79 * (we don't have access to the rtcp handle from here) 92 * (we don't have access to the rtcp handle from here)
80 */ 93 */
81 int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count); 94 int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count);
82 95
83 // these statistics are used for rtcp receiver reports... 96 // these statistics are used for rtcp receiver reports...
84 typedef struct { 97 typedef struct {
85 uint16_t max_seq; ///< highest sequence number seen 98 uint16_t max_seq; ///< highest sequence number seen
86 uint32_t cycles; ///< shifted count of sequence number cycles 99 uint32_t cycles; ///< shifted count of sequence number cycles
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 int read_buf_index; 162 int read_buf_index;
150 int read_buf_size; 163 int read_buf_size;
151 /* used to send back RTCP RR */ 164 /* used to send back RTCP RR */
152 URLContext *rtp_ctx; 165 URLContext *rtp_ctx;
153 char hostname[256]; 166 char hostname[256];
154 167
155 RTPStatistics statistics; ///< Statistics for this stream (used by RTCP rece iver reports) 168 RTPStatistics statistics; ///< Statistics for this stream (used by RTCP rece iver reports)
156 169
157 /* rtcp sender statistics receive */ 170 /* rtcp sender statistics receive */
158 int64_t last_rtcp_ntp_time; // TODO: move into statistics 171 int64_t last_rtcp_ntp_time; // TODO: move into statistics
159 int64_t first_rtcp_ntp_time; // TODO: move into statistics
160 uint32_t last_rtcp_timestamp; // TODO: move into statistics 172 uint32_t last_rtcp_timestamp; // TODO: move into statistics
161 173
162 /* rtcp sender statistics */ 174 /* rtcp sender statistics */
163 unsigned int packet_count; // TODO: move into statistics (outgoing) 175 unsigned int packet_count; // TODO: move into statistics (outgoing)
164 unsigned int octet_count; // TODO: move into statistics (outgoing) 176 unsigned int octet_count; // TODO: move into statistics (outgoing)
165 unsigned int last_octet_count; // TODO: move into statistics (outgoing) 177 unsigned int last_octet_count; // TODO: move into statistics (outgoing)
166 int first_packet; 178 int first_packet;
167 /* buffer for output */ 179 /* buffer for output */
168 uint8_t buf[RTP_MAX_PACKET_LENGTH]; 180 uint8_t buf[RTP_MAX_PACKET_LENGTH];
169 uint8_t *buf_ptr; 181 uint8_t *buf_ptr;
170 182
171 /* special infos for au headers parsing */ 183 /* special infos for au headers parsing */
172 RTPPayloadData *rtp_payload_data; // TODO: Move into dynamic payload handler s 184 RTPPayloadData *rtp_payload_data; // TODO: Move into dynamic payload handler s
173 185
174 /* dynamic payload stuff */ 186 /* dynamic payload stuff */
175 DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied f rom the dynamic protocol handler structure 187 DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied f rom the dynamic protocol handler structure
176 PayloadContext *dynamic_protocol_context; ///< This is a copy from th e values setup from the sdp parsing, in rtsp.c don't free me. 188 PayloadContext *dynamic_protocol_context; ///< This is a copy from th e values setup from the sdp parsing, in rtsp.c don't free me.
177 int max_frames_per_packet; 189 int max_frames_per_packet;
178 }; 190 };
179 191
180 extern RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler; 192 extern RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler;
181 void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler); 193 void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler);
182 194
183 int rtsp_next_attr_and_value(const char **p, char *attr, int attr_size, char *va lue, int value_size); ///< from rtsp.c, but used by rtp dynamic protocol handler s. 195 int ff_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 hand lers.
184 196
185 void av_register_rtp_dynamic_payload_handlers(void); 197 void av_register_rtp_dynamic_payload_handlers(void);
186 198
187 #endif /* AVFORMAT_RTPDEC_H */ 199 #endif /* AVFORMAT_RTPDEC_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698