![]() |
Murl Engine API
Version 2018.3
|
The video surface class, see IVideoSurface. More...
#include <murl_util_video_surface.h>
The video surface class, see IVideoSurface.
Public Member Functions | |
VideoSurface () | |
The default constructor. More... | |
VideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY) | |
Constructor creating a surface of specified dimension. More... | |
VideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine) | |
Constructor creating a surface of specified dimension, with given line pitch. More... | |
VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY) | |
Constructor creating a surface of specified pixel format and dimension. More... | |
VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine) | |
Constructor creating a surface of specified pixel format and dimension, with given line pitch. More... | |
VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, MutableData &sourceData) | |
Constructor creating a surface of specified pixel format and dimension with given source data. More... | |
VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine, MutableData &sourceData) | |
Constructor creating a surface of specified pixel format and dimension with given source data. More... | |
VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const ConstData &sourceData) | |
Constructor creating a surface of specified pixel format and dimension with given source data. More... | |
VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine, const ConstData &sourceData) | |
Constructor creating a surface of specified pixel format and dimension with given source data. More... | |
virtual | ~VideoSurface () |
The destructor. | |
virtual IVideoSurface * | Clone (IEnums::PixelFormat pixelFormat) const |
Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat). More... | |
virtual IVideoSurface * | Clone (UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=0, Real gamma=1.0f) const |
Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, const IVideoScaler* scaler = 0). More... | |
virtual IVideoSurface * | Clone (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=0, Real gamma=1.0f) const |
Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler* scaler). More... | |
virtual IVideoSurface * | CloneRotated (IEnums::Orientation orientation) const |
Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation). More... | |
virtual IVideoSurface * | CloneRotated (IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat) const |
Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat). More... | |
virtual IVideoSurface * | CloneFrame (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY) const |
Implementation of IVideoSurface::CloneFrame(). More... | |
virtual UInt32 | GetPixelSizeX () const |
Implementation of IVideoSurface::GetPixelSizeX(). More... | |
virtual UInt32 | GetPixelSizeY () const |
Implementation of IVideoSurface::GetPixelSizeY(). More... | |
virtual UInt32 | GetBytesPerPixel () const |
Implementation of IVideoSurface::GetBytesPerPixel(). More... | |
virtual UInt32 | GetBytesPerLine () const |
Implementation of IVideoSurface::GetBytesPerLine(). More... | |
virtual IEnums::PixelFormat | GetPixelFormat () const |
Implementation of IVideoSurface::GetPixelFormat(). More... | |
virtual const ConstData & | GetPixels () const |
Implementation of IVideoSurface::GetPixels(). More... | |
virtual const MutableData & | GetMutablePixels () |
Implementation of IVideoSurface::GetMutablePixels(). More... | |
virtual Color | GetPixel (SInt32 positionX, SInt32 positionY) const |
Implementation of IVideoSurface::GetPixel(). More... | |
virtual Bool | SetPixel (SInt32 positionX, SInt32 positionY, const Color &color) |
Implementation of IVideoSurface::SetPixel(). More... | |
virtual Bool | FlipX () |
Implementation of IVideoSurface::FlipX(). More... | |
virtual Bool | FlipY () |
Implementation of IVideoSurface::FlipY(). More... | |
virtual Bool | Blit (const IVideoSurface *source, SInt32 destPositionX, SInt32 destPositionY) |
Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 destPositionX, SInt32 destPositionY). More... | |
virtual Bool | Blit (const IVideoSurface *source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY) |
Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY). More... | |
virtual Bool | BlitScaled (const IVideoSurface *source, const IVideoScaler *scaler=0, Real gamma=1.0f) |
Implementation of IVideoSurface::BlitScaled(). More... | |
virtual Bool | Clear (const Color &clearColor) |
Implementation of IVideoSurface::Clear(const Color& clearColor). More... | |
virtual Bool | Clear (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &clearColor) |
Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor). More... | |
virtual Bool | GaussBlur (Real strength) |
Implementation of IVideoSurface::GaussBlur(Real strength). More... | |
virtual Bool | GaussBlur (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength) |
Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength). More... | |
virtual Bool | ApplyMatte (const Color &matteColor, Real matteThreshold=0) |
Implementation of IVideoSurface::ApplyMatte(const Color& matteColor, Real matteThreshold = 0). More... | |
virtual Bool | ApplyMatte (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &matteColor, Real matteThreshold=0) |
Implementation of IVideoSurface::ApplyMatte(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More... | |
virtual Bool | RenderText (const IFont *font, const String &text, const Color &textColor, const Color &backgroundColor, Bool clearSurface, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, IEnums::TextAlignmentX alignX, IEnums::TextAlignmentY alignY) |
Implementation of IVideoSurface::RenderText(). More... | |
virtual Bool | IsColumnEmpty (UInt32 column, Real threshold) const |
Implementation of IVideoSurface::IsColumnEmpty(). More... | |
virtual Bool | IsRowEmpty (UInt32 row, Real threshold) const |
Implementation of IVideoSurface::IsRowEmpty(). More... | |
virtual SInt32 | ClipSizeXRight (SInt32 positionX, SInt32 sizeX) const |
Implementation of IVideoSurface::ClipSizeXRight(). More... | |
virtual SInt32 | ClipSizeYBottom (SInt32 positionY, SInt32 sizeY) const |
Implementation of IVideoSurface::ClipSizeYBottom(). More... | |
virtual Bool | Evict () |
Implementation of IVideoSurface::Evict(). More... | |
virtual Bool | Restore () |
Implementation of IVideoSurface::Restore(). More... | |
![]() | |
virtual | ~IVideoSurface () |
The destructor. | |
Protected Attributes | |
UInt32 | mSizeX |
The pixel width. More... | |
UInt32 | mSizeY |
The pixel height. More... | |
IEnums::PixelFormat | mPixelFormat |
The pixel format. More... | |
UInt32 | mBytesPerLine |
The number of bytes per line. More... | |
Data | mData |
The own surface data, if specified via constructor. More... | |
ConstData | mConstData |
The actually visible constant surface data store. More... | |
MutableData | mMutableData |
The actually visible mutable surface data store, if possible. More... | |
Murl::Util::VideoSurface::VideoSurface | ( | ) |
The default constructor.
Create an empty surface with unknown pixel format.
Constructor creating a surface of specified dimension.
Creates a surface with pixel format IEnums::PIXEL_FORMAT_R8_G8_B8_A8.
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
Murl::Util::VideoSurface::VideoSurface | ( | UInt32 | pixelSizeX, |
UInt32 | pixelSizeY, | ||
UInt32 | bytesPerLine | ||
) |
Constructor creating a surface of specified dimension, with given line pitch.
Creates a surface with pixel format IEnums::PIXEL_FORMAT_R8_G8_B8_A8.
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
bytesPerLine | The line pitch in bytes. |
Murl::Util::VideoSurface::VideoSurface | ( | IEnums::PixelFormat | pixelFormat, |
UInt32 | pixelSizeX, | ||
UInt32 | pixelSizeY | ||
) |
Constructor creating a surface of specified pixel format and dimension.
pixelFormat | The pixel format. |
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
Murl::Util::VideoSurface::VideoSurface | ( | IEnums::PixelFormat | pixelFormat, |
UInt32 | pixelSizeX, | ||
UInt32 | pixelSizeY, | ||
UInt32 | bytesPerLine | ||
) |
Constructor creating a surface of specified pixel format and dimension, with given line pitch.
pixelFormat | The pixel format. |
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
bytesPerLine | The line pitch in bytes. |
Murl::Util::VideoSurface::VideoSurface | ( | IEnums::PixelFormat | pixelFormat, |
UInt32 | pixelSizeX, | ||
UInt32 | pixelSizeY, | ||
MutableData & | sourceData | ||
) |
Constructor creating a surface of specified pixel format and dimension with given source data.
This constructor can be used to create a surface effectively wrapping a given block of mutable data without copying the source contents.
pixelFormat | The pixel format. |
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
sourceData | The mutable data block to be wrapped. |
Murl::Util::VideoSurface::VideoSurface | ( | IEnums::PixelFormat | pixelFormat, |
UInt32 | pixelSizeX, | ||
UInt32 | pixelSizeY, | ||
UInt32 | bytesPerLine, | ||
MutableData & | sourceData | ||
) |
Constructor creating a surface of specified pixel format and dimension with given source data.
This constructor can be used to create a surface effectively wrapping a given block of mutable data without copying the source contents, using a given line pitch.
pixelFormat | The pixel format. |
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
bytesPerLine | The line pitch in bytes. |
sourceData | The mutable data block to be wrapped. |
Murl::Util::VideoSurface::VideoSurface | ( | IEnums::PixelFormat | pixelFormat, |
UInt32 | pixelSizeX, | ||
UInt32 | pixelSizeY, | ||
const ConstData & | sourceData | ||
) |
Constructor creating a surface of specified pixel format and dimension with given source data.
This constructor can be used to create a surface effectively wrapping a given block of constant data without copying the source contents.
pixelFormat | The pixel format. |
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
sourceData | The constant data block to be wrapped. |
Murl::Util::VideoSurface::VideoSurface | ( | IEnums::PixelFormat | pixelFormat, |
UInt32 | pixelSizeX, | ||
UInt32 | pixelSizeY, | ||
UInt32 | bytesPerLine, | ||
const ConstData & | sourceData | ||
) |
Constructor creating a surface of specified pixel format and dimension with given source data.
This constructor can be used to create a surface effectively wrapping a given block of constant data without copying the source contents, using a given line pitch.
pixelFormat | The pixel format. |
pixelSizeX | The number of horizontal pixels. |
pixelSizeY | The number of vertical pixels. |
bytesPerLine | The line pitch in bytes. |
sourceData | The constant data block to be wrapped. |
|
virtual |
Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat).
pixelFormat | The pixel format of the new surface. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, const IVideoScaler* scaler = 0).
pixelSizeX | The number of horizontal pixels of the new surface. |
pixelSizeY | The number of vertical pixels of the new surface. |
scaler | Pointer to a scaler object or null to scale using the BoxVideoScaler. |
gamma | The gamma value used during cloning. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler* scaler).
pixelFormat | The pixel format of the new surface. |
pixelSizeX | The number of horizontal pixels of the new surface. |
pixelSizeY | The number of vertical pixels of the new surface. |
scaler | Pointer to a scaler object or null to scale using the BoxVideoScaler. |
gamma | The gamma value used during cloning. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation).
orientation | The orientation of the new surface. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat).
orientation | The orientation of the new surface. |
pixelFormat | The pixel format of the new surface. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::CloneFrame().
positionX | The source x-position of the region. |
positionY | The source y-position of the region. |
pixelSizeX | The number of horizontal pixels of the region. |
pixelSizeY | The number of vertical pixels of the region. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetPixelSizeX().
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetPixelSizeY().
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetBytesPerPixel().
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetBytesPerLine().
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetPixelFormat().
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetPixels().
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetMutablePixels().
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::GetPixel().
positionX | The pixel x-position. |
positionY | The pixel y-position. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::SetPixel().
positionX | The pixel x-position. |
positionY | The pixel y-position. |
color | The color of the pixel to set. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::FlipX().
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::FlipY().
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 destPositionX, SInt32 destPositionY).
source | The source surface. |
destPositionX | The destination x-position. |
destPositionY | The destination y-position. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY).
source | The source surface. |
sourcePositionX | The source x-position. |
sourcePositionY | The source y-position. |
destPositionX | The destination x-position. |
destPositionY | The destination y-position. |
pixelSizeX | The number of horizontal pixels to copy. |
pixelSizeY | The number of vertical pixels to copy. |
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::BlitScaled().
source | The source surface. |
scaler | Pointer to a scaler object or null to scale using the BoxVideoScaler. |
gamma | The gamma value used during scaling. |
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
Implementation of IVideoSurface::Clear(const Color& clearColor).
clearColor | The clear color to apply. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor).
positionX | The source x-position of the region. |
positionY | The source y-position of the region. |
pixelSizeX | The number of horizontal pixels of the region. |
pixelSizeY | The number of vertical pixels of the region. |
clearColor | The clear color to apply. |
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
Implementation of IVideoSurface::GaussBlur(Real strength).
strength | The blur filter strength. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength).
positionX | The x-position of the region. |
positionY | The y-position of the region. |
pixelSizeX | The number of horizontal pixels of the region. |
pixelSizeY | The number of vertical pixels of the region. |
strength | The blur filter strength. |
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::ApplyMatte(const Color& matteColor, Real matteThreshold = 0).
matteColor | The matte color to apply. |
matteThreshold | The alpha threshold in range [0.0 .. 1.0]. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::ApplyMatte(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0).
positionX | The source x-position of the region. |
positionY | The source y-position of the region. |
pixelSizeX | The number of horizontal pixels of the region. |
pixelSizeY | The number of vertical pixels of the region. |
matteColor | The matte color to apply. |
matteThreshold | The alpha threshold in range [0.0 .. 1.0]. |
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::RenderText().
font | The font used for rendering. |
text | The text to render. |
textColor | The text color to render. |
backgroundColor | The text background color to render. |
clearSurface | If true, the output surface is cleared before rendering. |
enableWordWrap | If true, word wrapping is enabled. |
containerPosX | The horizontal text position in the video stream. |
containerPosY | The vertical text position in the video stream. |
containerSizeX | The horizontal size of the text rectangle, or 0 if the video stream's X size should be used |
containerSizeY | The vertical size of the text rectangle, or 0 if the video stream's Y size should be used |
alignX | The horizontal text alignment. |
alignY | The vertical text alignment. |
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::IsColumnEmpty().
column | The zero-based column. |
threshold | The alpha threshold in range [0.0 .. 1.0]. |
Implements Murl::IVideoSurface.
Implementation of IVideoSurface::IsRowEmpty().
row | The zero-based row. |
threshold | The alpha threshold in range [0.0 .. 1.0]. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::ClipSizeXRight().
positionX | The x-position. |
sizeX | The number of horzontal pixels. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::ClipSizeYBottom().
positionY | The y-position. |
sizeY | The number of vertical pixels. |
Implements Murl::IVideoSurface.
|
virtual |
Implementation of IVideoSurface::Evict().
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
virtual |
Implementation of IVideoSurface::Restore().
Implements Murl::IVideoSurface.
Reimplemented in Murl::Util::EvictableVideoSurface.
|
protected |
The pixel width.
|
protected |
The pixel height.
|
protected |
The pixel format.
|
protected |
The number of bytes per line.
|
protected |
The own surface data, if specified via constructor.
|
protected |
The actually visible constant surface data store.
|
protected |
The actually visible mutable surface data store, if possible.