chrriis.dj.nativeswing.swtimpl.components
Class VLCVideo

java.lang.Object
  extended by chrriis.dj.nativeswing.swtimpl.components.VLCVideo

public class VLCVideo
extends Object

A VLC object responsible for video-related actions.

Author:
Christopher Deckers

Nested Class Summary
static class VLCVideo.VLCAspectRatio
          An aspect ratio.
 
Method Summary
 VLCVideo.VLCAspectRatio getAspectRatio()
          Get the aspect ratio of the video media.
 int getHeight()
          Get the height of the video.
 int getSubtitleTrack()
          Get the track of the subtitles.
 int getWidth()
          Get the width of the video.
 boolean isFullScreen()
          Indicate whether the video is in full screen mode.
 void setAspectRatio(VLCVideo.VLCAspectRatio aspectRatio)
          Set the aspect ration of the video.
 void setFullScreen(boolean isFullScreen)
          Set whether the video is playing in full screen mode.
 void setSubtitleTrack(int subtitleTrack)
          Set the track of the subtitles.
 void toggleFullScreen()
          Toggle full screen mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWidth

public int getWidth()
Get the width of the video.

Returns:
the width, or -1 in case of failure.

getHeight

public int getHeight()
Get the height of the video.

Returns:
the height, or -1 in case of failure.

setFullScreen

public void setFullScreen(boolean isFullScreen)
Set whether the video is playing in full screen mode.

Parameters:
isFullScreen - true if the full screen mode should be active, false otherwise.

isFullScreen

public boolean isFullScreen()
Indicate whether the video is in full screen mode.

Returns:
true if the video is in full screen mode.

setAspectRatio

public void setAspectRatio(VLCVideo.VLCAspectRatio aspectRatio)
Set the aspect ration of the video.

Parameters:
aspectRatio - the aspect ratio.

getAspectRatio

public VLCVideo.VLCAspectRatio getAspectRatio()
Get the aspect ratio of the video media.

Returns:
the aspect ratio, or null in case of failure.

setSubtitleTrack

public void setSubtitleTrack(int subtitleTrack)
Set the track of the subtitles.

Parameters:
subtitleTrack - The track of the subtitles, or 0 to disable them.

getSubtitleTrack

public int getSubtitleTrack()
Get the track of the subtitles.

Returns:
the track of the subtitles, or 0 if disabled, or -1 in case of failure.

toggleFullScreen

public void toggleFullScreen()
Toggle full screen mode.