-
Method Summary
Modifier and TypeMethodDescriptionGet the video aspect ratio.float
Get the current video brightness.float
contrast()
Get the current video contrast.Get the current video crop geometry.float
gamma()
Get the current video gamma.float
hue()
Get the current video hue.boolean
Test whether or not the video adjustments are enabled.Create a new viewpoint instance for 360 degree video.float
Get the current video saturation.float
scale()
Get the current video scale (zoom).void
setAdjustVideo
(boolean adjustVideo) Enable/disable the video adjustments.void
setAspectRatio
(String aspectRatio) Set the video aspect ratiovoid
setBrightness
(float brightness) Set the video brightness.void
setContrast
(float contrast) Set the video contrast.void
setCropGeometry
(String cropGeometry) Set the crop geometry.void
setDeinterlace
(DeinterlaceMode deinterlaceMode) Set the de-interlace filter to use.void
setGamma
(float gamma) Set the video gamma.void
setHue
(float hue) Set the video hue.void
setSaturation
(float saturation) Set the video saturation.void
setScale
(float factor) Set the video scaling factor.int
setTrack
(int track) Set a new video track to play.void
setVideoTitleDisplay
(Position position, int timeout) Set if, and how, the video title will be shown when playing media.int
track()
Get the current video track.int
Get the number of available video tracks.Get the video (i.e.boolean
updateViewpoint
(Viewpoint viewpoint, boolean absolute) Update the viewpoint for 360 degree video.Get the video size.
-
Method Details
-
setDeinterlace
Set the de-interlace filter to use.- Parameters:
deinterlaceMode
- mode, or null to disable the de-interlace filter
-
setAdjustVideo
public void setAdjustVideo(boolean adjustVideo) Enable/disable the video adjustments.The video adjustment controls must be enabled after the video has started playing.
- Parameters:
adjustVideo
- true if the video adjustments are enabled, otherwise false
-
isAdjustVideo
public boolean isAdjustVideo()Test whether or not the video adjustments are enabled.- Returns:
- true if the video adjustments are enabled, otherwise false
-
contrast
public float contrast()Get the current video contrast.- Returns:
- contrast, in the range from 0.0 to 2.0
-
setContrast
public void setContrast(float contrast) Set the video contrast.Video adjustments must be enabled for this to have any effect.
- Parameters:
contrast
- contrast value, in the range from 0.0 to 2.0
-
brightness
public float brightness()Get the current video brightness.- Returns:
- brightness, in the range from 0.0 to 2.0
-
setBrightness
public void setBrightness(float brightness) Set the video brightness.Video adjustments must be enabled for this to have any effect.
- Parameters:
brightness
- brightness value, in the range from 0.0 to 2.0
-
hue
public float hue()Get the current video hue.- Returns:
- hue, in the range from -180.0 to 180.0
-
setHue
public void setHue(float hue) Set the video hue.Video adjustments must be enabled for this to have any effect.
- Parameters:
hue
- hue value, in the range from -180.0 to 180.0
-
saturation
public float saturation()Get the current video saturation.- Returns:
- saturation, in the range from 0.0 to 3.0
-
setSaturation
public void setSaturation(float saturation) Set the video saturation.Video adjustments must be enabled for this to have any effect.
- Parameters:
saturation
- saturation value, in the range from 0.0 to 3.0
-
gamma
public float gamma()Get the current video gamma.- Returns:
- gamma value, in the range from 0.01 to 10.0
-
setGamma
public void setGamma(float gamma) Set the video gamma.Video adjustments must be enabled for this to have any effect.
Changing gamma may not be supported by all video outputs, e.g. vdpau
- Parameters:
gamma
- gamma, in the range from 0.01 to 10.0
-
setVideoTitleDisplay
Set if, and how, the video title will be shown when playing media.- Parameters:
position
- position,Position.DISABLE
to prevent the title from appearingtimeout
- time to display the title in milliseconds (ignored when the title is disabled)
-
aspectRatio
-
setAspectRatio
Set the video aspect ratio- Parameters:
aspectRatio
- aspect ratio, e.g. "16:9", "4:3", "185:100" for 1:85.1 and so on
-
scale
public float scale()Get the current video scale (zoom).- Returns:
- scale
-
setScale
public void setScale(float factor) Set the video scaling factor.- Parameters:
factor
- scaling factor, or zero to scale the video the size of the container
-
cropGeometry
-
setCropGeometry
Set the crop geometry.The format for the crop geometry is one of:
- numerator:denominator
- widthxheight+x+y
- left:top:right:bottom
mediaPlayer.setCropGeometry("4:3"); // W:H mediaPlayer.setCropGeometry("719x575+0+0"); // WxH+L+T mediaPlayer.setCropGeometry("6+10+6+10"); // L+T+R+B
- Parameters:
cropGeometry
- formatted string describing the desired crop geometry
-
videoDimension
Get the video size.The video dimensions are not available until after the video has started playing and a video output has been created.
- Returns:
- video size if available, or
null
-
trackCount
public int trackCount()Get the number of available video tracks.- Returns:
- number of tracks
-
track
-
setTrack
public int setTrack(int track) Set a new video track to play.The track identifier must be one of those returned by
trackDescriptions()
.Video can be disabled by passing here the identifier of the track with a description of "Disable".
There is no guarantee that the available track identifiers go in sequence from zero up to
trackCount()
-1. ThetrackDescriptions()
method should always be used to ascertain the available track identifiers.- Parameters:
track
- track identifier- Returns:
- current video track identifier
-
newViewpoint
Create a new viewpoint instance for 360 degree video.The caller must release the returned instance when it no longer has a use for it
- Returns:
- viewpoint, or
null
on error
-
updateViewpoint
Update the viewpoint for 360 degree video.- Parameters:
viewpoint
- new viewpointabsolute
-true
if viewpoint contains absolute values;false
if they are relative- Returns:
true
if successful;false
on error
-
trackDescriptions
Get the video (i.e. "title") track descriptions.The media must be playing before this information is available.
- Returns:
- list of descriptions, may be empty but will never be
null
-