allegro5 video streaming plugin: how to loop without stutter?

Hi all,
I'm trying out the allegro5 video streaming addon on Ubuntu.
My problem is that there doesn't seem to be a way to loop without stutter.
I've tried both seeking to the beginning and close-opening, but both are very slow.

Other than queuing up a 2nd video to kick off right when
the first finishes, i don't see another work-around.

Would adding loop-support to the internal buffering be a useful feature?
or am I doing something wrong?


1 else if (ev.type == ALLEGRO_EVENT_VIDEO_FINISHED) 2 { 3 // reached end of video 4 // seek to beginning. 5 // TODO: fix stutters !!! 6// al_seek_video(video_bg, 0); 7// al_start_video(video_bg, 0); 8// al_set_video_playing(video_bg, true); 9// video_bg_frame = al_get_video_frame(video_bg); 10 11 // TODO: reloading is even worse 12 al_unregister_event_source(queue, al_get_video_event_source(video_bg)); 13 video_bg_frame= nullptr; 14 al_close_video(video_bg); 15 video_bg= nullptr; 16 video_bg= al_open_video(video_bg_path.c_str()); 17 if (video_bg) 18 { 19 al_register_event_source(queue, al_get_video_event_source(video_bg)); 20 al_start_video(video_bg, nullptr); 21 } 22 23 }

Dizzy Egg

Is it necessary to un-register the event handler and re-load the video etc? Couldn't you just use:

        else if (ev.type == ALLEGRO_EVENT_VIDEO_FINISHED)
                al_start_video(video_bg, nullptr);

Just guessing really, not used it before.

Thread #618398. Printed from