当前位置: 首页>>代码示例>>Java>>正文


Java DecoderInitializationException类代码示例

本文整理汇总了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;
				}
			}
		});
	}
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:19,代码来源:VLCNativeCrashHandler.java

示例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();
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:37,代码来源:PlayerActivity.java

示例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();
}
 
开发者ID:konifar,项目名称:droidkaigi2016,代码行数:36,代码来源:VideoPlayerActivity.java

示例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();
}
 
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:37,代码来源:FlyingPlayerActivity.java

示例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));
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:10,代码来源:VLCVideoSurfaceHandler.java

示例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);
		}
	});
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:9,代码来源:VLCVideoSurfaceHandler.java

示例7: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onDecoderInitializationError(e);
    }
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:7,代码来源:DemoPlayer.java

示例8: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  printInternalError("decoderInitializationError", e);
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:5,代码来源:EventLogger.java

示例9: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(e);
  }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:7,代码来源:DemoPlayer.java

示例10: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    // Do nothing.
}
 
开发者ID:trevd,项目名称:android_packages_apps_tv,代码行数:5,代码来源:MpegTsPlayer.java

示例11: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
  Log.e(tag, "Decoder initialization error", e);
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:5,代码来源:LogcatLogger.java

示例12: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException e) {
    printInternalError("decoderInitializationError", e);
}
 
开发者ID:nextux,项目名称:sbs-android-tv,代码行数:5,代码来源:EventLogger.java

示例13: onDecoderInitializationError

import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException; //导入依赖的package包/类
@Override
public void onDecoderInitializationError(DecoderInitializationException ex) {
  if (internalErrorListener != null) {
    internalErrorListener.onDecoderInitializationError(ex);
  }
}
 
开发者ID:mkjensen,项目名称:danish-media-license,代码行数:7,代码来源:DemoPlayer.java


注:本文中的com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。