|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsears.tools.player.VLCPlayer
public class VLCPlayer
Class VLCPlayer.
Summary:
This class implements the PlayerInterface, and is designed to control the vlc software.
VLC is controled through its http server mode.
You can found vlc at http://www.videolan.org/
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_VLC_PATH_LINUX
default VLC path in Window os |
static java.lang.String |
DEFAULT_VLC_PATH_MAC
default VLC path on Mac OS X os |
static java.lang.String |
DEFAULT_VLC_PATH_WINDOWS
default VLC path in Linux os |
static java.lang.String |
DEFAULT_VLC_RESTART
The default VLC restart parameter |
static java.lang.String |
vlcParameter
The VLC parameter which is used to exec VLC player |
Constructor Summary | |
---|---|
VLCPlayer()
Method constructor. |
|
VLCPlayer(java.lang.String hostName,
int portNumber)
Method constructor. |
Method Summary | |
---|---|
int |
getLength()
Method getLength Summary: This method permit to get the video time length(in seconds). |
int |
getPosition()
Method getPosition Summary: This method permit to get the current position (in seconds) in the video. |
void |
goToOffset(int offset)
Empty method |
void |
pause()
Method pause Summary: Pause the video. |
void |
play(java.lang.String videoFile,
java.lang.String subtitleFile)
Method play Summary: Use it to launch a video, with its subtitles. |
void |
quit()
Method quit Summary: This method allows to kill the player. |
void |
setPosition(int offset)
Method setPosition Summary: This method permit to shift to the correct offset (in s) in the video. |
void |
stop()
Method stop Summary: stop the video. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String vlcParameter
public static final java.lang.String DEFAULT_VLC_RESTART
public static final java.lang.String DEFAULT_VLC_PATH_MAC
public static final java.lang.String DEFAULT_VLC_PATH_LINUX
public static final java.lang.String DEFAULT_VLC_PATH_WINDOWS
Constructor Detail |
---|
public VLCPlayer(java.lang.String hostName, int portNumber) throws PlayerException
hostName
- The String hostname to connect to VLCportNumber
- The int port number to connect to VLC
PlayerException
- if an error occurspublic VLCPlayer() throws PlayerException
PlayerException
- if an error occursMethod Detail |
---|
public void play(java.lang.String videoFile, java.lang.String subtitleFile) throws PlayerException
PlayerInterface
play
in interface PlayerInterface
videoFile
- The path to the videoFile.subtitleFile
- The path to the subtitleFile.
PlayerException
- if an error occurspublic void goToOffset(int offset) throws PlayerException
offset
- the offset
PlayerException
- if an error occurspublic void quit()
PlayerInterface
quit
in interface PlayerInterface
public int getPosition() throws PlayerException
PlayerInterface
getPosition
in interface PlayerInterface
PlayerException
- if an error occurspublic int getLength() throws PlayerException
PlayerInterface
getLength
in interface PlayerInterface
PlayerException
- if an error occurspublic void pause() throws PlayerException
PlayerInterface
pause
in interface PlayerInterface
PlayerException
- if an error occurspublic void stop() throws PlayerException
PlayerInterface
stop
in interface PlayerInterface
PlayerException
- if an error occurspublic void setPosition(int offset) throws PlayerException
PlayerInterface
setPosition
in interface PlayerInterface
offset
- The offset in the video to go.
PlayerException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |