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 {
36 public void paint(Graphics g) {
40 private final JVLC jvlc;
43 * Default constructor. The canvas is set a dimension of 200x200
48 jvlc.video.setActualCanvas(this);
52 public JVLCCanvas(String[] args) {
54 jvlc = new JVLC(args);
55 jvlc.video.setActualCanvas(this);
60 * @param width The initial canvas width
61 * @param height The initial canvas height
63 public JVLCCanvas(int width, int height) {
66 jvlc.video.setActualCanvas(this);
67 setSize(width, height);
70 public JVLCCanvas(String[] args, int width, int height) {
72 jvlc = new JVLC(args);
73 jvlc.video.setActualCanvas(this);
74 setSize(width, height);
77 public JVLCCanvas(JVLC jvlc) {
80 jvlc.video.setActualCanvas(this);
83 public JVLC getJVLC() {
88 * @see java.awt.Component#removeNotify()
90 public void removeNotify() {