2012-12-11 21:49:31 +00:00
|
|
|
#ifndef VIDEOPLAYER_H
|
|
|
|
#define VIDEOPLAYER_H
|
2012-09-25 00:35:50 +00:00
|
|
|
|
2014-03-27 18:10:15 +00:00
|
|
|
#include <string>
|
2012-09-25 00:35:50 +00:00
|
|
|
|
|
|
|
namespace MWRender
|
|
|
|
{
|
2012-12-14 09:14:14 +00:00
|
|
|
struct VideoState;
|
|
|
|
|
2014-03-27 18:10:15 +00:00
|
|
|
/**
|
|
|
|
* @brief Plays a video on an Ogre texture.
|
|
|
|
*/
|
2012-09-25 00:35:50 +00:00
|
|
|
class VideoPlayer
|
|
|
|
{
|
|
|
|
public:
|
2014-03-27 18:10:15 +00:00
|
|
|
VideoPlayer();
|
2012-09-25 00:35:50 +00:00
|
|
|
~VideoPlayer();
|
|
|
|
|
2014-03-27 18:10:15 +00:00
|
|
|
void playVideo (const std::string& resourceName);
|
2012-09-25 00:35:50 +00:00
|
|
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
void close();
|
2013-01-07 12:19:52 +00:00
|
|
|
void stopVideo();
|
2012-09-25 00:35:50 +00:00
|
|
|
|
2012-12-11 21:49:31 +00:00
|
|
|
bool isPlaying();
|
2012-12-03 16:33:02 +00:00
|
|
|
|
2014-03-27 18:10:15 +00:00
|
|
|
std::string getTextureName();
|
|
|
|
int getVideoWidth();
|
|
|
|
int getVideoHeight();
|
2012-12-15 18:23:03 +00:00
|
|
|
|
2012-12-03 16:33:02 +00:00
|
|
|
|
2012-12-11 21:49:31 +00:00
|
|
|
private:
|
|
|
|
VideoState* mState;
|
2012-12-03 16:33:02 +00:00
|
|
|
|
2012-12-15 18:23:03 +00:00
|
|
|
int mWidth;
|
|
|
|
int mHeight;
|
2012-09-25 00:35:50 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|