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 
29  ~VideoWidget();
30 
32  void setVFS(const VFS::Manager* vfs);
33 
34  void playVideo (const std::string& video);
35 
36  int getVideoWidth();
37  int getVideoHeight();
38 
40  bool update();
41 
43  bool hasAudioStream();
44 
46  void stop();
47 
52  void autoResize (bool stretch);
53 
54  private:
56  std::unique_ptr<MyGUI::ITexture> mTexture;
57  std::unique_ptr<Video::VideoPlayer> mPlayer;
58  };
59 
60 }
61 
62 #endif
Definition: videowidget.hpp:22
std::unique_ptr< MyGUI::ITexture > mTexture
Definition: videowidget.hpp:56
const VFS::Manager * mVFS
Definition: videowidget.hpp:55
void autoResize(bool stretch)
Definition: videowidget.cpp:84
VideoWidget()
Definition: videowidget.cpp:18
bool hasAudioStream()
Return true if a video is currently playing and it has an audio stream.
Definition: videowidget.cpp:79
bool update()
Definition: videowidget.cpp:69
void playVideo(const std::string &video)
Definition: videowidget.cpp:32
void stop()
Stop video and free resources (done automatically on destruction)
Definition: videowidget.cpp:74
std::unique_ptr< Video::VideoPlayer > mPlayer
Definition: videowidget.hpp:57
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
int getVideoHeight()
Definition: videowidget.cpp:64
void setVFS(const VFS::Manager *vfs)
Set the VFS (virtual file system) to find the videos on.
Definition: videowidget.cpp:27
int getVideoWidth()
Definition: videowidget.cpp:59