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

Side by Side Diff: webrtc/modules/video_coding/main/test/video_rtp_play.cc

Issue 1215603003: Remove VCM_*_PAYLOAD_TYPE constants. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 "webrtc/modules/video_coding/main/test/receiver_tests.h" 11 #include "webrtc/modules/video_coding/main/test/receiver_tests.h"
12 #include "webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h" 12 #include "webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h"
13 #include "webrtc/system_wrappers/interface/trace.h" 13 #include "webrtc/system_wrappers/interface/trace.h"
14 #include "webrtc/test/testsupport/fileutils.h" 14 #include "webrtc/test/testsupport/fileutils.h"
15 15
16 namespace { 16 namespace {
17 17
18 const bool kConfigProtectionEnabled = true; 18 const bool kConfigProtectionEnabled = true;
19 const webrtc::VCMVideoProtection kConfigProtectionMethod = 19 const webrtc::VCMVideoProtection kConfigProtectionMethod =
20 webrtc::kProtectionNack; 20 webrtc::kProtectionNack;
21 const float kConfigLossRate = 0.0f; 21 const float kConfigLossRate = 0.0f;
22 const bool kConfigReordering = false; 22 const bool kConfigReordering = false;
23 const int64_t kConfigRttMs = 0; 23 const int64_t kConfigRttMs = 0;
24 const uint32_t kConfigRenderDelayMs = 0; 24 const uint32_t kConfigRenderDelayMs = 0;
25 const uint32_t kConfigMinPlayoutDelayMs = 0; 25 const uint32_t kConfigMinPlayoutDelayMs = 0;
26 const int64_t kConfigMaxRuntimeMs = -1; 26 const int64_t kConfigMaxRuntimeMs = -1;
27 27 const uint8_t kDefaultUlpFecPayloadType = 97;
28 const uint8_t kDefaultRedPayloadType = 96;
29 const uint8_t kDefaultVp8PayloadType = 100;
28 } // namespace 30 } // namespace
29 31
30 int RtpPlay(const CmdArgs& args) { 32 int RtpPlay(const CmdArgs& args) {
31 std::string trace_file = webrtc::test::OutputPath() + "receiverTestTrace.txt"; 33 std::string trace_file = webrtc::test::OutputPath() + "receiverTestTrace.txt";
32 webrtc::Trace::CreateTrace(); 34 webrtc::Trace::CreateTrace();
33 webrtc::Trace::SetTraceFile(trace_file.c_str()); 35 webrtc::Trace::SetTraceFile(trace_file.c_str());
34 webrtc::Trace::set_level_filter(webrtc::kTraceAll); 36 webrtc::Trace::set_level_filter(webrtc::kTraceAll);
35 37
36 webrtc::rtpplayer::PayloadTypes payload_types; 38 webrtc::rtpplayer::PayloadTypes payload_types;
37 payload_types.push_back(webrtc::rtpplayer::PayloadCodecTuple( 39 payload_types.push_back(webrtc::rtpplayer::PayloadCodecTuple(
38 VCM_ULPFEC_PAYLOAD_TYPE, "ULPFEC", webrtc::kVideoCodecULPFEC)); 40 kDefaultUlpFecPayloadType, "ULPFEC", webrtc::kVideoCodecULPFEC));
39 payload_types.push_back(webrtc::rtpplayer::PayloadCodecTuple( 41 payload_types.push_back(webrtc::rtpplayer::PayloadCodecTuple(
40 VCM_RED_PAYLOAD_TYPE, "RED", webrtc::kVideoCodecRED)); 42 kDefaultRedPayloadType, "RED", webrtc::kVideoCodecRED));
41 payload_types.push_back(webrtc::rtpplayer::PayloadCodecTuple( 43 payload_types.push_back(webrtc::rtpplayer::PayloadCodecTuple(
42 VCM_VP8_PAYLOAD_TYPE, "VP8", webrtc::kVideoCodecVP8)); 44 kDefaultVp8PayloadType, "VP8", webrtc::kVideoCodecVP8));
43 45
44 std::string output_file = args.outputFile; 46 std::string output_file = args.outputFile;
45 if (output_file == "") { 47 if (output_file == "") {
46 output_file = webrtc::test::OutputPath() + "RtpPlay_decoded.yuv"; 48 output_file = webrtc::test::OutputPath() + "RtpPlay_decoded.yuv";
47 } 49 }
48 50
49 webrtc::SimulatedClock clock(0); 51 webrtc::SimulatedClock clock(0);
50 webrtc::rtpplayer::VcmPayloadSinkFactory factory(output_file, &clock, 52 webrtc::rtpplayer::VcmPayloadSinkFactory factory(output_file, &clock,
51 kConfigProtectionEnabled, kConfigProtectionMethod, kConfigRttMs, 53 kConfigProtectionEnabled, kConfigProtectionMethod, kConfigRttMs,
52 kConfigRenderDelayMs, kConfigMinPlayoutDelayMs); 54 kConfigRenderDelayMs, kConfigMinPlayoutDelayMs);
(...skipping 25 matching lines...) Expand all
78 printf("Failed\n"); 80 printf("Failed\n");
79 return -1; 81 return -1;
80 case 0: 82 case 0:
81 printf("Timeout\n"); 83 printf("Timeout\n");
82 return -1; 84 return -1;
83 } 85 }
84 86
85 webrtc::Trace::ReturnTrace(); 87 webrtc::Trace::ReturnTrace();
86 return 0; 88 return 0;
87 } 89 }
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/source/codec_database.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698