Hi!
I have a little problem ( at least I think so ), so... I have no idea how to play video with allegro video streaming addon. I try something like this.
But when i try to draw bitmap, it flush me an error to console:
Please, help.
I,m using allegro 5.1.6
That should work, I think. Try opening the video (we really should rename it to load_video) after you create the display. Also, check to make sure your video is loaded fine (al_open_video will return NULL if not).
It doesn't work.
The video is opening, because it create display in video dimensions.
The problem starts when I try to get a video frame.
I try to add image addon, but it doesn't help...
Looks like the first couple frames are NULL for whatever reason... just trudge along until you get a non-NULL one.
Another couple of things about your code... you are leaking memory when you create the bitmap yourself... you don't need to do that, al_get_video_frame handles the bitmap it returns automatically. Along the same lines, do not call al_destroy_bitmap on the bitmap returned by al_get_video_frame. Lastly, you don't need to create a default mixer unless you really have to. You can get a default one via al_get_default_mixer(). Your mixer wasn't working anyway as you didn't attach it to a voice. Here's the fixed code if you want to try it:
It... works! Wow
Thank you for help