1 /**************************************************************************
3 * Copyright 2010 Thomas Balling Sørensen.
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:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
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.
26 **************************************************************************/
28 #include "vdpau_private.h"
29 #include <vdpau/vdpau.h>
30 #include <util/u_debug.h>
31 #include <util/u_memory.h>
34 vlVdpPresentationQueueTargetDestroy (VdpPresentationQueueTarget presentation_queue_target
)
37 return VDP_STATUS_NO_IMPLEMENTATION
;
41 vlVdpPresentationQueueCreate ( VdpDevice device
,
42 VdpPresentationQueueTarget presentation_queue_target
,
43 VdpPresentationQueue
*presentation_queue
)
45 debug_printf("[VDPAU] Creating PresentationQueue\n");
47 vlVdpPresentationQueue
*pq
= NULL
;
49 if (!presentation_queue
)
50 return VDP_STATUS_INVALID_POINTER
;
52 vlVdpDevice
*dev
= vlGetDataHTAB(device
);
54 return VDP_STATUS_INVALID_HANDLE
;
56 vlVdpPresentationQueueTarget
*pqt
= vlGetDataHTAB(presentation_queue_target
);
58 return VDP_STATUS_INVALID_HANDLE
;
60 if (dev
!= pqt
->device
)
61 return VDP_STATUS_HANDLE_DEVICE_MISMATCH
;
63 pq
= CALLOC(1, sizeof(vlVdpPresentationQueue
));
65 return VDP_STATUS_RESOURCES
;
67 *presentation_queue
= vlAddDataHTAB(pq
);
68 if (*presentation_queue
== 0) {
69 ret
= VDP_STATUS_ERROR
;
81 vlVdpPresentationQueueDestroy (VdpPresentationQueue presentation_queue
)
84 return VDP_STATUS_NO_IMPLEMENTATION
;
88 vlVdpPresentationQueueSetBackgroundColor ( VdpPresentationQueue presentation_queue
,
89 VdpColor
*const background_color
)
91 if (!background_color
)
92 return VDP_STATUS_INVALID_POINTER
;
94 return VDP_STATUS_NO_IMPLEMENTATION
;
98 vlVdpPresentationQueueGetBackgroundColor ( VdpPresentationQueue presentation_queue
,
99 VdpColor
*const background_color
)
101 if (!background_color
)
102 return VDP_STATUS_INVALID_POINTER
;
104 return VDP_STATUS_NO_IMPLEMENTATION
;
108 vlVdpPresentationQueueGetTime ( VdpPresentationQueue presentation_queue
,
109 VdpTime
*current_time
)
112 return VDP_STATUS_INVALID_POINTER
;
114 return VDP_STATUS_NO_IMPLEMENTATION
;
118 vlVdpPresentationQueueDisplay ( VdpPresentationQueue presentation_queue
,
119 VdpOutputSurface surface
,
121 uint32_t clip_height
,
122 VdpTime earliest_presentation_time
)
125 return VDP_STATUS_NO_IMPLEMENTATION
;
129 vlVdpPresentationQueueBlockUntilSurfaceIdle ( VdpPresentationQueue presentation_queue
,
130 VdpOutputSurface surface
,
131 VdpTime
*first_presentation_time
)
133 if (!first_presentation_time
)
134 return VDP_STATUS_INVALID_POINTER
;
136 return VDP_STATUS_NO_IMPLEMENTATION
;
140 vlVdpPresentationQueueQuerySurfaceStatus ( VdpPresentationQueue presentation_queue
,
141 VdpOutputSurface surface
,
142 VdpPresentationQueueStatus
*status
,
143 VdpTime
*first_presentation_time
)
145 if (!(status
&& first_presentation_time
))
146 return VDP_STATUS_INVALID_POINTER
;
148 return VDP_STATUS_NO_IMPLEMENTATION
;