下面列出了怎么用android.media.MediaCodec.CodecException的API类实例代码及写法,或者点击链接到github查看源代码。
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
private void handleDecoderException(Exception e,String tag){
if(userDebug) {
makeToast("Exception on "+tag+": ->exception file");
if (e instanceof CodecException) {
CodecException codecExc = (CodecException) e;
makeDebugFile("CodecException on " + tag + " :" + codecExc.getDiagnosticInfo());
} else {
makeDebugFile("Exception on "+tag+":"+Log.getStackTraceString(e));
}
try {Thread.sleep(100,0);} catch (InterruptedException e2) {e2.printStackTrace();}
}
e.printStackTrace();
}
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
@TargetApi(21)
private static String getDiagnosticInfoV21(Throwable cause) {
if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo();
}
return null;
}
@TargetApi(21)
private static boolean isMediaCodecExceptionV21(IllegalStateException error) {
return error instanceof CodecException;
}