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
89187b02
Commit
89187b02
authored
Sep 26, 2009
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jvlc: LibVlc class updated and code aligned to current native libvlc
parent
54aa31e6
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
586 additions
and
267 deletions
+586
-267
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
+2
-4
bindings/java/core/src/main/java/org/videolan/jvlc/Logger.java
...ngs/java/core/src/main/java/org/videolan/jvlc/Logger.java
+3
-6
bindings/java/core/src/main/java/org/videolan/jvlc/LoggerIterator.java
.../core/src/main/java/org/videolan/jvlc/LoggerIterator.java
+2
-4
bindings/java/core/src/main/java/org/videolan/jvlc/MediaDescriptor.java
...core/src/main/java/org/videolan/jvlc/MediaDescriptor.java
+2
-1
bindings/java/core/src/main/java/org/videolan/jvlc/Video.java
...ings/java/core/src/main/java/org/videolan/jvlc/Video.java
+12
-28
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
...core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
+340
-186
bindings/java/core/src/main/java/org/videolan/jvlc/internal/MediaOption.java
...src/main/java/org/videolan/jvlc/internal/MediaOption.java
+35
-0
bindings/java/core/src/main/java/org/videolan/jvlc/internal/Meta.java
...a/core/src/main/java/org/videolan/jvlc/internal/Meta.java
+50
-0
bindings/java/core/src/main/java/org/videolan/jvlc/internal/PlaybackMode.java
...rc/main/java/org/videolan/jvlc/internal/PlaybackMode.java
+36
-0
bindings/java/core/src/main/java/org/videolan/jvlc/internal/VideoMarqueeIntOption.java
...ava/org/videolan/jvlc/internal/VideoMarqueeIntOption.java
+42
-0
bindings/java/core/src/main/java/org/videolan/jvlc/internal/VideoMarqueeStringOption.java
.../org/videolan/jvlc/internal/VideoMarqueeStringOption.java
+34
-0
bindings/java/core/src/test/java/org/videolan/jvlc/internal/AbstractVLCInternalTest.java
...a/org/videolan/jvlc/internal/AbstractVLCInternalTest.java
+1
-2
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcLogTest.java
...c/test/java/org/videolan/jvlc/internal/LibVlcLogTest.java
+5
-6
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaEventsTest.java
...ava/org/videolan/jvlc/internal/LibVlcMediaEventsTest.java
+0
-1
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaTest.java
...test/java/org/videolan/jvlc/internal/LibVlcMediaTest.java
+2
-2
bindings/java/samples/client/src/main/java/VlcClient.java
bindings/java/samples/client/src/main/java/VlcClient.java
+20
-27
No files found.
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
View file @
89187b02
...
...
@@ -110,15 +110,13 @@ public class JVLC
public
LoggerVerbosityLevel
getLogVerbosity
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
int
level
=
libvlc
.
libvlc_get_log_verbosity
(
instance
,
exception
);
int
level
=
libvlc
.
libvlc_get_log_verbosity
(
instance
);
return
LoggerVerbosityLevel
.
getSeverity
(
level
);
}
public
void
setLogVerbosity
(
LoggerVerbosityLevel
level
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_set_log_verbosity
(
instance
,
level
.
ordinal
(),
exception
);
libvlc
.
libvlc_set_log_verbosity
(
instance
,
level
.
ordinal
());
}
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/Logger.java
View file @
89187b02
...
...
@@ -54,20 +54,17 @@ public class Logger
public
void
clear
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_log_clear
(
logInstance
,
exception
);
libvlc
.
libvlc_log_clear
(
logInstance
);
}
public
void
close
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_log_close
(
logInstance
,
exception
);
libvlc
.
libvlc_log_close
(
logInstance
);
}
public
int
count
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_log_count
(
logInstance
,
exception
);
return
libvlc
.
libvlc_log_count
(
logInstance
);
}
public
Iterator
<
LoggerMessage
>
iterator
()
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/LoggerIterator.java
View file @
89187b02
...
...
@@ -53,8 +53,7 @@ public class LoggerIterator implements Iterator<LoggerMessage>
*/
public
boolean
hasNext
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
logger
.
libvlc
.
libvlc_log_iterator_has_next
(
logIterator
,
exception
)
!=
0
;
return
logger
.
libvlc
.
libvlc_log_iterator_has_next
(
logIterator
)
!=
0
;
}
/**
...
...
@@ -84,8 +83,7 @@ public class LoggerIterator implements Iterator<LoggerMessage>
@Override
protected
void
finalize
()
throws
Throwable
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
logger
.
libvlc
.
libvlc_log_iterator_free
(
logIterator
,
exception
);
logger
.
libvlc
.
libvlc_log_iterator_free
(
logIterator
);
super
.
finalize
();
}
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/MediaDescriptor.java
View file @
89187b02
...
...
@@ -68,7 +68,8 @@ public class MediaDescriptor
public
String
getMrl
()
{
return
libvlc
.
libvlc_media_get_mrl
(
instance
);
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_media_get_mrl
(
instance
,
exception
);
}
public
MediaPlayer
getMediaPlayer
()
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/Video.java
View file @
89187b02
...
...
@@ -31,28 +31,24 @@ package org.videolan.jvlc;
import
java.awt.Dimension
;
import
org.videolan.jvlc.internal.LibVlc
;
import
org.videolan.jvlc.internal.LibVlc.LibVlcInstance
;
import
org.videolan.jvlc.internal.LibVlc.libvlc_exception_t
;
public
class
Video
{
private
final
LibVlcInstance
libvlcInstance
;
private
final
LibVlc
libvlc
;
public
Video
(
JVLC
jvlc
)
{
this
.
libvlcInstance
=
jvlc
.
getInstance
();
this
.
libvlc
=
jvlc
.
getLibvlc
();
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#destroyVideo()
/** (non-Javadoc)
* @deprecated
* @since
*/
public
void
destroyVideo
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_video_destroy
(
media
.
getInstance
(),
exception
);
return
;
}
/* (non-Javadoc)
...
...
@@ -87,48 +83,36 @@ public class Video
return
libvlc
.
libvlc_video_get_width
(
media
.
getInstance
(),
exception
);
}
/*
(non-Javadoc)
* @
see org.videolan.jvlc.VideoIntf#reparentVideo(java.awt.Component)
/*
*
* @
deprecated
*/
public
void
reparent
(
MediaPlayer
media
,
java
.
awt
.
Canvas
canvas
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
long
drawable
=
com
.
sun
.
jna
.
Native
.
getComponentID
(
canvas
);
libvlc
.
libvlc_video_reparent
(
media
.
getInstance
(),
drawable
,
exception
);
}
/*
(non-Javadoc)
* @
see org.videolan.jvlc.VideoIntf#resizeVideo(int, int)
/*
*
* @
deprecated
*/
public
void
setSize
(
int
width
,
int
height
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_video_set_size
(
libvlcInstance
,
width
,
height
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#setFullscreen(boolean)
*/
public
void
setFullscreen
(
MediaPlayer
media
,
boolean
fullscreen
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_set_fullscreen
(
media
.
getInstance
(),
fullscreen
?
1
:
0
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#toggleFullscreen()
*/
public
void
toggleFullscreen
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_toggle_fullscreen
(
media
.
getInstance
(),
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getSize()
*/
public
Dimension
getSize
(
MediaPlayer
media
)
{
return
new
Dimension
(
getWidth
(
media
),
getHeight
(
media
));
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#setSize(java.awt.Dimension)
/**
* @param d
* @deprecated
*/
public
void
setSize
(
Dimension
d
)
{
setSize
(
d
.
width
,
d
.
height
);
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
View file @
89187b02
This diff is collapsed.
Click to expand it.
bindings/java/core/src/main/java/org/videolan/jvlc/internal/MediaOption.java
0 → 100644
View file @
89187b02
/*****************************************************************************
* VLC Java Bindings JNA Glue
*****************************************************************************
* Copyright (C) 1998-2009 the VideoLAN team
*
* Authors: Filippo Carone <filippo@carone.org>
* VLC bindings generator
*
*
* $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.
*****************************************************************************/
package
org.videolan.jvlc.internal
;
public
enum
MediaOption
{
libvlc_media_option_trusted
,
// 0x2,
libvlc_media_option_unique
,
// 0x100,
}
bindings/java/core/src/main/java/org/videolan/jvlc/internal/Meta.java
0 → 100644
View file @
89187b02
/*****************************************************************************
* VLC Java Bindings JNA Glue
*****************************************************************************
* Copyright (C) 1998-2009 the VideoLAN team
*
* Authors: Filippo Carone <filippo@carone.org>
* VLC bindings generator
*
*
* $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.
*****************************************************************************/
package
org.videolan.jvlc.internal
;
public
enum
Meta
{
libvlc_meta_Title
,
// 0,
libvlc_meta_Artist
,
// 1,
libvlc_meta_Genre
,
// 2,
libvlc_meta_Copyright
,
// 3,
libvlc_meta_Album
,
// 4,
libvlc_meta_TrackNumber
,
// 5,
libvlc_meta_Description
,
// 6,
libvlc_meta_Rating
,
// 7,
libvlc_meta_Date
,
// 8,
libvlc_meta_Setting
,
// 9,
libvlc_meta_URL
,
// 10,
libvlc_meta_Language
,
// 11,
libvlc_meta_NowPlaying
,
// 12,
libvlc_meta_Publisher
,
// 13,
libvlc_meta_EncodedBy
,
// 14,
libvlc_meta_ArtworkURL
,
// 15,
libvlc_meta_TrackID
,
// 16,
}
bindings/java/core/src/main/java/org/videolan/jvlc/internal/PlaybackMode.java
0 → 100644
View file @
89187b02
/*****************************************************************************
* VLC Java Bindings JNA Glue
*****************************************************************************
* Copyright (C) 1998-2009 the VideoLAN team
*
* Authors: Filippo Carone <filippo@carone.org>
* VLC bindings generator
*
*
* $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.
*****************************************************************************/
package
org.videolan.jvlc.internal
;
public
enum
PlaybackMode
{
libvlc_playback_mode_default
,
// 0,
libvlc_playback_mode_loop
,
// 1,
libvlc_playback_mode_repeat
,
// 2,
}
bindings/java/core/src/main/java/org/videolan/jvlc/internal/VideoMarqueeIntOption.java
0 → 100644
View file @
89187b02
/*****************************************************************************
* VLC Java Bindings JNA Glue
*****************************************************************************
* Copyright (C) 1998-2009 the VideoLAN team
*
* Authors: Filippo Carone <filippo@carone.org>
* VLC bindings generator
*
*
* $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.
*****************************************************************************/
package
org.videolan.jvlc.internal
;
public
enum
VideoMarqueeIntOption
{
libvlc_marquee_Enabled
,
// 0,
libvlc_marquee_Color
,
// 1,
libvlc_marquee_Opacity
,
// 2,
libvlc_marquee_Position
,
// 3,
libvlc_marquee_Refresh
,
// 4,
libvlc_marquee_Size
,
// 5,
libvlc_marquee_Timeout
,
// 6,
libvlc_marquee_X
,
// 7,
libvlc_marquee_Y
,
// 8,
}
bindings/java/core/src/main/java/org/videolan/jvlc/internal/VideoMarqueeStringOption.java
0 → 100644
View file @
89187b02
/*****************************************************************************
* VLC Java Bindings JNA Glue
*****************************************************************************
* Copyright (C) 1998-2009 the VideoLAN team
*
* Authors: Filippo Carone <filippo@carone.org>
* VLC bindings generator
*
*
* $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.
*****************************************************************************/
package
org.videolan.jvlc.internal
;
public
enum
VideoMarqueeStringOption
{
libvlc_marquee_Text
,
// 0,
}
bindings/java/core/src/test/java/org/videolan/jvlc/internal/AbstractVLCInternalTest.java
View file @
89187b02
...
...
@@ -91,8 +91,7 @@ public abstract class AbstractVLCInternalTest
protected
void
catchException
(
libvlc_exception_t
exception
)
{
Assert
.
assertEquals
(
libvlc
.
libvlc_exception_get_message
(
exception
),
0
,
libvlc
.
libvlc_exception_raised
(
exception
));
Assert
.
assertEquals
(
libvlc
.
libvlc_errmsg
(),
0
,
libvlc
.
libvlc_exception_raised
(
exception
));
}
private
void
downloadSample
()
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcLogTest.java
View file @
89187b02
...
...
@@ -48,7 +48,7 @@ public class LibVlcLogTest extends AbstractVLCInternalTest
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcLog
libvlcLog
=
libvlc
.
libvlc_log_open
(
libvlcInstance
,
exception
);
libvlc
.
libvlc_log_close
(
libvlcLog
,
exception
);
libvlc
.
libvlc_log_close
(
libvlcLog
);
Assert
.
assertEquals
(
0
,
exception
.
b_raised
);
}
...
...
@@ -57,9 +57,8 @@ public class LibVlcLogTest extends AbstractVLCInternalTest
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcLog
libvlcLog
=
libvlc
.
libvlc_log_open
(
libvlcInstance
,
exception
);
libvlc
.
libvlc_log_clear
(
libvlcLog
,
exception
);
Assert
.
assertEquals
(
0
,
exception
.
b_raised
);
Assert
.
assertEquals
(
0
,
libvlc
.
libvlc_log_count
(
libvlcLog
,
exception
));
libvlc
.
libvlc_log_clear
(
libvlcLog
);
Assert
.
assertEquals
(
0
,
libvlc
.
libvlc_log_count
(
libvlcLog
));
}
//@Test
...
...
@@ -67,9 +66,9 @@ public class LibVlcLogTest extends AbstractVLCInternalTest
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcLog
libvlcLog
=
libvlc
.
libvlc_log_open
(
libvlcInstance
,
exception
);
libvlc
.
libvlc_log_clear
(
libvlcLog
,
exception
);
libvlc
.
libvlc_log_clear
(
libvlcLog
);
Assert
.
assertEquals
(
0
,
exception
.
b_raised
);
Assert
.
assertEquals
(
0
,
libvlc
.
libvlc_log_count
(
libvlcLog
,
exception
));
Assert
.
assertEquals
(
0
,
libvlc
.
libvlc_log_count
(
libvlcLog
));
LibVlcLogIterator
logIterator
=
libvlc
.
libvlc_log_get_iterator
(
libvlcLog
,
exception
);
Assert
.
assertNotNull
(
logIterator
);
}
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaEventsTest.java
View file @
89187b02
...
...
@@ -27,7 +27,6 @@ package org.videolan.jvlc.internal;
import
junit.framework.Assert
;
import
org.junit.After
;
import
org.junit.Test
;
import
org.videolan.jvlc.internal.LibVlc.LibVlcCallback
;
import
org.videolan.jvlc.internal.LibVlc.LibVlcEventManager
;
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaTest.java
View file @
89187b02
...
...
@@ -50,7 +50,7 @@ public class LibVlcMediaTest extends AbstractVLCInternalTest
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
String
mdMrl
=
libvlc
.
libvlc_media_get_mrl
(
md
);
String
mdMrl
=
libvlc
.
libvlc_media_get_mrl
(
md
,
exception
);
Assert
.
assertEquals
(
mrl
,
mdMrl
);
}
...
...
@@ -61,7 +61,7 @@ public class LibVlcMediaTest extends AbstractVLCInternalTest
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
LibVlcMedia
md2
=
libvlc
.
libvlc_media_duplicate
(
md
);
Assert
.
assertNotSame
(
md
.
getPointer
(),
md2
.
getPointer
());
Assert
.
assertEquals
(
libvlc
.
libvlc_media_get_mrl
(
md2
),
libvlc
.
libvlc_media_get_mrl
(
md
));
Assert
.
assertEquals
(
libvlc
.
libvlc_media_get_mrl
(
md2
,
exception
),
libvlc
.
libvlc_media_get_mrl
(
md
,
exception
));
}
@Test
...
...
bindings/java/samples/client/src/main/java/VlcClient.java
View file @
89187b02
...
...
@@ -31,17 +31,21 @@ import java.awt.event.WindowEvent;
import
javax.swing.JPanel
;
import
org.videolan.jvlc.JVLC
;
import
org.videolan.jvlc.Playlist
;
import
org.videolan.jvlc.VLCException
;
import
org.videolan.jvlc.MediaPlayer
;
class
VLCPlayerFrame
extends
Frame
{
private
Playlist
playlist
;
/**
*
*/
private
static
final
long
serialVersionUID
=
-
7471950211795850421L
;
public
Canvas
jvcanvas
;
private
MediaPlayer
mediaPlayer
;
public
VLCPlayerFrame
(
String
[]
args
)
{
initComponents
(
args
);
...
...
@@ -62,11 +66,10 @@ class VLCPlayerFrame extends Frame
jvcanvas
=
new
java
.
awt
.
Canvas
();
jvcanvas
.
setSize
(
200
,
200
);
jvcc
.
add
(
jvcanvas
);
jvlc
=
new
JVLC
(
args
);
jvlc
.
setVideoOutput
(
jvcanvas
);
playlist
=
new
Playlist
(
jvlc
);
setLayout
(
new
java
.
awt
.
GridBagLayout
());
gridBagConstraints
=
new
java
.
awt
.
GridBagConstraints
();
...
...
@@ -150,41 +153,31 @@ class VLCPlayerFrame extends Frame
private
void
stopButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
try
{
playlist
.
stop
();
}
catch
(
Exception
e
)
if
(
mediaPlayer
==
null
)
{
e
.
printStackTrace
()
;
return
;
}
mediaPlayer
.
stop
();
}
private
void
pauseButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
try
{
playlist
.
togglePause
();
}
catch
(
Exception
e
)
if
(
mediaPlayer
==
null
)
{
e
.
printStackTrace
()
;
return
;
}
mediaPlayer
.
pause
();
}
private
void
setButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
try
{
jvlc
.
setVideoOutput
(
jvcanvas
);
playlist
.
add
(
jTextField1
.
getText
(),
"a.avi"
);
playlist
.
play
();
}
catch
(
VLCException
e
)
if
(
mediaPlayer
!=
null
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
mediaPlayer
.
stop
();
mediaPlayer
.
release
();
jvcanvas
=
new
java
.
awt
.
Canvas
();
}
mediaPlayer
=
jvlc
.
play
(
jTextField1
.
getText
());
}
private
void
fullScreenButtonActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
...
...
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