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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) { | 199 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) { |
200 fwrite(encoded_frame.data_, 1, encoded_frame.length_, file_); | 200 fwrite(encoded_frame.data_, 1, encoded_frame.length_, file_); |
201 } | 201 } |
202 | 202 |
203 private: | 203 private: |
204 FILE* file_; | 204 FILE* file_; |
205 }; | 205 }; |
206 | 206 |
207 void RtpReplay() { | 207 void RtpReplay() { |
| 208 std::stringstream window_title; |
| 209 window_title << "Playback Video (" << flags::InputFile() << ")"; |
208 std::unique_ptr<test::VideoRenderer> playback_video( | 210 std::unique_ptr<test::VideoRenderer> playback_video( |
209 test::VideoRenderer::Create("Playback Video", 640, 480)); | 211 test::VideoRenderer::Create(window_title.str().c_str(), 640, 480)); |
210 FileRenderPassthrough file_passthrough(flags::OutBase(), | 212 FileRenderPassthrough file_passthrough(flags::OutBase(), |
211 playback_video.get()); | 213 playback_video.get()); |
212 | 214 |
213 webrtc::RtcEventLogNullImpl event_log; | 215 webrtc::RtcEventLogNullImpl event_log; |
214 std::unique_ptr<Call> call(Call::Create(Call::Config(&event_log))); | 216 std::unique_ptr<Call> call(Call::Create(Call::Config(&event_log))); |
215 | 217 |
216 test::NullTransport transport; | 218 test::NullTransport transport; |
217 VideoReceiveStream::Config receive_config(&transport); | 219 VideoReceiveStream::Config receive_config(&transport); |
218 receive_config.rtp.remote_ssrc = flags::Ssrc(); | 220 receive_config.rtp.remote_ssrc = flags::Ssrc(); |
219 receive_config.rtp.local_ssrc = kReceiverLocalSsrc; | 221 receive_config.rtp.local_ssrc = kReceiverLocalSsrc; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } | 330 } |
329 } // namespace webrtc | 331 } // namespace webrtc |
330 | 332 |
331 int main(int argc, char* argv[]) { | 333 int main(int argc, char* argv[]) { |
332 ::testing::InitGoogleTest(&argc, argv); | 334 ::testing::InitGoogleTest(&argc, argv); |
333 google::ParseCommandLineFlags(&argc, &argv, true); | 335 google::ParseCommandLineFlags(&argc, &argv, true); |
334 | 336 |
335 webrtc::test::RunTest(webrtc::RtpReplay); | 337 webrtc::test::RunTest(webrtc::RtpReplay); |
336 return 0; | 338 return 0; |
337 } | 339 } |
OLD | NEW |