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

Side by Side Diff: talk/media/webrtc/fakewebrtccall.cc

Issue 1333483002: Wire up PacketTime to ReceiveStreams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 | « talk/media/webrtc/fakewebrtccall.h ('k') | talk/media/webrtc/webrtcvideoengine2.cc » ('j') | 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 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } else { 307 } else {
308 delete *it; 308 delete *it;
309 video_receive_streams_.erase(it); 309 video_receive_streams_.erase(it);
310 } 310 }
311 } 311 }
312 312
313 webrtc::PacketReceiver* FakeCall::Receiver() { 313 webrtc::PacketReceiver* FakeCall::Receiver() {
314 return this; 314 return this;
315 } 315 }
316 316
317 FakeCall::DeliveryStatus FakeCall::DeliverPacket(webrtc::MediaType media_type, 317 FakeCall::DeliveryStatus FakeCall::DeliverPacket(
318 const uint8_t* packet, 318 webrtc::MediaType media_type,
319 size_t length) { 319 const uint8_t* packet,
320 size_t length,
321 const webrtc::PacketTime& packet_time) {
320 EXPECT_GE(length, 12u); 322 EXPECT_GE(length, 12u);
321 uint32_t ssrc; 323 uint32_t ssrc;
322 if (!GetRtpSsrc(packet, length, &ssrc)) 324 if (!GetRtpSsrc(packet, length, &ssrc))
323 return DELIVERY_PACKET_ERROR; 325 return DELIVERY_PACKET_ERROR;
324 326
325 if (media_type == webrtc::MediaType::ANY || 327 if (media_type == webrtc::MediaType::ANY ||
326 media_type == webrtc::MediaType::VIDEO) { 328 media_type == webrtc::MediaType::VIDEO) {
327 for (auto receiver : video_receive_streams_) { 329 for (auto receiver : video_receive_streams_) {
328 if (receiver->GetConfig().rtp.remote_ssrc == ssrc) 330 if (receiver->GetConfig().rtp.remote_ssrc == ssrc)
329 return DELIVERY_OK; 331 return DELIVERY_OK;
(...skipping 29 matching lines...) Expand all
359 361
360 void FakeCall::SetBitrateConfig( 362 void FakeCall::SetBitrateConfig(
361 const webrtc::Call::Config::BitrateConfig& bitrate_config) { 363 const webrtc::Call::Config::BitrateConfig& bitrate_config) {
362 config_.bitrate_config = bitrate_config; 364 config_.bitrate_config = bitrate_config;
363 } 365 }
364 366
365 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { 367 void FakeCall::SignalNetworkState(webrtc::NetworkState state) {
366 network_state_ = state; 368 network_state_ = state;
367 } 369 }
368 } // namespace cricket 370 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/webrtc/fakewebrtccall.h ('k') | talk/media/webrtc/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698