OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 FILE* file_; | 189 FILE* file_; |
190 size_t count_; | 190 size_t count_; |
191 int last_width_; | 191 int last_width_; |
192 int last_height_; | 192 int last_height_; |
193 }; | 193 }; |
194 | 194 |
195 class DecoderBitstreamFileWriter : public EncodedFrameObserver { | 195 class DecoderBitstreamFileWriter : public EncodedFrameObserver { |
196 public: | 196 public: |
197 explicit DecoderBitstreamFileWriter(const char* filename) | 197 explicit DecoderBitstreamFileWriter(const char* filename) |
198 : file_(fopen(filename, "wb")) { | 198 : file_(fopen(filename, "wb")) { |
199 DCHECK(file_ != nullptr); | 199 RTC_DCHECK(file_ != nullptr); |
200 } | 200 } |
201 ~DecoderBitstreamFileWriter() { fclose(file_); } | 201 ~DecoderBitstreamFileWriter() { fclose(file_); } |
202 | 202 |
203 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) { | 203 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) { |
204 fwrite(encoded_frame.data_, 1, encoded_frame.length_, file_); | 204 fwrite(encoded_frame.data_, 1, encoded_frame.length_, file_); |
205 } | 205 } |
206 | 206 |
207 private: | 207 private: |
208 FILE* file_; | 208 FILE* file_; |
209 }; | 209 }; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 321 } |
322 } // namespace webrtc | 322 } // namespace webrtc |
323 | 323 |
324 int main(int argc, char* argv[]) { | 324 int main(int argc, char* argv[]) { |
325 ::testing::InitGoogleTest(&argc, argv); | 325 ::testing::InitGoogleTest(&argc, argv); |
326 google::ParseCommandLineFlags(&argc, &argv, true); | 326 google::ParseCommandLineFlags(&argc, &argv, true); |
327 | 327 |
328 webrtc::test::RunTest(webrtc::RtpReplay); | 328 webrtc::test::RunTest(webrtc::RtpReplay); |
329 return 0; | 329 return 0; |
330 } | 330 } |
OLD | NEW |