Java 类com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException 实例源码

项目:Exoplayer_VLC    文件:VLCNativeCrashHandler.java   
@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;
                }
            }
        });
    }
}
项目:Exoplayer_VLC    文件:VLCNativeCrashHandler.java   
@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;
                }
            }
        });
    }
}
项目:ExoPlayer-Demo    文件:PlayerActivity.java   
@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();
}
项目:droidkaigi2016    文件:VideoPlayerActivity.java   
@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();
}
项目:Android-Example-HLS-ExoPlayer    文件:PlayerActivity.java   
@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();
}
项目:Android-Birdcopy-Application    文件:FlyingPlayerActivity.java   
@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();
}
项目:Exoplayer_VLC    文件:VLCVideoSurfaceHandler.java   
@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));
}
项目:Exoplayer_VLC    文件:VLCVideoSurfaceHandler.java   
private void notifyDecoderInitializationError(final DecoderInitializationException e) {
    handlerPost(new Runnable() {
        @Override
        public void run() {
            eventListener.onDecoderInitializationError(e);
        }
    });
}
项目:Exoplayer_VLC    文件:VLCVideoSurfaceHandler.java   
@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));
}
项目:Exoplayer_VLC    文件:VLCVideoSurfaceHandler.java   
private void notifyDecoderInitializationError(final DecoderInitializationException e) {
    handlerPost(new Runnable() {
        @Override
        public void run() {
            eventListener.onDecoderInitializationError(e);
        }
    });
}
项目:droidkaigi2016    文件:VideoPlayerActivity.java   
@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();
}
项目:androidtv-sample    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:androidtv-sample    文件:VideoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:AndroidTvDemo    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:AndroidTvDemo    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:chilly    文件:VideoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:ShaddockVideoPlayer    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:ShaddockVideoPlayer    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:android-tv-news    文件:VideoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:mimi-reader    文件:ExoPlayerHelper.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:ExoPlayerController    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:ExoPlayerController    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:FriendsCameraSDK-android    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:talk-android    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:android_packages_apps_tv    文件:MpegTsPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    // Do nothing.
}
项目:OKPlayer    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:OKPlayer    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:miku    文件:MediaPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:ExoPlayer-Demo    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:ExoPlayer-Demo    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:ExoPlayer-Demo    文件:LogcatLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  Log.e(tag, "Decoder initialization error", e);
}
项目:Mediathek    文件:Player.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:sbs-android-tv    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    printInternalError("decoderInitializationError", e);
}
项目:sbs-android-tv    文件:VideoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
项目:droidkaigi2016    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:danish-media-license    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException ex) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(ex);
  }
}
项目:WliveTV    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:WliveTV    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
项目:Android-Example-HLS-ExoPlayer    文件:EventLogger.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
项目:Android-Example-HLS-ExoPlayer    文件:DemoPlayer.java   
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}