You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
#ifndef VIDEOPLAYER_H
|
|
#define VIDEOPLAYER_H
|
|
|
|
#include <OgreMaterial.h>
|
|
|
|
namespace Ogre
|
|
{
|
|
class SceneManager;
|
|
class SceneNode;
|
|
class Rectangle2D;
|
|
class RenderWindow;
|
|
}
|
|
|
|
namespace MWRender
|
|
{
|
|
struct VideoState;
|
|
|
|
class VideoPlayer
|
|
{
|
|
public:
|
|
VideoPlayer(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* window);
|
|
~VideoPlayer();
|
|
|
|
void playVideo (const std::string& resourceName, bool allowSkipping);
|
|
|
|
void update();
|
|
|
|
void close();
|
|
void stopVideo();
|
|
|
|
bool isPlaying();
|
|
|
|
void setResolution (int w, int h) { mWidth = w; mHeight = h; }
|
|
|
|
|
|
private:
|
|
VideoState* mState;
|
|
|
|
bool mAllowSkipping;
|
|
|
|
Ogre::SceneManager* mSceneMgr;
|
|
Ogre::MaterialPtr mVideoMaterial;
|
|
Ogre::Rectangle2D* mRectangle;
|
|
Ogre::Rectangle2D* mBackgroundRectangle;
|
|
Ogre::SceneNode* mNode;
|
|
Ogre::SceneNode* mBackgroundNode;
|
|
Ogre::RenderWindow* mWindow;
|
|
|
|
int mWidth;
|
|
int mHeight;
|
|
};
|
|
}
|
|
|
|
#endif
|