L16 implementation of the Audio{En,De}coderFactoryTemplate APIs
BUG=webrtc:7836, webrtc:7842 Review-Url: https://codereview.webrtc.org/2995523002 Cr-Commit-Position: refs/heads/master@{#19354}
This commit is contained in:
25
webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc
Normal file
25
webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
void Pcm16BAppendSupportedCodecSpecs(std::vector<AudioCodecSpec>* specs) {
|
||||
for (size_t num_channels : {1, 2}) {
|
||||
for (int sample_rate_hz : {8000, 16000, 32000}) {
|
||||
specs->push_back(
|
||||
{{"L16", sample_rate_hz, num_channels},
|
||||
{sample_rate_hz, num_channels, sample_rate_hz * num_channels * 16}});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
22
webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.h
Normal file
22
webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_PCM16B_COMMON_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_PCM16B_COMMON_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/api/audio_codecs/audio_decoder_factory.h"
|
||||
|
||||
namespace webrtc {
|
||||
void Pcm16BAppendSupportedCodecSpecs(std::vector<AudioCodecSpec>* specs);
|
||||
}
|
||||
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_PCM16B_COMMON_H_
|
||||
Reference in New Issue
Block a user