summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
Diffstat (limited to 'sub')
-rw-r--r--sub/osd.c15
-rw-r--r--sub/osd.h7
-rw-r--r--sub/osd_dummy.c7
-rw-r--r--sub/osd_libass.c10
4 files changed, 0 insertions, 39 deletions
diff --git a/sub/osd.c b/sub/osd.c
index 81cfb7daa6..a9bc035c73 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -422,21 +422,6 @@ bool osd_query_and_reset_want_redraw(struct osd_state *osd)
return r;
}
-// Scale factor to translate OSD coordinates to what the obj uses internally.
-// osd_coordinates * (sw, sh) = obj_coordinates
-void osd_object_get_scale_factor(struct osd_state *osd, int obj,
- double *sw, double *sh)
-{
- int nw, nh;
- osd_object_get_resolution(osd, obj, &nw, &nh);
- pthread_mutex_lock(&osd->lock);
- int vow = osd->objs[obj]->vo_res.w;
- int voh = osd->objs[obj]->vo_res.h;
- pthread_mutex_unlock(&osd->lock);
- *sw = vow ? nw / (double)vow : 0;
- *sh = voh ? nh / (double)voh : 0;
-}
-
struct mp_osd_res osd_get_vo_res(struct osd_state *osd, int obj)
{
pthread_mutex_lock(&osd->lock);
diff --git a/sub/osd.h b/sub/osd.h
index 4e18ce7f7c..c066b09645 100644
--- a/sub/osd.h
+++ b/sub/osd.h
@@ -190,9 +190,6 @@ void osd_draw_on_image_p(struct osd_state *osd, struct mp_osd_res res,
struct mp_image_params;
struct mp_osd_res osd_res_from_image_params(const struct mp_image_params *p);
-void osd_object_get_scale_factor(struct osd_state *osd, int obj,
- double *sw, double *sh);
-
struct mp_osd_res osd_get_vo_res(struct osd_state *osd, int obj);
void osd_rescale_bitmaps(struct sub_bitmaps *imgs, int frame_w, int frame_h,
@@ -211,8 +208,4 @@ void osd_get_function_sym(char *buffer, size_t buffer_size, int osd_function);
extern const char *const osd_ass_0;
extern const char *const osd_ass_1;
-// defined in backend, but locks if required
-void osd_object_get_resolution(struct osd_state *osd, int obj,
- int *out_w, int *out_h);
-
#endif /* MPLAYER_SUB_H */
diff --git a/sub/osd_dummy.c b/sub/osd_dummy.c
index 5c50569dd6..1982870248 100644
--- a/sub/osd_dummy.c
+++ b/sub/osd_dummy.c
@@ -26,10 +26,3 @@ void osd_object_get_bitmaps(struct osd_state *osd, struct osd_object *obj,
{
*out_imgs = (struct sub_bitmaps) {0};
}
-
-void osd_object_get_resolution(struct osd_state *osd, int obj,
- int *out_w, int *out_h)
-{
- *out_w = 0;
- *out_h = 0;
-}
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index eed2822380..cd28396746 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -477,13 +477,3 @@ void osd_object_get_bitmaps(struct osd_state *osd, struct osd_object *obj,
&obj->parts_cache, out_imgs);
talloc_steal(obj, obj->parts_cache);
}
-
-void osd_object_get_resolution(struct osd_state *osd, int obj,
- int *out_w, int *out_h)
-{
- pthread_mutex_lock(&osd->lock);
- struct osd_object *osd_obj = osd->objs[obj];
- *out_w = osd_obj->osd_track ? osd_obj->osd_track->PlayResX : 0;
- *out_h = osd_obj->osd_track ? osd_obj->osd_track->PlayResY : 0;
- pthread_mutex_unlock(&osd->lock);
-}