public MainFrame() { setTitle("MediaListPlayer Test"); setBounds(100, 100, 800, 600); JPanel contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); canvas.setBackground(Color.black); contentPane.add(canvas, BorderLayout.CENTER); setContentPane(contentPane); }
/** * Prepare windowed mode. * * @param output The output resolution * @throws LionEngineException If unable to initialize windowed mode. */ private void initWindowed(Resolution output) { final Canvas canvas = new Canvas(conf); canvas.setBackground(Color.BLACK); canvas.setEnabled(true); canvas.setVisible(true); canvas.setIgnoreRepaint(true); frame.add(canvas); canvas.setPreferredSize(new Dimension(output.getWidth(), output.getHeight())); frame.pack(); frame.setLocationRelativeTo(null); ToolsAwt.createBufferStrategy(canvas, conf); buf = canvas.getBufferStrategy(); // Set input listeners componentForKeyboard = canvas; componentForMouse = canvas; componentForCursor = frame; frame.validate(); }
public CaptureTest() { canvas = new Canvas(); canvas.setBackground(Color.black); contentPane = new JPanel(); contentPane.setBackground(Color.black); contentPane.setLayout(new BorderLayout()); contentPane.add(canvas, BorderLayout.CENTER); frame = new JFrame("Capture"); frame.setIconImage(new ImageIcon(getClass().getResource("/icons/vlcj-logo.png")).getImage()); frame.setContentPane(contentPane); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocation(50, 50); frame.setSize(800, 600); factory = new MediaPlayerFactory(); mediaPlayer = factory.mediaPlayers().newEmbeddedMediaPlayer(); videoSurface = factory.videoSurfaces().newVideoSurface(canvas); mediaPlayer.videoSurface().set(videoSurface); }
public ScreenTestPlayer() { canvas = new Canvas(); canvas.setBackground(Color.black); canvas.setSize(550, 300); contentPane = new JPanel(); contentPane.setBackground(Color.black); contentPane.setLayout(new BorderLayout()); contentPane.add(canvas, BorderLayout.CENTER); frame = new JFrame("vlcj desktop capture"); frame.setIconImage(new ImageIcon(getClass().getResource("/icons/vlcj-logo.png")).getImage()); frame.setContentPane(contentPane); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); factory = new MediaPlayerFactory(); mediaPlayer = factory.mediaPlayers().newEmbeddedMediaPlayer(); videoSurface = factory.videoSurfaces().newVideoSurface(canvas); mediaPlayer.videoSurface().set(videoSurface); }
canvas.setBackground(Color.lightGray);
public PlayerInstance(EmbeddedMediaPlayer mediaPlayer) { this.mediaPlayer = mediaPlayer; this.videoSurface = new Canvas(); this.videoSurface.setBackground(Color.black); mediaPlayer.events().addMediaPlayerEventListener(this); }
canvas.setBackground(display.getSystemColor(SWT.COLOR_DARK_GRAY)); canvas.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
canvas.setBackground(Color.black);
@SuppressWarnings("serial") public ExclusiveFullScreenTest(String[] args) { Canvas c = new Canvas(); c.setBackground(Color.red);
videoCanvas.setBackground(Color.red); videoCanvas.setSize(720, 350);
public static void main(String[] args) throws Exception { if(args.length != 1) { System.out.println("Specify a single MRL to stream"); System.exit(1); } String media = args[0]; String options = formatRtpStream("230.0.0.1", 5555); System.out.println("Streaming '" + media + "' to '" + options + "'"); MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(args); EmbeddedMediaPlayer mediaPlayer = mediaPlayerFactory.mediaPlayers().newEmbeddedMediaPlayer(); Canvas canvas = new Canvas(); canvas.setBackground(Color.black); VideoSurface videoSurface = mediaPlayerFactory.videoSurfaces().newVideoSurface(canvas); mediaPlayer.videoSurface().set(videoSurface); JFrame f = new JFrame("vlcj duplicate output test"); f.setIconImage(new ImageIcon(StreamRtpDuplicate.class.getResource("/icons/vlcj-logo.png")).getImage()); f.add(canvas); f.setSize(800, 600); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); mediaPlayer.media().play(media, options, ":no-sout-rtp-sap", ":no-sout-standard-sap", ":sout-all", ":sout-keep" ); // Don't exit Thread.currentThread().join(); }
public FullScreenMultiMediaTest(String[] args) { Canvas c = new Canvas(); c.setBackground(Color.black);
canvas.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
vs.setBackground(Color.black); cp.add(vs, BorderLayout.CENTER);
canvas.setBackground(Color.black);
public FullScreenTest(String[] args) { Canvas c = new Canvas(); c.setBackground(Color.black);
canvas.setBackground(Color.black);
canvas.setBackground(Color.black);
canvas.setBackground(Color.black); VideoSurface videoSurface = mediaPlayerFactory.videoSurfaces().newVideoSurface(canvas);
c.setBackground(Color.black); c.setBounds(0, 0, 1000, 900); o1.setBackground(Color.green); o1.setBounds(100, 60, 200, 300); o2.setBackground(Color.red); o2.setBounds(400, 200, 150, 150); o3.setBackground(Color.blue); o3.setBounds(50, 500, 200, 200);