summaryrefslogtreecommitdiffstats
path: root/sub/osd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-09 17:54:33 +0200
committerwm4 <wm4@nowhere>2020-05-09 18:02:57 +0200
commitb3a9058c0db3a14aa0e5f50a34b93753f1eb9a49 (patch)
tree18613a2f38f344529dcf9321d5fb4031399c8f81 /sub/osd.h
parentb727600d1fc883cd24f2d54e9691bb0d3a895844 (diff)
downloadmpv-b3a9058c0db3a14aa0e5f50a34b93753f1eb9a49.tar.bz2
mpv-b3a9058c0db3a14aa0e5f50a34b93753f1eb9a49.tar.xz
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.
Diffstat (limited to 'sub/osd.h')
-rw-r--r--sub/osd.h12
1 files changed, 11 insertions, 1 deletions
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;
};