本文整理汇总了Java中com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException方法的典型用法代码示例。如果您正苦于以下问题:Java MediaCodecTrackRenderer.DecoderInitializationException方法的具体用法?Java MediaCodecTrackRenderer.DecoderInitializationException怎么用?Java MediaCodecTrackRenderer.DecoderInitializationException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.exoplayer.MediaCodecTrackRenderer
的用法示例。
在下文中一共展示了MediaCodecTrackRenderer.DecoderInitializationException方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
@Override
public void onDecoderInitializationError(
MediaCodecTrackRenderer.DecoderInitializationException e) {
for(Callback callback : mCallbacks) {
callback.onPlayerError(new ExoPlaybackException(e));
}
}
示例2: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
/** MediaCodecVideoTrackRenderer.EventListener */
@Override
public void onDecoderInitializationError(
MediaCodecTrackRenderer.DecoderInitializationException e) {
if (internalErrorListener != null) {
internalErrorListener.onDecoderInitializationError(e);
}
}
示例3: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
/**
* {@link MediaCodecTrackRenderer.EventListener}
*/
@Override
public void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e) {
if (internalErrorListener != null) {
internalErrorListener.onDecoderInitializationError(e);
}
}
示例4: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
@Override
public void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e) {
if (internalErrorListener != null) {
internalErrorListener.onDecoderInitializationError(e);
}
}
示例5: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
@Override
public void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e) {
printInternalError("decoderInitializationError", e);
}
示例6: onError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
@Override
public void onError(Exception e) {
String errMsg = "Player Error";
LOGE(TAG, errMsg, e);
String errorString = "";
if (e instanceof UnsupportedDrmException) {
// Special case DRM failures.
UnsupportedDrmException unsupportedDrmException = (UnsupportedDrmException) e;
errorString = (Util.SDK_INT < 18) ? "error_drm_not_supported"
: unsupportedDrmException.reason == UnsupportedDrmException.REASON_UNSUPPORTED_SCHEME
? "error_drm_unsupported_scheme" : "error_drm_unknown";
} else if (e instanceof ExoPlaybackException && e.getCause() instanceof FileNotFoundException) {
errorString = "DRM License Unavailable"; // probably license issue
} else if (e instanceof ExoPlaybackException && e.getCause() instanceof BehindLiveWindowException) {
LOGE(TAG, "Recovering BehindLiveWindowException"); // happens if network is bad and no more chunk in hte buffer
mExoPlayer.prepare();
return;
} else if (e instanceof ExoPlaybackException && e.getCause() instanceof android.media.MediaCodec.CryptoException) {
errorString = "DRM Error. Trying to recover"; // probably license issue
mExoPlayer.prepare();
return;
} else if (e instanceof ExoPlaybackException
&& e.getCause() instanceof MediaCodecTrackRenderer.DecoderInitializationException) {
// Special case for decoder initialization failures.
MediaCodecTrackRenderer.DecoderInitializationException decoderInitializationException =
(MediaCodecTrackRenderer.DecoderInitializationException) e.getCause();
if (decoderInitializationException.decoderName == null) {
if (decoderInitializationException.getCause() instanceof MediaCodecUtil.DecoderQueryException) {
errorString = "error_querying_decoders ";
} else if (decoderInitializationException.secureDecoderRequired) {
errorString = "error_no_secure_decoder " +
decoderInitializationException.mimeType;
} else {
errorString = "error_no_decoder " +
decoderInitializationException.mimeType;
}
} else {
errorString = "error_instantiating_decoder " +
decoderInitializationException.decoderName;
}
}
else if (e.getCause() instanceof com.google.android.exoplayer.upstream.HttpDataSource.HttpDataSourceException) {
mExoPlayer.prepare();
errorString = "HttpDataSourceException . Trying to recover";
LOGE(TAG, errorString);
return;
} else if (e.getCause() instanceof java.net.UnknownHostException) {
mExoPlayer.prepare();
errorString = "UnknownHostException . Trying to recover";
LOGE(TAG, errorString);
return;
} else if (e.getCause() instanceof java.net.ConnectException) {
mExoPlayer.prepare();
errorString = "ConnectException . Trying to recover";
LOGE(TAG, errorString);
return;
}
else if (e.getCause() instanceof java.lang.IllegalStateException) {
mExoPlayer.prepare();
errorString = "IllegalStateException . Trying to recover";
LOGE(TAG, errorString);
return;
}
if (!"".equals(errorString)) {
LOGE(TAG, errorString);
errorString += "-";
}
mPlayerListener.eventWithValue(KExoPlayer.this, KPlayerListener.ErrorKey, TAG + "-" + errMsg + "-" + errorString + e.getMessage());
}
示例7: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
@Override
public void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e) {
}
示例8: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
/**
* {@link MediaCodecTrackRenderer.EventListener}
*/
void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e);
示例9: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
@Override
public void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e) {
this.dispatchStatusEventAsync(AirAACPlayerEvent_AAC_PLAYER_ERROR, "" + e.getMessage());
}
示例10: onDecoderInitializationError
import com.google.android.exoplayer.MediaCodecTrackRenderer; //导入方法依赖的package包/类
void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e);