I have my project set up to use Sfe Movie and my program builds fine, but everytime I run the executable it crashes when it tries to load an .ogv file (including one from the working demo). When I run in CMD, I get the errors:
N:\Projects\C++\SkipiEngineTest\Debug>N:\Projects\C++\SkipiEngineTest\Debug\SkipiEngineTest.exe
bad allocation
Could not open res/mov/IntroMovie.ogv
An internal OpenAL call failed in Sound.cpp (87) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in SoundSource.cpp (64) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in SoundSource.cpp (65) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in Sound.cpp (87) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in SoundSource.cpp (64) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in SoundSource.cpp (65) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in SoundBuffer.cpp (75) : AL_INVALID_NAME, an unacceptable name has been specified
An internal OpenAL call failed in SoundBuffer.cpp (75) : AL_INVALID_NAME, an unacceptable name has been specified
AL lib: FreeContext: (006c78b8) Deleting 1 Source(s)
AL lib: FreeContext: (0069af68) Deleting 3 Source(s)
The code to open the movie file looks like this:
for(int i = 0; i < NUM_MOVIE_FILES; i++){
sfe::Movie* m = new sfe::Movie;
try{
if(!m -> openFromFile(MOVIE_PATH + MOVIE_FILENAMES[i] + ".ogv")){
return -4;
}
}catch(std::exception& e){
std::cerr << e.what() << "\n";
std::cout << "Could not open " << MOVIE_PATH + MOVIE_FILENAMES[i] + ".ogv" << "\n";
return -4;
}
ResManager::movieMap[MOVIE_FILENAMES[i]] = m;
}
It's a pretty straightforward way of opening the files, and I assume the .ogv file in the demo has acceptable codecs. Maybe it's because I'm loading it through a pointer?
Thanks.
Edit:
Looks like it was because I was building in the debug configuration. Most of my issues are solved, expect one. Now when I run the program, I hear audio but no video is displayed. What I get with debugging messages enabled:
Input #0, ogg, from 'res/mov/IntroMovie.ogv':
Duration: 00:03:05.07, start: 0.000000, bitrate: 1093 kb/s
Stream #0:0: Video: theora, yuv444p, 876x622 [SAR 1:1 DAR 438:311], 100 fps,
100 tbr, 100 tbn, 100 tbc
Stream #0:1: Audio: flac, 22050 Hz, stereo, s16
Metadata:
TITLE : Microsoft Waveform: ~temp-20130824_0004_36.wav
ENCODER : Lavf55.15.100
Using video framerate : 100
Wanted frame time is 10
[0.679s] Movie_video::DecodeFrontFrame() - frame not decoded (or incomplete)
[0.681s] Movie_video::DecodeFrontFrame() - frame not decoded (or incomplete)
[0.684s] Movie_video::DecodeFrontFrame() - frame not decoded (or incomplete)
[0.686s] Movie_video::DecodeFrontFrame() - frame not decoded (or incomplete)
[0.717s] did decode a full image
[0.730s] did decode a full image
[0.744s] did load an audio chunk
[0.744s] did load an audio chunk
[0.745s] did load an audio chunk
[0.759s] did start movie timer
[0.760s] audio playing : 0.019954s
[0.760s] reference playing : 0.021001s
[0.771s] audio playing : 0.019954s
[0.772s] reference playing : 0.032776s
[0.803s] did decode a full image
[0.856s] audio playing : 0.099954s
[0.860s] reference playing : 0.121183s
Movie_video::Run() - warning: skipping frame because we are late by 93ms (movie
playing offset is 123ms)
Mov[0.880s] audio playing : 0.139954s
ie[0.881s] reference playing : 0.14231s
_video::Run() - warning: skipping frame because we are late by 110[0.898s] audio
playing : 0.139954s
m[0.899s] reference playing : 0.16023s
s (movie playing offset is 140ms)
Looks like frames are being skipped because the program thinks the video needs to be much farther ahead than it is?
Edit 2:
So the reason no video was displayed was because I accidentally set the scale to 0, 0. Fixing that, looks like the video is being displayed but only on the first frame..
Edit 3:
Looks like it was just an issue with my actual video file. Tried other files and it works.