First git import from SVN PureMediaServer rev 166
On branch master Initial commit new file: libremediaserver/CITPDefines.h new file: libremediaserver/MSEXDefines.h new file: libremediaserver/PacketCreator.cpp new file: libremediaserver/PacketCreator.h new file: libremediaserver/PeerInformationSocket.cpp new file: libremediaserver/PeerInformationSocket.h new file: libremediaserver/citp-lib.cpp new file: libremediaserver/citp-lib.h new file: libremediaserver/doc/LICENSE.txt new file: libremediaserver/doc/changelog.txt new file: libremediaserver/doc/instalacion.txt new file: libremediaserver/doc/install.txt new file: libremediaserver/doc/leeme.txt new file: libremediaserver/doc/manual.txt new file: libremediaserver/doc/manual_en.txt new file: libremediaserver/doc/manual_es.txt new file: libremediaserver/doc/readme.txt new file: libremediaserver/doc/todo.txt new file: libremediaserver/externals/artnetin/ChangeLog.txt new file: libremediaserver/externals/artnetin/LICENSE.txt new file: libremediaserver/externals/artnetin/Makefile new file: libremediaserver/externals/artnetin/README.txt new file: libremediaserver/externals/artnetin/artnet.h new file: libremediaserver/externals/artnetin/artnetin-help.pd new file: libremediaserver/externals/artnetin/artnetin-meta.pd new file: libremediaserver/externals/artnetin/artnetin.c new file: libremediaserver/externals/artnetin/examples/artnetin.pd new file: libremediaserver/externals/artnetin/m_pd.h new file: libremediaserver/externals/artnetin/manual/manual.txt new file: libremediaserver/externals/ola2pd/LICENSE.txt new file: libremediaserver/externals/ola2pd/leeme.txt new file: libremediaserver/externals/ola2pd/main.cpp new file: libremediaserver/externals/ola2pd/ola2pd.pd_linux new file: libremediaserver/externals/ola2pd/ola2pd_help.pd new file: libremediaserver/externals/ola2pd/package.txt new file: libremediaserver/externals/ola2pd/readme.txt new file: libremediaserver/externals/pix2jpg/LICENSE.txt new file: libremediaserver/externals/pix2jpg/Makefile new file: libremediaserver/externals/pix2jpg/Makefile.am new file: libremediaserver/externals/pix2jpg/Makefile.in new file: libremediaserver/externals/pix2jpg/pix2jpg-help.pd new file: libremediaserver/externals/pix2jpg/pix2jpg.cpp new file: libremediaserver/externals/pix2jpg/pix2jpg.h new file: libremediaserver/externals/pix2jpg/pix2jpg.pd_linux new file: libremediaserver/layer.pd new file: libremediaserver/layer_audio.pd new file: libremediaserver/libremediaserver.cpp new file: libremediaserver/libremediaserver.h new file: libremediaserver/libremediaserver.pro new file: libremediaserver/libremediaserver.ui new file: libremediaserver/main.cpp new file: libremediaserver/msex.cpp new file: libremediaserver/msex.h new file: libremediaserver/pms-audio.pd new file: libremediaserver/pms-video.pd new file: libremediaserver/recursos/LMS.shw new file: libremediaserver/recursos/LibreMediaServer_Audio.hed new file: libremediaserver/recursos/LibreMediaServer_Video.hed new file: libremediaserver/scripts/extended_desktop.sh new file: libremediaserver/scripts/install_precise.sh new file: libremediaserver/scripts/install_squeeze.sh new file: libremediaserver/scripts/install_wheezy.sh new file: libremediaserver/scripts/make_thumbs.sh new file: libremediaserver/scripts/single_desktop.sh new file: libremediaserver/text.txt
This commit is contained in:
commit
801c29865a
65 changed files with 19915 additions and 0 deletions
22
libremediaserver/externals/artnetin/ChangeLog.txt
vendored
Executable file
22
libremediaserver/externals/artnetin/ChangeLog.txt
vendored
Executable file
|
@ -0,0 +1,22 @@
|
|||
***********************************
|
||||
Artnetin
|
||||
Santiago Noreña 2011-2012
|
||||
puremediaserver@gmail.com
|
||||
***********************************
|
||||
|
||||
* 0.0.3 (5/02/2012) SVN Rev 94
|
||||
|
||||
- Thread independiente
|
||||
- Cambio de nombres: Open y close
|
||||
- Comprobación de nodo activo antes de intentar crear otro
|
||||
- Método free y comprobación antes de salir
|
||||
|
||||
* 0.0.2 (9-06-2011) SVN Rev 58
|
||||
|
||||
- Añadidos métodos "create" y "destroy" para manejar el nodo Art-Net
|
||||
- Configuración de universo y subnet mediante patch (issue 14).
|
||||
- Limpieza Makefile.am
|
||||
|
||||
* 0.0.1 (16-05-2011)
|
||||
|
||||
- Primera versión!
|
676
libremediaserver/externals/artnetin/LICENSE.txt
vendored
Executable file
676
libremediaserver/externals/artnetin/LICENSE.txt
vendored
Executable file
|
@ -0,0 +1,676 @@
|
|||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. 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
|
||||
them 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 prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. 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.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey 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;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If 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 convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
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.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
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.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
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
|
||||
state 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program 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, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU 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 Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
360
libremediaserver/externals/artnetin/Makefile
vendored
Executable file
360
libremediaserver/externals/artnetin/Makefile
vendored
Executable file
|
@ -0,0 +1,360 @@
|
|||
## Pd library template version 1.0.9
|
||||
# For instructions on how to use this template, see:
|
||||
# http://puredata.info/docs/developer/MakefileTemplate
|
||||
LIBRARY_NAME = artnetin
|
||||
|
||||
# add your .c source files, one object per file, to the SOURCES
|
||||
# variable, help files will be included automatically, and for GUI
|
||||
# objects, the matching .tcl file too
|
||||
SOURCES = artnetin.c
|
||||
|
||||
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
|
||||
# be included automatically
|
||||
PDOBJECTS = artnetin.pd
|
||||
|
||||
# example patches and related files, in the 'examples' subfolder
|
||||
EXAMPLES = artnetin.pd
|
||||
|
||||
# manuals and related files, in the 'manual' subfolder
|
||||
MANUAL = manual.txt
|
||||
|
||||
# if you want to include any other files in the source and binary tarballs,
|
||||
# list them here. This can be anything from header files, test patches,
|
||||
# documentation, etc. README.txt and LICENSE.txt are required and therefore
|
||||
# automatically included
|
||||
EXTRA_DIST =
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
#
|
||||
# things you might need to edit if you are using other C libraries
|
||||
#
|
||||
#-------------------------------------lpthread------------------------------------------#
|
||||
|
||||
# -I"$(PD_INCLUDE)/pd" supports the header location for 0.43
|
||||
CFLAGS = -I"$(PD_INCLUDE)/pd" -Wall -W -g -I/usr/local/lib -I. -I..
|
||||
LDFLAGS = -L/usr/local/lib -I. -I..
|
||||
LIBS = -L/usr/local/lib -lartnet -lpthread -I. -I..
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
#
|
||||
# you shouldn't need to edit anything below here, if we did it right :)
|
||||
#
|
||||
#------------------------------------------------------------------------------#
|
||||
|
||||
# get library version from meta file
|
||||
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
|
||||
|
||||
CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"'
|
||||
|
||||
PD_INCLUDE = $(PD_PATH)/include
|
||||
# where to install the library, overridden below depending on platform
|
||||
prefix = /usr/local
|
||||
libdir = $(prefix)/lib
|
||||
pkglibdir = $(libdir)/pd-externals
|
||||
objectsdir = $(pkglibdir)
|
||||
|
||||
INSTALL = install
|
||||
INSTALL_PROGRAM = $(INSTALL) -p -m 644
|
||||
INSTALL_DATA = $(INSTALL) -p -m 644
|
||||
INSTALL_DIR = $(INSTALL) -p -m 755 -d
|
||||
|
||||
ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \
|
||||
$(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows)
|
||||
|
||||
DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
|
||||
ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION)
|
||||
|
||||
UNAME := $(shell uname -s)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
CPU := $(shell uname -p)
|
||||
ifeq ($(CPU),arm) # iPhone/iPod Touch
|
||||
SOURCES += $(SOURCES_iphoneos)
|
||||
EXTENSION = pd_darwin
|
||||
OS = iphoneos
|
||||
PD_PATH = /Applications/Pd-extended.app/Contents/Resources
|
||||
IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
|
||||
CC=$(IPHONE_BASE)/gcc
|
||||
CPP=$(IPHONE_BASE)/cpp
|
||||
CXX=$(IPHONE_BASE)/g++
|
||||
ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk
|
||||
IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6
|
||||
OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS)
|
||||
LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT)
|
||||
LIBS += -lc
|
||||
STRIP = strip -x
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)
|
||||
else # Mac OS X
|
||||
SOURCES += $(SOURCES_macosx)
|
||||
EXTENSION = pd_darwin
|
||||
OS = macosx
|
||||
PD_PATH = /Applications/Pd-extended.app/Contents/Resources
|
||||
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
|
||||
# build universal 32-bit on 10.4 and 32/64 on newer
|
||||
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
|
||||
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
|
||||
else
|
||||
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
|
||||
SOURCES += $(SOURCES_iphoneos)
|
||||
endif
|
||||
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
|
||||
LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup -L/sw/lib
|
||||
# if the 'pd' binary exists, check the linking against it to aid with stripping
|
||||
LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd)
|
||||
LIBS += -lc
|
||||
STRIP = strip -x
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)
|
||||
# install into ~/Library/Pd on Mac OS X since /usr/local isn't used much
|
||||
pkglibdir=$(HOME)/Library/Pd
|
||||
endif
|
||||
endif
|
||||
# Tho Android uses Linux, we use this fake uname to provide an easy way to
|
||||
# setup all this things needed to cross-compile for Android using the NDK
|
||||
ifeq ($(UNAME),ANDROID)
|
||||
CPU := arm
|
||||
SOURCES += $(SOURCES_android)
|
||||
EXTENSION = pd_linux
|
||||
OS = android
|
||||
PD_PATH = /usr
|
||||
NDK_BASE := /usr/local/android-ndk
|
||||
NDK_PLATFORM_VERSION := 5
|
||||
NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm
|
||||
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
|
||||
NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86
|
||||
CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT)
|
||||
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS +=
|
||||
LDFLAGS += -Wl,--export-dynamic -shared
|
||||
LIBS += -lc
|
||||
STRIP := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-strip \
|
||||
--strip-unneeded -R .note -R .comment
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
|
||||
endif
|
||||
ifeq ($(UNAME),Linux)
|
||||
CPU := $(shell uname -m)
|
||||
SOURCES += $(SOURCES_linux)
|
||||
EXTENSION = pd_linux
|
||||
OS = linux
|
||||
PD_PATH = /usr
|
||||
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS += -fPIC
|
||||
LDFLAGS += -Wl,--export-dynamic -shared -fPIC
|
||||
LIBS += -lc
|
||||
STRIP = strip --strip-unneeded -R .note -R .comment
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
|
||||
endif
|
||||
ifeq ($(UNAME),GNU)
|
||||
# GNU/Hurd, should work like GNU/Linux for basically all externals
|
||||
CPU := $(shell uname -m)
|
||||
SOURCES += $(SOURCES_linux)
|
||||
EXTENSION = pd_linux
|
||||
OS = linux
|
||||
PD_PATH = /usr
|
||||
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS += -fPIC
|
||||
LDFLAGS += -Wl,--export-dynamic -shared -fPIC
|
||||
LIBS += -lc
|
||||
STRIP = strip --strip-unneeded -R .note -R .comment
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
|
||||
endif
|
||||
ifeq ($(UNAME),GNU/kFreeBSD)
|
||||
# Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals
|
||||
CPU := $(shell uname -m)
|
||||
SOURCES += $(SOURCES_linux)
|
||||
EXTENSION = pd_linux
|
||||
OS = linux
|
||||
PD_PATH = /usr
|
||||
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS += -fPIC
|
||||
LDFLAGS += -Wl,--export-dynamic -shared -fPIC
|
||||
LIBS += -lc
|
||||
STRIP = strip --strip-unneeded -R .note -R .comment
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
|
||||
endif
|
||||
ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
|
||||
CPU := $(shell uname -m)
|
||||
SOURCES += $(SOURCES_cygwin)
|
||||
EXTENSION = dll
|
||||
OS = cygwin
|
||||
PD_PATH = $(cygpath $(PROGRAMFILES))/pd
|
||||
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS +=
|
||||
LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin"
|
||||
LIBS += -lc -lpd
|
||||
STRIP = strip --strip-unneeded -R .note -R .comment
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)
|
||||
endif
|
||||
ifeq (MINGW,$(findstring MINGW,$(UNAME)))
|
||||
CPU := $(shell uname -m)
|
||||
SOURCES += $(SOURCES_windows)
|
||||
EXTENSION = dll
|
||||
OS = windows
|
||||
PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd)
|
||||
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer
|
||||
CFLAGS += -mms-bitfields
|
||||
LDFLAGS += -s -shared -Wl,--enable-auto-import
|
||||
LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" -lpd -lwsock32 -lkernel32 -luser32 -lgdi32
|
||||
STRIP = strip --strip-unneeded -R .note -R .comment
|
||||
DISTBINDIR=$(DISTDIR)-$(OS)
|
||||
endif
|
||||
|
||||
# in case somebody manually set the HELPPATCHES above
|
||||
HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd)
|
||||
|
||||
CFLAGS += $(OPT_CFLAGS)
|
||||
|
||||
|
||||
.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags $(LIBRARY_NAME)
|
||||
|
||||
all: $(SOURCES:.c=.$(EXTENSION))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -o "$*.o" -c "$*.c"
|
||||
|
||||
%.$(EXTENSION): %.o
|
||||
$(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
|
||||
chmod a-x "$*.$(EXTENSION)"
|
||||
|
||||
# this links everything into a single binary file
|
||||
$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o
|
||||
$(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS)
|
||||
chmod a-x $(LIBRARY_NAME).$(EXTENSION)
|
||||
|
||||
install: libdir_install
|
||||
|
||||
# The meta and help files are explicitly installed to make sure they are
|
||||
# actually there. Those files are not optional, then need to be there.
|
||||
libdir_install: $(SOURCES:.c=.$(EXTENSION)) install-doc install-examples install-manual
|
||||
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
$(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \
|
||||
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
test -z "$(strip $(SOURCES))" || (\
|
||||
$(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \
|
||||
$(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION))))
|
||||
test -z "$(strip $(shell ls $(SOURCES:.c=.tcl)))" || \
|
||||
$(INSTALL_DATA) $(shell ls $(SOURCES:.c=.tcl)) \
|
||||
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
test -z "$(strip $(PDOBJECTS))" || \
|
||||
$(INSTALL_DATA) $(PDOBJECTS) \
|
||||
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
|
||||
# install library linked as single binary
|
||||
single_install: $(LIBRARY_NAME) install-doc install-exec
|
||||
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
$(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
$(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION)
|
||||
|
||||
install-doc:
|
||||
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \
|
||||
$(INSTALL_DATA) $(HELPPATCHES) \
|
||||
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
|
||||
$(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt
|
||||
$(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt
|
||||
|
||||
install-examples:
|
||||
test -z "$(strip $(EXAMPLES))" || \
|
||||
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \
|
||||
for file in $(EXAMPLES); do \
|
||||
$(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \
|
||||
done
|
||||
|
||||
install-manual:
|
||||
test -z "$(strip $(MANUAL))" || \
|
||||
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \
|
||||
for file in $(MANUAL); do \
|
||||
$(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \
|
||||
done
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o)
|
||||
-rm -f -- $(SOURCES:.c=.$(EXTENSION))
|
||||
-rm -f -- $(LIBRARY_NAME).o
|
||||
-rm -f -- $(LIBRARY_NAME).$(EXTENSION)
|
||||
|
||||
distclean: clean
|
||||
-rm -f -- $(DISTBINDIR).tar.gz
|
||||
-rm -rf -- $(DISTBINDIR)
|
||||
-rm -f -- $(DISTDIR).tar.gz
|
||||
-rm -rf -- $(DISTDIR)
|
||||
-rm -f -- $(ORIGDIR).tar.gz
|
||||
-rm -rf -- $(ORIGDIR)
|
||||
|
||||
|
||||
$(DISTBINDIR):
|
||||
$(INSTALL_DIR) $(DISTBINDIR)
|
||||
|
||||
libdir: all $(DISTBINDIR)
|
||||
$(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR)
|
||||
$(INSTALL_DATA) $(SOURCES) $(DISTBINDIR)
|
||||
$(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR)
|
||||
test -z "$(strip $(EXTRA_DIST))" || \
|
||||
$(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR)
|
||||
# tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR)
|
||||
|
||||
$(DISTDIR):
|
||||
$(INSTALL_DIR) $(DISTDIR)
|
||||
|
||||
$(ORIGDIR):
|
||||
$(INSTALL_DIR) $(ORIGDIR)
|
||||
|
||||
dist: $(DISTDIR)
|
||||
$(INSTALL_DATA) Makefile $(DISTDIR)
|
||||
$(INSTALL_DATA) README.txt $(DISTDIR)
|
||||
$(INSTALL_DATA) LICENSE.txt $(DISTDIR)
|
||||
$(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR)
|
||||
test -z "$(strip $(ALLSOURCES))" || \
|
||||
$(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR)
|
||||
test -z "$(strip $(shell ls $(ALLSOURCES:.c=.tcl)))" || \
|
||||
$(INSTALL_DATA) $(shell ls $(ALLSOURCES:.c=.tcl)) $(DISTDIR)
|
||||
test -z "$(strip $(PDOBJECTS))" || \
|
||||
$(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR)
|
||||
test -z "$(strip $(HELPPATCHES))" || \
|
||||
$(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR)
|
||||
test -z "$(strip $(EXTRA_DIST))" || \
|
||||
$(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR)
|
||||
test -z "$(strip $(EXAMPLES))" || \
|
||||
$(INSTALL_DIR) $(DISTDIR)/examples && \
|
||||
for file in $(EXAMPLES); do \
|
||||
$(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \
|
||||
done
|
||||
test -z "$(strip $(MANUAL))" || \
|
||||
$(INSTALL_DIR) $(DISTDIR)/manual && \
|
||||
for file in $(MANUAL); do \
|
||||
$(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \
|
||||
done
|
||||
tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR)
|
||||
|
||||
# make a Debian source package
|
||||
dpkg-source:
|
||||
debclean
|
||||
make distclean dist
|
||||
mv $(DISTDIR) $(ORIGDIR)
|
||||
tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR)
|
||||
rm -f -- $(DISTDIR).tar.gz
|
||||
rm -rf -- $(DISTDIR) $(ORIGDIR)
|
||||
cd .. && dpkg-source -b $(LIBRARY_NAME)
|
||||
|
||||
etags:
|
||||
etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h
|
||||
|
||||
showsetup:
|
||||
@echo "CFLAGS: $(CFLAGS)"
|
||||
@echo "LDFLAGS: $(LDFLAGS)"
|
||||
@echo "LIBS: $(LIBS)"
|
||||
@echo "PD_INCLUDE: $(PD_INCLUDE)"
|
||||
@echo "PD_PATH: $(PD_PATH)"
|
||||
@echo "objectsdir: $(objectsdir)"
|
||||
@echo "LIBRARY_NAME: $(LIBRARY_NAME)"
|
||||
@echo "LIBRARY_VERSION: $(LIBRARY_VERSION)"
|
||||
@echo "SOURCES: $(SOURCES)"
|
||||
@echo "PDOBJECTS: $(PDOBJECTS)"
|
||||
@echo "ALLSOURCES: $(ALLSOURCES)"
|
||||
@echo "UNAME: $(UNAME)"
|
||||
@echo "CPU: $(CPU)"
|
||||
@echo "pkglibdir: $(pkglibdir)"
|
||||
@echo "DISTDIR: $(DISTDIR)"
|
||||
@echo "ORIGDIR: $(ORIGDIR)"
|
51
libremediaserver/externals/artnetin/README.txt
vendored
Executable file
51
libremediaserver/externals/artnetin/README.txt
vendored
Executable file
|
@ -0,0 +1,51 @@
|
|||
******************************
|
||||
Artnetin 0.0.3
|
||||
Santiago Noreña
|
||||
puremediaserver@gmail.com
|
||||
|
||||
Based on previous works by:
|
||||
* Dirk Jagdmann (doj@cubic.org) dmxmonitor
|
||||
* Simon Newton (nomis52@westnet.com.au) Modified dmxmonitor to use ArtNet
|
||||
* Patrick Sébastien (http://www.workinprogress.ca/) pure data external pthread template
|
||||
|
||||
libartnet es parte del proyecto Open Lighting Arquitecture y (c) por Simon Newton
|
||||
|
||||
******************************
|
||||
|
||||
Artnetin es un objeto de Pure Data que permite leer un universo entero de ArtNet y tratarlo como una lista de enteros en Pure Data.
|
||||
|
||||
*****************************
|
||||
|
||||
Instalación:
|
||||
|
||||
1. Compila e instala libartnet:
|
||||
|
||||
cd libartnet-1.1.0
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
2. Compila artnetin:
|
||||
make
|
||||
|
||||
3. Copia el archivo artnetin.pd_linux en una localización dentro del path de Pure Data, o añade el path a Pure Data
|
||||
|
||||
*****************************
|
||||
|
||||
Uso:
|
||||
|
||||
Antes de que el objeto empiece a sacar valores hay que crear el nodo. Para ello hay que mandar un mensaje [open "nº subnet" "nº universo"].
|
||||
También podemos especificar la IP del interface ene l que escuchará mandando el mensaje "ip + dirección ip" antes de mandar el mensaje open.
|
||||
Si no le mandamos ningún parámetro con el mesaje open el objeto escucha en el interface activo con la IP más baja, típicamente 2.x.x.x, en la subnet 0 y universo 0.
|
||||
El objeto saca una lista de 512 enteros con el universo entero.
|
||||
Si queremos cambiar el universo, a subnet o la dirección ip hay que mandar un mensaje [close] y luego mandar un nuevo mensaje open con la nueva configuración.
|
||||
Mandando bang al objeto nos imprime en la ventana de estado si el nodo está activo y en caso afirmativo en qué subnet, unverso y direcicń ip está escuchando.
|
||||
|
||||
*****************************
|
||||
|
||||
Ayuda y soporte:
|
||||
|
||||
puremediaserver@googlegroups.com
|
||||
|
||||
*****************************
|
||||
|
346
libremediaserver/externals/artnetin/artnet.h
vendored
Executable file
346
libremediaserver/externals/artnetin/artnet.h
vendored
Executable file
|
@ -0,0 +1,346 @@
|
|||
/*
|
||||
* This library 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.
|
||||
*
|
||||
* This library 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 library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* artnet.h
|
||||
* Interface to libartnet
|
||||
* Copyright (C) 2004-2007 Simon Newton
|
||||
*/
|
||||
|
||||
#ifndef ARTNET_HEADER_H
|
||||
#define ARTNET_HEADER_H
|
||||
|
||||
#include <stdint.h>
|
||||
// order is important here for osx
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/select.h>
|
||||
#else
|
||||
#include <Winsock2.h>
|
||||
typedef unsigned long in_addr_t;
|
||||
#endif
|
||||
|
||||
#include <artnet/common.h>
|
||||
|
||||
/* the external storage class is "extern" in UNIX; in MSW it's ugly. */
|
||||
#ifndef EXTERN
|
||||
#ifdef MSW
|
||||
#define EXTERN __declspec(dllexport) extern
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif /* MSW */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXTERN int ARTNET_ADDRESS_NO_CHANGE;
|
||||
|
||||
/**
|
||||
* An enum for setting the behaviour of a port.
|
||||
* Ports can either input data (DMX -> ArtNet) or
|
||||
* output (ArtNet -> DMX) data.
|
||||
*/
|
||||
typedef enum {
|
||||
ARTNET_ENABLE_INPUT = 0x40, /**< Enables the input for this port */
|
||||
ARTNET_ENABLE_OUTPUT = 0x80 /**< Enables the output for this port */
|
||||
} artnet_port_settings_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
ARTNET_PC_NONE = 0x00,
|
||||
ARTNET_PC_CANCEL = 0x01,
|
||||
ARTNET_PC_LED_NORMAL = 0x02,
|
||||
ARTNET_PC_LED_MUTE = 0x03,
|
||||
ARTNET_PC_LED_LOCATE = 0x04,
|
||||
ARTNET_PC_RESET = 0x05,
|
||||
ARTNET_PC_MERGE_LTP_O = 0x10,
|
||||
ARTNET_PC_MERGE_LTP_1 = 0x11,
|
||||
ARTNET_PC_MERGE_LTP_2 = 0x12,
|
||||
ARTNET_PC_MERGE_LTP_3 = 0x13,
|
||||
ARTNET_PC_MERGE_HTP_0 = 0x50,
|
||||
ARTNET_PC_MERGE_HTP_1 = 0x51,
|
||||
ARTNET_PC_MERGE_HTP_2 = 0x52,
|
||||
ARTNET_PC_MERGE_HTP_3 = 0x53,
|
||||
ARTNET_PC_CLR_0 = 0x93,
|
||||
ARTNET_PC_CLR_1 = 0x93,
|
||||
ARTNET_PC_CLR_2 = 0x93,
|
||||
ARTNET_PC_CLR_3 = 0x93,
|
||||
} artnet_port_command_t;
|
||||
|
||||
|
||||
/*
|
||||
* An enum for the type of data transmitted on a port.
|
||||
* As far as I know, only DMX-512 is supported
|
||||
*/
|
||||
typedef enum {
|
||||
ARTNET_PORT_DMX = 0x00, /**< Data is DMX-512 */
|
||||
ARTNET_PORT_MIDI = 0x01, /**< Data is MIDI */
|
||||
ARTNET_PORT_AVAB = 0x02, /**< Data is Avab */
|
||||
ARTNET_PORT_CMX = 0x03, /**< Data is Colortran CMX */
|
||||
ARTNET_PORT_ADB = 0x04, /**< Data is ABD 62.5 */
|
||||
ARTNET_PORT_ARTNET = 0x05 /**< Data is ArtNet */
|
||||
} artnet_port_data_code;
|
||||
|
||||
|
||||
// defines the status of the firmware transfer
|
||||
typedef enum {
|
||||
ARTNET_FIRMWARE_BLOCKGOOD = 0x00,
|
||||
ARTNET_FIRMWARE_ALLGOOD = 0x01,
|
||||
ARTNET_FIRMWARE_FAIL = 0xff,
|
||||
} artnet_firmware_status_code;
|
||||
|
||||
// tod actions
|
||||
typedef enum {
|
||||
ARTNET_TOD_FULL = 0x00,
|
||||
ARTNET_TOD_FLUSH = 0x01,
|
||||
} artnet_tod_command_code;
|
||||
|
||||
|
||||
/**
|
||||
* An enum for refering to a particular input or output port.
|
||||
*/
|
||||
typedef enum {
|
||||
ARTNET_INPUT_PORT = 1, /**< The input port */
|
||||
ARTNET_OUTPUT_PORT, /**< The output port */
|
||||
} artnet_port_dir_t;
|
||||
|
||||
|
||||
/*
|
||||
* Enum describing the type of node
|
||||
*/
|
||||
typedef enum {
|
||||
ARTNET_SRV, /**< An ArtNet server (transmitts DMX data) */
|
||||
ARTNET_NODE, /**< An ArtNet node (dmx reciever) */
|
||||
ARTNET_MSRV, /**< A Media Server */
|
||||
ARTNET_ROUTE, /**< No Effect currently */
|
||||
ARTNET_BACKUP, /**< No Effect currently */
|
||||
ARTNET_RAW /**< Raw Node - used for diagnostics */
|
||||
} artnet_node_type;
|
||||
|
||||
|
||||
/*
|
||||
* Enum for the talk-to-me value
|
||||
* These values can be &'ed togeather, so for example to set private replies
|
||||
* and auto replying use :
|
||||
* (ARTNET_TTM_PRIVATE & ARTNET_TTM_AUTO)
|
||||
*/
|
||||
typedef enum {
|
||||
ARTNET_TTM_DEFAULT = 0xFF, /**< default, ArtPollReplies are broadcast, and nodes won't send a ArtPollReply when conditions change */
|
||||
ARTNET_TTM_PRIVATE = 0xFE, /**< ArtPollReplies aren't broadcast */
|
||||
ARTNET_TTM_AUTO = 0xFD /**< ArtPollReplies are send when node conditions chang */
|
||||
} artnet_ttm_value_t;
|
||||
|
||||
/**
|
||||
* Enums for the application defined handlers
|
||||
*/
|
||||
typedef enum {
|
||||
ARTNET_RECV_HANDLER, /**< Called on reciept of any ArtNet packet */
|
||||
ARTNET_SEND_HANDLER, /**< Called on transmission of any ArtNet packet */
|
||||
ARTNET_POLL_HANDLER, /**< Called on reciept of an ArtPoll packet */
|
||||
ARTNET_REPLY_HANDLER, /**< Called on reciept of an ArtPollReply packet */
|
||||
ARTNET_DMX_HANDLER, /**< Called on reciept of an ArtDMX packet */
|
||||
ARTNET_ADDRESS_HANDLER, /**< Called on reciept of an ArtAddress packet */
|
||||
ARTNET_INPUT_HANDLER, /**< Called on reciept of an ArtInput packet */
|
||||
ARTNET_TOD_REQUEST_HANDLER, /**< Called on reciept of an ArtTodRequest packet */
|
||||
ARTNET_TOD_DATA_HANDLER, /**< Called on reciept of an ArtTodData packet */
|
||||
ARTNET_TOD_CONTROL_HANDLER, /**< Called on reciept of an ArtTodControl packet */
|
||||
ARTNET_RDM_HANDLER, /**< Called on reciept of an ArtRdm packet */
|
||||
ARTNET_IPPROG_HANDLER, /**< Called on reciept of an ArtIPProg packet */
|
||||
ARTNET_FIRMWARE_HANDLER, /**< Called on reciept of an ArtFirmware packet */
|
||||
ARTNET_FIRMWARE_REPLY_HANDLER, /**< Called on reciept of an ArtFirmwareReply packet */
|
||||
} artnet_handler_name_t;
|
||||
|
||||
|
||||
/*
|
||||
* Describes a remote ArtNet node that has been discovered
|
||||
*/
|
||||
typedef struct artnet_node_entry_s {
|
||||
uint8_t ip[ARTNET_IP_SIZE]; /**< The IP address, Network byte ordered*/
|
||||
int16_t ver; /**< The firmware version */
|
||||
int16_t sub; /**< The subnet address */
|
||||
int16_t oem; /**< The OEM value */
|
||||
uint8_t ubea; /**< The UBEA version */
|
||||
uint8_t status;
|
||||
uint8_t etsaman[ARTNET_ESTA_SIZE]; /**< The ESTA Manufacturer code */
|
||||
uint8_t shortname[ARTNET_SHORT_NAME_LENGTH]; /**< The short node name */
|
||||
uint8_t longname[ARTNET_LONG_NAME_LENGTH]; /**< The long node name */
|
||||
uint8_t nodereport[ARTNET_REPORT_LENGTH]; /**< The node report */
|
||||
int16_t numbports; /**< The number of ports */
|
||||
uint8_t porttypes[ARTNET_MAX_PORTS]; /**< The type of ports */
|
||||
uint8_t goodinput[ARTNET_MAX_PORTS];
|
||||
uint8_t goodoutput[ARTNET_MAX_PORTS];
|
||||
uint8_t swin[ARTNET_MAX_PORTS];
|
||||
uint8_t swout[ARTNET_MAX_PORTS];
|
||||
uint8_t swvideo;
|
||||
uint8_t swmacro;
|
||||
uint8_t swremote;
|
||||
uint8_t style;
|
||||
uint8_t mac[ARTNET_MAC_SIZE]; /**< The MAC address of the node */
|
||||
} artnet_node_entry_t;
|
||||
|
||||
/** A pointer to an artnet_node_entry_t */
|
||||
typedef artnet_node_entry_t *artnet_node_entry;
|
||||
|
||||
typedef struct {
|
||||
char short_name[ARTNET_SHORT_NAME_LENGTH];
|
||||
char long_name[ARTNET_LONG_NAME_LENGTH];
|
||||
uint8_t subnet;
|
||||
uint8_t in_ports[ARTNET_MAX_PORTS];
|
||||
uint8_t out_ports[ARTNET_MAX_PORTS];
|
||||
} artnet_node_config_t;
|
||||
|
||||
|
||||
/** The local ArtNet node */
|
||||
typedef void *artnet_node;
|
||||
|
||||
/** A list of remote ArtNet nodes */
|
||||
typedef void *artnet_node_list;
|
||||
|
||||
// node control functions
|
||||
EXTERN artnet_node artnet_new(const char *ip, int verbose);
|
||||
EXTERN int artnet_setoem(artnet_node vn, uint8_t hi, uint8_t lo);
|
||||
EXTERN int artnet_setesta(artnet_node vn, char hi, char lo);
|
||||
EXTERN int artnet_set_bcast_limit(artnet_node vn, int limit);
|
||||
EXTERN int artnet_start(artnet_node n);
|
||||
EXTERN int artnet_read(artnet_node n, int timeout);
|
||||
EXTERN int artnet_stop(artnet_node n);
|
||||
EXTERN int artnet_destroy(artnet_node n);
|
||||
|
||||
int artnet_join(artnet_node vn1, artnet_node vn2);
|
||||
|
||||
// handler functions
|
||||
// these need to be cleaned up into a generic interface
|
||||
EXTERN int artnet_set_handler(artnet_node vn,
|
||||
artnet_handler_name_t handler,
|
||||
int (*fh)(artnet_node n, void *pp, void *d),
|
||||
void* data);
|
||||
EXTERN int artnet_set_dmx_handler(artnet_node vn,
|
||||
int (*fh)(artnet_node n, int port, void *d),
|
||||
void *data);
|
||||
EXTERN int artnet_set_program_handler(artnet_node vn,
|
||||
int (*fh)(artnet_node n, void *d),
|
||||
void *data);
|
||||
EXTERN int artnet_set_firmware_handler(artnet_node vn,
|
||||
int (*fh)(artnet_node n, int ubea, uint16_t *data, int length, void *d),
|
||||
void *data);
|
||||
EXTERN int artnet_set_rdm_handler(artnet_node vn,
|
||||
int (*fh)(artnet_node n, int address, uint8_t *rdm, int length, void *d),
|
||||
void *data);
|
||||
EXTERN int artnet_set_rdm_initiate_handler(artnet_node vn,
|
||||
int (*fh)(artnet_node n, int port, void *d),
|
||||
void *data);
|
||||
EXTERN int artnet_set_rdm_tod_handler(artnet_node vn,
|
||||
int (*fh)(artnet_node n, int port, void *d),
|
||||
void *data);
|
||||
|
||||
// send functions
|
||||
EXTERN int artnet_send_poll(artnet_node n,
|
||||
const char *ip,
|
||||
artnet_ttm_value_t talk_to_me);
|
||||
EXTERN int artnet_send_poll_reply(artnet_node n);
|
||||
EXTERN int artnet_send_dmx(artnet_node n,
|
||||
int port_id,
|
||||
int16_t length,
|
||||
const uint8_t *data);
|
||||
EXTERN int artnet_raw_send_dmx(artnet_node vn,
|
||||
uint8_t uni,
|
||||
int16_t length,
|
||||
const uint8_t *data);
|
||||
EXTERN int artnet_send_address(artnet_node n,
|
||||
artnet_node_entry e,
|
||||
const char *shortName,
|
||||
const char *longName,
|
||||
uint8_t inAddr[ARTNET_MAX_PORTS],
|
||||
uint8_t outAddr[ARTNET_MAX_PORTS],
|
||||
uint8_t subAddr,
|
||||
artnet_port_command_t cmd);
|
||||
EXTERN int artnet_send_input(artnet_node n,
|
||||
artnet_node_entry e,
|
||||
uint8_t settings[ARTNET_MAX_PORTS]);
|
||||
EXTERN int artnet_send_firmware(artnet_node vn,
|
||||
artnet_node_entry e,
|
||||
int ubea,
|
||||
uint16_t *data,
|
||||
int length,
|
||||
int (*fh)(artnet_node n, artnet_firmware_status_code code, void *d),
|
||||
void *user_data);
|
||||
EXTERN int artnet_send_firmware_reply(artnet_node vn,
|
||||
artnet_node_entry e,
|
||||
artnet_firmware_status_code code);
|
||||
|
||||
// rdm functions
|
||||
EXTERN int artnet_send_tod_request(artnet_node vn);
|
||||
EXTERN int artnet_send_tod_control(artnet_node vn,
|
||||
uint8_t address,
|
||||
artnet_tod_command_code action);
|
||||
EXTERN int artnet_send_tod_data(artnet_node vn, int port);
|
||||
EXTERN int artnet_send_rdm(artnet_node vn,
|
||||
uint8_t address,
|
||||
uint8_t *data,
|
||||
int length);
|
||||
EXTERN int artnet_add_rdm_device(artnet_node vn,
|
||||
int port,
|
||||
uint8_t uid[ARTNET_RDM_UID_WIDTH]);
|
||||
EXTERN int artnet_add_rdm_devices(artnet_node vn,
|
||||
int port,
|
||||
uint8_t *uid,
|
||||
int count);
|
||||
EXTERN int artnet_remove_rdm_device(artnet_node vn,
|
||||
int port,
|
||||
uint8_t uid[ARTNET_RDM_UID_WIDTH]);
|
||||
|
||||
// recv functions
|
||||
EXTERN uint8_t *artnet_read_dmx(artnet_node n, int port_id, int *length);
|
||||
|
||||
// state changing functions
|
||||
EXTERN int artnet_set_node_type(artnet_node n, artnet_node_type type);
|
||||
EXTERN int artnet_set_short_name(artnet_node vn, const char *name);
|
||||
EXTERN int artnet_set_long_name(artnet_node n, const char *name);
|
||||
|
||||
//port manipulation functions
|
||||
EXTERN int artnet_set_port_type(artnet_node n,
|
||||
int id,
|
||||
artnet_port_settings_t settings,
|
||||
artnet_port_data_code data);
|
||||
EXTERN int artnet_set_port_addr(artnet_node n,
|
||||
int id,
|
||||
artnet_port_dir_t dir,
|
||||
uint8_t addr);
|
||||
EXTERN int artnet_set_subnet_addr(artnet_node n, uint8_t subnet);
|
||||
EXTERN int artnet_get_universe_addr(artnet_node n,
|
||||
int id,
|
||||
artnet_port_dir_t dir);
|
||||
|
||||
//node list functions
|
||||
EXTERN artnet_node_list artnet_get_nl(artnet_node n);
|
||||
EXTERN artnet_node_entry artnet_nl_first(artnet_node_list nl);
|
||||
EXTERN artnet_node_entry artnet_nl_next(artnet_node_list nl);
|
||||
EXTERN int artnet_nl_get_length(artnet_node_list nl);
|
||||
|
||||
// misc
|
||||
EXTERN int artnet_dump_config(artnet_node n);
|
||||
EXTERN int artnet_get_config(artnet_node n, artnet_node_config_t *config);
|
||||
EXTERN int artnet_get_sd(artnet_node n);
|
||||
EXTERN int artnet_set_fdset(artnet_node vn, fd_set *fdset);
|
||||
|
||||
char *artnet_strerror();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
61
libremediaserver/externals/artnetin/artnetin-help.pd
vendored
Executable file
61
libremediaserver/externals/artnetin/artnetin-help.pd
vendored
Executable file
|
@ -0,0 +1,61 @@
|
|||
#N canvas 565 87 709 679 10;
|
||||
#X obj 157 287 artnetin;
|
||||
#X floatatom 156 392 5 0 0 0 - - -;
|
||||
#X floatatom 207 395 5 0 0 0 - - -;
|
||||
#X floatatom 251 397 5 0 0 0 - - -;
|
||||
#X floatatom 294 401 5 0 0 0 - - -;
|
||||
#X floatatom 404 400 5 0 0 0 - - -;
|
||||
#X floatatom 502 408 5 0 0 0 - - -;
|
||||
#X obj 157 333 unpack f f f f f f f f f f f f f f f f f f f f f f f
|
||||
f f f f f f f;
|
||||
#X msg 45 189 close;
|
||||
#X obj 227 179 pack f f;
|
||||
#X floatatom 227 118 5 0 0 0 - - -;
|
||||
#X floatatom 272 119 5 0 0 0 - - -;
|
||||
#X text 183 116 Subnet;
|
||||
#X text 306 119 universe;
|
||||
#X text 300 215 Open the node at subnet/universe;
|
||||
#X text 22 173 Close the node;
|
||||
#X text 222 306 List 512 floats (DMX array);
|
||||
#X obj 248 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
|
||||
-1;
|
||||
#X obj 157 113 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
|
||||
-1 -1;
|
||||
#X obj 61 368 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
|
||||
-1;
|
||||
#X text 18 111 Show status on console;
|
||||
#X text 431 98 You must close the node and reopen it before new settings
|
||||
take effect;
|
||||
#X msg 550 217 ip 127.0.0.1;
|
||||
#X text 547 199 Define which interface the node will open;
|
||||
#X text 541 239 Defaults to lower ip addres;
|
||||
#X obj 243 149 t b;
|
||||
#X msg 227 213 open 2 2;
|
||||
#X msg 231 238 open;
|
||||
#X msg 322 180 open 5 5;
|
||||
#X msg 167 181 open 0 0;
|
||||
#X msg 546 181 ip 192.168.1.100;
|
||||
#X msg 550 135 ip 2.0.0.100;
|
||||
#X connect 0 0 7 0;
|
||||
#X connect 0 0 19 0;
|
||||
#X connect 7 0 1 0;
|
||||
#X connect 7 1 2 0;
|
||||
#X connect 7 2 3 0;
|
||||
#X connect 7 3 4 0;
|
||||
#X connect 7 19 5 0;
|
||||
#X connect 7 29 6 0;
|
||||
#X connect 8 0 0 0;
|
||||
#X connect 10 0 9 0;
|
||||
#X connect 11 0 9 1;
|
||||
#X connect 11 0 25 0;
|
||||
#X connect 17 0 10 0;
|
||||
#X connect 17 0 11 0;
|
||||
#X connect 18 0 0 0;
|
||||
#X connect 22 0 0 0;
|
||||
#X connect 25 0 9 0;
|
||||
#X connect 26 0 0 0;
|
||||
#X connect 27 0 0 0;
|
||||
#X connect 28 0 0 0;
|
||||
#X connect 29 0 0 0;
|
||||
#X connect 30 0 0 0;
|
||||
#X connect 31 0 0 0;
|
7
libremediaserver/externals/artnetin/artnetin-meta.pd
vendored
Executable file
7
libremediaserver/externals/artnetin/artnetin-meta.pd
vendored
Executable file
|
@ -0,0 +1,7 @@
|
|||
#N canvas 15 49 200 200 10;
|
||||
#N canvas 627 208 420 300 META 1;
|
||||
#X text 13 41 NAME Artnetin;
|
||||
#X text 10 25 AUTHOR Santiago Noreña puremediaserver@googlegroups.com
|
||||
;
|
||||
#X text 10 10 VERSION 0.0.4;
|
||||
#X restore 10 10 pd META;
|
301
libremediaserver/externals/artnetin/artnetin.c
vendored
Executable file
301
libremediaserver/externals/artnetin/artnetin.c
vendored
Executable file
|
@ -0,0 +1,301 @@
|
|||
/*
|
||||
* artnetin is an external for Pure Data that reads an artnet universe
|
||||
* and outputs it in an outlet like a list of 512 int.
|
||||
*
|
||||
* artnetin needs libartnet installed in the sytem to work
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
/*
|
||||
* Santiago Noreña
|
||||
* puremediaserver@gmail.com
|
||||
* Versión 0.0.4
|
||||
*
|
||||
* Based on previous works by:
|
||||
* Dirk Jagdmann (doj@cubic.org) dmxmonitor
|
||||
* Simon Newton (nomis52@westnet.com.au) libartnet and modified dmxmonitor to use ArtNet
|
||||
* Patrick Sébastien http://www.workinprogress.ca/ pure data external pthread template
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* ToDo:
|
||||
* - Cambiar funciones Unix por funciones PD (getbytes, freebytes,...)
|
||||
* - cambiar variables a syntaxis pure data (x_subnet)
|
||||
* - método max channels distinto de 512
|
||||
* - meter thread_start en función principal
|
||||
*
|
||||
*/
|
||||
|
||||
#include "m_pd.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "pthread.h"
|
||||
#include "artnet.h"
|
||||
#include <malloc.h>
|
||||
|
||||
// ==============================================================================
|
||||
// Our External's Memory structure
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
t_class *artnetin_class;
|
||||
|
||||
typedef struct _artnetin
|
||||
{
|
||||
t_object x_obj;
|
||||
artnet_node node; // el nodo artnet
|
||||
int CHANNELS; // la longitud del array dmx
|
||||
t_outlet *outlet1; // outlet pointer
|
||||
int subnet; // variables subnet y universo; solo utiles para mostrar informacion del nodo en bang
|
||||
int universe;
|
||||
pthread_attr_t artnetin_thread_attr;
|
||||
pthread_t x_threadid; // Control de thread
|
||||
char *ip; // variable para definir el interface donde se creará el nodo.
|
||||
} t_artnetin;
|
||||
|
||||
unsigned char *dmx; // El array DMX
|
||||
|
||||
// ==============================================================================
|
||||
// dmx handler -
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
static int dmx_handler(artnet_node node, int prt , void *d) {
|
||||
int z;
|
||||
int len;
|
||||
t_artnetin *x = (t_artnetin*) d;
|
||||
uint8_t *g = dmx; // Puntero al array dmx
|
||||
uint8_t *data; // Puntero
|
||||
data = artnet_read_dmx(node, prt, &len) ; // Nos devuelve el array dmx en data?
|
||||
memcpy(g, data, len) ; // Copia el array dmx devuelto a g
|
||||
|
||||
t_atom dmxa[x->CHANNELS]; // Crea un array dmx en formato float pure dat
|
||||
uint8_t *b = dmx; // Otro puntero a dmx; no podemos usar g?
|
||||
for(z=0; z < x->CHANNELS; z++){ // Copiamos el array dmx al array dmxa
|
||||
SETFLOAT(dmxa+z, *b);
|
||||
b++;
|
||||
}
|
||||
outlet_list(x->outlet1 ,gensym("list"), x->CHANNELS, dmxa); // Saca el array dmxa mediante una lista
|
||||
return (0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// - bang - Devuelve información del estado del nodo
|
||||
//--------------------------------------------------------------------------
|
||||
void artnetin_bang(t_artnetin *x) {
|
||||
if ((int)x->x_threadid == 0) {
|
||||
post ("Artnetin: Node not created");
|
||||
}
|
||||
else
|
||||
{
|
||||
post ("Artnetin: Node created on thread %d", x->x_threadid);
|
||||
post ("Artnetin: listening on Subnet %d Universe %d and IP address %s", x->subnet, x->universe, x->ip);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Worker Thread
|
||||
// =============================================================================
|
||||
static void *thread_read(void *w)
|
||||
{
|
||||
t_artnetin *x = (t_artnetin*) w;
|
||||
int n, max, z;
|
||||
int i = 0;
|
||||
int artnet_sd;
|
||||
pthread_testcancel();
|
||||
while(1) {
|
||||
artnet_sd = artnet_get_sd(x->node) ;
|
||||
fd_set rd_fds;
|
||||
struct timeval tv;
|
||||
FD_ZERO(&rd_fds);
|
||||
FD_SET(0, &rd_fds);
|
||||
FD_SET(artnet_sd, &rd_fds) ;
|
||||
max = artnet_sd ;
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
n = select(max+1, &rd_fds, NULL, NULL, &tv);
|
||||
if(n>0) {
|
||||
if (FD_ISSET(artnet_sd , &rd_fds)){
|
||||
i = artnet_read(x->node,0);
|
||||
}
|
||||
if (i == 0) {
|
||||
|
||||
|
||||
t_atom dmxa[x->CHANNELS];
|
||||
uint8_t *b = dmx;
|
||||
for(z=0; z<x->CHANNELS; z++){
|
||||
SETFLOAT(dmxa+z, *b);
|
||||
b++;
|
||||
}
|
||||
outlet_list(x->outlet1 ,gensym("list"), x->CHANNELS, dmxa);
|
||||
}
|
||||
else {
|
||||
error("Artnetin: Bucle Read Error");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Start Thread
|
||||
// =============================================================================
|
||||
|
||||
static void thread_start(t_artnetin *x)
|
||||
{
|
||||
|
||||
// create the worker thread
|
||||
if(pthread_attr_init(&x->artnetin_thread_attr) < 0)
|
||||
{
|
||||
sys_lock();
|
||||
error("Artnetin: could not launch receive thread");
|
||||
sys_unlock();
|
||||
return;
|
||||
}
|
||||
if(pthread_attr_setdetachstate(&x->artnetin_thread_attr, PTHREAD_CREATE_DETACHED) < 0)
|
||||
{
|
||||
sys_lock();
|
||||
error("Artnetin: could not launch receive thread");
|
||||
sys_unlock();
|
||||
return;
|
||||
}
|
||||
if(pthread_create(&x->x_threadid, &x->artnetin_thread_attr, thread_read, x) < 0)
|
||||
{
|
||||
sys_lock();
|
||||
error("Artnetin: could not launch receive thread");
|
||||
sys_unlock();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_lock();
|
||||
post("Artnetin: thread %d launched", (int)x->x_threadid );
|
||||
sys_unlock();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// - Message: ip - define el interface donde escuchará el nodo mediante la ip
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void artnetin_ip(t_artnetin *x, t_symbol *ip_addres)
|
||||
{
|
||||
x->ip = getbytes(15);
|
||||
strcpy(x->ip, ip_addres->s_name);
|
||||
post("Artnetin: IP %s", x->ip);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// - Message: open - Empieza el nodo artnet y lanza el thread que escuchará en ese nodo
|
||||
//--------------------------------------------------------------------------
|
||||
void artnetin_open(t_artnetin *x, t_floatarg f1, t_floatarg f2)
|
||||
{
|
||||
|
||||
|
||||
if ((int)x->x_threadid == 0) {
|
||||
x->subnet = f1;
|
||||
x->universe = f2;
|
||||
post("Artnetin: opening node Artnet Subnet %d Universe %d IP %s", x->subnet, x->universe, x->ip);
|
||||
|
||||
// char * ip_addr = NULL;
|
||||
|
||||
x->node = artnet_new(x->ip, 0 );
|
||||
if(x->node == NULL) {
|
||||
error("Artnetin: Unable to connect") ;
|
||||
}
|
||||
artnet_set_dmx_handler(x->node, dmx_handler, x);
|
||||
artnet_set_subnet_addr(x->node, x->subnet);
|
||||
artnet_set_port_type(x->node, 0, ARTNET_ENABLE_OUTPUT, ARTNET_PORT_DMX) ;
|
||||
artnet_set_port_addr(x->node, 0, ARTNET_OUTPUT_PORT, x->universe);
|
||||
artnet_set_long_name(x->node, "Artnetin Pure Data 0.0.4");
|
||||
artnet_set_short_name(x->node, "Artnetin-PD");
|
||||
artnet_start(x->node);
|
||||
int i = artnet_read(x->node,0);
|
||||
if (i == 0) {
|
||||
post("Artnetin: Init OK");
|
||||
thread_start(x);
|
||||
}
|
||||
else error ("Artnetin: Init Error");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
error ("Artnetin: Node created. Close it before try reopen");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// - Message: close
|
||||
//--------------------------------------------------------------------------
|
||||
void artnetin_close(t_artnetin *x)
|
||||
{
|
||||
if ((int)x->x_threadid == 0) {
|
||||
error("Artnetin: node not created. Doing nothing");
|
||||
}
|
||||
else {
|
||||
post("Artnetin: closing node");
|
||||
artnet_stop(x->node) ;
|
||||
artnet_destroy(x->node) ;
|
||||
while(pthread_cancel(x->x_threadid) < 0);
|
||||
x->x_threadid = 0;
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------
|
||||
// - Initialization
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void *artnetin_new(void)
|
||||
{
|
||||
|
||||
post("Artnetin: an ArtNet interface : v0.0.4");
|
||||
post(" written by Santiago Noreña (puremediaserver@gmail.com)");
|
||||
t_artnetin *x = (t_artnetin *)pd_new(artnetin_class); // local variable (pointer to a t_artnetin data structure)
|
||||
x->outlet1 = outlet_new(&x->x_obj, &s_list); // Saca todos los canales mediante una lista
|
||||
x->CHANNELS = 512; // Define el número de canales del array dmx
|
||||
dmx = malloc(512) ; // localiza memoria para el array dmx; Cambiar por getbytes
|
||||
if(!dmx) {
|
||||
error("Artnetin: malloc failed") ;
|
||||
}
|
||||
memset(dmx, 0x00, x->CHANNELS) ; // Inicializa el array dmx a 0
|
||||
x->ip = NULL; // Inicializa la dirección ip a NULL = interface con ip más baja
|
||||
return (void *)x;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// - Object destruction
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void artnetin_free(t_artnetin *x)
|
||||
{
|
||||
artnetin_close(x);
|
||||
freebytes(x->ip, 15);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// - Object creation and setup
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void artnetin_setup(void)
|
||||
{
|
||||
artnetin_class = class_new ( gensym("artnetin"),(t_newmethod)artnetin_new, 0, sizeof(t_artnetin), CLASS_DEFAULT, A_GIMME, 0);
|
||||
// Add message handlers
|
||||
class_addmethod(artnetin_class, (t_method)artnetin_open, gensym("open"), A_DEFFLOAT, A_DEFFLOAT, 0);
|
||||
class_addmethod(artnetin_class, (t_method)artnetin_close, gensym("close"), 0);
|
||||
class_addmethod(artnetin_class, (t_method)artnetin_ip, gensym("ip"), A_SYMBOL, 0);
|
||||
class_addbang(artnetin_class, artnetin_bang);
|
||||
}
|
||||
|
39
libremediaserver/externals/artnetin/examples/artnetin.pd
vendored
Executable file
39
libremediaserver/externals/artnetin/examples/artnetin.pd
vendored
Executable file
|
@ -0,0 +1,39 @@
|
|||
#N canvas 0 25 588 689 10;
|
||||
#X obj 157 287 artnetin;
|
||||
#X floatatom 156 392 5 0 0 0 - - -;
|
||||
#X floatatom 207 395 5 0 0 0 - - -;
|
||||
#X floatatom 251 397 5 0 0 0 - - -;
|
||||
#X floatatom 294 401 5 0 0 0 - - -;
|
||||
#X floatatom 404 400 5 0 0 0 - - -;
|
||||
#X floatatom 502 408 5 0 0 0 - - -;
|
||||
#X obj 157 333 unpack f f f f f f f f f f f f f f f f f f f f f f f
|
||||
f f f f f f f;
|
||||
#X msg 74 236 close;
|
||||
#X msg 227 213 open \$1;
|
||||
#X obj 227 158 pack f f;
|
||||
#X floatatom 222 116 5 0 0 0 - - -;
|
||||
#X floatatom 300 117 5 0 0 0 - - -;
|
||||
#X text 182 118 Subnet;
|
||||
#X text 338 119 universe;
|
||||
#X text 288 212 Open the node at subnet/universe;
|
||||
#X text 63 192 Close the node;
|
||||
#X text 218 303 List 512 floats (DMX array);
|
||||
#X text -40 271 You must close the node and reopen it before new settings
|
||||
take effect;
|
||||
#X obj 264 25 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
|
||||
-1;
|
||||
#X text 292 25 Bang to start node;
|
||||
#X connect 0 0 7 0;
|
||||
#X connect 7 0 1 0;
|
||||
#X connect 7 1 2 0;
|
||||
#X connect 7 2 3 0;
|
||||
#X connect 7 3 4 0;
|
||||
#X connect 7 19 5 0;
|
||||
#X connect 7 29 6 0;
|
||||
#X connect 8 0 0 0;
|
||||
#X connect 9 0 0 0;
|
||||
#X connect 10 0 9 0;
|
||||
#X connect 11 0 10 0;
|
||||
#X connect 12 0 10 1;
|
||||
#X connect 19 0 11 0;
|
||||
#X connect 19 0 12 0;
|
653
libremediaserver/externals/artnetin/m_pd.h
vendored
Executable file
653
libremediaserver/externals/artnetin/m_pd.h
vendored
Executable file
|
@ -0,0 +1,653 @@
|
|||
/* Copyright (c) 1997-1999 Miller Puckette.
|
||||
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
|
||||
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
|
||||
|
||||
#ifndef __m_pd_h_
|
||||
|
||||
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PD_MAJOR_VERSION 0
|
||||
#define PD_MINOR_VERSION 42
|
||||
#define PD_BUGFIX_VERSION 6
|
||||
#define PD_TEST_VERSION ""
|
||||
|
||||
/* old name for "MSW" flag -- we have to take it for the sake of many old
|
||||
"nmakefiles" for externs, which will define NT and not MSW */
|
||||
#if defined(NT) && !defined(MSW)
|
||||
#define MSW
|
||||
#endif
|
||||
|
||||
/* These pragmas are only used for MSVC, not MinGW or Cygwin <hans@at.or.at> */
|
||||
#ifdef _MSC_VER
|
||||
/* #pragma warning( disable : 4091 ) */
|
||||
#pragma warning( disable : 4305 ) /* uncast const double to float */
|
||||
#pragma warning( disable : 4244 ) /* uncast float/int conversion etc. */
|
||||
#pragma warning( disable : 4101 ) /* unused automatic variables */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* the external storage class is "extern" in UNIX; in MSW it's ugly. */
|
||||
#ifdef MSW
|
||||
#ifdef PD_INTERNAL
|
||||
#define EXTERN __declspec(dllexport) extern
|
||||
#else
|
||||
#define EXTERN __declspec(dllimport) extern
|
||||
#endif /* PD_INTERNAL */
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif /* MSW */
|
||||
|
||||
/* and depending on the compiler, hidden data structures are
|
||||
declared differently: */
|
||||
#if defined( __GNUC__) || defined( __BORLANDC__ ) || defined( __MWERKS__ )
|
||||
#define EXTERN_STRUCT struct
|
||||
#else
|
||||
#define EXTERN_STRUCT extern struct
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
|
||||
#include <stddef.h> /* just for size_t -- how lame! */
|
||||
#endif
|
||||
|
||||
#define MAXPDSTRING 1000 /* use this for anything you want */
|
||||
#define MAXPDARG 5 /* max number of args we can typecheck today */
|
||||
|
||||
/* signed and unsigned integer types the size of a pointer: */
|
||||
#if !defined(PD_LONGINTTYPE)
|
||||
#define PD_LONGINTTYPE long
|
||||
#endif
|
||||
#if !defined(PD_FLOATTYPE)
|
||||
#define PD_FLOATTYPE float
|
||||
#endif
|
||||
typedef PD_LONGINTTYPE t_int; /* pointer-size integer */
|
||||
typedef PD_FLOATTYPE t_float; /* a float type at most the same size */
|
||||
typedef PD_FLOATTYPE t_floatarg; /* float type for function calls */
|
||||
|
||||
typedef struct _symbol
|
||||
{
|
||||
char *s_name;
|
||||
struct _class **s_thing;
|
||||
struct _symbol *s_next;
|
||||
} t_symbol;
|
||||
|
||||
EXTERN_STRUCT _array;
|
||||
#define t_array struct _array /* g_canvas.h */
|
||||
|
||||
/* pointers to glist and array elements go through a "stub" which sticks
|
||||
around after the glist or array is freed. The stub itself is deleted when
|
||||
both the glist/array is gone and the refcount is zero, ensuring that no
|
||||
gpointers are pointing here. */
|
||||
|
||||
#define GP_NONE 0 /* the stub points nowhere (has been cut off) */
|
||||
#define GP_GLIST 1 /* the stub points to a glist element */
|
||||
#define GP_ARRAY 2 /* ... or array */
|
||||
|
||||
typedef struct _gstub
|
||||
{
|
||||
union
|
||||
{
|
||||
struct _glist *gs_glist; /* glist we're in */
|
||||
struct _array *gs_array; /* array we're in */
|
||||
} gs_un;
|
||||
int gs_which; /* GP_GLIST/GP_ARRAY */
|
||||
int gs_refcount; /* number of gpointers pointing here */
|
||||
} t_gstub;
|
||||
|
||||
typedef struct _gpointer /* pointer to a gobj in a glist */
|
||||
{
|
||||
union
|
||||
{
|
||||
struct _scalar *gp_scalar; /* scalar we're in (if glist) */
|
||||
union word *gp_w; /* raw data (if array) */
|
||||
} gp_un;
|
||||
int gp_valid; /* number which must match gpointee */
|
||||
t_gstub *gp_stub; /* stub which points to glist/array */
|
||||
} t_gpointer;
|
||||
|
||||
typedef union word
|
||||
{
|
||||
t_float w_float;
|
||||
t_symbol *w_symbol;
|
||||
t_gpointer *w_gpointer;
|
||||
t_array *w_array;
|
||||
struct _glist *w_list;
|
||||
int w_index;
|
||||
} t_word;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
A_NULL,
|
||||
A_FLOAT,
|
||||
A_SYMBOL,
|
||||
A_POINTER,
|
||||
A_SEMI,
|
||||
A_COMMA,
|
||||
A_DEFFLOAT,
|
||||
A_DEFSYM,
|
||||
A_DOLLAR,
|
||||
A_DOLLSYM,
|
||||
A_GIMME,
|
||||
A_CANT
|
||||
} t_atomtype;
|
||||
|
||||
#define A_DEFSYMBOL A_DEFSYM /* better name for this */
|
||||
|
||||
typedef struct _atom
|
||||
{
|
||||
t_atomtype a_type;
|
||||
union word a_w;
|
||||
} t_atom;
|
||||
|
||||
EXTERN_STRUCT _class;
|
||||
#define t_class struct _class
|
||||
|
||||
EXTERN_STRUCT _outlet;
|
||||
#define t_outlet struct _outlet
|
||||
|
||||
EXTERN_STRUCT _inlet;
|
||||
#define t_inlet struct _inlet
|
||||
|
||||
EXTERN_STRUCT _binbuf;
|
||||
#define t_binbuf struct _binbuf
|
||||
|
||||
EXTERN_STRUCT _clock;
|
||||
#define t_clock struct _clock
|
||||
|
||||
EXTERN_STRUCT _outconnect;
|
||||
#define t_outconnect struct _outconnect
|
||||
|
||||
EXTERN_STRUCT _glist;
|
||||
#define t_glist struct _glist
|
||||
#define t_canvas struct _glist /* LATER lose this */
|
||||
|
||||
typedef t_class *t_pd; /* pure datum: nothing but a class pointer */
|
||||
|
||||
typedef struct _gobj /* a graphical object */
|
||||
{
|
||||
t_pd g_pd; /* pure datum header (class) */
|
||||
struct _gobj *g_next; /* next in list */
|
||||
} t_gobj;
|
||||
|
||||
typedef struct _scalar /* a graphical object holding data */
|
||||
{
|
||||
t_gobj sc_gobj; /* header for graphical object */
|
||||
t_symbol *sc_template; /* template name (LATER replace with pointer) */
|
||||
t_word sc_vec[1]; /* indeterminate-length array of words */
|
||||
} t_scalar;
|
||||
|
||||
typedef struct _text /* patchable object - graphical, with text */
|
||||
{
|
||||
t_gobj te_g; /* header for graphical object */
|
||||
t_binbuf *te_binbuf; /* holder for the text */
|
||||
t_outlet *te_outlet; /* linked list of outlets */
|
||||
t_inlet *te_inlet; /* linked list of inlets */
|
||||
short te_xpix; /* x&y location (within the toplevel) */
|
||||
short te_ypix;
|
||||
short te_width; /* requested width in chars, 0 if auto */
|
||||
unsigned int te_type:2; /* from defs below */
|
||||
} t_text;
|
||||
|
||||
#define T_TEXT 0 /* just a textual comment */
|
||||
#define T_OBJECT 1 /* a MAX style patchable object */
|
||||
#define T_MESSAGE 2 /* a MAX stype message */
|
||||
#define T_ATOM 3 /* a cell to display a number or symbol */
|
||||
|
||||
#define te_pd te_g.g_pd
|
||||
|
||||
/* t_object is synonym for t_text (LATER unify them) */
|
||||
|
||||
typedef struct _text t_object;
|
||||
|
||||
#define ob_outlet te_outlet
|
||||
#define ob_inlet te_inlet
|
||||
#define ob_binbuf te_binbuf
|
||||
#define ob_pd te_g.g_pd
|
||||
#define ob_g te_g
|
||||
|
||||
typedef void (*t_method)(void);
|
||||
typedef void *(*t_newmethod)( void);
|
||||
typedef void (*t_gotfn)(void *x, ...);
|
||||
|
||||
/* ---------------- pre-defined objects and symbols --------------*/
|
||||
EXTERN t_pd pd_objectmaker; /* factory for creating "object" boxes */
|
||||
EXTERN t_pd pd_canvasmaker; /* factory for creating canvases */
|
||||
EXTERN t_symbol s_pointer;
|
||||
EXTERN t_symbol s_float;
|
||||
EXTERN t_symbol s_symbol;
|
||||
EXTERN t_symbol s_bang;
|
||||
EXTERN t_symbol s_list;
|
||||
EXTERN t_symbol s_anything;
|
||||
EXTERN t_symbol s_signal;
|
||||
EXTERN t_symbol s__N;
|
||||
EXTERN t_symbol s__X;
|
||||
EXTERN t_symbol s_x;
|
||||
EXTERN t_symbol s_y;
|
||||
EXTERN t_symbol s_;
|
||||
|
||||
/* --------- prototypes from the central message system ----------- */
|
||||
EXTERN void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv);
|
||||
EXTERN void pd_forwardmess(t_pd *x, int argc, t_atom *argv);
|
||||
EXTERN t_symbol *gensym(const char *s);
|
||||
EXTERN t_gotfn getfn(t_pd *x, t_symbol *s);
|
||||
EXTERN t_gotfn zgetfn(t_pd *x, t_symbol *s);
|
||||
EXTERN void nullfn(void);
|
||||
EXTERN void pd_vmess(t_pd *x, t_symbol *s, char *fmt, ...);
|
||||
#define mess0(x, s) ((*getfn((x), (s)))((x)))
|
||||
#define mess1(x, s, a) ((*getfn((x), (s)))((x), (a)))
|
||||
#define mess2(x, s, a,b) ((*getfn((x), (s)))((x), (a),(b)))
|
||||
#define mess3(x, s, a,b,c) ((*getfn((x), (s)))((x), (a),(b),(c)))
|
||||
#define mess4(x, s, a,b,c,d) ((*getfn((x), (s)))((x), (a),(b),(c),(d)))
|
||||
#define mess5(x, s, a,b,c,d,e) ((*getfn((x), (s)))((x), (a),(b),(c),(d),(e)))
|
||||
EXTERN void obj_list(t_object *x, t_symbol *s, int argc, t_atom *argv);
|
||||
EXTERN t_pd *pd_newest(void);
|
||||
|
||||
/* --------------- memory management -------------------- */
|
||||
EXTERN void *getbytes(size_t nbytes);
|
||||
EXTERN void *getzbytes(size_t nbytes);
|
||||
EXTERN void *copybytes(void *src, size_t nbytes);
|
||||
EXTERN void freebytes(void *x, size_t nbytes);
|
||||
EXTERN void *resizebytes(void *x, size_t oldsize, size_t newsize);
|
||||
|
||||
/* -------------------- atoms ----------------------------- */
|
||||
|
||||
#define SETSEMI(atom) ((atom)->a_type = A_SEMI, (atom)->a_w.w_index = 0)
|
||||
#define SETCOMMA(atom) ((atom)->a_type = A_COMMA, (atom)->a_w.w_index = 0)
|
||||
#define SETPOINTER(atom, gp) ((atom)->a_type = A_POINTER, \
|
||||
(atom)->a_w.w_gpointer = (gp))
|
||||
#define SETFLOAT(atom, f) ((atom)->a_type = A_FLOAT, (atom)->a_w.w_float = (f))
|
||||
#define SETSYMBOL(atom, s) ((atom)->a_type = A_SYMBOL, \
|
||||
(atom)->a_w.w_symbol = (s))
|
||||
#define SETDOLLAR(atom, n) ((atom)->a_type = A_DOLLAR, \
|
||||
(atom)->a_w.w_index = (n))
|
||||
#define SETDOLLSYM(atom, s) ((atom)->a_type = A_DOLLSYM, \
|
||||
(atom)->a_w.w_symbol= (s))
|
||||
|
||||
EXTERN t_float atom_getfloat(t_atom *a);
|
||||
EXTERN t_int atom_getint(t_atom *a);
|
||||
EXTERN t_symbol *atom_getsymbol(t_atom *a);
|
||||
EXTERN t_symbol *atom_gensym(t_atom *a);
|
||||
EXTERN t_float atom_getfloatarg(int which, int argc, t_atom *argv);
|
||||
EXTERN t_int atom_getintarg(int which, int argc, t_atom *argv);
|
||||
EXTERN t_symbol *atom_getsymbolarg(int which, int argc, t_atom *argv);
|
||||
|
||||
EXTERN void atom_string(t_atom *a, char *buf, unsigned int bufsize);
|
||||
|
||||
/* ------------------ binbufs --------------- */
|
||||
|
||||
EXTERN t_binbuf *binbuf_new(void);
|
||||
EXTERN void binbuf_free(t_binbuf *x);
|
||||
EXTERN t_binbuf *binbuf_duplicate(t_binbuf *y);
|
||||
|
||||
EXTERN void binbuf_text(t_binbuf *x, char *text, size_t size);
|
||||
EXTERN void binbuf_gettext(t_binbuf *x, char **bufp, int *lengthp);
|
||||
EXTERN void binbuf_clear(t_binbuf *x);
|
||||
EXTERN void binbuf_add(t_binbuf *x, int argc, t_atom *argv);
|
||||
EXTERN void binbuf_addv(t_binbuf *x, char *fmt, ...);
|
||||
EXTERN void binbuf_addbinbuf(t_binbuf *x, t_binbuf *y);
|
||||
EXTERN void binbuf_addsemi(t_binbuf *x);
|
||||
EXTERN void binbuf_restore(t_binbuf *x, int argc, t_atom *argv);
|
||||
EXTERN void binbuf_print(t_binbuf *x);
|
||||
EXTERN int binbuf_getnatom(t_binbuf *x);
|
||||
EXTERN t_atom *binbuf_getvec(t_binbuf *x);
|
||||
EXTERN void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv);
|
||||
EXTERN int binbuf_read(t_binbuf *b, char *filename, char *dirname,
|
||||
int crflag);
|
||||
EXTERN int binbuf_read_via_canvas(t_binbuf *b, char *filename, t_canvas *canvas,
|
||||
int crflag);
|
||||
EXTERN int binbuf_read_via_path(t_binbuf *b, char *filename, char *dirname,
|
||||
int crflag);
|
||||
EXTERN int binbuf_write(t_binbuf *x, char *filename, char *dir,
|
||||
int crflag);
|
||||
EXTERN void binbuf_evalfile(t_symbol *name, t_symbol *dir);
|
||||
EXTERN t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av,
|
||||
int tonew);
|
||||
|
||||
/* ------------------ clocks --------------- */
|
||||
|
||||
EXTERN t_clock *clock_new(void *owner, t_method fn);
|
||||
EXTERN void clock_set(t_clock *x, double systime);
|
||||
EXTERN void clock_delay(t_clock *x, double delaytime);
|
||||
EXTERN void clock_unset(t_clock *x);
|
||||
EXTERN double clock_getlogicaltime(void);
|
||||
EXTERN double clock_getsystime(void); /* OBSOLETE; use clock_getlogicaltime() */
|
||||
EXTERN double clock_gettimesince(double prevsystime);
|
||||
EXTERN double clock_getsystimeafter(double delaytime);
|
||||
EXTERN void clock_free(t_clock *x);
|
||||
|
||||
/* ----------------- pure data ---------------- */
|
||||
EXTERN t_pd *pd_new(t_class *cls);
|
||||
EXTERN void pd_free(t_pd *x);
|
||||
EXTERN void pd_bind(t_pd *x, t_symbol *s);
|
||||
EXTERN void pd_unbind(t_pd *x, t_symbol *s);
|
||||
EXTERN t_pd *pd_findbyclass(t_symbol *s, t_class *c);
|
||||
EXTERN void pd_pushsym(t_pd *x);
|
||||
EXTERN void pd_popsym(t_pd *x);
|
||||
EXTERN t_symbol *pd_getfilename(void);
|
||||
EXTERN t_symbol *pd_getdirname(void);
|
||||
EXTERN void pd_bang(t_pd *x);
|
||||
EXTERN void pd_pointer(t_pd *x, t_gpointer *gp);
|
||||
EXTERN void pd_float(t_pd *x, t_float f);
|
||||
EXTERN void pd_symbol(t_pd *x, t_symbol *s);
|
||||
EXTERN void pd_list(t_pd *x, t_symbol *s, int argc, t_atom *argv);
|
||||
EXTERN void pd_anything(t_pd *x, t_symbol *s, int argc, t_atom *argv);
|
||||
#define pd_class(x) (*(x))
|
||||
|
||||
/* ----------------- pointers ---------------- */
|
||||
EXTERN void gpointer_init(t_gpointer *gp);
|
||||
EXTERN void gpointer_copy(const t_gpointer *gpfrom, t_gpointer *gpto);
|
||||
EXTERN void gpointer_unset(t_gpointer *gp);
|
||||
EXTERN int gpointer_check(const t_gpointer *gp, int headok);
|
||||
|
||||
/* ----------------- patchable "objects" -------------- */
|
||||
EXTERN t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1,
|
||||
t_symbol *s2);
|
||||
EXTERN t_inlet *pointerinlet_new(t_object *owner, t_gpointer *gp);
|
||||
EXTERN t_inlet *floatinlet_new(t_object *owner, t_float *fp);
|
||||
EXTERN t_inlet *symbolinlet_new(t_object *owner, t_symbol **sp);
|
||||
EXTERN t_inlet *signalinlet_new(t_object *owner, t_float f);
|
||||
EXTERN void inlet_free(t_inlet *x);
|
||||
|
||||
EXTERN t_outlet *outlet_new(t_object *owner, t_symbol *s);
|
||||
EXTERN void outlet_bang(t_outlet *x);
|
||||
EXTERN void outlet_pointer(t_outlet *x, t_gpointer *gp);
|
||||
EXTERN void outlet_float(t_outlet *x, t_float f);
|
||||
EXTERN void outlet_symbol(t_outlet *x, t_symbol *s);
|
||||
EXTERN void outlet_list(t_outlet *x, t_symbol *s, int argc, t_atom *argv);
|
||||
EXTERN void outlet_anything(t_outlet *x, t_symbol *s, int argc, t_atom *argv);
|
||||
EXTERN t_symbol *outlet_getsymbol(t_outlet *x);
|
||||
EXTERN void outlet_free(t_outlet *x);
|
||||
EXTERN t_object *pd_checkobject(t_pd *x);
|
||||
|
||||
|
||||
/* -------------------- canvases -------------- */
|
||||
|
||||
EXTERN void glob_setfilename(void *dummy, t_symbol *name, t_symbol *dir);
|
||||
|
||||
EXTERN void canvas_setargs(int argc, t_atom *argv);
|
||||
EXTERN void canvas_getargs(int *argcp, t_atom **argvp);
|
||||
EXTERN t_symbol *canvas_getcurrentdir(void);
|
||||
EXTERN t_glist *canvas_getcurrent(void);
|
||||
EXTERN void canvas_makefilename(t_glist *c, char *file,
|
||||
char *result,int resultsize);
|
||||
EXTERN t_symbol *canvas_getdir(t_glist *x);
|
||||
EXTERN char sys_font[]; /* default typeface set in s_main.c */
|
||||
EXTERN char sys_fontweight[]; /* default font weight set in s_main.c */
|
||||
EXTERN int sys_fontwidth(int fontsize);
|
||||
EXTERN int sys_fontheight(int fontsize);
|
||||
EXTERN void canvas_dataproperties(t_glist *x, t_scalar *sc, t_binbuf *b);
|
||||
EXTERN int canvas_open(t_canvas *x, const char *name, const char *ext,
|
||||
char *dirresult, char **nameresult, unsigned int size, int bin);
|
||||
|
||||
/* ---------------- widget behaviors ---------------------- */
|
||||
|
||||
EXTERN_STRUCT _widgetbehavior;
|
||||
#define t_widgetbehavior struct _widgetbehavior
|
||||
|
||||
EXTERN_STRUCT _parentwidgetbehavior;
|
||||
#define t_parentwidgetbehavior struct _parentwidgetbehavior
|
||||
EXTERN t_parentwidgetbehavior *pd_getparentwidget(t_pd *x);
|
||||
|
||||
/* -------------------- classes -------------- */
|
||||
|
||||
#define CLASS_DEFAULT 0 /* flags for new classes below */
|
||||
#define CLASS_PD 1
|
||||
#define CLASS_GOBJ 2
|
||||
#define CLASS_PATCHABLE 3
|
||||
#define CLASS_NOINLET 8
|
||||
|
||||
#define CLASS_TYPEMASK 3
|
||||
|
||||
|
||||
EXTERN t_class *class_new(t_symbol *name, t_newmethod newmethod,
|
||||
t_method freemethod, size_t size, int flags, t_atomtype arg1, ...);
|
||||
EXTERN void class_addcreator(t_newmethod newmethod, t_symbol *s,
|
||||
t_atomtype type1, ...);
|
||||
EXTERN void class_addmethod(t_class *c, t_method fn, t_symbol *sel,
|
||||
t_atomtype arg1, ...);
|
||||
EXTERN void class_addbang(t_class *c, t_method fn);
|
||||
EXTERN void class_addpointer(t_class *c, t_method fn);
|
||||
EXTERN void class_doaddfloat(t_class *c, t_method fn);
|
||||
EXTERN void class_addsymbol(t_class *c, t_method fn);
|
||||
EXTERN void class_addlist(t_class *c, t_method fn);
|
||||
EXTERN void class_addanything(t_class *c, t_method fn);
|
||||
EXTERN void class_sethelpsymbol(t_class *c, t_symbol *s);
|
||||
EXTERN void class_setwidget(t_class *c, t_widgetbehavior *w);
|
||||
EXTERN void class_setparentwidget(t_class *c, t_parentwidgetbehavior *w);
|
||||
EXTERN t_parentwidgetbehavior *class_parentwidget(t_class *c);
|
||||
EXTERN char *class_getname(t_class *c);
|
||||
EXTERN char *class_gethelpname(t_class *c);
|
||||
EXTERN void class_setdrawcommand(t_class *c);
|
||||
EXTERN int class_isdrawcommand(t_class *c);
|
||||
EXTERN void class_domainsignalin(t_class *c, int onset);
|
||||
EXTERN void class_set_extern_dir(t_symbol *s);
|
||||
#define CLASS_MAINSIGNALIN(c, type, field) \
|
||||
class_domainsignalin(c, (char *)(&((type *)0)->field) - (char *)0)
|
||||
|
||||
/* prototype for functions to save Pd's to a binbuf */
|
||||
typedef void (*t_savefn)(t_gobj *x, t_binbuf *b);
|
||||
EXTERN void class_setsavefn(t_class *c, t_savefn f);
|
||||
EXTERN t_savefn class_getsavefn(t_class *c);
|
||||
/* prototype for functions to open properties dialogs */
|
||||
typedef void (*t_propertiesfn)(t_gobj *x, struct _glist *glist);
|
||||
EXTERN void class_setpropertiesfn(t_class *c, t_propertiesfn f);
|
||||
EXTERN t_propertiesfn class_getpropertiesfn(t_class *c);
|
||||
|
||||
#ifndef PD_CLASS_DEF
|
||||
#define class_addbang(x, y) class_addbang((x), (t_method)(y))
|
||||
#define class_addpointer(x, y) class_addpointer((x), (t_method)(y))
|
||||
#define class_addfloat(x, y) class_doaddfloat((x), (t_method)(y))
|
||||
#define class_addsymbol(x, y) class_addsymbol((x), (t_method)(y))
|
||||
#define class_addlist(x, y) class_addlist((x), (t_method)(y))
|
||||
#define class_addanything(x, y) class_addanything((x), (t_method)(y))
|
||||
#endif
|
||||
|
||||
/* ------------ printing --------------------------------- */
|
||||
EXTERN void post(const char *fmt, ...);
|
||||
EXTERN void startpost(const char *fmt, ...);
|
||||
EXTERN void poststring(const char *s);
|
||||
EXTERN void postfloat(t_floatarg f);
|
||||
EXTERN void postatom(int argc, t_atom *argv);
|
||||
EXTERN void endpost(void);
|
||||
EXTERN void error(const char *fmt, ...);
|
||||
EXTERN void verbose(int level, const char *fmt, ...);
|
||||
EXTERN void bug(const char *fmt, ...);
|
||||
EXTERN void pd_error(void *object, const char *fmt, ...);
|
||||
EXTERN void sys_logerror(const char *object, const char *s);
|
||||
EXTERN void sys_unixerror(const char *object);
|
||||
EXTERN void sys_ouch(void);
|
||||
|
||||
|
||||
/* ------------ system interface routines ------------------- */
|
||||
EXTERN int sys_isreadablefile(const char *name);
|
||||
EXTERN int sys_isabsolutepath(const char *dir);
|
||||
EXTERN void sys_bashfilename(const char *from, char *to);
|
||||
EXTERN void sys_unbashfilename(const char *from, char *to);
|
||||
EXTERN int open_via_path(const char *name, const char *ext, const char *dir,
|
||||
char *dirresult, char **nameresult, unsigned int size, int bin);
|
||||
EXTERN int sched_geteventno(void);
|
||||
EXTERN double sys_getrealtime(void);
|
||||
EXTERN int (*sys_idlehook)(void); /* hook to add idle time computation */
|
||||
|
||||
|
||||
/* ------------ threading ------------------- */
|
||||
EXTERN void sys_lock(void);
|
||||
EXTERN void sys_unlock(void);
|
||||
EXTERN int sys_trylock(void);
|
||||
|
||||
|
||||
/* --------------- signals ----------------------------------- */
|
||||
|
||||
typedef PD_FLOATTYPE t_sample;
|
||||
#define MAXLOGSIG 32
|
||||
#define MAXSIGSIZE (1 << MAXLOGSIG)
|
||||
|
||||
typedef struct _signal
|
||||
{
|
||||
int s_n; /* number of points in the array */
|
||||
t_sample *s_vec; /* the array */
|
||||
t_float s_sr; /* sample rate */
|
||||
int s_refcount; /* number of times used */
|
||||
int s_isborrowed; /* whether we're going to borrow our array */
|
||||
struct _signal *s_borrowedfrom; /* signal to borrow it from */
|
||||
struct _signal *s_nextfree; /* next in freelist */
|
||||
struct _signal *s_nextused; /* next in used list */
|
||||
int s_vecsize; /* allocated size of array in points */
|
||||
} t_signal;
|
||||
|
||||
typedef t_int *(*t_perfroutine)(t_int *args);
|
||||
|
||||
EXTERN t_int *plus_perform(t_int *args);
|
||||
EXTERN t_int *zero_perform(t_int *args);
|
||||
EXTERN t_int *copy_perform(t_int *args);
|
||||
|
||||
EXTERN void dsp_add_plus(t_sample *in1, t_sample *in2, t_sample *out, int n);
|
||||
EXTERN void dsp_add_copy(t_sample *in, t_sample *out, int n);
|
||||
EXTERN void dsp_add_scalarcopy(t_float *in, t_sample *out, int n);
|
||||
EXTERN void dsp_add_zero(t_sample *out, int n);
|
||||
|
||||
EXTERN int sys_getblksize(void);
|
||||
EXTERN t_float sys_getsr(void);
|
||||
EXTERN int sys_get_inchannels(void);
|
||||
EXTERN int sys_get_outchannels(void);
|
||||
|
||||
EXTERN void dsp_add(t_perfroutine f, int n, ...);
|
||||
EXTERN void dsp_addv(t_perfroutine f, int n, t_int *vec);
|
||||
EXTERN void pd_fft(t_float *buf, int npoints, int inverse);
|
||||
EXTERN int ilog2(int n);
|
||||
|
||||
EXTERN void mayer_fht(t_sample *fz, int n);
|
||||
EXTERN void mayer_fft(int n, t_sample *real, t_sample *imag);
|
||||
EXTERN void mayer_ifft(int n, t_sample *real, t_sample *imag);
|
||||
EXTERN void mayer_realfft(int n, t_sample *real);
|
||||
EXTERN void mayer_realifft(int n, t_sample *real);
|
||||
|
||||
EXTERN float *cos_table;
|
||||
#define LOGCOSTABSIZE 9
|
||||
#define COSTABSIZE (1<<LOGCOSTABSIZE)
|
||||
|
||||
EXTERN int canvas_suspend_dsp(void);
|
||||
EXTERN void canvas_resume_dsp(int oldstate);
|
||||
EXTERN void canvas_update_dsp(void);
|
||||
EXTERN int canvas_dspstate;
|
||||
|
||||
/* up/downsampling */
|
||||
typedef struct _resample
|
||||
{
|
||||
int method; /* up/downsampling method ID */
|
||||
|
||||
t_int downsample; /* downsampling factor */
|
||||
t_int upsample; /* upsampling factor */
|
||||
|
||||
t_sample *s_vec; /* here we hold the resampled data */
|
||||
int s_n;
|
||||
|
||||
t_sample *coeffs; /* coefficients for filtering... */
|
||||
int coefsize;
|
||||
|
||||
t_sample *buffer; /* buffer for filtering */
|
||||
int bufsize;
|
||||
} t_resample;
|
||||
|
||||
EXTERN void resample_init(t_resample *x);
|
||||
EXTERN void resample_free(t_resample *x);
|
||||
|
||||
EXTERN void resample_dsp(t_resample *x, t_sample *in, int insize, t_sample *out, int outsize, int method);
|
||||
EXTERN void resamplefrom_dsp(t_resample *x, t_sample *in, int insize, int outsize, int method);
|
||||
EXTERN void resampleto_dsp(t_resample *x, t_sample *out, int insize, int outsize, int method);
|
||||
|
||||
/* ----------------------- utility functions for signals -------------- */
|
||||
EXTERN t_float mtof(t_float);
|
||||
EXTERN t_float ftom(t_float);
|
||||
EXTERN t_float rmstodb(t_float);
|
||||
EXTERN t_float powtodb(t_float);
|
||||
EXTERN t_float dbtorms(t_float);
|
||||
EXTERN t_float dbtopow(t_float);
|
||||
|
||||
EXTERN t_float q8_sqrt(t_float);
|
||||
EXTERN t_float q8_rsqrt(t_float);
|
||||
#ifndef N32
|
||||
EXTERN t_float qsqrt(t_float); /* old names kept for extern compatibility */
|
||||
EXTERN t_float qrsqrt(t_float);
|
||||
#endif
|
||||
/* --------------------- data --------------------------------- */
|
||||
|
||||
/* graphical arrays */
|
||||
EXTERN_STRUCT _garray;
|
||||
#define t_garray struct _garray
|
||||
|
||||
EXTERN t_class *garray_class;
|
||||
EXTERN int garray_getfloatarray(t_garray *x, int *size, t_float **vec);
|
||||
EXTERN int garray_getfloatwords(t_garray *x, int *size, t_word **vec);
|
||||
EXTERN t_float garray_get(t_garray *x, t_symbol *s, t_int indx);
|
||||
EXTERN void garray_redraw(t_garray *x);
|
||||
EXTERN int garray_npoints(t_garray *x);
|
||||
EXTERN char *garray_vec(t_garray *x);
|
||||
EXTERN void garray_resize(t_garray *x, t_floatarg f);
|
||||
EXTERN void garray_usedindsp(t_garray *x);
|
||||
EXTERN void garray_setsaveit(t_garray *x, int saveit);
|
||||
EXTERN t_class *scalar_class;
|
||||
|
||||
EXTERN t_float *value_get(t_symbol *s);
|
||||
EXTERN void value_release(t_symbol *s);
|
||||
EXTERN int value_getfloat(t_symbol *s, t_float *f);
|
||||
EXTERN int value_setfloat(t_symbol *s, t_float f);
|
||||
|
||||
/* ------- GUI interface - functions to send strings to TK --------- */
|
||||
typedef void (*t_guicallbackfn)(t_gobj *client, t_glist *glist);
|
||||
|
||||
EXTERN void sys_vgui(char *fmt, ...);
|
||||
EXTERN void sys_gui(char *s);
|
||||
EXTERN void sys_pretendguibytes(int n);
|
||||
EXTERN void sys_queuegui(void *client, t_glist *glist, t_guicallbackfn f);
|
||||
EXTERN void sys_unqueuegui(void *client);
|
||||
/* dialog window creation and destruction */
|
||||
EXTERN void gfxstub_new(t_pd *owner, void *key, const char *cmd);
|
||||
EXTERN void gfxstub_deleteforkey(void *key);
|
||||
|
||||
extern t_class *glob_pdobject; /* object to send "pd" messages */
|
||||
|
||||
/*------------- Max 0.26 compatibility --------------------*/
|
||||
|
||||
/* the following reflects the new way classes are laid out, with the class
|
||||
pointing to the messlist and not vice versa. Externs shouldn't feel it. */
|
||||
typedef t_class *t_externclass;
|
||||
|
||||
EXTERN void c_extern(t_externclass *cls, t_newmethod newroutine,
|
||||
t_method freeroutine, t_symbol *name, size_t size, int tiny, \
|
||||
t_atomtype arg1, ...);
|
||||
EXTERN void c_addmess(t_method fn, t_symbol *sel, t_atomtype arg1, ...);
|
||||
|
||||
#define t_getbytes getbytes
|
||||
#define t_freebytes freebytes
|
||||
#define t_resizebytes resizebytes
|
||||
#define typedmess pd_typedmess
|
||||
#define vmess pd_vmess
|
||||
|
||||
/* A definition to help gui objects straddle 0.34-0.35 changes. If this is
|
||||
defined, there is a "te_xpix" field in objects, not a "te_xpos" as before: */
|
||||
|
||||
#define PD_USE_TE_XPIX
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/* a test for NANs and denormals. Should only be necessary on i386. */
|
||||
#define PD_BADFLOAT(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \
|
||||
(((*(unsigned int*)&(f))&0x7f800000)==0x7f800000))
|
||||
/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */
|
||||
#define PD_BIGORSMALL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
|
||||
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
|
||||
#else
|
||||
#define PD_BADFLOAT(f) 0
|
||||
#define PD_BIGORSMALL(f) 0
|
||||
#endif
|
||||
|
||||
/* get version number at run time */
|
||||
EXTERN void sys_getversion(int *major, int *minor, int *bugfix);
|
||||
|
||||
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define __m_pd_h_
|
||||
#endif /* __m_pd_h_ */
|
38
libremediaserver/externals/artnetin/manual/manual.txt
vendored
Executable file
38
libremediaserver/externals/artnetin/manual/manual.txt
vendored
Executable file
|
@ -0,0 +1,38 @@
|
|||
******************************
|
||||
Artnetin 0.0.3
|
||||
Santiago Noreña
|
||||
puremediaserver@gmail.com
|
||||
******************************
|
||||
|
||||
Artnetin es un objeto de Pure Data que permite leer un universo entero de ArtNet y tratarlo como entrada de datos de Pure Data.
|
||||
|
||||
*****************************
|
||||
Instalación:
|
||||
|
||||
Artnetin depende de la biblioteca libartnet del proyecto OLA, por lo que antes de compilar el objeto deberías instalar libartnet. Para instalar libartnet:
|
||||
wget http://linux-lighting.googlecode.com/files/libartnet-1.1.0.tar.gz
|
||||
tar -zxf libartnet-1.1.0.tar.gz
|
||||
cd libartnet-1.1.0
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Para compilar artnetin:
|
||||
make
|
||||
|
||||
Ahora deberías copiar el archivo artnetin.pd_linux en una carpeta que esté dentro de las rutas de Pure Data o en la carpeta del patch que uses.
|
||||
*****************************
|
||||
Uso:
|
||||
|
||||
- El objeto escucha en el interface activo con la IP más baja, típicamente 2.x.x.x.
|
||||
|
||||
- Están disponibles los 512 canales; El objeto saca una lista de 512 enteros con el universo entero.
|
||||
|
||||
- Antes de que el objeto empiece a sacar valores hay que crear el nodo. Para ello hay que mandar un mensaje [open "nº subnet" "nº universo"]. Si sólo le pasamos open, escuchará en la subnet 0, universo 0. Si queremos cambiar el universo de escucha hay que mandar un mensaje [close]. Después se puede volver a mandar un nuevo mensaje open con la nueva configuración.
|
||||
|
||||
*****************************
|
||||
Ayuda y soporte:
|
||||
|
||||
puremediaserver@googlegroups.com
|
||||
*****************************
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue