Commit 3e00781b authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Resolved int to bool "//FIXME" for Media

parent 21657b3b
......@@ -56,16 +56,16 @@ void MediaPlayer::takeSnapshot(char* outputFile, unsi
this->_ex.checkThrow();
}
int MediaPlayer::isPlaying()
bool MediaPlayer::isPlaying()
{
int res = libvlc_media_player_is_playing(this->_internalPtr, this->_ex);
this->_ex.checkThrow();
return res;
return (res == 1);
}
int MediaPlayer::isSeekable()
bool MediaPlayer::isSeekable()
{
int res = libvlc_media_player_is_seekable(this->_internalPtr, this->_ex);
this->_ex.checkThrow();
return res;
return (res == 1);
}
......@@ -22,8 +22,8 @@ namespace LibVLCpp
void setTime(qint64 time);
qint64 getLength();
void takeSnapshot(char* outputFile, unsigned int width, unsigned int heigth);
int isPlaying();
int isSeekable();
bool isPlaying();
bool isSeekable();
private:
Exception _ex;
......
......@@ -83,12 +83,12 @@ QImage* Media::takeSnapshot(unsigned int width, unsigned int height)
return this->_snapshot;
}
int Media::isPlaying()
bool Media::isPlaying()
{
return this->_vlcMediaPlayer->isPlaying();
}
int Media::isSeekable()
bool Media::isSeekable()
{
return this->_vlcMediaPlayer->isSeekable();
}
......
......@@ -20,9 +20,9 @@ public:
static void unlock(LibVLCpp::Media::DataCtx* dataCtx);
QImage* takeSnapshot(unsigned int width, unsigned int heigth);
//FIXME into bool
int isPlaying();
int isSeekable();
bool isPlaying();
bool isSeekable();
qint64 getLength();
QImage& getImage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment