Git init
authorKibum Kim <kb0929.kim@samsung.com>
Fri, 6 Jan 2012 15:49:44 +0000 (00:49 +0900)
committerKibum Kim <kb0929.kim@samsung.com>
Fri, 6 Jan 2012 15:49:44 +0000 (00:49 +0900)
57 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0755]
Makefile.am [new file with mode: 0755]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
autogen.sh [new file with mode: 0644]
configure.ac [new file with mode: 0755]
debian/README.source [new file with mode: 0644]
debian/changelog [new file with mode: 0755]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0755]
debian/copyright [new file with mode: 0644]
debian/libxv-dev.install [new file with mode: 0755]
debian/libxv1.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/watch [new file with mode: 0644]
debian/xsfbs/repack.sh [new file with mode: 0644]
debian/xsfbs/xsfbs.mk [new file with mode: 0644]
debian/xsfbs/xsfbs.sh [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: 0755]
man/Makefile.am [new file with mode: 0755]
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: 0755]
man/XvShmPutImage.man [new file with mode: 0755]
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: 0644]
src/Makefile.am [new file with mode: 0644]
src/Xv.c [new file with mode: 0755]
src/Xvlibint.h [new file with mode: 0755]
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..7f66edf
--- /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 100755 (executable)
index 0000000..34b370e
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,611 @@
+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/Makefile.am b/Makefile.am
new file mode 100755 (executable)
index 0000000..eba7178
--- /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/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
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/autogen.sh b/autogen.sh
new file mode 100644 (file)
index 0000000..904cd67
--- /dev/null
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/configure.ac b/configure.ac
new file mode 100755 (executable)
index 0000000..7e2d8de
--- /dev/null
@@ -0,0 +1,60 @@
+dnl
+dnl  Copyright 2005 Red Hat, Inc.
+dnl 
+dnl  Permission to use, copy, modify, distribute, and sell this software and its
+dnl  documentation for any purpose is hereby granted without fee, provided that
+dnl  the above copyright notice appear in all copies and that both that
+dnl  copyright notice and this permission notice appear in supporting
+dnl  documentation, and that the name of Red Hat not be used in
+dnl  advertising or publicity pertaining to distribution of the software without
+dnl  specific, written prior permission.  Red Hat makes no
+dnl  representations about the suitability of this software for any purpose.  It
+dnl  is provided "as is" without express or implied warranty.
+dnl 
+dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl  PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+
+AC_INIT([libXv], [1.0.6],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXv])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+AM_CONFIG_HEADER(config.h)
+
+# 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
+
+# Check for progs
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+# Check for dependencies
+PKG_CHECK_MODULES(XV, x11 xext xextproto videoproto)
+AC_SUBST(XV_CFLAGS)
+AC_SUBST(XV_LIBS)
+
+XORG_CHECK_MALLOC_ZERO
+
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+XORG_LINT_LIBRARY([Xv])
+
+AC_OUTPUT([Makefile
+           include/Makefile
+          include/X11/Makefile
+          include/X11/extensions/Makefile
+          src/Makefile
+          man/Makefile
+           xv.pc])
diff --git a/debian/README.source b/debian/README.source
new file mode 100644 (file)
index 0000000..34ab4bf
--- /dev/null
@@ -0,0 +1,73 @@
+------------------------------------------------------
+Quick Guide To Patching This Package For The Impatient
+------------------------------------------------------
+
+1. Make sure you have quilt installed
+2. Unpack the package as usual with "dpkg-source -x"
+3. Run the "patch" target in debian/rules
+4. Create a new patch with "quilt new" (see quilt(1))
+5. Edit all the files you want to include in the patch with "quilt edit" 
+   (see quilt(1)).
+6. Write the patch with "quilt refresh" (see quilt(1))
+7. Run the "clean" target in debian/rules
+
+Alternatively, instead of using quilt directly, you can drop the patch in to 
+debian/patches and add the name of the patch to debian/patches/series.
+
+------------------------------------
+Guide To The X Strike Force Packages
+------------------------------------
+
+The X Strike Force team maintains X packages in git repositories on
+git.debian.org in the pkg-xorg subdirectory. Most upstream packages
+are actually maintained in git repositories as well, so they often
+just need to be pulled into git.debian.org in a "upstream-*" branch.
+Otherwise, the upstream sources are manually installed in the Debian
+git repository.
+
+The .orig.tar.gz upstream source file could be generated this
+"upstream-*" branch in the Debian git repository but it is actually
+copied from upstream tarballs directly.
+
+Due to X.org being highly modular, packaging all X.org applications
+as their own independent packages would have created too many Debian
+packages. For this reason, some X.org applications have been grouped
+into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils,
+x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils.
+Most packages, including the X.org server itself and all libraries
+and drivers are, however maintained independently.
+
+The Debian packaging is added by creating the "debian-*" git branch
+which contains the aforementioned "upstream-*" branch plus the debian/
+repository files.
+When a patch has to be applied to the Debian package, two solutions
+are involved:
+* If the patch is available in one of the upstream branches, it
+  may be git'cherry-picked into the Debian repository. In this
+  case, it appears directly in the .diff.gz.
+* Otherwise, the patch is added to debian/patches/ which is managed
+  with quilt as documented in /usr/share/doc/quilt/README.source.
+
+quilt is actually invoked by the Debian X packaging through a larger
+set of scripts called XSFBS. XSFBS brings some other X specific
+features such as managing dependencies and conflicts due to the video
+and input driver ABIs.
+XSFBS itself is maintained in a separate repository at
+  git://git.debian.org/pkg-xorg/xsfbs.git
+and it is pulled inside the other Debian X repositories when needed.
+
+The XSFBS patching system requires a build dependency on quilt. Also
+a dependency on $(STAMP_DIR)/patch has to be added to debian/rules
+so that the XSFBS patching occurs before the actual build. So the
+very first target of the build (likely the one running autoreconf)
+should depend on $(STAMP_DIR)/patch. It should also not depend on
+anything so that parallel builds are correctly supported (nothing
+should probably run while patching is being done). And finally, the
+clean target should depend on the xsfclean target so that patches
+are unapplied on clean.
+
+When the upstream sources contain some DFSG-nonfree files, they are
+listed in text files in debian/prune/ in the "debian-*" branch of
+the Debian repository. XSFBS' scripts then take care of removing
+these listed files during the build so as to generate a modified
+DFSG-free .orig.tar.gz tarball.
diff --git a/debian/changelog b/debian/changelog
new file mode 100755 (executable)
index 0000000..91861a9
--- /dev/null
@@ -0,0 +1,173 @@
+libxv (2:1.0.6-1slp2) unstable; urgency=low
+
+  * [X11R7.6] upgrade package 
+  * Git: 165.213.180.234:slp/pkgs/xorg/lib/libxv
+  * Tag: libxv_1.0.6-1slp2
+
+ -- SooChan Lim <sc1.lim@samsung.com>  Wed, 05 Jan 2011 18:06:19 +0900
+
+libxv (2:1.0.5-5slp2) unstable; urgency=low
+
+  * Add --as-needed
+  * Git: 165.213.180.234:/git/slp/pkgs/xorg/lib/libxv
+  * Tag: libxv_1.0.5-5slp2
+
+ -- SooChan Lim <sc1.lim@samsung.com>  Sat, 20 Nov 2010 16:21:27 +0900
+
+libxv (2:1.0.5-4slp2) unstable; urgency=low
+
+  * Update maintainer
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
+  * Tag: libxv_1.0.5-4slp2
+
+ -- Sung-Jin Park <sj76.park@samsung.com>  Wed, 21 Apr 2010 14:18:59 +0900
+
+libxv (2:1.0.5-3slp2) unstable; urgency=low
+
+  * modify the package name
+
+ -- SooChan Lim <sc1.lim@samsung.com>  Thu, 25 Mar 2010 18:05:03 +0900
+
+libxv (2:1.0.5-2) unstable; urgency=low
+
+  * Import debian package
+  * Install .la files
+
+ -- Sung-Jin Park <sj76.park@samsung.com>  Mon, 07 Dec 2009 10:30:17 +0900
+
+libxv (2:1.0.5-1) unstable; urgency=low
+
+  [ Brice Goglin ]
+  * Add a link to www.X.org and a reference to the upstream module
+    in the long description.
+  * Add upstream URL to debian/copyright.
+  * Add README.source, bump Standards-Version to 3.8.2.
+  * Use updated xsfbs, closes: #538591.
+  * Move -dbg package to section debug.
+
+  [ Timo Aaltonen ]
+  * New upstream release.
+  * Run autoreconf on build. Add build-deps on automake, libtool and
+    xutils-dev.
+  * Parse space-separated DEB_BUILD_OPTIONS, and handle parallel=N.
+  * Drop Pre-Depends on x11-common from libxv-dev. This was needed for
+    upgrades from sarge.
+
+  [ Julien Cristau ]
+  * Bump Standards-Version to 3.8.3.
+
+ -- Julien Cristau <jcristau@debian.org>  Wed, 25 Nov 2009 20:03:21 +0100
+
+libxv (2:1.0.4-1) unstable; urgency=low
+
+  [ Timo Aaltonen ]
+  * Bump the epoch so that this can be synced to Ubuntu in the future.
+
+  [ Julien Cristau ]
+  * New upstream release.
+  * Remove Branden from Uploaders with his permission and add myself.
+  * Bump Standards-Version to 3.7.3.
+  * Don't build-depend on packages with a -1 debian revision.
+  * Drop the XS- prefix from Vcs-* control fields.
+  * libxv1 and libxv1-dbg don't need a dependency on x11-common.
+  * Use ${binary:Version} instead of the deprecated ${Source-Version}.
+
+ -- Julien Cristau <jcristau@debian.org>  Fri, 21 Mar 2008 11:07:48 +0100
+
+libxv (1:1.0.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Drop obsolete CVS information from package descriptions and add
+    XS-Vcs-*.
+  * Install the upstream changelog.
+  * Put binary packages in the correct sections.
+  * Remove Fabio from Uploaders, with his permission.
+
+ -- Julien Cristau <jcristau@debian.org>  Thu, 12 Apr 2007 17:23:53 +0200
+
+libxv (1:1.0.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Remove 01_author_info.diff which is now obsolete
+
+ -- David Nusinow <dnusinow@debian.org>  Mon, 25 Sep 2006 20:17:05 -0400
+
+libxv (1:1.0.1-6) unstable; urgency=low
+
+  [ Drew Parsons ]
+  * dbg package has priority extra.
+
+  [ David Nusinow ]
+  * Add 01_author_info.diff pulled from git head to fill in AUTHORS and
+    COPYING files in the source tree. Update debian copyright for the patch.
+  * Version build-depends on debhelper 5
+
+ -- David Nusinow <dnusinow@debian.org>  Sat, 23 Sep 2006 11:27:39 -0400
+
+libxv (1:1.0.1-5) unstable; urgency=low
+
+  * Revert .la file addition.
+
+ -- Andres Salomon <dilinger@debian.org>  Mon, 24 Jul 2006 11:23:28 -0400
+
+libxv (1:1.0.1-4) unstable; urgency=low
+
+  * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build;
+    idempotency fix.
+  * Run dh_install w/ --list-missing.
+  * Drop duplicate x11-common dep in -dev package.
+  * Bump standards version to 3.7.2.0.
+  * Version x11-common pre-dep in -dev package to 1:7.0.0 to match
+    the rest of Debian.
+  * Bump debhelper compat to 5.
+  * Fix dh_strip call to skip the -dbg package.
+  * Autoreconf w/ an updated xutils-dev so that manpages have the 'x'
+    extension dropped.
+  * Add a debian/copyright file; this was missing...
+  * Include .la files in -dev package.
+  * Include Xv manpages in the -dev package.
+
+ -- Andres Salomon <dilinger@debian.org>  Mon, 24 Jul 2006 01:01:05 -0400
+
+libxv (1:1.0.1-3) unstable; urgency=low
+
+  * Reorder makeshlib command in rules file so that ldconfig is run
+    properly. Thanks Drew Parsons and Steve Langasek.
+
+ -- David Nusinow <dnusinow@debian.org>  Tue, 18 Apr 2006 21:50:01 -0400
+
+libxv (1:1.0.1-2) unstable; urgency=low
+
+  * Upload to unstable
+
+ -- David Nusinow <dnusinow@debian.org>  Thu, 23 Mar 2006 22:46:32 -0500
+
+libxv (1:1.0.1-1) experimental; urgency=low
+
+  * First modular upload to Debian
+
+ -- David Nusinow <dnusinow@debian.org>  Thu, 29 Dec 2005 20:55:53 -0500
+
+libxv (1:2.2.0+cvs.20050712-3) breezy; urgency=low
+
+  * Bump Build-Depends on libx11-dev and libxext-dev to avoid _XOPEN_SOURCE.
+
+ -- Daniel Stone <daniel.stone@ubuntu.com>  Sat, 23 Jul 2005 00:13:16 +1000
+
+libxv (1:2.2.0+cvs.20050712-2) breezy; urgency=low
+
+  * Fix a couple of typos in the control file.
+
+ -- Daniel Stone <daniel.stone@ubuntu.com>  Tue, 12 Jul 2005 16:26:42 +1000
+
+libxv (1:2.2.0+cvs.20050712-1) breezy; urgency=low
+
+  * Move Xvlib.h here, from x11proto-video-dev.
+
+ -- Daniel Stone <daniel.stone@ubuntu.com>  Tue, 12 Jul 2005 11:34:10 +1000
+
+libxv (1:2.2.0-1) breezy; urgency=low
+
+  * First libxv release.
+
+ -- Daniel Stone <daniel.stone@ubuntu.com>  Mon, 16 May 2005 22:10:17 +1000
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100755 (executable)
index 0000000..5b09db3
--- /dev/null
@@ -0,0 +1,78 @@
+Source: libxv
+Section: x11
+Priority: optional
+Maintainer: Sung-Jin Park <sj76.park@samsung.com>, Sanjin Lee <lsj119@samsung.com>, Debian X Strike Force <debian-x@lists.debian.org>
+Uploaders: SooChan Lim <sc1.lim@samsung.com>, Sung-Jin Park <sj76.park@samsung.com>, David Nusinow <dnusinow@debian.org>, Andres Salomon <dilinger@debian.org>, Julien Cristau <jcristau@debian.org>
+Standards-Version: 3.8.3
+Build-Depends: debhelper (>= 5.0.0), libx11-dev (>= 1:0.99.2), libxext-dev (>= 1:0.99.1), x11proto-video-dev, pkg-config, quilt, automake, libtool, xutils-dev (>= 1:7.5-1slp2)
+Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxv
+Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libxv.git
+
+Package: libxv1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: X11 Video extension library
+ libXv provides an X Window System client interface to the XVideo
+ extension to the X protocol.
+ .
+ The XVideo extension allows for accelerated drawing of videos.  Hardware
+ adaptors are exposed to clients, which may draw in a number of colourspaces,
+ including YUV.
+ .
+ More information about X.Org can be found at:
+ <URL:http://www.X.org>
+ <URL:http://xorg.freedesktop.org>
+ <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
+ .
+ This module can be found at
+ git://anongit.freedesktop.org/git/xorg/lib/libXv
+
+Package: libxv1-dbg
+Section: debug
+Architecture: any
+Priority: extra
+Depends: ${shlibs:Depends}, ${misc:Depends}, libxv1 (= ${binary:Version})
+Description: X11 Video extension library (debug package)
+ libXv provides an X Window System client interface to the XVideo
+ extension to the X protocol.
+ .
+ The XVideo extension allows for accelerated drawing of videos.  Hardware
+ adaptors are exposed to clients, which may draw in a number of colourspaces,
+ including YUV.
+ .
+ This package contains the debug versions of the library found in libxv1.
+ Non-developers likely have little use for this package.
+ .
+ More information about X.Org can be found at:
+ <URL:http://www.X.org>
+ <URL:http://xorg.freedesktop.org>
+ <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
+ .
+ This module can be found at
+ git://anongit.freedesktop.org/git/xorg/lib/libXv
+
+Package: libxv-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libxv1 (= ${binary:Version}), libx11-dev, libxext-dev, x11proto-video-dev
+Conflicts: x11proto-video-dev (<< 2.2+cvs.20050712-1)
+Replaces: x11proto-video-dev (<< 2.2+cvs.20050712-1)
+Description: X11 Video extension library (development headers)
+ libXv provides an X Window System client interface to the XVideo
+ extension to the X protocol.
+ .
+ The XVideo extension allows for accelerated drawing of videos.  Hardware
+ adaptors are exposed to clients, which may draw in a number of colourspaces,
+ including YUV.
+ .
+ This package contains the development headers for the library found in
+ libxv1.  Non-developers likely have little use for this package.
+ .
+ More information about X.Org can be found at:
+ <URL:http://www.X.org>
+ <URL:http://xorg.freedesktop.org>
+ <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
+ .
+ This module can be found at
+ git://anongit.freedesktop.org/git/xorg/lib/libXv
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..7aaa9d0
--- /dev/null
@@ -0,0 +1,56 @@
+This package was downloaded from\r
+http://xorg.freedesktop.org/releases/individual/lib/\r
+\r
+Original Debian package author(s): Stephen Early, Mark Eichin, Branden \r
+  Robinson, ISHIKAWA Mutsumi, Daniel Stone\r
+\r
+The sofware was later repackaged by:\r
+  Daniel Stone <daniel.stone@ubuntu.com> on Mon, 16 May 2005 22:10:17 +1000\r
+\r
+Copyright:\r
+\r
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,\r
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.\r
+\r
+Written by:\r
+David Carver (Digital Workstation Engineering/Project Athena)\r
+Mark Vojkovich (XFree86 Project)\r
+\r
+License:\r
+                        All Rights Reserved\r
+\r
+Permission to use, copy, modify, and distribute this software and its \r
+documentation for any purpose and without fee is hereby granted, \r
+provided that the above copyright notice appear in all copies and that\r
+both that copyright notice and this permission notice appear in \r
+supporting documentation, and that the names of Digital or MIT not be\r
+used in advertising or publicity pertaining to distribution of the\r
+software without specific, written prior permission.  \r
+\r
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\r
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\r
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\r
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\r
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\r
+SOFTWARE.\r
+\r
+Copyright 2005 Red Hat, Inc.\r
+\r
+Permission to use, copy, modify, distribute, and sell this software and its\r
+documentation for any purpose is hereby granted without fee, provided that\r
+the above copyright notice appear in all copies and that both that\r
+copyright notice and this permission notice appear in supporting\r
+documentation, and that the name of Red Hat not be used in\r
+advertising or publicity pertaining to distribution of the software without\r
+specific, written prior permission.  Red Hat makes no\r
+representations about the suitability of this software for any purpose.  It\r
+is provided "as is" without express or implied warranty.\r
+\r
+RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO\r
+EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR\r
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\r
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\r
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r
+PERFORMANCE OF THIS SOFTWARE.\r
diff --git a/debian/libxv-dev.install b/debian/libxv-dev.install
new file mode 100755 (executable)
index 0000000..34fd992
--- /dev/null
@@ -0,0 +1,6 @@
+usr/share/man/*
+usr/include/X11/*
+usr/lib/libXv.a
+usr/lib/libXv.so
+usr/lib/libXv.la
+usr/lib/pkgconfig/xv.pc
diff --git a/debian/libxv1.install b/debian/libxv1.install
new file mode 100644 (file)
index 0000000..d65b929
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/libXv.so.1*
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..a204554
--- /dev/null
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+# debian/rules for the Debian libxv package.
+# Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>
+# Copyright Â© 2005 Daniel Stone <daniel@fooishbar.org>
+# Copyright Â© 2005 David Nusinow <dnusinow@debian.org>
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# set this to the name of the main shlib's binary package
+PACKAGE = libxv1
+
+include debian/xsfbs/xsfbs.mk
+
+CFLAGS = -Wall -g
+LDFLAGS +=  -Wl,--hash-style=both -Wl,--as-needed
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+       NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+       MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+       confflags += --build=$(DEB_HOST_GNU_TYPE)
+else
+       confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+#      confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
+
+build: patch build-stamp
+build-stamp:
+       dh_testdir
+       autoreconf -vfi
+       mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
+       cd obj-$(DEB_BUILD_GNU_TYPE) && \
+       ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
+                    --infodir=\$${prefix}/share/info $(confflags) \
+                    CFLAGS="$(CFLAGS)" \
+                    LDFLAGS="$(LDFLAGS)" 
+       cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
+       >$@
+
+clean: xsfclean
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+
+       rm -f config.cache config.log config.status
+       rm -f */config.cache */config.log */config.status
+       rm -f conftest* */conftest*
+       rm -rf autom4te.cache */autom4te.cache
+       rm -rf obj-*
+       rm -f aclocal.m4 config.guess config.h.in config.sub configure
+       rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
+       find -name Makefile.in -exec rm -f {} \;
+       #find -name Makefile.in -delete
+
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+
+#      dh_installdocs
+       dh_install --sourcedir=debian/tmp --list-missing
+#      dh_installchangelogs ChangeLog
+       dh_link
+       dh_strip --dbg-package=$(PACKAGE)-dbg
+       dh_compress
+       dh_fixperms
+       dh_makeshlibs
+       dh_shlibdeps
+       dh_installdeb
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+# Build architecture-independent files here.
+binary-indep: build install
+# Nothing to do
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..37adb63
--- /dev/null
@@ -0,0 +1,2 @@
+version=3
+http://xorg.freedesktop.org/releases/individual/lib/ libXv-(.*)\.tar\.gz
diff --git a/debian/xsfbs/repack.sh b/debian/xsfbs/repack.sh
new file mode 100644 (file)
index 0000000..5935cc9
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+if ! [ -d debian/prune ]; then
+       exit 0
+fi
+
+if [ "x$1" != x--upstream-version ]; then
+       exit 1
+fi
+
+version="$2"
+filename="$3"
+
+if [ -z "$version" ] || ! [ -f "$filename" ]; then
+       exit 1
+fi
+
+dir="$(pwd)"
+tempdir="$(mktemp -d)"
+
+cd "$tempdir"
+tar xf "$dir/$filename"
+cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
+
+tar czf "$dir/$filename" *
+cd "$dir"
+rm -rf "$tempdir"
+echo "Done pruning upstream tarball"
+
+exit 0
diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
new file mode 100644 (file)
index 0000000..5e16b10
--- /dev/null
@@ -0,0 +1,276 @@
+#!/usr/bin/make -f
+
+# Debian X Strike Force Build System (XSFBS): Make portion
+
+# Copyright 1996 Stephen Early
+# Copyright 1997 Mark Eichin
+# Copyright 1998-2005, 2007 Branden Robinson
+# Copyright 2005 David Nusinow
+#
+# Licensed under the GNU General Public License, version 2.  See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+# Originally by Stephen Early <sde1000@debian.org>
+# Modified by Mark W. Eichin <eichin@kitten.gen.ma.us>
+# Modified by Adam Heath <doogie@debian.org>
+# Modified by Branden Robinson <branden@debian.org>
+# Modified by Fabio Massimo Di Nitto <fabbione@fabbione.net>
+# Modified by David Nusinow <dnusinow@debian.org>
+# Acknowledgements to Manoj Srivastava.
+
+# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
+export DH_OPTIONS
+
+# force quilt to not use ~/.quiltrc and to use debian/patches
+QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null
+
+# Set up parameters for the upstream build environment.
+
+# Determine (source) package name from Debian changelog.
+SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \
+                        | grep '^Source:' | awk '{print $$2}')
+
+# Determine package version from Debian changelog.
+SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \
+                        | grep '^Version:' | awk '{print $$2}')
+
+# Determine upstream version number.
+UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//')
+
+# Determine the source version without the epoch for make-orig-tar-gz
+NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://')
+
+# Figure out who's building this package.
+BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}})
+
+# Find out if this is an official build; an official build has nothing but
+# digits, dots, and/or the codename of a release in the Debian part of the
+# version number.  Anything else indicates an unofficial build.
+OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi)
+
+# Set up parameters for the Debian build environment.
+
+# Determine our architecture.
+BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+# Work around some old-time dpkg braindamage.
+BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH))
+# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy.
+ifdef DEB_HOST_ARCH
+ ARCH:=$(DEB_HOST_ARCH)
+else
+ # dpkg-cross sets the ARCH environment variable; if set, use it.
+ ifdef ARCH
+  ARCH:=$(ARCH)
+ else
+  ARCH:=$(BUILD_ARCH)
+ endif
+endif
+
+# $(STAMP_DIR) houses stamp files for complex targets.
+STAMP_DIR:=stampdir
+
+# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place
+# their files.
+DEBTREEDIR:=$(CURDIR)/debian/tmp
+
+# All "important" targets have four lines:
+#   1) A target name that is invoked by a package-building tool or the user.
+#      This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart.
+#   2) A line delcaring 1) as a phony target (".PHONY:").
+#   3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may
+#   depend on other targets.
+#   4) A line declaring 3) as a member of the $(stampdir_targets) variable; the
+#   "$(STAMP_DIR)/" prefix is omitted.
+#
+# This indirection is needed so that the "stamp" files that signify when a rule
+# is done can be located in a separate "stampdir".  Recall that make has no way
+# to know when a goal has been met for a phony target (like "build" or
+# "install").
+#
+# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@"
+# so that the target will not be run again.  Removing the file will make Make
+# run the target over.
+
+# All phony targets should be declared as dependencies of .PHONY, even if they
+# do not have "($STAMP_DIR)/"-prefixed counterparts.
+
+# Define a harmless default rule to keep things from going nuts by accident.
+.PHONY: default
+default:
+
+# Set up the $(STAMP_DIR) directory.
+.PHONY: stampdir
+stampdir_targets+=stampdir
+stampdir: $(STAMP_DIR)/stampdir
+$(STAMP_DIR)/stampdir:
+       mkdir $(STAMP_DIR)
+       >$@
+
+# Set up the package build directory as quilt expects to find it.
+.PHONY: prepare
+stampdir_targets+=prepare
+prepare: $(STAMP_DIR)/prepare
+$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts
+       >$@
+
+.PHONY: log
+stampdir_targets+=log
+log: $(STAMP_DIR)/log
+$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir
+       mkdir -p $(STAMP_DIR)/log
+
+# Apply all patches to the upstream source.
+.PHONY: patch
+stampdir_targets+=patch
+patch: $(STAMP_DIR)/patch
+$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
+       if ! [ `which quilt` ]; then \
+               echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \
+               exit 1; \
+       fi; \
+       if $(QUILT) next >/dev/null 2>&1; then \
+         echo -n "Applying patches..."; \
+         if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \
+           cat $(STAMP_DIR)/log/patch; \
+           echo "successful."; \
+         else \
+           cat $(STAMP_DIR)/log/patch; \
+           echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \
+           exit 1; \
+         fi; \
+       else \
+         echo "No patches to apply"; \
+       fi; \
+       >$@
+
+# Revert all patches to the upstream source.
+.PHONY: unpatch
+unpatch: $(STAMP_DIR)/log
+       rm -f $(STAMP_DIR)/patch
+       @echo -n "Unapplying patches..."; \
+       if $(QUILT) applied >/dev/null 2>/dev/null; then \
+         if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
+           cat $(STAMP_DIR)/log/unpatch; \
+           echo "successful."; \
+         else \
+           cat $(STAMP_DIR)/log/unpatch; \
+           echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \
+           exit 1; \
+         fi; \
+       else \
+         echo "nothing to do."; \
+       fi
+
+# Clean the generated maintainer scripts.
+.PHONY: cleanscripts
+cleanscripts:
+       rm -f $(STAMP_DIR)/genscripts
+       rm -f debian/*.config \
+             debian/*.postinst \
+             debian/*.postrm \
+             debian/*.preinst \
+             debian/*.prerm
+
+# Clean the package build tree.
+.PHONY: xsfclean
+xsfclean: cleanscripts unpatch
+       dh_testdir
+       rm -rf .pc
+       rm -rf $(STAMP_DIR)
+       dh_clean
+
+# Remove files from the upstream source tree that we don't need, or which have
+# licensing problems.  It must be run before creating the .orig.tar.gz.
+#
+# Note: This rule is for Debian package maintainers' convenience, and is not
+# needed for conventional build scenarios.
+.PHONY: prune-upstream-tree
+prune-upstream-tree:
+       # Ensure we're in the correct directory.
+       dh_testdir
+       grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf
+
+# Verify that there are no offsets or fuzz in the patches we apply.
+#
+# Note: This rule is for Debian package maintainers' convenience, and is not
+# needed for conventional build scenarios.
+.PHONY: patch-audit
+patch-audit: prepare unpatch
+       @echo -n "Auditing patches..."; \
+       >$(STAMP_DIR)/log/patch; \
+       FUZZY=; \
+       while [ -n "$$($(QUILT) next)" ]; do \
+         RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
+         case "$$RESULT" in \
+           succeeded) \
+             echo "fuzzy patch: $$($(QUILT) top)" \
+               | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \
+             FUZZY=yes; \
+             ;; \
+           FAILED) \
+             echo "broken patch: $$($(QUILT) next)" \
+               | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \
+             exit 1; \
+             ;; \
+         esac; \
+       done; \
+       if [ -n "$$FUZZY" ]; then \
+         echo "there were fuzzy patches; please fix."; \
+         exit 1; \
+       else \
+         echo "done."; \
+       fi
+
+# Generate the maintainer scripts.
+.PHONY: genscripts
+stampdir_targets+=genscripts
+genscripts: $(STAMP_DIR)/genscripts
+$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir
+       for FILE in debian/*.config.in \
+                   debian/*.postinst.in \
+                   debian/*.postrm.in \
+                   debian/*.preinst.in \
+                   debian/*.prerm.in; do \
+         if [ -e "$$FILE" ]; then \
+           MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \
+           sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \
+             | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \
+           cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \
+           sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \
+             | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \
+           sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \
+               -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \
+             <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \
+           rm $$MAINTSCRIPT.tmp; \
+         fi; \
+       done
+       # Validate syntax of generated shell scripts.
+       #sh debian/scripts/validate-posix-sh debian/*.config \
+       #                                    debian/*.postinst \
+       #                                    debian/*.postrm \
+       #                                    debian/*.preinst \
+       #                                    debian/*.prerm
+       >$@
+
+SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
+VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
+INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
+SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
+VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
+INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
+ifeq ($(PACKAGE),)
+PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)
+endif
+
+.PHONY: serverabi
+serverabi: install
+ifeq ($(SERVERMINVERS),)
+       @echo error: xserver-xorg-dev needs to be installed
+       @exit 1
+else
+       echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars
+       echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
+       echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
+endif
+
+# vim:set noet ai sts=8 sw=8 tw=0:
diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh
new file mode 100644 (file)
index 0000000..813fd8d
--- /dev/null
@@ -0,0 +1,622 @@
+# This is the X Strike Force shell library for X Window System package
+# maintainer scripts.  It serves to define shell functions commonly used by
+# such packages, and performs some error checking necessary for proper operation
+# of those functions.  By itself, it does not "do" much; the maintainer scripts
+# invoke the functions defined here to accomplish package installation and
+# removal tasks.
+
+# If you are reading this within a Debian package maintainer script (e.g.,
+# /var/lib/dpkg/info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can
+# skip past this library by scanning forward in this file to the string
+# "GOBSTOPPER".
+
+SOURCE_VERSION=@SOURCE_VERSION@
+OFFICIAL_BUILD=@OFFICIAL_BUILD@
+
+# Use special abnormal exit codes so that problems with this library are more
+# easily tracked down.
+SHELL_LIB_INTERNAL_ERROR=86
+SHELL_LIB_THROWN_ERROR=74
+SHELL_LIB_USAGE_ERROR=99
+
+# old -> new variable names
+if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then
+  DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE"
+fi
+if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then
+  DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF"
+fi
+
+# initial sanity checks
+if [ -z "$THIS_PACKAGE" ]; then
+  cat >&2 <<EOF
+Error: package maintainer script attempted to use shell library without
+definining \$THIS_PACKAGE shell variable.  Please report the package name,
+version, and the text of this error message to the Debian Bug Tracking System.
+Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
+instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
+"doc-debian" package, or install the "reportbug" package and use the command of
+the same name to file a report against version $SOURCE_VERSION of this package.
+EOF
+  exit $SHELL_LIB_USAGE_ERROR
+fi
+
+if [ -z "$THIS_SCRIPT" ]; then
+  cat >&2 <<EOF
+Error: package maintainer script attempted to use shell library without
+definining \$THIS_SCRIPT shell variable.  Please report the package name,
+version, and the text of this error message to the Debian Bug Tracking System.
+Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
+instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
+"doc-debian" package, or install the "reportbug" package and use the command of
+the same name to file a report against version $SOURCE_VERSION of the
+"$THIS_PACKAGE" package.
+EOF
+  exit $SHELL_LIB_USAGE_ERROR
+fi
+
+if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+  RECONFIGURE="true"
+else
+  RECONFIGURE=
+fi
+
+if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then
+  FIRSTINST="yes"
+fi
+
+if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then
+  UPGRADE="yes"
+fi
+
+trap "message;\
+      message \"Received signal.  Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\
+      message;\
+      exit 1" HUP INT QUIT TERM
+
+reject_nondigits () {
+  # syntax: reject_nondigits [ operand ... ]
+  #
+  # scan operands (typically shell variables whose values cannot be trusted) for
+  # characters other than decimal digits and barf if any are found
+  while [ -n "$1" ]; do
+    # does the operand contain anything but digits?
+    if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then
+      # can't use die(), because it wraps message() which wraps this function
+      echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \
+           "possibly malicious garbage \"$1\"" >&2
+      exit $SHELL_LIB_THROWN_ERROR
+    fi
+    shift
+  done
+}
+
+reject_unlikely_path_chars () {
+  # syntax: reject_unlikely_path_chars [ operand ... ]
+  #
+  # scan operands (typically shell variables whose values cannot be trusted) for
+  # characters unlikely to be seen in a path and which the shell might
+  # interpret and barf if any are found
+  while [ -n "$1" ]; do
+    # does the operand contain any funny characters?
+    if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then
+      # can't use die(), because I want to avoid forward references
+      echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \
+           "encountered possibly malicious garbage \"$1\"" >&2
+      exit $SHELL_LIB_THROWN_ERROR
+    fi
+    shift
+  done
+}
+
+# Query the terminal to establish a default number of columns to use for
+# displaying messages to the user.  This is used only as a fallback in the
+# event the COLUMNS variable is not set.  ($COLUMNS can react to SIGWINCH while
+# the script is running, and this cannot, only being calculated once.)
+DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true
+if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then
+  DEFCOLUMNS=80
+fi
+
+message () {
+  # pretty-print messages of arbitrary length
+  reject_nondigits "$COLUMNS"
+  echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2
+}
+
+observe () {
+  # syntax: observe message ...
+  #
+  # issue observational message suitable for logging someday when support for
+  # it exists in dpkg
+  if [ -n "$DEBUG_XORG_PACKAGE" ]; then
+    message "$THIS_PACKAGE $THIS_SCRIPT note: $*"
+  fi
+}
+
+warn () {
+  # syntax: warn message ...
+  #
+  # issue warning message suitable for logging someday when support for
+  # it exists in dpkg; also send to standard error
+  message "$THIS_PACKAGE $THIS_SCRIPT warning: $*"
+}
+
+die () {
+  # syntax: die message ...
+  #
+  # exit script with error message
+  message "$THIS_PACKAGE $THIS_SCRIPT error: $*"
+  exit $SHELL_LIB_THROWN_ERROR
+}
+
+internal_error () {
+  # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
+  message "internal error: $*"
+  if [ -n "$OFFICIAL_BUILD" ]; then
+    message "Please report a bug in the $THIS_SCRIPT script of the" \
+            "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
+            "Tracking System.  Include all messages above that mention the" \
+            "$THIS_PACKAGE package.  Visit " \
+            "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
+            "instructions, read the file" \
+            "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
+            "package, or install the reportbug package and use the command of" \
+            "the same name to file a report."
+  fi
+  exit $SHELL_LIB_INTERNAL_ERROR
+}
+
+usage_error () {
+  message "usage error: $*"
+  message "Please report a bug in the $THIS_SCRIPT script of the" \
+          "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
+          "Tracking System.  Include all messages above that mention the" \
+          "$THIS_PACKAGE package.  Visit " \
+          "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
+          "instructions, read the file" \
+          "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
+          "package, or install the reportbug package and use the command of" \
+          "the same name to file a report."
+  exit $SHELL_LIB_USAGE_ERROR
+}
+
+font_update () {
+  # run $UPDATECMDS in $FONTDIRS
+
+  local dir cmd shortcmd x_font_dir_prefix
+
+  x_font_dir_prefix="/usr/share/fonts/X11"
+
+  if [ -z "$UPDATECMDS" ]; then
+    usage_error "font_update() called but \$UPDATECMDS not set"
+  fi
+  if [ -z "$FONTDIRS" ]; then
+    usage_error "font_update() called but \$FONTDIRS not set"
+  fi
+
+  reject_unlikely_path_chars "$UPDATECMDS"
+  reject_unlikely_path_chars "$FONTDIRS"
+
+  for dir in $FONTDIRS; do
+    if [ -d "$x_font_dir_prefix/$dir" ]; then
+      for cmd in $UPDATECMDS; do
+        if which "$cmd" > /dev/null 2>&1; then
+          shortcmd=${cmd##*/}
+          observe "running $shortcmd in $dir font directory"
+         cmd_opts=
+          if [ "$shortcmd" = "update-fonts-alias" ]; then
+            cmd_opts=--x11r7-layout
+          fi
+          if [ "$shortcmd" = "update-fonts-dir" ]; then
+            cmd_opts=--x11r7-layout
+          fi
+          if [ "$shortcmd" = "update-fonts-scale" ]; then
+            cmd_opts=--x11r7-layout
+          fi
+          $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \
+                              "failed; font directory data may not" \
+                              "be up to date"
+        else
+          warn "$cmd not found; not updating corresponding $dir font" \
+               "directory data"
+        fi
+      done
+    else
+      warn "$dir is not a directory; not updating font directory data"
+    fi
+  done
+}
+
+remove_conffile_prepare () {
+  # syntax: remove_conffile_prepare filename official_md5sum ...
+  #
+  # Check a conffile "filename" against a list of canonical MD5 checksums.
+  # If the file's current MD5 checksum matches one of the "official_md5sum"
+  # operands provided, then prepare the conffile for removal from the system.
+  # We defer actual deletion until the package is configured so that we can
+  # roll this operation back if package installation fails.
+  #
+  # Call this function from a preinst script in the event $1 is "upgrade" or
+  # "install" and verify $2 to ensure the package is being upgraded from a
+  # version (or installed over a version removed-but-not-purged) prior to the
+  # one in which the conffile was obsoleted.
+
+  local conffile current_checksum
+
+  # validate arguments
+  if [ $# -lt 2 ]; then
+    usage_error "remove_conffile_prepare() called with wrong number of" \
+                "arguments; expected at least 2, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  conffile="$1"
+  shift
+
+  # does the conffile even exist?
+  if [ -e "$conffile" ]; then
+    # calculate its checksum
+    current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//')
+    # compare it to each supplied checksum
+    while [ -n "$1" ]; do
+      if [ "$current_checksum" = "$1" ]; then
+        # we found a match; move the confffile and stop looking
+        observe "preparing obsolete conffile $conffile for removal"
+        mv "$conffile" "$conffile.$THIS_PACKAGE-tmp"
+        break
+      fi
+      shift
+    done
+  fi
+}
+
+remove_conffile_lookup () {
+  # syntax: remove_conffile_lookup package filename
+  #
+  # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal
+  # if it matches the actual file's md5sum.
+  #
+  # Call this function when you would call remove_conffile_prepare but only
+  # want to check against dpkg's status database instead of known checksums.
+
+  local package conffile old_md5sum
+
+  # validate arguments
+  if [ $# -ne 2 ]; then
+    usage_error "remove_conffile_lookup() called with wrong number of" \
+                "arguments; expected 1, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  package="$1"
+  conffile="$2"
+
+  if ! [ -e "$conffile" ]; then
+    return
+  fi
+  old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \
+    awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')"
+  if [ -n "$old_md5sum" ]; then
+    remove_conffile_prepare "$conffile" "$old_md5sum"
+  fi
+}
+
+remove_conffile_commit () {
+  # syntax: remove_conffile_commit filename
+  #
+  # Complete the removal of a conffile "filename" that has become obsolete.
+  #
+  # Call this function from a postinst script after having used
+  # remove_conffile_prepare() in the preinst.
+
+  local conffile
+
+  # validate arguments
+  if [ $# -ne 1 ]; then
+    usage_error "remove_conffile_commit() called with wrong number of" \
+                "arguments; expected 1, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  conffile="$1"
+
+  # if the temporary file created by remove_conffile_prepare() exists, remove it
+  if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
+    observe "committing removal of obsolete conffile $conffile"
+    rm "$conffile.$THIS_PACKAGE-tmp"
+  fi
+}
+
+remove_conffile_rollback () {
+  # syntax: remove_conffile_rollback filename
+  #
+  # Roll back the removal of a conffile "filename".
+  #
+  # Call this function from a postrm script in the event $1 is "abort-upgrade"
+  # or "abort-install" is  after having used remove_conffile_prepare() in the
+  # preinst.
+
+  local conffile
+
+  # validate arguments
+  if [ $# -ne 1 ]; then
+    usage_error "remove_conffile_rollback() called with wrong number of" \
+                "arguments; expected 1, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  conffile="$1"
+
+  # if the temporary file created by remove_conffile_prepare() exists, move it
+  # back
+  if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
+    observe "rolling back removal of obsolete conffile $conffile"
+    mv "$conffile.$THIS_PACKAGE-tmp" "$conffile"
+  fi
+}
+
+replace_conffile_with_symlink_prepare () {
+  # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \
+  # official_md5sum ...
+  #
+  # Check a conffile "oldfilename" against a list of canonical MD5 checksums.
+  # If the file's current MD5 checksum matches one of the "official_md5sum"
+  # operands provided, then prepare the conffile for removal from the system.
+  # We defer actual deletion until the package is configured so that we can
+  # roll this operation back if package installation fails. Otherwise copy it
+  # to newfilename and let dpkg handle it through conffiles mechanism.
+  #
+  # Call this function from a preinst script in the event $1 is "upgrade" or
+  # "install" and verify $2 to ensure the package is being upgraded from a
+  # version (or installed over a version removed-but-not-purged) prior to the
+  # one in which the conffile was obsoleted.
+
+  local conffile current_checksum
+
+  # validate arguments
+  if [ $# -lt 3 ]; then
+    usage_error "replace_conffile_with_symlink_prepare() called with wrong" \
+                " number of arguments; expected at least 3, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  oldconffile="$1"
+  shift
+  newconffile="$1"
+  shift
+
+  remove_conffile_prepare "$_oldconffile" "$@"
+  # If $oldconffile still exists, then md5sums didn't match.
+  # Copy it to new one.
+  if [ -f "$oldconffile" ]; then
+    cp "$oldconffile" "$newconffile"
+  fi
+
+}
+
+replace_conffile_with_symlink_commit () {
+  # syntax: replace_conffile_with_symlink_commit oldfilename
+  #
+  # Complete the removal of a conffile "oldfilename" that has been
+  # replaced by a symlink.
+  #
+  # Call this function from a postinst script after having used
+  # replace_conffile_with_symlink_prepare() in the preinst.
+
+  local conffile
+
+  # validate arguments
+  if [ $# -ne 1 ]; then
+    usage_error "replace_conffile_with_symlink_commit() called with wrong" \
+                "number of arguments; expected 1, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  conffile="$1"
+
+  remove_conffile_commit "$conffile"
+}
+
+replace_conffile_with_symlink_rollback () {
+  # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename
+  #
+  # Roll back the replacing of a conffile "oldfilename" with symlink to
+  # "newfilename".
+  #
+  # Call this function from a postrm script in the event $1 is "abort-upgrade"
+  # or "abort-install" and verify $2 to ensure the package failed to upgrade
+  # from a version (or install over a version removed-but-not-purged) prior
+  # to the one in which the conffile was obsoleted.
+  # You should have  used replace_conffile_with_symlink_prepare() in the
+  # preinst.
+
+  local conffile
+
+  # validate arguments
+  if [ $# -ne 2 ]; then
+    usage_error "replace_conffile_with_symlink_rollback() called with wrong" \
+                "number of arguments; expected 2, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  oldconffile="$1"
+  newconffile="$2"
+
+  remove_conffile_rollback "$_oldconffile"
+  if [ -f "$newconffile" ]; then
+    rm "$newconffile"
+  fi
+}
+
+run () {
+  # syntax: run command [ argument ... ]
+  #
+  # Run specified command with optional arguments and report its exit status.
+  # Useful for commands whose exit status may be nonzero, but still acceptable,
+  # or commands whose failure is not fatal to us.
+  #
+  # NOTE: Do *not* use this function with db_get or db_metaget commands; in
+  # those cases the return value of the debconf command *must* be checked
+  # before the string returned by debconf is used for anything.
+
+  local retval
+
+  # validate arguments
+  if [ $# -lt 1 ]; then
+    usage_error "run() called with wrong number of arguments; expected at" \
+                "least 1, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  "$@" || retval=$?
+
+  if [ ${retval:-0} -ne 0 ]; then
+    observe "command \"$*\" exited with status $retval"
+  fi
+}
+
+make_symlink_sane () {
+  # syntax: make_symlink_sane symlink target
+  #
+  # Ensure that the symbolic link symlink exists, and points to target.
+  #
+  # If symlink does not exist, create it and point it at target.
+  #
+  # If symlink exists but is not a symbolic link, back it up.
+  #
+  # If symlink exists, is a symbolic link, but points to the wrong location, fix
+  # it.
+  #
+  # If symlink exists, is a symbolic link, and already points to target, do
+  # nothing.
+  #
+  # This function wouldn't be needed if ln had an -I, --idempotent option.
+
+  # Validate arguments.
+  if [ $# -ne 2 ]; then
+    usage_error "make_symlink_sane() called with wrong number of arguments;" \
+      "expected 2, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  # We could just use the positional parameters as-is, but that makes things
+  # harder to follow.
+  local symlink target
+
+  symlink="$1"
+  target="$2"
+
+  if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then
+      observe "link from $symlink to $target already exists"
+  else
+    observe "creating symbolic link from $symlink to $target"
+    mkdir -p "${target%/*}" "${symlink%/*}"
+    ln -s -b -S ".dpkg-old" "$target" "$symlink"
+  fi
+}
+
+migrate_dir_to_symlink () {
+  # syntax: migrate_dir_to_symlink old_location new_location
+  #
+  # Per Debian Policy section 6.5.4, "A directory will never be replaced by a
+  # symbolic link to a directory or vice versa; instead, the existing state
+  # (symlink or not) will be left alone and dpkg will follow the symlink if
+  # there is one."
+  #
+  # We have to do it ourselves.
+  #
+  # This function moves the contents of old_location, a directory, into
+  # new_location, a directory, then makes old_location a symbolic link to
+  # new_location.
+  #
+  # old_location need not exist, but if it does, it must be a directory (or a
+  # symlink to a directory).  If it is not, it is backed up.  If new_location
+  # exists already and is not a directory, it is backed up.
+  #
+  # This function should be called from a package's preinst so that other
+  # packages unpacked after this one --- but before this package's postinst runs
+  # --- are unpacked into new_location even if their payloads contain
+  # old_location filespecs.
+
+  # Validate arguments.
+  if [ $# -ne 2 ]; then
+    usage_error "migrate_dir_to_symlink() called with wrong number of"
+                "arguments; expected 2, got $#"
+    exit $SHELL_LIB_USAGE_ERROR
+  fi
+
+  # We could just use the positional parameters as-is, but that makes things
+  # harder to follow.
+  local new old
+
+  old="$1"
+  new="$2"
+
+  # Is old location a symlink?
+  if [ -L "$old" ]; then
+    # Does it already point to new location?
+    if [ "$(readlink "$old")" = "$new" ]; then
+      # Nothing to do; migration has already been done.
+      observe "migration of $old to $new already done"
+      return 0
+    else
+      # Back it up.
+      warn "backing up symbolic link $old as $old.dpkg-old"
+      mv -b "$old" "$old.dpkg-old"
+    fi
+  fi
+
+  # Does old location exist, but is not a directory?
+  if [ -e "$old" ] && ! [ -d "$old" ]; then
+      # Back it up.
+      warn "backing up non-directory $old as $old.dpkg-old"
+      mv -b "$old" "$old.dpkg-old"
+  fi
+
+  observe "migrating $old to $new"
+
+  # Is new location a symlink?
+  if [ -L "$new" ]; then
+    # Does it point the wrong way, i.e., back to where we're migrating from?
+    if [ "$(readlink "$new")" = "$old" ]; then
+      # Get rid of it.
+      observe "removing symbolic link $new which points to $old"
+      rm "$new"
+    else
+      # Back it up.
+      warn "backing up symbolic link $new as $new.dpkg-old"
+      mv -b "$new" "$new.dpkg-old"
+    fi
+  fi
+
+  # Does new location exist, but is not a directory?
+  if [ -e "$new" ] && ! [ -d "$new" ]; then
+    warn "backing up non-directory $new as $new.dpkg-old"
+    mv -b "$new" "$new.dpkg-old"
+  fi
+
+  # Create new directory if it does not yet exist.
+  if ! [ -e "$new" ]; then
+    observe "creating $new"
+    mkdir -p "$new"
+  fi
+
+  # Copy files in old location to new location.  Back up any filenames that
+  # already exist in the new location with the extension ".dpkg-old".
+  observe "copying files from $old to $new"
+  if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then
+    die "error(s) encountered while copying files from $old to $new"
+  fi
+
+  # Remove files at old location.
+  observe "removing $old"
+  rm -r "$old"
+
+  # Create symlink from old location to new location.
+  make_symlink_sane "$old" "$new"
+}
+
+# vim:set ai et sw=2 ts=2 tw=80:
+
+# GOBSTOPPER: The X Strike Force shell library ends here.
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 100755 (executable)
index 0000000..0708616
--- /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 100755 (executable)
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..7c3f92d
--- /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..4cce6dc
--- /dev/null
@@ -0,0 +1,52 @@
+.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.
+.IP [XvBadAlloc] 8
+Returned if
+.BR XvQueryExtension (__libmansuffix__)
+failed to allocate memory to process the request.
+.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 100755 (executable)
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 100755 (executable)
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..41e7cbd
--- /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 100644 (file)
index 0000000..b068b8b
--- /dev/null
@@ -0,0 +1,74 @@
+
+Name:       libXv
+Summary:    X.Org X11 libXv runtime library
+Version:    1.0.6
+Release:    1
+Group:      System/Libraries
+License:    MIT
+URL:        http://www.x.org/
+Source0:    http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  pkgconfig(xproto)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(xextproto)
+BuildRequires:  pkgconfig(videoproto)
+BuildRequires:  pkgconfig(xext)
+BuildRequires:  pkgconfig(xorg-macros)
+
+
+%description
+library for the X Video (Xv) extension to the X Window System
+
+
+%package devel
+Summary:    Development components for the libXv library
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Development library for the X Video (Xv) extension to the X Window System
+
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+
+%build
+
+%reconfigure --disable-static
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING ChangeLog
+%{_libdir}/libXv.so.1
+%{_libdir}/libXv.so.1.0.0
+
+
+%files devel
+%defattr(-,root,root,-)
+%dir %{_includedir}/X11
+%dir %{_includedir}/X11/extensions
+%{_includedir}/X11/extensions/Xvlib.h
+%{_libdir}/libXv.so
+%{_libdir}/pkgconfig/xv.pc
+#%dir %{_mandir}/man3x
+%doc %{_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 100755 (executable)
index 0000000..77378aa
--- /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 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 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 100755 (executable)
index 0000000..f08346a
--- /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