al_open_video_f - Man Page

Allegro 5 API

Synopsis

#include <allegro5/allegro_video.h>

ALLEGRO_VIDEO* al_open_video_f(ALLEGRO_FILE *fp, const char *ident)

Description

Opens a video file from an existing ALLEGRO_FILE* using the Allegro file interface system. This allows videos to be loaded from custom sources such as memory streams, virtual file systems, archives, or any other source supported by a custom ALLEGRO_FILE_INTERFACE.

Parameters:

Returns: A pointer to a new ALLEGRO_VIDEO object if successful, or NULL on failure.

Remarks:

Example:

ALLEGRO_FILE *f = al_fopen("video.ogv", "rb");
if (f) {
    ALLEGRO_VIDEO *vid = al_open_video_f(f);
    if (vid) {
        float fps = al_get_video_fps(vid);
        // ... use the video ...
        al_close_video(vid); // also closes f
    }
}

See Also

al_open_video(3)

Since

5.2.11

Info

Allegro reference manual