Path: blob/21.2-virgl/src/gallium/frontends/xvmc/tests/testlib.h
4573 views
/**************************************************************************1*2* Copyright 2009 Younes Manton.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627#ifndef testlib_h28#define testlib_h2930/*31#define TEST(pred, doc) test(pred, #pred, doc, __FILE__, __LINE__)3233void test(int pred, const char *pred_string, const char *doc_string, const char *file, unsigned int line);34*/3536#include <sys/time.h>37#include <X11/Xlib.h>38#include <X11/extensions/XvMClib.h>3940/*41* display: IN A valid X display42* width, height: IN Surface size that the port must display43* chroma_format: IN Chroma format that the port must display44* mc_types, num_mc_types: IN List of MC types that the port must support, first port that matches the first mc_type will be returned45* port_id: OUT Your port's ID46* surface_type_id: OUT Your port's surface ID47* is_overlay: OUT If 1, port uses overlay surfaces, you need to set a colorkey48* intra_unsigned: OUT If 1, port uses unsigned values for intra-coded blocks49*/50int GetPort51(52Display *display,53unsigned int width,54unsigned int height,55unsigned int chroma_format,56const unsigned int *mc_types,57unsigned int num_mc_types,58XvPortID *port_id,59int *surface_type_id,60unsigned int *is_overlay,61unsigned int *intra_unsigned62);6364unsigned int align(unsigned int value, unsigned int alignment);6566int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);6768#endif697071