Conditional compilation of x264. Use BUILD_X264=0 to disable.
This commit is contained in:
parent
5bde818b30
commit
325e89807c
4 changed files with 29 additions and 7 deletions
|
@ -1,7 +1,11 @@
|
||||||
root-dir:=$(APP_PROJECT_PATH)
|
root-dir:=$(APP_PROJECT_PATH)
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
|
BUILD_X264?=1
|
||||||
LINPHONE_VIDEO=1
|
LINPHONE_VIDEO=1
|
||||||
|
else
|
||||||
|
BUILD_X264=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(root-dir)/submodules/externals/build/speex/Android.mk
|
include $(root-dir)/submodules/externals/build/speex/Android.mk
|
||||||
|
@ -21,10 +25,13 @@ include $(root-dir)/submodules/linphone/mediastreamer2/tests/Android.mk
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
include $(root-dir)/submodules/msilbc/Android.mk
|
include $(root-dir)/submodules/msilbc/Android.mk
|
||||||
include $(root-dir)/submodules/msx264/Android.mk
|
|
||||||
include $(root-dir)/submodules/externals/build/ffmpeg/Android.mk
|
|
||||||
include $(root-dir)/submodules/externals/build/x264/Android.mk
|
|
||||||
|
|
||||||
|
ifeq ($(BUILD_X264), 1)
|
||||||
|
include $(root-dir)/submodules/msx264/Android.mk
|
||||||
|
include $(root-dir)/submodules/externals/build/x264/Android.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(root-dir)/submodules/externals/build/ffmpeg/Android.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(root-dir)/submodules/linphone/build/android/Android.mk
|
include $(root-dir)/submodules/linphone/build/android/Android.mk
|
||||||
|
|
|
@ -379,7 +379,12 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
lInputStream.close();
|
lInputStream.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean detectVideoCodec(String mime) {
|
||||||
|
for (PayloadType videoCodec : mLc.listVideoCodecs()) {
|
||||||
|
if (mime.equals(videoCodec.getMime())) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void initFromConf(Context context) throws LinphoneConfigException {
|
public void initFromConf(Context context) throws LinphoneConfigException {
|
||||||
//traces
|
//traces
|
||||||
|
|
|
@ -58,6 +58,15 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
||||||
return (CheckBoxPreference) findPreference(getString(key));
|
return (CheckBoxPreference) findPreference(getString(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void detectAudioCodec(int id, String mime, int rate) {
|
||||||
|
boolean enable = LinphoneService.isReady() && LinphoneManager.getLc().findPayloadType(mime, rate)!=null;
|
||||||
|
findPreference(id).setEnabled(enable);
|
||||||
|
}
|
||||||
|
private void detectVideoCodec(int id, String mime) {
|
||||||
|
findPreference(id).setEnabled(LinphoneManager.getInstance().detectVideoCodec(mime));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -76,8 +85,7 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
||||||
|
|
||||||
boolean fastCpu = Version.isArmv7();
|
boolean fastCpu = Version.isArmv7();
|
||||||
if (fastCpu) {
|
if (fastCpu) {
|
||||||
boolean ilbc = LinphoneService.isReady() && LinphoneManager.getLc().findPayloadType("iLBC", 8000)!=null;
|
detectAudioCodec(pref_codec_ilbc_key, "iLBC", 8000);
|
||||||
findPreference(pref_codec_ilbc_key).setEnabled(ilbc);
|
|
||||||
findPreference(pref_codec_speex16_key).setEnabled(true);
|
findPreference(pref_codec_speex16_key).setEnabled(true);
|
||||||
//findPreference(pref_codec_speex32_key)).setEnabled(enableIlbc);
|
//findPreference(pref_codec_speex32_key)).setEnabled(enableIlbc);
|
||||||
}
|
}
|
||||||
|
@ -94,6 +102,8 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
||||||
|
|
||||||
prefs().edit().putBoolean(LinphoneActivity.PREF_FIRST_LAUNCH, false).commit();
|
prefs().edit().putBoolean(LinphoneActivity.PREF_FIRST_LAUNCH, false).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detectVideoCodec(R.string.pref_video_codec_h264_key, "H264");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2e35f52d35dc6f2e22ffa85130ad233172a5f488
|
Subproject commit ecca92fc21b379fe227980f4a21dc759b7aca260
|
Loading…
Reference in a new issue