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

Side by Side Diff: webrtc/video/replay.cc

Issue 2595533002: Add back video_replay. Disappeared in the gn conversion. (Closed)
Patch Set: . Created 4 years 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 | « webrtc/video/BUILD.gn ('k') | no next file » | 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 * 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
11 #include <stdio.h> 11 #include <stdio.h>
12 12
13 #include <map> 13 #include <map>
14 #include <memory> 14 #include <memory>
15 #include <sstream> 15 #include <sstream>
16 16
17 #include "gflags/gflags.h" 17 #include "gflags/gflags.h"
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/call/call.h" 19 #include "webrtc/call/call.h"
20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 22 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
22 #include "webrtc/system_wrappers/include/clock.h" 23 #include "webrtc/system_wrappers/include/clock.h"
23 #include "webrtc/system_wrappers/include/sleep.h" 24 #include "webrtc/system_wrappers/include/sleep.h"
24 #include "webrtc/test/encoder_settings.h" 25 #include "webrtc/test/encoder_settings.h"
25 #include "webrtc/test/fake_decoder.h" 26 #include "webrtc/test/fake_decoder.h"
26 #include "webrtc/test/gtest.h" 27 #include "webrtc/test/gtest.h"
27 #include "webrtc/test/null_transport.h" 28 #include "webrtc/test/null_transport.h"
28 #include "webrtc/test/rtp_file_reader.h" 29 #include "webrtc/test/rtp_file_reader.h"
29 #include "webrtc/test/run_loop.h" 30 #include "webrtc/test/run_loop.h"
30 #include "webrtc/test/run_test.h" 31 #include "webrtc/test/run_test.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 private: 205 private:
205 FILE* file_; 206 FILE* file_;
206 }; 207 };
207 208
208 void RtpReplay() { 209 void RtpReplay() {
209 std::unique_ptr<test::VideoRenderer> playback_video( 210 std::unique_ptr<test::VideoRenderer> playback_video(
210 test::VideoRenderer::Create("Playback Video", 640, 480)); 211 test::VideoRenderer::Create("Playback Video", 640, 480));
211 FileRenderPassthrough file_passthrough(flags::OutBase(), 212 FileRenderPassthrough file_passthrough(flags::OutBase(),
212 playback_video.get()); 213 playback_video.get());
213 214
214 std::unique_ptr<Call> call(Call::Create(Call::Config())); 215 webrtc::RtcEventLogNullImpl 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;
220 receive_config.rtp.ulpfec.ulpfec_payload_type = flags::FecPayloadType(); 222 receive_config.rtp.ulpfec.ulpfec_payload_type = flags::FecPayloadType();
221 receive_config.rtp.ulpfec.red_payload_type = flags::RedPayloadType(); 223 receive_config.rtp.ulpfec.red_payload_type = flags::RedPayloadType();
222 receive_config.rtp.nack.rtp_history_ms = 1000; 224 receive_config.rtp.nack.rtp_history_ms = 1000;
223 if (flags::TransmissionOffsetId() != -1) { 225 if (flags::TransmissionOffsetId() != -1) {
224 receive_config.rtp.extensions.push_back(RtpExtension( 226 receive_config.rtp.extensions.push_back(RtpExtension(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 320 }
319 } // namespace webrtc 321 } // namespace webrtc
320 322
321 int main(int argc, char* argv[]) { 323 int main(int argc, char* argv[]) {
322 ::testing::InitGoogleTest(&argc, argv); 324 ::testing::InitGoogleTest(&argc, argv);
323 google::ParseCommandLineFlags(&argc, &argv, true); 325 google::ParseCommandLineFlags(&argc, &argv, true);
324 326
325 webrtc::test::RunTest(webrtc::RtpReplay); 327 webrtc::test::RunTest(webrtc::RtpReplay);
326 return 0; 328 return 0;
327 } 329 }
OLDNEW
« no previous file with comments | « webrtc/video/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698