g3dvl: Move XvMC under the Xorg state tracker.
[mesa.git] / src / gallium / state_trackers / xorg / xvmc / tests / testlib.h
1 #ifndef testlib_h
2 #define testlib_h
3
4 /*
5 #define TEST(pred, doc) test(pred, #pred, doc, __FILE__, __LINE__)
6
7 void test(int pred, const char *pred_string, const char *doc_string, const char *file, unsigned int line);
8 */
9
10 #include <sys/time.h>
11 #include <X11/Xlib.h>
12 #include <X11/extensions/XvMClib.h>
13
14 /*
15 * display: IN A valid X display
16 * width, height: IN Surface size that the port must display
17 * chroma_format: IN Chroma format that the port must display
18 * 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
19 * port_id: OUT Your port's ID
20 * surface_type_id: OUT Your port's surface ID
21 * is_overlay: OUT If 1, port uses overlay surfaces, you need to set a colorkey
22 * intra_unsigned: OUT If 1, port uses unsigned values for intra-coded blocks
23 */
24 int GetPort
25 (
26 Display *display,
27 unsigned int width,
28 unsigned int height,
29 unsigned int chroma_format,
30 const unsigned int *mc_types,
31 unsigned int num_mc_types,
32 XvPortID *port_id,
33 int *surface_type_id,
34 unsigned int *is_overlay,
35 unsigned int *intra_unsigned
36 );
37
38 unsigned int align(unsigned int value, unsigned int alignment);
39
40 int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
41
42 #endif