Initialize Tizen 2.3 tizen_2.3 2.3a_release submit/tizen_2.3/20140531.085004 submit/tizen_2.3/20150202.070111 tizen_2.3_release
authorSehong Na <sehong.na@samsung.com>
Sat, 31 May 2014 03:46:16 +0000 (12:46 +0900)
committerSehong Na <sehong.na@samsung.com>
Sat, 31 May 2014 03:46:16 +0000 (12:46 +0900)
44 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
README [new file with mode: 0644]
configure.ac [new file with mode: 0644]
include/Makefile.am [new file with mode: 0644]
include/X11/Makefile.am [new file with mode: 0644]
include/X11/extensions/Makefile.am [new file with mode: 0644]
include/X11/extensions/Xvlib.h [new file with mode: 0644]
man/Makefile.am [new file with mode: 0644]
man/Xv.man [new file with mode: 0644]
man/XvCreateImage.man [new file with mode: 0644]
man/XvFreeAdaptorInfo.man [new file with mode: 0644]
man/XvFreeEncodingInfo.man [new file with mode: 0644]
man/XvGetPortAttribute.man [new file with mode: 0644]
man/XvGetStill.man [new file with mode: 0644]
man/XvGetVideo.man [new file with mode: 0644]
man/XvGrabPort.man [new file with mode: 0644]
man/XvListImageFormats.man [new file with mode: 0644]
man/XvPortNotify.man [new file with mode: 0644]
man/XvPutImage.man [new file with mode: 0644]
man/XvPutStill.man [new file with mode: 0644]
man/XvPutVideo.man [new file with mode: 0644]
man/XvQueryAdaptors.man [new file with mode: 0644]
man/XvQueryBestSize.man [new file with mode: 0644]
man/XvQueryEncodings.man [new file with mode: 0644]
man/XvQueryExtension.man [new file with mode: 0644]
man/XvQueryPortAttributes.man [new file with mode: 0644]
man/XvSelectPortNotify.man [new file with mode: 0644]
man/XvSelectVideoNotify.man [new file with mode: 0644]
man/XvSetPortAttribute.man [new file with mode: 0644]
man/XvShmCreateImage.man [new file with mode: 0644]
man/XvShmPutImage.man [new file with mode: 0644]
man/XvStopVideo.man [new file with mode: 0644]
man/XvUngrabPort.man [new file with mode: 0644]
man/XvVideoNotify.man [new file with mode: 0644]
man/xv-library-v2.2.txt [new file with mode: 0644]
packaging/libXv.spec [new file with mode: 0755]
src/Makefile.am [new file with mode: 0644]
src/Xv.c [new file with mode: 0644]
src/Xvlibint.h [new file with mode: 0644]
xv.pc.in [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..dcca7b8
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+David Carver (Digital Workstation Engineering/Project Athena)
+Mark Vojkovich (XFree86 Project)
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..83b3df2
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,42 @@
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+______________________________________________________________________________
+
+Copyright 2005 Red Hat, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Red Hat not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission.  Red Hat makes no
+representations about the suitability of this software for any purpose.  It
+is provided "as is" without express or implied warranty.
+
+RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..ab6871f
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,686 @@
+commit 0f4fa1820041394e879517abb49c0391ecc796f7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Mar 7 21:25:38 2012 -0800
+
+    libXv 1.0.7
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit de5e2271b54b7fe8bb3f8b66a70b5b87853f51a2
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Nov 10 21:45:11 2011 -0800
+
+    Fix gcc -Wwrite-strings warnings
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ff45155aa59c22aa5abc5ffe941dfe3b0f4c288f
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Wed Oct 5 20:59:37 2011 -0700
+
+    XvQueryExtension doesn't return XvBadAlloc
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=22829
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 21ce77de0fc1b92bb55699df7e93dd1aae988fc5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 16 22:56:12 2011 -0700
+
+    Strip trailing whitespace
+    
+    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+    git diff -w & git diff -b show no diffs from this change
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7091e73f39b813adcc8fa5e61ad336ba063d7e00
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 11:43:45 2011 -0500
+
+    config: comment, minor upgrade, quote and layout configure.ac
+    
+    Group statements per section as per Autoconf standard layout
+    Quote statements where appropriate.
+    Autoconf recommends not using dnl instead of # for comments
+    
+    Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
+    Add AC_CONFIG_SRCDIR([Makefile.am])
+    Remove redundant AC_SUBST(*_CFLAGS) and/or *_LIBS
+    No functional configuration changes
+    
+    This helps automated maintenance and release activities.
+    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
+
+commit 50a2f154f20763c9e98bdcf705fa366c87c6bae4
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jan 28 19:41:37 2011 -0500
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b9b6680cbc95501af70c3597bfdd51d17aace695
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Jan 27 18:50:15 2011 -0500
+
+    config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+    
+    XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+    AC_PROG_C_C99. This sets gcc with -std=gnu99.
+    If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit e34fff44ebc4f8c258df127f6f80d0a1aa86a25d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Oct 29 17:52:32 2010 -0700
+
+    libXv 1.0.6
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6e0da1da31552faaba26a351be0a4cf2d5964b05
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Oct 29 17:51:53 2010 -0700
+
+    Sun's copyrights now belong to Oracle
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4c2bc9a94ee759423adbc4e7c99b9bf9fea692ec
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date:   Tue Sep 28 13:30:04 2010 -0700
+
+    Purge cvs tags.
+    
+    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ec92e24e86363fcbc14f8dce9739a430f68b998f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Aug 18 17:29:15 2010 -0400
+
+    man: whitespace management
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 7bb70e6f8f394775d5d7ed7035a6d4b2accd2892
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Aug 18 17:23:31 2010 -0400
+
+    man: remove unrequired local fix for bug 5628
+    
+    Local fix in CVS for bug 5628 is not required
+    as the problem has been fixed in
+    util-macros d9062e4077ebfd0985baf8418f3d0f111b9ddbba
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 14cf5e3d19488f9a36824a01d4aba4a7f5ebc1cd
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 8 15:21:36 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    Enables use of platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e106f955dfc23798975ef14b3d3400aff39eced9
+Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
+Date:   Thu Jul 1 07:07:12 2010 -0300
+
+    Purge macro NEED_REPLIES
+    
+    Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
+    Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 481033e52111a42ae80c2814a499a068d7dc4771
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Mar 29 16:50:34 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ea333fad90bce73c95a5ac310c127e22d6b41c6c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Mar 29 14:53:49 2010 -0400
+
+    config: remove the pkgconfig pc.in file from EXTRA_DIST
+    
+    Automake always includes it in the tarball.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 917a09fe40630d9ba2ac7f2f48636989f3163580
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jan 14 20:55:17 2010 -0800
+
+    Update Sun license notices to current X.Org standard form
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit f0225573605729797a0edd00276f4704f9cda3c2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Nov 27 20:56:04 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit f6ab500cf3d00bfa49070007c006e500253b6d84
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:10 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit fec734de503d63bb0abce9088be2e6655e82f800
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:26 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit f0b191321146550b88a94233b9677e32044b6c0e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:43 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 9ae8551458ee56b7ea19066023da64c7e24ea9f3
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:19 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit 05974c72286a9556ebf5ff541967fa53f75a55a8
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Wed Oct 21 12:47:26 2009 -0700
+
+    This is not a GNU project, so declare it foreign.
+    
+    On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
+    > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
+    > > I noticed an INSTALL file in xlsclients and libXvMC today, and it
+    > > was quite annoying to work around since 'autoreconf -fvi' replaces
+    > > it and git wants to commit it.  Should these files even be in git?
+    > > Can I nuke them for the betterment of humanity and since they get
+    > > created by autoreconf anyways?
+    >
+    > See https://bugs.freedesktop.org/show_bug.cgi?id=24206
+    
+    As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
+    AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
+    of the INSTALL file. It is also part of the 24206 solution.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+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>
+
+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>
+
+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>
+
+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>
+
+commit ea79759a6940855dab10472a876e784fb8494eee
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 23:04:56 2009 -0700
+
+    Move xv-library-v2.2.txt document from xorg-docs
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit dbf88774a77d91f3f7996071dfccf61636afa77b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Sat May 9 17:13:11 2009 -0700
+
+    Adjust flags definitions to fix lint library build
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 7cc28e8ae807e69663e0a73cd12edf9963277a2d
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Feb 2 20:34:37 2009 -0800
+
+    Add README with pointers to mailing list, bugzilla & git repos
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 245b7cffe78203eeb265ac73177ed258471cb227
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Mon Feb 2 13:58:34 2009 -0200
+
+    Janitor: make distcheck, compiler warnings, .gitignore.
+
+commit 2c0dc990a1ad96b71c95800d83378413eab63dbb
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Mar 17 20:01:01 2008 -0700
+
+    Version bump: 1.0.4
+
+commit acb78abb510e7e69e74fb3bba80d8ceaf2af7ce4
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Mar 9 08:43:44 2008 +0100
+
+    nuke RCS Ids
+
+commit d455a1d9ae336a397a1b1a08228b7faa1024c1aa
+Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br>
+Date:   Mon Aug 20 19:02:40 2007 -0300
+
+    get rid of ancient XFree86 CVS Id tags
+
+commit 8b0752135f84edebc5e476f19069c8d78676f416
+Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br>
+Date:   Mon Aug 20 18:58:44 2007 -0300
+
+    convert manpages prototypes to C ANSI format
+    
+    Closes: #8360 (libXv man pages should be
+    converted to ANSI prototypes)
+
+commit 20d07bb9ba2bca56e3f02b4b878377eded241059
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Sat Dec 16 01:31:51 2006 +0200
+
+    bump to 1.0.3
+
+commit 2f0089d24ab28f3325a5da7a136873eefb0bd97f
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Wed Dec 6 19:00:07 2006 +0200
+
+    Makefile.am: make ChangeLog hook safer
+    Make ChangeLog hook as safe as possible.
+
+commit 978e98c43245671b4fdedb42371260f5fa139f14
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Sep 25 14:49:45 2006 -0700
+
+    Bump version number to 1.0.2
+
+commit 1dd351499ee692bb71eee4cffc305431843cfb87
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Sep 22 19:06:30 2006 -0700
+
+    Fill in AUTHORS & COPYING files
+
+commit e5cb03cfa7386e13bede2d33d06be5369ab2a5d2
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Tue Sep 19 15:06:27 2006 -0700
+
+    Correct description of dpy argument in libXv function man pages
+    
+    (Previous description applies to programs, not functions - you must supply a
+     valid Display pointer to functions, there is no fallback to $DISPLAY.)
+
+commit 5dc20e33bc29f1efd88ed1cf5e83943ab53b9ac6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Tue Sep 19 13:25:27 2006 -0700
+
+    Fix man page typos
+
+commit dd25684d6f67b8c5a836b98d224ac6bf21076972
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Sep 18 16:29:46 2006 -0700
+
+    Coverity CID #580: XvQueryEncodings Returned without freeing storage "pes"
+    
+    Free the portion of the encoding list we had already filled in if we get
+    an error allocating memory for a list entry.
+
+commit 8681d431516979dcffd1ca7a65d47026d8ad0336
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Sep 18 16:14:11 2006 -0700
+
+    Add hooks for running code checkers like sparse & lint over the source
+
+commit d19e0d1fe15de6b9a2bfffe30bd041497c021eaf
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Sep 18 16:13:16 2006 -0700
+
+    Add argument types to static function prototypes to clear sparse & lint warnings
+
+commit 3c80665e7c53db021b52ad267c12c6b4f43e7c3a
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Sep 18 15:45:50 2006 -0700
+
+    Replace static Changelog with dist-hook to generate from git log
+
+commit d968d8b6777f21b799a99c9652c27e39da319b00
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Sep 18 15:43:59 2006 -0700
+
+    Add *~ to .gitignore to skip emacs droppings
+
+commit abab8955bdb30ffe74dc3b8fe2e6b009a2d2cf3d
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jul 13 14:59:10 2006 -0700
+
+    renamed: .cvsignore -> .gitignore
+
+commit 8bf896eb20d6752f31b7d966ff6d8c3f905b536d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:30:06 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit d54ce4a8f14bcb3d027c1bf8f46e215caf596dad
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:28:27 2005 +0000
+
+    Stub COPYING files
+
+commit 6561f50b1ac74ebb02ec13d434af1e8bef50fd99
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:35 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit e495ba278269a66eab6829b796e7fa32b79dbc2e
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:45 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 4cf396de99b15b48751ece43e74f0aeb60ab5d50
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:45 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 4ff8025f6d0c9ef14e500d123613ccee45c8c23e
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 04:41:51 2005 +0000
+
+    Add check and cflags for malloc(0) returning NULL.
+
+commit 4c738dba961b3eae69e466a0bfcd8e6e3e539675
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:03:06 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 9460f736b6f61687b20e91e0a02aa81c879d7e4f
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 23:17:41 2005 +0000
+
+    Add/improve libs .cvsignores.
+
+commit ed2d19981e048a31d3a594341787f0505d4dd6a8
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Nov 19 07:15:43 2005 +0000
+
+    Update pkgconfig files to separate library build-time dependencies from
+        application build-time dependencies, and update package deps to work
+        with separate build roots.
+
+commit 768933f26103bd9324e3c3efbc287ca21a2776b3
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:48:12 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit 6159966aa69254620b25552bb09ae00ef31798ef
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:00:09 2005 +0000
+
+    Use @LIB_MAN_SUFFIX@ instead of $(LIB_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 0b5be2efbcd3d405f1d84b6b31add361a39f411d
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Thu Oct 13 05:13:36 2005 +0000
+
+    doc/man/Xv/Xv.man
+    doc/man/Xv/XvFreeAdaptorInfo.man
+    doc/man/Xv/XvFreeEncodingInfo.man
+    doc/man/Xv/XvGetPortAttribute.man
+    doc/man/Xv/XvGetStill.man
+    doc/man/Xv/XvGetVideo.man
+    doc/man/Xv/XvGrabPort.man
+    doc/man/Xv/XvPortNotify.man
+    doc/man/Xv/XvPutStill.man
+    doc/man/Xv/XvPutVideo.man
+    doc/man/Xv/XvQueryAdaptors.man
+    doc/man/Xv/XvQueryBestSize.man
+    doc/man/Xv/XvQueryEncodings.man
+    doc/man/Xv/XvQueryExtension.man
+    doc/man/Xv/XvSelectPortNotify.man
+    doc/man/Xv/XvSelectVideoNotify.man
+    doc/man/Xv/XvSetPortAttribute.man
+    doc/man/Xv/XvStopVideo.man
+    doc/man/Xv/XvUngrabPort.man
+    doc/man/Xv/XvVideoNotify.man Convert hardcoded 3X to substitutable
+        __libmansuffix__ like other library man pages.
+
+commit 0b0ae11e4d5872f55bd412f7876c4b526d420fe0
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Thu Oct 13 04:47:38 2005 +0000
+
+    [lib/Xv]
+    Use sed to fill in variables in man pages
+
+commit bc34a489531d1a71857a5d68e4c256d1dacb89ae
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Aug 3 03:28:02 2005 +0000
+
+    Do PKG_CHECK_MODULES on a unique token instead of on "DEP", so builds with
+        a global configure cache don't get confused.
+
+commit 45bb17c155ce80c817e29144e960b02596ed7214
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:53 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit ca932bc2cfaa0a7faaf9c0d870ea4314de24855e
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Sat Jul 16 07:41:25 2005 +0000
+
+    Set soversion to 1.0.0 with -version-number.
+
+commit 2ece1ee39d248966d2399b30b9de6307db86f4b5
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Tue Jul 12 01:10:57 2005 +0000
+
+    Add Xvlib.h, change soversion to 1.0.0.
+
+commit 6ed09fe071574abdf5f7c08d9f1de41f4177e5df
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Tue Jul 12 00:35:54 2005 +0000
+
+    Change version to 2.2.0.
+
+commit f27ed2a7dfd43345ae820186a033c301d77861ad
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Tue Jul 12 00:34:54 2005 +0000
+
+    Typo fix.
+
+commit 9db3c882e7571eebc98d0070c3ccbc7633b57604
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Jul 9 06:53:49 2005 +0000
+
+    Add .cvsignore files Switch _la_CFLAGS for AM_CFLAGS to clean up directory
+
+commit 1b0c54229a5259677eab3f80cf8baedc1ca802e5
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Sun Jul 3 07:00:57 2005 +0000
+
+    Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
+    Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
+    Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
+        source files in the xserver/xorg tree, predicated on defines of
+        HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
+        <X11/fonts/foo.h>.
+
+commit a0abd747a0203ddf590fd0f4973f12dd0a5fc48d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Jul 2 06:35:03 2005 +0000
+
+    Add appropriate lib*_CFLAGS to Makefile.am's -- fixes build problems
+
+commit 9064f83cdb11b1515fec1c9f33bd7397ad7f492b
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Fri Jul 1 20:09:12 2005 +0000
+
+    xtrap.pc.in: s/Xfixes/XTrap/ xi.pc.in: s/Xt/Xi/ Xv/src/Makefile.am: remove
+        whitespace after backslash modularizeapp.sh: s/destkop/desktop/
+        modular/symlink.sh: Add bitmaps for xeyes, system.xsm for xsm, and
+        Xvidtune.cpp for xvidtune. Also comment out non-existing mga_bios.h
+    Check in buildsystems for xsetroot, xsm, xstdcmap, xtrap, and xvinfo
+
+commit dd829239e989de7b7affc504fc29da673d1d46d5
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date:   Tue Jun 21 15:41:36 2005 +0000
+
+    lib/XScrnSaver/configure.ac
+    lib/XScrnSaver/src/Makefile.am
+    lib/Xfontcache/configure.ac
+    lib/Xfontcache/src/Makefile.am
+    lib/Xinerama/configure.ac
+    lib/Xinerama/src/Makefile.am
+    lib/Xtst/configure.ac
+    lib/Xv/configure.ac
+    lib/XvMC/configure.ac
+    lib/dmx/configure.ac Add missing xext.pc and xextproto.pc Add DEP_CFLAGS to
+        src/Makefile.am
+
+commit ea1bfd2bef80ed33740916dfc8118ca8ac94a0eb
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 20:30:01 2005 +0000
+
+    - Add Xv man pages
+
+commit 3e71b1e06264f84428e04264b740a634cd7a5499
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 19:55:32 2005 +0000
+
+    - Add Xv to symlink.sh
+    - Add Xv build system
+
+commit 7306d726bfd8ba10d7ad75f8167dc3ddd85b65e6
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 18:43:55 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit 71d90c59573b4ef0f90e3f9bde03efd6dcf2912e
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:32:27 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 7cb88c27d6784873439ae6bdd22d78784eae41da
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:11:32 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 1faf3c691266e6f9a40914900eb6c94bd639ffb0
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:35:34 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit e2399deda299a091cbd99cebf363595534a8ea55
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:22:48 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit fe30a03a47c336d508667bb0477383f389e13b5e
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Thu Dec 4 22:02:57 2003 +0000
+
+    XFree86 4.3.99.901 (RC 1)
+
+commit 22a0d01c7610f366cf3cec9e7f7cf5968dcc285e
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:28:16 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit ddef819383953954d9514eab7803367ef20dee82
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:49 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit 355f676a4ff26d8fcdfdbe64e791e60bc579e339
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:49 2003 +0000
+
+    Initial revision
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..8b82ade
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..909cef5
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  Copyright 2005  Red Hat, Inc.
+#
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+#
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+
+SUBDIRS = src man include
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xv.pc
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+if LINT
+lint:
+       (cd src && $(MAKE) $(MFLAGS) lint)
+endif LINT
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..22a65b0
--- /dev/null
+++ b/README
@@ -0,0 +1,25 @@
+libXv - library for the X Video (Xv) extension to the X Window System
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/lib/libXv
+
+        http://cgit.freedesktop.org/xorg/lib/libXv
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..d3ad5bf
--- /dev/null
@@ -0,0 +1,58 @@
+#
+#  Copyright 2005 Red Hat, Inc.
+#
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+#
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+#
+
+# Initialize Autoconf
+AC_PREREQ([2.60])
+AC_INIT([libXv], [1.0.7],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXv])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Initialize libtool
+AC_PROG_LIBTOOL
+
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+XORG_CHECK_MALLOC_ZERO
+
+# Obtain compiler/linker options for depedencies
+PKG_CHECK_MODULES(XV, x11 xext xextproto videoproto)
+
+# Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+XORG_LINT_LIBRARY([Xv])
+
+AC_CONFIG_FILES([Makefile
+               include/Makefile
+               include/X11/Makefile
+               include/X11/extensions/Makefile
+               src/Makefile
+               man/Makefile
+               xv.pc])
+AC_OUTPUT
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644 (file)
index 0000000..a48f256
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = X11
diff --git a/include/X11/Makefile.am b/include/X11/Makefile.am
new file mode 100644 (file)
index 0000000..1b5c62d
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = extensions
diff --git a/include/X11/extensions/Makefile.am b/include/X11/extensions/Makefile.am
new file mode 100644 (file)
index 0000000..dca70b0
--- /dev/null
@@ -0,0 +1,2 @@
+extdir = $(includedir)/X11/extensions
+ext_HEADERS = Xvlib.h
diff --git a/include/X11/extensions/Xvlib.h b/include/X11/extensions/Xvlib.h
new file mode 100644 (file)
index 0000000..313037a
--- /dev/null
@@ -0,0 +1,382 @@
+/***********************************************************
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef XVLIB_H
+#define XVLIB_H
+/*
+** File:
+**
+**   Xvlib.h --- Xv library public header file
+**
+** Author:
+**
+**   David Carver (Digital Workstation Engineering/Project Athena)
+**
+** Revisions:
+**
+**   26.06.91 Carver
+**     - changed XvFreeAdaptors to XvFreeAdaptorInfo
+**     - changed XvFreeEncodings to XvFreeEncodingInfo
+**
+**   11.06.91 Carver
+**     - changed SetPortControl to SetPortAttribute
+**     - changed GetPortControl to GetPortAttribute
+**     - changed QueryBestSize
+**
+**   05.15.91 Carver
+**     - version 2.0 upgrade
+**
+**   01.24.91 Carver
+**     - version 1.4 upgrade
+**
+*/
+
+#include <X11/Xfuncproto.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/XShm.h>
+
+typedef struct {
+  int numerator;
+  int denominator;
+} XvRational;
+
+typedef struct {
+  int flags;   /* XvGettable, XvSettable */
+  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;           /* # of last request processed by server */
+  Bool send_event;        /* true if this came from a SendEvent request */
+  Display *display;       /* Display the event was read from */
+  Drawable drawable;       /* drawable */
+  unsigned long reason;    /* what generated this event */
+  XvPortID port_id;        /* what port */
+  Time time;              /* milliseconds */
+} XvVideoNotifyEvent;
+
+typedef struct {
+  int type;
+  unsigned long serial;           /* # of last request processed by server */
+  Bool send_event;        /* true if this came from a SendEvent request */
+  Display *display;       /* Display the event was read from */
+  XvPortID port_id;        /* what port */
+  Time time;              /* milliseconds */
+  Atom attribute;           /* atom that identifies attribute */
+  long value;              /* value of attribute */
+} XvPortNotifyEvent;
+
+typedef union {
+  int type;
+  XvVideoNotifyEvent xvvideo;
+  XvPortNotifyEvent xvport;
+  long pad[24];
+} XvEvent;
+
+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 only */
+  int depth;
+  unsigned int red_mask;
+  unsigned int green_mask;
+  unsigned int blue_mask;
+
+  /* for YUV formats only */
+  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;
+
+typedef struct {
+  int id;
+  int width, height;
+  int data_size;              /* bytes */
+  int num_planes;
+  int *pitches;               /* bytes */
+  int *offsets;               /* bytes */
+  char *data;
+  XPointer obdata;
+} XvImage;
+
+_XFUNCPROTOBEGIN
+
+extern int XvQueryExtension(
+  Display*                 /* display */,
+  unsigned int*            /* p_version */,
+  unsigned int*            /* p_revision */,
+  unsigned int*            /* p_requestBase */,
+  unsigned int*            /* p_eventBase */,
+  unsigned int*            /* p_errorBase */
+);
+
+extern int XvQueryAdaptors(
+  Display*                 /* display */,
+  Window                   /* window */,
+  unsigned int*            /* p_nAdaptors */,
+  XvAdaptorInfo**          /* p_pAdaptors */
+);
+
+extern int XvQueryEncodings(
+  Display*                 /* display */,
+  XvPortID                 /* port */,
+  unsigned int*            /* p_nEncoding */,
+  XvEncodingInfo**         /* p_pEncoding */
+);
+
+extern int XvPutVideo(
+  Display*                 /* display */,
+  XvPortID                 /* port */,
+  Drawable                 /* d */,
+  GC                       /* gc */,
+  int                      /* vx */,
+  int                      /* vy */,
+  unsigned int             /* vw */,
+  unsigned int             /* vh */,
+  int                      /* dx */,
+  int                      /* dy */,
+  unsigned int             /* dw */,
+  unsigned int             /* dh */
+);
+
+extern int XvPutStill(
+  Display*                 /* display */,
+  XvPortID                 /* port */,
+  Drawable                 /* d */,
+  GC                       /* gc */,
+  int                      /* vx */,
+  int                      /* vy */,
+  unsigned int             /* vw */,
+  unsigned int             /* vh */,
+  int                      /* dx */,
+  int                      /* dy */,
+  unsigned int             /* dw */,
+  unsigned int             /* dh */
+);
+
+extern int XvGetVideo(
+  Display*                 /* display */,
+  XvPortID                 /* port */,
+  Drawable                 /* d */,
+  GC                       /* gc */,
+  int                      /* vx */,
+  int                      /* vy */,
+  unsigned int             /* vw */,
+  unsigned int             /* vh */,
+  int                      /* dx */,
+  int                      /* dy */,
+  unsigned int             /* dw */,
+  unsigned int             /* dh */
+);
+
+extern int XvGetStill(
+  Display*                 /* display */,
+  XvPortID                 /* port */,
+  Drawable                 /* d */,
+  GC                       /* gc */,
+  int                      /* vx */,
+  int                      /* vy */,
+  unsigned int             /* vw */,
+  unsigned int             /* vh */,
+  int                      /* dx */,
+  int                      /* dy */,
+  unsigned int             /* dw */,
+  unsigned int             /* dh */
+);
+
+extern int XvStopVideo(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Drawable                /* drawable */
+);
+
+extern int XvGrabPort(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Time                    /* time */
+);
+
+extern int XvUngrabPort(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Time                    /* time */
+);
+
+extern int XvSelectVideoNotify(
+  Display*                /* display */,
+  Drawable                /* drawable */,
+  Bool                    /* onoff */
+);
+
+extern int XvSelectPortNotify(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Bool                    /* onoff */
+);
+
+extern int XvSetPortAttribute(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Atom                    /* attribute */,
+  int                     /* value */
+);
+
+extern int XvGetPortAttribute(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Atom                    /* attribute */,
+  int*                    /* p_value */
+);
+
+extern int XvQueryBestSize(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  Bool                    /* motion */,
+  unsigned int            /* vid_w */,
+  unsigned int            /* vid_h */,
+  unsigned int            /* drw_w */,
+  unsigned int            /* drw_h */,
+  unsigned int*           /* p_actual_width */,
+  unsigned int*           /* p_actual_width */
+);
+
+extern XvAttribute* XvQueryPortAttributes(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  int*                    /* number */
+);
+
+
+extern void XvFreeAdaptorInfo(
+  XvAdaptorInfo*          /* adaptors */
+);
+
+extern void XvFreeEncodingInfo(
+  XvEncodingInfo*         /* encodings */
+);
+
+
+extern XvImageFormatValues * XvListImageFormats (
+   Display     *display,
+   XvPortID    port_id,
+   int                 *count_return
+);
+
+extern XvImage * XvCreateImage (
+   Display *display,
+   XvPortID port,
+   int id,
+   char *data,
+   int width,
+   int height
+);
+
+extern int XvPutImage (
+  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
+);
+
+extern int XvShmPutImage (
+   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
+);
+
+extern XvImage * XvShmCreateImage (
+   Display *display,
+   XvPortID port,
+   int id,
+   char* data,
+   int width,
+   int height,
+   XShmSegmentInfo *shminfo
+);
+
+
+_XFUNCPROTOEND
+
+#endif /* XVLIB_H */
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644 (file)
index 0000000..e2020c3
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+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) xv-library-v2.2.txt
+
+CLEANFILES = $(libman_DATA)
+
+SUFFIXES = .$(LIB_MAN_SUFFIX) .man
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(LIB_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/man/Xv.man b/man/Xv.man
new file mode 100644 (file)
index 0000000..14abb71
--- /dev/null
@@ -0,0 +1,125 @@
+.TH Xv __libmansuffix__ __vendorversion__ "libXv Functions"
+.\"
+.SH NAME
+Xv \- X Window System video extension
+.SH DESCRIPTION
+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,
+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
+.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.
+.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 and events:
+.sp 1l
+.BR XvCreateImage (__libmansuffix__)
+\- create an XvImage
+.sp 1l
+.BR XvGetPortAttribute (__libmansuffix__)
+\- return current port attribute value
+.sp 1l
+.BR XvGetStill (__libmansuffix__)
+\- capture a single frame of video from a drawable
+.sp 1l
+.BR XvGetVideo (__libmansuffix__)
+\- capture video from a drawable
+.sp 1l
+.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
+.BR XvPutVideo (__libmansuffix__)
+\- write video into a drawable
+.sp 1l
+.BR XvQueryAdaptors (__libmansuffix__)
+\- return adaptor information for a screen
+.sp 1l
+.BR XvQueryBestSize (__libmansuffix__)
+\- determine the optimum drawable region size
+.sp 1l
+.BR XvQueryEncodings (__libmansuffix__)
+\- return list of encodings for an adaptor
+.sp 1l
+.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
+.BR XvSelectVideoNotify (__libmansuffix__)
+\- enable or disable XvVideoNotify events
+.sp 1l
+.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
+.BR XvUngrabPort (__libmansuffix__)
+\- release a grabbed port
+.sp 1l
+.BR XvVideoNotify (__libmansuffix__)
+\- event generated for video processing
+.sp 1l
+.PP
+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 (file)
index 0000000..6cc1558
--- /dev/null
@@ -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/XvFreeAdaptorInfo.man b/man/XvFreeAdaptorInfo.man
new file mode 100644 (file)
index 0000000..b901cf3
--- /dev/null
@@ -0,0 +1,23 @@
+.TH XvFreeAdaptorInfo __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvFreeAdaptorInfo \- free adaptor information
+.\"
+.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.
+.\"
+.SH DESCRIPTION
+.\"
+.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
+.\"
+.BR XvQueryAdaptors (__libmansuffix__),
+.BR XvFreeEncodingInfo (__libmansuffix__)
diff --git a/man/XvFreeEncodingInfo.man b/man/XvFreeEncodingInfo.man
new file mode 100644 (file)
index 0000000..956460d
--- /dev/null
@@ -0,0 +1,22 @@
+.TH XvFreeEncodingInfo __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvFreeEncodingInfo \- free encoding information
+.\"
+.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.
+.\"
+.SH DESCRIPTION
+.\"
+.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
+.\"
+.BR XvQueryEncodings (__libmansuffix__)
diff --git a/man/XvGetPortAttribute.man b/man/XvGetPortAttribute.man
new file mode 100644 (file)
index 0000000..489db2d
--- /dev/null
@@ -0,0 +1,76 @@
+'\" t
+.TH XvGetPortAttribute __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvGetPortAttribute \- return current port attribute value
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvGetPortAttribute(Display *" dpy ", XvPortID " port ","
+.BI "                       Atom " attribute ", int " p_value ");"
+.fi
+.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.
+.IP \fIattribute\fR 12
+An atom that identifies the attribute to be queried by this
+request.  Control atoms are obtained using the XInternAtom
+request with a string from the following table.
+.IP \fIp_value\fR 12
+Pointer to the location where the attribute value is written on
+return.
+.\"
+.SH DESCRIPTION
+.\"
+.PP
+.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.
+.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
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvGetPortAttribute (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvGetPortAttribute (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [BadMatch] 8
+Generated if the requested attribute atom does not specify an attribute
+supported by the adaptor.
+.SH SEE ALSO
+.\"
+.BR XvSetPortAttribute (__libmansuffix__),
+.BR XvPortNotify (__libmansuffix__)
diff --git a/man/XvGetStill.man b/man/XvGetStill.man
new file mode 100644 (file)
index 0000000..98aa0e8
--- /dev/null
@@ -0,0 +1,106 @@
+.TH XvGetStill __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvGetStill \- capture a single frame of video from a drawable
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvGetStill(Display *" dpy ", XvPortID " port ", Drawable " d ", GC " gc ","
+.BI "               int " vx ", int " vy ", unsigned int " vw ", unsigned int " vh ","
+.BI "               int " dx ", int " dy ", unsigned int " dw ", unsigned int " dh ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIport\fR 15
+Defines the port to which the still is output.
+.IP \fId\fR 15
+Defines the drawable from which the still is to be captured.
+Pixmaps are currently not supported.
+.IP \fIgc\fR 15
+Defines the graphical context.  GC components are:
+.IR subwindow-mode ,
+.IR clip-x-origin ,
+.IR clip-y-origin ,
+and
+.IR clip-mask .
+.IP \fIvx,vy,vw,vh\fR 15
+Define the location and size of the destination video region
+into which the still is to be written.  \fIvx\fP and \fIvy\fP define the
+.IR x and
+.I y
+coordinates of the upper-left corner of the video region;
+.IR vw and
+.I vh
+define the width and height, in pixels, of the video region.
+.IP \fIdx,dy,dw,dh\fR 15
+Define the location and size of the source drawable from which the
+still image is to be captured.
+.IR dx and
+.I dy
+define the
+.IR x and
+.I y
+coordinates of the upper-left corner of the drawable region;
+.IR dw and
+.I dh
+define the width and height, in pixels, of the drawable region.
+.\"
+.SH DESCRIPTION
+.\"
+.PN XvGetStill
+captures a single frame of video from a drawable.  The
+position and size of the destination (video) rectangle is specified by
+.IR vx ,
+.IR vy ,
+.IR vw ,
+and
+.IR vh .
+The position and size of the source (drawable) rectangle is specified by
+.IR dx ,
+.IR dy ,
+.IR dw ,
+and
+.IR dh .
+.PP
+Drawable data is clipped to the bounds of the drawable, scaled to the
+requested video region size (or the closest size supported) and
+clipped to the bounds of the video encoding.  The contents of any region
+not updated with drawable data is undefined.
+.PP
+.\" If the still is successfully captured an XvVideoNotify event with
+.\" detail XvStill is generated for the drawable.
+.\" [mhs]: Not in this universe
+If the port is grabbed
+by another client, this request is ignored, and an XvVideoNotify event
+with detail XvBusy is generated for the drawable.
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvGetStill (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvGetStill (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [BadDrawable] 8
+Generated if the requested drawable does not exist.
+.IP [BadGC] 8
+Generated if the requested graphics context does not exist.
+.IP [BadAlloc] 8
+Generated if there were insufficient resources to process the request.
+.\"
+.SH SEE ALSO
+.\"
+.BR XvPutStill (__libmansuffix__),
+.BR XvGetVideo (__libmansuffix__),
+.BR XvPutVideo (__libmansuffix__),
+.BR XvVideoNotify (__libmansuffix__)
+
diff --git a/man/XvGetVideo.man b/man/XvGetVideo.man
new file mode 100644 (file)
index 0000000..be8c08e
--- /dev/null
@@ -0,0 +1,102 @@
+.TH XvGetVideo __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvGetVideo \- capture video from a drawable
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvGetVideo(Display *" dpy ", XvPortID " port ", Drawable " d ", GC " gc ","
+.BI "               int " vx ", int " vy ", unsigned int " vw ", unsigned int " vh ","
+.BI "               int " dx ", int " dy ", unsigned int " dw ", unsigned int " dh ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIport\fR 15
+Defines the port to which video output is sent.
+.IP \fId\fR 15
+Defines the drawable (window) from which video output is to be obtained.
+.IP \fIgc\fR 15
+Defines the graphical context.  GC components are:
+.IR subwindow-mode ,
+.IR clip-x-origin ,
+.IR clip-y-origin ,
+and
+.IR clip-mask .
+.IP \fIvx,vy,vw,vh\fR 15
+Define the location and size of the video region is to be written.  \fIvx\fP
+and \fIvy\fP define the
+.IR x and
+.I y
+coordinates of the upper-left corner of the video region;
+.IR vw and
+.I vh
+define the width and height, in pixels, of the video region.
+.IP \fIdx,dy,dw,dh\fR 15
+Define the location of the source drawable from which the
+video image is to be taken.
+.IR dx and
+.I dy
+define the
+.IR x and
+.I y
+coordinates of the upper-left corner of the drawable region;
+.IR dw and
+.I dh
+define the width and height, in pixels, of the drawable region.
+.SH DESCRIPTION
+.PN XvGetVideo
+outputs video from a drawable.  The position
+and size of the destination rectangle is specified by
+.IR vx ,
+.IR vy ,
+.IR vw ,
+and
+.IR vh .
+The position and size of the source rectangle is specified by
+.IR dx ,
+.IR dy ,
+.IR dw ,
+and
+.IR dh .
+.PP
+Drawable data is clipped to the bounds of the drawable, scaled to the
+requested video region size (or the closest size supported) and
+clipped to the bounds of the video encoding.  The contents of any region
+not updated with drawable data is undefined.
+.PP
+If video is successfully initiated, an XvVideoNotify event with
+detail XvStarted is generated for the drawable.  If the port is
+already in use, its video is preempted, and if the new drawable is
+different than the old, an XvVideoNotify event with detail XvPreempted
+is generated for the old drawable.  If the port is grabbed by another
+client, this request is ignored, and an XvVideoNotify event with detail
+XvBusy is generated for the drawable.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvGetVideo (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvGetVideo (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [BadGC] 8
+Generated if the requested graphics context does not exist.
+.IP [BadDrawable] 8
+Generated if the requested drawable does not exist.
+.IP [BadAlloc] 8
+Generated if there were insufficient resources to process the request.
+.SH SEE ALSO
+.\"
+.BR XvGetStill (__libmansuffix__),
+.BR XvPutVideo (__libmansuffix__),
+.BR XvVideoNotify (__libmansuffix__)
diff --git a/man/XvGrabPort.man b/man/XvGrabPort.man
new file mode 100644 (file)
index 0000000..0e052df
--- /dev/null
@@ -0,0 +1,65 @@
+.TH XvGrabPort __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvGrabPort \- lock port for exclusive use by client
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvGrabPort(Display *" dpy ", XvPortID " port ", Time " time ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Defines the port to be grabbed.
+.IP \fItime\fR 8
+Specifies the request timestamp.
+.\"
+.SH DESCRIPTION
+.\"
+.BR XvGrabPort (__libmansuffix__)
+grabs a port.  Once a client grabs a port, only that client can make video
+requests to that port.
+.PP
+If the time is before the current port time, the XvGrabPort request is
+ignored and XvInvalidTime is returned.  If the port is already grabbed by
+another client, XvAlreadyGrabbed is returned. Otherwise it returns a
+status of \fISuccess\fR.  The port time is updated when the following
+requests are processed:
+.BR XvGrabPort (__libmansuffix__),
+.BR XvUngrabPort (__libmansuffix__),
+.BR XvPutVideo (__libmansuffix__),
+.BR XvPutStill (__libmansuffix__),
+.BR XvGetVideo (__libmansuffix__),
+.BR XvGetStill (__libmansuffix__).
+.PP
+If the port is actively processing video for another client, the
+video is preempted, and an XvVideoNotify event with detail XvPreempted
+is generated for its drawable.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvGrabPort (__libmansuffix__)
+completed successfully.
+.IP [XvInvalidTime] 8
+Returned if requested time is older than the current port time.
+.IP [XvAlreadyGrabbed] 8
+Returned if the port is already grabbed by another client.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvGrabPort (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 15
+Generated if the requested port does not exist.
+.\"
+.SH SEE ALSO
+.\"
+.BR XvUngrabPort (__libmansuffix__),
+.BR XvVideoNotify (__libmansuffix__)
+
diff --git a/man/XvListImageFormats.man b/man/XvListImageFormats.man
new file mode 100644 (file)
index 0000000..c5159e5
--- /dev/null
@@ -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/XvPortNotify.man b/man/XvPortNotify.man
new file mode 100644 (file)
index 0000000..6fa3bb3
--- /dev/null
@@ -0,0 +1,57 @@
+.TH XvPortNotify __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvPortNotify \- event generated when port attributes change
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.br
+.sp 1l
+.EX
+
+     typedef union {
+       int type;
+       XvVideoNotifyEvent xvvideo;
+       XvPortNotifyEvent xvport;
+       long pad[24];
+     } XvEvent;
+
+     typedef struct {
+       int type;
+       unsigned long serial;
+       Bool send_event;
+       Display *display;
+       XvPortID port_id;
+       Time time;
+       Atom attribute;
+       long value;
+     } XvPortNotifyEvent;
+
+.EE
+.\"
+.IP \fItype\fR 15
+Specifies the type of event: XvPortNotify.
+.IP \fIserial\fR 15
+Number of the last request processed by the server.
+.IP \fIsend_event\fR 15
+True if the event was generated by a SendEvent request.
+.IP \fIdisplay\fR 15
+A pointer to the display the event was read from.
+.IP \fIport_id\fR 15
+The port whose attribute has changed.
+.IP \fIattribute\fR 15
+An atom specifying the attribute that changed.
+.IP \fIvalue\fR 15
+The new value of the attribute.
+.\"
+.SH DESCRIPTION
+.\"
+XvPortNotify events are generated when a port attribute is set using
+the
+.BR XvSetPortAttribute (__libmansuffix__)
+function.
+.\"
+.SH SEE ALSO
+.BR XvSetPortAttribute (__libmansuffix__),
+.BR XvGetPortAttribute (__libmansuffix__),
+.BR XvSelectPortNotify (__libmansuffix__).
+.\"
diff --git a/man/XvPutImage.man b/man/XvPutImage.man
new file mode 100644 (file)
index 0000000..ab9b575
--- /dev/null
@@ -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/XvPutStill.man b/man/XvPutStill.man
new file mode 100644 (file)
index 0000000..fb22659
--- /dev/null
@@ -0,0 +1,91 @@
+.TH XvPutStill __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvPutStill \- write a single frame of video to a drawable
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvPutStill(Display *" dpy ", XvPortID " port ", Drawable " d ", GC " gc ","
+.BI "               int " vx ", int " vy ", unsigned int " vw ", unsigned int " vh ","
+.BI "               int " dx ", int " dy ", unsigned int " dw ", unsigned int " dh ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIport\fR 15
+Defines the port from which to get the still.
+.IP \fId\fR 15
+Defines the drawable into which the still is to be written.
+Pixmaps are currently not supported.
+.IP \fIgc\fR 15
+Defines the graphical context.
+GC components are:
+.IR subwindow-mode ,
+.IR clip-x-origin ,
+.IR clip-y-origin ,
+and
+.IR clip-mask .
+.IP \fIvx,vy,vw,vh\fR 15
+Define the location and size of the video region
+to be written.  \fIvx\fP and \fIvy\fP define the
+upper-left pixel of the region. \fIvw\fP and \fIvh\fP
+define the width and height, in pixels, of the region.
+.IP \fIdx,dy,dw,dh\fR 15
+Define the location and size of the destination region into which the
+still image is written.  \fIdx\fP and \fIdy\fP define the upper-left
+corner of the region. \fIdw\fP and \fIdh\fP
+define the width and height, in pixels, of the region.
+.\"
+.SH DESCRIPTION
+.\"
+.BR XvPutStill (__libmansuffix__)
+writes a single frame of video to a drawable.
+The position and size of the source (video) rectangle is specified by
+.IR vx ,
+.IR vy ,
+.IR vw ,
+and
+.IR vh .
+The position and size of the destination (drawable) rectangle is specified by
+.IR dx ,
+.IR dy ,
+.IR dw ,
+and
+.IR dh .
+.PP
+Video data is clipped to the bounds of the video encoding, scaled to the
+requested drawable region size (or the closest size supported) and
+clipped to the bounds of the drawable.
+.PP
+If the port is grabbed by another client, this request is ignored, and
+an XvVideoNotify event with detail XvBusy is generated for the
+drawable.  If the port is not receiving a valid video signal a
+VideoNotify event with detail XvHardError is generated for the drawable.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvPutStill (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvGetStill (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [BadDrawable] 8
+Generated if the requested drawable does not exist.
+.IP [BadGC] 8
+Generated if the requested graphics context does not exist.
+.IP [BadAlloc] 8
+Generated if there were insufficient resources to process the request.
+.SH SEE ALSO
+.\"
+.BR XvPutVideo (__libmansuffix__),
+.BR XvGetStill (__libmansuffix__),
+.BR XvVideoNotify (__libmansuffix__)
diff --git a/man/XvPutVideo.man b/man/XvPutVideo.man
new file mode 100644 (file)
index 0000000..474baef
--- /dev/null
@@ -0,0 +1,100 @@
+.TH XvPutVideo __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvPutVideo \- write video into a drawable
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvPutVideo(Display *" dpy ", XvPortID " port ", Drawable " d ", GC " gc ","
+.BI "               int " vx ", int " vy ", unsigned int " vw ", unsigned int " vh ","
+.BI "               int " dx ", int " dy ", unsigned int " dw ", unsigned int " dh ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIport\fR 15
+Defines the port from which to get video.
+.IP \fId\fR 15
+Defines the drawable (window) into which video is to be written.
+.IP \fIgc\fR 15
+Defines the graphical context.
+GC components are:
+.IR subwindow-mode ,
+.IR clip-x-origin ,
+.IR clip-y-origin ,
+and
+.IR clip-mask .
+.IP \fIvx,vy,vw,vh\fR 15
+Define the size and location of the source (video) region
+to be written.  \fIvx\fP and \fIvy\fP define the
+upper-left pixel of the region. \fIvw\fP and \fIvh\fP
+define the width and height, in pixels, of the region.
+.IP \fIdx,dy,dw,dh\fR 15
+Define the location and size of the destination (drawable) region
+into which the video image is written.
+.I dx
+and
+.I dy
+define the upper-left pixel of the region.
+.I dw
+and
+.I dh
+define the width and height, in pixels, of the region.
+.\"
+.SH DESCRIPTION
+.\"
+XvPutVideo writes video into a drawable.
+The position and size of the source (video) rectangle is specified by
+.IR vx ,
+.IR vy ,
+.IR vw ,
+and
+.IR vh .
+The position and size of the destination (drawable)
+rectangle is specified by
+.IR dx ,
+.IR dy ,
+.IR dw ,
+and
+.IR dh .
+.PP
+Video data is clipped to the bounds of the video encoding, scaled to the
+requested drawable region size (or the closest size supported) and
+clipped to the bounds of the drawable.
+.PP
+If video is successfully initiated, an XvVideoNotify event with detail
+XvStarted is generated for the drawable.  If the port is already in
+use, its video is preempted, and if the new drawable is different than
+the old, an XvVideoNotify event with detail XvPreempted is generated
+for the old drawable.  If the port is grabbed by another client, this
+request is ignored, and an XvVideoNotify event with detail XvBusy is
+generated for the drawable. If the port is not receiving a valid video
+signal or if the video signal is interrupted while video is active a
+VideoNotify event with detail XvHardError is generated for the drawable.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvPutVideo (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if there were insufficient resources to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [BadDrawable] 8
+Generated if the requested drawable does not exist.
+.IP [BadGC] 8
+Generated if the requested graphics context does not exist.
+.IP [BadAlloc] 8
+Generated if there were insufficient resources to process the request.
+.\"
+.SH SEE ALSO
+.\"
+.BR XvPutStill (__libmansuffix__),
+.BR XvGetVideo (__libmansuffix__),
+.BR XvVideoNotify (__libmansuffix__)
diff --git a/man/XvQueryAdaptors.man b/man/XvQueryAdaptors.man
new file mode 100644 (file)
index 0000000..48eabae
--- /dev/null
@@ -0,0 +1,93 @@
+.TH XvQueryAdaptors __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvQueryAdaptors \- return adaptor information for a screen
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvQueryAdaptors(Display *" dpy ", Window " window ","
+.BI "                    unsigned int *" p_num_adaptors ","
+.BI "                    XvAdaptorInfo **" pp_adaptor_info ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIwindow\fR 8
+Specifies a window of the screen for which the adaptor
+information is desired.
+.IP \fIp_num_adaptors\fR 8
+A pointer to where the number of adaptors for the specified screen
+is returned.
+.IP \fIpp_adaptor_info\fR 8
+A pointer to where the list of returned adaptor information is
+returned.
+.\"
+.SH DESCRIPTION
+.\"
+.BR XvQueryAdaptors (__libmansuffix__)
+ returns an video adaptor information for
+the screen of the specified drawable.  The XvAdaptorInfo structure
+has the following organization:
+.EX
+
+     typedef struct {
+       XvPortID base_id;
+       unsigned long num_ports;
+       char type;
+       char *name;
+       unsigned long num_formats;
+       XvFormat *formats;
+       unsigned long num_adaptors;
+     } XvAdaptorInfo;
+
+.EE
+.IP \fIbase_id\fR 8
+The resource ID of the first adaptor port.
+.IP \fInum_ports\fR 8
+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
+The number of depth/visual id formats supported by the adaptor.
+.IP \fIformats\fR 8
+A pointer to an array of XvFormat structures.
+.PP
+The XvFormat structure has the following organization:
+.EX
+
+     typedef struct {
+       char depth;
+       unsigned long visual_id;
+     } XvFormat;
+
+.EE
+.IP \fIdepth\fR 8
+A drawable depth supported by the adaptor.
+.IP \fIvisual_id\fR 8
+A visual-id supported for the given depth by the adaptor.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvQueryAdaptors (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvQueryAdaptors (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [Drawable] 8
+Returned if the requested drawable does not exist.
+.SH SEE ALSO
+.BR XvFreeAdaptorInfo (__libmansuffix__)
+.\"
diff --git a/man/XvQueryBestSize.man b/man/XvQueryBestSize.man
new file mode 100644 (file)
index 0000000..5031170
--- /dev/null
@@ -0,0 +1,55 @@
+.TH XvQueryBestSize __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvQueryBestSize \- determine the optimum drawable region size
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvQueryBestSize(Display *" dpy ", XvPort " port ", Bool " motion ","
+.BI "                    unsigned int " vw ", unsigned int " vh ","
+.BI "                    unsigned int " dw ", unsigned int " dh ","
+.BI "                    unsigned int *" p_dw ", unsigned int *" p_dh ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIport\fR 15
+Defines the port associated with the display and adaptor for which
+the optimum size is to be calculated.
+.IP \fImotion\fR 15
+Specifies \fITrue\fP if the destination size needs to support
+full motion, and \fIFalse\fP if the destination size need only
+support still images.
+.IP \fIvw,vh\fR 15
+Specifies the size of the source video region desired.
+.IP \fIdw,dh\fR 15
+Specifies the size of the destination drawable region desired.
+.IP \fIp_dw,p_dh\fR 15
+Pointers to where the closest destination sizes supported by the server are
+returned.
+.\"
+.SH DESCRIPTION
+.\"
+Some ports may be able to scale incoming or outgoing video.
+.BR XvQueryBestSize (__libmansuffix__)
+returns the size of the closest destination region that is supported
+by the adaptor.  The returned size is guaranteed to be smaller than
+the requested size if a smaller size is supported.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvQueryBestSize (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvQueryBestSize (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.br
diff --git a/man/XvQueryEncodings.man b/man/XvQueryEncodings.man
new file mode 100644 (file)
index 0000000..ef24f59
--- /dev/null
@@ -0,0 +1,85 @@
+.TH XvQueryEncodings __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvQueryEncodings \- return list of encodings for an adaptor
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvQueryEncodings(Display *" dpy ", XvPortID " port ","
+.BI "                     unsigned int *" p_num_encodings ","
+.BI "                     XvEncodingInfo **" pp_encoding_info ");"
+.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 encodings.
+.IP \fIp_num_encodings\fR 8
+A pointer to where the number of encodings supported
+by the adaptor is written.
+.IP \fIpp_encoding_info\fR 8
+A pointer to where the list of returned encoding information is returned.
+XvEncodingInfo has the following structure:
+.EX
+
+    typedef struct {
+      XvEncodingID encoding_id;
+      char *name;
+      unsigned long width;
+      unsigned long height;
+      XvRational rate;
+      unsigned long num_encodings;
+    } XvEncodingInfo;
+
+.EE
+.IP \fIencoding_id\fR 8
+Specifies the encoding-id of the encoding.  The encoding-id is used to
+identify an encoding when a port's encoding attribute is changed.
+.IP \fIname\fR 8
+A pointer to a formatted string that identifies the encoding.  The string
+has the format "\fItiming\fR-\fIsignaltype\fR".  For example "ntsc-composite".
+.IP \fIwidth,height\fR 8
+The width and height, in pixels, of the decoded video image.
+.IP \fIrate\fR 8
+The field rate of the decoded video.
+.PP
+The XvRational structure is used to specify a fractional number.
+It has the following structure:
+.EX
+
+    typedef struct {
+      int numerator;
+      int denominator;
+    } XvRational;
+
+.EE
+The \fInumerator\fP and \fIdenominator\fP fields specify the
+appropriate parts of a fractional number.
+.\"
+.SH DESCRIPTION
+.BR XvQueryEncodings (__libmansuffix__)
+returns encoding information about an adaptor.  Each
+encoding is described by the XvEncodingInfo structure described above.  The
+encodings are identified by an encoding-id, which can be used to set or get
+the encoding attribute of a port.
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvQueryEncodings (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvQueryEncodings (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.\"
+.SH SEE ALSO
+.\"
+.BR XvFreeEncodingInfo (__libmansuffix__)
+
diff --git a/man/XvQueryExtension.man b/man/XvQueryExtension.man
new file mode 100644 (file)
index 0000000..56a0826
--- /dev/null
@@ -0,0 +1,48 @@
+.TH XvQueryExtension __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvQueryExtension \- return version and release of extension
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvQueryExtension(Display *" dpy ", unsigned int *" p_version ","
+.BI "                    unsigned int *" p_revision ","
+.BI "                    unsigned int *" p_request_base ","
+.BI "                    unsigned int *" p_event_base ","
+.BI "                    unsigned int *" p_error_base ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIp_version\fR 15
+Pointer to where the current version number of the \fIXv\fP video extension
+is written.
+.IP \fIp_revision\fR 15
+Pointer to where the revision number of the \fIXv\fP video extension
+is written.
+.IP \fIp_request_base\fR 15
+Pointer to where the extension major request number is returned
+.IP \fIp_event_base\fR 15
+Pointer to where the extension event base is returned
+.IP \fIp_error_base\fR 15
+Pointer to where the extension error base is returned
+.\"
+.SH DESCRIPTION
+.\"
+.PP
+.BR XvQueryExtension (__libmansuffix__)
+returns the version and release numbers for the Xv video extension
+currently loaded on the system.  The extension major request number,
+event base, and error base are also returned.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvQueryExtension (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv video extension is not available for the named display.
+.SH SEE ALSO
+.BR Xv (__libmansuffix__)
diff --git a/man/XvQueryPortAttributes.man b/man/XvQueryPortAttributes.man
new file mode 100644 (file)
index 0000000..9fbc507
--- /dev/null
@@ -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/XvSelectPortNotify.man b/man/XvSelectPortNotify.man
new file mode 100644 (file)
index 0000000..f31fa24
--- /dev/null
@@ -0,0 +1,49 @@
+.TH XvSelectPortNotify __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvSelectPortNotify \- enable or disable XvPortNotify events
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvSelectPortNotify(Display *" dpy ", XvPortID " port ", Bool " onoff ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Specifies the port for which PortNotify events are to be generated
+when its attributes are changed using
+.BR XvSetPortAttribute (__libmansuffix__)
+.
+.IP \fIonoff\fR 8
+Specifies whether notification is to be enabled or disabled.
+.\"
+.SH DESCRIPTION
+.\"
+.BR XvSelectPortNotify (__libmansuffix__)
+enables or disables PortNotify event delivery to the requesting client.
+.BR XvPortNotify (__libmansuffix__)
+events are generated when port attributes are changed using
+.BR XvSetPortAttribute (__libmansuffix__).
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvSelectPortNotify (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvSelectPortNotify (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.SH SEE ALSO
+.\"
+.BR XvSetPortNotify (__libmansuffix__),
+.BR XvSetPortAttribute (__libmansuffix__),
+.BR XvPortNotify (__libmansuffix__)
diff --git a/man/XvSelectVideoNotify.man b/man/XvSelectVideoNotify.man
new file mode 100644 (file)
index 0000000..096d006
--- /dev/null
@@ -0,0 +1,42 @@
+.TH XvSelectVideoNotify __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvSelectVideoNotify \- enable or disable VideoNotify events
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvSelectVideoNotify(Display *" dpy ", Drawable " drawable ", Bool " onoff ");"
+.fi
+.SH ARGUMENTS
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIdrawable\fR 15
+Defines the drawable in which video activity is to be reported.
+.IP \fIonoff\fR 15
+Selects whether video notification is enabled or disabled.
+.\"
+.SH DESCRIPTION
+.BR XvSelectVideoNotify (__libmansuffix__)
+enables or disables
+.BR XvVideoNotify (__libmansuffix__)
+events to be reported for video activity in a drawable.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvSelectVideoNotify (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvSelectVideoNotify (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [BadDrawable] 8
+Generated if the requested drawable does not exist.
+.SH SEE ALSO
+.\"
+.BR XvVideoNotify (__libmansuffix__)
+
diff --git a/man/XvSetPortAttribute.man b/man/XvSetPortAttribute.man
new file mode 100644 (file)
index 0000000..c1f14dc
--- /dev/null
@@ -0,0 +1,90 @@
+'\" t
+.TH XvSetPortAttribute __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvSetPortAttribute \- sets an attribute of a video port
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvSetPortAttribute(Display *" dpy ", XvPortID " port ","
+.BI "                       Atom " attribute ", int " value ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 15
+Specifies the connection to the X server.
+.IP \fIport\fR 15
+Specifies the port for which the attribute is to be used.
+.IP \fIattribute\fR 15
+Identifies the port attribute to be set by this request.
+Can be one of the table entries under the column "String," below.
+.IP \fIvalue\fR 15
+Identifies the value to which \fIattribute\fP is to be set.
+Can be one of the table entries under the column "Type," below.
+.\"
+.SH DESCRIPTION
+.BR XvSetPortAttribute (__libmansuffix__)
+ permits a client to set the port attribute
+to specified values.  This request supports the following values:
+.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
+.PP
+The supplied encoding must be one of the encodings listed for the
+adaptor, otherwise an Encoding error results.
+.PP
+If the adaptor does not support the exact hue, saturation,
+brightness, and contrast levels supplied, the closest levels
+supported are assumed.  Use
+.BR XvGetPortAttribute (__libmansuffix__)
+to query the resulting levels.
+.PP
+When an
+.BR XvSetPortAttribute (__libmansuffix__)
+request is processed, a
+.BR XvPortNotify (__libmansuffix__)
+event is generated for all clients that have requested notification of
+port changes using
+.BR XvSelectPortNotify (__libmansuffix__).
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvSetPortAttribute (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvSelectVideoNotify (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [XvBadEncoding] 8
+Generated if an encoding is specified that does not exist.
+.IP [BadMatch] 8
+Generated if the requested attribute atom does not specify an attribute
+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 (file)
index 0000000..a215080
--- /dev/null
@@ -0,0 +1 @@
+.so man__libmansuffix__/XvCreateImage.__libmansuffix__
diff --git a/man/XvShmPutImage.man b/man/XvShmPutImage.man
new file mode 100644 (file)
index 0000000..0cf496f
--- /dev/null
@@ -0,0 +1 @@
+.so man__libmansuffix__/XvPutImage.__libmansuffix__
diff --git a/man/XvStopVideo.man b/man/XvStopVideo.man
new file mode 100644 (file)
index 0000000..3904521
--- /dev/null
@@ -0,0 +1,48 @@
+.TH XvStopVideo __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvStopVideo \- stop active video
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvStopVideo(Display *" dpy ", XvPortID " port ", Drawable " draw ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Specifies the port for which video is to be stopped.
+.IP \fIdraw\fR 8
+Specifies the drawable associated with the named port.
+.SH DESCRIPTION
+.\"
+.BR XvStopVideo (__libmansuffix__)
+stops active video for the specified port and drawable.  If the port
+is not processing video, or if it is processing video in a different
+drawable, the request is ignored.  When video is stopped a
+.BR XvVideoNotify (__libmansuffix__)
+event with detail XvStopped is generated for the associated drawable.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvStopVideo (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvStopVideo (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.IP [BadDrawable] 8
+Generated if the requested drawable does not exist.
+.\"
+.SH SEE ALSO
+.BR XvGetVideo (__libmansuffix__),
+.BR XvPutVideo (__libmansuffix__),
+.BR XvVideoNotify (__libmansuffix__)
diff --git a/man/XvUngrabPort.man b/man/XvUngrabPort.man
new file mode 100644 (file)
index 0000000..6538ff4
--- /dev/null
@@ -0,0 +1,43 @@
+.TH XvUngrabPort __libmansuffix__ __vendorversion__ "libXv Functions"
+.SH NAME
+XvUngrabPort \- release port grabbed for video operation
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.sp
+.nf
+.BI "int XvUngrabPort(Display *" dpy ", XvPortID " port ", Time " time ");"
+.fi
+.SH ARGUMENTS
+.\"
+.IP \fIdpy\fR 8
+Specifies the connection to the X server.
+.IP \fIport\fR 8
+Specifies the port to be released.  If the port had not been
+previously grabbed, the request is ignored.
+.IP \fItime\fR 8
+Specifies the request timestamp.
+.\"
+.SH DESCRIPTION
+.BR XvUngrabPort (__libmansuffix__)
+ releases a grabbed port.  If \fItime\fR specifies a time before the last
+.BR XvGrabPort (__libmansuffix__)
+was executed, the request is ignored.
+.\"
+.SH RETURN VALUES
+.IP [Success] 8
+Returned if
+.BR XvUngrabPort (__libmansuffix__)
+completed successfully.
+.IP [XvBadExtension] 8
+Returned if the Xv extension is unavailable.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvUngrabPort (__libmansuffix__)
+failed to allocate memory to process the request.
+.SH DIAGNOSTICS
+.IP [XvBadPort] 8
+Generated if the requested port does not exist.
+.SH SEE ALSO
+.\"
+.BR XvGrabPort (__libmansuffix__)
diff --git a/man/XvVideoNotify.man b/man/XvVideoNotify.man
new file mode 100644 (file)
index 0000000..8d0a24b
--- /dev/null
@@ -0,0 +1,63 @@
+.TH XvVideoNotify __libmansuffix__  __vendorversion__ "libXv Functions"
+.SH NAME
+XvVideoNotify \- event generated for video processing
+.\"
+.SH SYNOPSIS
+.B #include <X11/extensions/Xvlib.h>
+.br
+.sp 1l
+.EX
+
+     typedef union {
+       int type;
+       XvVideoNotifyEvent xvvideo;
+       XvPortNotifyEvent xvport;
+       long pad[24];
+     } XvEvent;
+
+     typedef struct {
+       int type;
+       unsigned long serial;
+       Bool send_event;
+       Display *display;
+       Drawable drawable;
+       unsigned long reason;
+       XvPortID port_id;
+       Time time;
+     } XvVideoNotifyEvent;
+
+.EE
+.\"
+.IP \fItype\fR 8
+Specifies the type of event:
+.BR XvVideoNotify .
+.IP \fIserial\fR 8
+Number of the last request processed by the server.
+.IP \fIsend_event\fR 8
+True if the event was generated by a SendEvent request.
+.IP \fIdisplay\fR 8
+A pointer to the display the event was read from.
+.IP \fIdrawable\fR 8
+The drawable for which the event was generated.
+.IP \fIreason\fR 8
+The reason the event was generated: \fBXvStarted\fR, \fBXvStopped\fR,
+\fBXvPreempted\fR, \fBXvBusy\fR, \fBXvHardError\fR.
+.IP \fIport_id\fR 8
+The port processing the video for which the event was generated.
+.\"
+.SH DESCRIPTION
+.\"
+.B XvVideoNotify
+events are generated when video is started, stopped, preempted by
+another video request, ignored because the port is grabbed by another
+client, or interrupted because of a hard transmission or reception
+error.
+.\"
+.SH SEE ALSO
+.BR XvPutVideo (__libmansuffix__),
+.BR XvPutStill (__libmansuffix__),
+.BR XvGetVideo (__libmansuffix__),
+.BR XvGetStill (__libmansuffix__),
+.BR XvStopVideo (__libmansuffix__),
+.BR XvSelectVideoNotify (__libmansuffix__)
+.\"
diff --git a/man/xv-library-v2.2.txt b/man/xv-library-v2.2.txt
new file mode 100644 (file)
index 0000000..a8807db
--- /dev/null
@@ -0,0 +1,300 @@
+
+Addendum to the Xv Client library documentation
+===============================================
+
+  The following features are new to version 2.2
+
+1) In addition to XvInputMask and XvOutputMask masks in the type field
+   of the XvAdaptorInfo there are 3 new bits defined - XvVideoMask,
+   XvStillMask and XvImageMask indicating that the adaptor is capable
+   of video, still or image primitives respectively.
+
+2) A new function and structure is defined to allow querying
+   port attributes.
+
+typedef struct {
+  int flags;
+  int min_value;
+  int max_value;
+  char *name;
+} XvAttribute;
+
+  flags  -   May be XvGettable or XvSettable or both OR'd together
+            indicating the particular attribute is readable, writeable
+            or readable and writeable.
+
+  min_value, max_value -  Indicate the minimun and maximum attribute
+            values which are valid for the driver.
+
+  name -  A string describing the name of the attribute that may be used
+            to retrieve the Atom for the particular attribute.
+
+
+extern XvAttribute* XvQueryPortAttributes(
+  Display*                /* display */,
+  XvPortID                /* port */,
+  int*                    /* number */
+);
+
+   XvQueryPortAttributes returns the number of attributes and an
+   array of XvAttributes valid for the given port.  The array may
+   be freed with XFree().
+
+
+3)  The X Video Extension (Xv) is extended to support client images in
+alternate colorspaces (XvImages) in the following way.
+
+  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
+  XvListImageFormats().
+
+  XvImages may be created with the help of XvCreateImage() or
+  XvShmCreateImage();
+
+  XvImages may be displayed with XvPutImage() or XvShmPutImage().
+
+  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.
+
+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;
+
+
+   id -  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.
+
+   type - XvRGB or XvYUV.
+
+   byte_order -  The byte order of the image.  It is either LSBFirst
+                or MSBFirst.
+
+   guid -  The Globally Unique IDentifier (also known as Universally Unique
+          IDentifier).  When not applicable, all characters are NULL.
+
+   bits_per_pixel - 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_.
+
+   format - XvPacked or XvPlanar.
+
+   num_planes - The number of planes in planar formats.
+
+   depth - Significant bits per pixel.
+
+   red_mask, green_mask, blue_mask -  The red, green and blue bitmasks
+                                     (RGB formats only).
+
+
+   ?_sample_bits -  The size of each sample in bits (YUV formats only).
+
+   horz_?_period, vert_?_period -  The period (in pixels) on which samples
+                                   occur in the horizontal and vertical
+                                   directions (YUV formats only).
+
+   component_order -  Upper case ascii characters representing the order
+                      that samples are stored within packed formats.
+                      For planar formats this represents the ordering of
+                      the planes.
+
+   scanline_order - XvTopToBottom or XvBottomToTop.
+
+Note:  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.
+
+
+
+XvImageFormatValues * XvListImageFormats (
+   Display     *display,
+   XvPortID    port_id,
+   int                 *count_return
+);
+
+   Returns the XvImageFormatValues supported by the specified port.
+This list should be freed with XFree().
+
+
+typedef struct {
+   int id;
+   int width, height;
+   int data_size;
+   int num_planes;
+   int *pitches;
+   int *offsets;
+   char *data;
+   XPointer obdata;
+} XvImage;
+
+   id - XvImageFormatValues id.
+
+   width, height - The width and height of the image in pixels.
+
+   int data_size - The size of the data buffer in bytes.
+
+   num_planes -  The number of image planes.
+
+   pitches -  An array of size num_planes indicating the scanline pitch
+              in bytes.  Each plane may have a different pitch.
+
+   offsets -  An array of size num_planes indicating the byte offset
+              from "data" to the start of each plane.
+
+   data -  A pointer to the start of the data buffer.
+
+   obdata -  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.
+
+XvImage * XvCreateImage (
+   Display *display,
+   XvPortID port,
+   int id,
+   char *data,
+   int width,
+   int height
+);
+
+   display - Specifies the connection to the Xserver.
+   port    - Specifies the port the XvImage will be used with.
+   id      - Specifies the format of the image to be created by
+            the XvImageFormatValues id.
+   data    - Specifies the image data.
+   width
+   height  - Specifies the desired width and height of the image.
+
+   This function is similar to XCreateImage.  The library will
+allocate the XvImage structure and fill out all fields except for
+"data".  Width and height may be enlarged in some YUV formats.
+The size of the data buffer that needs to be allocated will be
+give in the "data_size" field in the XvImage.  Image data is
+not allocated by this function.  The client may pass a pointer
+to the preallocated memory as "data" or may allocate the memory
+and fill in the XvImage structure's data field after the
+"data_size" field has been filled out by the server.  The XvImage
+structure may be freed by XFree();
+
+
+XvImage * XvShmCreateImage (
+   Display *display,
+   XvPortID port,
+   int id,
+   char* data,
+   int width,
+   int height,
+   XShmSegmentInfo *shminfo
+);
+
+   This function is similar to XShmCreateImage.  The library will
+allocate the XvImage structure and fill out all fields except for
+"data".  Width and height may be enlarged in some YUV formats.
+The size of the data buffer that needs to be allocated will be
+give in the "data_size" field in the XvImage.  Image data is
+not allocated by this function.  The client may pass a pointer
+to the preallocated memory as "data" or may allocate the memory
+and fill in the XvImage structure's data field after the
+"data_size" field has been filled out by the server.  The XvImage
+structure may be freed by XFree();
+
+
+XvPutImage (
+   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,
+);
+
+XvShmPutImage (
+   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
+);
+
+   display - The connection to the X-Server.
+
+   id -  The port id of a port on an XvImage capable adaptor.
+
+   d - The target drawable.
+
+   gc - the graphics context specifying the clip mask to use, if any.
+
+   image - A pointer to the XvImage to be displayed.
+
+   src_? - The portion of the XvImage to be displayed.
+
+   dest_? - The portion of the destination drawable to be filled by the image.
+
+   send_event - 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.
+
+Shared memory segments are attached/detached with XShmAttach/Detach.
+
+
+Some of the possible Errors:
+
+   BadDrawable   - The specified drawable does not exist.
+   BadContext    - The specified GC does not exist.
+   BadMatch      - Incompatible arguments such as a port that isn't capable
+                   of displaying XvImages.
+   XvBadPort     - The specified port does not exist.
+   BadAlloc      - The server was unable to allocate resources required
+                   to complete the operation.
+   BadValue      - Some numeric value falls outside the range of the
+                   values accepted by the request.
+   BadShmSegCode - An invalid shared memory segment.
diff --git a/packaging/libXv.spec b/packaging/libXv.spec
new file mode 100755 (executable)
index 0000000..0d7f7f0
--- /dev/null
@@ -0,0 +1,65 @@
+Summary: X.Org X11 libXv runtime library
+Name:    libXv
+Version: 1.0.7
+Release: 1
+License: MIT
+Group: System Environment/Libraries
+URL: http://www.x.org
+
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig(videoproto) pkgconfig(xext)
+BuildRequires:  pkgconfig(xorg-macros)
+
+%description
+X.Org X11 libXv runtime library
+
+%package devel
+Summary: X.Org X11 libXv development package
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Provides: libxv-devel
+
+%description devel
+X.Org X11 libXv development package
+
+%prep
+%setup -q
+
+%build
+%reconfigure --disable-static \
+              LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p %{buildroot}/usr/share/license
+cp -af COPYING %{buildroot}/usr/share/license/%{name}
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%remove_docs
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+/usr/share/license/%{name}
+%doc AUTHORS COPYING ChangeLog
+%{_libdir}/libXv.so.1
+%{_libdir}/libXv.so.1.0.0
+
+%files devel
+%defattr(-,root,root,-)
+%doc man/xv-library-v2.2.txt
+%{_includedir}/X11/extensions/Xvlib.h
+%{_libdir}/libXv.so
+%{_libdir}/pkgconfig/xv.pc
+#%dir %{_mandir}/man3x
+#%{_mandir}/man3/*.3*
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..0948474
--- /dev/null
@@ -0,0 +1,31 @@
+lib_LTLIBRARIES = libXv.la
+
+libXv_la_SOURCES = \
+         Xv.c \
+         Xvlibint.h
+
+libXv_la_LIBADD = @XV_LIBS@
+AM_CPPFLAGS = @XV_CFLAGS@ -I$(top_srcdir)/include @MALLOC_ZERO_CFLAGS@
+AM_CFLAGS = $(CWARNFLAGS)
+
+libXv_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+               $(AM_CPPFLAGS) $(CPPFLAGS)
+
+lint:
+       $(LINT) $(ALL_LINT_FLAGS) $(libXv_la_SOURCES) $(XV_LIBS)
+endif LINT
+
+if MAKE_LINT_LIB
+lintlibdir = $(libdir)
+
+lintlib_DATA = $(LINTLIB)
+
+$(LINTLIB): $(libXau_la_SOURCES)
+       $(LINT) -y -oXv -x $(ALL_LINT_FLAGS) $(libXv_la_SOURCES)
+
+CLEANFILES = $(LINTLIB)
+endif MAKE_LINT_LIB
+
diff --git a/src/Xv.c b/src/Xv.c
new file mode 100644 (file)
index 0000000..b081e8a
--- /dev/null
+++ b/src/Xv.c
@@ -0,0 +1,1155 @@
+/***********************************************************
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/*
+** File:
+**
+**   Xv.c --- Xv library extension module.
+**
+** Author:
+**
+**   David Carver (Digital Workstation Engineering/Project Athena)
+**
+** Revisions:
+**
+**   26.06.91 Carver
+**     - changed XvFreeAdaptors to XvFreeAdaptorInfo
+**     - changed XvFreeEncodings to XvFreeEncodingInfo
+**
+**   11.06.91 Carver
+**     - changed SetPortControl to SetPortAttribute
+**     - changed GetPortControl to GetPortAttribute
+**     - changed QueryBestSize
+**
+**   15.05.91 Carver
+**     - version 2.0 upgrade
+**
+**   240.01.91 Carver
+**     - version 1.4 upgrade
+**
+*/
+
+#include <stdio.h>
+#include "Xvlibint.h"
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/XShm.h>
+
+static XExtensionInfo _xv_info_data;
+static XExtensionInfo *xv_info = &_xv_info_data;
+static const char *xv_extension_name = XvName;
+
+#define XvCheckExtension(dpy, i, val) \
+  XextCheckExtension(dpy, i, xv_extension_name, val)
+
+static char *xv_error_string(Display *dpy, int code, XExtCodes *codes,
+                            char * buf, int n);
+static int xv_close_display(Display *dpy, XExtCodes *codes);
+static Bool xv_wire_to_event(Display *dpy, XEvent *host, xEvent *wire);
+
+static XExtensionHooks xv_extension_hooks = {
+    NULL,                               /* create_gc */
+    NULL,                               /* copy_gc */
+    NULL,                               /* flush_gc */
+    NULL,                               /* free_gc */
+    NULL,                               /* create_font */
+    NULL,                               /* free_font */
+    xv_close_display,                   /* close_display */
+    xv_wire_to_event,                   /* wire_to_event */
+    NULL,                               /* event_to_wire */
+    NULL,                               /* error */
+    xv_error_string                     /* error_string */
+};
+
+
+static const char *xv_error_list[] =
+{
+   "BadPort",      /* XvBadPort     */
+   "BadEncoding",   /* XvBadEncoding */
+   "BadControl"     /* XvBadControl  */
+};
+
+static XEXT_GENERATE_CLOSE_DISPLAY (xv_close_display, xv_info)
+
+
+static XEXT_GENERATE_FIND_DISPLAY (xv_find_display, xv_info,
+                                   xv_extension_name,
+                                   &xv_extension_hooks,
+                                  XvNumEvents, NULL)
+
+
+static XEXT_GENERATE_ERROR_STRING (xv_error_string, xv_extension_name,
+                                   XvNumErrors, xv_error_list)
+
+
+int
+XvQueryExtension(
+     Display *dpy,
+     unsigned int *p_version,
+     unsigned int *p_revision,
+     unsigned int *p_requestBase,
+     unsigned int *p_eventBase,
+     unsigned int *p_errorBase
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvQueryExtensionReq *req;
+  xvQueryExtensionReply rep;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(QueryExtension, req);
+
+  if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+     UnlockDisplay(dpy);
+     SyncHandle();
+     return XvBadExtension;
+  }
+
+  *p_version = rep.version;
+  *p_revision = rep.revision;
+  *p_requestBase = info->codes->major_opcode;
+  *p_eventBase = info->codes->first_event;
+  *p_errorBase = info->codes->first_error;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvQueryAdaptors(
+     Display *dpy,
+     Window window,
+     unsigned int *p_nAdaptors,
+     XvAdaptorInfo **p_pAdaptors
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvQueryAdaptorsReq *req;
+  xvQueryAdaptorsReply rep;
+  int size,ii,jj;
+  char *name;
+  XvAdaptorInfo *pas, *pa;
+  XvFormat *pfs, *pf;
+  char *buffer;
+  union
+    {
+      char *buffer;
+      char *string;
+      xvAdaptorInfo *pa;
+      xvFormat *pf;
+    } u;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(QueryAdaptors, req);
+  req->window = window;
+
+  /* READ THE REPLY */
+
+  if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadReply);
+  }
+
+  size = rep.length << 2;
+  if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadAlloc);
+  }
+  _XRead (dpy, buffer, size);
+
+  u.buffer = buffer;
+
+  /* GET INPUT ADAPTORS */
+
+  if (rep.num_adaptors == 0) {
+      pas = NULL;
+  } else {
+      size = rep.num_adaptors*sizeof(XvAdaptorInfo);
+      if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) {
+          Xfree(buffer);
+          UnlockDisplay(dpy);
+          SyncHandle();
+          return(XvBadAlloc);
+      }
+  }
+
+  /* INIT ADAPTOR FIELDS */
+
+  pa = pas;
+  for (ii=0; ii<rep.num_adaptors; ii++) {
+      pa->num_adaptors = 0;
+      pa->name = (char *)NULL;
+      pa->formats = (XvFormat *)NULL;
+      pa++;
+  }
+
+  pa = pas;
+  for (ii=0; ii<rep.num_adaptors; ii++) {
+      pa->type = u.pa->type;
+      pa->base_id = u.pa->base_id;
+      pa->num_ports = u.pa->num_ports;
+      pa->num_formats = u.pa->num_formats;
+      pa->num_adaptors = rep.num_adaptors - ii;
+
+      /* GET ADAPTOR NAME */
+
+      size = u.pa->name_size;
+      u.buffer += (sz_xvAdaptorInfo + 3) & ~3;
+
+      if ( (name = (char *)Xmalloc(size+1)) == NULL)
+       {
+         XvFreeAdaptorInfo(pas);
+         Xfree(buffer);
+          UnlockDisplay(dpy);
+          SyncHandle();
+         return(XvBadAlloc);
+       }
+      (void)strncpy(name, u.string, size);
+      name[size] = '\0';
+      pa->name = name;
+
+      u.buffer += (size + 3) & ~3;
+
+      /* GET FORMATS */
+
+      size = pa->num_formats*sizeof(XvFormat);
+      if ((pfs=(XvFormat *)Xmalloc(size))==NULL) {
+         XvFreeAdaptorInfo(pas);
+         Xfree(buffer);
+          UnlockDisplay(dpy);
+          SyncHandle();
+         return(XvBadAlloc);
+      }
+
+      pf = pfs;
+      for (jj=0; jj<pa->num_formats; jj++) {
+         pf->depth = u.pf->depth;
+         pf->visual_id = u.pf->visual;
+         pf++;
+
+         u.buffer += (sz_xvFormat + 3) & ~3;
+      }
+
+      pa->formats = pfs;
+
+      pa++;
+
+  }
+
+  *p_nAdaptors = rep.num_adaptors;
+  *p_pAdaptors = pas;
+
+  Xfree(buffer);
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return (Success);
+}
+
+
+void
+XvFreeAdaptorInfo(XvAdaptorInfo *pAdaptors)
+{
+
+  XvAdaptorInfo *pa;
+  int ii;
+
+  if (!pAdaptors) return;
+
+  pa = pAdaptors;
+
+  for (ii=0; ii<pAdaptors->num_adaptors; ii++, pa++)
+    {
+      if (pa->name)
+       {
+         Xfree(pa->name);
+       }
+      if (pa->formats)
+       {
+         Xfree(pa->formats);
+       }
+    }
+
+  Xfree(pAdaptors);
+}
+
+int
+XvQueryEncodings(
+     Display *dpy,
+     XvPortID port,
+     unsigned int *p_nEncodings,
+     XvEncodingInfo **p_pEncodings
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvQueryEncodingsReq *req;
+  xvQueryEncodingsReply rep;
+  int size, jj;
+  char *name;
+  XvEncodingInfo *pes, *pe;
+  char *buffer;
+  union
+    {
+      char *buffer;
+      char *string;
+      xvEncodingInfo *pe;
+    } u;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(QueryEncodings, req);
+  req->port = port;
+
+  /* READ THE REPLY */
+
+  if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadReply);
+  }
+
+  size = rep.length << 2;
+  if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadAlloc);
+  }
+  _XRead (dpy, buffer, size);
+
+  u.buffer = buffer;
+
+  /* GET ENCODINGS */
+
+  size = rep.num_encodings*sizeof(XvEncodingInfo);
+  if ( (pes = (XvEncodingInfo *)Xmalloc(size)) == NULL) {
+      Xfree(buffer);
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadAlloc);
+  }
+
+  /* INITIALIZE THE ENCODING POINTER */
+
+  pe = pes;
+  for (jj=0; jj<rep.num_encodings; jj++) {
+      pe->name = (char *)NULL;
+      pe->num_encodings = 0;
+      pe++;
+  }
+
+  pe = pes;
+  for (jj=0; jj<rep.num_encodings; jj++) {
+      pe->encoding_id = u.pe->encoding;
+      pe->width = u.pe->width;
+      pe->height = u.pe->height;
+      pe->rate.numerator = u.pe->rate.numerator;
+      pe->rate.denominator = u.pe->rate.denominator;
+      pe->num_encodings = rep.num_encodings - jj;
+
+      size = u.pe->name_size;
+      u.buffer += (sz_xvEncodingInfo + 3) & ~3;
+
+      if ( (name = (char *)Xmalloc(size+1)) == NULL) {
+         XvFreeEncodingInfo(pes);
+         Xfree(buffer);
+          UnlockDisplay(dpy);
+          SyncHandle();
+         return(XvBadAlloc);
+      }
+      strncpy(name, u.string, size);
+      name[size] = '\0';
+      pe->name = name;
+      pe++;
+
+      u.buffer += (size + 3) & ~3;
+  }
+
+  *p_nEncodings = rep.num_encodings;
+  *p_pEncodings = pes;
+
+  Xfree(buffer);
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return (Success);
+}
+
+void
+XvFreeEncodingInfo(XvEncodingInfo *pEncodings)
+{
+
+  XvEncodingInfo *pe;
+  int ii;
+
+  if (!pEncodings) return;
+
+  pe = pEncodings;
+
+  for (ii=0; ii<pEncodings->num_encodings; ii++, pe++) {
+      if (pe->name) Xfree(pe->name);
+  }
+
+  Xfree(pEncodings);
+}
+
+int
+XvPutVideo(
+     Display *dpy,
+     XvPortID port,
+     Drawable d,
+     GC gc,
+     int vx, int vy,
+     unsigned int vw, unsigned int vh,
+     int dx, int dy,
+     unsigned int dw, unsigned int dh
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvPutVideoReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  FlushGC(dpy, gc);
+
+  XvGetReq(PutVideo, req);
+
+  req->port = port;
+  req->drawable = d;
+  req->gc = gc->gid;
+  req->vid_x = vx;
+  req->vid_y = vy;
+  req->vid_w = vw;
+  req->vid_h = vh;
+  req->drw_x = dx;
+  req->drw_y = dy;
+  req->drw_w = dw;
+  req->drw_h = dh;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvPutStill(
+     Display *dpy,
+     XvPortID port,
+     Drawable d,
+     GC gc,
+     int vx, int vy,
+     unsigned int vw, unsigned int vh,
+     int dx, int dy,
+     unsigned int dw, unsigned int dh
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvPutStillReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  FlushGC(dpy, gc);
+
+  XvGetReq(PutStill, req);
+  req->port = port;
+  req->drawable = d;
+  req->gc = gc->gid;
+  req->vid_x = vx;
+  req->vid_y = vy;
+  req->vid_w = vw;
+  req->vid_h = vh;
+  req->drw_x = dx;
+  req->drw_y = dy;
+  req->drw_w = dw;
+  req->drw_h = dh;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvGetVideo(
+     Display *dpy,
+     XvPortID port,
+     Drawable d,
+     GC gc,
+     int vx, int vy,
+     unsigned int vw, unsigned int vh,
+     int dx, int dy,
+     unsigned int dw, unsigned int dh
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvGetVideoReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  FlushGC(dpy, gc);
+
+  XvGetReq(GetVideo, req);
+  req->port = port;
+  req->drawable = d;
+  req->gc = gc->gid;
+  req->vid_x = vx;
+  req->vid_y = vy;
+  req->vid_w = vw;
+  req->vid_h = vh;
+  req->drw_x = dx;
+  req->drw_y = dy;
+  req->drw_w = dw;
+  req->drw_h = dh;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvGetStill(
+     Display *dpy,
+     XvPortID port,
+     Drawable d,
+     GC gc,
+     int vx, int vy,
+     unsigned int vw, unsigned int vh,
+     int dx, int dy,
+     unsigned int dw, unsigned int dh
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvGetStillReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  FlushGC(dpy, gc);
+
+  XvGetReq(GetStill, req);
+  req->port = port;
+  req->drawable = d;
+  req->gc = gc->gid;
+  req->vid_x = vx;
+  req->vid_y = vy;
+  req->vid_w = vw;
+  req->vid_h = vh;
+  req->drw_x = dx;
+  req->drw_y = dy;
+  req->drw_w = dw;
+  req->drw_h = dh;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvStopVideo(
+     Display *dpy,
+     XvPortID port,
+     Drawable draw
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvStopVideoReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(StopVideo, req);
+  req->port = port;
+  req->drawable = draw;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvGrabPort(
+     Display *dpy,
+     XvPortID port,
+     Time time
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  int result;
+  xvGrabPortReply rep;
+  xvGrabPortReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(GrabPort, req);
+  req->port = port;
+  req->time = time;
+
+  if (_XReply (dpy, (xReply *) &rep, 0, xTrue) == 0)
+    rep.result = GrabSuccess;
+
+  result = rep.result;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return result;
+}
+
+int
+XvUngrabPort(
+     Display *dpy,
+     XvPortID port,
+     Time time
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvUngrabPortReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(UngrabPort, req);
+  req->port = port;
+  req->time = time;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvSelectVideoNotify(
+     Display *dpy,
+     Drawable drawable,
+     Bool onoff
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvSelectVideoNotifyReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(SelectVideoNotify, req);
+  req->drawable = drawable;
+  req->onoff = onoff;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvSelectPortNotify(
+     Display *dpy,
+     XvPortID port,
+     Bool onoff
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvSelectPortNotifyReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(SelectPortNotify, req);
+  req->port = port;
+  req->onoff = onoff;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int
+XvSetPortAttribute (
+     Display *dpy,
+     XvPortID port,
+     Atom attribute,
+     int value
+)
+{
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvSetPortAttributeReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(SetPortAttribute, req);
+  req->port = port;
+  req->attribute = attribute;
+  req->value = value;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return (Success);
+}
+
+int
+XvGetPortAttribute (
+     Display *dpy,
+     XvPortID port,
+     Atom attribute,
+     int *p_value
+)
+{
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvGetPortAttributeReq *req;
+  xvGetPortAttributeReply rep;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(GetPortAttribute, req);
+  req->port = port;
+  req->attribute = attribute;
+
+  /* READ THE REPLY */
+
+  if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadReply);
+  }
+
+  *p_value = rep.value;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return (Success);
+}
+
+int
+XvQueryBestSize(
+     Display *dpy,
+     XvPortID port,
+     Bool motion,
+     unsigned int vid_w,
+     unsigned int vid_h,
+     unsigned int drw_w,
+     unsigned int drw_h,
+     unsigned int *p_actual_width,
+     unsigned int *p_actual_height
+)
+{
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvQueryBestSizeReq *req;
+  xvQueryBestSizeReply rep;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  XvGetReq(QueryBestSize, req);
+  req->port = port;
+  req->motion = motion;
+  req->vid_w = vid_w;
+  req->vid_h = vid_h;
+  req->drw_w = drw_w;
+  req->drw_h = drw_h;
+
+  /* READ THE REPLY */
+
+  if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return(XvBadReply);
+  }
+
+  *p_actual_width = rep.actual_width;
+  *p_actual_height = rep.actual_height;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return (Success);
+}
+
+
+XvAttribute*
+XvQueryPortAttributes(Display *dpy, XvPortID port, int *num)
+{
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvQueryPortAttributesReq *req;
+  xvQueryPortAttributesReply rep;
+  XvAttribute *ret = NULL;
+
+  *num = 0;
+
+  XvCheckExtension(dpy, info, NULL);
+
+  LockDisplay(dpy);
+
+  XvGetReq(QueryPortAttributes, req);
+  req->port = port;
+
+  /* READ THE REPLY */
+
+  if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return ret;
+  }
+
+  if(rep.num_attributes) {
+      int size = (rep.num_attributes * sizeof(XvAttribute)) + rep.text_size;
+
+      if((ret = Xmalloc(size))) {
+         char* marker = (char*)(&ret[rep.num_attributes]);
+         xvAttributeInfo Info;
+         int i;
+
+         for(i = 0; i < rep.num_attributes; i++) {
+             _XRead(dpy, (char*)(&Info), sz_xvAttributeInfo);
+             ret[i].flags = (int)Info.flags;
+             ret[i].min_value = Info.min;
+             ret[i].max_value = Info.max;
+             ret[i].name = marker;
+             _XRead(dpy, marker, Info.size);
+             marker += Info.size;
+             (*num)++;
+         }
+      } else
+       _XEatData(dpy, rep.length << 2);
+  }
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return ret;
+}
+
+XvImageFormatValues * XvListImageFormats (
+   Display     *dpy,
+   XvPortID    port,
+   int                 *num
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvListImageFormatsReq *req;
+  xvListImageFormatsReply rep;
+  XvImageFormatValues *ret = NULL;
+
+  *num = 0;
+
+  XvCheckExtension(dpy, info, NULL);
+
+  LockDisplay(dpy);
+
+  XvGetReq(ListImageFormats, req);
+  req->port = port;
+
+  /* READ THE REPLY */
+
+  if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
+      UnlockDisplay(dpy);
+      SyncHandle();
+      return NULL;
+  }
+
+  if(rep.num_formats) {
+      int size = (rep.num_formats * sizeof(XvImageFormatValues));
+
+      if((ret = Xmalloc(size))) {
+         xvImageFormatInfo Info;
+         int i;
+
+         for(i = 0; i < rep.num_formats; i++) {
+              _XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo);
+             ret[i].id = Info.id;
+             ret[i].type = Info.type;
+             ret[i].byte_order = Info.byte_order;
+             memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16);
+             ret[i].bits_per_pixel = Info.bpp;
+             ret[i].format = Info.format;
+             ret[i].num_planes = Info.num_planes;
+             ret[i].depth = Info.depth;
+             ret[i].red_mask = Info.red_mask;
+             ret[i].green_mask = Info.green_mask;
+             ret[i].blue_mask = Info.blue_mask;
+             ret[i].y_sample_bits = Info.y_sample_bits;
+             ret[i].u_sample_bits = Info.u_sample_bits;
+             ret[i].v_sample_bits = Info.v_sample_bits;
+             ret[i].horz_y_period = Info.horz_y_period;
+             ret[i].horz_u_period = Info.horz_u_period;
+             ret[i].horz_v_period = Info.horz_v_period;
+             ret[i].vert_y_period = Info.vert_y_period;
+             ret[i].vert_u_period = Info.vert_u_period;
+             ret[i].vert_v_period = Info.vert_v_period;
+             memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32);
+             ret[i].scanline_order = Info.scanline_order;
+             (*num)++;
+         }
+      } else
+       _XEatData(dpy, rep.length << 2);
+  }
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return ret;
+}
+
+XvImage * XvCreateImage (
+   Display *dpy,
+   XvPortID port,
+   int id,
+   char *data,
+   int width,
+   int height
+) {
+   XExtDisplayInfo *info = xv_find_display(dpy);
+   xvQueryImageAttributesReq *req;
+   xvQueryImageAttributesReply rep;
+   XvImage *ret = NULL;
+
+   XvCheckExtension(dpy, info, NULL);
+
+   LockDisplay(dpy);
+
+   XvGetReq(QueryImageAttributes, req);
+   req->id = id;
+   req->port = port;
+   req->width = width;
+   req->height = height;
+
+   /* READ THE REPLY */
+
+   if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+       UnlockDisplay(dpy);
+       SyncHandle();
+      return NULL;
+   }
+
+   if((ret = (XvImage*)Xmalloc(sizeof(XvImage) + (rep.num_planes << 3)))) {
+       ret->id = id;
+       ret->width = rep.width;
+       ret->height = rep.height;
+       ret->data_size = rep.data_size;
+       ret->num_planes = rep.num_planes;
+       ret->pitches = (int*)(&ret[1]);
+       ret->offsets = ret->pitches + rep.num_planes;
+       ret->data = data;
+       ret->obdata = NULL;
+       _XRead(dpy, (char*)(ret->pitches), rep.num_planes << 2);
+       _XRead(dpy, (char*)(ret->offsets), rep.num_planes << 2);
+   } else
+       _XEatData(dpy, rep.length << 2);
+
+   UnlockDisplay(dpy);
+   SyncHandle();
+
+   return ret;
+}
+
+XvImage * XvShmCreateImage (
+   Display *dpy,
+   XvPortID port,
+   int id,
+   char *data,
+   int width,
+   int height,
+   XShmSegmentInfo *shminfo
+){
+   XvImage *ret;
+
+   ret = XvCreateImage(dpy, port, id, data, width, height);
+
+   if(ret) ret->obdata = (XPointer)shminfo;
+
+   return ret;
+}
+
+int XvPutImage (
+   Display *dpy,
+   XvPortID port,
+   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
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  xvPutImageReq *req;
+  int len;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  FlushGC(dpy, gc);
+
+  XvGetReq(PutImage, req);
+
+  req->port = port;
+  req->drawable = d;
+  req->gc = gc->gid;
+  req->id = image->id;
+  req->src_x = src_x;
+  req->src_y = src_y;
+  req->src_w = src_w;
+  req->src_h = src_h;
+  req->drw_x = dest_x;
+  req->drw_y = dest_y;
+  req->drw_w = dest_w;
+  req->drw_h = dest_h;
+  req->width = image->width;
+  req->height = image->height;
+
+  len = (image->data_size + 3) >> 2;
+  SetReqLen(req, len, len);
+
+  /* Yes it's kindof lame that we are sending the whole thing,
+     but for video all of it may be needed even if displaying
+     only a subsection, and I don't want to go through the
+     trouble of creating subregions to send */
+  Data(dpy, (char *)image->data, image->data_size);
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+int XvShmPutImage (
+   Display *dpy,
+   XvPortID port,
+   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
+){
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  XShmSegmentInfo *shminfo = (XShmSegmentInfo *)image->obdata;
+  xvShmPutImageReq *req;
+
+  XvCheckExtension(dpy, info, XvBadExtension);
+
+  LockDisplay(dpy);
+
+  FlushGC(dpy, gc);
+
+  XvGetReq(ShmPutImage, req);
+
+  req->port = port;
+  req->drawable = d;
+  req->gc = gc->gid;
+  req->shmseg = shminfo->shmseg;
+  req->id = image->id;
+  req->src_x = src_x;
+  req->src_y = src_y;
+  req->src_w = src_w;
+  req->src_h = src_h;
+  req->drw_x = dest_x;
+  req->drw_y = dest_y;
+  req->drw_w = dest_w;
+  req->drw_h = dest_h;
+  req->offset = image->data - shminfo->shmaddr;
+  req->width = image->width;
+  req->height = image->height;
+  req->send_event = send_event;
+
+  UnlockDisplay(dpy);
+  SyncHandle();
+
+  return Success;
+}
+
+
+static Bool
+xv_wire_to_event(Display *dpy, XEvent *host, xEvent *wire)
+{
+  XExtDisplayInfo *info = xv_find_display(dpy);
+  XvEvent *re    = (XvEvent *)host;
+  xvEvent *event = (xvEvent *)wire;
+
+  XvCheckExtension(dpy, info, False);
+
+  switch((event->u.u.type & 0x7F) - info->codes->first_event)
+  {
+    case XvVideoNotify:
+      re->xvvideo.type = event->u.u.type & 0x7f;
+      re->xvvideo.serial =
+       _XSetLastRequestRead(dpy, (xGenericReply *)event);
+      re->xvvideo.send_event = ((event->u.u.type & 0x80) != 0);
+      re->xvvideo.display = dpy;
+      re->xvvideo.time = event->u.videoNotify.time;
+      re->xvvideo.reason = event->u.videoNotify.reason;
+      re->xvvideo.drawable = event->u.videoNotify.drawable;
+      re->xvvideo.port_id = event->u.videoNotify.port;
+      break;
+    case XvPortNotify:
+      re->xvport.type = event->u.u.type & 0x7f;
+      re->xvport.serial =
+       _XSetLastRequestRead(dpy, (xGenericReply *)event);
+      re->xvport.send_event = ((event->u.u.type & 0x80) != 0);
+      re->xvport.display = dpy;
+      re->xvport.time = event->u.portNotify.time;
+      re->xvport.port_id = event->u.portNotify.port;
+      re->xvport.attribute = event->u.portNotify.attribute;
+      re->xvport.value = event->u.portNotify.value;
+      break;
+    default:
+      return False;
+  }
+
+  return (True);
+}
+
+
diff --git a/src/Xvlibint.h b/src/Xvlibint.h
new file mode 100644 (file)
index 0000000..f16a515
--- /dev/null
@@ -0,0 +1,73 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef XVLIBINT_H
+#define XVLIBINT_H
+/*
+** File:
+**
+**   Xvlibint.h --- Xv library internal header file
+**
+** Author:
+**
+**   David Carver (Digital Workstation Engineering/Project Athena)
+**
+** Revisions:
+**
+**   01.24.91 Carver
+**     - version 1.4 upgrade
+**
+*/
+
+#include <X11/Xlibint.h>
+#include <X11/extensions/Xvproto.h>
+#include <X11/extensions/Xvlib.h>
+
+#if !defined(UNIXCPP)
+#define XvGetReq(name, req) \
+        WORD64ALIGN\
+       if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\
+               _XFlush(dpy);\
+       req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\
+       req->reqType = info->codes->major_opcode;\
+        req->xvReqType = xv_##name; \
+        req->length = (SIZEOF(xv##name##Req))>>2;\
+       dpy->bufptr += SIZEOF(xv##name##Req);\
+       dpy->request++
+
+#else  /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#define XvGetReq(name, req) \
+        WORD64ALIGN\
+       if ((dpy->bufptr + SIZEOF(xv/**/name/**/Req)) > dpy->bufmax)\
+               _XFlush(dpy);\
+       req = (xv/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
+       req->reqType = info->codes->major_opcode;\
+       req->xvReqType = xv_/**/name;\
+       req->length = (SIZEOF(xv/**/name/**/Req))>>2;\
+       dpy->bufptr += SIZEOF(xv/**/name/**/Req);\
+       dpy->request++
+#endif
+
+
+#endif /* XVLIBINT_H */
diff --git a/xv.pc.in b/xv.pc.in
new file mode 100644 (file)
index 0000000..2edb41f
--- /dev/null
+++ b/xv.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Xv
+Description: The Xv Library
+Version: @PACKAGE_VERSION@
+Requires: xproto videoproto
+Requires.private: x11 xext
+Cflags: -I${includedir}
+Libs: -L${libdir} -lXv