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

Side by Side Diff: talk/media/base/rtpdump.h

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 years, 3 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
« no previous file with comments | « talk/media/base/cpuid.h ('k') | talk/media/base/streamparams.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 private: 126 private:
127 // Check if its matches "#!rtpplay1.0 address/port\n". 127 // Check if its matches "#!rtpplay1.0 address/port\n".
128 bool CheckFirstLine(const std::string& first_line); 128 bool CheckFirstLine(const std::string& first_line);
129 129
130 rtc::StreamInterface* stream_; 130 rtc::StreamInterface* stream_;
131 bool file_header_read_; 131 bool file_header_read_;
132 size_t first_line_and_file_header_len_; 132 size_t first_line_and_file_header_len_;
133 uint32 start_time_ms_; 133 uint32 start_time_ms_;
134 uint32 ssrc_override_; 134 uint32 ssrc_override_;
135 135
136 DISALLOW_COPY_AND_ASSIGN(RtpDumpReader); 136 RTC_DISALLOW_COPY_AND_ASSIGN(RtpDumpReader);
137 }; 137 };
138 138
139 // RtpDumpLoopReader reads RTP dump packets from the input stream and rewinds 139 // RtpDumpLoopReader reads RTP dump packets from the input stream and rewinds
140 // the stream when it ends. RtpDumpLoopReader maintains the elapsed time, the 140 // the stream when it ends. RtpDumpLoopReader maintains the elapsed time, the
141 // RTP sequence number and the RTP timestamp properly. RtpDumpLoopReader can 141 // RTP sequence number and the RTP timestamp properly. RtpDumpLoopReader can
142 // handle both RTP dump and RTCP dump. We assume that the dump does not mix 142 // handle both RTP dump and RTCP dump. We assume that the dump does not mix
143 // RTP packets and RTCP packets. 143 // RTP packets and RTCP packets.
144 class RtpDumpLoopReader : public RtpDumpReader { 144 class RtpDumpLoopReader : public RtpDumpReader {
145 public: 145 public:
146 explicit RtpDumpLoopReader(rtc::StreamInterface* stream); 146 explicit RtpDumpLoopReader(rtc::StreamInterface* stream);
(...skipping 27 matching lines...) Expand all
174 uint32 frame_count_; 174 uint32 frame_count_;
175 // The elapsed time, RTP sequence number, and RTP timestamp of the first and 175 // The elapsed time, RTP sequence number, and RTP timestamp of the first and
176 // the previous dump packets in the input stream. 176 // the previous dump packets in the input stream.
177 uint32 first_elapsed_time_; 177 uint32 first_elapsed_time_;
178 int first_rtp_seq_num_; 178 int first_rtp_seq_num_;
179 uint32 first_rtp_timestamp_; 179 uint32 first_rtp_timestamp_;
180 uint32 prev_elapsed_time_; 180 uint32 prev_elapsed_time_;
181 int prev_rtp_seq_num_; 181 int prev_rtp_seq_num_;
182 uint32 prev_rtp_timestamp_; 182 uint32 prev_rtp_timestamp_;
183 183
184 DISALLOW_COPY_AND_ASSIGN(RtpDumpLoopReader); 184 RTC_DISALLOW_COPY_AND_ASSIGN(RtpDumpLoopReader);
185 }; 185 };
186 186
187 class RtpDumpWriter { 187 class RtpDumpWriter {
188 public: 188 public:
189 explicit RtpDumpWriter(rtc::StreamInterface* stream); 189 explicit RtpDumpWriter(rtc::StreamInterface* stream);
190 190
191 // Filter to control what packets we actually record. 191 // Filter to control what packets we actually record.
192 void set_packet_filter(int filter); 192 void set_packet_filter(int filter);
193 // Write a RTP or RTCP packet. The parameters data points to the packet and 193 // Write a RTP or RTCP packet. The parameters data points to the packet and
194 // data_len is its length. 194 // data_len is its length.
(...skipping 23 matching lines...) Expand all
218 uint32 elapsed, bool rtcp); 218 uint32 elapsed, bool rtcp);
219 size_t FilterPacket(const void* data, size_t data_len, bool rtcp); 219 size_t FilterPacket(const void* data, size_t data_len, bool rtcp);
220 rtc::StreamResult WriteToStream(const void* data, size_t data_len); 220 rtc::StreamResult WriteToStream(const void* data, size_t data_len);
221 221
222 rtc::StreamInterface* stream_; 222 rtc::StreamInterface* stream_;
223 int packet_filter_; 223 int packet_filter_;
224 bool file_header_written_; 224 bool file_header_written_;
225 uint32 start_time_ms_; // Time when the record starts. 225 uint32 start_time_ms_; // Time when the record starts.
226 // If writing to the stream takes longer than this many ms, log a warning. 226 // If writing to the stream takes longer than this many ms, log a warning.
227 uint32 warn_slow_writes_delay_; 227 uint32 warn_slow_writes_delay_;
228 DISALLOW_COPY_AND_ASSIGN(RtpDumpWriter); 228 RTC_DISALLOW_COPY_AND_ASSIGN(RtpDumpWriter);
229 }; 229 };
230 230
231 } // namespace cricket 231 } // namespace cricket
232 232
233 #endif // TALK_MEDIA_BASE_RTPDUMP_H_ 233 #endif // TALK_MEDIA_BASE_RTPDUMP_H_
OLDNEW
« no previous file with comments | « talk/media/base/cpuid.h ('k') | talk/media/base/streamparams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698