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

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

Issue 1390753002: Implement AudioReceiveStream::GetStats(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase 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
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 22 matching lines...) Expand all
33 #include "webrtc/base/checks.h" 33 #include "webrtc/base/checks.h"
34 #include "webrtc/base/gunit.h" 34 #include "webrtc/base/gunit.h"
35 35
36 namespace cricket { 36 namespace cricket {
37 FakeAudioReceiveStream::FakeAudioReceiveStream( 37 FakeAudioReceiveStream::FakeAudioReceiveStream(
38 const webrtc::AudioReceiveStream::Config& config) 38 const webrtc::AudioReceiveStream::Config& config)
39 : config_(config), received_packets_(0) { 39 : config_(config), received_packets_(0) {
40 RTC_DCHECK(config.voe_channel_id != -1); 40 RTC_DCHECK(config.voe_channel_id != -1);
41 } 41 }
42 42
43 webrtc::AudioReceiveStream::Stats FakeAudioReceiveStream::GetStats() const {
44 return webrtc::AudioReceiveStream::Stats();
45 }
46
47 const webrtc::AudioReceiveStream::Config& 43 const webrtc::AudioReceiveStream::Config&
48 FakeAudioReceiveStream::GetConfig() const { 44 FakeAudioReceiveStream::GetConfig() const {
49 return config_; 45 return config_;
50 } 46 }
51 47
48 void FakeAudioReceiveStream::SetStats(
49 const webrtc::AudioReceiveStream::Stats& stats) {
50 stats_ = stats;
51 }
52
52 void FakeAudioReceiveStream::IncrementReceivedPackets() { 53 void FakeAudioReceiveStream::IncrementReceivedPackets() {
53 received_packets_++; 54 received_packets_++;
54 } 55 }
55 56
56 FakeVideoSendStream::FakeVideoSendStream( 57 FakeVideoSendStream::FakeVideoSendStream(
57 const webrtc::VideoSendStream::Config& config, 58 const webrtc::VideoSendStream::Config& config,
58 const webrtc::VideoEncoderConfig& encoder_config) 59 const webrtc::VideoEncoderConfig& encoder_config)
59 : sending_(false), 60 : sending_(false),
60 config_(config), 61 config_(config),
61 codec_settings_set_(false), 62 codec_settings_set_(false),
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 365 }
365 366
366 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { 367 void FakeCall::SignalNetworkState(webrtc::NetworkState state) {
367 network_state_ = state; 368 network_state_ = state;
368 } 369 }
369 370
370 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { 371 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) {
371 last_sent_packet_ = sent_packet; 372 last_sent_packet_ = sent_packet;
372 } 373 }
373 } // namespace cricket 374 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698