本文整理汇总了Java中uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent类的典型用法代码示例。如果您正苦于以下问题:Java EmbeddedMediaPlayerComponent类的具体用法?Java EmbeddedMediaPlayerComponent怎么用?Java EmbeddedMediaPlayerComponent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EmbeddedMediaPlayerComponent类属于uk.co.caprica.vlcj.component包,在下文中一共展示了EmbeddedMediaPlayerComponent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: run
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
@Override
public void run() {
if (!Basemod.vlcLoaded)
return;
JFrame frame = new JFrame("vlcj Tutorial");
mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
frame.setContentPane(mediaPlayerComponent);
frame.setLocation(10000, 10000);
frame.setSize(0, 0);
frame.setVisible(true);
mediaPlayerComponent.getMediaPlayer().setPlaySubItems(true);//needed for some streams (youtube)
if (GuiRadio.radio == null || GuiRadio.radio.isLooping()) {
mediaPlayerComponent.getMediaPlayer().setRepeat(true);//enable loop ;D
} else {
mediaPlayerComponent.getMediaPlayer().setRepeat(false);
}
mediaPlayerComponent.getMediaPlayer().playMedia(this.streamURL);
frame.setVisible(false);
}
开发者ID:AnDwHaT5,项目名称:PixelUtilities,代码行数:27,代码来源:VLCPlayer.java
示例2: internalCreateNewVisualComponent
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
private void internalCreateNewVisualComponent(String [] prepareOptions) {
playerComponent = new EmbeddedMediaPlayerComponent();
player = playerComponent.getMediaPlayer();
player.addMediaPlayerEventListener(infoListener);
playerComponent.addHierarchyListener(new HierarchyListener() {
// This makes sure that when the player window becomes displayable
// (which is a subset of visible) the player shows some frame in it.
// This can't be done before that time.
public void hierarchyChanged(HierarchyEvent e) {
long flags = e.getChangeFlags() & (HierarchyEvent.PARENT_CHANGED);
if ((flags != 0) && e.getComponent().isDisplayable()) {
player.start();
player.pause();
}
}
});
// configure the player with the given media file
player.prepareMedia(mediaURL, prepareOptions);
player.parseMedia();
player.setEnableMouseInputHandling(false);
player.setEnableKeyInputHandling(false);
}
开发者ID:UiL-OTS-labs-backoffice,项目名称:UiL-OTS-Video-Coding-System,代码行数:26,代码来源:VLCMediaPlayer.java
示例3: VideoPanel
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
public VideoPanel(User user, GridFrame parent) {
super(user, parent,
user.getEntertainmentModule().getVideoModule().getFolderPath(),
FileExtensions.getVideoExtensions());
mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
filesPanel = new FilesPanel(user, files, this);
initComponents();
initCustomComponents();
}
开发者ID:scify,项目名称:TalkAndPlay,代码行数:11,代码来源:VideoPanel.java
示例4: MyVideoPanel
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
public MyVideoPanel() {
NativeLibrary.addSearchPath("libvlc", vlcWhere.getAbsolutePath());
EmbeddedMediaPlayerComponent videoCanvas =
new EmbeddedMediaPlayerComponent();
setLayout(new BorderLayout());
add(videoCanvas, BorderLayout.CENTER);
player = videoCanvas.getMediaPlayer();
}
开发者ID:shashanksingh28,项目名称:code-similarity,代码行数:9,代码来源:VlcjVideo.java
示例5: VideoPlayer
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
/**
* Constructor that creates the JFrame
*/
public VideoPlayer()
{
// Sets fullscreen
Toolkit tk = Toolkit.getDefaultToolkit();
int xsize = ((int) tk.getScreenSize().getWidth());
int ysize = ((int) tk.getScreenSize().getHeight());
this.setSize(xsize, ysize);
this.setExtendedState(MAXIMIZED_BOTH);
setUndecorated(false);
// Grabs mediaComponent to call functions on
this.mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
this.setContentPane(this.mediaPlayerComponent);
this.mediaPlayerComponent.getMediaPlayer().setSpu(-1);
// This is so we can implement our own windowAdapter
this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
setVisible(false);
pause();
}
});
this.isPaused = true;
this.isPlaying = false;
this.setVisible(false);
}
开发者ID:RyanDawkins,项目名称:glowing-spice,代码行数:34,代码来源:VideoPlayer.java
示例6: getMediaPlayer
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
public EmbeddedMediaPlayerComponent getMediaPlayer(){
return mediaPlayer;
}
开发者ID:Genesys890,项目名称:jTV,代码行数:4,代码来源:MediaPanel.java
示例7: convertVideoToImages
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
/**
* Converts the specified video file to a series of images and adds them to
* the given shared queue.
*
* @param f the video file
* @param singleImage whether just a single preview image is required
* @param sharedQueue the shared processing queue
* @throws IOException if there is a problem loading the media file
* @throws InterruptedException if loading is interupted
*/
public void convertVideoToImages(File f, boolean singleImage, final BlockingQueue<Image> sharedQueue, VideoLoadedLock videoLoadedLock) throws IOException, InterruptedException {
EmbeddedMediaPlayerComponent mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
JWindow frame = new JWindow();
frame.setBounds(0,0,1,1);
frame.add(mediaPlayerComponent);
frame.setVisible(true);
final MediaPlayer player = mediaPlayerComponent.getMediaPlayer();
player.mute();
player.playMedia(f.getAbsolutePath());
long len = player.getLength();
if (len == 0) {
Thread.sleep(MEDIA_PRELOAD_WAIT);
len = player.getLength();
}
int singleImageSelectionTime = -1;
if (singleImage) {
singleImageSelectionTime = new Random().nextInt(RANDOM_INTRO_WAIT) + MINIMUM_INTRO_WAIT;
if (singleImageSelectionTime > len) {
singleImageSelectionTime = (int) len-1;
}
}
frame.setVisible(false);
log.debug("Player time: {}, Len: {}", player.getTime(), len);
videoLoadedLock.preloadFinished();
try {
while (player.getTime() < len) {
if (cancel) {
break;
}
// Always add images if we don't want a single preview
// image or when the time exceeds the point we want a
// single image from
if (singleImageSelectionTime == -1 || player.getTime() >= singleImageSelectionTime) {
sharedQueue.add(player.getSnapshot());
// We only want one image if single image selection
// is turned on
if (singleImageSelectionTime != -1 && player.getTime() >= singleImageSelectionTime) {
break;
}
}
}
} finally {
player.stop();
player.release();
mediaPlayerComponent.release();
cancel = false;
}
}
开发者ID:KodeMunkie,项目名称:imagetozxspec,代码行数:61,代码来源:VLCVideoImportEngine.java
示例8: getMediaPlayerComponent
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
public EmbeddedMediaPlayerComponent getMediaPlayerComponent() {
return this.mediaPlayerComponent;
}
开发者ID:scify,项目名称:TalkAndPlay,代码行数:4,代码来源:VideoPanel.java
示例9: inicializarVLCJ
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
private void inicializarVLCJ() {
cargaLibreria();
mediaPlayer = new EmbeddedMediaPlayerComponent();
}
开发者ID:sfaci,项目名称:vlcj,代码行数:6,代码来源:HolaVLCJ.java
示例10: getMpc
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; //导入依赖的package包/类
private EmbeddedMediaPlayerComponent getMpc() {
synchronized (fsSyncObject) {
return mpC;
}
}
开发者ID:dipacs,项目名称:Viwib,代码行数:6,代码来源:MainFrame.java
注:本文中的uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论