I'm trying to be able to play video (for a trailer). I'm not sure I want to move to 5.1 yet (plus no available packages for it yet) and wasn't sure on the ruling of whether the libraries/code/whatever that it uses for video rendering is completely open for commercial projects to use. So I went with: http://sourceforge.net/projects/libtheoraplayer/
I've got it set up, but the issue I'm running into now is how do I get the image to actually render. I read frame by frame, and call frame->getBuffer() which returns me a unsigned char pointer. This is the example I am kinda mimicking: http://sourceforge.net/p/libtheoraplayer/code/HEAD/tree/trunk/demos/av_player/av_player.cpp
It seems to load the video as it gives me the amount of frames in the clip. And it seems to loop through trying to draw them, but I never see anything drawn. Here is the code I'm calling (which is the main area that I have no clue if I'm doing this right):
4 // transfer the frame pixels to your display device, texure, graphical context or whatever you use.
5 ALLEGRO_FILE *
file = al_open_memfile(
, "r" );
6 ALLEGRO_BITMAP *
bitmapFrame = al_load_bitmap_f(
, WIDTH, HEIGHT, 0);
vidyaClip->popFrame(); // be sure to pop the frame from the frame queue when you're done
Further down I'm doing the flip display, etc. Just to be aware, I've tried drawing other images right there in that spot and images all work fine. But not the video frames.
Also, I'm not sure if ".png" is right for al_load_bitmap_f. I just tried that out, but since I'm being given frame data, how would that even apply or how would I know what to use?
Maybe I'm doing this completely the wrong way, and if so, any help is appreciated.