ALLEGRO_VIDEO_EVENT_TYPE(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ALLEGRO_VIDEO_EVENT_TYPE β€” bestie, it's the Allegro 5 API ✨ (yes, you're reading ALLEGRO_VIDEO_EVENT_TYPE(3alleg5), welcome to the group chat 🫢)


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_video.h>

enum ALLEGRO_VIDEO_EVENT_TYPE

πŸŽ€ DESCRIPTION πŸŽ€

Okay so these are the events that al_get_video_event_source(3alleg5) sends your way. That's the whole vibe. Every event in this enum is something your video is telling you, and you will be listening πŸ’…

πŸ¦‹ ALLEGRO_EVENT_VIDEO_FRAME_SHOW πŸ¦‹

This one shows up when it's time to show a new frame. The second you get it, you can draw the current frame β€” and "the current frame" means whatever al_get_video_frame(3alleg5) hands back to you. And here's the tea: al_get_video_frame(3alleg5) is gonna keep returning the exact same frame until the next ALLEGRO_EVENT_VIDEO_FRAME_SHOW arrives. No new frame until the event says so, no cap. 🎬

  • user.data1 (ALLEGRO_VIDEO *) β€” the video that generated the event. It's literally the one who called, bestie πŸ™ˆ

πŸ’« SINCE πŸ’«

This has been around since 5.1.0, iconic behavior πŸ‘‘

πŸ“ ALLEGRO_EVENT_VIDEO_FINISHED πŸ“

This is the one that hits when the video is finished. That's it, that's the moment, credits rolling 😭

Depending on the backend (iykyk, backends are their own whole thing), it may be possible to seek to an earlier part of the video and set the video to play, so playback can resume. May. Depending. Not promising anything 🫠

  • user.data1 (ALLEGRO_VIDEO *) β€” the video that generated the event, same as always πŸ’œ

πŸ’« SINCE πŸ’«

Also living here since 5.1.0, consistent queen ⭐


fr fr, that's every event in the enum, nothing skipped, nothing extra β€” just the facts with a little sparkle ✨

Allegro reference manual β€” page ALLEGRO_VIDEO_EVENT_TYPE(3alleg5), mwah, that's the whole page, go draw some frames πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from