xine-lib: xine-lib-1.2.12/src/video_out/xv_common.h Source File

xine-lib 1.2.12

xv_common.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2018 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 *
20 * xv_common.h: X11 Xv common bits
21 */
22
23#include <xine/video_out.h>
24
25#define VIDEO_DEVICE_XV_COLORKEY_HELP \
26 _("video overlay colour key"), \
27 _("The colour key is used to tell the graphics card where to " \
28 "overlay the video image. Try different values, if you "\
29 "experience windows becoming transparent.")
30
31#define VIDEO_DEVICE_XV_AUTOPAINT_COLORKEY_HELP \
32 _("autopaint colour key"), \
33 _("Make Xv autopaint its colour key.")
34
35#define VIDEO_DEVICE_XV_FILTER_HELP \
36 _("bilinear scaling mode"), \
37 _("Selects the bilinear scaling mode for Permedia cards. " \
38 "The individual values are:\n\n" \
39 "Permedia 2\n" \
40 "0 - disable bilinear filtering\n" \
41 "1 - enable bilinear filtering\n\n" \
42 "Permedia 3\n" \
43 "0 - disable bilinear filtering\n" \
44 "1 - horizontal linear filtering\n" \
45 "2 - enable full bilinear filtering")
46
47#define VIDEO_DEVICE_XV_DOUBLE_BUFFER_HELP \
48 _("enable double buffering"), \
49 _("Double buffering will synchronize the update of the video " \
50 "image to the repainting of the entire screen (\"vertical " \
51 "retrace\"). This eliminates flickering and tearing artifacts, " \
52 "but will use more graphics memory.")
53
54#define VIDEO_DEVICE_XV_PORT_HELP \
55 _("Xv port number"), \
56 _("Selects the Xv port number to use (0 to autodetect).")
57
58#define VIDEO_DEVICE_XV_PITCH_ALIGNMENT_HELP \
59 _("pitch alignment workaround"), \
60 _("Some buggy video drivers need a workaround to function properly.")
61
62#define VIDEO_DEVICE_XV_DECL_SYNC_ATOMS \
63 static const char *const sync_atoms[] = \
64 { "XV_SYNC_TO_VBLANK", "XV_VSYNC" };
65
66#define VIDEO_DEVICE_XV_DECL_PREFER_TYPES \
67 typedef enum { \
68 xv_prefer_none, xv_prefer_overlay, xv_prefer_textured, xv_prefer_blitter, \
69 } xv_prefertype; \
70 static const char *const prefer_labels[] = \
71 { "Any", "Overlay", "Textured Video", "Blitter", NULL }; \
72 static const char prefer_substrings[][8] = \
73 { "", "Overlay", "Texture", "Blitter" };
74#define VIDEO_DEVICE_XV_PREFER_TYPE_HELP \
75 _("video display method preference"), \
76 _("Selects which video output method is preferred. " \
77 "Detection is done using the reported Xv adaptor names.\n" \
78 "(Only applies when auto-detecting which Xv port to use.)")
79
80#define VIDEO_DEVICE_XV_DECL_BICUBIC_TYPES \
81 static const char *const bicubic_types[] = { "Off", "On", "Auto", NULL };
82#define VIDEO_DEVICE_XV_BICUBIC_HELP \
83 _("bicubic filtering"), \
84 _("This option controls bicubic filtering of the video image. " \
85 "It may be used instead of, or as well as, xine's deinterlacers.")
86
87#ifdef XV_PROPS
88
89/* port attributes that dont map to a standard vo prop */
90typedef enum {
91 XV_PROP_ITURBT_709 = VO_NUM_PROPERTIES,
92 XV_PROP_COLORSPACE,
93 XV_PROP_COLORKEY,
94 XV_PROP_AUTOPAINT_COLORKEY,
95 XV_PROP_FILTER,
96 XV_PROP_DOUBLE_BUFFER,
97 XV_PROP_SYNC_TO_VBLANK,
98 XV_PROP_BICUBIC,
99 XV_NUM_PROPERTIES
100} xv_prop_enum_t;
101
102typedef struct {
103 const char *name;
104 int index;
105 int caps;
106} xv_prop_list_t;
107
108static const xv_prop_list_t xv_props_list[] = {
109 { "XV_AUTOPAINT_COLORKEY", XV_PROP_AUTOPAINT_COLORKEY, VO_CAP_AUTOPAINT_COLORKEY },
110 { "XV_BICUBIC", XV_PROP_BICUBIC, 0 },
111 { "XV_BRIGHTNESS", VO_PROP_BRIGHTNESS, VO_CAP_BRIGHTNESS },
112 { "XV_COLORKEY", XV_PROP_COLORKEY, VO_CAP_COLORKEY },
113 { "XV_COLORSPACE", XV_PROP_COLORSPACE, VO_CAP_COLOR_MATRIX },
114 { "XV_CONTRAST", VO_PROP_CONTRAST, VO_CAP_CONTRAST },
115 { "XV_DOUBLE_BUFFER", XV_PROP_DOUBLE_BUFFER, 0 },
116 { "XV_FILTER", XV_PROP_FILTER, 0 },
117 { "XV_GAMMA", VO_PROP_GAMMA, VO_CAP_GAMMA },
118 { "XV_HUE", VO_PROP_HUE, VO_CAP_HUE },
119 { "XV_ITURBT_709", XV_PROP_ITURBT_709, VO_CAP_COLOR_MATRIX },
120 { "XV_SATURATION", VO_PROP_SATURATION, VO_CAP_SATURATION },
121 { "XV_SYNC_TO_VBLANK", XV_PROP_SYNC_TO_VBLANK, 0 },
122 { "XV_VSYNC", XV_PROP_SYNC_TO_VBLANK, 0 }
123};
124
125static const xv_prop_list_t *xv_find_prop (const char *name) {
126 unsigned int b = 0, e = sizeof (xv_props_list) / sizeof (xv_prop_list_t), m = e >> 1;
127 do {
128 int d = strcmp (name, xv_props_list[m].name);
129 if (d == 0)
130 return &xv_props_list[m];
131 if (d < 0)
132 e = m;
133 else
134 b = m + 1;
135 m = (b + e) >> 1;
136 } while (b != e);
137 return NULL;
138}
139
140#endif /* XV_PROPS */
video_out.h
VO_PROP_BRIGHTNESS
#define VO_PROP_BRIGHTNESS
Definition: video_out.h:258
VO_PROP_CONTRAST
#define VO_PROP_CONTRAST
Definition: video_out.h:257
VO_CAP_CONTRAST
#define VO_CAP_CONTRAST
Definition: video_out.h:341
VO_PROP_SATURATION
#define VO_PROP_SATURATION
Definition: video_out.h:256
VO_CAP_HUE
#define VO_CAP_HUE
Definition: video_out.h:339
VO_CAP_BRIGHTNESS
#define VO_CAP_BRIGHTNESS
Definition: video_out.h:342
VO_PROP_HUE
#define VO_PROP_HUE
Definition: video_out.h:255
VO_CAP_SATURATION
#define VO_CAP_SATURATION
Definition: video_out.h:340
VO_CAP_AUTOPAINT_COLORKEY
#define VO_CAP_AUTOPAINT_COLORKEY
Definition: video_out.h:344
VO_CAP_COLORKEY
#define VO_CAP_COLORKEY
Definition: video_out.h:343
VO_CAP_COLOR_MATRIX
#define VO_CAP_COLOR_MATRIX
Definition: video_out.h:337
VO_CAP_GAMMA
#define VO_CAP_GAMMA
Definition: video_out.h:350
VO_NUM_PROPERTIES
#define VO_NUM_PROPERTIES
Definition: video_out.h:289
VO_PROP_GAMMA
#define VO_PROP_GAMMA
Definition: video_out.h:265
name
const char * name
Definition: xine.c:1569
NULL
NULL
Definition: xine_plugin.c:78