1XvCreateImage(3)                libXv Functions               XvCreateImage(3)
2
3
4

NAME

6       XvCreateImage, XvShmCreateImage - create an XvImage
7

SYNOPSIS

9       #include <X11/extensions/Xvlib.h>
10
11       XvImage * XvCreateImage (Display *dpy, XvPortID port,
12                                int id, char *data,
13                                int width, int height);
14
15       XvImage * XvShmCreateImage (Display *dpy, XvPortID port,
16                                   int id, char *data,
17                                   int width, int height,
18                                   XShmSegmentInfo *shminfo);
19

ARGUMENTS

21       dpy     Specifies the connection to the X server.
22
23       port    Specifies the port the XvImage will be used with.
24
25       id      Specifies the format of the image to be created by the XvImage‐
26               FormatValues id.
27
28       data    Specifies the image data.
29
30       width, height
31               Specifies the desired width and height of the image.
32

DESCRIPTION

34       XvCreateImage(3) is similar to XCreateImage(3).  XvShmCreateImage(3) is
35       similar  to  XShmCreateImage(3).  The library will allocate the XvImage
36       structure and fill out all fields except for data.   Width  and  height
37       may  be enlarged in some YUV formats.  The size of the data buffer that
38       needs to be allocated will be given in the data_size field in the XvIm‐
39       age.   Image  data  is  not allocated by this function.  The client may
40       pass a pointer to the preallocated memory as data or may  allocate  the
41       memory  and  fill  in  the  XvImage  structure's  data  field after the
42       data_size field has been filled out by the server.  The XvImage  struc‐
43       ture   may   be   freed   by  XFree(3).   Shared  memory  segments  are
44       attached/detached with XShmAttach(3)/XShmDetach(3).
45

RETURN VALUES

47       XvImage has the following structure:
48
49       typedef struct {
50          int id;
51          int width, height;
52          int data_size;
53          int num_planes;
54          int *pitches;
55          int *offsets;
56          char *data;
57          XPointer obdata;
58       } XvImage;
59
60
61       id      A descriptor for the format from the XvImageFormatValues struc‐
62               ture returned by XvListImageFormats(3).
63
64       width, height
65               The width and height of the image in pixels.
66
67       data_size
68               The size of the data buffer in bytes.
69
70       num_planes
71               The number of image planes.
72
73       pitches An  array  of  size num_planes indicating the scanline pitch in
74               bytes.  Each plane may have a different pitch.
75
76       offsets An array of size num_planes indicating  the  byte  offset  from
77               data to the start of each plane.
78
79       data    A pointer to the start of the data buffer.
80
81       obdata  A  private  field for holding SHM info.  This field will be set
82               up by the client libraries so  the  programmer  will  generally
83               need not be concerned with this field.
84

DIAGNOSTICS

86       [XvBadPort]
87               Generated if the requested port does not exist.
88
89       [XvBadAlloc]
90               Generated  if  the  X  server  was unable to allocate resources
91               required to complete the operation.
92
93       [BadMatch]
94               Generated if incompatible arguments were supplied,  such  as  a
95               port that isn't capable of displaying XvImages.
96

SEE ALSO

98       XvListImageFormats(3),   XCreateImage(3),  XShmCreateImage(3),  XShmAt‐
99       tach(3), XShmDetach(3).
100
101
102
103X Version 11                     libXv 1.0.11                 XvCreateImage(3)
Impressum