|
@@ -15,7 +15,7 @@
|
|
|
struct SDL_Surface;
|
|
struct SDL_Surface;
|
|
|
struct SDL_Texture;
|
|
struct SDL_Texture;
|
|
|
|
|
|
|
|
-class IVideoPlayer
|
|
|
|
|
|
|
+class IVideoPlayer : boost::noncopyable
|
|
|
{
|
|
{
|
|
|
public:
|
|
public:
|
|
|
virtual bool open(const VideoPath & name, bool scale = false)=0; //true - succes
|
|
virtual bool open(const VideoPath & name, bool scale = false)=0; //true - succes
|
|
@@ -31,8 +31,6 @@ public:
|
|
|
class IMainVideoPlayer : public IVideoPlayer
|
|
class IMainVideoPlayer : public IVideoPlayer
|
|
|
{
|
|
{
|
|
|
public:
|
|
public:
|
|
|
- VideoPath fname; //name of current video file (empty if idle)
|
|
|
|
|
-
|
|
|
|
|
virtual void update(int x, int y, SDL_Surface *dst, bool forceRedraw, bool update = true){}
|
|
virtual void update(int x, int y, SDL_Surface *dst, bool forceRedraw, bool update = true){}
|
|
|
virtual bool openAndPlayVideo(const VideoPath & name, int x, int y, bool stopOnKey = false, bool scale = false)
|
|
virtual bool openAndPlayVideo(const VideoPath & name, int x, int y, bool stopOnKey = false, bool scale = false)
|
|
|
{
|
|
{
|
|
@@ -55,14 +53,16 @@ public:
|
|
|
|
|
|
|
|
#ifndef DISABLE_VIDEO
|
|
#ifndef DISABLE_VIDEO
|
|
|
|
|
|
|
|
-#include "../lib/filesystem/CInputStream.h"
|
|
|
|
|
-
|
|
|
|
|
struct AVFormatContext;
|
|
struct AVFormatContext;
|
|
|
struct AVCodecContext;
|
|
struct AVCodecContext;
|
|
|
struct AVCodec;
|
|
struct AVCodec;
|
|
|
struct AVFrame;
|
|
struct AVFrame;
|
|
|
struct AVIOContext;
|
|
struct AVIOContext;
|
|
|
|
|
|
|
|
|
|
+VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
+class CInputStream;
|
|
|
|
|
+VCMI_LIB_NAMESPACE_END
|
|
|
|
|
+
|
|
|
class CVideoPlayer : public IMainVideoPlayer
|
|
class CVideoPlayer : public IMainVideoPlayer
|
|
|
{
|
|
{
|
|
|
int stream; // stream index in video
|
|
int stream; // stream index in video
|
|
@@ -74,6 +74,8 @@ class CVideoPlayer : public IMainVideoPlayer
|
|
|
|
|
|
|
|
AVIOContext * context;
|
|
AVIOContext * context;
|
|
|
|
|
|
|
|
|
|
+ VideoPath fname; //name of current video file (empty if idle)
|
|
|
|
|
+
|
|
|
// Destination. Either overlay or dest.
|
|
// Destination. Either overlay or dest.
|
|
|
|
|
|
|
|
SDL_Texture *texture;
|
|
SDL_Texture *texture;
|