Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
15bb8c9f
Commit
15bb8c9f
authored
Aug 25, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jvlc: multiple videos on a canvas sample added
parent
ed23e2fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
bindings/java/samples/client/src/main/java/MultipleVideosSample.java
...va/samples/client/src/main/java/MultipleVideosSample.java
+90
-0
No files found.
bindings/java/samples/client/src/main/java/MultipleVideosSample.java
0 → 100644
View file @
15bb8c9f
import
java.awt.Canvas
;
import
java.awt.Color
;
import
java.awt.Frame
;
import
java.awt.event.WindowAdapter
;
import
java.awt.event.WindowEvent
;
import
javax.swing.JPanel
;
import
org.videolan.jvlc.JVLC
;
/*****************************************************************************
* MultipleVideosSample.java: VLC Java Bindings
*****************************************************************************
* Copyright (C) 1998-2008 the VideoLAN team
*
* Authors: Filippo Carone <filippo@carone.org>
*
*
* $Id $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
public
class
MultipleVideosSample
{
private
static
int
videosNumber
=
6
;
private
static
String
filename
=
"/home/carone/a.avi"
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Frame
frame
=
new
java
.
awt
.
Frame
();
frame
.
setBounds
(
0
,
0
,
600
,
700
);
JPanel
jvcc
=
new
JPanel
();
Canvas
[]
videoCanvasesArray
=
new
Canvas
[
videosNumber
];
frame
.
add
(
jvcc
);
if
(
args
.
length
>
0
)
{
filename
=
args
[
0
];
}
for
(
int
i
=
0
;
i
<
videosNumber
;
i
++)
{
Canvas
jvlcCanvas
=
new
Canvas
();
videoCanvasesArray
[
i
]
=
jvlcCanvas
;
jvlcCanvas
.
setSize
(
200
,
200
);
jvlcCanvas
.
setBackground
(
new
Color
(
0x0
));
jvcc
.
add
(
jvlcCanvas
);
}
frame
.
addWindowListener
(
new
WindowAdapter
()
{
@Override
public
void
windowClosing
(
WindowEvent
ev
)
{
System
.
exit
(
0
);
}
});
frame
.
setVisible
(
true
);
JVLC
[]
jvlcArray
=
new
JVLC
[
videosNumber
];
for
(
int
i
=
0
;
i
<
videosNumber
;
i
++)
{
JVLC
jvlc
=
new
JVLC
();
jvlcArray
[
i
]
=
jvlc
;
jvlc
.
setVideoOutput
(
videoCanvasesArray
[
i
]);
}
for
(
int
i
=
0
;
i
<
videosNumber
;
i
++)
{
jvlcArray
[
i
].
play
(
filename
);
Thread
.
sleep
(
500
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment