Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / voice_engine / voe_codec_impl.cc
index 7b6a5a2..a7735bb 100644 (file)
@@ -213,114 +213,6 @@ int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec)
     return 0;
 }
 
-int VoECodecImpl::SetAMREncFormat(int channel, AmrMode mode)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetAMREncFormat(channel=%d, mode=%d)", channel, mode);
-#ifdef WEBRTC_CODEC_AMR
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetAMREncFormat() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetAMREncFormat(mode);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetAMREncFormat() AMR codec is not supported");
-    return -1;
-#endif
-}
-
-int VoECodecImpl::SetAMRDecFormat(int channel, AmrMode mode)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetAMRDecFormat(channel=%i, mode=%i)", channel, mode);
-#ifdef WEBRTC_CODEC_AMR
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetAMRDecFormat() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetAMRDecFormat(mode);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetAMRDecFormat() AMR codec is not supported");
-    return -1;
-#endif
-}
-
-int VoECodecImpl::SetAMRWbEncFormat(int channel, AmrMode mode)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetAMRWbEncFormat(channel=%d, mode=%d)", channel, mode);
-    ANDROID_NOT_SUPPORTED(_shared->statistics());
-    IPHONE_NOT_SUPPORTED(_shared->statistics());
-#ifdef WEBRTC_CODEC_AMRWB
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetAMRWbEncFormat() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetAMRWbEncFormat(mode);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetAMRWbEncFormat() AMR-wb codec is not supported");
-    return -1;
-#endif
-}
-
-int VoECodecImpl::SetAMRWbDecFormat(int channel, AmrMode mode)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetAMRWbDecFormat(channel=%i, mode=%i)", channel, mode);
-    ANDROID_NOT_SUPPORTED(_shared->statistics());
-    IPHONE_NOT_SUPPORTED(_shared->statistics());
-#ifdef WEBRTC_CODEC_AMRWB
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetAMRWbDecFormat() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetAMRWbDecFormat(mode);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetAMRWbDecFormat() AMR-wb codec is not supported");
-    return -1;
-#endif
-}
-
 int VoECodecImpl::SetRecPayloadType(int channel, const CodecInst& codec)
 {
     WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
@@ -403,93 +295,6 @@ int VoECodecImpl::SetSendCNPayloadType(int channel, int type,
     return channelPtr->SetSendCNPayloadType(type, frequency);
 }
 
-int VoECodecImpl::SetISACInitTargetRate(int channel, int rateBps,
-                                        bool useFixedFrameSize)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetISACInitTargetRate(channel=%d, rateBps=%d, "
-                 "useFixedFrameSize=%d)", channel, rateBps, useFixedFrameSize);
-    ANDROID_NOT_SUPPORTED(_shared->statistics());
-    IPHONE_NOT_SUPPORTED(_shared->statistics());
-#ifdef WEBRTC_CODEC_ISAC
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetISACInitTargetRate() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetISACInitTargetRate(rateBps, useFixedFrameSize);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetISACInitTargetRate() iSAC codec is not supported");
-    return -1;
-#endif
-}
-
-int VoECodecImpl::SetISACMaxRate(int channel, int rateBps)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetISACMaxRate(channel=%d, rateBps=%d)", channel, rateBps);
-    ANDROID_NOT_SUPPORTED(_shared->statistics());
-    IPHONE_NOT_SUPPORTED(_shared->statistics());
-#ifdef WEBRTC_CODEC_ISAC
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetISACMaxRate() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetISACMaxRate(rateBps);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetISACMaxRate() iSAC codec is not supported");
-    return -1;
-#endif
-}
-
-int VoECodecImpl::SetISACMaxPayloadSize(int channel, int sizeBytes)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "SetISACMaxPayloadSize(channel=%d, sizeBytes=%d)", channel,
-                 sizeBytes);
-    ANDROID_NOT_SUPPORTED(_shared->statistics());
-    IPHONE_NOT_SUPPORTED(_shared->statistics());
-#ifdef WEBRTC_CODEC_ISAC
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
-    voe::Channel* channelPtr = ch.channel();
-    if (channelPtr == NULL)
-    {
-        _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
-            "SetISACMaxPayloadSize() failed to locate channel");
-        return -1;
-    }
-    return channelPtr->SetISACMaxPayloadSize(sizeBytes);
-#else
-    _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
-        "SetISACMaxPayloadSize() iSAC codec is not supported");
-    return -1;
-#endif
-}
-
 int VoECodecImpl::SetVADStatus(int channel, bool enable, VadModes mode,
                                bool disableDTX)
 {