Update to videoproto 2.3.2

This commit is contained in:
matthieu 2013-09-22 13:07:30 +00:00
parent 7f712382d7
commit 94ac41a2cd
12 changed files with 902 additions and 161 deletions

View File

@ -3,13 +3,13 @@ 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,
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
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.
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

View File

@ -1,3 +1,99 @@
commit 4d26102ace67377e88ba087e52ca894e0ffd2ebf
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Jul 22 21:40:14 2013 -0700
videoproto 2.3.2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 665f990f72b0518d7ea604affd935c6a2297058a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Jul 22 21:36:29 2013 -0700
config: Add missing AC_CONFIG_SRCDIR
Regroup AC statements under the Autoconf initialization section.
Regroup AM statements under the Automake initialization section.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 77d5c8d90e81139391a57710095784cde0476b9c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jun 27 22:14:36 2013 -0700
Trim trailing whitespace
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1a96222d64cde75e20fd9bb7a717cf269c7e9a59
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 23 00:34:52 2013 -0700
Xvproto.h: fix xvQueryEncodingsReply to match actual wire protocol
padl3 was declared as CARD32, which for proper alignment, got two
additional bytes of padding silently inserted before it. Declaring
it as CARD16 aligns it properly after the CARD16 num_encodings.
Fixes clang warning:
Xvproto.h:462:10: warning: padding struct 'struct _QueryEncodingsReply' with 2 bytes to align 'padl3' [-Wpadded]
CARD32 padl3 B32;
^
This makes sizeof(xvQueryEncodingsReply) match the sz_xvQueryEncodingsReply
which is used in libXv & the X server for the size sent over the wire.
Reported-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit d97051236bba088688681f348086feb733cbdd08
Author: Julien Cristau <jcristau@debian.org>
Date: Sun Jun 9 19:00:29 2013 +0200
Xvproto: fix xvEncodingInfo to match actual wire protocol
The padding is *before* the rate field, so the rate is placed on a 32bit
boundary. This change adds explicit padding between height and rate,
and removes extraneous padding after the rate field, which the server
never sent and xlib never read.
This changes sizeof(xvEncodingInfo). Hopefully that's not a big deal as
clients only see the Xlib structure XvEncodingInfo.
Debian bug#657215
Reported-by: Kevin Ryde <user42@zip.com.au>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit e42cf822e230cff5c6550ca2c050dfa27d2c9611
Author: Colin Walters <walters@verbum.org>
Date: Wed Jan 4 17:37:06 2012 -0500
autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit fa26f1cc56909b55bb7b2d31c56f66af48cad0af
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Jan 15 14:01:10 2013 -0500
configure: Remove AM_MAINTAINER_MODE
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit b994209d8559a0d0802487ed53585404b398a707
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Aug 10 10:17:10 2010 -0400
videoproto 2.3.1
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit 56a94402e9252879771ba42ee76990f132b56fca
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Sun Mar 28 19:00:31 2010 -0400

291
proto/videoproto/INSTALL Normal file
View File

@ -0,0 +1,291 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@ -4,13 +4,13 @@ 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,
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
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.
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
@ -25,11 +25,11 @@ SOFTWARE.
#ifndef XV_H
#define XV_H
/*
** File:
** File:
**
** Xv.h --- Xv shared library and server header file
**
** Author:
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**

View File

@ -42,7 +42,7 @@
#define XVMC_PREDICTION_FIELD 0x01
#define XVMC_PREDICTION_FRAME 0x02
#define XVMC_PREDICTION_DUAL_PRIME 0x03
#define XVMC_PREDICTION_16x8 0x02
#define XVMC_PREDICTION_16x8 0x02
#define XVMC_PREDICTION_4MV 0x04
#define XVMC_SELECT_FIRST_FORWARD 0x01
@ -68,11 +68,11 @@
typedef struct {
int surface_type_id;
int chroma_format;
unsigned short max_width;
unsigned short max_height;
unsigned short max_width;
unsigned short max_height;
unsigned short subpicture_max_width;
unsigned short subpicture_max_height;
int mc_type;
int mc_type;
int flags;
} XvMCSurfaceInfo;
@ -118,7 +118,7 @@ typedef struct {
unsigned short x;
unsigned short y;
unsigned char macroblock_type;
unsigned char motion_type;
unsigned char motion_type;
unsigned char motion_vertical_field_select;
unsigned char dct_type;
short PMV[2][2][2];

View File

@ -89,7 +89,7 @@ typedef struct {
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 length B32;
CARD16 width_actual B16;
CARD16 height_actual B16;
CARD32 flags_return B32;
@ -121,7 +121,7 @@ typedef struct {
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 length B32;
CARD32 padl2 B32;
CARD32 padl3 B32;
CARD32 padl4 B32;
@ -156,7 +156,7 @@ typedef struct {
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 length B32;
CARD16 width_actual B16;
CARD16 height_actual B16;
CARD16 num_palette_entries B16;
@ -213,8 +213,8 @@ typedef struct {
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 major B32;
CARD32 length B32;
CARD32 major B32;
CARD32 minor B32;
CARD32 patchLevel B32;
CARD32 nameLen B32;

View File

@ -4,13 +4,13 @@ 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,
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
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.
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
@ -25,11 +25,11 @@ SOFTWARE.
#ifndef XVPROTO_H
#define XVPROTO_H
/*
** File:
** File:
**
** Xvproto.h --- Xv protocol header file
**
** Author:
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
@ -84,8 +84,8 @@ typedef struct {
XvEncodingID encoding B32;
CARD16 name_size B16;
CARD16 width B16, height B16;
xvRational rate;
CARD16 pad B16;
xvRational rate;
} xvEncodingInfo;
#define sz_xvEncodingInfo (12 + sz_xvRational)
@ -125,7 +125,7 @@ typedef struct {
CARD16 pad6 B16;
CARD32 y_sample_bits B32;
CARD32 u_sample_bits B32;
CARD32 v_sample_bits B32;
CARD32 v_sample_bits B32;
CARD32 horz_y_period B32;
CARD32 horz_u_period B32;
CARD32 horz_v_period B32;
@ -459,7 +459,7 @@ typedef struct _QueryEncodingsReply {
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 num_encodings B16;
CARD32 padl3 B32;
CARD16 padl3 B16;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
@ -516,7 +516,7 @@ typedef struct {
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32; /* 0 */
CARD32 num_attributes B32;
CARD32 num_attributes B32;
CARD32 text_size B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
@ -530,7 +530,7 @@ typedef struct {
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 num_formats B32;
CARD32 num_formats B32;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
@ -543,8 +543,8 @@ typedef struct {
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 num_planes B32;
CARD32 length B32;
CARD32 num_planes B32;
CARD32 data_size B32;
CARD16 width B16;
CARD16 height B16;

347
proto/videoproto/compile Normal file
View File

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,7 +1,14 @@
dnl
dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([VideoProto], [2.3.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AC_INIT([VideoProto], [2.3.2],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AC_CONFIG_SRCDIR([Makefile.am])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],

View File

@ -2,7 +2,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: VideoProto
Description: Video extension headers
Version: @PACKAGE_VERSION@

View File

@ -20,7 +20,7 @@
* 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.
*
*
* Author: Thomas Hellström, 2004.
*/
@ -31,7 +31,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/XvMC.h>
/*
/*
* New "Motion compensation type".
*/
@ -74,7 +74,7 @@
/*
* Which of two mappings between quantiser_scale_code
* and quantiser_scale shall apply.
*/
*/
#define XVMC_Q_SCALE_TYPE 0x00000400
@ -86,20 +86,20 @@
#define XVMC_INTRA_VLC_FORMAT 0x00000800
/*
* Also XVMC_SECOND_FIELD should be set in flags if active.
*/
* Also XVMC_SECOND_FIELD should be set in flags if active.
*/
#define XVMC_I_PICTURE 1
#define XVMC_P_PICTURE 2
#define XVMC_B_PICTURE 3
typedef struct _XvMCMpegControl{
unsigned
unsigned
BVMV_range, /* Backward vertical motion vector range */
BHMV_range, /* Backward horizontal motion vector range */
FVMV_range, /* Forward vertical motion vector range */
FHMV_range, /* Forward horizontal motion vector range */
picture_structure, /* XVMC_TOP_FIELD, XVMC_BOTTOM_FIELD,
picture_structure, /* XVMC_TOP_FIELD, XVMC_BOTTOM_FIELD,
* XVMC_FRAME_PICTURE
*/
intra_dc_precision, /* 0x00 - 0x03 corresponds to 8 to 11 bits prec. */
@ -126,13 +126,13 @@ extern Status XvMCBeginSurface(Display *display,
/*
* The quantizer matrix structure. This should be filled in by the user and
* uploaded whenever a change is needed. The lib initializes with
* uploaded whenever a change is needed. The lib initializes with
* default matrices and will automatically load the hardware with new matrices
* on decoder context switches. To load data, set the corresponding load flag
* to true and fill in the values. The VIA MPEG2 engine only uses the
* intra_quantiser_matrix and the non_intra_quantiser_matrix.
* intra_quantiser_matrix and the non_intra_quantiser_matrix.
*/
typedef struct _XvMCQMatrix {
int load_intra_quantiser_matrix;
int load_non_intra_quantiser_matrix;
@ -145,7 +145,7 @@ typedef struct _XvMCQMatrix {
} XvMCQMatrix;
/*
* Upload a XvMCQMatrix structure to the clientlib.
* Upload a XvMCQMatrix structure to the clientlib.
* The hardware will start using it the next XvMCBeginSurface.
*/
@ -154,21 +154,21 @@ extern Status XvMCLoadQMatrix(Display *display, XvMCContext *context,
/*
* Put a slice to the decoder. The hardware will start processing it
* Put a slice to the decoder. The hardware will start processing it
* immediately.
*/
extern Status XvMCPutSlice(Display *display,XvMCContext *context,
extern Status XvMCPutSlice(Display *display,XvMCContext *context,
char *slice, int nBytes);
/*
* Put a slice without the slice start code to the decoder.
* The hardware will start processing it
* immediately. This function is for client optimization.
* Put a slice without the slice start code to the decoder.
* The hardware will start processing it
* immediately. This function is for client optimization.
* XvMCPutSlice(display,context,slice,nBytes) is equivalent to
* XvMCPutSlice2(display,context,slice+4,nBytes-4,slice[3]);
*/
extern Status XvMCPutSlice2(Display *display,XvMCContext *context,
extern Status XvMCPutSlice2(Display *display,XvMCContext *context,
char *slice, int nBytes, int sliceCode);
#endif

View File

@ -41,8 +41,8 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
@ -55,24 +55,24 @@
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.
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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Preface
-------
The following is an outline for an X video extension protocol. It
is preliminary and subject to change. My goal in writing this was
to fix some the shortcomings of existing overly simplistic
extensions while avoiding pitfalls in an overly complex extension.
Your feedback is desired, and since the major design directions
have been stable for some time, feel free to hammer on the details
of the protocol.
@ -95,10 +95,10 @@
with several groups, including
Project Athena's Visual Computing Group
The MIT X Consortium
The MIT X Consortium
The MIT Media Lab's Interactive Cinema Group
Changes
-------
@ -139,7 +139,7 @@
Introduction
------------
Video technology is moving very quickly. Standards for processing
high resolution video are currently a hot topic of discussion
internationally, and it will soon be possible to process video
@ -147,47 +147,47 @@
does not attempt to address issues of digital video. Its purpose
is to provide a mechanism for support of current and near term
interactive video technology.
It is somewhat ironic that Xv contains nothing particularly
innovative. It takes a minimalistic approach, and without a doubt
it could have been defined years ago, and with several revisions.
So, the life expectancy of Xv is not long. Nevertheless, it may
undergo further revision and experimentation that will help our
progress towards digital video systems.
One premise of the Xv extension is that the X server is not alone.
A separate video server is often used to manage other aspects of
video processing, though the partition between what the X server
does and what a video server does is a matter of great debate.
Model
-----
This extension models video monitor capabilities in the X Window
System. Some advanced monitors support the simultaneous display
of multiple video signals (into separate windows), and that is
prepresented here through the ability to display video from
multiple video input adaptors into X drawables.
Some monitors support multiple video encodings (mostly for
internationalization purposes) either through switches or
automatic detection, thus each video adaptor specifies the set of
encodings it supports.
The requests to display video from an adaptor into a drawable are
modeled after the core PutImage request, though extended to
support scaling and source clipping.
Video output is also supported and is symmetric with the video
input function, though fewer GC components are used.
Mechanism
---------
The Xv extension does the following:
-- lists available video adaptors
-- identifies the number of ports each adaptor supports
-- describes what drawable formats each adaptor supports
@ -197,35 +197,35 @@
-- grabs and ungrabs ports
-- sets and gets port attributes
-- delivers event notification
Adaptors
--------
A display may have multiple video input and output adaptors. An
adaptor may support multiple simultaneously active ports, and in
some cases the number of ports has no fixed limit.
An input port receives encoded video data and converts it to a
stream of data used to update a drawable. An output port samples
data from a drawable and produces a stream of encoded video data.
The ADAPTORINFO structure is used to describe a video adaptor.
ADAPTORINFO:
[base-id: PORT
num-ports: CARD16
type: SETofADAPTORTYPE
formats: LISTofFORMAT
name: STRING]
ADAPTORTYPE: {Input, Output}
FORMAT:
[depth: CARD8
visual: VISUALID]
The base-id field specifies the XID of the first port of the
adaptor. The `num-ports' field specifies how many ports the
adaptor supports. The ports of the adaptor have XIDs in the range
@ -248,24 +248,24 @@
necessarily imply that simultaneous operation is supported.
Errors
------
Port
A Port error is returned if any request names a PORT that does not
exist.
Encoding
An Encoding error is returned if any request names an ENCODINGID
that does not exist.
Query Requests
-------------------
@ -277,19 +277,19 @@
The QueryExtension request returns the extension version and
revision numbers.
QueryAdaptors
win: WINDOW
==>
adaptors: LISTofADAPTORINFO
The QueryAdaptors request returns the video adaptor information for
the screen of the specified window.
Errors: {Window}
QueryEncodings
QueryEncodings
port: PORT
==>
encodings: LISTofENCODINGINFO
@ -304,28 +304,28 @@
name: STRING
width, height: CARD16
rate: FRACTION]
The `encoding' field identifies an encoding supported by a port.
Its value is unique for a screen. Width and height specify the
size of the video image and rate specifies the rate at which
fields of image information are encoded.
An encoding is identified by a string that names the encoding.
Encoding naming conventions need to be established (i.e.,
something along the lines of font naming, but simpler)
FRACTION
[numerator, denominator: INT32]
The FRACTION structure is used to specify a fractional number.
Errors: {Port}
Put Video Requests
------------------
PutVideo
port: PORT
drawable: DRAWABLE
@ -334,12 +334,12 @@
vid-w, vid-h: CARD16
drw-x, drw-y: INT16
drw-w, drw-h: CARD16
The PutVideo request writes video into a drawable. The position
and size of the source rectangle is specified by vid-x, vid-y,
vid-w, and vid-h. The position and size of the destination
rectangle is specified by drw-x, drw-y, drw-w, drw-h.
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.
@ -356,10 +356,10 @@
HardError is generated for the drawable.
GC components: subwindow-mode, clip-x-origin, clip-y-origin, clip-mask.
Errors: {Match, Value, GContext, Port, Alloc}
PutStill
port: PORT
drawable: DRAWABLE
@ -368,13 +368,13 @@
vid-w, vid-h: CARD16
drw-x, drw-y: INT16
drw-w, drw-h: CARD16
The PutStill request writes a single frame of video into a
drawable. The position and size of the source rectangle is
specified by vid-x, vid-y, vid-w, and vid-h. The position and
size of the destination rectangle is specified by drw-x, drw-y,
drw-w, drw-h.
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.
@ -386,14 +386,14 @@
drawable.
GC components: subwindow-mode, clip-x-origin, clip-y-origin, clip-mask.
Errors: {Match, Value, GContext, Port, Alloc}
Get Video Requests
------------------
GetVideo
port: PORT
drawable: DRAWABLE
@ -402,12 +402,12 @@
vid-w, vid-h: CARD16
drw-x, drw-y: INT16
drw-w, drw-h: CARD16
The GetVideo request outputs video from a drawable. The position
and size of the destination rectangle is specified by vid-x,
vid-y, vid-w, and vid-h. The position and size of the source
rectangle is specified by drw-x, drw-y, drw-w, and drw-h.
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
@ -423,10 +423,10 @@
GC components: subwindow-mode, clip-x-origin, clip-y-origin,
clip-mask.
Errors: {Match, Value, GContext, Port, Alloc}
GetStill
port: PORT
drawable: DRAWABLE
@ -435,12 +435,12 @@
vid-w, vid-h: CARD16
drw-x, drw-y: INT16
drw-w, drw-h: CARD16
The GetStill request outputs video from a drawable. The position
and size of the destination rectangle is specified by vid-x,
vid-y, vid-w, and vid-h. The position and size of the source
rectangle is specified by drw-x, drw-y, drw-w, and drw-h.
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
@ -453,70 +453,70 @@
GC components: subwindow-mode, clip-x-origin, clip-y-origin,
clip-mask.
Errors: {Match, Value, GContext, Port, Alloc}
Grab Requests
-------------
GrabPort
port: PORT
port: PORT
timestamp: {TIMESTAMP, CurrentTime}
==>
status: {Success, AlreadyGrabbed, InvalidTime}
The GrabPort request grabs a port. While a port is grabbed, only
video requests from the grabbing client are permitted.
If timestamp specifies a time older than the current port time, a
status of InvalidTime is returned. If the port is already grabbed
by another client, a status of AlreadyGrabbed is returned.
Otherwise a status of Success is returned. The port time is
updated when the following requests are processed: GrabPort,
UngrabPort, PutVideo, PutStill, GetVideo, GetStill
If the port is actively processing video for another client, the
video is preempted, and an VideoNotify event with detail Preempted
is generated for its drawable.
Errors: {Port}
UngrabPort
port: PORT
port: PORT
timestamp: {TIMESTAMP, CurrentTime}
The UngrabPort request ungrabs a port. If timestamp specifies a
time before the last connection request time of this port, the
request is ignored.
Errors: {Port}
Other Requests
--------------
StopVideo
port: PORT
drawable: DRAWABLE
The StopVideo request stops active video for the specified port
and drawable. If the port isn't processing video, or if it is
processing video in a different drawable, the request is ignored.
When video is stopped a VideoNotify event with detail Stopped is
generated for the associated drawable.
Errors: {Drawable, Port}
Errors: {Drawable, Port}
SelectVideoNotify
drawable: DRAWABLE
onoff: BOOL
The SelectVideoNotify request enables or disables VideoNotify
event delivery to the requesting client. VideoNotify events are
generated when video starts and stops.
@ -527,14 +527,14 @@
SelectPortNotify
port: PORT
onoff: BOOL
The SelectPortNotify request enables or disables PortNotify event
delivery to the requesting client. PortNotify events are
generated when port attributes are changed using SetPortAttribute.
Errors: {Port}
QueryBestSize
port: PORT
motion: BOOL
@ -542,7 +542,7 @@
drw-w, drw-h: CARD16
==>
actual-width, actual-height: CARD16
The QueryBestSize request returns, for the given source size and
desired destination size, the closest destination size that the
port adaptor supports. The returned size will be equal
@ -553,30 +553,30 @@
The retuned size is also chosen to maintain the requested aspect ratio
if possible.
Errors: {Port}
SetPortAttribute
port: PORT
attribute: ATOM
value: INT32
The SetPortAttribute request sets the value of a port attribute.
The port attribute is identified by the attribute atom. The
following strings are guaranteed to generate valid atoms using the
InternAtom request.
String Type
String Type
-----------------------------------------------------------------
"XV_ENCODING" ENCODINGID
"XV_HUE" [-1000..1000]
"XV_SATURATION" [-1000..1000]
"XV_BRIGHTNESS" [-1000..1000]
"XV_HUE" [-1000..1000]
"XV_SATURATION" [-1000..1000]
"XV_BRIGHTNESS" [-1000..1000]
"XV_CONTRAST" [-1000..1000]
If the given attribute doesn't match an attribute supported by the
port adaptor a Match error is generated. The supplied encoding
@ -593,14 +593,14 @@
notification using SelectPortNotify.
Errors: {Port, Match, Value}
GetPortAttribute
port: PORT
attribute: ATOM
==>
value: INT32
value: INT32
The GetPortAttribute request returns the current value of the
attribute identified by the given atom. If the given atom
@ -613,7 +613,7 @@
Events
------
VideoNotify
drawable: DRAWABLE
port: PORT
@ -635,18 +635,18 @@
A Preempted reason is generated when video is stopped by a
conflicting request.
A HardError reason is generated when the video port cannot
initiate or continue processing a video request because of an
underlying transmission or reception error.
PortNotify
port: PORT
attribute: ATOM
value: INT32
time: TIMESTAMP
The PortNotify event is generated when a SetPortAttribute request
is processed. The event is delivered to all clients that have
performed a SelectPortNotify request for the port. The event