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

Side by Side Diff: content/renderer/media/webrtc_audio_capturer.cc

Issue 223933002: Adds 192kHz support for WebRTC capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc_audio_capturer.h" 5 #include "content/renderer/media/webrtc_audio_capturer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 10 matching lines...) Expand all
21 namespace content { 21 namespace content {
22 22
23 namespace { 23 namespace {
24 24
25 // Supported hardware sample rates for input and output sides. 25 // Supported hardware sample rates for input and output sides.
26 #if defined(OS_WIN) || defined(OS_MACOSX) 26 #if defined(OS_WIN) || defined(OS_MACOSX)
27 // media::GetAudioInputHardwareSampleRate() asks the audio layer 27 // media::GetAudioInputHardwareSampleRate() asks the audio layer
28 // for its current sample rate (set by the user) on Windows and Mac OS X. 28 // for its current sample rate (set by the user) on Windows and Mac OS X.
29 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init() 29 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init()
30 // will fail if the user selects any rate outside these ranges. 30 // will fail if the user selects any rate outside these ranges.
31 const int kValidInputRates[] = {96000, 48000, 44100, 32000, 16000, 8000}; 31 const int kValidInputRates[] =
32 {192000, 96000, 48000, 44100, 32000, 16000, 8000};
32 #elif defined(OS_LINUX) || defined(OS_OPENBSD) 33 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
33 const int kValidInputRates[] = {48000, 44100}; 34 const int kValidInputRates[] = {48000, 44100};
no longer working on chromium 2014/04/03 14:12:39 can we make {192000, 96000, 48000, 44100, 32000, 1
34 #elif defined(OS_ANDROID) 35 #elif defined(OS_ANDROID)
35 const int kValidInputRates[] = {48000, 44100}; 36 const int kValidInputRates[] = {48000, 44100};
36 #else 37 #else
37 const int kValidInputRates[] = {44100}; 38 const int kValidInputRates[] = {44100};
38 #endif 39 #endif
39 40
40 } // namespace 41 } // namespace
41 42
42 // Reference counted container of WebRtcLocalAudioTrack delegate. 43 // Reference counted container of WebRtcLocalAudioTrack delegate.
43 // TODO(xians): Switch to MediaStreamAudioSinkOwner. 44 // TODO(xians): Switch to MediaStreamAudioSinkOwner.
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); 581 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue);
581 audio_processor_->StartAecDump(aec_dump_file); 582 audio_processor_->StartAecDump(aec_dump_file);
582 } 583 }
583 584
584 void WebRtcAudioCapturer::StopAecDump() { 585 void WebRtcAudioCapturer::StopAecDump() {
585 DCHECK(thread_checker_.CalledOnValidThread()); 586 DCHECK(thread_checker_.CalledOnValidThread());
586 audio_processor_->StopAecDump(); 587 audio_processor_->StopAecDump();
587 } 588 }
588 589
589 } // namespace content 590 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698