VideoTransformation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.dvb.media
Class VideoTransformation

    java.lang.Object
      org.dvb.media.VideoTransformation

    public class VideoTransformation

extends Object

VideoTransformation objects express video transformations, i.e. the clipping, the horizontal and vertical scaling and the position of the video. All transformations are to be applied after possible ETR154 up-sampling.

Note: Instances of VideoTransformation can represent pan and scan, but an application cannot create such instances itself. An application can get a VideoTransformation representing pan and scan, by calling the VideoFormatControl.getVideoTransformation() method with the pan and scan Decoder Format Conversion constant.

Constructor Summary
`VideoTransformation()` Creates a VideoTransformation object with default parameters.
`VideoTransformation(Rectangle clipRect, float horizontalScalingFactor, float verticalScalingFactor, HScreenPoint location)` Creates a VideoTransformation object with the supplied parameters.

Method Summary
`Rectangle` | `getClipRegion()` Gets the clipping region.
`float[]` | `getScalingFactors()` Gets the horizontal and vertical scaling factors.
`HScreenPoint` | `getVideoPosition()` Returns the video position.
`boolean` | `isPanAndScan()` Returns whether this video transformation represents pan and scan.
`void` | `setClipRegion(Rectangle clipRect)` Sets the clipping region.
`void` | `setScalingFactors(float horizontalScalingFactor, float verticalScalingFactor)` Sets the horizontal and vertical scaling factors.
`void` | `setVideoPosition(HScreenPoint location)` Sets the video position.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### VideoTransformation

    public VideoTransformation()

  Creates a VideoTransformation object with default parameters. Clipping is disabled, both the horizontal and the vertical scaling factors are 1, and the video position is (0,0) in the normalised coordinate space.

### VideoTransformation

    public VideoTransformation(Rectangle clipRect,
                               float horizontalScalingFactor,
                               float verticalScalingFactor,
                               HScreenPoint location)

  Creates a VideoTransformation object with the supplied parameters.

  Parameters:
    `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. A non-null ClipRect enables clipping. A null ClipRect disables it.
    `horizontalScalingFactor` - the horizontal scaling factor.
    `verticalScalingFactor` - the vertical scaling factor.
    `location` - the location of the video on the screen in the normalised coordinate space.

Method Detail

### setClipRegion

    public void setClipRegion(Rectangle clipRect)

  Sets the clipping region.

  If this video transformation represents pan and scan, then it will no longer represent pan and scan when this method is called. A non-null ClipRect enables clipping. A null ClipRect disables it.

  Parameters:
    `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.

### getClipRegion

    public Rectangle getClipRegion()

  Gets the clipping region.

  Returns:
    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. null is returned if this video transformation represents pan and scan or if clipping is disabled.

### setScalingFactors

    public void setScalingFactors(float horizontalScalingFactor,
                                  float verticalScalingFactor)

  Sets the horizontal and vertical scaling factors.

  Parameters:
    `horizontalScalingFactor` - the horizontal scaling factor.
    `verticalScalingFactor` - the vertical scaling factor.

### getScalingFactors

    public float[] getScalingFactors()

  Gets the horizontal and vertical scaling factors.

  Returns:
    an array with two elements. The first element contains the horizontal scaling factor, the second element the vertical scaling factor.

### setVideoPosition

    public void setVideoPosition(HScreenPoint location)

  Sets the video position.

  Parameters:
    `location` - the location of the video on the screen in the normalised coordinate space.

### getVideoPosition

    public HScreenPoint getVideoPosition()

  Returns the video position.

  Returns:
    the location of the video on the screen in the normalised coordinate space.

### isPanAndScan

    public boolean isPanAndScan()

  Returns whether this video transformation represents pan and scan.

  Returns:
    true is this video transformation represents pan and scan, false otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD