summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
Diffstat (limited to 'filters')
-rw-r--r--filters/f_output_chain.c8
-rw-r--r--filters/filter.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/filters/f_output_chain.c b/filters/f_output_chain.c
index de01c954d7..b9ee7060cc 100644
--- a/filters/f_output_chain.c
+++ b/filters/f_output_chain.c
@@ -357,6 +357,13 @@ static double get_display_fps(struct mp_stream_info *i)
return res;
}
+static void get_display_res(struct mp_stream_info *i, int *res)
+{
+ struct chain *p = i->priv;
+ if (p->vo)
+ vo_control(p->vo, VOCTRL_GET_DISPLAY_RES, res);
+}
+
void mp_output_chain_set_vo(struct mp_output_chain *c, struct vo *vo)
{
struct chain *p = c->f->priv;
@@ -617,6 +624,7 @@ static void create_video_things(struct chain *p)
p->stream_info.priv = p;
p->stream_info.get_display_fps = get_display_fps;
+ p->stream_info.get_display_res = get_display_res;
p->f->stream_info = &p->stream_info;
diff --git a/filters/filter.h b/filters/filter.h
index 35a4afac83..8820199a42 100644
--- a/filters/filter.h
+++ b/filters/filter.h
@@ -398,6 +398,7 @@ struct mp_stream_info {
void *priv; // for use by whoever implements the callbacks
double (*get_display_fps)(struct mp_stream_info *i);
+ void (*get_display_res)(struct mp_stream_info *i, int *res);
struct mp_hwdec_devices *hwdec_devs;
struct osd_state *osd;