From c8930e80a850a9459157023db57ae723f7a82432 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 23 Oct 2013 19:06:14 +0200 Subject: video/out: remove useless info struct and redundant fields The author and comment fields were printed only in -v mode. --- video/filter/vf_vo.c | 9 +++------ video/out/vo.c | 6 +++--- video/out/vo.h | 16 +++------------- video/out/vo_caca.c | 8 ++------ video/out/vo_corevideo.c | 8 ++------ video/out/vo_direct3d.c | 18 ++++-------------- video/out/vo_image.c | 8 ++------ video/out/vo_lavc.c | 8 ++------ video/out/vo_null.c | 8 ++------ video/out/vo_opengl.c | 18 ++++++------------ video/out/vo_opengl_old.c | 10 ++++------ video/out/vo_sdl.c | 8 ++------ video/out/vo_vaapi.c | 9 +++------ video/out/vo_vdpau.c | 10 +++------- video/out/vo_wayland.c | 8 ++------ video/out/vo_x11.c | 10 ++++------ video/out/vo_xv.c | 12 ++++-------- 17 files changed, 51 insertions(+), 123 deletions(-) (limited to 'video') diff --git a/video/filter/vf_vo.c b/video/filter/vf_vo.c index cccfb45fc2..2e6e8e7170 100644 --- a/video/filter/vf_vo.c +++ b/video/filter/vf_vo.c @@ -44,16 +44,13 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *p, int flags return -1; } - const vo_info_t *info = video_out->driver->info; + const struct vo_driver *info = video_out->driver; mp_msg(MSGT_CPLAYER, MSGL_INFO, "VO: [%s] %dx%d => %dx%d %s %s\n", - info->short_name, + info->name, p->w, p->h, p->d_w, p->d_h, vo_format_name(p->imgfmt), (flags & VOFLAG_FLIPPING) ? " [flip]" : ""); - mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Description: %s\n", info->name); - mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Author: %s\n", info->author); - if (info->comment && strlen(info->comment) > 0) - mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Comment: %s\n", info->comment); + mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Description: %s\n", info->description); return vo_reconfig(video_out, p, flags); } diff --git a/video/out/vo.c b/video/out/vo.c index 65f3f680b4..b29e3f7c95 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -118,8 +118,8 @@ static bool get_desc(struct m_obj_desc *dst, int index) return false; const struct vo_driver *vo = video_out_drivers[index]; *dst = (struct m_obj_desc) { - .name = vo->info->short_name, - .description = vo->info->name, + .name = vo->name, + .description = vo->description, .priv_size = vo->priv_size, .priv_defaults = vo->priv_defaults, .options = vo->options, @@ -324,7 +324,7 @@ autoprobe: // now try the rest... for (int i = 0; video_out_drivers[i]; i++) { struct vo *vo = vo_create(global, input_ctx, encode_lavc_ctx, - (char *)video_out_drivers[i]->info->short_name, NULL); + (char *)video_out_drivers[i]->name, NULL); if (vo) return vo; } diff --git a/video/out/vo.h b/video/out/vo.h index 3b6adddb0c..57d5cfb6d0 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -123,18 +123,6 @@ struct voctrl_screenshot_args { #define VOFLAG_GL_DEBUG 0x40 // Hint to request debug OpenGL context #define VOFLAG_ALPHA 0x80 // Hint to request alpha framebuffer -typedef struct vo_info_s -{ - /* driver name ("Matrox Millennium G200/G400" */ - const char *name; - /* short name (for config strings) ("vdpau") */ - const char *short_name; - /* author ("Aaron Holtzman ") */ - const char *author; - /* any additional comments */ - const char *comment; -} vo_info_t; - struct vo; struct osd_state; struct mp_image; @@ -148,7 +136,9 @@ struct vo_driver { // Encoding functionality, which can be invoked via --o only. bool encode; - const vo_info_t *info; + const char *name; + const char *description; + /* * returns: zero on successful initialization, non-zero on error. */ diff --git a/video/out/vo_caca.c b/video/out/vo_caca.c index c71527d445..fabf5c7948 100644 --- a/video/out/vo_caca.c +++ b/video/out/vo_caca.c @@ -286,12 +286,8 @@ static int control(struct vo *vo, uint32_t request, void *data) } const struct vo_driver video_out_caca = { - .info = &(const vo_info_t) { - "libcaca", - "caca", - "Pigeon ", - "" - }, + .name = "caca", + .description = "libcaca", .preinit = preinit, .query_format = query_format, .config = config, diff --git a/video/out/vo_corevideo.c b/video/out/vo_corevideo.c index 25b02d6627..58eb711cec 100644 --- a/video/out/vo_corevideo.c +++ b/video/out/vo_corevideo.c @@ -589,12 +589,8 @@ static int query_format(struct vo *vo, uint32_t format) } const struct vo_driver video_out_corevideo = { - .info = &(const vo_info_t) { - "Mac OS X Core Video", - "corevideo", - "Nicolas Plourde and others", - "" - }, + .name = "corevideo", + .description = "Mac OS X Core Video", .preinit = preinit, .query_format = query_format, .reconfig = reconfig, diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index f16ac87703..9ad2322499 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -1725,15 +1725,9 @@ static const d3d_priv defaults = { .video_eq = { MP_CSP_EQ_CAPS_COLORMATRIX }, }; -#define AUTHOR "Georgi Petrov (gogothebee) and others" - const struct vo_driver video_out_direct3d = { - .info = &(const vo_info_t) { - "Direct3D 9 Renderer", - "direct3d", - AUTHOR, - "" - }, + .description = "Direct3D 9 Renderer", + .name = "direct3d", .preinit = preinit, .query_format = query_format, .config = config, @@ -1749,12 +1743,8 @@ const struct vo_driver video_out_direct3d = { }; const struct vo_driver video_out_direct3d_shaders = { - .info = &(const vo_info_t) { - "Direct3D 9 Renderer (using shaders for YUV conversion)", - "direct3d_shaders", - AUTHOR, - "" - }, + .description = "Direct3D 9 Renderer (using shaders for YUV conversion)", + .name = "direct3d_shaders", .preinit = preinit, .query_format = query_format, .config = config, diff --git a/video/out/vo_image.c b/video/out/vo_image.c index 411cdfd98b..64619a47d6 100644 --- a/video/out/vo_image.c +++ b/video/out/vo_image.c @@ -150,12 +150,8 @@ static int control(struct vo *vo, uint32_t request, void *data) const struct vo_driver video_out_image = { - .info = &(const vo_info_t) { - "Write video frames to image files", - "image", - "wm4", - "" - }, + .description = "Write video frames to image files", + .name = "image", .priv_size = sizeof(struct priv), .options = (const struct m_option[]) { OPT_SUBSTRUCT("", opts, image_writer_conf, 0), diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index a2cd9e048b..a5ef55e6cb 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -524,12 +524,8 @@ static int control(struct vo *vo, uint32_t request, void *data) const struct vo_driver video_out_lavc = { .buffer_frames = false, .encode = true, - .info = &(const struct vo_info_s){ - "video encoding using libavcodec", - "lavc", - "Nicolas George , Rudolf Polzer ", - "" - }, + .description = "video encoding using libavcodec", + .name = "lavc", .preinit = preinit, .query_format = query_format, .config = config, diff --git a/video/out/vo_null.c b/video/out/vo_null.c index 9927a0a53d..c7e81a8c16 100644 --- a/video/out/vo_null.c +++ b/video/out/vo_null.c @@ -67,12 +67,8 @@ static int control(struct vo *vo, uint32_t request, void *data) } const struct vo_driver video_out_null = { - .info = &(const vo_info_t) { - "Null video output", - "null", - "Aaron Holtzman ", - "" - }, + .description = "Null video output", + .name = "null", .preinit = preinit, .query_format = query_format, .config = config, diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 4a67231770..e1c07d8621 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -1,6 +1,8 @@ /* * This file is part of MPlayer. * + * Based on vo_gl.c by Reimar Doeffinger. + * * MPlayer is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -348,12 +350,8 @@ const struct m_option options[] = { }; const struct vo_driver video_out_opengl = { - .info = &(const vo_info_t) { - "Extended OpenGL Renderer", - "opengl", - "Based on vo_gl.c by Reimar Doeffinger", - "" - }, + .description = "Extended OpenGL Renderer", + .name = "opengl", .preinit = preinit, .query_format = query_format, .reconfig = reconfig, @@ -367,12 +365,8 @@ const struct vo_driver video_out_opengl = { }; const struct vo_driver video_out_opengl_hq = { - .info = &(const vo_info_t) { - "Extended OpenGL Renderer (high quality rendering preset)", - "opengl-hq", - "Based on vo_gl.c by Reimar Doeffinger", - "" - }, + .description = "Extended OpenGL Renderer (high quality rendering preset)", + .name = "opengl-hq", .preinit = preinit, .query_format = query_format, .reconfig = reconfig, diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c index e5a272103d..310583a8ed 100644 --- a/video/out/vo_opengl_old.c +++ b/video/out/vo_opengl_old.c @@ -1,6 +1,8 @@ /* * This file is part of MPlayer. * + * Original author: Reimar Doeffinger + * * MPlayer is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -2163,12 +2165,8 @@ static int control(struct vo *vo, uint32_t request, void *data) #define OPT_BASE_STRUCT struct gl_priv const struct vo_driver video_out_opengl_old = { - .info = &(const vo_info_t) { - "OpenGL", - "opengl-old", - "Reimar Doeffinger ", - "" - }, + .description = "OpenGL (legacy VO, may work better on older GPUs)", + .name = "opengl-old", .preinit = preinit, .query_format = query_format, .config = config, diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index c9e81c450d..60498e2847 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -995,12 +995,8 @@ static int control(struct vo *vo, uint32_t request, void *data) #define OPT_BASE_STRUCT struct priv const struct vo_driver video_out_sdl = { - .info = &(const vo_info_t) { - "SDL 2.0 Renderer", - "sdl", - "Rudolf Polzer ", - "" - }, + .description = "SDL 2.0 Renderer", + .name = "sdl", .priv_size = sizeof(struct priv), .priv_defaults = &(const struct priv) { .renderer_index = -1, diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c index 7dab1ed058..a810b1bc60 100644 --- a/video/out/vo_vaapi.c +++ b/video/out/vo_vaapi.c @@ -2,6 +2,7 @@ * VA API output module * * Copyright (C) 2008-2009 Splitted-Desktop Systems + * Gwenole Beauchesne * * This file is part of MPlayer. * @@ -643,12 +644,8 @@ static int preinit(struct vo *vo) #define OPT_BASE_STRUCT struct priv const struct vo_driver video_out_vaapi = { - .info = &(const vo_info_t) { - "VA API with X11", - "vaapi", - "Gwenole Beauchesne and others", - "" - }, + .description = "VA API with X11", + .name = "vaapi", .preinit = preinit, .query_format = query_format, .reconfig = reconfig, diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index bd2b5703ff..2140bde948 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -1,7 +1,7 @@ /* * VDPAU video output driver * - * Copyright (C) 2008 NVIDIA + * Copyright (C) 2008 NVIDIA (Rajib Mahapatra ) * Copyright (C) 2009 Uoti Urpala * * This file is part of MPlayer. @@ -1685,12 +1685,8 @@ static int control(struct vo *vo, uint32_t request, void *data) const struct vo_driver video_out_vdpau = { .buffer_frames = true, - .info = &(const struct vo_info_s){ - "VDPAU with X11", - "vdpau", - "Rajib Mahapatra and others", - "" - }, + .description = "VDPAU with X11", + .name = "vdpau", .preinit = preinit, .query_format = query_format, .config = config, diff --git a/video/out/vo_wayland.c b/video/out/vo_wayland.c index 7a590a87df..b1f99bd26f 100644 --- a/video/out/vo_wayland.c +++ b/video/out/vo_wayland.c @@ -711,12 +711,8 @@ static int control(struct vo *vo, uint32_t request, void *data) #define OPT_BASE_STRUCT struct priv const struct vo_driver video_out_wayland = { - .info = &(const vo_info_t) { - "Wayland SHM video output", - "wayland", - "Alexander Preisinger ", - "" - }, + .description = "Wayland SHM video output", + .name = "wayland", .priv_size = sizeof(struct priv), .preinit = preinit, .query_format = query_format, diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index c5d86faffd..a2c8ecb2e8 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -1,6 +1,8 @@ /* * This file is part of MPlayer. * + * Original author: Aaron Holtzman + * * MPlayer is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -656,12 +658,8 @@ static int control(struct vo *vo, uint32_t request, void *data) } const struct vo_driver video_out_x11 = { - .info = &(const vo_info_t) { - "X11 ( XImage/Shm )", - "x11", - "Aaron Holtzman ", - "" - }, + .description = "X11 ( XImage/Shm )", + .name = "x11", .priv_size = sizeof(struct priv), .options = (const struct m_option []){{0}}, .preinit = preinit, diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 8b56750382..660c4dd128 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -3,6 +3,8 @@ * * This file is part of MPlayer. * + * Original author: Gerd Knorr + * * MPlayer is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -56,13 +58,6 @@ #include "mpvcore/m_option.h" #include "osdep/timer.h" -static const vo_info_t info = { - "X11/Xv", - "xv", - "Gerd Knorr and others", - "" -}; - #define CK_METHOD_NONE 0 // no colorkey drawing #define CK_METHOD_BACKGROUND 1 // set colorkey as window background #define CK_METHOD_AUTOPAINT 2 // let xv draw the colorkey @@ -878,7 +873,8 @@ static int control(struct vo *vo, uint32_t request, void *data) #define OPT_BASE_STRUCT struct xvctx const struct vo_driver video_out_xv = { - .info = &info, + .description = "X11/Xv", + .name = "xv", .preinit = preinit, .query_format = query_format, .config = config, -- cgit v1.2.3