mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 979716: Make Opus complexity configurable in WebRTC; default Gonk to complexity 1 r=jmspeex
This commit is contained in:
parent
5049f76b90
commit
a7c962bbd9
@ -65,6 +65,7 @@ elif os == 'Android':
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
gyp_vars['build_with_gonk'] = 1
|
||||
gyp_vars['moz_widget_toolkit_gonk'] = 1
|
||||
gyp_vars['opus_complexity'] = 1
|
||||
if int(CONFIG['ANDROID_VERSION']) >= 18:
|
||||
gyp_vars['moz_webrtc_omx'] = 1
|
||||
else:
|
||||
|
@ -7,6 +7,9 @@
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'opus_complexity%': 0,
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'webrtc_opus',
|
||||
@ -26,6 +29,9 @@
|
||||
'include_dirs': [
|
||||
'<(webrtc_root)',
|
||||
],
|
||||
'defines': [
|
||||
'OPUS_COMPLEXITY=<(opus_complexity)'
|
||||
],
|
||||
'sources': [
|
||||
'interface/opus_interface.h',
|
||||
'opus_interface.c',
|
||||
|
@ -103,6 +103,9 @@ int16_t WebRtcOpus_Encode(OpusEncInst* inst, int16_t* audio_in, int16_t samples,
|
||||
|
||||
int16_t WebRtcOpus_SetBitRate(OpusEncInst* inst, int32_t rate) {
|
||||
if (inst) {
|
||||
#if defined(OPUS_COMPLEXITY) && (OPUS_COMPLEXITY != 0)
|
||||
opus_encoder_ctl(inst->encoder, OPUS_SET_COMPLEXITY(OPUS_COMPLEXITY));
|
||||
#endif
|
||||
return opus_encoder_ctl(inst->encoder, OPUS_SET_BITRATE(rate));
|
||||
} else {
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user