Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 14 matching lines...) Expand all Loading... | |
| 25 // ... | 25 // ... |
| 26 // base->Terminate(); | 26 // base->Terminate(); |
| 27 // base->Release(); | 27 // base->Release(); |
| 28 // codec->Release(); | 28 // codec->Release(); |
| 29 // VoiceEngine::Delete(voe); | 29 // VoiceEngine::Delete(voe); |
| 30 // | 30 // |
| 31 #ifndef WEBRTC_VOICE_ENGINE_VOE_CODEC_H | 31 #ifndef WEBRTC_VOICE_ENGINE_VOE_CODEC_H |
| 32 #define WEBRTC_VOICE_ENGINE_VOE_CODEC_H | 32 #define WEBRTC_VOICE_ENGINE_VOE_CODEC_H |
| 33 | 33 |
| 34 #include "webrtc/common_types.h" | 34 #include "webrtc/common_types.h" |
| 35 #include "webrtc/modules/audio_coding/codecs/audio_format.h" | |
| 35 | 36 |
| 36 namespace webrtc { | 37 namespace webrtc { |
| 37 | 38 |
| 38 class VoiceEngine; | 39 class VoiceEngine; |
| 39 | 40 |
| 40 class WEBRTC_DLLEXPORT VoECodec { | 41 class WEBRTC_DLLEXPORT VoECodec { |
| 41 public: | 42 public: |
| 42 // Factory for the VoECodec sub-API. Increases an internal | 43 // Factory for the VoECodec sub-API. Increases an internal |
| 43 // reference counter if successful. Returns NULL if the API is not | 44 // reference counter if successful. Returns NULL if the API is not |
| 44 // supported or if construction fails. | 45 // supported or if construction fails. |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 72 // Gets the currently received |codec| for a specific |channel|. | 73 // Gets the currently received |codec| for a specific |channel|. |
| 73 virtual int GetRecCodec(int channel, CodecInst& codec) = 0; | 74 virtual int GetRecCodec(int channel, CodecInst& codec) = 0; |
| 74 | 75 |
| 75 // Sets the dynamic payload type number for a particular |codec| or | 76 // Sets the dynamic payload type number for a particular |codec| or |
| 76 // disables (ignores) a codec for receiving. For instance, when receiving | 77 // disables (ignores) a codec for receiving. For instance, when receiving |
| 77 // an invite from a SIP-based client, this function can be used to change | 78 // an invite from a SIP-based client, this function can be used to change |
| 78 // the dynamic payload type number to match that in the INVITE SDP- | 79 // the dynamic payload type number to match that in the INVITE SDP- |
| 79 // message. The utilized parameters in the |codec| structure are: | 80 // message. The utilized parameters in the |codec| structure are: |
| 80 // plname, plfreq, pltype and channels. | 81 // plname, plfreq, pltype and channels. |
| 81 virtual int SetRecPayloadType(int channel, const CodecInst& codec) = 0; | 82 virtual int SetRecPayloadType(int channel, const CodecInst& codec) = 0; |
| 83 virtual int SetRecPayloadType(int channel, | |
|
the sun
2016/11/21 08:37:05
Why do we need to add this to the legacy API?
ossu
2016/11/30 12:43:43
Should we go from AudioReceiveStream directly thro
| |
| 84 int payload_type, | |
| 85 const SdpAudioFormat& format) = 0; | |
| 82 | 86 |
| 83 // Gets the actual payload type that is set for receiving a |codec| on a | 87 // Gets the actual payload type that is set for receiving a |codec| on a |
| 84 // |channel|. The value it retrieves will either be the default payload | 88 // |channel|. The value it retrieves will either be the default payload |
| 85 // type, or a value earlier set with SetRecPayloadType(). | 89 // type, or a value earlier set with SetRecPayloadType(). |
| 86 virtual int GetRecPayloadType(int channel, CodecInst& codec) = 0; | 90 virtual int GetRecPayloadType(int channel, CodecInst& codec) = 0; |
| 87 | 91 |
| 88 // Sets the payload |type| for the sending of SID-frames with background | 92 // Sets the payload |type| for the sending of SID-frames with background |
| 89 // noise estimation during silence periods detected by the VAD. | 93 // noise estimation during silence periods detected by the VAD. |
| 90 virtual int SetSendCNPayloadType( | 94 virtual int SetSendCNPayloadType( |
| 91 int channel, | 95 int channel, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 virtual int GetOpusDtxStatus(int channel, bool* enabled) { return -1; } | 142 virtual int GetOpusDtxStatus(int channel, bool* enabled) { return -1; } |
| 139 | 143 |
| 140 protected: | 144 protected: |
| 141 VoECodec() {} | 145 VoECodec() {} |
| 142 virtual ~VoECodec() {} | 146 virtual ~VoECodec() {} |
| 143 }; | 147 }; |
| 144 | 148 |
| 145 } // namespace webrtc | 149 } // namespace webrtc |
| 146 | 150 |
| 147 #endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_H | 151 #endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_H |
| OLD | NEW |