18
bool CVideo::isPlaying()
13
bool CVideo::isPlaying() {
22
return (SMPEG_status(mpeg) == SMPEG_PLAYING);
15
if (mpeg) return (SMPEG_status(mpeg) == SMPEG_PLAYING);
29
void CVideo::play(void)
22
if (mpeg) SMPEG_play(mpeg);
37
void CVideo::unloadVideo( void )
26
void CVideo::unloadVideo() {
41
29
SMPEG_delete(mpeg);
47
void CVideo::loadVideo( char * _videoFile, SDL_Surface * _videoSurf, int _width , int _height )
35
bool CVideo::loadVideo(std::string const& _videoFile, SDL_Surface* _videoSurf, int _width , int _height) {
51
mpeg = SMPEG_new(_videoFile, &info, 0);
52
if( SMPEG_error( mpeg ) ) {
53
fprintf( stderr, "SMPEG error: %s\n", SMPEG_error( mpeg ) );
38
mpeg = SMPEG_new(_videoFile.c_str(), &info, 0);
39
if(SMPEG_error(mpeg)) {
40
fprintf(stderr, "SMPEG error: %s\n", SMPEG_error(mpeg));
57
45
SMPEG_setdisplay(mpeg, _videoSurf, NULL, NULL);
58
46
SMPEG_enablevideo(mpeg, 1);
59
47
SMPEG_enableaudio(mpeg, 0);
60
48
SMPEG_setvolume(mpeg, 0);
61
SMPEG_scaleXY(mpeg, _width , _height );
49
SMPEG_scaleXY(mpeg, _width , _height);
64
53
fprintf(stdout,"Video file was found, but Ultrastar-ng was compile without video support\n");