| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) { | 219 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) { |
| 220 fwrite(encoded_frame.data_, 1, encoded_frame.length_, file_); | 220 fwrite(encoded_frame.data_, 1, encoded_frame.length_, file_); |
| 221 } | 221 } |
| 222 | 222 |
| 223 private: | 223 private: |
| 224 FILE* file_; | 224 FILE* file_; |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 void RtpReplay() { | 227 void RtpReplay() { |
| 228 std::stringstream window_title; |
| 229 window_title << "Playback Video (" << flags::InputFile() << ")"; |
| 228 std::unique_ptr<test::VideoRenderer> playback_video( | 230 std::unique_ptr<test::VideoRenderer> playback_video( |
| 229 test::VideoRenderer::Create("Playback Video", 640, 480)); | 231 test::VideoRenderer::Create(window_title.str().c_str(), 640, 480)); |
| 230 FileRenderPassthrough file_passthrough(flags::OutBase(), | 232 FileRenderPassthrough file_passthrough(flags::OutBase(), |
| 231 playback_video.get()); | 233 playback_video.get()); |
| 232 | 234 |
| 233 webrtc::RtcEventLogNullImpl event_log; | 235 webrtc::RtcEventLogNullImpl event_log; |
| 234 std::unique_ptr<Call> call(Call::Create(Call::Config(&event_log))); | 236 std::unique_ptr<Call> call(Call::Create(Call::Config(&event_log))); |
| 235 | 237 |
| 236 test::NullTransport transport; | 238 test::NullTransport transport; |
| 237 VideoReceiveStream::Config receive_config(&transport); | 239 VideoReceiveStream::Config receive_config(&transport); |
| 238 receive_config.rtp.remote_ssrc = flags::Ssrc(); | 240 receive_config.rtp.remote_ssrc = flags::Ssrc(); |
| 239 receive_config.rtp.local_ssrc = kReceiverLocalSsrc; | 241 receive_config.rtp.local_ssrc = kReceiverLocalSsrc; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 350 } |
| 349 } // namespace webrtc | 351 } // namespace webrtc |
| 350 | 352 |
| 351 int main(int argc, char* argv[]) { | 353 int main(int argc, char* argv[]) { |
| 352 ::testing::InitGoogleTest(&argc, argv); | 354 ::testing::InitGoogleTest(&argc, argv); |
| 353 google::ParseCommandLineFlags(&argc, &argv, true); | 355 google::ParseCommandLineFlags(&argc, &argv, true); |
| 354 | 356 |
| 355 webrtc::test::RunTest(webrtc::RtpReplay); | 357 webrtc::test::RunTest(webrtc::RtpReplay); |
| 356 return 0; | 358 return 0; |
| 357 } | 359 } |
| OLD | NEW |