diff options
author | wm4 <wm4@nowhere> | 2013-12-21 19:06:37 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 20:50:13 +0100 |
commit | 3846fc758789711347c0b11f87736b27fc6210a0 (patch) | |
tree | e9b01445291326f0a026e0b002d78f1487d781b2 /sub/osd.c | |
parent | 92f9b514263d8becf670c19567826bd288595fe7 (diff) | |
download | mpv-3846fc758789711347c0b11f87736b27fc6210a0.tar.bz2 mpv-3846fc758789711347c0b11f87736b27fc6210a0.tar.xz |
sub/osd: mp_msg conversions
Diffstat (limited to 'sub/osd.c')
-rw-r--r-- | sub/osd.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -31,6 +31,7 @@ #include "talloc.h" #include "options/options.h" +#include "common/global.h" #include "common/msg.h" #include "osd.h" #include "dec_sub.h" @@ -79,11 +80,13 @@ static bool osd_res_equals(struct mp_osd_res a, struct mp_osd_res b) && a.display_par == b.display_par; } -struct osd_state *osd_create(struct MPOpts *opts) +struct osd_state *osd_create(struct mpv_global *global) { struct osd_state *osd = talloc_zero(NULL, struct osd_state); *osd = (struct osd_state) { - .opts = opts, + .opts = global->opts, + .global = global, + .log = mp_log_new(osd, global->log, "osd"), .osd_text = talloc_strdup(osd, ""), .sub_text = talloc_strdup(osd, ""), .progbar_type = -1, @@ -246,8 +249,7 @@ void osd_draw(struct osd_state *osd, struct mp_osd_res res, if (formats[imgs.format]) { cb(cb_ctx, &imgs); } else { - mp_msg(MSGT_OSD, MSGL_ERR, - "Can't render OSD part %d (format %d).\n", + MP_ERR(osd, "Can't render OSD part %d (format %d).\n", obj->type, imgs.format); } } |