libxv: Changes to 'upstream-unstable'
.gitignore | 9 +
Makefile.am | 4
README | 25 +++
configure.ac | 15 -
include/.gitignore | 2
include/X11/.gitignore | 2
include/X11/extensions/.gitignore | 2
include/X11/extensions/Xvlib.h | 5
man/.gitignore | 3
man/Makefile.am | 13 +
man/Xv.man | 125 +++++++++++----
man/XvCreateImage.man | 103 +++++++++++++
man/XvFreeAdaptorInfo.man | 32 ++--
man/XvFreeEncodingInfo.man | 31 ++-
man/XvGetPortAttribute.man | 92 +++++------
man/XvGetStill.man | 105 +++++++------
man/XvGetVideo.man | 103 ++++++-------
man/XvGrabPort.man | 47 +++--
man/XvListImageFormats.man | 107 +++++++++++++
man/XvPortNotify.man | 22 +-
man/XvPutImage.man | 77 +++++++++
man/XvPutStill.man | 72 +++++----
man/XvPutVideo.man | 80 +++++-----
man/XvQueryAdaptors.man | 43 +++--
man/XvQueryBestSize.man | 43 ++---
man/XvQueryEncodings.man | 52 +++---
man/XvQueryExtension.man | 45 +++--
man/XvQueryPortAttributes.man | 55 ++++++
man/XvSelectPortNotify.man | 46 +++--
man/XvSelectVideoNotify.man | 37 ++--
man/XvSetPortAttribute.man | 102 ++++++------
man/XvShmCreateImage.man | 1
man/XvShmPutImage.man | 1
man/XvStopVideo.man | 45 +++--
man/XvUngrabPort.man | 37 ++--
man/XvVideoNotify.man | 32 ++--
man/xv-library-v2.2.txt | 300 ++++++++++++++++++++++++++++++++++++++
src/.gitignore | 6
src/Makefile.am | 7
39 files changed, 1372 insertions(+), 556 deletions(-)
New commits:
commit 5be9a0099a83d1acf464640e930518a4c46c0920
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Sat Oct 3 02:12:52 2009 -0700
libXv 1.0.5
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
diff --git a/configure.ac b/configure.ac
index ffe318f..4b01aac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(libXv, 1.0.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXv)
+AC_INIT(libXv, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXv)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
commit 5aa62bb376608cd0350e46263dec74f861019431
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Sat Oct 3 01:53:56 2009 -0700
Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
diff --git a/configure.ac b/configure.ac
index 084b3ce..ffe318f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,24 +29,21 @@ AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
-# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG, XORG_WITH_LINT
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.2)
+# Require xorg-macros: XORG_DEFAULT_OPTIONS, XORG_WITH_LINT
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
-XORG_CWARNFLAGS
+XORG_DEFAULT_OPTIONS
# Check for dependencies
PKG_CHECK_MODULES(XV, x11 xext xextproto videoproto)
AC_SUBST(XV_CFLAGS)
AC_SUBST(XV_LIBS)
-
+
XORG_CHECK_MALLOC_ZERO
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
dnl Allow checking code with lint, sparse, etc.
XORG_WITH_LINT
diff --git a/man/Makefile.am b/man/Makefile.am
index 4a3e969..9100048 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -76,4 +76,4 @@ MAN_SUBSTS = \
SUFFIXES = .$(LIB_MAN_SUFFIX) .man
.man.$(LIB_MAN_SUFFIX):
- sed $(MAN_SUBSTS) < $< > $@
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
commit 4d189188c913e6956344689802a582589db04abe
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Sat Oct 3 01:31:44 2009 -0700
Convert documentation from xv-library-v2.2.txt into man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
diff --git a/man/Makefile.am b/man/Makefile.am
index 2651cce..4a3e969 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -28,29 +28,37 @@ libmandir = $(LIB_MAN_DIR)
libman_PRE = \
Xv.man \
+ XvCreateImage.man \
XvFreeAdaptorInfo.man \
XvFreeEncodingInfo.man \
XvGetPortAttribute.man \
XvGetStill.man \
XvGetVideo.man \
XvGrabPort.man \
+ XvListImageFormats.man \
XvPortNotify.man \
+ XvPutImage.man \
XvPutStill.man \
XvPutVideo.man \
XvQueryAdaptors.man \
XvQueryBestSize.man \
XvQueryEncodings.man \
XvQueryExtension.man \
+ XvQueryPortAttributes.man \
XvSelectPortNotify.man \
XvSelectVideoNotify.man \
XvSetPortAttribute.man \
+ XvShmCreateImage.man \
+ XvShmPutImage.man \
XvStopVideo.man \
XvUngrabPort.man \
XvVideoNotify.man
libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@)
-EXTRA_DIST = $(libman_PRE)
+LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
+
+EXTRA_DIST = $(libman_PRE) xv-library-v2.2.txt
CLEANFILES = $(libman_DATA)
@@ -62,6 +70,7 @@ XORGRELSTRING = @PACKAGE_STRING@
MAN_SUBSTS = \
-e 's/__vendorversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
+ -e 's/__libmandirsuffix__/$(LIB_MAN_DIR_SUFFIX)/g' \
-e 's/__libmansuffix__/$(LIB_MAN_SUFFIX)/g'
SUFFIXES = .$(LIB_MAN_SUFFIX) .man
diff --git a/man/Xv.man b/man/Xv.man
index 3e41c5e..14abb71 100644
--- a/man/Xv.man
+++ b/man/Xv.man
@@ -3,10 +3,10 @@
.SH NAME
Xv \- X Window System video extension
.SH DESCRIPTION
-The Xv extension provides support for video adaptors attached to an X
-display. It takes the approach that a display may have one or more
-video adaptors, each of which has one or more ports through which
-independent video streams pass.
+The X Video Extension (Xv) extension provides support for video
+adaptors attached to an X display. It takes the approach that a
+display may have one or more video adaptors, each of which has one or
+more ports through which independent video streams pass.
.PP
An adaptor may be able to display video in a drawable, capture video
from a drawable, or both. It translates between video encoding (NTSC,
@@ -30,8 +30,30 @@ free to put video into a drawable or get video from a drawable,
according the capabilities supported. Clients can select to receive
events when video activity changes in a drawable and when port
attributes have changed.
+.PP
+The Xv protocol version 2.2 and later is extended to
+support client images in alternate colorspaces (XvImages).
+Xv adaptors which are capable of displaying XvImages will have
+the XvImageMask field set in the type field of the XvAdaptorInfo.
+XvImage formats supported by the port may be queried with
+.BR XvListImageFormats (__libmansuffix__).
+XvImages may be created with the help of
+.BR XvCreateImage (__libmansuffix__)
+or
+.BR XvShmCreateImage (__libmansuffix__);
+XvImages may be displayed with
+.BR XvPutImage (__libmansuffix__)
+or
+.BR XvShmPutImage (__libmansuffix__).
+The Port attributes of the port specified in the Xv(Shm)PutImage
+command will be valid for the image operation when applicable.
+There will be a port encoding with the name "XV_IMAGE". The width and height
+of that encoding will indicate the maximum source image size.
.SH SUMMARY OF LIBRARY FUNCTIONS
-The following is a summary of Xv library functions:
+The following is a summary of Xv library functions and events:
+.sp 1l
+.BR XvCreateImage (__libmansuffix__)
+\- create an XvImage
.sp 1l
.BR XvGetPortAttribute (__libmansuffix__)
\- return current port attribute value
@@ -45,9 +67,15 @@ The following is a summary of Xv library functions:
.BR XvGrabPort (__libmansuffix__)
\- lock port for exclusive use by client
.sp 1l
+.BR XvListImageFormats (__libmansuffix__)
+\- return list of image formats for a port
+.sp 1l
.BR XvPortNotify (__libmansuffix__)
\- event generated when port attributes change
.sp 1l
+.BR XvPutImage (__libmansuffix__)
+\- write a XvImage to a drawable
+.sp 1l
.BR XvPutStill (__libmansuffix__)
\- write a single frame of video to a drawable
.sp 1l
@@ -66,6 +94,9 @@ The following is a summary of Xv library functions:
.BR XvQueryExtension (__libmansuffix__)
\- return version and revision of extension
.sp 1l
+.BR XvQueryPortAttributes (__libmansuffix__)
+\- return list of attributes of a port
+.sp 1l
.BR XvSelectPortNotify (__libmansuffix__)
\- enable or disable XvPortNotify events
.sp 1l
@@ -75,6 +106,12 @@ The following is a summary of Xv library functions:
.BR XvSetPortAttribute (__libmansuffix__)
\- set an attribute for a port
.sp 1l
+.BR XvShmCreateImage (__libmansuffix__)
+\- create an XvImage in shared memory
+.sp 1l
+.BR XvShmPutImage (__libmansuffix__)
+\- write a XvImage in shared memory to a drawable
+.sp 1l
.BR XvStopVideo (__libmansuffix__)
\- stop active video
.sp 1l
@@ -85,6 +122,4 @@ The following is a summary of Xv library functions:
\- event generated for video processing
.sp 1l
.PP
-Each of these functions is described in its own Xv man page.
-
-
+Each of these functions and events is described in its own Xv man page.
diff --git a/man/XvCreateImage.man b/man/XvCreateImage.man
new file mode 100644
index 0000000..6cc1558
--- /dev/null
+++ b/man/XvCreateImage.man
@@ -0,0 +1,103 @@
+.TH XvCreateImage __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvCreateImage, XvShmCreateImage \- create an XvImage
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "XvImage * XvCreateImage (Display *" dpy ", XvPortID " port ","
+.BI " int " id ", char *" data ","
+.BI " int " width ", int " height ");"
+.sp
+.BI "XvImage * XvShmCreateImage (Display *" dpy ", XvPortID " port ","
+.BI " int " id ", char *" data ","
+.BI " int " width ", int " height ","
+.BI " XShmSegmentInfo *" shminfo ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Specifies the port the XvImage will be used with.
+.IP \fIid\fR 8
+Specifies the format of the image to be created by the XvImageFormatValues id.
+.IP \fIdata\fR 8
+Specifies the image data.
+.IP "\fIwidth\fR, \fIheight\fR" 8
+Specifies the desired width and height of the image.
+.\"
+.SH DESCRIPTION
+.BR XvCreateImage (__libmansuffix__)
+is similar to
+.BR XCreateImage (__libmansuffix__).
+.BR XvShmCreateImage (__libmansuffix__)
+is similar to
+.BR XShmCreateImage (__libmansuffix__).
+The library will allocate the XvImage structure and fill out all
+fields except for \fIdata\fR. \fIWidth\fR and \fIheight\fR may be
+enlarged in some YUV formats. The size of the data buffer that needs
+to be allocated will be given in the \fIdata_size\fR field in the XvImage.
+Image data is not allocated by this function. The client may pass a pointer
+to the preallocated memory as \fIdata\fR or may allocate the memory and fill in
+the XvImage structure's data field after the \fIdata_size\fR field has
+been filled out by the server. The XvImage structure may be freed by
+.BR XFree (__libmansuffix__).
+Shared memory segments are attached/detached with
+.BR XShmAttach (__libmansuffix__)/ XShmDetach (__libmansuffix__).
+.SH RETURN VALUES
+XvImage has the following structure:
+.EX
+
+typedef struct {
+ int id;
+ int width, height;
+ int data_size;
+ int num_planes;
+ int *pitches;
+ int *offsets;
+ char *data;
+ XPointer obdata;
+} XvImage;
+
+.EE
+.IP \fIid\fR 8
+A descriptor for the format from the XvImageFormatValues structure
+returned by
+.BR XvListImageFormats (__libmansuffix__).
+.IP "\fIwidth, height\fR" 8
+The width and height of the image in pixels.
+.IP \fIdata_size\fR 8
+The size of the data buffer in bytes.
+.IP \fInum_planes\fR 8
+The number of image planes.
+.IP \fIpitches\fR 8
+An array of size \fInum_planes\fR indicating the scanline pitch
+in bytes. Each plane may have a different pitch.
+.IP \fIoffsets\fR 8
+An array of size \fInum_planes\fR indicating the byte offset
+from \fIdata\fR to the start of each plane.
+.IP \fIdata\fR 8
+A pointer to the start of the data buffer.
+.IP \fIobdata\fR 8
+A private field for holding SHM info. This field will be
+set up by the client libraries so the programmer will
+generally need not be concerned with this field.
+.\"
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [XvBadAlloc] 8
+Generated if the X server was unable to allocate resources required
+to complete the operation.
+.IP [BadMatch] 8
+Generated if incompatible arguments were supplied, such as a port that
+isn't capable of displaying XvImages.
+.\"
+.SH SEE ALSO
+.BR XvListImageFormats (__libmansuffix__),
+.BR XCreateImage (__libmansuffix__),
+.BR XShmCreateImage (__libmansuffix__),
+.BR XShmAttach (__libmansuffix__),
+.BR XShmDetach (__libmansuffix__).
diff --git a/man/XvListImageFormats.man b/man/XvListImageFormats.man
new file mode 100644
index 0000000..c5159e5
--- /dev/null
+++ b/man/XvListImageFormats.man
@@ -0,0 +1,107 @@
+.TH XvListImageFormats __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH Name
+XvListImageFormats \- return list of image formats supported by a video port
+.\"
+.SH Syntax
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "XvImageFormatValues * XvListImageFormats (Display *" dpy ","
+.BI " XvPortID " port ", int *" p_num_formats ");"
+.fi
+.SH Arguments
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Specifies the port whose adaptor is to be queried for its list of attributes.
+.IP \fIp_num_formats\fR 8
+A pointer to where the number of formats returned in the array is written.
+.\"
+.SH Description
+.BR XvListImageFormats (__libmansuffix__)
+returns the XvImageFormatValues supported by the specified port. This list
+should be freed with
+.BR XFree (__libmansuffix__).
+.SH Returned Values
+XvImageFormatValues has the following structure:
+.EX
+
+ typedef struct {
+ int id; /* Unique descriptor for the format */
+ int type; /* XvRGB, XvYUV */
+ int byte_order; /* LSBFirst, MSBFirst */
+ char guid[16]; /* Globally Unique IDentifier */
+ int bits_per_pixel;
+ int format; /* XvPacked, XvPlanar */
+ int num_planes;
+
+ /* for RGB formats */
+ int depth;
+ unsigned int red_mask;
+ unsigned int green_mask;
+ unsigned int blue_mask;
+
+ /* for YUV formats */
+ 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]; /* eg. UYVY */
+ int scanline_order; /* XvTopToBottom, XvBottomToTop */
+ } XvImageFormatValues;
+
+.EE
+.IP \fIid\fR 8
+A unique descriptor for the format. This is often the FOURCC
+for the format, when applicable. This id is used to describe
+the format during XvImage creation.
+.IP \fItype\fR 8
+XvRGB or XvYUV.
+.IP \fIbyte_order\fR 8
+The byte order of the image. It is either LSBFirst or MSBFirst.
+.IP \fIguid\fR 8
+The Globally Unique IDentifier (also known as Universally Unique
+IDentifier). When not applicable, all characters are NULL.
+.IP \fIbits_per_pixel\fR 8
+The bits taken up (but not necessarily used) by each
+pixel. Note that for some planar formats which have
+fractional bits per pixel (such as IF09) this number
+may be rounded _down_.
+.IP \fIformat\fR 8
+XvPacked or XvPlanar.
+.IP \fInum_planes\fR 8
+The number of planes in planar formats.
+.IP \fIdepth\fR 8
+Significant bits per pixel.
+.IP "\fIred_mask, green_mask, blue_mask\fR" 8
+The red, green and blue bitmasks (RGB formats only).
+.IP \fI?_sample_bits\fR 8
+The size of each sample in bits (YUV formats only).
+.IP "\fIhorz_?_period, vert_?_period\fR" 8
+The period (in pixels) on which samples occur in the horizontal and vertical
+directions (YUV formats only).
+.IP \fIcomponent_order\fR 8
+Upper case ascii characters representing the order that samples are stored
+within packed formats.
+For planar formats this represents the ordering of the planes.
+.IP \fIscanline_order\fR 8
+XvTopToBottom or XvBottomToTop.
+.\"
+.SH Notes
+Since some formats (particularly some planar YUV formats) may not be
+completely defined by the parameters above, the guid, when available,
+should provide the most accurate description of the format.
+.\"
+.SH Diagnostics
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.\"
+.SH See Also
+.BR XvCreateImage (__libmansuffix__),
+.BR XvCreateShmImage (__libmansuffix__)
diff --git a/man/XvPutImage.man b/man/XvPutImage.man
new file mode 100644
index 0000000..ab9b575
--- /dev/null
+++ b/man/XvPutImage.man
@@ -0,0 +1,77 @@
+.TH XvPutImage __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvPutImage, XvShmPutImage \- display an XvImage
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvPutImage (Display *" dpy ", XvPortID " port ","
+.BI " Drawable " d ", GC " gc ", XvImage *" image ","
+.BI " int " src_x ", int " src_y ","
+.BI " unsigned int " src_w ", unsigned int " src_h ","
+.BI " int " dest_x ", int " dest_y ","
+.BI " unsigned int " dest_w ", unsigned int " dest_h ");"
+.sp
+.BI "int XvShmPutImage (Display *" dpy ", XvPortID " port ","
+.BI " Drawable " d ", GC " gc ", XvImage *" image ","
+.BI " int " src_x ", int " src_y ","
+.BI " unsigned int " src_w ", unsigned int " src_h ","
+.BI " int " dest_x ", int " dest_y ","
+.BI " unsigned int " dest_w ", unsigned int " dest_h ","
+.BI " Bool " send_event ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+The port id of a port on an XvImage capable adaptor.
+.IP \fId - The target drawable.
+.IP \fIgc\fR 8
+the graphics context specifying the clip mask to use, if any.
+.IP \fIimage\fR 8
+A pointer to the XvImage to be displayed.
+.IP \fIsrc_?\fR 8
+The portion of the XvImage to be displayed.
+.IP \fIdest_?\fR 8
+The portion of the destination drawable to be filled by the image.
+.IP \fIsend_event\fR 8
+Indicates whether or not an XShmCompletionEvent should be sent. If
+sent, the event's major_code and minor_code fields will indicate the
+Xv extension's major code and XvShmPutImage's minor code.
+.\"
+.SH DESCRIPTION
+.BR XvPutImage (__libmansuffix__)
+is similar to
+.BR XPutImage (__libmansuffix__).
+.BR XvShmPutImage (__libmansuffix__)
+is similar to
+.BR XShmPutImage (__libmansuffix__).
+The library will allocate the XvImage structure and fill out all
+fields except for \fIdata\fR. \fIWidth\fR and \fIheight\fR may be
+enlarged in some YUV formats. The size of the data buffer that needs
+to be allocated will be given in the \fIdata_size\fR field in the XvImage.
+Image data is not allocated by this function. The client may pass a pointer
+to the preallocated memory as \fIdata\fR or may allocate the memory and fill in
+the XvImage structure's data field after the \fIdata_size\fR field has
+been filled out by the server. The XvImage structure may be freed by
+.BR XFree (__libmansuffix__).
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [XvBadAlloc] 8
+Generated if the X server was unable to allocate resources required
+to complete the operation.
+.IP [BadMatch] 8
+Generated if incompatible arguments were supplied, such as a port that
+isn't capable of displaying XvImages.
+.IP [BadShmSegCode] 8
+Generated if an invalid shared memory segment is specified.
+.\"
+.SH SEE ALSO
+.BR XvListImageFormats (__libmansuffix__),
+.BR XvCreateImage (__libmansuffix__),
+.BR XvShmCreateImage (__libmansuffix__)
+.BR XPutImage (__libmansuffix__),
+.BR XShmPutImage (__libmansuffix__)
diff --git a/man/XvQueryAdaptors.man b/man/XvQueryAdaptors.man
index bb52ff5..48eabae 100644
--- a/man/XvQueryAdaptors.man
+++ b/man/XvQueryAdaptors.man
@@ -50,6 +50,9 @@ The number of ports supported by the adaptor.
.IP \fItype\fR 8
A bit mask with the value XvInputMask asserted if the adaptor supports video
input, and value XvOutputMask asserted if the adaptor supports video output.
+In Xv protocol 2.2 and later, there are 3 new bits defined - XvVideoMask,
+XvStillMask and XvImageMask indicating that the adaptor is capable
+of video, still or image primitives respectively.
.IP \fIname\fR 8
A vendor specific name that identifies the adaptor.
.IP \fInum_formats\fR 8
diff --git a/man/XvQueryEncodings.man b/man/XvQueryEncodings.man
index 34e55d0..ef24f59 100644
--- a/man/XvQueryEncodings.man
+++ b/man/XvQueryEncodings.man
@@ -14,9 +14,8 @@ XvQueryEncodings \- return list of encodings for an adaptor
.\"
.IP \fIdpy\fR 8
Specifies the connection to the X server.
-.IP \fIXvPortID\fR 8
-Specifies the port whose adaptor is to be queried for its
-list of encodings.
+.IP \fIport\fR 8
+Specifies the port whose adaptor is to be queried for its list of encodings.
.IP \fIp_num_encodings\fR 8
A pointer to where the number of encodings supported
by the adaptor is written.
diff --git a/man/XvQueryPortAttributes.man b/man/XvQueryPortAttributes.man
new file mode 100644
index 0000000..9fbc507
--- /dev/null
+++ b/man/XvQueryPortAttributes.man
@@ -0,0 +1,55 @@
+.TH XvQueryPortAttributes __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvQueryPortAttributes \- return list of attributes of a video port
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "XvAttribute* XvQueryPortAttributes(Display *" dpy ","
+.BI " XvPortID " port ", int *" p_num_attributes ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Specifies the port whose adaptor is to be queried for its list of attributes.
+.IP \fIp_num_attributes\fR 8
+A pointer to where the number of attributes returned in the array is written.
+.\"
+.SH DESCRIPTION
+.BR XvQueryPortAttributes (__libmansuffix__) returns the number of attributes
+and an array of XvAttributes valid for the given port. The array may be
+freed with
+.BR XFree (__libmansuffix__).
+.SH RETURN VALUES
+XvAttribute has the following structure:
+.EX
+
+ typedef struct {
+ int flags;
+ int min_value;
+ int max_value;
+ char *name;
+ } XvAttribute;
+
+.EE
+.IP \fIflags\fR 8
+May be XvGettable or XvSettable or both OR'd together indicating the
+particular attribute is readable, writeable or readable and writeable.
+.IP \fImin_value\fR 8
+The minimum attribute values which are valid for the driver.
+.IP \fI max_value\fR 8
+The maximum attribute values which are valid for the driver.
+.IP \fIname\fR 8
+A string describing the name of the attribute that may be used
+to retrieve the Atom for the particular attribute.
+.\"
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.\"
+.SH SEE ALSO
+.BR XvGetPortAttribute (__libmansuffix__),
+.BR XvSetPortAttribute (__libmansuffix__)
diff --git a/man/XvSetPortAttribute.man b/man/XvSetPortAttribute.man
index 74e1f4d..c1f14dc 100644
--- a/man/XvSetPortAttribute.man
+++ b/man/XvSetPortAttribute.man
@@ -85,5 +85,6 @@ supported by the adaptor.
.SH SEE ALSO
.\"
.BR XvGetPortAttribute (__libmansuffix__),
+.BR XvQueryPortAttributes (__libmansuffix__),
.BR XvSelectPortNotify (__libmansuffix__),
.BR XvPortNotify (__libmansuffix__)
diff --git a/man/XvShmCreateImage.man b/man/XvShmCreateImage.man
new file mode 100644
index 0000000..f44dd89
--- /dev/null
+++ b/man/XvShmCreateImage.man
@@ -0,0 +1 @@
+.so man__libmandirsuffix__/XvCreateImage.__libmandirsuffix__
diff --git a/man/XvShmPutImage.man b/man/XvShmPutImage.man
new file mode 100644
index 0000000..3f15682
--- /dev/null
+++ b/man/XvShmPutImage.man
@@ -0,0 +1 @@
+.so man__libmandirsuffix__/XvPutImage.__libmandirsuffix__
commit 7303af622984579e600893934a3958c0654d57bf
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Oct 2 08:55:52 2009 -0700
Man page cleanups and formatting fixes
- Convert man page section headings to traditional style/names
Make them all caps, and use 'synopsis' instead of 'syntax'
- Strip trailing whitespace from man pages
- Add return types to function prototypes
- Fix unbalanced quoting and other formatting issues
- Use .BR for formatting man page references
- Add "libXv Functions" to man page header
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
diff --git a/man/Xv.man b/man/Xv.man
index 92f1608..3e41c5e 100644
--- a/man/Xv.man
+++ b/man/Xv.man
@@ -1,12 +1,12 @@
-.TH Xv __libmansuffix__ __vendorversion__
+.TH Xv __libmansuffix__ __vendorversion__ "libXv Functions"
.\"
-.SH Name
+.SH NAME
Xv \- X Window System video extension
-.SH Description
+.SH DESCRIPTION
The Xv extension provides support for video adaptors attached to an X
display. It takes the approach that a display may have one or more
video adaptors, each of which has one or more ports through which
-independent video streams pass.
+independent video streams pass.
.PP
An adaptor may be able to display video in a drawable, capture video
from a drawable, or both. It translates between video encoding (NTSC,
@@ -14,55 +14,77 @@ PAL, SECAM, etc...) and drawable format (depth and visual-id pair). An
adaptor may support multiple video encodings and/or multiple drawable
formats.
.PP
-Clients use Xv(__libmansuffix__) to gain access and manage sharing of a display's
-video resources. Typically, a client will use XvQueryExtension(__libmansuffix__) to
-determine the status of the extension, XvQueryAdaptors(__libmansuffix__) to get a
-description of what video adaptors exist, and XvQueryEncodings(__libmansuffix__) to
-get a description of what video encodings an adaptor supports.
+Clients use
+.BR Xv (__libmansuffix__)
+to gain access and manage sharing of a display's
+video resources. Typically, a client will use
+.BR XvQueryExtension (__libmansuffix__)
+to determine the status of the extension,
+.BR XvQueryAdaptors (__libmansuffix__)
+to get a description of what video adaptors exist, and
+.BR XvQueryEncodings (__libmansuffix__)
+to get a description of what video encodings an adaptor supports.
.PP
Once a client has determined what video resources are available, it is
free to put video into a drawable or get video from a drawable,
according the capabilities supported. Clients can select to receive
events when video activity changes in a drawable and when port
attributes have changed.
-.SH Summary of Library Functions
+.SH SUMMARY OF LIBRARY FUNCTIONS
The following is a summary of Xv library functions:
.sp 1l
-XvGetPortAttribute(__libmansuffix__) \- return current port attribute value
+.BR XvGetPortAttribute (__libmansuffix__)
+\- return current port attribute value
.sp 1l
-XvGetStill(__libmansuffix__) \- capture a single frame of video from a drawable
+.BR XvGetStill (__libmansuffix__)
+\- capture a single frame of video from a drawable
.sp 1l
-XvGetVideo(__libmansuffix__) \- capture video from a drawable
+.BR XvGetVideo (__libmansuffix__)
+\- capture video from a drawable
.sp 1l
-XvGrabPort(__libmansuffix__) \- lock port for exclusive use by client
+.BR XvGrabPort (__libmansuffix__)
+\- lock port for exclusive use by client
.sp 1l
-XvPortNotify(__libmansuffix__) \- event generated when port attributes change
+.BR XvPortNotify (__libmansuffix__)
+\- event generated when port attributes change
.sp 1l
-XvPutStill(__libmansuffix__) \- write a single frame of video to a drawable
+.BR XvPutStill (__libmansuffix__)
+\- write a single frame of video to a drawable
.sp 1l
-XvPutVideo(__libmansuffix__) \- write video into a drawable
+.BR XvPutVideo (__libmansuffix__)
+\- write video into a drawable
.sp 1l
-XvQueryAdaptors(__libmansuffix__) \- return adaptor information for a screen
+.BR XvQueryAdaptors (__libmansuffix__)
+\- return adaptor information for a screen
.sp 1l
-XvQueryBestSize(__libmansuffix__) \- determine the optimum drawable region size
+.BR XvQueryBestSize (__libmansuffix__)
+\- determine the optimum drawable region size
.sp 1l
-XvQueryEncodings(__libmansuffix__) \- return list of encodings for an adaptor
+.BR XvQueryEncodings (__libmansuffix__)
+\- return list of encodings for an adaptor
.sp 1l
-XvQueryExtension(__libmansuffix__) \- return version and revision of extension
+.BR XvQueryExtension (__libmansuffix__)
+\- return version and revision of extension
.sp 1l
-XvSelectPortNotify(__libmansuffix__) \- enable or disable XvPortNotify events
+.BR XvSelectPortNotify (__libmansuffix__)
+\- enable or disable XvPortNotify events
.sp 1l
-XvSelectVideoNotify(__libmansuffix__) \- enable or disable XvVideoNotify events
+.BR XvSelectVideoNotify (__libmansuffix__)
+\- enable or disable XvVideoNotify events
.sp 1l
-XvSetPortAttribute(__libmansuffix__) \- set an attribute for a port
+.BR XvSetPortAttribute (__libmansuffix__)
+\- set an attribute for a port
.sp 1l
-XvStopVideo(__libmansuffix__) \- stop active video
+.BR XvStopVideo (__libmansuffix__)
+\- stop active video
.sp 1l
-XvUngrabPort(__libmansuffix__) \- release a grabbed port
+.BR XvUngrabPort (__libmansuffix__)
+\- release a grabbed port
.sp 1l
-XvVideoNotify(__libmansuffix__) \- event generated for video processing
+.BR XvVideoNotify (__libmansuffix__)
+\- event generated for video processing
.sp 1l
.PP
Each of these functions is described in its own Xv man page.
-.br
+
diff --git a/man/XvFreeAdaptorInfo.man b/man/XvFreeAdaptorInfo.man
index 95fc3c7..b901cf3 100644
--- a/man/XvFreeAdaptorInfo.man
+++ b/man/XvFreeAdaptorInfo.man
@@ -1,21 +1,23 @@
-.TH XvFreeAdaptorInfo __libmansuffix__ __vendorversion__
-.SH Name
-XvFreeAdaptorInfo \- free adaptor information
+.TH XvFreeAdaptorInfo __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvFreeAdaptorInfo \- free adaptor information
.\"
-.SH Syntax
-\fBXvFreeAdaptorInfo(XvAdaptorInfo *\fIp_adaptor_info\fR)
-.SH Arguments
+.SH SYNOPSIS
+.BI "void XvFreeAdaptorInfo(XvAdaptorInfo *" p_adaptor_info ");"
+.SH ARGUMENTS
.\"
.IP \fIp_adaptor_info\fR 8
-Pointer to where the adaptor information is located.
+Pointer to where the adaptor information is located.
.\"
-.SH Description
+.SH DESCRIPTION
.\"
-XvFreeAdaptorInfo(__libmansuffix__) frees adaptor information that
-was returned by XvQueryAdaptors(__libmansuffix__). The data structure
-used for adaptor information is defined in the
-reference page for XvQueryAdaptors(__libmansuffix__).
-.SH See Also
+.BR XvFreeAdaptorInfo (__libmansuffix__)
+frees adaptor information that was returned by
+.BR XvQueryAdaptors (__libmansuffix__).
+The data structure used for adaptor information is defined in the
+reference page for
+.BR XvQueryAdaptors (__libmansuffix__).
+.SH SEE ALSO
.\"
-XvQueryAdaptors(__libmansuffix__), XvFreeEncodingInfo(__libmansuffix__)
-.br
+.BR XvQueryAdaptors (__libmansuffix__),
+.BR XvFreeEncodingInfo (__libmansuffix__)
diff --git a/man/XvFreeEncodingInfo.man b/man/XvFreeEncodingInfo.man
index d26dff0..956460d 100644
--- a/man/XvFreeEncodingInfo.man
+++ b/man/XvFreeEncodingInfo.man
@@ -1,21 +1,22 @@
-.TH XvFreeEncodingInfo __libmansuffix__ __vendorversion__
-.SH Name
-XvFreeEncodingInfo \- free encoding information
+.TH XvFreeEncodingInfo __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvFreeEncodingInfo \- free encoding information
.\"
-.SH Syntax
-\fBXvFreeEncodingInfo(XvEncodingInfo *\fIp_encoding_info\fR)"
-.SH Arguments
+.SH SYNOPSIS
+.BI "void XvFreeEncodingInfo(XvEncodingInfo *" p_encoding_info ");"
+.SH ARGUMENTS
.\"
.IP \fIp_encoding_info\fR 8
-Pointer to where the encoding information is located.
+Pointer to where the encoding information is located.
.\"
-.SH Description
+.SH DESCRIPTION
.\"
-XvFreeEncodingInfo(__libmansuffix__) frees encoding information that
-was returned by XvQueryEncodings(__libmansuffix__). The data structure
-used for encoding information is defined in the
-reference page for XvQueryEncodings(__libmansuffix__).
-.SH See Also
+.BR XvFreeEncodingInfo (__libmansuffix__)
+frees encoding information that was returned by
+.BR XvQueryEncodings (__libmansuffix__).
+The data structure used for encoding information is defined in the
+reference page for
+.BR XvQueryEncodings (__libmansuffix__).
+.SH SEE ALSO
.\"
-XvQueryEncodings(__libmansuffix__)
-.br
+.BR XvQueryEncodings (__libmansuffix__)
diff --git a/man/XvGetPortAttribute.man b/man/XvGetPortAttribute.man
index 9e6fcb3..489db2d 100644
--- a/man/XvGetPortAttribute.man
+++ b/man/XvGetPortAttribute.man
@@ -1,21 +1,22 @@
-.TH XvGetPortAttribute __libmansuffix__ __vendorversion__
-.SH Name
+'\" t
+.TH XvGetPortAttribute __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
XvGetPortAttribute \- return current port attribute value
.\"
-.SH Syntax
+.SH SYNOPSIS
.B #include <X11/extensions/Xvlib.h>
.sp
.nf
-.BI "XvGetPortAttribute(Display *" dpy ", XvPortID " port ",
-.BI " Atom " attribute ", int " p_value ");"
+.BI "int XvGetPortAttribute(Display *" dpy ", XvPortID " port ","
+.BI " Atom " attribute ", int " p_value ");"
.fi
-.SH Arguments
+.SH ARGUMENTS
.\"
.IP \fIdpy\fR 12
Specifies the connection to the X server.
.IP \fIport\fR 12
Specifies the port, associated with the given display, for
-which the attribute values are to be returned.
+which the attribute values are to be returned.
.IP \fIattribute\fR 12
An atom that identifies the attribute to be queried by this
request. Control atoms are obtained using the XInternAtom
@@ -24,59 +25,52 @@ request with a string from the following table.
Pointer to the location where the attribute value is written on
return.
.\"
-.SH Description
+.SH DESCRIPTION
.\"
.PP
-XvGetPortAttribute(__libmansuffix__) returns the current value of the requested
-port attribute in the integer pointed to by \fIp_value\fR.
-The attribute is identified using an Atom that equates to the attribute name.
+.BR XvGetPortAttribute (__libmansuffix__)
+returns the current value of the requested
+port attribute in the integer pointed to by \fIp_value\fR.
+The attribute is identified using an Atom that equates to the attribute name.
The XInternAtom request can be used with one of the strings
below to return a matching Atom.
-.bp
.PP
-.\" .TS
-.\" tab(@);
-.\" lfHB lfHB lfHB
-.\" lfR lfR lfR .
-.\" _
-.\" .PP
-.\" .sp 4p
-.\" Attribute String@Type@Default
-.\" .sp 6p
-.\" _
-.\" .sp 6p
-.\" "XV_ENCODING"@XvEncodingID@Server dependent
-.\" "XV_HUE"@[-1000...1000]@0
-.\" "XV_SATURATION"@[-1000...1000]@0
-.\" "XV_BRIGHTNESS"@[-1000...1000]@0
-.\" "XV_CONTRAST"@[-1000...1000]@0
-.\" .sp 6p
-.\" .TE
-.nf
-Attribute String Type Default
-
-"XV_ENCODING" XvEncodingID Server dependent
-"XV_HUE" [-1000...1000] 0
-"XV_SATURATION" [-1000...1000] 0
-"XV_BRIGHTNESS" [-1000...1000] 0
-"XV_CONTRAST" [-1000...1000] 0
-.fi
Reply to: