Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/gallium/frontends/xvmc/tests/testlib.h
4573 views
1
/**************************************************************************
2
*
3
* Copyright 2009 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 VMWARE 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
#ifndef testlib_h
29
#define testlib_h
30
31
/*
32
#define TEST(pred, doc) test(pred, #pred, doc, __FILE__, __LINE__)
33
34
void test(int pred, const char *pred_string, const char *doc_string, const char *file, unsigned int line);
35
*/
36
37
#include <sys/time.h>
38
#include <X11/Xlib.h>
39
#include <X11/extensions/XvMClib.h>
40
41
/*
42
* display: IN A valid X display
43
* width, height: IN Surface size that the port must display
44
* chroma_format: IN Chroma format that the port must display
45
* 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 returned
46
* port_id: OUT Your port's ID
47
* surface_type_id: OUT Your port's surface ID
48
* is_overlay: OUT If 1, port uses overlay surfaces, you need to set a colorkey
49
* intra_unsigned: OUT If 1, port uses unsigned values for intra-coded blocks
50
*/
51
int GetPort
52
(
53
Display *display,
54
unsigned int width,
55
unsigned int height,
56
unsigned int chroma_format,
57
const unsigned int *mc_types,
58
unsigned int num_mc_types,
59
XvPortID *port_id,
60
int *surface_type_id,
61
unsigned int *is_overlay,
62
unsigned int *intra_unsigned
63
);
64
65
unsigned int align(unsigned int value, unsigned int alignment);
66
67
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
68
69
#endif
70
71