summaryrefslogtreecommitdiffstats
path: root/video/out/present_sync.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/present_sync.h')
-rw-r--r--video/out/present_sync.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/video/out/present_sync.h b/video/out/present_sync.h
index c310002b38..ba6d0b3bf4 100644
--- a/video/out/present_sync.h
+++ b/video/out/present_sync.h
@@ -25,16 +25,25 @@
/* Generic helpers for obtaining presentation feedback from
* backend APIs. This requires ust/msc values. */
-struct mp_present {
- int64_t current_ust;
- int64_t current_msc;
- int64_t last_ust;
- int64_t last_msc;
+struct mp_present_entry {
+ int64_t ust;
+ int64_t msc;
int64_t vsync_duration;
- int64_t last_skipped_vsyncs;
- int64_t last_queue_display_time;
+ int64_t skipped_vsyncs;
+ int64_t queue_display_time;
+
+ struct {
+ struct mp_present_entry *next, *prev;
+ } list_node;
+};
+
+struct mp_present {
+ struct mp_present_entry *head, *tail;
+ struct mp_vo_opts *opts;
};
+struct mp_present *mp_present_initialize(void *talloc_ctx, struct mp_vo_opts *opts, int entries);
+
// Used during the get_vsync call to deliver the presentation statistics to the VO.
void present_sync_get_info(struct mp_present *present, struct vo_vsync_info *info);
@@ -42,7 +51,7 @@ void present_sync_get_info(struct mp_present *present, struct vo_vsync_info *inf
void present_sync_swap(struct mp_present *present);
// Called anytime the backend delivers new ust/msc values.
-void present_update_sync_values(struct mp_present *present, int64_t ust,
+void present_sync_update_values(struct mp_present *present, int64_t ust,
int64_t msc);
#endif /* MP_PRESENT_SYNC_H */