summaryrefslogtreecommitdiffstats
path: root/video/out/gl_osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-12 01:33:33 +0200
committerwm4 <wm4@nowhere>2013-09-12 01:34:42 +0200
commit1061f43a2ffb389004fb97b969c05140061557ee (patch)
treed94f73e0b55033f03a9c995ee7e22c7e7e5d5319 /video/out/gl_osd.c
parent3a9c5ef687d982f3a3e97bb93f6fa84876a1876c (diff)
downloadmpv-1061f43a2ffb389004fb97b969c05140061557ee.tar.bz2
mpv-1061f43a2ffb389004fb97b969c05140061557ee.tar.xz
gl_osd: mp_msg conversion
Diffstat (limited to 'video/out/gl_osd.c')
-rw-r--r--video/out/gl_osd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/gl_osd.c b/video/out/gl_osd.c
index 3317062311..547a8b6789 100644
--- a/video/out/gl_osd.c
+++ b/video/out/gl_osd.c
@@ -45,13 +45,14 @@ static const struct osd_fmt_entry osd_to_gl_legacy_formats[SUBBITMAP_COUNT] = {
[SUBBITMAP_RGBA] = {GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE},
};
-struct mpgl_osd *mpgl_osd_init(GL *gl, bool legacy)
+struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, bool legacy)
{
GLint max_texture_size;
gl->GetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
struct mpgl_osd *ctx = talloc_ptrtype(NULL, ctx);
*ctx = (struct mpgl_osd) {
+ .log = log,
.gl = gl,
.fmt_table = legacy ? osd_to_gl_legacy_formats : osd_to_gl3_formats,
.scratch = talloc_zero_size(ctx, 1),
@@ -121,8 +122,8 @@ static bool upload_pbo(struct mpgl_osd *ctx, struct mpgl_osd_part *osd,
gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
if (!success) {
- mp_msg(MSGT_VO, MSGL_FATAL, "[gl] Error: can't upload subtitles! "
- "Remove the 'pbo' suboption.\n");
+ MP_FATAL(ctx, "Error: can't upload subtitles! "
+ "Remove the 'pbo' suboption.\n");
}
return success;
@@ -157,9 +158,8 @@ static bool upload_osd(struct mpgl_osd *ctx, struct mpgl_osd_part *osd,
osd->packer->padding = ctx->scaled || imgs->scaled;
int r = packer_pack_from_subbitmaps(osd->packer, imgs);
if (r < 0) {
- mp_msg(MSGT_VO, MSGL_ERR, "[gl] OSD bitmaps do not fit on "
- "a surface with the maximum supported size %dx%d.\n",
- osd->packer->w_max, osd->packer->h_max);
+ MP_ERR(ctx, "OSD bitmaps do not fit on a surface with the maximum "
+ "supported size %dx%d.\n", osd->packer->w_max, osd->packer->h_max);
return false;
}