diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo.c | 15 | ||||
-rw-r--r-- | video/out/vo.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index f920e12da8..c348a37f24 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -748,6 +748,21 @@ bool vo_has_frame(struct vo *vo) return vo->in->hasframe; } +static void run_query_format(void *p) +{ + void **pp = p; + struct vo *vo = pp[0]; + *(int *)pp[2] = vo->driver->query_format(vo, *(int *)pp[1]); +} + +int vo_query_format(struct vo *vo, int format) +{ + int ret; + void *p[] = {vo, &format, &ret}; + mp_dispatch_run(vo->in->dispatch, run_query_format, p); + return ret; +} + // Calculate the appropriate source and destination rectangle to // get a correctly scaled picture, including pan-scan. // out_src: visible part of the video diff --git a/video/out/vo.h b/video/out/vo.h index a384ed5ad6..9e70bde310 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -288,6 +288,7 @@ void vo_seek_reset(struct vo *vo); void vo_destroy(struct vo *vo); void vo_set_paused(struct vo *vo, bool paused); int64_t vo_get_drop_count(struct vo *vo); +int vo_query_format(struct vo *vo, int format); void vo_set_flip_queue_offset(struct vo *vo, int64_t us); int64_t vo_get_vsync_interval(struct vo *vo); |