Representation of a CYIAbstractVideoPlayer's video surface.
The CYIVideoSurface represents visual information associated with a CYIAbstractVideoPlayer. It contains information about the video's size and location, and if applicable it also contains the video buffer's data in a texture for display by the user. This class also contains a reference to a CYIClosedCaptionsDispatcher instance if the player requires the CYIVideoSurfaceView to render closed captions.
The CAPABILITIES describe the features supported by the underlying video player and platform. Application developers should query and respect the capabilities of the surface in their code.
In order to display the video in your user interface you must assign the CYIVideoSurface to a CYIVideoSurfaceView. This CYIVideoSurfaceView may have design limitations imposed on it by the CAPABILITIES and these must be taken into consideration during the design of the interface, for more information see CYIVideoSurfaceView.
#include <player/YiVideoSurface.h>

Public Types | |
| enum | CAPABILITIES { RENDER_TO_TEXTURE = 0x1, MULTIPLE_VIEWS = 0x2, TRANSLATE = 0x4, SCALE = 0x8, FREE_TRANSFORM = 0x10, OPACITY = 0x20 } |
Public Member Functions | |
| virtual | ~CYIVideoSurface () |
| virtual void | Init () |
| uint32_t | GetCapabilities () const |
| void | SetClosedCaptionsDispatcher (CYIClosedCaptionsDispatcher *pDispatcher) |
| CYIClosedCaptionsDispatcher * | GetClosedCaptionsDispatcher () const |
| const glm::ivec2 & | GetSize () const |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const |
Public Attributes | |
| CYISignal< const glm::ivec2 & > | SizeChanged |
Protected Member Functions | |
| CYIVideoSurface (uint32_t uCapabilities) | |
| void | SetSize (const glm::ivec2 &videoSize) |
| virtual void | OnAttached (CYIVideoSurfaceView *pVideoSurfaceView) |
| virtual void | OnDetached (CYIVideoSurfaceView *pVideoSurfaceView) |
Friends | |
| class | CYIAbstractVideoPlayer |
| class | CYIVideoSurfaceView |
|
virtual |
|
protected |
| uint32_t CYIVideoSurface::GetCapabilities | ( | ) | const |
Returns the capabilities supported by the video surface.
| CYIClosedCaptionsDispatcher* CYIVideoSurface::GetClosedCaptionsDispatcher | ( | ) | const |
Returns the closed captions dispatcher object owned by the associated video player.
| const glm::ivec2& CYIVideoSurface::GetSize | ( | ) | const |
Returns the size of the video buffer contents. This is the native resolution of the video being rendered, and may vary from the size of the view in which this surface is displayed.
|
virtual |
On
Reimplemented in CYIVideoSurfaceTexture.
|
protectedvirtual |
Called when the CYIVideoSurface has been attached to a CYIVideoSurfaceView.
Reimplemented in CYIVideoSurfacePlatform.
|
protectedvirtual |
Called when the CYIVideoSurface has been detached from a CYIVideoSurfaceView.
Reimplemented in CYIVideoSurfacePlatform.
| void CYIVideoSurface::SetClosedCaptionsDispatcher | ( | CYIClosedCaptionsDispatcher * | pDispatcher | ) |
Sets the closed captions dispatcher used by this object to pDispatcher. Video players that make use of in-engine closed captions rendering must call this function.
|
protected |
The size of the video surface should represent the native resolution of the video asset. This can change as new assets are loaded into the player. Set by the CYIAbstractVideoPlayer
|
friend |
|
friend |
| CYISignal<const glm::ivec2 &> CYIVideoSurface::SizeChanged |
Emitted when the size of the surface changes.