Add H264 log warning if not available
This commit is contained in:
parent
cdad8c8c3d
commit
ef021b1e8a
4 changed files with 9 additions and 4 deletions
|
@ -16,7 +16,7 @@
|
|||
android:src="@drawable/call_status_incoming"
|
||||
android:layout_marginLeft="5dp"/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/sipUri"
|
||||
android:lines="1"
|
||||
android:textSize="30sp"
|
||||
|
|
|
@ -362,7 +362,6 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -845,22 +845,27 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
private void enableDisableVideoCodecs(PayloadType videoCodec) throws LinphoneCoreException {
|
||||
String mime = videoCodec.getMime();
|
||||
int key;
|
||||
int defaultValueKey;
|
||||
|
||||
if ("MP4V-ES".equals(mime)) {
|
||||
key = R.string.pref_video_codec_mpeg4_key;
|
||||
defaultValueKey = R.bool.pref_video_codec_mpeg4_default;
|
||||
} else if ("H264".equals(mime)) {
|
||||
key = R.string.pref_video_codec_h264_key;
|
||||
defaultValueKey = R.bool.pref_video_codec_h264_default;
|
||||
} else if ("H263-1998".equals(mime)) {
|
||||
key = R.string.pref_video_codec_h263_key;
|
||||
defaultValueKey = R.bool.pref_video_codec_h263_default;
|
||||
} else if ("VP8".equals(mime)) {
|
||||
key = R.string.pref_video_codec_vp8_key;
|
||||
defaultValueKey = R.bool.pref_video_codec_vp8_default;
|
||||
} else {
|
||||
Log.e("Unhandled video codec ", mime);
|
||||
mLc.enablePayloadType(videoCodec, false);
|
||||
return;
|
||||
}
|
||||
|
||||
boolean enable= getPrefBoolean(key,false);
|
||||
boolean enable = getPrefBoolean(key, mR.getBoolean(defaultValueKey));
|
||||
mLc.enablePayloadType(videoCodec, enable);
|
||||
}
|
||||
|
||||
|
|
|
@ -167,6 +167,7 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
|
|||
if (!Version.hasNeon())
|
||||
{
|
||||
// Android without neon doesn't support H264
|
||||
Log.w("No NEON available, disabling H264");
|
||||
findPreference(R.string.pref_video_codec_h264_key).setEnabled(false);
|
||||
findPreference(R.string.pref_video_codec_h264_key).setDefaultValue(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue