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


Java IVLCVout.removeCallback方法代码示例

本文整理汇总了Java中org.videolan.libvlc.IVLCVout.removeCallback方法的典型用法代码示例。如果您正苦于以下问题:Java IVLCVout.removeCallback方法的具体用法?Java IVLCVout.removeCallback怎么用?Java IVLCVout.removeCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.videolan.libvlc.IVLCVout的用法示例。


在下文中一共展示了IVLCVout.removeCallback方法的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);
    }
}
 
开发者ID:KKorvin,项目名称:uPods-android,代码行数:21,代码来源:FragmentVideoPlayer.java

示例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;
}
 
开发者ID:Truiton,项目名称:RTMPPlayer,代码行数:15,代码来源:MainActivity.java

示例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;
}
 
开发者ID:ashqal,项目名称:MD-vlc-sample,代码行数:11,代码来源:VLCVideoActivity.java

示例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;
}
 
开发者ID:Mtlun,项目名称:LunVlc,代码行数:16,代码来源:CustomVLCVideoView.java

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

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


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