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

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

Issue 1491743004: Refactor WVoE DTMF handling #2 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@wvoe_dtmf
Patch Set: rebase Created 5 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 | « talk/media/webrtc/fakewebrtccall.h ('k') | talk/media/webrtc/fakewebrtcvoiceengine.h » ('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 21 matching lines...) Expand all
32 #include "talk/media/base/rtputils.h" 32 #include "talk/media/base/rtputils.h"
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 FakeAudioSendStream::FakeAudioSendStream( 37 FakeAudioSendStream::FakeAudioSendStream(
38 const webrtc::AudioSendStream::Config& config) : config_(config) { 38 const webrtc::AudioSendStream::Config& config) : config_(config) {
39 RTC_DCHECK(config.voe_channel_id != -1); 39 RTC_DCHECK(config.voe_channel_id != -1);
40 } 40 }
41 41
42 const webrtc::AudioSendStream::Config&
43 FakeAudioSendStream::GetConfig() const {
44 return config_;
45 }
46
42 void FakeAudioSendStream::SetStats( 47 void FakeAudioSendStream::SetStats(
43 const webrtc::AudioSendStream::Stats& stats) { 48 const webrtc::AudioSendStream::Stats& stats) {
44 stats_ = stats; 49 stats_ = stats;
45 } 50 }
46 51
47 const webrtc::AudioSendStream::Config& 52 FakeAudioSendStream::TelephoneEvent
48 FakeAudioSendStream::GetConfig() const { 53 FakeAudioSendStream::GetLatestTelephoneEvent() const {
49 return config_; 54 return latest_telephone_event_;
55 }
56
57 bool FakeAudioSendStream::SendTelephoneEvent(int payload_type, uint8_t event,
58 uint32_t duration_ms) {
59 latest_telephone_event_.payload_type = payload_type;
60 latest_telephone_event_.event_code = event;
61 latest_telephone_event_.duration_ms = duration_ms;
62 return true;
50 } 63 }
51 64
52 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { 65 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const {
53 return stats_; 66 return stats_;
54 } 67 }
55 68
56 FakeAudioReceiveStream::FakeAudioReceiveStream( 69 FakeAudioReceiveStream::FakeAudioReceiveStream(
57 const webrtc::AudioReceiveStream::Config& config) 70 const webrtc::AudioReceiveStream::Config& config)
58 : config_(config), received_packets_(0) { 71 : config_(config), received_packets_(0) {
59 RTC_DCHECK(config.voe_channel_id != -1); 72 RTC_DCHECK(config.voe_channel_id != -1);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 427 }
415 428
416 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { 429 void FakeCall::SignalNetworkState(webrtc::NetworkState state) {
417 network_state_ = state; 430 network_state_ = state;
418 } 431 }
419 432
420 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { 433 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) {
421 last_sent_packet_ = sent_packet; 434 last_sent_packet_ = sent_packet;
422 } 435 }
423 } // namespace cricket 436 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/webrtc/fakewebrtccall.h ('k') | talk/media/webrtc/fakewebrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698