1 /*****************************************************************************
2 * JVLCCanvas.java: AWT Canvas containing VLC Video Output
3 *****************************************************************************
5 * Copyright (C) 1998-2006 the VideoLAN team
7 * Author: Filippo Carone <filippo@carone.org>
9 * Created on 25-nov-2005
13 * This program is free software; you can redistribute it
14 * and/or modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * You should have received a copy of the GNU General Public
24 * License along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
29 package org.videolan.jvlc;
31 import java.awt.Canvas;
32 import java.awt.Graphics;
34 public class JVLCCanvas extends Canvas {
39 private static final long serialVersionUID = -1888309778861586426L;
41 public void paint(Graphics g) {
45 private final JVLC jvlc;
48 * Default constructor. The canvas is set a dimension of 200x200
53 jvlc.video.setActualCanvas(this);
57 public JVLCCanvas(String[] args) {
59 jvlc = new JVLC(args);
60 jvlc.video.setActualCanvas(this);
65 * @param width The initial canvas width
66 * @param height The initial canvas height
68 public JVLCCanvas(int width, int height) {
71 jvlc.video.setActualCanvas(this);
72 setSize(width, height);
75 public JVLCCanvas(String[] args, int width, int height) {
77 jvlc = new JVLC(args);
78 jvlc.video.setActualCanvas(this);
79 setSize(width, height);
82 public JVLCCanvas(JVLC jvlc) {
85 jvlc.video.setActualCanvas(this);
88 public JVLC getJVLC() {
93 * @see java.awt.Component#removeNotify()
95 public void removeNotify() {