2014-03-27 18:10:15 +00:00
|
|
|
#include "videowidget.hpp"
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
|
|
|
|
VideoWidget::VideoWidget()
|
|
|
|
{
|
|
|
|
setNeedKeyFocus(true);
|
|
|
|
}
|
|
|
|
|
2014-06-09 23:57:54 +00:00
|
|
|
void VideoWidget::playVideo(const std::string &video)
|
2014-03-27 18:10:15 +00:00
|
|
|
{
|
|
|
|
mPlayer.playVideo(video);
|
|
|
|
|
|
|
|
setImageTexture(mPlayer.getTextureName());
|
|
|
|
}
|
|
|
|
|
|
|
|
int VideoWidget::getVideoWidth()
|
|
|
|
{
|
|
|
|
return mPlayer.getVideoWidth();
|
|
|
|
}
|
|
|
|
|
|
|
|
int VideoWidget::getVideoHeight()
|
|
|
|
{
|
|
|
|
return mPlayer.getVideoHeight();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool VideoWidget::update()
|
|
|
|
{
|
|
|
|
mPlayer.update();
|
|
|
|
return mPlayer.isPlaying();
|
|
|
|
}
|
|
|
|
|
2014-06-09 23:57:54 +00:00
|
|
|
void VideoWidget::stop()
|
2014-06-05 13:39:08 +00:00
|
|
|
{
|
|
|
|
mPlayer.close();
|
|
|
|
}
|
|
|
|
|
2014-03-27 18:10:15 +00:00
|
|
|
}
|