#ifndef XVLIB_H
#define XVLIB_H
#include <X11/Xfuncproto.h>
#include <X11/extensions/Xv.h>
typedef struct {
int numerator;
int denominator;
} XvRational;
typedef struct {
int flags;
int min_value;
int max_value;
char *name;
} XvAttribute;
typedef struct {
XvEncodingID encoding_id;
char *name;
unsigned long width;
unsigned long height;
XvRational rate;
unsigned long num_encodings;
} XvEncodingInfo;
typedef struct {
char depth;
unsigned long visual_id;
} XvFormat;
typedef struct {
XvPortID base_id;
unsigned long num_ports;
char type;
char *name;
unsigned long num_formats;
XvFormat *formats;
unsigned long num_adaptors;
} XvAdaptorInfo;
typedef struct {
int type;
unsigned long serial;
Bool send_event;
Display *display;
Drawable drawable;
unsigned long reason;
XvPortID port_id;
Time time;
} XvVideoNotifyEvent;
typedef struct {
int type;
unsigned long serial;
Bool send_event;
Display *display;
XvPortID port_id;
Time time;
Atom attribute;
long value;
} XvPortNotifyEvent;
typedef union {
int type;
XvVideoNotifyEvent xvvideo;
XvPortNotifyEvent xvport;
long pad[24];
} XvEvent;
typedef struct {
int id;
int type;
int byte_order;
char guid[16];
int bits_per_pixel;
int format;
int num_planes;
int depth;
unsigned int red_mask;
unsigned int green_mask;
unsigned int blue_mask;
unsigned int y_sample_bits;
unsigned int u_sample_bits;
unsigned int v_sample_bits;
unsigned int horz_y_period;
unsigned int horz_u_period;
unsigned int horz_v_period;
unsigned int vert_y_period;
unsigned int vert_u_period;
unsigned int vert_v_period;
char component_order[32];
int scanline_order;
} XvImageFormatValues;
typedef struct {
int id;
int width, height;
int data_size;
int num_planes;
int *pitches;
int *offsets;
char *data;
XPointer obdata;
} XvImage;
_XFUNCPROTOBEGIN
extern int XvQueryExtension(
#if NeedFunctionPrototypes
Display* ,
unsigned int* ,
unsigned int* ,
unsigned int* ,
unsigned int* ,
unsigned int*
#endif
);
extern int XvQueryAdaptors(
#if NeedFunctionPrototypes
Display* ,
Window ,
unsigned int* ,
XvAdaptorInfo**
#endif
);
extern int XvQueryEncodings(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
unsigned int* ,
XvEncodingInfo**
#endif
);
extern int XvPutVideo(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Drawable ,
GC ,
int ,
int ,
unsigned int ,
unsigned int ,
int ,
int ,
unsigned int ,
unsigned int
#endif
);
extern int XvPutStill(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Drawable ,
GC ,
int ,
int ,
unsigned int ,
unsigned int ,
int ,
int ,
unsigned int ,
unsigned int
#endif
);
extern int XvGetVideo(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Drawable ,
GC ,
int ,
int ,
unsigned int ,
unsigned int ,
int ,
int ,
unsigned int ,
unsigned int
#endif
);
extern int XvGetStill(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Drawable ,
GC ,
int ,
int ,
unsigned int ,
unsigned int ,
int ,
int ,
unsigned int ,
unsigned int
#endif
);
extern int XvStopVideo(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Drawable
#endif
);
extern int XvGrabPort(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Time
#endif
);
extern int XvUngrabPort(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Time
#endif
);
extern int XvSelectVideoNotify(
#if NeedFunctionPrototypes
Display* ,
Drawable ,
Bool
#endif
);
extern int XvSelectPortNotify(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Bool
#endif
);
extern int XvSetPortAttribute(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Atom ,
int
#endif
);
extern int XvGetPortAttribute(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Atom ,
int*
#endif
);
extern int XvQueryBestSize(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
Bool ,
unsigned int ,
unsigned int ,
unsigned int ,
unsigned int ,
unsigned int* ,
unsigned int*
#endif
);
extern XvAttribute* XvQueryPortAttributes(
#if NeedFunctionPrototypes
Display* ,
XvPortID ,
int*
#endif
);
extern void XvFreeAdaptorInfo(
#if NeedFunctionPrototypes
XvAdaptorInfo*
#endif
);
extern void XvFreeEncodingInfo(
#if NeedFunctionPrototypes
XvEncodingInfo*
#endif
);
extern XvImageFormatValues * XvListImageFormats (
#if NeedFunctionPrototypes
Display *display,
XvPortID port_id,
int *count_return
#endif
);
extern XvImage * XvCreateImage (
#if NeedFunctionPrototypes
Display *display,
XvPortID port,
int id,
char *data,
int width,
int height
#endif
);
extern int XvPutImage (
#if NeedFunctionPrototypes
Display *display,
XvPortID id,
Drawable d,
GC gc,
XvImage *image,
int src_x,
int src_y,
unsigned int src_w,
unsigned int src_h,
int dest_x,
int dest_y,
unsigned int dest_w,
unsigned int dest_h
#endif
);
extern int XvShmPutImage (
#if NeedFunctionPrototypes
Display *display,
XvPortID id,
Drawable d,
GC gc,
XvImage *image,
int src_x,
int src_y,
unsigned int src_w,
unsigned int src_h,
int dest_x,
int dest_y,
unsigned int dest_w,
unsigned int dest_h,
Bool send_event
#endif
);
#ifdef _XSHM_H_
extern XvImage * XvShmCreateImage (
#if NeedFunctionPrototypes
Display *display,
XvPortID port,
int id,
char* data,
int width,
int height,
XShmSegmentInfo *shminfo
#endif
);
#endif
_XFUNCPROTOEND
#endif