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

Side by Side Diff: webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc

Issue 1376673004: Add a PacketOptions struct to webrtc::Transport. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment added Created 5 years, 2 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
« no previous file with comments | « webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h ('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
(...skipping 10 matching lines...) Expand all
21 21
22 class ExtensionVerifyTransport : public webrtc::Transport { 22 class ExtensionVerifyTransport : public webrtc::Transport {
23 public: 23 public:
24 ExtensionVerifyTransport() 24 ExtensionVerifyTransport()
25 : parser_(webrtc::RtpHeaderParser::Create()), 25 : parser_(webrtc::RtpHeaderParser::Create()),
26 received_packets_(0), 26 received_packets_(0),
27 bad_packets_(0), 27 bad_packets_(0),
28 audio_level_id_(-1), 28 audio_level_id_(-1),
29 absolute_sender_time_id_(-1) {} 29 absolute_sender_time_id_(-1) {}
30 30
31 bool SendRtp(const uint8_t* data, size_t len) override { 31 bool SendRtp(const uint8_t* data,
32 size_t len,
33 const webrtc::PacketOptions& options) override {
32 webrtc::RTPHeader header; 34 webrtc::RTPHeader header;
33 if (parser_->Parse(reinterpret_cast<const uint8_t*>(data), len, &header)) { 35 if (parser_->Parse(reinterpret_cast<const uint8_t*>(data), len, &header)) {
34 bool ok = true; 36 bool ok = true;
35 if (audio_level_id_ >= 0 && 37 if (audio_level_id_ >= 0 &&
36 !header.extension.hasAudioLevel) { 38 !header.extension.hasAudioLevel) {
37 ok = false; 39 ok = false;
38 } 40 }
39 if (absolute_sender_time_id_ >= 0 && 41 if (absolute_sender_time_id_ >= 0 &&
40 !header.extension.hasAbsoluteSendTime) { 42 !header.extension.hasAbsoluteSendTime) {
41 ok = false; 43 ok = false;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAbsoluteSenderTimeStatus(channel_, true, 146 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAbsoluteSenderTimeStatus(channel_, true,
145 3)); 147 3));
146 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAudioLevelIndicationStatus(channel_, true, 148 EXPECT_EQ(0, voe_rtp_rtcp_->SetSendAudioLevelIndicationStatus(channel_, true,
147 9)); 149 9));
148 verifying_transport_.SetAbsoluteSenderTimeId(3); 150 verifying_transport_.SetAbsoluteSenderTimeId(3);
149 // Don't register audio level with header parser - unknown extensions should 151 // Don't register audio level with header parser - unknown extensions should
150 // be ignored when parsing. 152 // be ignored when parsing.
151 ResumePlaying(); 153 ResumePlaying();
152 EXPECT_TRUE(verifying_transport_.Wait()); 154 EXPECT_TRUE(verifying_transport_.Wait());
153 } 155 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698