Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
86e50bb4
Commit
86e50bb4
authored
Mar 31, 2006
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile typo fixed
VlcClient.java and VlcClient class now match.
parent
07d2edfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
63 deletions
+51
-63
bindings/java/Makefile.am
bindings/java/Makefile.am
+1
-1
bindings/java/VlcClient.java
bindings/java/VlcClient.java
+50
-62
No files found.
bindings/java/Makefile.am
View file @
86e50bb4
...
...
@@ -4,7 +4,7 @@
if
BUILD_JAVA
JVLC
OBJECTS
=
org/videolan/jvlc/JVLCCanvas.class org/videolan/jvlc/JVLCPanel.class org/videolan/jvlc/AudioIntf.class org/videolan/jvlc/InputIntf.class org/videolan/jvlc/PlaylistIntf.class org/videolan/jvlc/VideoIntf.class org/videolan/jvlc/VLMIntf.class org/videolan/jvlc/Playlist.class org/videolan/jvlc/JLibVLC.class org/videolan/jvlc/JVLC.class org/videolan/jvlc/SWTVideoWidget.class
OBJECTS
=
org/videolan/jvlc/JVLCCanvas.class org/videolan/jvlc/JVLCPanel.class org/videolan/jvlc/AudioIntf.class org/videolan/jvlc/InputIntf.class org/videolan/jvlc/PlaylistIntf.class org/videolan/jvlc/VideoIntf.class org/videolan/jvlc/VLMIntf.class org/videolan/jvlc/Playlist.class org/videolan/jvlc/JLibVLC.class org/videolan/jvlc/JVLC.class org/videolan/jvlc/SWTVideoWidget.class
JNIHEADERS
=
org_videolan_jvlc_JVLC.h org_videolan_jvlc_JVLCCanvas.h org_videolan_jvlc_JVLCPanel.h
...
...
bindings/java/VlcClient.java
View file @
86e50bb4
/*****************************************************************************
* JVLC.java: global class for vlc Java Bindings
*****************************************************************************
* Copyright (C) 1998-2004 the VideoLAN team
*
* $Id$
*
* Authors: Filippo Carone <filippo@carone.org>
*
* 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import
org.videolan.jvlc.*
;
import
java.awt.*
;
import
java.awt.event.*
;
import
java.awt.Frame
;
import
java.awt.event.WindowAdapter
;
import
java.awt.event.WindowEvent
;
import
org.videolan.jvlc.JVLCPanel
;
import
org.videolan.jvlc.JVLC
;
class
VLCPlayerFrame
extends
Frame
{
public
VLCPlayerFrame
()
{
...
...
@@ -33,28 +11,26 @@ class VLCPlayerFrame extends Frame {
}
private
void
initComponents
()
{
java
.
awt
.
GridBagConstraints
gridBagConstraints
;
fullScreenButton
=
new
javax
.
swing
.
JButton
();
jTextField1
=
new
javax
.
swing
.
JTextField
();
setButton
=
new
javax
.
swing
.
JButton
();
pauseButton
=
new
javax
.
swing
.
JButton
();
stopButton
=
new
javax
.
swing
.
JButton
();
java
.
awt
.
GridBagConstraints
gridBagConstraints
;
fullScreenButton
=
new
javax
.
swing
.
JButton
();
jTextField1
=
new
javax
.
swing
.
JTextField
();
setButton
=
new
javax
.
swing
.
JButton
();
pauseButton
=
new
javax
.
swing
.
JButton
();
stopButton
=
new
javax
.
swing
.
JButton
();
jvcc
=
new
JVLCCanvas
();
jvcc
.
setSize
(
100
,
100
);
jvlc
=
jvcc
.
getJVLCObject
();
jvcc
=
new
JVLCPanel
();
jvlc
=
jvcc
.
getJVLCObject
();
// FIXME: Does not work with GridBagLayout
setLayout
(
new
java
.
awt
.
GridBagLayout
());
setLayout
(
new
java
.
awt
.
GridBagLayout
());
gridBagConstraints
=
new
java
.
awt
.
GridBagConstraints
();
gridBagConstraints
.
gridwidth
=
java
.
awt
.
GridBagConstraints
.
REMAIND
ER
;
gridBagConstraints
.
gridwidth
=
java
.
awt
.
GridBagConstraints
.
CENT
ER
;
gridBagConstraints
.
gridx
=
0
;
gridBagConstraints
.
gridy
=
0
;
add
(
jvcc
,
gridBagConstraints
);
fullScreenButton
.
setText
(
"FullScreen"
);
fullScreenButton
.
addActionListener
(
new
java
.
awt
.
event
.
ActionListener
()
{
public
void
actionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
...
...
@@ -69,7 +45,7 @@ class VLCPlayerFrame extends Frame {
add
(
fullScreenButton
,
gridBagConstraints
);
jTextField1
.
setText
(
"
URL
"
);
jTextField1
.
setText
(
"
file:///home/little/a.avi
"
);
gridBagConstraints
=
new
java
.
awt
.
GridBagConstraints
();
gridBagConstraints
.
gridx
=
0
;
gridBagConstraints
.
gridy
=
1
;
...
...
@@ -114,27 +90,38 @@ class VLCPlayerFrame extends Frame {
gridBagConstraints
.
gridy
=
2
;
gridBagConstraints
.
fill
=
java
.
awt
.
GridBagConstraints
.
HORIZONTAL
;
add
(
stopButton
,
gridBagConstraints
);
pack
();
}
private
void
stopButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
jvlc
.
stop
();
try
{
//mci.stop(new Position(10000, PositionOrigin.ABSOLUTE, PositionKey.MEDIATIME));
jvlc
.
playlist
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
private
void
pauseButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
jvlc
.
pause
();
try
{
//System.out.println(mci.getMediaPosition(PositionOrigin.ABSOLUTE, PositionKey.BYTECOUNT));
jvlc
.
playlist
.
pause
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
private
void
setButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
jvlc
.
stop
();
jvlc
.
playlistClear
();
jvlc
.
addTarget
(
jTextField1
.
getText
(),
null
,
1
,
-
666
);
jvlc
.
play
();
jvlc
.
playlist
.
add
(
"file:///home/little/a.avi"
,
"a.avi"
);
jvlc
.
playlist
.
play
(-
1
,
null
);
}
private
void
fullScreenButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
jvlc
.
fullScreen
();
//
jvlc.fullScreen();
}
private
javax
.
swing
.
JButton
setButton
;
...
...
@@ -142,22 +129,23 @@ class VLCPlayerFrame extends Frame {
private
javax
.
swing
.
JButton
stopButton
;
private
javax
.
swing
.
JButton
fullScreenButton
;
private
javax
.
swing
.
JTextField
jTextField1
;
private
javax
.
swing
.
JPanel
jPanel
;
private
JVLCCanvas
jvcc
;
private
JVLCPanel
jvcc
;
public
JVLC
jvlc
;
//MediaControlInstance mci;
}
public
class
VlcClient
{
public
static
void
main
(
String
[]
args
)
{
Frame
f
=
new
VLCPlayerFrame
();
f
.
setBounds
(
0
,
0
,
500
,
500
);
f
.
addWindowListener
(
new
WindowAdapter
()
{
public
void
windowClosing
(
WindowEvent
ev
)
{
System
.
exit
(
0
);
}
}
);
f
.
setVisible
(
true
);
}
Frame
f
=
new
VLCPlayerFrame
();
f
.
setBounds
(
0
,
0
,
500
,
500
);
f
.
addWindowListener
(
new
WindowAdapter
()
{
public
void
windowClosing
(
WindowEvent
ev
)
{
System
.
exit
(
0
);
}
}
);
f
.
setVisible
(
true
);
}
}
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