-
Method Summary
Modifier and TypeMethodDescriptionGet the video aspect ratio.floatGet the current video brightness.floatcontrast()Get the current video contrast.Get the current video crop geometry.floatgamma()Get the current video gamma.floathue()Get the current video hue.booleanTest whether or not the video adjustments are enabled.Create a new viewpoint instance for 360 degree video.floatGet the current video saturation.floatscale()Get the current video scale (zoom).voidsetAdjustVideo(boolean adjustVideo) Enable/disable the video adjustments.voidsetAspectRatio(String aspectRatio) Set the video aspect ratiovoidsetBrightness(float brightness) Set the video brightness.voidsetContrast(float contrast) Set the video contrast.voidsetCropGeometry(String cropGeometry) Set the crop geometry.voidsetDeinterlace(DeinterlaceMode deinterlaceMode) Set the de-interlace filter to use.voidsetGamma(float gamma) Set the video gamma.voidsetHue(float hue) Set the video hue.voidsetSaturation(float saturation) Set the video saturation.voidsetScale(float factor) Set the video scaling factor.intsetTrack(int track) Set a new video track to play.voidsetVideoTitleDisplay(Position position, int timeout) Set if, and how, the video title will be shown when playing media.inttrack()Get the current video track.intGet the number of available video tracks.Get the video (i.e.booleanupdateViewpoint(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.DISABLEto prevent the title from appearingtimeout- time to display the title in milliseconds (ignored when the title is disabled)
-
aspectRatio
Get the video aspect ratio.- Returns:
- aspect ratio
-
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
Get the current video crop geometry.- Returns:
- crop geometry
-
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
public int track()Get the current video track.- Returns:
- track identifier, see
trackDescriptions()
-
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
nullon error
-
updateViewpoint
Update the viewpoint for 360 degree video.- Parameters:
viewpoint- new viewpointabsolute-trueif viewpoint contains absolute values;falseif they are relative- Returns:
trueif successful;falseon 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
-