Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into pipe-video
[mesa.git] / src / gallium / state_trackers / vdpau / query.c
1 /**************************************************************************
2 *
3 * Copyright 2010 Younes Manton.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 #include "vdpau_private.h"
29
30 VdpStatus
31 vlVdpGetApiVersion(uint32_t *api_version)
32 {
33 if (!api_version)
34 return VDP_STATUS_INVALID_POINTER;
35
36 *api_version = 1;
37 return VDP_STATUS_OK;
38 }
39
40 VdpStatus
41 vlVdpGetInformationString(char const **information_string)
42 {
43 if (!information_string)
44 return VDP_STATUS_INVALID_POINTER;
45
46 *information_string = "VDPAU-G3DVL";
47 return VDP_STATUS_OK;
48 }
49
50 VdpStatus
51 vlVdpVideoSurfaceQueryCapabilities(VdpDevice device, VdpChromaType surface_chroma_type,
52 VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)
53 {
54 if (!(is_supported && max_width && max_height))
55 return VDP_STATUS_INVALID_POINTER;
56
57 return VDP_STATUS_NO_IMPLEMENTATION;
58 }
59
60 VdpStatus
61 vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaType surface_chroma_type,
62 VdpYCbCrFormat bits_ycbcr_format,
63 VdpBool *is_supported)
64 {
65 if (!is_supported)
66 return VDP_STATUS_INVALID_POINTER;
67
68 return VDP_STATUS_NO_IMPLEMENTATION;
69 }
70
71 VdpStatus
72 vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile,
73 VdpBool *is_supported, uint32_t *max_level, uint32_t *max_macroblocks,
74 uint32_t *max_width, uint32_t *max_height)
75 {
76 if (!(is_supported && max_level && max_macroblocks && max_width && max_height))
77 return VDP_STATUS_INVALID_POINTER;
78
79 return VDP_STATUS_NO_IMPLEMENTATION;
80 }
81
82 VdpStatus
83 vlVdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
84 VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)
85 {
86 if (!(is_supported && max_width && max_height))
87 return VDP_STATUS_INVALID_POINTER;
88
89 return VDP_STATUS_NO_IMPLEMENTATION;
90 }
91
92 VdpStatus
93 vlVdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
94 VdpBool *is_supported)
95 {
96 if (!is_supported)
97 return VDP_STATUS_INVALID_POINTER;
98
99 return VDP_STATUS_NO_IMPLEMENTATION;
100 }
101
102 VdpStatus
103 vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
104 VdpYCbCrFormat bits_ycbcr_format,
105 VdpBool *is_supported)
106 {
107 if (!is_supported)
108 return VDP_STATUS_INVALID_POINTER;
109
110 return VDP_STATUS_NO_IMPLEMENTATION;
111 }
112
113 VdpStatus
114 vlVdpBitmapSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
115 VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)
116 {
117 if (!(is_supported && max_width && max_height))
118 return VDP_STATUS_INVALID_POINTER;
119
120 return VDP_STATUS_NO_IMPLEMENTATION;
121 }
122
123 VdpStatus
124 vlVdpVideoMixerQueryFeatureSupport(VdpDevice device, VdpVideoMixerFeature feature,
125 VdpBool *is_supported)
126 {
127 if (!is_supported)
128 return VDP_STATUS_INVALID_POINTER;
129
130 return VDP_STATUS_NO_IMPLEMENTATION;
131 }
132
133 VdpStatus
134 vlVdpVideoMixerQueryParameterSupport(VdpDevice device, VdpVideoMixerParameter parameter,
135 VdpBool *is_supported)
136 {
137 if (!is_supported)
138 return VDP_STATUS_INVALID_POINTER;
139
140 return VDP_STATUS_NO_IMPLEMENTATION;
141 }
142
143 VdpStatus
144 vlVdpVideoMixerQueryParameterValueRange(VdpDevice device, VdpVideoMixerParameter parameter,
145 void *min_value, void *max_value)
146 {
147 if (!(min_value && max_value))
148 return VDP_STATUS_INVALID_POINTER;
149
150 return VDP_STATUS_NO_IMPLEMENTATION;
151 }
152
153 VdpStatus
154 vlVdpVideoMixerQueryAttributeSupport(VdpDevice device, VdpVideoMixerAttribute attribute,
155 VdpBool *is_supported)
156 {
157 if (!is_supported)
158 return VDP_STATUS_INVALID_POINTER;
159
160 return VDP_STATUS_NO_IMPLEMENTATION;
161 }
162
163 VdpStatus
164 vlVdpVideoMixerQueryAttributeValueRange(VdpDevice device, VdpVideoMixerAttribute attribute,
165 void *min_value, void *max_value)
166 {
167 if (!(min_value && max_value))
168 return VDP_STATUS_INVALID_POINTER;
169
170 return VDP_STATUS_NO_IMPLEMENTATION;
171 }