1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 17:19:56 +00:00
openmw-tes3mp/apps/openmw/mwgui/videowidget.hpp
scrawl eb1c24ffe6 Refactor video player engine to get rid of MWSound dependencies
- Split video player to separate source files.
 - Move video player engine sources to extern/ (repository will be set up on github soon).
 - Audio is handled in a MovieAudioFactory, implemented by the user (here in MWSound subsystem).
 - Handle conversion of unsupported channel layouts via ffmpeg's swresample.
2014-10-22 22:33:32 +02:00

41 lines
825 B
C++

#ifndef OPENMW_MWGUI_VIDEOWIDGET_H
#define OPENMW_MWGUI_VIDEOWIDGET_H
#include <MyGUI_ImageBox.h>
#include <extern/ogre-ffmpeg-videoplayer/videoplayer.hpp>
namespace MWGui
{
/**
* Widget that plays a video.
*/
class VideoWidget : public MyGUI::ImageBox
{
public:
MYGUI_RTTI_DERIVED(VideoWidget)
VideoWidget();
void playVideo (const std::string& video);
int getVideoWidth();
int getVideoHeight();
/// @return Is the video still playing?
bool update();
/// Return true if a video is currently playing and it has an audio stream.
bool hasAudioStream();
/// Stop video and free resources (done automatically on destruction)
void stop();
private:
Video::VideoPlayer mPlayer;
};
}
#endif