本文整理汇总了Java中org.videolan.libvlc.IVLCVout.detachViews方法的典型用法代码示例。如果您正苦于以下问题:Java IVLCVout.detachViews方法的具体用法?Java IVLCVout.detachViews怎么用?Java IVLCVout.detachViews使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.videolan.libvlc.IVLCVout
的用法示例。
在下文中一共展示了IVLCVout.detachViews方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: releasePlayer
import org.videolan.libvlc.IVLCVout; //导入方法依赖的package包/类
private void releasePlayer() {
if (libvlc == null)
return;
mMediaPlayer.stop();
final IVLCVout vout = mMediaPlayer.getVLCVout();
vout.removeCallback(this);
vout.detachViews();
shVideoHolder = null;
libvlc.release();
libvlc = null;
mVideoWidth = 0;
mVideoHeight = 0;
isVideoPlayerReady = false;
if (rlVideoControls != null && btnPlay != null) {
rlVideoControls.setVisibility(View.GONE);
btnPlay.setVisibility(View.GONE);
}
}
示例2: releasePlayer
import org.videolan.libvlc.IVLCVout; //导入方法依赖的package包/类
private void releasePlayer() {
if (libvlc == null)
return;
mMediaPlayer.stop();
final IVLCVout vout = mMediaPlayer.getVLCVout();
vout.removeCallback(this);
vout.detachViews();
holder = null;
libvlc.release();
libvlc = null;
mVideoWidth = 0;
mVideoHeight = 0;
}
示例3: releasePlayer
import org.videolan.libvlc.IVLCVout; //导入方法依赖的package包/类
private void releasePlayer() {
if (libvlc == null)
return;
mMediaPlayer.stop();
final IVLCVout vout = mMediaPlayer.getVLCVout();
vout.removeCallback(this);
vout.detachViews();
libvlc.release();
libvlc = null;
}
示例4: releasePlayer
import org.videolan.libvlc.IVLCVout; //导入方法依赖的package包/类
public void releasePlayer() {
if (mLibvlc == null) {
return;
}
mMediaPlayer.stop();
final IVLCVout vout = mMediaPlayer.getVLCVout();
vout.removeCallback(mCallback);
vout.detachViews();
mLibvlc.release();
mLibvlc = null;
mVideoWidth = 0;
mVideoHeight = 0;
mIsFirstBegin = true;
mPoint = -1;
}
示例5: doRelease
import org.videolan.libvlc.IVLCVout; //导入方法依赖的package包/类
public void doRelease() {
if (proxy != null)
proxy.stop();
if (libvlc == null)
return;
stop();
final IVLCVout vout = getVLCVout();
vout.removeCallback(nativeCallback);
vout.detachViews();
libvlc.release();
libvlc = null;
super.release();
}
示例6: stopPlayback
import org.videolan.libvlc.IVLCVout; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void stopPlayback() {
if (!mPlaybackStarted)
return;
LibVLC().setOnHardwareAccelerationError(null);
mPlaybackStarted = false;
mService.removeCallback(this);
final IVLCVout vlcVout = mService.getVLCVout();
vlcVout.removeCallback(this);
vlcVout.detachViews();
if(mSwitchingView && mService != null) {
Log.d(TAG, "mLocation = \"" + mUri + "\"");
mService.showWithoutParse(savedIndexPosition);
return;
}
mHandler.removeCallbacksAndMessages(null);
mSurfaceView.setKeepScreenOn(false);
if (mMediaRouter != null) {
// Stop listening for changes to media routes.
mediaRouterAddCallback(false);
}
final boolean isPaused = !mService.isPlaying();
long time = getTime();
long length = mService.getLength();
//remove saved position if in the last 5 seconds
if (length - time < 5000)
time = 0;
else
time -= 5000; // go back 5 seconds, to compensate loading time
mService.stop();
SharedPreferences.Editor editor = mSettings.edit();
// Save position
if (time >= 0 && mCanSeek) {
if(MediaDatabase.getInstance().mediaItemExists(mUri)) {
MediaDatabase.getInstance().updateMedia(
mUri,
MediaDatabase.mediaColumn.MEDIA_TIME,
time);
} else {
// Video file not in media library, store time just for onResume()
editor.putLong(PreferencesActivity.VIDEO_RESUME_TIME, time);
}
}
if(isPaused)
Log.d(TAG, "Video paused - saving flag");
editor.putBoolean(PreferencesActivity.VIDEO_PAUSED, isPaused);
// Save selected subtitles
String subtitleList_serialized = null;
if(mSubtitleSelectedFiles.size() > 0) {
Log.d(TAG, "Saving selected subtitle files");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(mSubtitleSelectedFiles);
subtitleList_serialized = bos.toString();
} catch(IOException e) {}
}
editor.putString(PreferencesActivity.VIDEO_SUBTITLE_FILES, subtitleList_serialized);
if (mUri != null)
editor.putString(PreferencesActivity.VIDEO_LAST, mUri.toString());
// Save user playback speed and restore normal speed
editor.putFloat(PreferencesActivity.VIDEO_SPEED, mService.getRate());
mService.setRate(1.0f);
Util.commitPreferences(editor);
if (AndroidUtil.isHoneycombOrLater() && mOnLayoutChangeListener != null)
mSurfaceFrame.removeOnLayoutChangeListener(mOnLayoutChangeListener);
}