summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index e38dcf8..313c08a 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -29,6 +29,7 @@
#include "video/img_format.h"
#include "common/common.h"
#include "options/options.h"
+#include "osdep/threads.h"
enum {
// VO needs to redraw
@@ -66,7 +67,6 @@ enum mp_voctrl {
VOCTRL_RESUME,
VOCTRL_SET_PANSCAN,
- VOCTRL_SET_EQUALIZER,
// Triggered by any change to mp_vo_opts. This is for convenience. In theory,
// you could install your own listener.
@@ -122,6 +122,13 @@ enum mp_voctrl {
/* private to vo_gpu and vo_gpu_next */
VOCTRL_EXTERNAL_RESIZE,
+
+ // Begin VO dragging.
+ VOCTRL_BEGIN_DRAGGING,
+
+ // Native context menu
+ VOCTRL_SHOW_MENU,
+ VOCTRL_UPDATE_MENU,
};
// Helper to expose what kind of content is currently playing to the VO.
@@ -210,7 +217,7 @@ struct vo_frame {
// If 0, present immediately.
int64_t pts;
// Approximate frame duration, in ns.
- int duration;
+ double duration;
// Realtime of estimated distance between 2 vsync events.
double vsync_interval;
// "ideal" display time within the vsync
@@ -470,7 +477,17 @@ struct vo {
// be accessed unsynchronized (read-only).
int config_ok; // Last config call was successful?
- struct mp_image_params *params; // Configured parameters (as in vo_reconfig)
+
+ // --- The following fields are synchronized by params_mutex, most of
+ // the params are set only in the vo_reconfig and safe to read
+ // unsynchronized. Some of the parameters are updated in draw_frame,
+ // which are still safe to read in the play loop, but for correctness
+ // generic getter is protected by params_mutex.
+ mp_mutex params_mutex;
+ // Configured parameters (changed in vo_reconfig)
+ struct mp_image_params *params;
+ // Target display parameters (VO is responsible for re-/setting)
+ struct mp_image_params *target_params;
// --- The following fields can be accessed only by the VO thread, or from
// anywhere _if_ the VO thread is suspended (use vo->dispatch).
@@ -486,6 +503,9 @@ struct vo {
int dwidth;
int dheight;
float monitor_par;
+
+ // current GPU context (--vo=gpu and --vo=gpu-next only)
+ const char *context_name;
};
struct mpv_global;
@@ -499,6 +519,7 @@ bool vo_is_ready_for_frame(struct vo *vo, int64_t next_pts);
void vo_queue_frame(struct vo *vo, struct vo_frame *frame);
void vo_wait_frame(struct vo *vo);
bool vo_still_displaying(struct vo *vo);
+void vo_request_wakeup_on_done(struct vo *vo);
bool vo_has_frame(struct vo *vo);
void vo_redraw(struct vo *vo);
bool vo_want_redraw(struct vo *vo);
@@ -540,5 +561,6 @@ void vo_get_src_dst_rects(struct vo *vo, struct mp_rect *out_src,
struct vo_frame *vo_frame_ref(struct vo_frame *frame);
struct mp_image_params vo_get_current_params(struct vo *vo);
+struct mp_image_params vo_get_target_params(struct vo *vo);
#endif /* MPLAYER_VIDEO_OUT_H */