You.i Engine
CYIVideoSurfacePlatform Class Referenceabstract

Detailed Description

Representation of a CYIAbstractVideoPlayer's video surface, if the player is rendering to a platform-level view outside of You.i Engine.

This class allows for control of the positioning and layering of the underyling platform-level view.

CYIVideoSurfacePlatform classes are implicitly not CYIVideoSurface::Capabilities::RenderToTexture, even if subclasses claim they are.

#include <player/YiVideoSurfacePlatform.h>

Inheritance diagram for CYIVideoSurfacePlatform:

Public Member Functions

virtual void Init () override
void SetLayerIndex (ssize_t layerIndex)
ssize_t GetLayerIndex () const
- Public Member Functions inherited from CYIVideoSurface
virtual ~CYIVideoSurface ()
Capabilities GetCapabilities () const
void SetClosedCaptionsDispatcher (CYIClosedCaptionsDispatcher *pDispatcher)
CYIClosedCaptionsDispatcherGetClosedCaptionsDispatcher () const
const glm::ivec2 & GetSize () const
void SetSize (const glm::ivec2 &videoSize)

Protected Member Functions

 CYIVideoSurfacePlatform (Capabilities capabilities)
virtual ~CYIVideoSurfacePlatform ()
virtual void BringToFront ()=0
virtual void SetVideoRectangle (const YI_RECT_REL &videoRectangle)=0
virtual void OnAttached (CYIVideoSurfaceView *pVideoSurfaceView) override
virtual void OnDetached (CYIVideoSurfaceView *pVideoSurfaceView) override
- Protected Member Functions inherited from CYIVideoSurface
 CYIVideoSurface (Capabilities capabilities)


class CYIVideoSurfaceView

Additional Inherited Members

- Public Types inherited from CYIVideoSurface
enum  Capabilities {
  Capabilities::None = 0x00,
  Capabilities::RenderToTexture = 0x01,
  Capabilities::MultipleViews = 0x02,
  Capabilities::Translate = 0x04,
  Capabilities::Scale = 0x08,
  Capabilities::FreeTransform = 0x10,
  Capabilities::Opacity = 0x20
- Public Attributes inherited from CYIVideoSurface
CYISignal< const glm::ivec2 & > SizeChanged

Constructor & Destructor Documentation

◆ CYIVideoSurfacePlatform()

CYIVideoSurfacePlatform::CYIVideoSurfacePlatform ( Capabilities  capabilities)

◆ ~CYIVideoSurfacePlatform()

virtual CYIVideoSurfacePlatform::~CYIVideoSurfacePlatform ( )

Member Function Documentation

◆ BringToFront()

virtual void CYIVideoSurfacePlatform::BringToFront ( )
protectedpure virtual

Brings this platform video surface instance to the front of all other platform video surfaces.

◆ GetLayerIndex()

ssize_t CYIVideoSurfacePlatform::GetLayerIndex ( ) const

Returns the current layer index that determines the layering of the underlying platform video surface.

See also

◆ Init()

virtual void CYIVideoSurfacePlatform::Init ( )

Initializes the video surface, must be called before using the surface.

Surfaces obtained from CYIAbstractVideoPlayer will automatically be initialized along with the player.
See also

Reimplemented from CYIVideoSurface.

◆ OnAttached()

virtual void CYIVideoSurfacePlatform::OnAttached ( CYIVideoSurfaceView pVideoSurfaceView)

Called when the CYIVideoSurface has been attached to a CYIVideoSurfaceView.

Subclasses must call the parent OnAttached function.

Reimplemented from CYIVideoSurface.

◆ OnDetached()

virtual void CYIVideoSurfacePlatform::OnDetached ( CYIVideoSurfaceView pVideoSurfaceView)

Called when the CYIVideoSurface has been detached from a CYIVideoSurfaceView.

Subclasses must call the parent OnDetached function.

Reimplemented from CYIVideoSurface.

◆ SetLayerIndex()

void CYIVideoSurfacePlatform::SetLayerIndex ( ssize_t  layerIndex)

Sets the layer index of the underlying platform video surface. The default layer index is 0. The platform video surface will always be displayed under the You.i Engine render surface. This layer index controls the ordering of platform video surfaces when there are multiple platform video surface instances.

A video surface with a higher layer index value will be layered on top of a video surface with a lower layer index value.
The more common approach for displaying a video surface is by using a CYIVideoSurfaceView and not handling the CYIVideoSurface directly. When CYIVideoSurfaceView is used the layer index of the surface will be controlled by the CYIVideoSurfaceView and the index should not be manually set in that case.
See also

◆ SetVideoRectangle()

virtual void CYIVideoSurfacePlatform::SetVideoRectangle ( const YI_RECT_REL videoRectangle)
protectedpure virtual

Positions the platform view such that the video frame appears in the videoRectangle, defined in the coordinate system of the You.i Engine view, which is usually screen-space.

On Tizen when using the player provided by CYIDefaultVideoPlayerFactory the CYIAbstractVideoPlayer must be in the MediaState::Unloaded state before calling this method. Calling this method when the player is not in the MediaState::Unloaded state will have no effect.
See also

Friends And Related Function Documentation

◆ CYIVideoSurfaceView

friend class CYIVideoSurfaceView

The documentation for this class was generated from the following file: