OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
videowidget.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_MWGUI_VIDEOWIDGET_H
2 #define OPENMW_MWGUI_VIDEOWIDGET_H
3 
4 #include <MyGUI_Widget.h>
5 
6 namespace Video
7 {
8  class VideoPlayer;
9 }
10 
11 namespace VFS
12 {
13  class Manager;
14 }
15 
16 namespace MWGui
17 {
18 
22  class VideoWidget : public MyGUI::Widget
23  {
24  public:
25  MYGUI_RTTI_DERIVED(VideoWidget)
26 
27  VideoWidget();
28 
30  void setVFS(const VFS::Manager* vfs);
31 
32  void playVideo (const std::string& video);
33 
34  int getVideoWidth();
35  int getVideoHeight();
36 
38  bool update();
39 
41  bool hasAudioStream();
42 
44  void stop();
45 
50  void autoResize (bool stretch);
51 
52  private:
54  std::auto_ptr<MyGUI::ITexture> mTexture;
55  std::auto_ptr<Video::VideoPlayer> mPlayer;
56  };
57 
58 }
59 
60 #endif
Definition: videowidget.hpp:22
std::auto_ptr< Video::VideoPlayer > mPlayer
Definition: videowidget.hpp:55
const VFS::Manager * mVFS
Definition: videowidget.hpp:53
void autoResize(bool stretch)
Definition: videowidget.cpp:81
VideoWidget()
Definition: videowidget.cpp:17
bool hasAudioStream()
Return true if a video is currently playing and it has an audio stream.
Definition: videowidget.cpp:76
std::auto_ptr< MyGUI::ITexture > mTexture
Definition: videowidget.hpp:54
bool update()
Definition: videowidget.cpp:66
void playVideo(const std::string &video)
Definition: videowidget.cpp:29
void stop()
Stop video and free resources (done automatically on destruction)
Definition: videowidget.cpp:71
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
int getVideoHeight()
Definition: videowidget.cpp:61
void setVFS(const VFS::Manager *vfs)
Set the VFS (virtual file system) to find the videos on.
Definition: videowidget.cpp:24
int getVideoWidth()
Definition: videowidget.cpp:56