public interface VideoPresentationControl extends Control
Note: For a component-based player the scaling and positioning of the video is done by manipulating the corresponding AWT component. The VideoPresentationControl only allows for the setting of the clipping region.
Note: If the hardware supports the positioning of interlaced video on even lines only (when counting from 0), then a component-based player is allowed to position the top of the video one line below where it should be.
For a background player there is the BackgroundVideoPresentationControl that allows for the setting of the clipping region, the position and the scaling of the video in one atomic action.
| Modifier and Type | Field and Description |
|---|---|
static byte |
POS_CAP_FULL
Constant representing that the video can be positioned anywhere on
the screen, even if a part of the video is off screen as a result
of that.
|
static byte |
POS_CAP_FULL_EVEN_LINES
n
Constant representing that the video can be positioned anywhere on
the screen, even if a part of the video is off screen as a result
of that, with the restriction that the field order is respected.
|
static byte |
POS_CAP_FULL_EVEN_LINES_IF_ENTIRE_VIDEO_ON_SCREEN
Constant representing that the video can be positioned anywhere
on screen as long as all the video is on screen, with the restriction
that the field order is respected.
|
static byte |
POS_CAP_FULL_IF_ENTIRE_VIDEO_ON_SCREEN
Constant representing that the video can be positioned anywhere
on screen as long as all the video is on screen.
|
static byte |
POS_CAP_OTHER
Constant representing that the video positioning capability
cannot be expressed by another POS_CAP_* constant.
|
| Modifier and Type | Method and Description |
|---|---|
HScreenRectangle |
getActiveVideoArea()
This method returns the size and location of the active video area.
|
HScreenRectangle |
getActiveVideoAreaOnScreen()
This method returns the size and location of the active video area on-screen.
|
Rectangle |
getClipRegion()
This method returns the area of the decoded video that will be
displayed.
|
float[] |
getHorizontalScalingFactors()
This method gives information about the supported discrete
horizontal scaling factors in case arbitrary horizontal
scaling is not supported.
|
Dimension |
getInputVideoSize()
This method returns the dimensions of the video before any scaling
has taken place (but after ETR154 up-sampling).
|
byte |
getPositioningCapability()
This method gives information about how the video can be positioned
on screen.
|
HScreenRectangle |
getTotalVideoArea()
This method returns a relative size and location of the total video area, including
any "bars" used for letterboxing or pillarboxing that are included in the broadcast
stream, but excluding any "bars" introduced as a result of video filtering.
|
HScreenRectangle |
getTotalVideoAreaOnScreen()
This method returns a relative size and location of the total video area on-screen,
including any "bars" used for letterboxing or pillarboxing that are included in the
broadcast stream, but excluding any "bars" introduced as a result of video filtering.
|
float[] |
getVerticalScalingFactors()
This method gives information about the supported discrete
vertical scaling factors in case arbitrary vertical
scaling is not supported.
|
Dimension |
getVideoSize()
This method returns the size of the decoded video as it is being
presented to the user.
|
Rectangle |
setClipRegion(Rectangle clipRect)
Set the region of the decoded video that will be displayed.
|
float[] |
supportsArbitraryHorizontalScaling()
This method gives information about whether arbitrary horizontal
scaling is supported for the currently playing video.
|
float[] |
supportsArbitraryVerticalScaling()
This method gives information about whether arbitrary vertical
scaling is supported for the currently playing video.
|
boolean |
supportsClipping()
Test if the decoder supports clipping
|
getControlComponentstatic final byte POS_CAP_FULL
static final byte POS_CAP_FULL_IF_ENTIRE_VIDEO_ON_SCREEN
static final byte POS_CAP_FULL_EVEN_LINES
static final byte POS_CAP_FULL_EVEN_LINES_IF_ENTIRE_VIDEO_ON_SCREEN
static final byte POS_CAP_OTHER
Dimension getInputVideoSize()
Dimension getVideoSize()
HScreenRectangle getActiveVideoArea()
HScreenRectangle getActiveVideoAreaOnScreen()
HScreenRectangle getTotalVideoArea()
HScreenRectangle getTotalVideoAreaOnScreen()
boolean supportsClipping()
Rectangle setClipRegion(Rectangle clipRect)
If the player is a component-based player (as opposed to a background player), then the top left corner of the clip region will be aligned with the top left corner of the java.awt.Component returned by the method javax.media.Player.getVisualComponent(). Hence changing the position of the clip region within the video moves the video with respect to the coordinate space used by java.awt.
clipRect - the bounding box of the clipping region. The coordinate
space used to express the region is that of the decoded video after possible
ETR154 up-sampling.Rectangle getClipRegion()
pan & scan mode, the return value of
this method will be out of date almost as soon as the method has returned.float[] supportsArbitraryHorizontalScaling()
float[] supportsArbitraryVerticalScaling()
float[] getHorizontalScalingFactors()
float[] getVerticalScalingFactors()
byte getPositioningCapability()
Copyright © 2012 code4tv.com. All Rights Reserved.