device.c revision 49e24d3b8c0129e11fcc94b6e74dc2589d64c882
15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)/************************************************************************** 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * Copyright 2010 Younes Manton og Thomas Balling Sørensen. 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * All Rights Reserved. 5a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) * 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * Permission is hereby granted, free of charge, to any person obtaining a 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * copy of this software and associated documentation files (the 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * "Software"), to deal in the Software without restriction, including 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * without limitation the rights to use, copy, modify, merge, publish, 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * distribute, sub license, and/or sell copies of the Software, and to 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * permit persons to whom the Software is furnished to do so, subject to 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * the following conditions: 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 14a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) * The above copyright notice and this permission notice (including the 15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) * next paragraph) shall be included in all copies or substantial portions 16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) * of the Software. 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) **************************************************************************/ 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "pipe/p_compiler.h" 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "util/u_memory.h" 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "util/u_debug.h" 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "vl_winsys.h" 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "vdpau_private.h" 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)PUBLIC VdpStatus 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VdpGetProcAddress **get_proc_address) 405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles){ 415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VdpStatus ret; 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) vlVdpDevice *dev = NULL; 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!(display && device && get_proc_address)) 455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_INVALID_POINTER; 465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!vlCreateHTAB()) { 485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) ret = VDP_STATUS_RESOURCES; 495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) goto no_htab; 505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) dev = CALLOC(1, sizeof(vlVdpDevice)); 535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!dev) { 545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) ret = VDP_STATUS_RESOURCES; 555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) goto no_dev; 565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) dev->vscreen = vl_screen_create(display, screen); 595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!dev->vscreen) { 605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) ret = VDP_STATUS_RESOURCES; 615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) goto no_vscreen; 625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 63a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 64a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch dev->context = vl_video_create(dev->vscreen); 65a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch if (!dev->context) { 66a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch ret = VDP_STATUS_RESOURCES; 67a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch goto no_context; 68a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch } 695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *device = vlAddDataHTAB(dev); 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (*device == 0) { 725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) ret = VDP_STATUS_ERROR; 735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) goto no_handle; 745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) vl_compositor_init(&dev->compositor, dev->context->pipe); 775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *get_proc_address = &vlVdpGetProcAddress; 795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Device created succesfully\n"); 805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 81a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch return VDP_STATUS_OK; 82a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 83a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochno_handle: 84a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch /* Destroy vscreen */ 85a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochno_context: 86a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vl_screen_destroy(dev->vscreen); 87a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochno_vscreen: 885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) FREE(dev); 895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)no_dev: 905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) vlDestroyHTAB(); 915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)no_htab: 925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return ret; 935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 94a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)PUBLIC VdpStatus 965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)vlVdpPresentationQueueTargetCreateX11(VdpDevice device, Drawable drawable, 975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VdpPresentationQueueTarget *target) 985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles){ 995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) vlVdpPresentationQueueTarget *pqt; 100a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch VdpStatus ret; 1015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating PresentationQueueTarget\n"); 1035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 104a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch if (!drawable) 105a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch return VDP_STATUS_INVALID_HANDLE; 106a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 107a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vlVdpDevice *dev = vlGetDataHTAB(device); 1085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!dev) 1095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_INVALID_HANDLE; 110a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 1115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) pqt = CALLOC(1, sizeof(vlVdpPresentationQueue)); 112a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch if (!pqt) 1135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_RESOURCES; 1145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 115a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch pqt->device = dev; 116a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch pqt->drawable = drawable; 117a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 118a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch *target = vlAddDataHTAB(pqt); 119a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch if (*target == 0) { 120a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch ret = VDP_STATUS_ERROR; 1215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) goto no_handle; 1225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 1235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_OK; 125a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 126a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochno_handle: 127a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch FREE(pqt); 128a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch return ret; 129a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch} 130a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 131a02191e04bc25c4935f804f2c080ae28663d096dBen MurdochVdpStatus 132a02191e04bc25c4935f804f2c080ae28663d096dBen MurdochvlVdpPresentationQueueTargetDestroy(VdpPresentationQueueTarget presentation_queue_target) 133a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch{ 134a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vlVdpPresentationQueueTarget *pqt; 135a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 136a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying PresentationQueueTarget\n"); 1375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) pqt = vlGetDataHTAB(presentation_queue_target); 1395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!pqt) 1405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_INVALID_HANDLE; 1415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) vlRemoveDataHTAB(presentation_queue_target); 1435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) FREE(pqt); 1445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_OK; 1465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 147a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 148a02191e04bc25c4935f804f2c080ae28663d096dBen MurdochVdpStatus 149a02191e04bc25c4935f804f2c080ae28663d096dBen MurdochvlVdpDeviceDestroy(VdpDevice device) 150a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch{ 151a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying destroy\n"); 152a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 153a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vlVdpDevice *dev = vlGetDataHTAB(device); 154a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch if (!dev) 155a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch return VDP_STATUS_INVALID_HANDLE; 156a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 157a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vl_compositor_cleanup(&dev->compositor); 158a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vl_video_destroy(dev->context); 159a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vl_screen_destroy(dev->vscreen); 160a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 161a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch FREE(dev); 162a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch vlDestroyHTAB(); 163a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 1645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Device destroyed succesfully\n"); 1655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_OK; 1675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)VdpStatus 1705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)vlVdpGetProcAddress(VdpDevice device, VdpFuncId function_id, void **function_pointer) 1715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles){ 1725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) vlVdpDevice *dev = vlGetDataHTAB(device); 1735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!dev) 1745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_INVALID_HANDLE; 1755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!function_pointer) 1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_INVALID_POINTER; 1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!vlGetFuncFTAB(function_id, function_pointer)) 1805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return VDP_STATUS_INVALID_FUNC_ID; 1815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 182a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Got proc adress %p for id %d\n", *function_pointer, function_id); 183 184 return VDP_STATUS_OK; 185} 186 187#define _ERROR_TYPE(TYPE,STRING) case TYPE: return STRING; 188 189char const * 190vlVdpGetErrorString (VdpStatus status) 191{ 192 switch (status) { 193 _ERROR_TYPE(VDP_STATUS_OK,"The operation completed successfully; no error."); 194 _ERROR_TYPE(VDP_STATUS_NO_IMPLEMENTATION,"No backend implementation could be loaded."); 195 _ERROR_TYPE(VDP_STATUS_DISPLAY_PREEMPTED,"The display was preempted, or a fatal error occurred. The application must re-initialize VDPAU."); 196 _ERROR_TYPE(VDP_STATUS_INVALID_HANDLE,"An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type."); 197 _ERROR_TYPE(VDP_STATUS_INVALID_POINTER ,"An invalid pointer was provided. Typically, this means that a NULL pointer was provided for an 'output' parameter."); 198 _ERROR_TYPE(VDP_STATUS_INVALID_CHROMA_TYPE ,"An invalid/unsupported VdpChromaType value was supplied."); 199 _ERROR_TYPE(VDP_STATUS_INVALID_Y_CB_CR_FORMAT,"An invalid/unsupported VdpYCbCrFormat value was supplied."); 200 _ERROR_TYPE(VDP_STATUS_INVALID_RGBA_FORMAT,"An invalid/unsupported VdpRGBAFormat value was supplied."); 201 _ERROR_TYPE(VDP_STATUS_INVALID_INDEXED_FORMAT,"An invalid/unsupported VdpIndexedFormat value was supplied."); 202 _ERROR_TYPE(VDP_STATUS_INVALID_COLOR_STANDARD,"An invalid/unsupported VdpColorStandard value was supplied."); 203 _ERROR_TYPE(VDP_STATUS_INVALID_COLOR_TABLE_FORMAT,"An invalid/unsupported VdpColorTableFormat value was supplied."); 204 _ERROR_TYPE(VDP_STATUS_INVALID_BLEND_FACTOR,"An invalid/unsupported VdpOutputSurfaceRenderBlendFactor value was supplied."); 205 _ERROR_TYPE(VDP_STATUS_INVALID_BLEND_EQUATION,"An invalid/unsupported VdpOutputSurfaceRenderBlendEquation value was supplied."); 206 _ERROR_TYPE(VDP_STATUS_INVALID_FLAG,"An invalid/unsupported flag value/combination was supplied."); 207 _ERROR_TYPE(VDP_STATUS_INVALID_DECODER_PROFILE,"An invalid/unsupported VdpDecoderProfile value was supplied."); 208 _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE,"An invalid/unsupported VdpVideoMixerFeature value was supplied."); 209 _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER ,"An invalid/unsupported VdpVideoMixerParameter value was supplied."); 210 _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE,"An invalid/unsupported VdpVideoMixerAttribute value was supplied."); 211 _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE,"An invalid/unsupported VdpVideoMixerPictureStructure value was supplied."); 212 _ERROR_TYPE(VDP_STATUS_INVALID_FUNC_ID,"An invalid/unsupported VdpFuncId value was supplied."); 213 _ERROR_TYPE(VDP_STATUS_INVALID_SIZE,"The size of a supplied object does not match the object it is being used with.\ 214 For example, a VdpVideoMixer is configured to process VdpVideoSurface objects of a specific size.\ 215 If presented with a VdpVideoSurface of a different size, this error will be raised."); 216 _ERROR_TYPE(VDP_STATUS_INVALID_VALUE,"An invalid/unsupported value was supplied.\ 217 This is a catch-all error code for values of type other than those with a specific error code."); 218 _ERROR_TYPE(VDP_STATUS_INVALID_STRUCT_VERSION,"An invalid/unsupported structure version was specified in a versioned structure. \ 219 This implies that the implementation is older than the header file the application was built against."); 220 _ERROR_TYPE(VDP_STATUS_RESOURCES,"The system does not have enough resources to complete the requested operation at this time."); 221 _ERROR_TYPE(VDP_STATUS_HANDLE_DEVICE_MISMATCH,"The set of handles supplied are not all related to the same VdpDevice.When performing operations \ 222 that operate on multiple surfaces, such as VdpOutputSurfaceRenderOutputSurface or VdpVideoMixerRender, \ 223 all supplied surfaces must have been created within the context of the same VdpDevice object. \ 224 This error is raised if they were not."); 225 _ERROR_TYPE(VDP_STATUS_ERROR,"A catch-all error, used when no other error code applies."); 226 default: return "Unknown Error"; 227 } 228} 229