You.i Engine
YiVideoSurface.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_VIDEO_SURFACE_H_
3 #define _YI_VIDEO_SURFACE_H_
4 
6 #include "signal/YiSignal.h"
7 
8 #include <glm/vec2.hpp>
9 
15 class CYIAssetTexture;
17 class CYIMaterial;
18 class CYISceneNodeProxy;
20 
35 {
36  friend class CYIAbstractVideoPlayer; //For setting surface size
37  friend class CYIVideoSurfaceView; //For attach/detach callbacks
38 
39 public:
40  virtual ~CYIVideoSurface();
41 
43  {
46  TRANSLATE = 0x4,
47  SCALE = 0x8,
48  FREE_TRANSFORM = 0x10,
49  OPACITY = 0x20
50  };
51 
55  virtual void Init();
56 
62  uint32_t GetCapabilities() const;
63 
68 
73 
77  const glm::ivec2 &GetSize() const;
78 
83 
84 protected:
85  CYIVideoSurface(uint32_t uCapabilities);
86 
90  void SetSize(const glm::ivec2 &videoSize);
91 
97  virtual void OnAttached(CYIVideoSurfaceView *pVideoSurfaceView);
98 
104  virtual void OnDetached(CYIVideoSurfaceView *pVideoSurfaceView);
105 
106 private:
107  CYIVideoSurface();
108  void DetachFromSurfaceView();
109 
110  uint32_t m_uCapabilities;
111  glm::ivec2 m_videoSize;
113  CYIClosedCaptionsDispatcher *m_pClosedCaptionsDispatcher;
114  std::shared_ptr<CYISceneNodeProxy> m_pAttachedSurfaceView;
115 };
116 
121 #endif
Definition: YiVideoSurface.h:49
Definition: YiVideoSurface.h:44
const glm::ivec2 & GetSize() const
CYISignal< const glm::ivec2 & > SizeChanged
Definition: YiVideoSurface.h:82
A texture asset representing an image which will be loaded into the GPU.
Definition: YiAssetTexture.h:23
CYIMaterial is a place holder for all the drawing parameters required by the renderer to draw a mesh/...
Definition: YiMaterial.h:27
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
virtual void OnAttached(CYIVideoSurfaceView *pVideoSurfaceView)
A class used to proxy access to a CYISceneNode.
Definition: YiSceneNodeProxy.h:19
virtual void OnDetached(CYIVideoSurfaceView *pVideoSurfaceView)
Definition: YiVideoSurface.h:46
Definition: YiVideoSurface.h:48
An abstract video player that provides a basic interface that all subclasses must implement...
Definition: YiAbstractVideoPlayer.h:55
void SetClosedCaptionsDispatcher(CYIClosedCaptionsDispatcher *pDispatcher)
uint32_t GetCapabilities() const
Definition: YiVideoSurface.h:45
CAPABILITIES
Definition: YiVideoSurface.h:42
Dispatches closed captioning cues to registered captions renderers.
Definition: YiClosedCaptionsDispatcher.h:27
virtual ~CYIVideoSurface()
CYIClosedCaptionsDispatcher * GetClosedCaptionsDispatcher() const
virtual void Init()
void SetSize(const glm::ivec2 &videoSize)
Representation of a CYIAbstractVideoPlayer&#39;s video surface.
Definition: YiVideoSurface.h:34
View representation of a CYIAbstractVideoPlayer&#39;s CYIVideoSurface.
Definition: YiVideoSurfaceView.h:31
Definition: YiVideoSurface.h:47