From b3a9058c0db3a14aa0e5f50a34b93753f1eb9a49 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 May 2020 17:54:33 +0200 Subject: osd: add change timestamp and screen size to struct sub_bitmap_list Should be somewhat helpful. (All VOs are full of code trying to compensate for this, more or less, and this will allow simplifying some code later. Maybe.) The screen size is mostly for robustness checks. --- sub/osd.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sub/osd.h') diff --git a/sub/osd.h b/sub/osd.h index 207d789094..17e3ae0282 100644 --- a/sub/osd.h +++ b/sub/osd.h @@ -73,10 +73,20 @@ struct sub_bitmaps { // box. (The origin of the box is at (0,0).) int packed_w, packed_h; - int change_id; // Incremented on each change + int change_id; // Incremented on each change (0 is never used) }; struct sub_bitmap_list { + // Combined change_id - of any of the existing items change (even if they + // e.g. go away and are removed from items[]), this is incremented. + int64_t change_id; + + // Bounding box for rendering. It's notable that SUBBITMAP_LIBASS images are + // always within these bounds, while SUBBITMAP_RGBA is not necessarily. + int w, h; + + // Sorted by sub_bitmaps.render_index. Unused parts are not in the array, + // and you cannot index items[] with render_index. struct sub_bitmaps **items; int num_items; }; -- cgit v1.2.3