OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 last_insert_dtmf_call_ = rtc::Time(); | 90 last_insert_dtmf_call_ = rtc::Time(); |
91 | 91 |
92 LOG(LS_VERBOSE) << "FakeDtmfProvider::InsertDtmf code=" << code | 92 LOG(LS_VERBOSE) << "FakeDtmfProvider::InsertDtmf code=" << code |
93 << " duration=" << duration | 93 << " duration=" << duration |
94 << " gap=" << gap << "."; | 94 << " gap=" << gap << "."; |
95 dtmf_info_queue_.push_back(DtmfInfo(code, duration, gap)); | 95 dtmf_info_queue_.push_back(DtmfInfo(code, duration, gap)); |
96 return true; | 96 return true; |
97 } | 97 } |
98 | 98 |
99 sigslot::signal0<>* GetOnDestroyedSignal() override { | 99 virtual sigslot::signal0<>* GetOnDestroyedSignal() { |
100 return &SignalDestroyed; | 100 return &SignalDestroyed; |
101 } | 101 } |
102 | 102 |
103 // getter and setter | 103 // getter and setter |
104 const std::vector<DtmfInfo>& dtmf_info_queue() const { | 104 const std::vector<DtmfInfo>& dtmf_info_queue() const { |
105 return dtmf_info_queue_; | 105 return dtmf_info_queue_; |
106 } | 106 } |
107 | 107 |
108 // helper functions | 108 // helper functions |
109 void AddCanInsertDtmfTrack(const std::string& label) { | 109 void AddCanInsertDtmfTrack(const std::string& label) { |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 std::string tones = "3,4"; | 334 std::string tones = "3,4"; |
335 int duration = 100; | 335 int duration = 100; |
336 int inter_tone_gap = 50; | 336 int inter_tone_gap = 50; |
337 | 337 |
338 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 6001, inter_tone_gap)); | 338 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 6001, inter_tone_gap)); |
339 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 69, inter_tone_gap)); | 339 EXPECT_FALSE(dtmf_->InsertDtmf(tones, 69, inter_tone_gap)); |
340 EXPECT_FALSE(dtmf_->InsertDtmf(tones, duration, 49)); | 340 EXPECT_FALSE(dtmf_->InsertDtmf(tones, duration, 49)); |
341 | 341 |
342 EXPECT_TRUE(dtmf_->InsertDtmf(tones, duration, inter_tone_gap)); | 342 EXPECT_TRUE(dtmf_->InsertDtmf(tones, duration, inter_tone_gap)); |
343 } | 343 } |
OLD | NEW |