Re: [AD] Plan for the video addon

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, Sep 13, 2015 at 1:43 AM, SiegeLord wrote:

- Remove al_get_video_aspect_ratio and change al_get_video_width and al_get_video_height to return the width and height of the video with the correct aspect scale. The intention is for something like this to just work:

    ALLEGRO_BITMAP* f = al_get_video_bitmap(v);
    al_draw_scaled_bitmap(f, 0, 0, al_get_bitmap_width(f), al_get_bitmap_height(f), 0, 0, al_get_video_width(v), al_get_video_height(v), 0);

If I understand correctly, with your redesign, you'll know the dimensions of the bitmaps you'll be getting only after you ... have got the first frame. As they'll all be the same size and because it's actually a property of the video, why not (re-)add something like al_get_video_raw_width/height? IMHO, it'd be perfectly fine to leave it to the documentation to make clear what the difference is and that scaled drawing is expected to deal with it. Besides, as Elias has pointed out, there is still the option to encode videos in such a way that no scaling is needed.

Kind regards,
P.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/