本文整理汇总了Java中org.videolan.libvlc.EventHandler.MediaPlayerVout方法的典型用法代码示例。如果您正苦于以下问题:Java EventHandler.MediaPlayerVout方法的具体用法?Java EventHandler.MediaPlayerVout怎么用?Java EventHandler.MediaPlayerVout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.videolan.libvlc.EventHandler
的用法示例。
在下文中一共展示了EventHandler.MediaPlayerVout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleMessage
import org.videolan.libvlc.EventHandler; //导入方法依赖的package包/类
@Override
public void handleMessage(Message msg) {
VideoPlayerActivity activity = getOwner();
if(activity == null) return;
// Do not handle events if we are leaving the VideoPlayerActivity
if (activity.mSwitchingView) return;
switch (msg.getData().getInt("event")) {
case EventHandler.MediaParsedChanged:
Log.i(TAG, "MediaParsedChanged");
if (activity.mLibVLC.getVideoTracksCount() < 1) {
Log.i(TAG, "No video track, open in audio mode");
activity.switchToAudioMode();
}
break;
case EventHandler.MediaPlayerPlaying:
Log.i(TAG, "MediaPlayerPlaying");
activity.stopLoadingAnimation();
activity.showOverlay();
/** FIXME: update the track list when it changes during the
* playback. (#7540) */
activity.setESTrackLists(true);
activity.setESTracks();
activity.changeAudioFocus(true);
break;
case EventHandler.MediaPlayerPaused:
Log.i(TAG, "MediaPlayerPaused");
break;
case EventHandler.MediaPlayerStopped:
Log.i(TAG, "MediaPlayerStopped");
activity.changeAudioFocus(false);
break;
case EventHandler.MediaPlayerEndReached:
Log.i(TAG, "MediaPlayerEndReached");
activity.changeAudioFocus(false);
activity.endReached();
break;
case EventHandler.MediaPlayerVout:
activity.handleVout(msg);
break;
case EventHandler.MediaPlayerPositionChanged:
if (!activity.mCanSeek)
activity.mCanSeek = true;
//don't spam the logs
break;
case EventHandler.MediaPlayerEncounteredError:
Log.i(TAG, "MediaPlayerEncounteredError");
activity.encounteredError();
break;
case EventHandler.HardwareAccelerationError:
Log.i(TAG, "HardwareAccelerationError");
activity.handleHardwareAccelerationError();
break;
default:
Log.e(TAG, String.format("Event not handled (0x%x)", msg.getData().getInt("event")));
break;
}
activity.updateOverlayPausePlay();
}
示例2: handleMessage
import org.videolan.libvlc.EventHandler; //导入方法依赖的package包/类
@Override
public void handleMessage(Message msg) {
VideoPlayerActivity activity = getOwner();
if(activity == null) return;
// Do not handle events if we are leaving the VideoPlayerActivity
if (activity.mSwitchingView) return;
switch (msg.getData().getInt("event")) {
case EventHandler.MediaParsedChanged:
Log.i(TAG, "MediaParsedChanged");
activity.updateNavStatus();
if (!activity.mHasMenu && activity.mLibVLC.getVideoTracksCount() < 1) {
Log.i(TAG, "No video track, open in audio mode");
activity.switchToAudioMode();
}
break;
case EventHandler.MediaPlayerPlaying:
Log.i(TAG, "MediaPlayerPlaying");
activity.stopLoadingAnimation();
activity.showOverlay();
/** FIXME: update the track list when it changes during the
* playback. (#7540) */
activity.setESTrackLists(true);
activity.setESTracks();
activity.changeAudioFocus(true);
activity.updateNavStatus();
break;
case EventHandler.MediaPlayerPaused:
Log.i(TAG, "MediaPlayerPaused");
break;
case EventHandler.MediaPlayerStopped:
Log.i(TAG, "MediaPlayerStopped");
activity.changeAudioFocus(false);
break;
case EventHandler.MediaPlayerEndReached:
Log.i(TAG, "MediaPlayerEndReached");
activity.changeAudioFocus(false);
activity.endReached();
break;
case EventHandler.MediaPlayerVout:
activity.updateNavStatus();
if (!activity.mHasMenu)
activity.handleVout(msg);
break;
case EventHandler.MediaPlayerPositionChanged:
if (!activity.mCanSeek)
activity.mCanSeek = true;
//don't spam the logs
break;
case EventHandler.MediaPlayerEncounteredError:
Log.i(TAG, "MediaPlayerEncounteredError");
activity.encounteredError();
break;
case EventHandler.HardwareAccelerationError:
Log.i(TAG, "HardwareAccelerationError");
activity.handleHardwareAccelerationError();
break;
default:
Log.e(TAG, String.format("Event not handled (0x%x)", msg.getData().getInt("event")));
break;
}
activity.updateOverlayPausePlay();
}
示例3: handleMessage
import org.videolan.libvlc.EventHandler; //导入方法依赖的package包/类
@Override
public void handleMessage(Message msg) {
VideoPlayerActivity activity = getOwner();
if (activity == null)
return;
switch (msg.getData().getInt("event")) {
case EventHandler.MediaPlayerPlaying:
Log.i(TAG, "MediaPlayerPlaying");
activity.showOverlay();
/**
* FIXME: update the track list when it changes during the
* playback. (#7540)
*/
// TRIBLER
if (VideoPlayerActivity.initCompleted
&& VideoPlayerActivity.seekBufferCompleted) {
activity.setESTrackLists(true);
activity.setESTracks();
activity.changeAudioFocus(true);
}
break;
case EventHandler.MediaPlayerPaused:
Log.i(TAG, "MediaPlayerPaused");
break;
case EventHandler.MediaPlayerStopped:
Log.i(TAG, "MediaPlayerStopped");
activity.changeAudioFocus(false);
break;
case EventHandler.MediaPlayerEndReached:
Log.i(TAG, "MediaPlayerEndReached");
// activity.changeAudioFocus(false);
activity.endReached();
break;
case EventHandler.MediaPlayerVout:
activity.handleVout(msg);
break;
case EventHandler.MediaPlayerPositionChanged:
if (!activity.mCanSeek)
activity.mCanSeek = true;
// don't spam the logs
break;
case EventHandler.MediaPlayerEncounteredError:
Log.i(TAG, "MediaPlayerEncounteredError");
activity.encounteredError();
break;
default:
Log.e(TAG, String.format("Event not handled (0x%x)", msg
.getData().getInt("event")));
break;
}
activity.updateOverlayPausePlay();
}