fullscreen webcam vlcj
Posted: 26 Jul 2011 15:47
hello
i'm trying to get a fullscreen webcam capture but i don't succeed
ok, i see the capture in a 640*480 windowed capture with
i have found several ways to increase the size of the window:
but i don't get fullscreen, only 640*480
i can manually upsize the window clicking at the right up corner and i can have fullscreen with videos and pictures
in fact, from the moment the cam capture is displayed, whatever i do on the frame (resize, setlocation), nothing happens. The cam capture seems to be displayed in another frame, but how to reach it?
someone had this problem?
i'm trying to get a fullscreen webcam capture but i don't succeed
ok, i see the capture in a 640*480 windowed capture with
Code: Select all
mediaPlayer.playMedia("dshow://", ":dshow-size=640*480");
Code: Select all
mediaPlayer.addVideoOutputEventListener(new VideoOutputEventListener() {
@Override
public void videoOutputAvailable(MediaPlayer mediaPlayer, boolean videoOutput) {
if(videoOutput) {
Dimension size = mediaPlayer.getVideoDimension();
if(size != null) {
canvas.setSize(1024,768);
//canvas.setSize(size.width, size.height);
frame.pack();
}
}
}
});
Code: Select all
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(frame);
Code: Select all
frame.setDefaultLookAndFeelDecorated(true);
frame.setExtendedState(frame.MAXIMIZED_BOTH);
i can manually upsize the window clicking at the right up corner and i can have fullscreen with videos and pictures
in fact, from the moment the cam capture is displayed, whatever i do on the frame (resize, setlocation), nothing happens. The cam capture seems to be displayed in another frame, but how to reach it?
someone had this problem?