本文整理汇总了Java中com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException类的典型用法代码示例。如果您正苦于以下问题:Java DecoderInitializationException类的具体用法?Java DecoderInitializationException怎么用?Java DecoderInitializationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DecoderInitializationException类属于com.google.android.exoplayer.MediaCodecTrackRenderer包,在下文中一共展示了DecoderInitializationException类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onNativeCrash
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onNativeCrash() {
if (eventHandler != null && eventListener != null) {
eventHandler.post(new Runnable() {
@Override
public void run() {
eventListener.onDecoderInitializationError(new DecoderInitializationException(null, new Exception(
"VLC Lib native crash occures."), 0));
if (VLCNativeCrashHandler.this.surfacePlayer != null) {
VLCNativeCrashHandler.this.surfacePlayer.release();
VLCNativeCrashHandler.this.surfacePlayer = null;
}
}
});
}
}
示例2: onError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onError(Exception e) {
String errorString = null;
if (e instanceof UnsupportedDrmException) {
// Special case DRM failures.
UnsupportedDrmException unsupportedDrmException = (UnsupportedDrmException) e;
errorString = getString(Util.SDK_INT < 18 ? R.string.error_drm_not_supported
: unsupportedDrmException.reason == UnsupportedDrmException.REASON_UNSUPPORTED_SCHEME
? R.string.error_drm_unsupported_scheme : R.string.error_drm_unknown);
} else if (e instanceof ExoPlaybackException
&& e.getCause() instanceof DecoderInitializationException) {
// Special case for decoder initialization failures.
DecoderInitializationException decoderInitializationException =
(DecoderInitializationException) e.getCause();
if (decoderInitializationException.decoderName == null) {
if (decoderInitializationException.getCause() instanceof DecoderQueryException) {
errorString = getString(R.string.error_querying_decoders);
} else if (decoderInitializationException.secureDecoderRequired) {
errorString = getString(R.string.error_no_secure_decoder,
decoderInitializationException.mimeType);
} else {
errorString = getString(R.string.error_no_decoder,
decoderInitializationException.mimeType);
}
} else {
errorString = getString(R.string.error_instantiating_decoder,
decoderInitializationException.decoderName);
}
}
if (errorString != null) {
Toast.makeText(getApplicationContext(), errorString, Toast.LENGTH_LONG).show();
}
playerNeedsPrepare = true;
updateButtonVisibilities();
showControls();
}
示例3: onError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onError(Exception e) {
String errorString = null;
if (e instanceof UnsupportedDrmException) {
// Special case DRM failures.
UnsupportedDrmException unsupportedDrmException = (UnsupportedDrmException) e;
errorString = getString(Util.SDK_INT < 18 ? R.string.video_error_drm_not_supported
: unsupportedDrmException.reason == UnsupportedDrmException.REASON_UNSUPPORTED_SCHEME
? R.string.video_error_drm_unsupported_scheme : R.string.video_error_drm_unknown);
} else if (e instanceof ExoPlaybackException
&& e.getCause() instanceof DecoderInitializationException) {
// Special case for decoder initialization failures.
DecoderInitializationException decoderInitializationException =
(DecoderInitializationException) e.getCause();
if (decoderInitializationException.decoderName == null) {
if (decoderInitializationException.getCause() instanceof DecoderQueryException) {
errorString = getString(R.string.video_error_querying_decoders);
} else if (decoderInitializationException.secureDecoderRequired) {
errorString = getString(R.string.video_error_no_secure_decoder,
decoderInitializationException.mimeType);
} else {
errorString = getString(R.string.video_error_no_decoder,
decoderInitializationException.mimeType);
}
} else {
errorString = getString(R.string.video_error_instantiating_decoder,
decoderInitializationException.decoderName);
}
}
if (errorString != null) {
Toast.makeText(getApplicationContext(), errorString, Toast.LENGTH_LONG).show();
}
playerNeedsPrepare = true;
showControls();
}
示例4: onError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onError(Exception e) {
String errorString = null;
if (e instanceof UnsupportedDrmException) {
// Special case DRM failures.
UnsupportedDrmException unsupportedDrmException = (UnsupportedDrmException) e;
errorString = getString(Util.SDK_INT < 18 ? R.string.error_drm_not_supported
: unsupportedDrmException.reason == UnsupportedDrmException.REASON_UNSUPPORTED_SCHEME
? R.string.error_drm_unsupported_scheme : R.string.error_drm_unknown);
} else if (e instanceof ExoPlaybackException
&& e.getCause() instanceof DecoderInitializationException) {
// Special case for decoder initialization failures.
DecoderInitializationException decoderInitializationException =
(DecoderInitializationException) e.getCause();
if (decoderInitializationException.decoderName == null) {
if (decoderInitializationException.getCause() instanceof DecoderQueryException) {
errorString = getString(R.string.error_querying_decoders);
} else if (decoderInitializationException.secureDecoderRequired) {
errorString = getString(R.string.error_no_secure_decoder,
decoderInitializationException.mimeType);
} else {
errorString = getString(R.string.error_no_decoder,
decoderInitializationException.mimeType);
}
} else {
errorString = getString(R.string.error_instantiating_decoder,
decoderInitializationException.decoderName);
}
}
if (errorString != null) {
Toast.makeText(getApplicationContext(), errorString, Toast.LENGTH_LONG).show();
}
playerNeedsPrepare = true;
updateButtonVisibilities();
showControls();
}
示例5: eventHardwareAccelerationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void eventHardwareAccelerationError() {
// TODO Auto-generated method stub
ExoVlcUtil.log(this, "Error with hardware acceleration");
release();
notifyDecoderInitializationError(new DecoderInitializationException(null, new RuntimeException(
"Error with hardware acceleration"), 0));
}
示例6: notifyDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
private void notifyDecoderInitializationError(final DecoderInitializationException e) {
handlerPost(new Runnable() {
@Override
public void run() {
eventListener.onDecoderInitializationError(e);
}
});
}
示例7: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
if (internalErrorListener != null) {
internalErrorListener.onDecoderInitializationError(e);
}
}
示例8: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
printInternalError("decoderInitializationError", e);
}
示例9: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
if (internalErrorListener != null) {
internalErrorListener.onDecoderInitializationError(e);
}
}
示例10: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
// Do nothing.
}
示例11: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
Log.e(tag, "Decoder initialization error", e);
}
示例12: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
printInternalError("decoderInitializationError", e);
}
示例13: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException ex) {
if (internalErrorListener != null) {
internalErrorListener.onDecoderInitializationError(ex);
}
}