1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/********************************************************************
*
*	File:		fsCNativeMovieSprite.h
*
*	Purpose:	Sprite that is added to and retained by a scene. All
*				positioning / parenting is handled in the scene
*
*********************************************************************/

#ifndef fsCNativeMovieSpritehdr
#define fsCNativeMovieSpritehdr

#include "fsINative.h"

#ifdef AXMOL_V3
	#include <ui/VideoPlayer.h>
#else
	#include <ui/UIMediaPlayer.h>
#endif

class fsSColour;
class fsAffineMtx2d;
class fsCResourceName;


class fsCNativeMovieSprite : public fsINative
{
	friend class fsCNativeMovieSpriteRenderData;

public:

	void filenameSet(const fsCResourceName& pFilename);
	void play();

	virtual ~fsCNativeMovieSprite();<--- Destructor in derived class

protected:

	void renderDo() override;
	void matrixApplyDo(const fsAffineMtx2d& pRenderMatrix) override;

	fsCNativeMovieSprite();

private:

	ax::Node* implGet() const override;

	std::unique_ptr<ax::ui::VideoPlayer> mImpl;

	ax::Mat4 mRenderMatrix;
};


#endif