Update to libXv 1.0.10

This commit is contained in:
matthieu 2013-09-28 17:51:20 +00:00
parent 4624618994
commit f0a97458d0
10 changed files with 1869 additions and 1387 deletions

View File

@ -1,3 +1,195 @@
commit 736d7ac5a94c7aa6761d50ab58339a3d9a116c51
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Sep 7 22:19:48 2013 -0700
libXv 1.0.10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 4a7d2ca2438649e61b7dcb9491391ff6fbd482ac
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Jul 5 21:19:29 2013 -0700
Remove fallback for _XEatDataWords, require libX11 1.6 for it
_XEatDataWords was orignally introduced with the May 2013 security
patches, and in order to ease the process of delivering those,
fallback versions of _XEatDataWords were included in the X extension
library patches so they could be applied to older versions that didn't
have libX11 1.6 yet. Now that we're past that hurdle, we can drop
the fallbacks and just require libX11 1.6 for building new versions
of the extension libraries.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 06d275959b5dd78c319d5200ca6d986934b18920
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 23:43:58 2013 -0700
Refactor error handling
Reduce code duplication, make error checking & cleanup more consistent
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 29b23d387e32d09e1b34682f01cee899a08a1176
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 21:47:34 2013 -0700
Add missing calls to _XEatDataWords when we are skipping _XRead
If we failed to allocate the buffer to _XRead into, discard the
rest of the reply, instead of leaving it to confuse the reading
of the next reply.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 5a09a55b5b13280990465d83205e796bb8cd68ac
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 21:04:06 2013 -0700
Replace custom copy of GetReq macro with call to Xlib 1.5's _XGetRequest
xvproto.h names don't match those required by the Xlibint.h GetReq* macros,
but at least we can rely on the _XGetRequest function for the bulk of the
work now, instead of duplicating it.
Also clears clang warnings repeated for every request function:
Xv.c:137:5: warning: cast from 'char *' to 'xvQueryExtensionReq *' increases re
quired alignment from 1 to 2 [-Wcast-align]
XvGetReq(QueryExtension, req);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Xvlibint.h:52:8: note: expanded from macro 'XvGetReq'
req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xv.c:137:5: warning: implicit conversion loses integer precision: 'int' to 'CAR
D8' (aka 'unsigned char') [-Wconversion]
XvGetReq(QueryExtension, req);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Xvlibint.h:53:30: note: expanded from macro 'XvGetReq'
req->reqType = info->codes->major_opcode;\
~ ~~~~~~~~~~~~~^~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit ef2722e10b275d13d754d2b92e67f72b0716d070
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 20:33:13 2013 -0700
Require ANSI C89 pre-processor, drop pre-C89 token pasting support
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
commit e73a2199f039e9ae772efb6be8d1db68eb346fa4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 13:35:12 2013 -0700
Use pad_to_int32 macro instead of repeated (x + 3) & ~3 pattern
Makes code clearer, and using ~3U instead of ~3 clears some signed int
warnings.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 4ced44196d6636006c9724a373c0d2ca0c12dc1e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 11:20:13 2013 -0700
Fix sign conversion & comparison warnings from clang
Clears up:
Xv.c:196:21: warning: implicit conversion changes signedness: 'CARD32' (aka 'unsigned int') to 'int' [-Wsign-conversion]
size = rep.length << 2;
~ ~~~~~~~~~~~^~~~
Xv.c:212:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) {
~~~~~~~~^~~~~
Xv.c:236:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
pa->num_adaptors = rep.num_adaptors - ii;
~ ~~~~~~~~~~~~~~~~~^~~~
Xv.c:243:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if ( (name = (char *)Xmalloc(size+1)) == NULL)
~~~~~~~~~~~~^~~
Xv.c:251:37: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
(void)strncpy(name, u.string, size);
~~~~~~~ ^~~~
Xv.c:260:36: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if ((pfs=(XvFormat *)Xmalloc(size))==NULL) {
~~~~~~~~^~~~~
Xv.c:269:20: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
for (jj=0; jj<pa->num_formats; jj++) {
~~^~~~~~~~~~~~~~~~
Xv.c:259:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
size = pa->num_formats*sizeof(XvFormat);
~ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Xv.c:305:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
for (ii=0; ii<pAdaptors->num_adaptors; ii++, pa++)
~~^~~~~~~~~~~~~~~~~~~~~~~~
Xv.c:356:21: warning: implicit conversion changes signedness: 'CARD32' (aka 'unsigned int') to 'int' [-Wsign-conversion]
size = rep.length << 2;
~ ~~~~~~~~~~~^~~~
Xv.c:369:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if ( (pes = (XvEncodingInfo *)Xmalloc(size)) == NULL) {
~~~~~~~~^~~~~
Xv.c:392:45: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
pe->num_encodings = rep.num_encodings - jj;
~ ~~~~~~~~~~~~~~~~~~^~~~
Xv.c:397:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if ( (name = (char *)Xmalloc(size+1)) == NULL) {
~~~~~~~~~~~~^~~
Xv.c:404:31: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
strncpy(name, u.string, size);
~~~~~~~ ^~~~
Xv.c:433:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
for (ii=0; ii<pEncodings->num_encodings; ii++, pe++) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Xv.c:886:27: warning: comparison of integers of different signs: 'int' and 'CAR
D32' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < rep.num_attributes; i++) {
~ ^ ~~~~~~~~~~~~~~~~~~
Xv.c:946:27: warning: comparison of integers of different signs: 'int' and 'CAR
D32' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < rep.num_formats; i++) {
~ ^ ~~~~~~~~~~~~~~~
Xv.c:1100:5: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
SetReqLen(req, len, len);
^~~~~~~~~~~~~~~~~~~~~~~~
X11/Xlibint.h:530:27: note: expanded from macro 'SetReqLen'
if ((req->length + n) > (unsigned)65535) { \
^ ~~~~~~~~~~~~~~~
Xv.c:1100:20: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
SetReqLen(req, len, len);
~~~~~~~~~~~~~~~^~~~~~~~~
X11/Xlibint.h:532:21: note: expanded from macro 'SetReqLen'
MakeBigReq(req,n) \
^
X11/Xlibint.h:505:35: note: expanded from macro 'MakeBigReq'
((CARD32 *)req)[1] = _BRlen + n + 2; \
~ ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 89dc3ff457644271b1c633efa9682ae45e55d9d8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 11:07:13 2013 -0700
Remove unnecessary casts from Xmalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
commit 54851e0e72e2017c14c504459078c97d6112696b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 19:58:20 2013 -0700
Adopt X.Org standard code style, with consistent indentation
Having differing indent levels of 2, 3, & 4 spaces hurts my eyes.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit d58f74ebfd0c56ffeb8e288c65592228af197a2e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jun 22 19:06:09 2013 -0700

View File

@ -75,7 +75,8 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in $(srcdir)/xv.pc.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
config.guess config.sub depcomp install-sh ltmain.sh missing
compile config.guess config.sub depcomp install-sh ltmain.sh \
missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \

16
lib/libXv/aclocal.m4 vendored
View File

@ -9792,7 +9792,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
dnl
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
@ -9825,10 +9825,10 @@ dnl DEALINGS IN THE SOFTWARE.
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
#
#
# See the "minimum version" comment for each macro you use to see what
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.16.2])
m4_define([vers_have], [1.17.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -9848,7 +9848,7 @@ m4_undefine([maj_needed])
# such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -11334,18 +11334,18 @@ fi
found="no"
m4_foreach([flag], m4_cdr($@), [
if test $found = "no" ; then
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
fi
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
fi
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
AC_CACHE_VAL($cacheid,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
@ -11604,7 +11604,7 @@ dnl
# XORG_RELEASE_VERSION
# --------------------
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],

347
lib/libXv/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

@ -30,9 +30,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `_XEatDataWords' function. */
#undef HAVE__XEATDATAWORDS
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR

454
lib/libXv/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([libXv], [1.0.9],
AC_INIT([libXv], [1.0.10],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXv])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
@ -41,13 +41,7 @@ XORG_DEFAULT_OPTIONS
XORG_CHECK_MALLOC_ZERO
# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(XV, x11 xext xextproto videoproto)
# Check for _XEatDataWords function that may be patched into older Xlib release
SAVE_LIBS="$LIBS"
LIBS="$XV_LIBS"
AC_CHECK_FUNCS([_XEatDataWords])
LIBS="$SAVE_LIBS"
PKG_CHECK_MODULES(XV, [x11 >= 1.6 xext xextproto videoproto])
# Allow checking code with lint, sparse, etc.
XORG_WITH_LINT

View File

@ -57,323 +57,323 @@ SOFTWARE.
#include <X11/extensions/XShm.h>
typedef struct {
int numerator;
int denominator;
int numerator;
int denominator;
} XvRational;
typedef struct {
int flags; /* XvGettable, XvSettable */
int min_value;
int max_value;
char *name;
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;
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;
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;
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 */
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 */
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];
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;
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 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 */
/* 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;
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
Display * /* display */,
XvPortID /* port */,
Drawable /* drawable */
);
extern int XvGrabPort(
Display* /* display */,
XvPortID /* port */,
Time /* time */
Display * /* display */,
XvPortID /* port */,
Time /* time */
);
extern int XvUngrabPort(
Display* /* display */,
XvPortID /* port */,
Time /* time */
Display * /* display */,
XvPortID /* port */,
Time /* time */
);
extern int XvSelectVideoNotify(
Display* /* display */,
Drawable /* drawable */,
Bool /* onoff */
Display * /* display */,
Drawable /* drawable */,
Bool /* onoff */
);
extern int XvSelectPortNotify(
Display* /* display */,
XvPortID /* port */,
Bool /* onoff */
Display * /* display */,
XvPortID /* port */,
Bool /* onoff */
);
extern int XvSetPortAttribute(
Display* /* display */,
XvPortID /* port */,
Atom /* attribute */,
int /* value */
Display * /* display */,
XvPortID /* port */,
Atom /* attribute */,
int /* value */
);
extern int XvGetPortAttribute(
Display* /* display */,
XvPortID /* port */,
Atom /* attribute */,
int* /* p_value */
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 */
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 XvAttribute *XvQueryPortAttributes(
Display * /* display */,
XvPortID /* port */,
int * /* number */
);
extern void XvFreeAdaptorInfo(
XvAdaptorInfo* /* adaptors */
XvAdaptorInfo * /* adaptors */
);
extern void XvFreeEncodingInfo(
XvEncodingInfo* /* encodings */
XvEncodingInfo * /* encodings */
);
extern XvImageFormatValues * XvListImageFormats (
Display *display,
XvPortID port_id,
int *count_return
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 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
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
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
extern XvImage *XvShmCreateImage (
Display *display,
XvPortID port,
int id,
char *data,
int width,
int height,
XShmSegmentInfo *shminfo
);

File diff suppressed because it is too large Load Diff

View File

@ -44,30 +44,12 @@ SOFTWARE.
#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++
/* names in Xvproto.h don't match the expectation of Xlib's GetReq* macros,
so we have to provide our own implementation */
#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
req = (xv##name##Req *) _XGetRequest( \
dpy, (CARD8) info->codes->major_opcode, SIZEOF(xv##name##Req)); \
req->xvReqType = xv_##name;
#endif /* XVLIBINT_H */