re-import branch of vevo , vevo with memory pool

git-svn-id: svn://code.dyne.org/veejay/trunk@474 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2005-11-05 20:32:11 +00:00
parent 6ca61dbd6b
commit 3c96feac17
47 changed files with 50604 additions and 0 deletions

1
vevo-mpool/AUTHORS Normal file
View File

@@ -0,0 +1 @@
Niels Elburg <nelburg@looze.net>

340
vevo-mpool/COPYING Normal file
View File

@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 of the License, 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

11
vevo-mpool/ChangeLog Normal file
View File

@@ -0,0 +1,11 @@
2.2.0
- changed typecasting of value to atom / array of atoms
- updated livido-utils.c from livido repository
- added -DSRTICT_CHECKING to enable/disable assertions for hash
at compile time
- cleanup vevo.c
- updated vevobench and vevotest
Initial release

229
vevo-mpool/INSTALL Normal file
View File

@@ -0,0 +1,229 @@
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
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 only 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. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. 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.
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=c89 CFLAGS=-O2 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 must use a version of `make' that
supports the `VPATH' variable, such as 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 `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have 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.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' 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.
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 `--target=TYPE' option 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
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--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.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

12
vevo-mpool/Makefile.am Normal file
View File

@@ -0,0 +1,12 @@
# Process with automake to produce Makefile.in
SUBDIRS = src include test examples
bin_SCRIPTS = vevo-config
EXTRA_DIST = \
autogen.sh\
vevo-config.in \
depcomp

648
vevo-mpool/Makefile.in Normal file
View File

@@ -0,0 +1,648 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Process with automake to produce Makefile.in
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/vevo-config.in $(top_srcdir)/configure AUTHORS \
COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \
install-sh ltmain.sh missing mkinstalldirs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = vevo-config
am__installdirs = "$(DESTDIR)$(bindir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
SUBDIRS = src include test examples
bin_SCRIPTS = vevo-config
EXTRA_DIST = \
autogen.sh\
vevo-config.in \
depcomp
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
vevo-config: $(top_builddir)/config.status $(srcdir)/vevo-config.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/.
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(SCRIPTS) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-exec-am: install-binSCRIPTS
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-libtool clean-recursive \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binSCRIPTS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-libtool \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

0
vevo-mpool/NEWS Normal file
View File

41
vevo-mpool/README Normal file
View File

@@ -0,0 +1,41 @@
-----------------------------------
Vevo - VeEjay Video Objects
-----------------------------------
This branch includes a memory pool
Introduction
------------
Vevo package structure
----------------------
src/ : vevo library source
include/ : vevo mediation layer interface definition and livido interface
test : vevo mediation layer test
examples : conformancy host example
plugins : (to be) livido compatible plugins
The files in examples and plugins are taken from
The livido-utils.c was taken from respository http://livido.dyne.org and slightly modified
To get the latest vevo version from the repository , use the command:
$ svn checkout svn://dyne.org/veejay/trunk/vevo-current
The user/development mailinglist is
veejay-libvevo@lists.sourceforge.net
This is not conform livido 100
Differences:
does not implement livido_get_readonly()
does not need passing of size_t at all
implements palettes YUV888,YUVA888 in livido.h
suggests to rename LIVIDO_PROPERTY_READONLY to LIVIDO_PROPERTY_FINAL
mediation layer does not make use of livido memory functions

7081
vevo-mpool/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

148
vevo-mpool/autogen.sh Executable file
View File

@@ -0,0 +1,148 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="libvevo"
ACLOCAL_FLAGS=""
(test -f $srcdir/configure.in \
) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level lavtools directory"
exit 1
}
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to compile pinfo."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile pinfo."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed to compile pinfo."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed to compile pinfo."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake"
DIE=1
NO_AUTOMAKE=yes
}
automakevermin=`(automake --version|head -n 1|sed 's/^.* //;s/\./ /g;';echo "1 5")|sort -n|head -n 1`
if test "x$automakevermin" != "x1 5"; then
# version is less than 1.5, the minimum suitable version
echo
echo "You must have automake version 1.5 or greater installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
DIE=1
fi
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -name configure.in -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
if grep "sed.*POTFILES" configure.in >/dev/null; then
: do nothing -- we still have an old unmodified configure.in
else
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME
else
echo Skipping configure process.
fi

1447
vevo-mpool/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

139
vevo-mpool/config.h.in Normal file
View File

@@ -0,0 +1,139 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <alloca.h> header file. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fenv.h> header file. */
#undef HAVE_FENV_H
/* Define to 1 if you have the `floot' function. */
#undef HAVE_FLOOT
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
/* Define to 1 if you have the <stdbool.h> header file. */
#undef HAVE_STDBOOL_H
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Is __progname defined by system? */
#undef HAVE___PROGNAME
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
#undef volatile

1555
vevo-mpool/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

24573
vevo-mpool/configure vendored Executable file

File diff suppressed because it is too large Load Diff

157
vevo-mpool/configure.in Normal file
View File

@@ -0,0 +1,157 @@
dnl Process this file with autoconf to produce a configure script.
dnl AC_INIT
AC_INIT
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([configure.in])
LIBVEVO_MAJOR_VERSION=2
LIBVEVO_MINOR_VERSION=2
LIBVEVO_MICRO_VERSION=2
LIBVEVO_VERSION=$LIBVEVO_MAJOR_VERSION.$LIBVEVO_MINOR_VERSION.$LIBVEVO_MICRO_VERSION
PACKAGE_VERSION=LIBVEVO_VERSION
AM_INIT_AUTOMAKE( libvevo, $LIBVEVO_VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AM_OUTPUT_DEPENDENCY_COMMANDS
dnl AM_ACLOCAL_INCLUDE(macros)
AC_PROG_CC
AM_PROG_AS
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_GCC_TRADITIONAL
AC_ISC_POSIX
AC_HEADER_STDC
LT_RELEASE=$LIBVEVO_MAJOR_VERSION.$LIBVEVO_MINOR_VERSION
LT_CURRENT=$LIBVEVO_MICRO_VERSION
LT_REVISION=$LIBVEVO_MICRO_VERSION
LT_AGE=$LIBVEVO_MICRO_VERSION
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
dnl **********************************************************************
dnl Options
AC_ARG_ENABLE(assertions,
[ --enable-assertions, Turn on runtime assertion checking.])
AC_ARG_ENABLE(compile-warnings,
[ --enable-compile-warnings, Turn on compiler warnings.])
AC_ARG_ENABLE(warnings_as_errors,
[ --enable-warnings_as_errors, Compiler warnings are errors.])
AC_ARG_ENABLE(memory-pool,
[ --enable-memory-pool, Turn on vevo's memory allocator.])
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
dnl Initialize libtool
AM_PROG_LIBTOOL
AC_CHECK_HEADERS(fenv.h stdint.h inttypes.h sys/types.h stdbool.h getopt.h alloca.h sys/soundcard.h)
dnl sizeof PRId64 etc...
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([floot])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([mkdir])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([sys/time.h])
AC_FUNC_MALLOC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_HEADER_STDC
AC_TYPE_SIZE_T
AC_C_VOLATILE
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
OS_RELEASE=`uname -r`
OS_CPU=`uname -m`
dnl ********************************************************************
dnl Check to see if __progname is provided by the system
dnl ********************************************************************
AC_MSG_CHECKING(for __progname)
AC_CACHE_VAL(ac_cv_extern__progname,
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *__progname;
puts(__progname)]])],[ac_cv_extern___progname=yes],[ac_cv_extern___progname=no]))
if test x$ac_cv_extern___progname = xyes ; then
AC_DEFINE(HAVE___PROGNAME,,[Is __progname defined by system?])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl **********************************************************************
dnl All the conditional stuff for the Makefiles
dnl
CFLAGS="$CFLAGS"
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
warnCFLAGS=
if test "x$enable_compile_warnings" != "xno" ; then
if test "x$GCC" = "xyes" ; then
case "$CFLAGS" in
*-Wall*) ;;
*) warnCFLAGS="-g -Wall -Wunused -std=c99 -pedantic" ;;
esac
if test "x$enable_compile_warnings" = "xyes" ; then
warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual"
fi
if test "x$enable_warnings_as_errors" = "xyes" ; then
warnCFLAGS="$warnCFLAGS -Werror"
fi
fi
fi
if test "x$enable_assertions" != "xno"; then
if test "x$GCC" = "xyes" ; then
case "$CFLAGS" in
*) warnCFLAGS="$warnCFLAGS -DSTRICT_CHECKING";;
esac
fi
fi
if test "x$enable_memory_pool" != "xno"; then
if test "x$GCC" = "xyes" ; then
case "$CFLAGS" in
*) warnCFLAGS="$warnCFLAGS -DVEVO_MEMPOOL";;
esac
fi
fi
AC_MSG_RESULT($warnCFLAGS)
if test "x$cflags_set" != "xyes" ; then
CFLAGS="$CFLAGS $warnCFLAGS"
cflags_set=yes
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
include/Makefile
examples/Makefile
test/Makefile
vevo-config
])
AC_OUTPUT
AC_DEFINE(VERSION, ${VERSION})

479
vevo-mpool/depcomp Executable file
View File

@@ -0,0 +1,479 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# 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.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,557 @@
dyne.org
Search:
Navigation
* Login
* Settings
* Help/Guide
* FAQ
* Accessibility
* About Trac
* Wiki
* Timeline
* Browse Source
* View Tickets
* New Ticket
* Search
Wiki Navigation
* Start Page
* Title Index
* Recent Changes
* Page History
Technical Specification
Livido 1.0 beta version.
(C) Gabriel "Salsaman" Finch, Niels Elburg, Dennis "Jaromil" Rojo, Daniel Fischer, Martin Bayer, Kentaro Fukuchi, Andraz Tori 2005.
LIVIDO_API_VERSION
This is defined as 100 for this version of the specification.
LIVIDO GENERAL DESIGN
Livido is an architecture to enable interchange of video processing plugins between video applications in a standardized and compatible way.
Livido plugin is a shared object that application can load. Inside a plugin there can be implementations of many different filters, each filter implementation is called a filter class. Host gets to know a list of classes a plugin provides when calling livido_setup function. A class description includes descriptions of inputs and outputs filter can handle. Inputs and outputs can be channels and parameters. Descriptions of acceptable types of channels and parameters are called channel templates and parameter templates respectively. Host prepares for instantination of the filter by setting input and output channels and input parameters and then instantinates a filter. Host can use process_func() on that instance until it deinits an instance. All passing of data between hosts and plugins is done trough ports, ports are the only C structures defined in Livido.
PORTS
A port is a set of one or more properties:
Each port has a mandatory property called "type" (see below), depending upon "type" property port has other mandatory and optional properties.
"type" can be one of:
* LIVIDO_PORT_TYPE_PLUGIN_INFO : Information about plugin and list of filter classes it includes
* LIVIDO_PORT_TYPE_FILTER_CLASS : Descriptive information about single filter class
* LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE : Information about what kinds of channels filter accepts
* LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE : Information about what kinds of parameters filter has
* LIVIDO_PORT_TYPE_FILTER_INSTANCE : All data about an instance
* LIVIDO_PORT_TYPE_CHANNEL : Instantination of a channel
* LIVIDO_PORT_TYPE_PARAMETER : Instantination of a parameter
* LIVIDO_PORT_TYPE_GUI : described in the separate livido GUI extension (TODO)
"type" is a single valued property with atom_type LIVIDO_ATOM_TYPE_INT.
The "type" is passed as a parameter in the livido_port_new() function as:
livido_port_t *livido_port_new( int port_type );
This returns a pointer to newly allocated port with the "type" property set to port_type.
Port types >=512 are available for custom use.
PROPERTIES
As mentioned above, each port is a set of one or more properties.
A property has:
* a key (which is a non-NULL string - (const char *) ASCII encoded)
* a value (0 or more elements)
* number of elements (>=0) contained in the value field.
* an atom_type
* a bitmap flags field
PROPERTY RESTRICTIONS
Access to properties is restricted in certain cases, these are restriction flags used troughout this document:
* HOSTSET - Read-only for the plugin
* PLUGINSET - Read-only for the host
* FINAL - Not allowed to change after it was set
* MANDATORY - mandatory property that MUST exist at some point in time
* OPTIONAL - property that COULD exist
Properties inherit restriction of the port where we do not specify otherwise.
ATOM TYPES
LiViDO offers the following fundamental types (number <64):
* LIVIDO_ATOM_TYPE_INT : signed int32_t
* LIVIDO_ATOM_TYPE_DOUBLE : corresponds to C type "double"
* LIVIDO_ATOM_TYPE_BOOLEAN : signed int32_t, constrained to take values 0 (FALSE) or 1 (TRUE)
* LIVIDO_ATOM_TYPE_STRING : array of char
Note: STRINGS are all utf-8 encoded in Livido, except property Keys, which are ASCII encoded.
Pointer types (number>=64 and <512):
* LIVIDO_ATOM_TYPE_VOIDPTR : corresponds to C void * type
* LIVIDO_ATOM_TYPE_PORTPTR : livido_port_t * : a void * to a livido_property_t, currently used only for channel properties "same_as_size", "same_as_palette")
Types >=512 are available for custom use.
PORT TYPE PLUGIN INFO
Port enables a plugin function livido_setup to tell the host what filter classes are available. Port is PLUGINSET and FINAL after livido_setup() finishes.
* "type" == LIVIDO_PORT_TYPE_PLUGIN_INFO
Mandatory properties:
* "filters" : LIVIDO_ATOM_TYPE_PORTPTR : atom or array of livido_filter_t,
* "maintainer" : LIVIDO_ATOM_TYPE_STRING : maintainer of plugin package
* "version" : LIVIDO_ATOM_TYPE_STRING : plugin package version
* "api_version" : LIVIDO_ATOM_TYPE_INT : livido api version: MUST be set to the LIVIDO_API_VERSION as defined above in this spec
Optional properties:
* "url" : LIVIDO_ATOM_TYPE_STRING : URL of plugin package
PORT TYPE FILTER CLASS
Port type filter class is used to describe all properties of a single filter class. Port is PLUGINSET and FINAL after livido_setup().
"type" == LIVIDO_PORT_TYPE_FILTER_CLASS
Mandatory properties:
* "name" : LIVIDO_ATOM_TYPE_STRING : the filter name; must be unique in the plugin,
* "author" : LIVIDO_ATOM_TYPE_STRING : the filter author(s)
* "description" : LIVIDO_ATOM_TYPE_STRING : filter description
* "version" : LIVIDO_ATOM_TYPE_INT : filter version
* "license" : LIVIDO_ATOM_TYPE_STRING : license of filter
* "flags" : LIVIDO_ATOM_TYPE_INT : bitmap of filter flags
* "init_func" : LIVIDO_ATOM_TYPE_VOIDPTR : pointer to a init_func()
* "process_func" : LIVIDO_ATOM_TYPE_VOIDPTR : pointer to a process_func()
* "deinit_func" : LIVIDO_ATOM_TYPE_VOIDPTR : pointer to a deinit_func()
* "in_channel_templates" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements: input ports of input channel templates, type of the referenced port MUST be LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE
* "out_channel_templates" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of output channel templates, type of the referenced port MUST be LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE
* "in_parameter_templates" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of input parameter templates, type of the referenced port MUST be LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE
* "out_parameter_templates" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of output parameter templates, type of the referenced port MUST be LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE
Optional properties:
* "url" : LIVIDO_ATOM_TYPE_STRING
PORT TYPE FILTER INSTANCE
Port type filter instance is used to hold all data that are related to a single instance of the filter all properties of a single filter class. Port is HOSTSET after livido_setup.
"type" == LIVIDO_PORT_TYPE_FILTER_INSTANCE
Mandatory properties:
* "filter_class" : LIVIDO_ATOM_TYPE_PORTPTR : Pointer to a filter class port this filter instance is based on
* "in_channels" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of input channels, type of the referenced port MUST be LIVIDO_PORT_TYPE_CHANNEL
* "out_channels" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of output channels , type of the referenced port MUST be LIVIDO_PORT_TYPE_CHANNEL
* "in_parameters" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of input parameters, type of the referenced port MUST be LIVIDO_PORT_TYPE_PARAMETER
* "out_parameters" : LIVIDO_ATOM_TYPE_PORTPTR, list of 0 or more elements : ports of output parameters, type of the referenced port MUST be LIVIDO_PORT_TYPE_PARAMETER
Optional properties:
* Every filter instance can have its internal properties stored inside this port, and host MUST ignore them. Those internal properties MUST have keys prefixed with "PLUGIN_"
* Every host can have its internal properties stored inside this port, and filter MUST ignore them. Those internal properties MUST have keys prefixed with "HOST_"
PORT TYPE CHANNEL TEMPLATE
Port type channel template is used as a description of a single channel (input or output) a filter can handle. Port is PLUGINSET and FINAL after livido_setup.
* "type" == LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE
Mandatory properties:
* "name" : LIVIDO_ATOM_TYPE_STRING : name of the channel, MUST be unique across all channels in the filter class
* "flags" : LIVIDO_ATOM_TYPE_INT : bitmap of channel_flags that plugin sets
* "palette_list" : LIVIDO_ATOM_TYPE_INT : the plugin sets this to an array of allowed palettes for the channel. Its order is plugin's preference for a palette
Optional properties:
* "description" : LIVIDO_ATOM_TYPE_STRING : description of this channel
* "width" : LIVIDO_ATOM_TYPE_INT : If set, frame width in pixels that a plugin can handle. If it is set, host is forbidden to set the width in channel instance to anything else
* "height" : LIVIDO_ATOM_TYPE_INT : If set, frame height in pixels that a plugin can handle. If it is set, host is forbidden to set the height in channel instance to anything else
* "same_as_size" : LIVIDO_ATOM_TYPE_PORTPTR : plugin can set this to indicate that this channel must match "height" and "width" with another channel. The pointer points to another in/out channel template
* "same_as_palette" : LIVIDO_ATOM_TYPE_PORTPTR : plugin can set this to indicate that this channel must match "current_palette" with another channel. The pointer points to another in/out channel template
* "optional" : LIVIDO_ATOM_TYPE_BOOLEAN : the plugin may set this to TRUE for channels that can be left out at initialization time.
Restrictions to properties
Each channel template can only reference another through *_same_as or be referenced by another, not both.
There can be only backward references in the array. For example channel 2 can have *_same_as to channel 1, but not the other way around.
Output channels can, however, reference input channels at will
PORT TYPE CHANNEL
Port type channel is used as a fixation of channel properties that the host sets and plugin reads to know what it is getting. Port is HOSTSET after init_func(). Channels should be a one-one match with channel templates (same order, same number).
* "type" == LIVIDO_PORT_TYPE_CHANNEL
Mandatory properties:
* "parent_template" : LIVIDO_ATOM_TYPE_PORT : Pointer to a channel template port this channel instance is based on. FINAL.
* "timecode" : LIVIDO_ATOM_TYPE_DOUBLE : time in seconds for this channel, host can choose what exactly it represents
* "width" : LIVIDO_ATOM_TYPE_INT : The chosen frame width in pixels
* "height" : LIVIDO_ATOM_TYPE_INT : The chosen height in pixels
* "current_palette" : LIVIDO_ATOM_TYPE_INT: The chosen palette, which must be one of the palettes contained in "palette_list" of a channel template
* "pixel_data" : LIVIDO_ATOM_TYPE_VOIDPTR : array of size 4 of pointers to the image pixels data. depending on the value of "current_palette", only the first pointer is used for packed modes and in planar modes each plane has its own pointer.
* "rowstrides" : LIVIDO_ATOM_TYPE_INT : array of size 4 carrying the row width of EACH PLANE in bytes (include padding)
Optional properties:
* "fps" : LIVIDO_ATOM_TYPE_DOUBLE : fps of channel;
* "pixel_aspect_ratio" : LIVIDO_ATOM_TYPE_DOUBLE : physical aspect ratio of the pixel of the image (pixel aspect ratio different than 1.0 means pixels are non-square)
* "v_shift" : LIVIDO_ATOM_TYPE_INT : vertical shift in the pixels of the sampling of crominance planes for planar yuv palletes
* "h_shift" : LIVIDO_ATOM_TYPE_INT : horizontal shift in the pixels of the sampling of crominance planes for planar yuv palletes
* "YUV_sampling" : LIVIDO_ATOM_TYPE_INT : Sampling type for YUV palettes, enum defined below
* "interlacing" : LIVIDO_ATOM_TYPE_INT : Interlacing type, defined below. if not present, the image must be NON INTERLACED
* "disabled" : LIVIDO_ATOM_TYPE_BOOLEAN : the host MAY set this to TRUE before calling init_func() if the coresponding channel template has optional property set to true
PORT TYPE PARAMETER TEMPLATE
Port type parameter template is used as a description of a single parameter (input or output) filter can handle. Port is PLUGINSET and FINAL after livido_setup.
Mandatory properties:
* "name" : LIVIDO_ATOM_TYPE_STRING : name of the parameter, MUST be unique across the in_parameter_templates/out_parameter_templates
* "default" : any of the fundamental atom type : sane default value of the parameter
* "kind" : LIVIDO_ATOM_TYPE_STRING : Tells the host the _minimal_ needed information to be able to present a parameter. Depending of the value of "kind", there are additional properties that are mandatory or optional. The rules for additional properties are spelled out below.
Optional properties:
* "flags" : LIVIDO_ATOM_TYPE_INT : Plugin sets this to LIVIDO_PARAMETER_CHANGE_UNADVISED if a change in the "value" of instance of the parameter causes some kind of internal reinit of the plugin (realtime hosts can use this to be able to avoid slow behaviour of he plugins).
* "description" : LIVIDO_ATOM_TYPE_STRING : parameter description, FINAL
PARAMETER CONSTRAINING
Parameter constraining in Livido is minimalistic, all GUI related stuff is to be defined in separate document. Parameter constraining is derived from additional properties defined for parameter template that depend on the value of the property "kind".
The kind is a mandatory property of every parameter, the defined values are:
* "INDEX" (discrete)
* "NUMBER" (continuous)
* "TEXT" (utf-8)
* "SWITCH" (boolean)
* "COLOR_RGBA"
* "COORDINATE"
Depending on the "kind" parameter atom type and mandatory additional properties MUST BE:
* "INDEX"
Kind index means a discret number, which can be used for index choosing or passing integer values. It is constrained by min and max: min <= value <= max The default property can only be of atom type LIVIDO_ATOM_TYPE_INT. Additional properties that kind causes:
* min : LIVIDO_ATOM_TYPE_INT : minimal value of the parameter, MANDATORY
* max : LIVIDO_ATOM_TYPE_INT : maximal value of the parameter, MANDATORY
* wrap : LIVIDO_ATOM_TYPE_BOOLEAN : indicates that the "value" should wrap when going below min or above max, OPTIONAL
* "NUMBER"
Kind index means a continuous number, which can be used for index choosing or passing integer values. It is constrained by min and max: min <= value <= max The default property can only be of atom type LIVIDO_ATOM_TYPE_DOUBLE. Additional properties that kind causes:
* min : LIVIDO_ATOM_TYPE_DOUBLE : minimal value of the parameter, MANDATORY for in parameters, OPTIONAL for out parameters.
* max : LIVIDO_ATOM_TYPE_DOUBLE : maximal value of the parameter, MANDATORY for in parameters, OPTIONAL for out parameters.
* wrap : LIVIDO_ATOM_TYPE_BOOLEAN : indicates that the "value" should wraped when going below min or above max, OPTIONAL
* transition : LIVIDO_ATOM_TYPE_BOOLEAN : Indicates that this parameter is transition, OPTIONAL
* "TEXT"
Kind text means a string, which can be used for passing strings. The default property can only be of atom type LIVIDO_ATOM_TYPE_STRING.
* "SWITCH"
Kind switch can be used for passing yes/no choices. The default property can only be of atom type LIVIDO_ATOM_TYPE_BOOLEAN.
* "COLOR_RGBA"
Kind color can be used for passing colors. Colors are represented as a list of 3 or 4 elements of type LIVIDO_ATOM_TYPE_DOUBLE. Depending on the default value, host knows if it has to pass 3 or 4 elements in the list to filter. Values of elements consecutively are red, green, blue and alpha, values are generally between 0.0 and 1.0.ccc Additional properties that kind causes:
* min : LIVIDO_ATOM_TYPE_DOUBLE array of N elements: minimal value of the parameter, MANDATORY
* max : LIVIDO_ATOM_TYPE_DOUBLE array of N elements: maximal value of the parameter, MANDATORY
* "COORDINATE"
Kind coordinate can be used for passing 2d normalized cartesian coordinats. Coordinates are represented as a list of 2 elements of type LIVIDO_ATOM_TYPE_DOUBLE. First value in a list presents an x coordinate and second one y in cartesian coordinates, coordinates inside the picture they relate to are considered to be between 0.0 and 1.0 The default property can only be of atom type LIVIDO_ATOM_TYPE_DOUBLE and an array of 2 elements. Additional properties that kind causes:
* min : LIVIDO_ATOM_TYPE_DOUBLE array of 2 elements: minimal value of the parameter, MANDATORY
* max : LIVIDO_ATOM_TYPE_DOUBLE array of 2 elements: maximal value of the parameter, MANDATORY
PORT TYPE PARAMETER
Port type parameter is used for passing a single (input or output) . Input parameters are HOSTSET and output parameters are PLUGINSET. Parameters should be a one-one match with channel templates (same order, same number).
Mandatory properties:
* "parent_template" : LIVIDO_ATOM_TYPE_PORT : Pointer to a parameter template port this parameter instance is based on
* "value" : type of the value MUST match the type of default property of the parent_template
GETTING/SETTING PROPERTY VALUES
On livido_property_set(), the host/plugin programmer does not need to worry about allocating and freeing memory for the data to store. The model (or more precisely the Mediation layer) will take care of that for you. If you store an object the model will make a copy and store that. Later, when you set a new value in this property, the model will automatically livido_free() the old value and make a copy of the new value and store the copy.
The exception to this is any atom type of type PTR. If you allocate a chunk of data or a complex structure only the pointer value is stored (!). The model does not know anything about the content of the data your pointer refers to so it will not make a copy. Instead, you need to allocate and free the memory yourself in this case.
The plugin and host programmer can both retrieve and set values by Key.
On livido_property_get(), Livido will copy the data stored in the property, except for pointer types. For pointer types only the reference to the memory block is copied. The programmer should first allocate a memory area for livido_property_get() to copy to.
For setting pointer types, host/plugin must pass in a size_t array with the atom sizes.
LIVIDO CORE FUNCTIONS
All host implementations must implement and offer the following core functions. The functions reside inside a host and plugin dynamically links to them upon loading.
* livido_port_t *livido_port_new (int port_type)
* void livido_port_free (livido_port_t *port) // only used by host
* char **livido_list_properties (livido_port_t *port) // returns NULL terminated char * array of properties
* int livido_property_set (livido_port_t *port, const char *key, int atom_type, int num_elems, void *value, size_t *sizes) // returns a livido error
* int livido_property_get (livido_port_t *port, const char *key, int idx, void *value) // returns a livido error
* int livido_property_num_elements (livido_port_t *port, const char *key)
* size_t livido_property_element_size (livido_port_t *port, const char *key, int idx)
* int livido_property_atom_type(livido_port_t *port, const char *key)
* void *livido_malloc_f (size_t size)
* void livido_free_f (void *ptr)
* void *livido_memset_f (void *s, int c, size_t n)
* void *livido_memcpy_f (void *dest, const void *src, size_t n)
Notes:
livido_port_new() will set the "type" property to port_type, and will set it readonly.
livido_property_set() will create the property if the property does not exist.
livido_property_set() will return LIVIDO_ERROR_PROPERTY_READONLY if the property has the flag bit LIVIDO_PROPERTY_READONLY set.
livido_property_set() will return an error LIVIDO_ERROR_WRONG_ATOM_TYPE if you try to change the atom_type of a property.
For livido_property_set(), num_elems can be 0 and value can then be NULL. In this way, just the atom_type of the property can be set.
The sizes field of livido_property_set() is only used for pointer type values. It should be an array of size num_elems. For fundamental types, the sizes field should be set to NULL.
livido_property_get() will return LIVIDO_ERROR_NOSUCH_PROPERTY if a property does not exist. In this way the existence of a property can be determined. To assist with this, livido_property_get() can be called with a NULL void * value. The function will then not attempt to copy the value, but will return either LIVIDO_ERROR_NOSUCH_PROPERTY, or LIVIDO_NO_ERROR depending on whether the property exists or not.
The return values of livido_property_num_elements(), livido_property_element_size(), livido_property_atom_type(), and livido_property_get_readonly() are all undefined if the property does not exist.
The void * for livido_property_set() and livido_property_get() is a (void *) typecast to/from an array of the appropriate type: e.g. for LIVIDO_ATOM_TYPE_INT it is an int *. The number of elements in the array must match num_elems in livido_property_set().
Functions livido_malloc_f(), livido_free_f(), livido_memset_f(), livido_memcpy_f() have exactly the same semantics as malloc, free(), memset() and memcpy() from libc. Their purpose is to allow a host to provide a plugin with the application-specific memory managment. Plugins MUST NOT use malloc, free and memset, but have to use livido counterparts.
PLUGIN FUNCTIONS
The only symbol plugin MUST export is livido_setup() function pointer, all other information is passed through respective ports (classes, functions, etc...)
livido_setup
livido_port_t *livido_setup(void);
This function returns a PLUGIN INFO port that specifies what is the content of this plugin - which filter classes it has, who is the maintainer, etc.
Plugin implements livido_setup() in following way: the PLUGIN INFO port is first created by using livido_port_new(). The individual filters are then created and added to the property "filters" in the PLUGIN INFO port. If no filters can be created (because of memory or other problems), the function should return NULL.
The returned port MUST have type LIVIDO_PORT_TYPE_PLUGIN_INFO.
init_func
int init_func(livido_port_t *)
The port MUST have type LIVIDO_PORT_TYPE_FILTER_INSTANCE
The host calls this and passes in the desired filter. The filter port instance passed to the init_func MUST have been correctly setup to match the filter class it relats to, this means that all the mandatory properties of input and output channels and of input parameters MUST be set. The function returns a livido error code (see below).
The init_func() function allows the plugin to create any internal memory structures it needs; plugin store internal data as properties that have keys prefixed with "PLUGIN_" (see the definition of filter intance port)
process_func
int process_func(livido_port_t *, double timestamp)
The port MUST have type LIVIDO_PORT_TYPE_FILTER_INSTANCE
host calls this for each processing cycle; the plugin can do its frame processing here. The function returns a livido error code (see below). Timestamp is the presentation time in seconds (can be e.g. time since playback start). The function returns a livido error code (see below).
deinit_func
int deinit_func(livido_port_t *)
The port MUST have type LIVIDO_PORT_TYPE_FILTER_INSTANCE
host calls this to allow the plugin to free() any internal memory. Following this the host may free() the instance's port. The plugin does not need to free any ports or parameters, the host should take care of this.c
OUTLINE LIVIDO PROCESS FLOW OVERVIEW
* Host loads plugin (dlopen)
* Host calls the livido_setup() function.
* in livido_setup(), for each filter class, the plugin creates and initializes the port of a type LIVIDO_PORT_TYPE_FILTER_CLASS and adds it to the filter_list property of the returned port.
* Host creates a FILTER_INSTANCE: Host examines the in_channel and out_channel ports, and sets the "disabled" flag for any optional channels it does not wish to use. It also checks "palette_list", selects a palette it would like to start using on that channel and sets the chosen value in the "current_palette" property. It also sets the sizes ("width" and "height" properties) if the plugin left them as zero. All input parameters have to have values set at this point. This means host now has a port that it will instantiate.
* Host calls init_func() from the filter info port, passing a pointer to a FILTER_INSTANCE it would like to instantiate.
* Plugin now knows the channel sizes, palettes and which channels are in use. The plugin may now livido_malloc() internal data.
* Host may now change parameter values (respecting "max" and "min" properties) and it after that it may call process_func() in the plugin, passing in the initialised FILTER_INSTANCE.
* When the host has finished with the FILTER_INSTANCE, or if it needs to re-initialise it, the host must call deinit_func() in the plugin, passing in a pointer to the FILTER_INSTANCE. The plugin MUST now livido_free() any internally allocated data.
* Host can now livido_port_free() the FILTER_INSTANCE, or it can adjust the non-final properties of the ports used and reuse the FILTER_INSTANCE by calling init_func() once more.
LIVIDO FLAGS AND TYPES
Livido palette types
Palettes are all unsigned in LiViDO.
Some palettes have aliases; these are shown on the same line.
RGB Palettes Palette numbers >0 and <512
LIVIDO_PALETTE_RGB888 LIVIDO_PALETTE_RGB24
LIVIDO_PALETTE_BGR888 LIVIDO_PALETTE_BGR24
LIVIDO_PALETTE_RGBA8888 LIVIDO_PALETTE_RGBA32
LIVIDO_PALETTE_ARGB8888 LIVIDO_PALETTE_ARGB32
LIVIDO_PALETTE_RGBFLOAT
LIVIDO_PALETTE_RGBAFLOAT
LIVIDO_PALETTE_RGB565
YUV Palettes Palette numbers >=512 and <1024
Ranges are 16-235 for Y, 16 - 240 for U and V.
LIVIDO_PALETTE_YUV422P LIVIDO_PALETTE_YV16
[Official name 'YV16', 8 bit Y plane followed by 8
bit 2x1 subsampled V and U planes. Planar.]
LIVIDO_PALETTE_YUV420P LIVIDO_PALETTE_YV12
[8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes. Planar
(Official name YV12)]
LIVIDO_PALETTE_YVU420P LIVIDO_PALETTE_I420
[Same as YUV420P , but U and V are swapped. Planar.]
LIVIDO_PALETTE_YUV444P
[Unofficial , 8 bit Y plane followed by 8 bit U and V planes, no
subsampling. Planar.]
LIVIDO_PALETTE_YUVA4444P LIVIDO_PALETTE_YUV4444P
[Unofficial, like YUV444P but with Alpha. Planar.]
LIVIDO_PALETTE_YUYV8888
[Like YUV 4:2:2 but with different component ordering within the
u_int32 macropixel. Packed.]
LIVIDO_PALETTE_UYVY8888
[YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second
pixel horizontally on each line). A macropixel contains 2 pixels in 1
u_int32. Packed.]
LIVIDO_PALETTE_YUV411
[IEEE 1394 Digital Camera 1.04 spec. Is packed YUV format
with a 6 pixel macroblock structure containing 4 pixels.
Ordering is U2 Y0 Y1 V2 Y2 Y3. Uses same bandwith as YUV420P
Only used for SMPTE DV NTSC.]
Alpha Palettes Palette numbers >=1024 and <2048
Alpha palettes have two uses: 1) for masks, 2) to split colour inputs into single colour channels, or to combine single colour channels into a combined channel. The order of colour channels is the same as the order in the combined channel. For example if an input in RGB24 palette is split into 3 non-mask alpha channels, then the alpha channels will be in the order: Red, Green, Blue. A single non-mask alpha channel would represent the luminance.
LIVIDO_PALETTE_A1
LIVIDO_PALETTE_A8
LIVIDO_PALETTE_AFLOAT
Palette numbers >=2048 are available for custom palettes.
Filter flags
* LIVIDO_FILTER_NON_REALTIME
non-realtime filter property: the filter is too slow to use in realtime processing.
* LIVIDO_FILTER_CAN_DO_INPLACE
If this property is set, the filter can do inplace operations. Hosts can select this mode by setting "pixel_data" for the first out_channel to NULL. Plugin will then return the output in "pixel_data" of the first in_channel. This can save a memcpy() in the host.
* LIVIDO_FILTER_STATELESS
plugin is stateless ; it has no information about what occurred previously. I.e. it has no internal state data.
* LIVIDO_FILTER_IS_CONVERTER
This flag bit should be set if the plugin does not alter the image pixels except for resizing or palette conversion between in channel and out channel(s). It should only be set for the following types of plugins: plugins which only resize the in frame to out frame(s); plugins which only convert the palette from in frame to out frame(s), plugins which simply duplicate the in frame to out frame(s). It is used to assist with categorisation of the plugin type.
Flag bits >=30 are available for custom flags.
Channel flags
* LIVIDO_CHANNEL_CHANGE_UNADVISED
plugin MAY use this flag to tell the host, that changing of channel size causes possibly unwanted behaviour of the filter. Unwanted behaviour can for example be reseting the accumulated values which causes the visual result of filter to change in unexpected way or maybe the next call to process function will take disproportional amount of time due to reinitialization. Host is safe to ignore the flag and plugin MUST still be useful, though functionality may suffer.
* LIVIDO_CHANNEL_PALETTE_UNADVISED
plugin MAY use this flag to tell the host, that changing of channel palette causes possibly unwanted behaviour of the filter. Unwanted behaviour can for example be reseting the accumulated values which causes the visual result of filter to change in unexpected way or maybe the next call to process function will take disproportional amount of time due to reinitialization. Host is safe to ignore the flag and plugin MUST still be useful, though functionality may suffer.
Flag bits >=30 are available for custom flags.
Parameter flags
* LIVIDO_PARAMETER_CHANGE_UNADIVSED
plugin MAY use this flag to tell the host, that changing of this parameter causes possibly unwanted behaviour of the filter. Unwanted behaviour can for example be reseting the accumulated values which causes the visual result of filter to change in unexpected way or maybe the next call to process function will take disproportional amount of time due to reinitialization. Host is safe to ignore the flag and plugin MUST still be useful, though functionality may suffer.
Flag bits >=30 are available for custom flags.
Property flags
* LIVIDO_PROPERTY_READONLY
Flag bits >=30 are available for custom flags.
YUV sampling types
* LIVIDO_YUV_SAMPLING_NONE : No subsampling (always YUV 4:4:4)
* LIVIDO_YUV_SAMPLING_SMPTE : Chroma is sampled at half the horizontal frequency and is aligned horizontally with luma samples (YUV 4:2:2)
* LIVIDO_YUV_SAMPLING_JPEG : Chroma is sampled at half the horizontal and half the vertical frequency. (YUV 4:2:0). Chroma samples are centered between luma samples.
* LIVIDO_YUV_SAMPLING_MPEG2 : Same as JPEG, but Chroma samples are horizontally aligned and vertically centered between luma samples. There is notion of fields. (YUV 4:2:0)
* LIVIDO_YUV_SAMPLING_DVPAL : Subsampling per field, Chroma samples are located above luma samples, but CB and CR samples are located on alternate lines (YUV 4:2:0)
* LIVIDO_YUV_SAMPLING_DVNTSC : Chroma is sampled at 1/4 the horizontal frequency as luma but at full vertical frequency. The chroma samples are horizontally aligned with luma samples. (YUV 4:1:1)
Sampling types >=1024 are available for custom samplings.
Interlace types
* LIVIDO_INTERLACE_NONE
* LIVIDO_INTERLACE_TOPFIRST
* LIVIDO_INTERLACE_BOTTOMFIRST
* LIVIDO_INTERLACE_PROGRESSIVE
Interlace types >=1024 are available for custom interlacing.
Livido errors
* LIVIDO_NO_ERROR
return code means no problem
* LIVIDO_ERROR_MEMORY_ALLOCATION
memory allocation by the filter has failed
* LIVIDO_ERROR_PROPERTY_READONLY
plugin/host tried to set readonly property; returned from livido_property_set()
* LIVIDO_ERROR_NOSUCH_ELEMENT
plugin/host tried to read value of an invalid element number in a property; returned from livido_property_get()
* LIVIDO_ERROR_NOSUCH_PROPERTY
property does not exist for the specified port; returned from livido_property_get()
* LIVIDO_ERROR_WRONG_ATOM_TYPE
once the atom_type of a property is set, you cannot change it. livido_property_set() will return this error if you attempt such a thing, and the value of the property will not be amended.
* LIVIDO_ERROR_TOO_MANY_INSTANCES
can't create: plugin allows only limited number of filter instances, returned from init_func()
* LIVIDO_ERROR_HARDWARE
there was an error initialising hardware for the filter; returned from init_func()
Error numbers >=1024 are available for custom errors.
Download in other formats:
* Plain Text
Trac Powered
Powered by Trac 0.8.4
By Edgewall Software.
Copyleft (C) 2000 - 2004 dyne.org productions and respective authors
Verbatim copying and distribution of this entire page is permitted in any medium, provided this notice is preserved.

View File

@@ -0,0 +1,15 @@
INCLUDES = -I$(top_srcdir)/include \
-I$(top_srcdir) -I$(includedir) \
-DG_LOG_DOMAIN=\"libvido\" -DLIBVIDO_VERSION=\"$(VERSION)\"
LIBVEVO = $(top_builddir)/src/libvevo.la
# *********************************************************************
# The tools themselves
EXAMPLES_BIN = hosttest
bin_PROGRAMS = $(EXAMPLES_BIN)
hosttest_SOURCES = testhost.c
hosttest_LDADD = -lvevo -ldl
hosttest_LDFLAGS = -export-dynamic

View File

@@ -0,0 +1,470 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SOURCES = $(hosttest_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = $(am__EXEEXT_1)
subdir = examples
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__EXEEXT_1 = hosttest$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_hosttest_OBJECTS = testhost.$(OBJEXT)
hosttest_OBJECTS = $(am_hosttest_OBJECTS)
hosttest_DEPENDENCIES =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(hosttest_SOURCES)
DIST_SOURCES = $(hosttest_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
INCLUDES = -I$(top_srcdir)/include \
-I$(top_srcdir) -I$(includedir) \
-DG_LOG_DOMAIN=\"libvido\" -DLIBVIDO_VERSION=\"$(VERSION)\"
LIBVEVO = $(top_builddir)/src/libvevo.la
# *********************************************************************
# The tools themselves
EXAMPLES_BIN = hosttest
hosttest_SOURCES = testhost.c
hosttest_LDADD = -lvevo -ldl
hosttest_LDFLAGS = -export-dynamic
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
hosttest$(EXEEXT): $(hosttest_OBJECTS) $(hosttest_DEPENDENCIES)
@rm -f hosttest$(EXEEXT)
$(LINK) $(hosttest_LDFLAGS) $(hosttest_OBJECTS) $(hosttest_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhost.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -0,0 +1,56 @@
#include <stdio.h>
#include "../include/vevo.h"
#include "../include/livido.h"
int main(int argc, char *argv[])
{
char *str = "123412341234123412341asdfasdfasdf";
char *bogus = (char*) malloc( 100);
int t1,t2;
int a,b;
double c,d;
int e,f;
livido_port_t *port = livido_port_new( 0 );
if( livido_property_get( port, "type", 0, NULL ) == 0 )
{
if( livido_property_atom_type(port, "type" ) != LIVIDO_ATOM_TYPE_INT )
printf("Not a livido plugin\n");
}
t1 = livido_property_set( port, "test", LIVIDO_ATOM_TYPE_STRING, 1, &str );
t2 = livido_property_get( port, "test", 0, &bogus );
a = 100;
b = 0;
t1 = livido_property_set( port, "testo", LIVIDO_ATOM_TYPE_INT, 1, &a );
t2 = livido_property_get( port, "testo", 0, &b );
c = 100.123;
d = 0;
t1 = livido_property_set( port, "testd", LIVIDO_ATOM_TYPE_DOUBLE, 1, &c );
t2 = livido_property_get( port, "testd", 0, &d );
c= 99.872;
t1 = livido_property_set( port, "testd", LIVIDO_ATOM_TYPE_DOUBLE, 1, &c );
t2 = livido_property_get( port, "testd", 0, &d );
e = 100;
f = 0;
t1 = livido_property_set( port, "testb", LIVIDO_ATOM_TYPE_BOOLEAN, 1, &e );
t2 = livido_property_get( port, "testb", 0, &f );
uint8_t *uu = (uint8_t*) malloc(sizeof(uint8_t) * 10);
uint8_t *dst = NULL;
livido_property_set( port, "ptr", LIVIDO_ATOM_TYPE_VOIDPTR, 1, &uu );
livido_property_get( port, "ptr", 0, &dst );
printf("Values %s, %d, %g, %d, %p=%p\n", bogus,a,c ,f,uu,dst);
livido_port_free( port );
free(bogus);
free( uu );
return 0;
}

View File

@@ -0,0 +1,433 @@
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../include/vevo.h"
#include "../include/livido.h"
#include "../src/livido-utils.c"
int verbose = 1;
int errorcount = 0;
int warningcount = 0;
typedef int (deepcheck_f)(livido_port_t *, char *);
typedef struct {
int ver; // -1 - end sentinel, 1 for specification 100
int sets; // 1 - host, 2 - plugin, 3 - both
int mand; // 0 - optional, 1 - mandatory
char *name; // name of the property
int atomtype; // atom type of the property, -1 - don't check - should be checked by func()
int minc; // minimum number of elements, -1 - no limit
int maxc; // maximum number of elements, -1 - no limit
deepcheck_f *func; // deep check function to be called
} property_desc_t;
deepcheck_f deep_plugininfo_filters;
deepcheck_f deep_channel_templates;
deepcheck_f deep_parameter_templates;
deepcheck_f deep_filter_api_version;
int test_port (livido_port_t *port, property_desc_t *properties, int porttype, char *portdesc);
#define DESC_END {-1, 0, 0, "", 0, 0, 0 , NULL}
property_desc_t port_plugininfo_desc[] = {
{1, 2, 1, "type", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "filters", LIVIDO_ATOM_TYPE_PORTPTR, 1, -1 , &deep_plugininfo_filters},
{1, 2, 1, "maintainer", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "version", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 0, "url", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
DESC_END
};
property_desc_t port_filterclass_desc[] = {
{1, 2, 1, "type", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "name", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "description", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "version", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "api_version", LIVIDO_ATOM_TYPE_INT, 1, 1 , &deep_filter_api_version},
{1, 2, 1, "license", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "flags", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "init_func", LIVIDO_ATOM_TYPE_VOIDPTR, 1, 1 , NULL},
{1, 2, 1, "process_func", LIVIDO_ATOM_TYPE_VOIDPTR, 1, 1 , NULL},
{1, 2, 1, "deinit_func", LIVIDO_ATOM_TYPE_VOIDPTR, 1, 1 , NULL},
{1, 2, 1, "in_channel_templates", LIVIDO_ATOM_TYPE_PORTPTR, 0, -1 , &deep_channel_templates},
{1, 2, 1, "out_channel_templates", LIVIDO_ATOM_TYPE_PORTPTR, 0, -1 , &deep_channel_templates},
{1, 2, 1, "in_parameter_templates", LIVIDO_ATOM_TYPE_PORTPTR, 0, -1 , &deep_parameter_templates},
{1, 2, 1, "out_parameter_templates", LIVIDO_ATOM_TYPE_PORTPTR, 0, -1 , &deep_parameter_templates},
{1, 2, 0, "url", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
DESC_END
};
property_desc_t port_chantemplate_desc[] = {
{1, 2, 1, "type", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "name", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "flags", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "palette_list", LIVIDO_ATOM_TYPE_INT, 1, -1 , NULL},
{1, 2, 0, "description", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 0, "width", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 0, "height", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 0, "same_as_size", LIVIDO_ATOM_TYPE_PORTPTR, 1, 1 , NULL},
{1, 2, 0, "same_as_palette", LIVIDO_ATOM_TYPE_PORTPTR, 1, 1 , NULL},
{1, 2, 0, "optional", LIVIDO_ATOM_TYPE_BOOLEAN, 1, 1 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_desc[] = {
{1, 2, 1, "type", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "name", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "kind", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
{1, 2, 1, "flags", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 0, "description", LIVIDO_ATOM_TYPE_STRING, 1, 1 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_number_desc[] = {
{1, 2, 1, "default", LIVIDO_ATOM_TYPE_DOUBLE, 1, 1 , NULL},
{1, 2, 1, "min", LIVIDO_ATOM_TYPE_DOUBLE, 1, 1 , NULL},
{1, 2, 1, "max", LIVIDO_ATOM_TYPE_DOUBLE, 1, 1 , NULL},
{1, 2, 0, "wrap", LIVIDO_ATOM_TYPE_BOOLEAN, 1, 1 , NULL},
{1, 2, 0, "transition", LIVIDO_ATOM_TYPE_BOOLEAN, 1, 1 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_index_desc[] = {
{1, 2, 1, "default", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "min", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 1, "max", LIVIDO_ATOM_TYPE_INT, 1, 1 , NULL},
{1, 2, 0, "wrap", LIVIDO_ATOM_TYPE_BOOLEAN, 1, 1 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_text_desc[] = {
{1, 2, 1, "default", LIVIDO_ATOM_TYPE_STRING,1, 1 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_switch_desc[] = {
{1, 2, 1, "default", LIVIDO_ATOM_TYPE_BOOLEAN,1, 1 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_colorrgba_desc[] = {
{1, 2, 1, "default", LIVIDO_ATOM_TYPE_DOUBLE,3, 4 , NULL},
{1, 2, 1, "min", LIVIDO_ATOM_TYPE_DOUBLE,3, 4 , NULL},
{1, 2, 1, "max", LIVIDO_ATOM_TYPE_DOUBLE,3, 4 , NULL},
DESC_END
};
property_desc_t port_paramtemplate_coordinate_desc[] = {
{1, 2, 1, "default", LIVIDO_ATOM_TYPE_DOUBLE,2, 2 , NULL},
{1, 2, 1, "min", LIVIDO_ATOM_TYPE_DOUBLE,2, 2 , NULL},
{1, 2, 1, "max", LIVIDO_ATOM_TYPE_DOUBLE,2, 2 , NULL},
DESC_END
};
typedef struct {
char *name;
property_desc_t *property_desc;
} kind_parameter_desc_t;
kind_parameter_desc_t kind_descs[] = {
{"INDEX", port_paramtemplate_index_desc},
{"NUMBER", port_paramtemplate_number_desc},
{"TEXT", port_paramtemplate_text_desc},
{"SWITCH", port_paramtemplate_switch_desc},
{"COLOR_RGBA", port_paramtemplate_colorrgba_desc},
{"COORDINATE", port_paramtemplate_coordinate_desc},
{NULL, NULL}
};
property_desc_t *create_joint(property_desc_t *p1, property_desc_t *p2)
{
int p1num, p2num;
property_desc_t *joint;
for (p1num = 0; p1[p1num].ver != -1; p1num++);
for (p2num = 0; p2[p2num].ver != -1; p2num++);
joint = malloc(sizeof(property_desc_t) * (p1num + p2num + 1));
memcpy (joint, p1, sizeof(property_desc_t) * p1num);
memcpy (joint + p1num, p2, sizeof(property_desc_t) * (p2num + 1));
return joint;
}
int deep_filter_api_version(livido_port_t *port, char *propname)
{
int error;
int api_version = livido_get_int_value(port, propname, &error);
if (api_version != 100)
{
printf("WARNING: Filter's api_version is %i, this host has 100\n", api_version );
warningcount++;
}
return 0;
}
int deep_channel_templates(livido_port_t *port, char *propname)
{
int numtemplates = livido_property_num_elements(port, propname);
int error;
livido_port_t **ports = (livido_port_t **) livido_get_portptr_array (port, propname, &error);
for (int i = 0; i < numtemplates; i++)
{
char tmp[1024];
sprintf(tmp, "%s number %i inside PLUGIN_INFO", propname, i);
test_port(ports[i], port_chantemplate_desc, LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE, tmp);
}
return 0;
}
int deep_parameter_templates(livido_port_t *port, char *propname)
{
int numtemplates = livido_property_num_elements(port, propname);
int error;
livido_port_t **ports = (livido_port_t **) livido_get_portptr_array (port, propname, &error);
for (int i = 0; i < numtemplates; i++)
{
char tmp[1024];
sprintf(tmp, "%s number %i inside PLUGIN_INFO", propname, i);
property_desc_t *curport;
char *kindstr = livido_get_string_value(ports[i], "kind", &error);
if (error || kindstr == NULL)
{
printf("ERROR: Parameter template port (%i) does not have '''kind''' property", i);
errorcount++;
continue;
}
// Find the kind desc and join it with general parameter template desc
kind_parameter_desc_t *kinds;
for (kinds = kind_descs; (kinds->name != NULL) && strcmp(kindstr, kinds->name); kinds++);
if (kinds->name == NULL)
{
printf("ERROR: Uknown '''kind''' %s of parameter template port %i\n", kindstr, i);
errorcount++;
continue; // since we didn't do the join skip the check;
} else
{
curport = create_joint(port_paramtemplate_desc, kinds->property_desc);
};
test_port(ports[i], curport, LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE, tmp);
free(curport);
}
return 0;
}
int deep_plugininfo_filters(livido_port_t *port, char *propname)
{
int numfilters = livido_property_num_elements(port, propname);
int error;
livido_port_t **ports = (livido_port_t **) livido_get_portptr_array (port, propname, &error);
for (int i = 0; i < numfilters; i++)
{
char tmp[1024];
sprintf(tmp, "FILTER_CLASS number %i inside PLUGIN_INFO", i);
test_port(ports[i], port_filterclass_desc, LIVIDO_PORT_TYPE_FILTER_CLASS, tmp);
}
return 0;
}
// Implementation of default malloc/free/memset/memcpy
void *livido_malloc_f (size_t size) { return malloc(size); }
void livido_free_f (void *ptr) { free(ptr); }
void *livido_memset_f (void *s, int c, size_t n) { return memset(s, c, n); }
void *livido_memcpy_f (void *dest, const void *src, size_t n) { return memcpy( dest, src, n); }
int check_property_mandatory (livido_port_t *port, char *propname, char *propdesc)
{
int error = livido_property_get(port, propname, 0, NULL);
if (error)
{
printf("ERROR: Missing mandatory property \'\'%s\'\' of port %s, code: %i\n", propname, propdesc, error);
errorcount ++;
return -1;
}
return 0;
}
int check_property_type (livido_port_t *port, char *propname, int atom_type, char *propdesc)
{
int error = livido_property_get(port, propname, 0, NULL);
if (!error)
{
int real_atomtype = livido_property_atom_type(port, propname);
if (real_atomtype != atom_type)
{
printf("ERROR: Type of property %s is %i, must be: %i\n", propdesc, real_atomtype, atom_type);
errorcount ++;
return 0;
}
}
return 0; // returning ok when no type defined
}
int check_property_type_mandatory (livido_port_t *port, char *propname, int atom_type, char *propdesc)
{
int retval = check_property_mandatory(port, propname, propdesc);
if (retval)
return retval;
return check_property_type(port, propname, atom_type, propdesc);
}
int check_property_type_mandatory_one (livido_port_t *port, char *propname, int atom_type, char *propdesc)
{
int retval = check_property_type_mandatory(port, propname, atom_type, propdesc);
if (retval)
return retval;
if (livido_property_num_elements(port, propname) != 1)
return -1;
return 0;
}
// checks if "type" property of the port exists and is of correct atom type, and then check if the value matches porttype
void check_port_type (livido_port_t *port, int porttype, char *portdesc)
{
char tmp[1024];
sprintf(tmp, "type property of port %s\n", portdesc);
int retval = check_property_type_mandatory(port, "type", LIVIDO_ATOM_TYPE_INT, tmp);
if (retval)
{
printf("FATAL: Last error was fatal\n");
exit(1);
} else
{
int error;
int real_type = livido_get_int_value(port, "type", &error);
// error cannot happen at this point, since we already checked mandatority and atom type
if (real_type != porttype)
{
printf("FATAL: Type of port %s must be %i, but is %i\n", portdesc, porttype, real_type);
exit(1);
}
}
}
int test_port (livido_port_t *port, property_desc_t *properties, int porttype, char *portdesc)
{
// First test the port type
check_port_type(port, porttype, portdesc);
// Now check for properties not in standard
char **property_names = livido_list_properties(port); // FIXME: Who frees this memory?
for (char **lookup_key = property_names; *lookup_key != 0; lookup_key++ )
{
int property_in_standard = 0;
for (property_desc_t *standard_property = properties; standard_property->ver != -1; standard_property++)
{
if (!strcmp(standard_property->name, *lookup_key))
property_in_standard = 1;
}
if (!strncmp(*lookup_key, "PLUGIN_", 7))
property_in_standard = 1;
if (!strncmp(*lookup_key, "HOST_", 5))
property_in_standard = 1;
if (!property_in_standard)
{
printf("WARNING: Property \'%s\' of port %s is not defined in standard\n", *lookup_key, portdesc);
warningcount++;
}
}
// now go trough a list of port's properties defined by standard and check them
for (property_desc_t *standard_property = properties; standard_property->ver != -1; standard_property++)
{
char *propname = standard_property->name;
// check existence
int error = livido_property_get(port, propname, 0, NULL);
if (error == LIVIDO_ERROR_NOSUCH_PROPERTY) // we ignore no such element property here, we deal with that later!
{
// property does not exist
if (standard_property->mand)
{
printf("ERROR: Missing mandatory property \'\'%s\'\' of port %s\n", propname, portdesc);
errorcount ++;
}
continue;
}
printf("Property %s, %d\n", propname, error);
// Property exists, check type
int atomtype = livido_property_atom_type(port, propname);
if (standard_property->atomtype >= 0 && standard_property->atomtype != atomtype)
{
printf("ERROR: Type of property \'\'%s\'\' (of port %s) is %i, must be: %i\n", propname, portdesc, atomtype, standard_property->atomtype);
errorcount ++;
continue;
}
// Property exists and has right type, check if array is properly laid out
int numelements = livido_property_num_elements(port, propname);
if (standard_property->minc >= 0 && standard_property->minc > numelements)
{
printf("ERROR: Property \'\'%s\'\' (of port %s) has %i elements, which is less than minimum of %i\n", propname, portdesc, numelements, standard_property->minc);
errorcount ++;
continue;
}
if (standard_property->maxc >= 0 && standard_property->maxc < numelements)
{
printf("ERROR: Property \'\'%s\'\' (of port %s) has %i elements, which is more than maximum of %i\n", propname, portdesc, numelements, standard_property->minc);
errorcount ++;
continue;
}
// FIXME: We might want to call deep check functions when we already checked _all_ properties
if (standard_property->func)
{
standard_property->func(port, propname);
}
}
return 0;
}
int main(int argc, char **argv)
{
char *name;
void *handle;
livido_setup_f livido_setup;
livido_port_t *plugin_info;
if (argc != 2) {
printf("Livido conformance testing host 0.1\n");
printf("Usage: testhost plugin_name.so\n");
return 0;
}
name = argv[1];
handle = dlopen(name, RTLD_NOW); // We want the whole load _now_
if (!handle) { printf("FATAL: dlopen failed on %s because of %s\n", name, dlerror()); return 1; };
livido_setup = (livido_setup_f) dlsym(handle, "livido_setup");
if (!livido_setup) { printf("FATAL: function livido_setup not found in %s\n", name); return 1; };
plugin_info = livido_setup();
if (!plugin_info) { printf("FATAL: livido_setup() did not return a pointer to livido port, finishing\n"); return 1; };
printf("CHECKPOINT: Loading of plugin and running livido_setup() successeful\n");
test_port(plugin_info, port_plugininfo_desc, LIVIDO_PORT_TYPE_PLUGIN_INFO, "returned by livido_setup()");
dlclose(handle);
printf("\nPlugin %s has produced %i errors and %i warnings\n", name, errorcount, warningcount);
// FIXME: Do the freeing of the all template ports
return 0;
}

View File

@@ -0,0 +1,2 @@
vevoincludedir=$(includedir)
vevoinclude_HEADERS=livido.h

View File

@@ -0,0 +1,402 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(vevoinclude_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(vevoincludedir)"
vevoincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(vevoinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
vevoincludedir = $(includedir)
vevoinclude_HEADERS = livido.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-vevoincludeHEADERS: $(vevoinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(vevoincludedir)" || $(mkdir_p) "$(DESTDIR)$(vevoincludedir)"
@list='$(vevoinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(vevoincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(vevoincludedir)/$$f'"; \
$(vevoincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(vevoincludedir)/$$f"; \
done
uninstall-vevoincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(vevoinclude_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(vevoincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(vevoincludedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(vevoincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-vevoincludeHEADERS
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-vevoincludeHEADERS
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip \
install-vevoincludeHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags uninstall uninstall-am uninstall-info-am \
uninstall-vevoincludeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

240
vevo-mpool/include/hash.h Normal file
View File

@@ -0,0 +1,240 @@
/*
* Hash Table Data Type
* Copyright (C) 1997 Kaz Kylheku <kaz@ashi.footprints.net>
*
* Free Software License:
*
* All rights are reserved by the author, with the following exceptions:
* Permission is granted to freely reproduce and distribute this software,
* possibly in exchange for a fee, provided that this copyright notice appears
* intact. Permission is also granted to adapt this software to produce
* derivative works, as long as the modified versions carry this copyright
* notice and additional notices stating that the work has been modified.
* This source code may be translated into executable form and incorporated
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
*
* $Id: hash.h,v 1.22.2.7 2000/11/13 01:36:45 kaz Exp $
* $Name: kazlib_1_20 $
*/
#ifndef HASH_H
#define HASH_H
#include <limits.h>
#ifdef KAZLIB_SIDEEFFECT_DEBUG
#include "sfx.h"
#endif
/*
* Blurb for inclusion into C++ translation units
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long hashcount_t;
#define HASHCOUNT_T_MAX ULONG_MAX
typedef unsigned long hash_val_t;
#define HASH_VAL_T_MAX ULONG_MAX
extern int hash_val_t_bit;
#ifndef HASH_VAL_T_BIT
#define HASH_VAL_T_BIT ((int) hash_val_t_bit)
#endif
/*
* Hash chain node structure.
* Notes:
* 1. This preprocessing directive is for debugging purposes. The effect is
* that if the preprocessor symbol KAZLIB_OPAQUE_DEBUG is defined prior to the
* inclusion of this header, then the structure shall be declared as having
* the single member int __OPAQUE__. This way, any attempts by the
* client code to violate the principles of information hiding (by accessing
* the structure directly) can be diagnosed at translation time. However,
* note the resulting compiled unit is not suitable for linking.
* 2. This is a pointer to the next node in the chain. In the last node of a
* chain, this pointer is null.
* 3. The key is a pointer to some user supplied data that contains a unique
* identifier for each hash node in a given table. The interpretation of
* the data is up to the user. When creating or initializing a hash table,
* the user must supply a pointer to a function for comparing two keys,
* and a pointer to a function for hashing a key into a numeric value.
* 4. The value is a user-supplied pointer to void which may refer to
* any data object. It is not interpreted in any way by the hashing
* module.
* 5. The hashed key is stored in each node so that we don't have to rehash
* each key when the table must grow or shrink.
*/
typedef struct hnode_t {
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG) /* 1 */
struct hnode_t *hash_next; /* 2 */
const void *hash_key; /* 3 */
void *hash_data; /* 4 */
hash_val_t hash_hkey; /* 5 */
#else
int hash_dummy;
#endif
} hnode_t;
/*
* The comparison function pointer type. A comparison function takes two keys
* and produces a value of -1 if the left key is less than the right key, a
* value of 0 if the keys are equal, and a value of 1 if the left key is
* greater than the right key.
*/
typedef int (*hash_comp_t)(const void *, const void *);
/*
* The hashing function performs some computation on a key and produces an
* integral value of type hash_val_t based on that key. For best results, the
* function should have a good randomness properties in *all* significant bits
* over the set of keys that are being inserted into a given hash table. In
* particular, the most significant bits of hash_val_t are most significant to
* the hash module. Only as the hash table expands are less significant bits
* examined. Thus a function that has good distribution in its upper bits but
* not lower is preferrable to one that has poor distribution in the upper bits
* but not the lower ones.
*/
typedef hash_val_t (*hash_fun_t)(const void *);
/*
* allocator functions
*/
typedef hnode_t *(*hnode_alloc_t)(void *);
typedef void (*hnode_free_t)(hnode_t *, void *);
/*
* This is the hash table control structure. It keeps track of information
* about a hash table, as well as the hash table itself.
* Notes:
* 1. Pointer to the hash table proper. The table is an array of pointers to
* hash nodes (of type hnode_t). If the table is empty, every element of
* this table is a null pointer. A non-null entry points to the first
* element of a chain of nodes.
* 2. This member keeps track of the size of the hash table---that is, the
* number of chain pointers.
* 3. The count member maintains the number of elements that are presently
* in the hash table.
* 4. The maximum count is the greatest number of nodes that can populate this
* table. If the table contains this many nodes, no more can be inserted,
* and the hash_isfull() function returns true.
* 5. The high mark is a population threshold, measured as a number of nodes,
* which, if exceeded, will trigger a table expansion. Only dynamic hash
* tables are subject to this expansion.
* 6. The low mark is a minimum population threshold, measured as a number of
* nodes. If the table population drops below this value, a table shrinkage
* will occur. Only dynamic tables are subject to this reduction. No table
* will shrink beneath a certain absolute minimum number of nodes.
* 7. This is the a pointer to the hash table's comparison function. The
* function is set once at initialization or creation time.
* 8. Pointer to the table's hashing function, set once at creation or
* initialization time.
* 9. The current hash table mask. If the size of the hash table is 2^N,
* this value has its low N bits set to 1, and the others clear. It is used
* to select bits from the result of the hashing function to compute an
* index into the table.
* 10. A flag which indicates whether the table is to be dynamically resized. It
* is set to 1 in dynamically allocated tables, 0 in tables that are
* statically allocated.
*/
typedef struct hash_t {
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
struct hnode_t **hash_table; /* 1 */
hashcount_t hash_nchains; /* 2 */
hashcount_t hash_nodecount; /* 3 */
hashcount_t hash_maxcount; /* 4 */
hashcount_t hash_highmark; /* 5 */
hashcount_t hash_lowmark; /* 6 */
hash_comp_t hash_compare; /* 7 */
hash_fun_t hash_function; /* 8 */
hnode_alloc_t hash_allocnode;
hnode_free_t hash_freenode;
void *hash_context;
hash_val_t hash_mask; /* 9 */
int hash_dynamic; /* 10 */
#else
int hash_dummy;
#endif
} hash_t;
/*
* Hash scanner structure, used for traversals of the data structure.
* Notes:
* 1. Pointer to the hash table that is being traversed.
* 2. Reference to the current chain in the table being traversed (the chain
* that contains the next node that shall be retrieved).
* 3. Pointer to the node that will be retrieved by the subsequent call to
* hash_scan_next().
*/
typedef struct hscan_t {
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
hash_t *hash_table; /* 1 */
hash_val_t hash_chain; /* 2 */
hnode_t *hash_next; /* 3 */
#else
int hash_dummy;
#endif
} hscan_t;
extern hash_t *hash_create(hashcount_t, hash_comp_t, hash_fun_t);
extern void hash_set_allocator(hash_t *, hnode_alloc_t, hnode_free_t, void *);
extern void hash_destroy(hash_t *);
extern void hash_free_nodes(hash_t *);
extern void hash_free(hash_t *);
extern hash_t *hash_init(hash_t *, hashcount_t, hash_comp_t,
hash_fun_t, hnode_t **, hashcount_t);
extern void hash_insert(hash_t *, hnode_t *, const void *);
extern hnode_t *hash_lookup(hash_t *, const void *);
extern hnode_t *hash_delete(hash_t *, hnode_t *);
extern int hash_alloc_insert(hash_t *, const void *, void *);
extern void hash_delete_free(hash_t *, hnode_t *);
extern void hnode_put(hnode_t *, void *);
extern void *hnode_get(hnode_t *);
extern const void *hnode_getkey(hnode_t *);
extern hashcount_t hash_count(hash_t *);
extern hashcount_t hash_size(hash_t *);
extern int hash_isfull(hash_t *);
extern int hash_isempty(hash_t *);
extern void hash_scan_begin(hscan_t *, hash_t *);
extern hnode_t *hash_scan_next(hscan_t *);
extern hnode_t *hash_scan_delete(hash_t *, hnode_t *);
extern void hash_scan_delfree(hash_t *, hnode_t *);
extern int hash_verify(hash_t *);
extern hnode_t *hnode_create(void *);
extern hnode_t *hnode_init(hnode_t *, void *);
extern void hnode_destroy(hnode_t *);
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
#ifdef KAZLIB_SIDEEFFECT_DEBUG
#define hash_isfull(H) (SFX_CHECK(H)->hash_nodecount == (H)->hash_maxcount)
#else
#define hash_isfull(H) ((H)->hash_nodecount == (H)->hash_maxcount)
#endif
#define hash_isempty(H) ((H)->hash_nodecount == 0)
#define hash_count(H) ((H)->hash_nodecount)
#define hash_size(H) ((H)->hash_nchains)
#define hnode_get(N) ((N)->hash_data)
#define hnode_getkey(N) ((N)->hash_key)
#define hnode_put(N, V) ((N)->hash_data = (V))
#endif
#ifdef __cplusplus
}
#endif
#endif

280
vevo-mpool/include/livido.h Normal file
View File

@@ -0,0 +1,280 @@
/* LiViDO is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
LiViDO 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this source code; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
LiViDO is developed by:
Niels Elburg - http://veejay.sf.net
Gabriel "Salsaman" Finch - http://lives.sourceforge.net
Denis "Jaromil" Rojo - http://freej.dyne.org
Tom Schouten - http://zwizwa.fartit.com
Andraz Tori - http://cvs.cinelerra.org
reviewed with suggestions and contributions from:
Silvano "Kysucix" Galliani - http://freej.dyne.org
Kentaro Fukuchi - http://megaui.net/fukuchi
Jun Iio - http://www.malib.net
Carlo Prelz - http://www2.fluido.as:8080/
*/
#ifndef __LIVIDO_H__
#define __LIVIDO_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* for size_t */
#include <sys/types.h>
/* API version * 100 */
#define LIVIDO_API_VERSION 100
/* Palette types */
#
/* RGB palettes */
#define LIVIDO_PALETTE_RGB888 1
#define LIVIDO_PALETTE_RGB24 1
#define LIVIDO_PALETTE_BGR888 2
#define LIVIDO_PALETTE_BGR24 2
#define LIVIDO_PALETTE_RGBA8888 3
#define LIVIDO_PALETTE_RGBA32 3
#define LIVIDO_PALETTE_ARGB8888 4
#define LIVIDO_PALETTE_ARGB32 4
#define LIVIDO_PALETTE_RGBFLOAT 5
#define LIVIDO_PALETTE_ARGBFLOAT 6
#define LIVIDO_PALETTE_RGB565 7
/* YUV palettes */
#define LIVIDO_PALETTE_YUV422P 513
#define LIVIDO_PALETTE_YV16 513
/*
LIVIDO_PALETTE_YUV422P LIVIDO_PALETTE_YV16
[Official name 'YV16', 8 bit Y plane followed by 8
bit 2x1 subsampled V and U planes. Planar.]
*/
/*
LIVIDO_PALETTE_YUV420P LIVIDO_PALETTE_YV12
[8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes. Planar
(Official name YV12)]
*/
#define LIVIDO_PALETTE_YUV420P 514
#define LIVIDO_PALETTE_YV12 514
/*
LIVIDO_PALETTE_YVU420P LIVIDO_PALETTE_I420
[Same as YUV420P , but U and V are swapped. Planar.]
*/
#define LIVIDO_PALETTE_YVU420P 515
#define LIVIDO_PALETTE_I420 515
/*
LIVIDO_PALETTE_YUV444P
[Unofficial , 8 bit Y plane followed by 8 bit U and V planes, no
subsampling. Planar.]
*/
#define LIVIDO_PALETTE_YUV444P 516
/*
LIVIDO_PALETTE_YUVA4444P LIVIDO_PALETTE_YUV4444P
[Unofficial, like YUV444P but with Alpha. Planar.]
*/
#define LIVIDO_PALETTE_YUV4444P 517
/*
LIVIDO_PALETTE_YUYV8888
[Like YUV 4:2:2 but with different component ordering within the
u_int32 macropixel. Packed.]
*/
#define LIVIDO_PALETTE_YUYV8888 518
/*
LIVIDO_PALETTE_YUYV8888
[Like YUV 4:2:2 but with different component ordering within the
u_int32 macropixel. Packed.]
*/
#define LIVIDO_PALETTE_UYVY8888 519
/*
LIVIDO_PALETTE_UYVY8888
[YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second
pixel horizontally on each line). A macropixel contains 2 pixels in 1
u_int32. Packed.]
*/
#define LIVIDO_PALETTE_YUV411 520
/*
LIVIDO_PALETTE_YUV411
[IEEE 1394 Digital Camera 1.04 spec. Is packed YUV format
with a 6 pixel macroblock structure containing 4 pixels.
Ordering is U2 Y0 Y1 V2 Y2 Y3. Uses same bandwith as YUV420P
Only used for SMPTE DV NTSC.]
*/
/* Pending: PALETTE YUV888, YUVA888 needed in cinerella */
#define LIVIDO_PALETTE_YUV888 521
#define LIVIDO_PALETTE_YUVA8888 522
/* Alpha palettes */
/*
Alpha palettes have two uses: 1) for masks, 2) to split colour inputs into single colour channels, or to combine single colour channels into a combined channel. The order of colour channels is the same as the order in the combined channel. For example if an input in RGB24 palette is split into 3 non-mask alpha channels, then the alpha channels will be in the order: Red, Green, Blue. A single non-mask alpha channel would represent the luminance.
*/
#define LIVIDO_PALETTE_A1 1025
#define LIVIDO_PALETTE_A8 1026
#define LIVIDO_PALETTE_AFLOAT 1027
/* Filter flags */
#define LIVIDO_FILTER_NON_REALTIME (1<<0)
#define LIVIDO_FILTER_CAN_DO_INPLACE (1<<1)
#define LIVIDO_FILTER_STATELESS (1<<2)
#define LIVIDO_FILTER_IS_CONVERTOR (1<<3)
/* Channel flags */
#define LIVIDO_CHANNEL_CHANGE_UNADVISED (1<<0)
/*
LIVIDO_CHANNEL_CHANGE_UNADVISED
plugin MAY use this flag to tell the host, that changing of channel size causes possibly unwanted behaviour of the filter. Unwanted behaviour can for example be reseting the accumulated values which causes the visual result of filter to change in unexpected way or maybe the next call to process function will take disproportional amount of time due to reinitialization. Host is safe to ignore the flag and plugin MUST still be useful, though functionality may suffer.
*/
#define LIVIDO_CHANNEL_PALETTE_UNADVISED (1<<1)
/*
LIVIDO_CHANNEL_PALETTE_UNADVISED
plugin MAY use this flag to tell the host, that changing of channel palette causes possibly unwanted behaviour of the filter. Unwanted behaviour can for example be reseting the accumulated values which causes the visual result of filter to change in unexpected way or maybe the next call to process function will take disproportional amount of time due to reinitialization. Host is safe to ignore the flag and plugin MUST still be useful, though functionality may suffer.
*/
/* Parameter flags */
#define LIVIDO_PARAMETER_CHANGE_UNADVISED (1<<0)
/*
plugin MAY use this flag to tell the host, that changing of this parameter causes possibly unwanted behaviour of the filter. Unwanted behaviour can for example be reseting the accumulated values which causes the visual result of filter to change in unexpected way or maybe the next call to process function will take disproportional amount of time due to reinitialization. Host is safe to ignore the flag and plugin MUST still be useful, though functionality may suffer.
*/
/* Property flags */
#define LIVIDO_PROPERTY_READONLY (1<<0)
/* YUV sampling types */
#define LIVIDO_YUV_SAMPLING_NONE 0
#define LIVIDO_YUV_SAMPLING_SMPTE 1
#define LIVIDO_YUV_SAMPLING_JPEG 2
#define LIVIDO_YUV_SAMPLING_MPEG2 3
#define LIVIDO_YUV_SAMPLING_DVPAL 4
#define LIVIDO_YUV_SAMPLING_DVNTSC 5
/* Interlace types */
#define LIVIDO_INTERLACE_NONE 0
#define LIVIDO_INTERLACE_TOPFIRST 1
#define LIVIDO_INTERLACE_BOTTOMFIRST 2
#define LIVIDO_INTERLACE_PROGRESSIVE 3
/* Livido errors */
/* Core errors */
#define LIVIDO_NO_ERROR 0
#define LIVIDO_ERROR_MEMORY_ALLOCATION 1
#define LIVIDO_ERROR_PROPERTY_READONLY 2
#define LIVIDO_ERROR_NOSUCH_ELEMENT 3
#define LIVIDO_ERROR_NOSUCH_PROPERTY 4
#define LIVIDO_ERROR_WRONG_ATOM_TYPE 5
/* Plugin errors */
#define LIVIDO_ERROR_TOO_MANY_INSTANCES 6
#define LIVIDO_ERROR_HARDWARE 7
/* Atom types */
/* Fundamental atoms */
#define LIVIDO_ATOM_TYPE_INT 1
#define LIVIDO_ATOM_TYPE_DOUBLE 2
#define LIVIDO_ATOM_TYPE_BOOLEAN 3
#define LIVIDO_ATOM_TYPE_STRING 4
/* Pointer atoms */
#define LIVIDO_ATOM_TYPE_VOIDPTR 65
#define LIVIDO_ATOM_TYPE_PORTPTR 66
/* Port types */
#define LIVIDO_PORT_TYPE_PLUGIN_INFO 1
#define LIVIDO_PORT_TYPE_FILTER_CLASS 2
#define LIVIDO_PORT_TYPE_FILTER_INSTANCE 3
#define LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE 4
#define LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE 5
#define LIVIDO_PORT_TYPE_CHANNEL 6
#define LIVIDO_PORT_TYPE_PARAMETER 7
#define LIVIDO_PORT_TYPE_GUI 8
/*
A port is a set of one or more properties
Each port has a mandatory property called "type" (see below), depending upon "type" property port has other mandatory and optional properties.
"type" can be one of:
* LIVIDO_PORT_TYPE_PLUGIN_INFO : Information about plugin and list of filter classes it includes
* LIVIDO_PORT_TYPE_FILTER_CLASS : Descriptive information about single filter class
* LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE : Information about what kinds of channels filter accepts
* LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE : Information about what kinds of parameters filter has
* LIVIDO_PORT_TYPE_FILTER_INSTANCE : All data about an instance
* LIVIDO_PORT_TYPE_CHANNEL : Instantination of a channel
* LIVIDO_PORT_TYPE_PARAMETER : Instantination of a parameter
* LIVIDO_PORT_TYPE_GUI : described in the separate livido GUI extension (TODO)
"type" is a single valued property with atom_type LIVIDO_ATOM_TYPE_INT.
The host should provide its own mediation layer for providing a datacontainer for its port.
This host uses the mediation layer, where a new port is defined.
*/
#ifndef HAVE_LIVIDO_PORT_T
#define HAVE_LIVIDO_PORT_T
typedef void livido_port_t;
#endif
extern void livido_port_free(livido_port_t * port);
extern livido_port_t *livido_port_new(int port_type);
extern int livido_property_set(livido_port_t * port, const char *key,
int atom_type, int num_elems,
void *value);
extern int livido_property_get(livido_port_t * port, const char *key,
int idx, void *value);
extern int livido_property_num_elements(livido_port_t * port,
const char *key);
extern int livido_property_atom_type(livido_port_t * port,
const char *key);
extern size_t livido_property_element_size(livido_port_t * port,
const char *key,
const int idx);
extern char **livido_list_properties(livido_port_t * port);
extern void *livido_malloc_f(size_t size);
extern void livido_free_f(void *ptr);
extern void *livido_memset_f(void *s, int c, size_t n);
extern void *livido_memcpy_f(void *dest, const void *src, size_t n);
typedef livido_port_t *(*livido_setup_f) (void);
typedef int (*livido_init_f) (livido_port_t * filter_instance);
typedef int (*livido_process_f) (livido_port_t * filter_instance,
double timestamp);
typedef int (*livido_deinit_f) (livido_port_t * filter_instance);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif // #ifndef __LIVIDO_H__

View File

@@ -0,0 +1,36 @@
/*
Copyright (c) 2004-2005 N.Elburg <nelburg@looze.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef VEVO_LOW_LEVEL_H
#define VEVO_LOW_LEVEL_H
/* Mediation layer structures, provided by this host */
typedef struct {
int type;
void *value;
size_t size;
} atom_t;
#endif

53
vevo-mpool/include/pool.h Normal file
View File

@@ -0,0 +1,53 @@
/*
Copyright (c) 2004-2005 N.Elburg <nelburg@looze.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef VEVO_POOL_H
#define VEVO_POOL_H
#ifdef VEVO_MEMPOOL
/* Have 160 atoms and 160 atom slots available ,
uses aprox. 4Kb of memory.
Use a value that is a multiple of 4
*/
#ifndef VEVO_MEM_LIMIT
#define VEVO_MEM_LIMIT 2048
#endif
#endif
#define ATOM_INT 0
#define ATOM_PTR 1
#define ATOM_DBL 2
#define ATOM_ATOM 3
void *vevo_new_pool(void);
void vevo_free_pool(void *v);
void *vevo_malloc(void *v, int vevo_type);
int vevo_pool_verify(void *v);
void vevo_free(void *v, void *ptr, int vevo_type);
#endif

44
vevo-mpool/include/vevo.h Normal file
View File

@@ -0,0 +1,44 @@
/*
Copyright (c) 2004-2005 N.Elburg <nelburg@looze.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
# ifndef VEVO_H_INCLUDED
# define VEVO_H_INCLUDED
#include <stdio.h>
#include <stdint.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define HAVE_LIVIDO_PORT_T
typedef void livido_port_t;
# endif

294
vevo-mpool/install-sh Executable file
View File

@@ -0,0 +1,294 @@
#!/bin/sh
#
# install - install a program, script, or datafile
#
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# 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 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
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

6402
vevo-mpool/ltmain.sh Normal file

File diff suppressed because it is too large Load Diff

336
vevo-mpool/missing Executable file
View File

@@ -0,0 +1,336 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# 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.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

111
vevo-mpool/mkinstalldirs Executable file
View File

@@ -0,0 +1,111 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

View File

@@ -0,0 +1,96 @@
#include <stddef.h>
#include "stdio.h"
#include "../include/livido.h"
#include "../src/livido-utils.c"
#define num_palettes 5
int palettes[num_palettes] = { LIVIDO_PALETTE_RGB565,
LIVIDO_PALETTE_RGB888,
LIVIDO_PALETTE_RGBA8888,
LIVIDO_PALETTE_YUV888,
LIVIDO_PALETTE_YUVA8888
} ;
livido_init_f init_instance (livido_port_t *my_instance)
{
livido_set_string_value(my_instance, "PLUGIN_mydata", "My personal data, that the host won't touch!!!");
return 0;
}
livido_init_f deinit_instance (livido_port_t* my_instance)
{
// we would do cleanup and freeing here, but we have nothing to do
return 0;
}
livido_process_f process_frame( livido_port_t *my_instance,
double timecode)
{
return 0;
}
livido_port_t *livido_setup(void)
{
livido_port_t *info;
livido_port_t *filter1;
livido_port_t *in_chann, *out_chann, *in_param, *out_param;
info = livido_port_new(LIVIDO_PORT_TYPE_PLUGIN_INFO);
livido_set_string_value(info, "maintainer", "Andraz Tori");
livido_set_string_value(info, "version", "1.0");
filter1 = livido_port_new(LIVIDO_PORT_TYPE_FILTER_CLASS);
livido_set_string_value (filter1, "name", "Fade plugin");
livido_set_string_value (filter1, "description", "Fades the image with alpha channel when exists or to black when it does not");
livido_set_int_value (filter1, "version", 1);
livido_set_int_value (filter1, "api_version", 100);
livido_set_string_value (filter1, "license", "Public domain");
livido_set_int_value (filter1, "flags", LIVIDO_FILTER_CAN_DO_INPLACE | LIVIDO_FILTER_STATELESS);
livido_set_voidptr_value(filter1, "process_func", &process_frame);
livido_set_voidptr_value(filter1, "init_func", &init_instance);
livido_set_voidptr_value(filter1, "deinit_func", &deinit_instance);
in_chann = livido_port_new(LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE);
livido_set_string_value (in_chann, "name", "input");
livido_set_int_value (in_chann, "flags", 0);
livido_set_int_array (in_chann, "palette_list", num_palettes, palettes);
livido_set_portptr_value(filter1, "in_channel_templates", in_chann);
out_chann = livido_port_new(LIVIDO_PORT_TYPE_CHANNEL_TEMPLATE);
livido_set_string_value (out_chann, "name", "faded output");
livido_set_int_value (out_chann, "flags", 0);
livido_set_int_array (out_chann, "palette_list", num_palettes, palettes);
livido_set_voidptr_value (out_chann, "same_as_size", in_chann);
livido_set_voidptr_value (out_chann, "same_as_palette", in_chann);
livido_set_portptr_value(filter1, "out_channel_templates", in_chann);
in_param = livido_port_new(LIVIDO_PORT_TYPE_PARAMETER_TEMPLATE);
livido_set_string_value (in_param, "name", "Fade percentage");
livido_set_int_value (in_param, "flags", 0);
livido_set_string_value (in_param, "kind", "NUMBER");
livido_set_string_value (in_param, "PLUGIN_kinda", "NUMBER");
livido_set_double_value (in_param, "default", 0.5);
livido_set_double_value (in_param, "min", 0.0);
livido_set_double_value (in_param, "max", 0.0);
livido_set_boolean_value (in_param, "transition", 1);
livido_set_portptr_value(filter1, "in_parameter_templates", in_param);
// Create an empty array of output templates
livido_set_portptr_array(filter1, "out_parameter_templates", 0, 0);
// Just to demonstrate - conformancy checking host will not complain about our own PLUGIN_ variable
livido_set_string_value (filter1, "PLUGIN_my_stuff", "I can put here whatever i want");
livido_set_portptr_value(info, "filters", filter1);
return info;
}

View File

@@ -0,0 +1,35 @@
CC = gcc
LINKER = ld
CFLAGS = -I. -I../include -I ../ -Wall -g $(shell vevo-config --cflags)
all:
# vevo - veejay video objects
#
# plugins :
# bathroom
# opacity
#
# compile: make plugins
# run:
# export LD_LIBRARY_PATH=`pwd`
# host <plugin.so>
plugins: fade_plugin.so
fade.so: fade_plugin.o
clean:
rm -rf *.o *.so
# generic make rules
%: %.c
$(CC) $(CFLAGS) -o $@ $< -ldl
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
%.so: %.o
$(LINKER) -shared $^ -o $@
# $(LINKER) -E -z now -shared $^ -o $@

View File

@@ -0,0 +1,15 @@
INCLUDES = -I$(top_srcdir)/include -I$(includedir)
VEVO_LIB_FILE = libvevo.la
VEVO_ALL_LIB_OPTS = \
-version-info $(LT_AGE):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic
lib_LTLIBRARIES = $(VEVO_LIB_FILE)
libvevo_la_SOURCES = hash.c pool.c vevo.c
libvevo_la_LDFLAGS = $(VEVO_ALL_LIB_OPTS)

474
vevo-mpool/src/Makefile.in Normal file
View File

@@ -0,0 +1,474 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SOURCES = $(libvevo_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libvevo_la_LIBADD =
am_libvevo_la_OBJECTS = hash.lo pool.lo vevo.lo
libvevo_la_OBJECTS = $(am_libvevo_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libvevo_la_SOURCES)
DIST_SOURCES = $(libvevo_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
INCLUDES = -I$(top_srcdir)/include -I$(includedir)
VEVO_LIB_FILE = libvevo.la
VEVO_ALL_LIB_OPTS = \
-version-info $(LT_AGE):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic
lib_LTLIBRARIES = $(VEVO_LIB_FILE)
libvevo_la_SOURCES = hash.c pool.c vevo.c
libvevo_la_LDFLAGS = $(VEVO_ALL_LIB_OPTS)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libvevo.la: $(libvevo_la_OBJECTS) $(libvevo_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libvevo_la_LDFLAGS) $(libvevo_la_OBJECTS) $(libvevo_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vevo.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-libLTLIBRARIES
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
install-libLTLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

1072
vevo-mpool/src/hash.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,355 @@
/* LiViDO is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
LiViDO 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this source code; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
LiViDO is developed by:
Niels Elburg - http://veejay.sf.net
Gabriel "Salsaman" Finch - http://lives.sourceforge.net
Denis "Jaromil" Rojo - http://freej.dyne.org
Tom Schouten - http://zwizwa.fartit.com
Andraz Tori - http://cvs.cinelerra.org
reviewed with suggestions and contributions from:
Silvano "Kysucix" Galliani - http://freej.dyne.org
Kentaro Fukuchi - http://megaui.net/fukuchi
Jun Iio - http://www.malib.net
Carlo Prelz - http://www2.fluido.as:8080/
*/
/* (C) Gabriel "Salsaman" Finch, 2005 */
/////////////////////////////////////////////////////////////////
int livido_has_property (livido_port_t *port, const char *key) {
if (livido_property_get(port,key,0,NULL)==LIVIDO_ERROR_NOSUCH_PROPERTY) return 0;
return 1;
}
#include "livido.h"
/////////////////////////////////////////////////////////////////
// property setters
int livido_set_int_value (livido_port_t *port, const char *key, int value) {
// returns a LIVIDO_ERROR
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_INT,1,&value);
}
int livido_set_double_value (livido_port_t *port, const char *key, double value) {
// returns a LIVIDO_ERROR
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_DOUBLE,1,&value);
}
int livido_set_boolean_value (livido_port_t *port, const char *key, int value) {
// returns a LIVIDO_ERROR
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_BOOLEAN,1,&value);
}
int livido_set_string_value (livido_port_t *port, const char *key, char *value) {
// returns a LIVIDO_ERROR
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_STRING,1,&value);
}
int livido_set_portptr_value (livido_port_t *port, const char *key, void *value) {
// returns a LIVIDO_ERROR
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_PORTPTR,1,&value);
}
int livido_set_voidptr_value (livido_port_t *port, const char *key, void *value) {
// returns a LIVIDO_ERROR
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_VOIDPTR,1,&value);
}
/////////// these functions need a size ////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
// general property getter
inline int livido_get_value (livido_port_t *port, const char *key, void *value) {
// returns a LIVIDO_ERROR
return livido_property_get( port, key, 0, value);
}
////////////////////////////////////////////////////////////
int livido_get_int_value (livido_port_t *port, const char *key, int *error) {
int retval=0;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_INT) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return retval;
}
else *error=livido_get_value (port,key,&retval);
return retval;
}
double livido_get_double_value (livido_port_t *port, const char *key, int *error) {
double retval=0.;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_DOUBLE) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return retval;
}
*error=livido_get_value (port,key,&retval);
return retval;
}
int livido_get_boolean_value (livido_port_t *port, const char *key, int *error) {
int retval=0;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_BOOLEAN) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return retval;
}
*error=livido_get_value (port,key,&retval);
return retval;
}
char *livido_get_string_value (livido_port_t *port, const char *key, int *error) {
char *retval=NULL;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_STRING) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((retval=(char *)livido_malloc_f(livido_property_element_size(port,key,0)+1))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
if ((*error=livido_get_value (port,key,&retval))!=LIVIDO_NO_ERROR) {
livido_free_f (retval);
return NULL;
}
return retval;
}
void *livido_get_voidptr_value (livido_port_t *port, const char *key, int *error) {
void *retval=NULL;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_VOIDPTR) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return retval;
}
*error=livido_get_value (port,key,&retval);
return retval;
}
livido_port_t *livido_get_portptr_value (livido_port_t *port, const char *key, int *error) {
livido_port_t *retval=NULL;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_PORTPTR) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return retval;
}
*error=livido_get_value (port,key,&retval);
return retval;
}
////////////////////////////////////////////////////////////
int *livido_get_int_array (livido_port_t *port, const char *key, int *error) {
int i;
int num_elems;
int *retval;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_INT) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((num_elems=livido_property_num_elements (port,key))==0) return NULL;
if ((retval=(int *)livido_malloc_f(num_elems*sizeof(int)))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
for (i=0;i<num_elems;i++) {
if ((*error=livido_property_get(port, key, i, &retval[i]))!=LIVIDO_NO_ERROR) {
livido_free_f (retval);
return NULL;
}
}
return retval;
}
double *livido_get_double_array (livido_port_t *port, const char *key, int *error) {
int i;
int num_elems;
double *retval;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_DOUBLE) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((num_elems=livido_property_num_elements (port,key))==0) return NULL;
if ((retval=(double *)livido_malloc_f(num_elems*sizeof(double)))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
for (i=0;i<num_elems;i++) {
if ((*error=livido_property_get(port, key, i, &retval[i]))!=LIVIDO_NO_ERROR) {
livido_free_f (retval);
return NULL;
}
}
return retval;
}
int *livido_get_boolean_array (livido_port_t *port, const char *key, int *error) {
int i;
int num_elems;
int *retval;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_BOOLEAN) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((num_elems=livido_property_num_elements (port,key))==0) return NULL;
if ((retval=(int *)livido_malloc_f(num_elems*sizeof(int)))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
for (i=0;i<num_elems;i++) {
if ((*error=livido_property_get(port, key, i, &retval[i]))!=LIVIDO_NO_ERROR) {
livido_free_f (retval);
return NULL;
}
}
return retval;
}
char **livido_get_string_array (livido_port_t *port, const char *key, int *error) {
int i;
int num_elems;
char **retval;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_STRING) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((num_elems=livido_property_num_elements (port,key))==0) return NULL;
if ((retval=(char **)livido_malloc_f(num_elems*sizeof(char *)))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
for (i=0;i<num_elems;i++) {
if ((retval[i]=(char *)livido_malloc_f(livido_property_element_size(port,key,i)+1))==NULL) {
for (--i;i>=0;i--) livido_free_f(retval[i]);
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
livido_free_f (retval);
return NULL;
}
if ((*error=livido_property_get(port, key, i, &retval[i]))!=LIVIDO_NO_ERROR) {
for (--i;i>=0;i--) livido_free_f(retval[i]);
livido_free_f (retval);
return NULL;
}
}
return retval;
}
void **livido_get_voidptr_array (livido_port_t *port, const char *key, int *error) {
int i;
int num_elems;
void **retval;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_VOIDPTR) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((num_elems=livido_property_num_elements (port,key))==0) return NULL;
if ((retval=(void **)livido_malloc_f(num_elems*sizeof(void *)))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
for (i=0;i<num_elems;i++) {
if ((*error=livido_property_get(port, key, i, &retval[i]))!=LIVIDO_NO_ERROR) {
livido_free_f (retval);
return NULL;
}
}
return retval;
}
livido_port_t **livido_get_portptr_array (livido_port_t *port, const char *key, int *error) {
int i;
int num_elems;
livido_port_t **retval;
if (livido_has_property(port,key)&&livido_property_atom_type(port,key)!=LIVIDO_ATOM_TYPE_PORTPTR) {
*error=LIVIDO_ERROR_WRONG_ATOM_TYPE;
return NULL;
}
if ((num_elems=livido_property_num_elements (port,key))==0) return NULL;
if ((retval=(livido_port_t **)livido_malloc_f(num_elems*sizeof(livido_port_t *)))==NULL) {
*error=LIVIDO_ERROR_MEMORY_ALLOCATION;
return NULL;
}
for (i=0;i<num_elems;i++) {
if ((*error=livido_property_get(port, key, i, &retval[i]))!=LIVIDO_NO_ERROR) {
livido_free_f (retval);
return NULL;
}
}
return retval;
}
/////////////////////////////////////////////////////
int livido_set_int_array (livido_port_t *port, const char *key, int num_elems, int *values) {
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_INT,num_elems,values);
}
int livido_set_double_array (livido_port_t *port, const char *key, int num_elems, double *values) {
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_DOUBLE,num_elems,values);
}
int livido_set_boolean_array (livido_port_t *port, const char *key, int num_elems, int *values) {
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_BOOLEAN,num_elems,values);
}
int livido_set_string_array (livido_port_t *port, const char *key, int num_elems, char **values) {
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_STRING,num_elems,values);
}
int livido_set_voidptr_array (livido_port_t *port, const char *key, int num_elems, void **values) {
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_VOIDPTR,num_elems,values);
}
int livido_set_portptr_array (livido_port_t *port, const char *key, int num_elems, livido_port_t **values) {
return livido_property_set (port,key,LIVIDO_ATOM_TYPE_PORTPTR,num_elems,values);
}

260
vevo-mpool/src/pool.c Normal file
View File

@@ -0,0 +1,260 @@
/*
Copyright (c) 2004-2005 N.Elburg <nelburg@looze.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef VEVO_MEMPOOL
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <sys/mman.h>
#include <include/lowlevel.h>
#include <include/pool.h>
#define FREE_LISTS 5
typedef struct {
int vevo_type;
size_t size;
void *ptr;
void *next;
} free_node_t;
typedef free_node_t free_list_t;
typedef struct {
size_t l[2];
void *a4;
void *p4;
void *t;
double *d;
void *s;
free_list_t **f;
int idx[2];
} pool_t;
static struct {
int index;
size_t size;
} type_list[] = {
{
ATOM_INT, sizeof(int32_t)}
, {
ATOM_PTR, sizeof(void *)}, {
ATOM_DBL, sizeof(double)}, {
ATOM_ATOM, sizeof(atom_t)}
,};
//clean up todo!
static free_node_t *vevo_new_node(int vevo_type, void *area)
{
free_node_t *n = (free_node_t *) malloc(sizeof(free_node_t));
n->size = type_list[vevo_type].size;
n->ptr = area;
n->next = NULL;
return n;
}
static void vevo_node_free(free_node_t * n)
{
if (n)
free(n);
n = NULL;
}
static void append_node_to_freelist(pool_t * p, int vevo_type,
size_t offset, void *base)
{
free_node_t *n = vevo_new_node(vevo_type, base);
free_node_t *c = NULL;
free_list_t *l = p->f[vevo_type];
if (l == NULL)
p->f[vevo_type] = n;
else {
while (l != NULL) {
c = (free_node_t *) l->next;
if (c == NULL) {
l->next = (void *) n;
break;
}
l = c;
}
}
}
void *vevo_new_pool(void)
{
pool_t *p = (pool_t *) malloc(sizeof(pool_t));
memset(p, 0, sizeof(pool_t));
p->f = (free_list_t **) malloc(sizeof(free_list_t *) * FREE_LISTS);
memset(p->f, 0, sizeof(free_list_t *) * FREE_LISTS);
p->l[0] = (VEVO_MEM_LIMIT / 4) * 3;
p->l[1] = (VEVO_MEM_LIMIT / 4) * 1;
size_t chunk = (p->l[0] / 2) * sizeof(int32_t);
size_t d_chunk = p->l[1] * sizeof(double);
size_t t_chunk = VEVO_MEM_LIMIT * sizeof(atom_t);
p->a4 = (void *) malloc(p->l[0] * sizeof(int32_t)); // int and bool
p->p4 = (void *) malloc(p->l[0] * sizeof(void *)); // port and ptr
p->d = (double *) malloc(p->l[1] * sizeof(double)); // double
p->t = (atom_t *) malloc(VEVO_MEM_LIMIT * sizeof(atom_t));
memset(p->a4, 0, p->l[0] * sizeof(int32_t));
memset(p->p4, 0, p->l[0] * sizeof(void *));
memset(p->d, 0, p->l[1] * sizeof(double));
memset(p->t, 0, VEVO_MEM_LIMIT * sizeof(atom_t));
void *base = NULL;
int n = 0;
/* initialize free lists for int and bool types */
size_t it = 0;
while (it < chunk) {
base = ((int32_t *) p->a4 + it);
append_node_to_freelist(p, ATOM_INT, chunk, base);
it += type_list[ATOM_INT].size;
n++;
}
/* initalize ptr free lists */
it = 0;
while (it < chunk) {
base = ((void **) p->p4 + (ATOM_PTR * chunk + it));
append_node_to_freelist(p, ATOM_PTR, chunk, base);
it += type_list[ATOM_PTR].size;
n++;
}
/* initialize double free lists */
it = 0;
while (it < d_chunk) {
base = (void *) ((double *) p->d + it);
append_node_to_freelist(p, ATOM_DBL, d_chunk, base);
it += type_list[ATOM_DBL].size;
n++;
}
/* fill to hold atom container */
it = 0;
while (it < t_chunk) {
base = (void *) ((double *) p->t + it);
append_node_to_freelist(p, ATOM_ATOM, t_chunk, base);
it += type_list[ATOM_ATOM].size;
}
p->idx[0] = n;
p->idx[1] = 0;
#ifdef STRICT_CHECKING
assert(p->idx[0] != 0);
#endif
return (void *) p;
}
void vevo_free_pool(void *v)
{
int n = 0;
pool_t *p = (pool_t *) v;
if (p) {
if (p->a4)
free(p->a4);
if (p->p4)
free(p->p4);
if (p->d)
free(p->d);
if (p->t)
free(p->t);
for (n = 0; n < FREE_LISTS; n++) {
free_node_t *node = NULL;
while (p->f[n] != NULL) {
node = (free_node_t *) p->f[n]->next;
vevo_node_free(p->f[n]);
p->f[n] = node;
}
}
free(p->f);
free(p);
}
}
void *vevo_malloc(void *v, int vevo_type)
{
pool_t *p = (pool_t *) v;
free_node_t *l = p->f[vevo_type];
#ifdef STRICT_CHECKING
assert(l != NULL);
#endif
while (l != NULL) {
if (l->size == 0)
l = l->next;
else { /* found memory */
void *res = l->ptr;
free_node_t *next = l->next;
l->size = 0;
l->vevo_type = vevo_type;
l = next;
p->idx[1]++;
#ifdef STRICT_CHECKING
assert(p->idx[1] < p->idx[0]);
#endif
return res;
}
}
#ifdef STRICT_CHECKING
assert(0);
#endif
return NULL;
}
int vevo_pool_verify(void *v)
{
pool_t *p = (pool_t *) v;
return (p->idx[0] > p->idx[1] ? 1 : 0);
}
void vevo_free(void *v, void *ptr, int vevo_type)
{
pool_t *p = (pool_t *) v;
free_node_t *l = NULL;
l = p->f[vevo_type];
while (l != NULL) {
if (l->ptr == ptr) {
l->size = type_list[vevo_type].size;
p->idx[1]--;
#ifdef STRICT_CHECKING
assert(p->idx[1] >= 0);
#endif
return;
}
l = l->next;
}
#ifdef STRICT_CHECKING
assert(0);
#endif
}
#endif

694
vevo-mpool/src/vevo.c Normal file
View File

@@ -0,0 +1,694 @@
/*
Copyright (c) 2004-2005 N.Elburg <nelburg@looze.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <include/lowlevel.h>
#include <include/vevo.h>
#include <include/livido.h>
#include <include/hash.h>
#ifdef VEVO_MEMPOOL
#include <include/pool.h>
#endif
#ifdef STRICT_CHECKING
#include <assert.h>
#endif
typedef struct {
int atom_type;
union {
atom_t *atom;
atom_t **array;
} elements;
int num_elements;
int flags;
} livido_storage_t;
/* For fast indexing of livido keys, define the port index: */
typedef struct {
const char *key;
int hash_code;
void *next;
} port_index_t;
/* Now, define our port structure */
typedef struct {
hash_t *table;
port_index_t *index;
void *pool;
int atom_types[70];
} vevo_port_t;
static inline port_index_t *port_node_new(const char *key, int hash_key)
{
port_index_t *i = (port_index_t *) malloc(sizeof(port_index_t));
#ifdef STRICT_CHECKING
assert(i != NULL);
assert(key != NULL);
assert(hash_key != 0);
#endif
i->key = strdup(key);
i->hash_code = hash_key;
i->next = NULL;
return i;
}
static inline void port_node_free(port_index_t * node)
{
if (node) {
if (node->key)
free((void *) node->key);
free(node);
}
node = NULL;
}
static inline void port_node_append(livido_port_t * p, const char *key,
int hash_key)
{
#ifdef STRICT_CHECKING
assert(p != NULL);
assert(key != NULL);
assert(hash_key != 0);
#endif
vevo_port_t *port = (vevo_port_t *) p;
port_index_t *node = port_node_new(key, hash_key);
port_index_t *next;
port_index_t *list = port->index;
if (list == NULL)
port->index = node;
else {
while (list != NULL) {
next = list->next;
if (next == NULL) {
list->next = node;
break;
}
list = next;
}
}
}
/* forward declarations */
#define property_exists( port, key ) hash_lookup( (hash_t*) port->table, (const void*) key )
#define atom_store__(value) {\
for (i = 0; i < d->num_elements; i++)\
d->elements.array[i] = livido_put_atom(port, &value[i], v ); }
#define array_load__(value) {\
for( i = 0; i < t->num_elements ; i ++ )\
memcpy( &value[i], t->elements.array[i]->value, t->elements.array[i]->size ); }
/* fast key hashing */
static inline int hash_key_code(const char *key)
{
int hash = 0;
while (*key) {
hash <<= 1;
if (hash < 0)
hash |= 1;
hash ^= *key++;
}
return hash;
}
static int livido_property_finalize(livido_port_t * p, const char *key)
{
vevo_port_t *port = (vevo_port_t *) p;
hnode_t *node = NULL;
int hash_key = hash_key_code(key);
if ((node = property_exists(port, hash_key)) != NULL) {
livido_storage_t *stor = (livido_storage_t *) hnode_get(node);
stor->flags |= LIVIDO_PROPERTY_READONLY;
hnode_t *new_node = hnode_create((void *) stor);
hnode_put(new_node, (void *) hash_key);
hnode_destroy(new_node);
}
return LIVIDO_NO_ERROR;
}
static int atom_get_value(livido_storage_t * t, int idx, void *dst)
{
#ifdef STRICT_CHECKING
assert(t != NULL);
assert(dst != NULL);
#endif
atom_t *atom = NULL;
if (t->num_elements == 1 && idx == 0)
atom = t->elements.atom;
if (t->num_elements > 1 && idx >= 0 && idx <= t->num_elements)
atom = t->elements.array[idx];
if (!atom)
return LIVIDO_ERROR_NOSUCH_ELEMENT;
if (atom->size <= 0)
return LIVIDO_NO_ERROR;
if (t->atom_type != LIVIDO_ATOM_TYPE_STRING) {
memcpy(dst, atom->value, atom->size);
} else {
char **ptr = (char **) dst;
char *p = *ptr;
memcpy(p, atom->value, (atom->size - 1));
p[atom->size - 1] = '\0';
}
return LIVIDO_NO_ERROR;
}
static size_t livido_atom_size(int atom_type)
{
switch (atom_type) {
case LIVIDO_ATOM_TYPE_DOUBLE:
return sizeof(double);
case LIVIDO_ATOM_TYPE_INT:
return sizeof(int32_t);
case LIVIDO_ATOM_TYPE_VOIDPTR:
return sizeof(void *);
case LIVIDO_ATOM_TYPE_STRING:
return 0;
case LIVIDO_ATOM_TYPE_PORTPTR:
return sizeof(livido_port_t *);
case LIVIDO_ATOM_TYPE_BOOLEAN:
return sizeof(int32_t);
default:
#ifdef STRICT_CHECKING
assert(0);
#endif
break;
}
return 0;
}
static atom_t *livido_new_atom(vevo_port_t * port, int atom_type,
size_t atom_size)
{
#ifdef VEVO_MEMPOOL
atom_t *atom = (atom_t *) vevo_malloc(port->pool, ATOM_ATOM);
#else
atom_t *atom = (atom_t *) malloc(sizeof(atom_t));
#endif
#ifdef STRICT_CHECKING
assert(atom != NULL);
#endif
atom->size = atom_size;
#ifndef VEVO_MEMPOOL
atom->value = (atom_size > 0 ? (void *) malloc(atom_size) : NULL);
#else
atom->type = port->atom_types[atom_type];
if (atom->type >= 0) {
atom->value =
(atom_size >
0 ? (void *) vevo_malloc(port->pool, atom->type) : NULL);
} else
atom->value = (atom_size > 0 ? (void *) malloc(atom_size) : NULL);
#endif
#ifdef STRICT_CHECING
assert(atom->value != NULL);
#endif
return atom;
}
static void livido_free_atom(void *pool, atom_t * atom)
{
#ifdef STRICT_CHECKING
assert(atom != NULL);
#endif
if (atom) {
#ifndef VEVO_MEMPOOL
free(atom->value);
free(atom);
#else
if (atom->type >= 0)
vevo_free(pool, atom->value, atom->type);
else
free(atom->value);
vevo_free(pool, atom, ATOM_ATOM);
#endif
}
atom = NULL;
}
static atom_t *livido_put_atom(vevo_port_t * port, void *dst,
int atom_type)
{
atom_t *atom = NULL;
size_t atom_size = livido_atom_size(atom_type);
if (atom_type == LIVIDO_ATOM_TYPE_STRING) {
char **s = (char **) dst;
atom_size = strlen(*s) + 1;
atom = livido_new_atom(port, atom_type, atom_size);
if (atom_size > 0)
memcpy(atom->value, *s, (atom_size - 1));
} else {
#ifdef STRICT_CHECKING
assert(atom_size > 0);
assert(dst != NULL);
#endif
atom = livido_new_atom(port, atom_type, atom_size);
#ifdef STRICT_CHECING
assert(atom != NULL);
assert(atom->value != NULL);
#else
if (!atom)
return NULL;
#endif
memcpy(atom->value, dst, atom_size);
}
return atom;
}
static void
storage_put_atom_value(vevo_port_t * port, void *src, int n,
livido_storage_t * d, int v)
{
int i;
#ifdef STRICT_CHECKING
if (n > 0)
assert((src != NULL));
#endif
if (d->num_elements >= 0) {
if (d->num_elements >= 0 && d->num_elements <= 1) {
if (d->elements.atom)
livido_free_atom(port->pool, d->elements.atom);
} else if (d->num_elements > 1) {
if (d->elements.array) {
for (i = 0; i < d->num_elements; i++)
livido_free_atom(port->pool, d->elements.array[i]);
free(d->elements.array);
}
}
}
d->atom_type = v;
d->num_elements = n;
switch (n) {
case 0:
d->elements.atom = livido_new_atom(port, v, livido_atom_size(v));
break;
case 1:
d->elements.atom = livido_put_atom(port, src, v);
break;
default:
d->elements.array = (atom_t **) malloc(sizeof(atom_t *) * n);
if (d->atom_type == LIVIDO_ATOM_TYPE_DOUBLE) {
double *value = (double *) src;
atom_store__(value);
} else {
if (d->atom_type == LIVIDO_ATOM_TYPE_INT
|| d->atom_type == LIVIDO_ATOM_TYPE_BOOLEAN) {
int32_t *value = (int *) src;
atom_store__(value);
} else {
void **value = (void **) src;
atom_store__(value);
}
}
break;
}
}
static inline livido_storage_t *livido_new_storage(int num_elements)
{
livido_storage_t *d =
(livido_storage_t *) malloc(sizeof(livido_storage_t));
#ifdef HAVE_STRICT
assert(d != NULL);
#endif
d->elements.atom = NULL;
d->num_elements = num_elements;
d->flags = 0;
return d;
}
static inline void livido_free_storage(void *pool, livido_storage_t * t)
{
if (t) {
if (t->num_elements > 1) {
int i;
for (i = 0; i < t->num_elements; i++)
livido_free_atom(pool, t->elements.array[i]);
free(t->elements.array);
}
if (t->num_elements <= 1)
livido_free_atom(pool, t->elements.atom);
free(t);
}
t = NULL;
}
static inline hash_val_t int_hash(const void *key)
{
return (hash_val_t) key;
}
static inline int key_compare(const void *key1, const void *key2)
{
return ((int) key1 == (int) key2 ? 0 : 1);
}
int livido_property_num_elements(livido_port_t * p, const char *key)
{
#ifdef STRICT_CHECKING
assert(p != NULL);
assert(key != NULL);
#endif
vevo_port_t *port = (vevo_port_t *) p;
hnode_t *node = NULL;
int hash_key = hash_key_code(key);
if ((node = property_exists(port, hash_key)) != NULL) {
livido_storage_t *stor = (livido_storage_t *) hnode_get(node);
if (stor)
return stor->num_elements;
}
return -1;
}
int livido_property_atom_type(livido_port_t * p, const char *key)
{
#ifdef STRICT_CHECKING
assert(p != NULL);
assert(key != NULL);
#endif
vevo_port_t *port = (vevo_port_t *) p;
#ifdef STRICT_CHECKING
assert(port != NULL);
assert(port->table != NULL);
assert(hash_verify(port->table) != 0);
#endif
hnode_t *node = NULL;
int hash_key = hash_key_code(key);
if ((node = property_exists(port, hash_key)) != NULL) {
livido_storage_t *stor = (livido_storage_t *) hnode_get(node);
if (stor)
return stor->atom_type;
}
return -1;
}
size_t
livido_property_element_size(livido_port_t * p, const char *key,
const int idx)
{
#ifdef STRICT_CHECKING
assert(p != NULL);
assert(key != NULL);
#endif
vevo_port_t *port = (vevo_port_t *) p;
hnode_t *node = NULL;
int hash_key = hash_key_code(key);
if ((node = property_exists(port, hash_key)) != NULL) {
livido_storage_t *stor = (livido_storage_t *) hnode_get(node);
#ifdef STRICT_CHECKING
assert(stor != NULL);
#endif
//todo: sum all element sizes for index of -1
if (stor->num_elements == 1) {
return stor->elements.atom->size;
} else if (stor->num_elements > 1) {
#ifdef STRICT_CHECKING
assert(idx >= 0);
assert(idx < stor->num_elements);
assert(stor->elements.array[idx] != NULL);
#endif
return stor->elements.array[idx]->size;
} else {
if (stor->num_elements == 0)
return 0;
}
}
return -1;
}
livido_port_t *livido_port_new(int port_type)
{
vevo_port_t *port = (vevo_port_t *) malloc(sizeof(vevo_port_t));
#ifdef STRICT_CHECKING
assert(port != NULL);
#endif
port->index = NULL;
port->table = hash_create(HASHCOUNT_T_MAX, key_compare, int_hash);
#ifdef STRICT_CHECKING
assert(port->table != NULL);
#endif
#ifdef VEVO_MEMPOOL
port->pool = vevo_new_pool();
port->atom_types[LIVIDO_ATOM_TYPE_INT] = ATOM_INT;
port->atom_types[LIVIDO_ATOM_TYPE_DOUBLE] = ATOM_DBL;
port->atom_types[LIVIDO_ATOM_TYPE_BOOLEAN] = ATOM_INT;
port->atom_types[LIVIDO_ATOM_TYPE_VOIDPTR] = ATOM_PTR;
port->atom_types[LIVIDO_ATOM_TYPE_PORTPTR] = ATOM_PTR;
port->atom_types[LIVIDO_ATOM_TYPE_STRING] = -1;
#else
port->pool = NULL;
#endif
livido_property_set(port, "type", LIVIDO_ATOM_TYPE_INT, 1, &port_type);
#ifdef STRICT_CHECKING
int hash_key = hash_key_code("type");
assert(property_exists(port, hash_key) != NULL);
#endif
livido_property_finalize(port, "type");
#ifdef STRICT_CHECKING
assert(livido_property_set
(port, "type", LIVIDO_ATOM_TYPE_INT, 1, &port_type)
!= LIVIDO_PROPERTY_READONLY);
#endif
return (livido_port_t *) port;
}
void livido_port_free(livido_port_t * p)
{
vevo_port_t *port = (vevo_port_t *) p;
if (port) {
#ifdef STRICT_CHECKING
assert(port->table != NULL);
#endif
if (!hash_isempty((hash_t *) port->table)) {
hscan_t scan;
hash_scan_begin(&scan, (hash_t *) port->table);
hnode_t *node;
while ((node = hash_scan_next(&scan)) != NULL) {
livido_storage_t *stor;
stor = hnode_get(node);
#ifdef STRICT_CHECKING
assert(stor != NULL);
assert(node != NULL);
assert((const char *) hnode_getkey(node) != NULL);
#endif
livido_free_storage(port->pool, stor);
}
hash_free_nodes((hash_t *) port->table);
hash_destroy((hash_t *) port->table);
}
if (port->index) {
port_index_t *l = port->index;
port_index_t *n = NULL;
while (l != NULL) {
n = l->next;
port_node_free(l);
l = n;
}
}
#ifdef VEVO_MEMPOOL
vevo_free_pool(port->pool);
#endif
free(port);
}
port = NULL;
}
int
livido_property_set(livido_port_t * p,
const char *key,
int atom_type, int num_elements, void *src)
{
#ifdef STRICT_CHECKING
assert(p != NULL);
#endif
vevo_port_t *port = (vevo_port_t *) p;
hnode_t *old_node = NULL;
int hash_key = hash_key_code(key);
if ((old_node = property_exists(port, hash_key)) != NULL) {
livido_storage_t *oldstor =
(livido_storage_t *) hnode_get(old_node);
if (oldstor->atom_type != atom_type)
return LIVIDO_ERROR_WRONG_ATOM_TYPE;
if (oldstor->flags & LIVIDO_PROPERTY_READONLY)
return LIVIDO_ERROR_PROPERTY_READONLY;
livido_free_storage(port->pool, oldstor);
hash_delete((hash_t *) port->table, old_node);
hnode_destroy(old_node);
} else {
#ifdef VEVO_MEMPOOL
if (!vevo_pool_verify(port->pool))
return LIVIDO_ERROR_MEMORY_ALLOCATION;
#endif
port_node_append(port, key, hash_key);
}
livido_storage_t *stor = livido_new_storage(num_elements);
#ifdef STRICT_CHECKING
assert(stor != NULL);
#endif
storage_put_atom_value(port, src, num_elements, stor, atom_type);
hnode_t *node = hnode_create(stor);
#ifdef STRICT_CHECKING
assert(node != NULL);
assert(!hash_isfull((hash_t *) port->table));
assert(!property_exists(port, hash_key));
#endif
hash_insert((hash_t *) port->table, node, (const void *) hash_key);
return LIVIDO_NO_ERROR;
}
int
livido_property_get(livido_port_t * p, const char *key, int idx, void *dst)
{
#ifdef STRICT_CHECKING
assert(p != NULL);
#endif
vevo_port_t *port = (vevo_port_t *) p;
#ifdef STRICT_CHECKING
assert(port->table != NULL);
assert(key != NULL);
#endif
hnode_t *node = NULL;
int hash_key = hash_key_code(key);
if ((node = property_exists(port, hash_key)) != NULL) {
if (dst == NULL)
return LIVIDO_NO_ERROR;
else {
livido_storage_t *stor = hnode_get(node);
#ifdef STRICT_CHECKING
assert(stor != NULL);
#endif
return atom_get_value(stor, idx, dst);
}
}
return LIVIDO_ERROR_NOSUCH_PROPERTY;
}
char **livido_list_properties(livido_port_t * p)
{
vevo_port_t *port = (vevo_port_t *) p;
#ifdef STRICT_CHECKING
assert(port != NULL);
assert(port->table != NULL);
assert(hash_isempty((hash_t *) port->table) == 0);
#endif
char **list = NULL;
#ifdef STRICT_CHECKING
int nn = 1 + hash_count((hash_t *) port->table);
#endif
int n = 1; // null terminated list of keys
int i = 0;
port_index_t *l = port->index;
while (l != NULL) {
l = l->next;
n++;
}
#ifdef STRICT_CHECKING
assert(nn == n);
#endif
list = (char **) malloc(sizeof(char *) * n);
if (!list)
return NULL;
l = (port_index_t *) port->index;
i = 0;
while (l != NULL) {
list[i] = (char *) strdup(l->key);
#ifdef STRICT_CHECING
assert(list[i] != NULL);
#endif
l = l->next;
i++;
}
list[i] = NULL;
return list;
}

1
vevo-mpool/stamp-h.in Normal file
View File

@@ -0,0 +1 @@
timestamp

View File

@@ -0,0 +1,19 @@
INCLUDES = -I$(top_srcdir)/include \
-I$(top_srcdir) -I$(includedir) \
-DG_LOG_DOMAIN=\"libvido\" -DLIBVIDO_VERSION=\"$(VERSION)\"
LIBVEVO = $(top_builddir)/src/libvevo.la
# *********************************************************************
# The tools themselves
EXAMPLES_BIN = vevotest vevobench vevoutils
bin_PROGRAMS = $(EXAMPLES_BIN)
vevotest_SOURCES = vevotest.c
vevotest_LDADD = $(LIBVEVO) -ldl
vevobench_SOURCES = vevobenchmark.c
vevobench_LDADD = $(LIBVEVO) -ldl
vevoutils_SOURCES = vevoutilstest.c
vevoutils_LDADD = $(LIBVEVO) -ldl

490
vevo-mpool/test/Makefile.in Normal file
View File

@@ -0,0 +1,490 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SOURCES = $(vevobench_SOURCES) $(vevotest_SOURCES) $(vevoutils_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = $(am__EXEEXT_1)
subdir = test
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__EXEEXT_1 = vevotest$(EXEEXT) vevobench$(EXEEXT) vevoutils$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_vevobench_OBJECTS = vevobenchmark.$(OBJEXT)
vevobench_OBJECTS = $(am_vevobench_OBJECTS)
am__DEPENDENCIES_1 = $(top_builddir)/src/libvevo.la
vevobench_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_vevotest_OBJECTS = vevotest.$(OBJEXT)
vevotest_OBJECTS = $(am_vevotest_OBJECTS)
vevotest_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_vevoutils_OBJECTS = vevoutilstest.$(OBJEXT)
vevoutils_OBJECTS = $(am_vevoutils_OBJECTS)
vevoutils_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(vevobench_SOURCES) $(vevotest_SOURCES) \
$(vevoutils_SOURCES)
DIST_SOURCES = $(vevobench_SOURCES) $(vevotest_SOURCES) \
$(vevoutils_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
INCLUDES = -I$(top_srcdir)/include \
-I$(top_srcdir) -I$(includedir) \
-DG_LOG_DOMAIN=\"libvido\" -DLIBVIDO_VERSION=\"$(VERSION)\"
LIBVEVO = $(top_builddir)/src/libvevo.la
# *********************************************************************
# The tools themselves
EXAMPLES_BIN = vevotest vevobench vevoutils
vevotest_SOURCES = vevotest.c
vevotest_LDADD = $(LIBVEVO) -ldl
vevobench_SOURCES = vevobenchmark.c
vevobench_LDADD = $(LIBVEVO) -ldl
vevoutils_SOURCES = vevoutilstest.c
vevoutils_LDADD = $(LIBVEVO) -ldl
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu test/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
vevobench$(EXEEXT): $(vevobench_OBJECTS) $(vevobench_DEPENDENCIES)
@rm -f vevobench$(EXEEXT)
$(LINK) $(vevobench_LDFLAGS) $(vevobench_OBJECTS) $(vevobench_LDADD) $(LIBS)
vevotest$(EXEEXT): $(vevotest_OBJECTS) $(vevotest_DEPENDENCIES)
@rm -f vevotest$(EXEEXT)
$(LINK) $(vevotest_LDFLAGS) $(vevotest_OBJECTS) $(vevotest_LDADD) $(LIBS)
vevoutils$(EXEEXT): $(vevoutils_OBJECTS) $(vevoutils_DEPENDENCIES)
@rm -f vevoutils$(EXEEXT)
$(LINK) $(vevoutils_LDFLAGS) $(vevoutils_OBJECTS) $(vevoutils_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vevobenchmark.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vevotest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vevoutilstest.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -0,0 +1,116 @@
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <include/vevo.h>
#include <include/livido.h>
#include <sys/time.h>
static struct {
int32_t iv;
double dv;
char *sv;
int32_t *bv;
} fundementals[] = {
{
10, 123.123, "parameter value 1", FALSE}, {
20, 1234567, "parameter value 2", TRUE}, {
1234, 0.123456, "parameter value 3", FALSE}, {
65535, 0.999123, "parameter value 4", TRUE}, {
0, 0.0, NULL, FALSE}
};
static int fundemental_index = 0;
static int stats[2] = { 0, 0 };
int test_fundemental_atoms(livido_port_t * port)
{
livido_property_set(port, "int_value", LIVIDO_ATOM_TYPE_INT, 1,
&(fundementals[fundemental_index].iv));
livido_property_set(port, "double_value", LIVIDO_ATOM_TYPE_DOUBLE, 1,
&(fundementals[fundemental_index].dv));
// livido_property_set(port, "string_value", LIVIDO_ATOM_TYPE_STRING, 1,
// &(fundementals[fundemental_index].sv));
livido_property_set(port, "bool_value", LIVIDO_ATOM_TYPE_INT, 1,
&(fundementals[fundemental_index].bv));
fundemental_index++;
stats[0] += 4;
return 0;
}
long get_work_size(livido_port_t * port)
{
long mem_size = 0;
mem_size += livido_property_element_size(port, "int_value", 0);
mem_size += livido_property_element_size(port, "double_value", 0);
// mem_size += livido_property_element_size(port, "string_value", 0);
mem_size += livido_property_element_size(port, "bool_value", 0);
return mem_size;
}
void dump_port(livido_port_t * port)
{
int32_t int_value = 0;
double double_value = 0.0;
char *string_value;
int32_t bool_value = FALSE;
livido_property_get(port, "int_value", 0, &int_value);
livido_property_get(port, "double_value", 0, &double_value);
//string_value =
// (char *)
// malloc(livido_property_element_size(port, "string_value", 0));
//livido_property_get(port, "string_value", 0, &string_value);
livido_property_get(port, "bool_value", 0, &bool_value);
//free(string_value);
stats[1] += 4;
}
int main(int argc, char *argv[])
{
struct timeval start, end;
struct timeval tv;
struct tm *ptm;
memset(&start, 0, sizeof(struct timeval));
memset(&end, 0, sizeof(struct timeval));
memset(&tv, 0, sizeof(struct timeval));
livido_port_t *port = livido_port_new(0);
int max = 100;
int i = 0;
if (argc == 2)
max = atoi(argv[1]);
gettimeofday(&start, NULL);
for (i = 0; i < max; i++) // get and set 16 properties per cycle
{
/* test 4 parameters, with only fundementals. 1 put and 1 get per property */
while (fundementals[fundemental_index].sv != NULL) {
test_fundemental_atoms(port);
dump_port(port);
}
fundemental_index = 0;
}
gettimeofday(&end, NULL);
tv.tv_sec = end.tv_sec - start.tv_sec;
tv.tv_usec = end.tv_usec - start.tv_usec;
float seconds = (float) tv.tv_sec;
seconds += (tv.tv_usec / 1000000.0);
livido_port_free(port);
printf("Bench: %ld Atoms put and get in %4.4f seconds\n", (stats[0] + stats[1]), seconds );
printf("\t %ld Atoms per second\n", (long)( (float) stats[0]/seconds ));
if (argc <= 1 || argc > 2)
printf("Hint: use vevobench <number> \n");
return 0;
}

245
vevo-mpool/test/vevotest.c Normal file
View File

@@ -0,0 +1,245 @@
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <include/vevo.h>
#include <include/livido.h>
static struct {
int32_t iv;
double dv;
char *sv;
int32_t bv;
} fundementals[] = {
{
10, 123.123, "a medium length string to store", FALSE}, {
20, 999.567, "some other string", TRUE}, {
1234, 0.123456, "and another", FALSE}, {
65535, 0.999123, "this is getting very boring", TRUE}, {
0, 0.0, NULL, FALSE}
};
static struct {
int32_t iv[4];
double dv[4];
char *sv[4];
int32_t bv[4];
} arrays[] = {
{ {
1, 2, 3, 4}, {
1.0, 2.0, 3.0, 4.0}, {
"abc", "meet", "work", "beer"}, {
FALSE, TRUE, TRUE, TRUE}}, { {
5, 6, 7, 8}, {
1.1, 2.1, 3.1, 4.1}, {
"livido", "src", "gpl", "segfault"}, {
FALSE, TRUE, FALSE, TRUE}}, { {
9, 10, 11, 12}, {
11.11, 12.12, 13.13, 14.14}, {
"freeze", "unfreeze", "overlay", "multiply"}, {
FALSE, FALSE, FALSE, FALSE}},};
static int array_index = 0;
static int fundemental_index = 0;
int test_fundemental_atoms(livido_port_t * port)
{
livido_property_set(port, "int_value", LIVIDO_ATOM_TYPE_INT, 1,
&(fundementals[fundemental_index].iv));
livido_property_set(port, "double_value", LIVIDO_ATOM_TYPE_DOUBLE, 1,
&(fundementals[fundemental_index].dv));
livido_property_set(port, "string_value", LIVIDO_ATOM_TYPE_STRING, 1,
&(fundementals[fundemental_index].sv));
livido_property_set(port, "bool_value", LIVIDO_ATOM_TYPE_BOOLEAN, 1,
&(fundementals[fundemental_index].bv));
fundemental_index++;
return 0;
}
void test_arrays(livido_port_t * port)
{
livido_property_set(port, "int_values", LIVIDO_ATOM_TYPE_INT, 4,
&(arrays[array_index].iv));
livido_property_set(port, "double_values", LIVIDO_ATOM_TYPE_DOUBLE, 4,
&(arrays[array_index].dv));
livido_property_set(port, "string_values", LIVIDO_ATOM_TYPE_STRING, 4,
&(arrays[array_index].sv));
livido_property_set(port, "bool_values", LIVIDO_ATOM_TYPE_BOOLEAN, 4,
&(arrays[array_index].bv));
array_index++;
}
void test_store_empty_atoms(livido_port_t * port)
{
livido_property_set(port, "empty_double", LIVIDO_ATOM_TYPE_DOUBLE, 0 , NULL );
livido_property_set(port, "empty_string", LIVIDO_ATOM_TYPE_STRING,0, NULL );
livido_property_set(port, "empty_bool", LIVIDO_ATOM_TYPE_BOOLEAN, 0, NULL );
livido_property_set(port, "empty_int", LIVIDO_ATOM_TYPE_INT,0, NULL );
livido_property_set(port, "empty_array", LIVIDO_ATOM_TYPE_PORTPTR,0,NULL);
}
void dump_empty_atoms(livido_port_t * port)
{
if (livido_property_get(port, "ghost", 0, NULL) == LIVIDO_NO_ERROR) {
printf("\tEmpty property 'ghost' exists\n");
}
if( livido_property_get(port , "empty_string", 0,NULL ) == LIVIDO_NO_ERROR )
printf("\tProperty '%s' exists\n", "empty_string" );
if( livido_property_get(port , "empty_bool", 0,NULL ) == LIVIDO_NO_ERROR )
printf("\tProperty '%s' exists\n", "empty_bool" );
if( livido_property_get(port , "empty_int", 0,NULL ) == LIVIDO_NO_ERROR )
printf("\tProperty '%s' exists\n", "empty_int" );
if( livido_property_get(port , "empty_double", 0,NULL ) == LIVIDO_NO_ERROR )
printf("\tProperty '%s' exists\n", "empty_double" );
int i;
for(i =0; i < 4; i ++ )
{
if( livido_property_get(port , "empty_array", 0,NULL ) == LIVIDO_NO_ERROR )
printf("\tProperty '%s' exists , element %d has size %d\n", "empty_array",
i, livido_property_element_size( port, "empty_array", 0) );
}
}
void break_here()
{
}
void dump_arrays(livido_port_t * port)
{
int32_t int_value = 0;
double double_value = 0.0;
char *string_value = NULL;
int32_t bool_value = 0;
/* allocate space for string list */
int j;
for (j = 0; j < 4; j++) {
livido_property_get(port, "int_values", j, &int_value);
printf("\tElement %d of int_values has value %d\n", j, int_value);
livido_property_get(port, "double_values", j, &double_value);
printf("\tElement %d of double_values has value %g\n", j,
double_value);
int ssize = livido_property_element_size(port, "string_values", j);
string_value = (char *) malloc(sizeof(char) * ssize);
livido_property_get(port, "string_values", j, &string_value);
printf("\tElement %d of string_values has value '%s'\n", j,
string_value);
free(string_value);
livido_property_get(port, "bool_values", j, &bool_value);
printf("\tElement %d of bool_values has value %d\n", j,
bool_value);
}
}
void dump_port(livido_port_t * port)
{
int32_t int_value = 0;
double double_value = 0.0;
int32_t bool_value = FALSE;
livido_property_get(port, "int_value", 0, &int_value);
livido_property_get(port, "double_value", 0, &double_value);
char *string_value =
(char *)
malloc(livido_property_element_size(port, "string_value", 0));
livido_property_get(port, "string_value", 0, &string_value);
livido_property_get(port, "bool_value", 0, &bool_value);
printf("\tProperty int_value has value %d\n", int_value);
printf("\tProperty double_value has value %g\n", double_value);
printf("\tProperty string value has value '%s'\n", string_value);
printf("\tProperty bool value has value %d\n", bool_value);
free(string_value);
}
void dump_ptr_port(livido_port_t * port)
{
int i;
for (i = 0; i < 4; i++) {
uint8_t *plane;
livido_property_get(port, "pixeldata", i, &plane);
printf("\tProperty pixeldata by index %d = %p\n", i, plane);
}
for (i = 0; i < 4; i++) {
void *p = NULL;
livido_property_get(port, "ports", i, &p);
printf("\tProperty ports by index %d = %p\n", i, p);
}
}
int main(int argc, char *argv[])
{
void *port = livido_port_new(0);
printf("Testing fundementals\n");
while (fundementals[fundemental_index].sv != NULL) {
test_fundemental_atoms(port);
dump_port(port);
}
printf("Test voidptr and portptr atom types\n");
uint8_t *pixel_data[4];
int i;
for (i = 0; i < 4; i++)
pixel_data[i] = (uint8_t *) malloc(sizeof(uint8_t) * 100);
printf("\tpixel_data %p, %p, %p, %p\n",
pixel_data[0], pixel_data[1], pixel_data[2], pixel_data[3]);
livido_port_t *ports[4] = { port, port, port, port };
printf("\tport__data %p, %p, %p, %p\n", (void *) port, (void *) port,
(void *) port, (void *) port);
livido_property_set(port, "pixeldata", LIVIDO_ATOM_TYPE_VOIDPTR, 4,
&pixel_data);
livido_property_set(port, "ports", LIVIDO_ATOM_TYPE_PORTPTR, 4,
&ports);
dump_ptr_port(port);
printf("Testing storing empty atoms of any type\n");
test_store_empty_atoms(port);
dump_empty_atoms(port);
for (i = 0; i < 3; i++) {
printf("Test arrays of fundementals\n");
test_arrays(port);
dump_arrays(port);
}
printf("Freeing port %p\n", port);
printf("Dumping properties in port %p\n", port);
char **list = livido_list_properties(port);
livido_port_free(port);
for (i = 0; list[i] != NULL; i++) {
printf("\tproperty %s\n", list[i]);
free(list[i]);
}
if (list)
free(list);
for (i = 0; i < 4; i++)
free(pixel_data[i]);
return 1;
}

View File

@@ -0,0 +1,34 @@
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <include/vevo.h>
#include <include/livido.h>
#include <src/vevo-utils.c>
int main(int argc, char *argv[])
{
livido_port_t *filter = livido_new_filter_class ( 5,
"Negation",
"Niels Elburg",
"Example plugin",
0,
"GNU GPL" );
char **list = livido_list_properties(filter);
int i;
for (i = 0; list[i] != NULL; i++) {
printf("\tproperty %s\n", list[i]);
free(list[i]);
}
if (list)
free(list);
livido_port_free( filter );
return 1;
}

106
vevo-mpool/vevo-config.in Executable file
View File

@@ -0,0 +1,106 @@
#!/bin/sh
# vevo-config
#
# Tool for retrieving the library/include paths vevo libs were
# compiled with.
#
# This work is released under the GNU GPL, version 2 or later.
prefix="@prefix@"
exec_prefix="@exec_prefix@"
exec_prefix_set=no
data_dir="@datadir@/@PACKAGE@"
version="@VERSION@"
include_dir="@includedir@/@PACKAGE@"
lib_dir="@libdir@"
usage()
{
cat <<EOF
Usage: vevo-config [OPTIONS]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo_exec_prefix=yes
;;
--version)
echo $version
;;
--cflags)
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
*)
usage 1 1>&2
;;
esac
shift
done
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
cflags="-I$include_dir"
if test "$lib_dir" != "/usr/lib"; then
libs="-L$lib_dir -lvevo"
else
libs="-lvevo"
fi
if test "$echo_cflags" = "yes"; then
echo $cflags
fi
if test "$echo_libs" = "yes"; then
echo $libs
fi