Might work. Probably does. Thicc.

main
Jay Moore 6 days ago
parent ae4203fbc8
commit a272f236bc

@ -0,0 +1,49 @@
Music Player Daemon - http://www.musicpd.org
Copyright 2003-2025 The Music Player Daemon Project
The following people have contributed code to MPD:
Warren Dukes <warren.dukes@gmail.com>
Avuton Olrich <avuton@gmail.com>
Max Kellermann <max.kellermann@gmail.com>
Laszlo Ashin <kodest@gmail.com>
Viliam Mateicka <viliam.mateicka@gmail.com>
Eric Wollesen <encoded@xmtp.net>
Thomas Jansen <mithi@mithi.net>
Romain Bignon <romain@peerfuse.org>
David Guibert <david.guibert@gmail.com>
Jochen Keil <jochen.keil@gmail.com>
Jeffrey Middleton <jefromi@gmail.com>
Sean McNamara <smcnam@gmail.com>
Niklas Hofer
Jim Ramsay <i.am@jimramsay.com>
Guus Sliepen <guus@sliepen.eu.org>
J. Alexander Treuman <jat@spatialrift.net>
Eric Wong
José Anarch <anarchsss@gmail.com>
Patrik Weiskircher <pat@icore.at>
Nick Welch <mack@incise.org>
Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Anton Khirnov <anton@khirnov.net>
Simon Kagstrom <simon.kagstrom@gmail.com>
Denis Krjuchkov <denis@crazydev.net>
Jurgen Kramer <gtmkramer@xs4all.nl>
Jean-Francois Dockes <jf@dockes.org>
Yue Wang <yuleopen@gmail.com>
Matthew Leon Grinshpun <ml@matthewleon.com>
Dimitris Papastamos <sin@2f30.org>
Florian Schlichting <fsfs@debian.org>
François Revol <revol@free.fr>
Jacob Vosmaer <contact@jacobvosmaer.nl>
Thomas Guillem <thomas@gllm.fr>
Andrew Basterfield <abasterfield@gmail.com>
Bart Nagel <bart@tremby.net>
Christian Kröner <ckroener@gmx.net>
Christopher Zimmermann <madroach@gmerlin.de>
John Regan <john@jrjrtech.com>
Joshua Wise <joshua@joshuawise.com>
Ryan Walklin
Stefan Roellin <stefan@roellin-baumann.ch>
Stefano Miccoli <stefano.miccoli@polimi.it>
Steven O'Brien <steven_obrien1@yahoo.co.uk>
Thomas Zander <thomas.e.zander@googlemail.com>

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

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

@ -0,0 +1,9 @@
Copyright (c) <year> <owner>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

@ -0,0 +1,8 @@
ISC License:
Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
Copyright (c) 1995-2003 by Internet Software Consortium
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

@ -0,0 +1,175 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the library's name and an idea of what it does.
Copyright (C) year name of author
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in
the library `Frob' (a library for tweaking knobs) written
by James Random Hacker.
signature of Ty Coon, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

2906
NEWS

File diff suppressed because it is too large Load Diff

24
android/.gitignore vendored

@ -0,0 +1,24 @@
*.iml
.gradle
/local.properties
## ignoring .idea completely
# until a good reason emerges not to
/.idea
##--
## moved the following into .idea/.gitignore
#/.idea/caches
#/.idea/libraries
#/.idea/modules.xml
#/.idea/workspace.xml
#/.idea/navEditor.xml
#/.idea/assetWizardSettings.xml
## --
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# both were used: different spelling
app/src/main/jnilibs/
app/src/main/jniLibs/

@ -0,0 +1,8 @@
MPD for Android Privacy Policy
==============================
Music Player Daemon is an open source project currently maintained by
`Max Kellermann <mailto:max.kellermann+googleplay@gmail.com>`__.
Music Player Daemon does not access, collect, use or share any
personal or sensitive user data.

@ -0,0 +1,49 @@
# Android
Notes and resources for MPD android maintainers.
## Build
See [Compiling for Android](https://github.com/MusicPlayerDaemon/MPD/blob/45cb098cd765af12316f8dca5635ef10a852e013/doc/user.rst#compiling-for-android)
## Android studio
### Version control
git ignoring .idea directory completely until a good reason emerges not to
* [How to manage projects under Version Control Systems (jetbrains.com)](https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems)
* [gradle.xml should work like workspace.xml? (jetbrains.com)](https://youtrack.jetbrains.com/issue/IDEA-55923)
### Native libraries
* [Include prebuilt native libraries (developer.android.com)](https://developer.android.com/studio/projects/gradle-external-native-builds#jniLibs)
## Permissions
### Files access
The required permission depends on android SDK version:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
Manifest.permission.READ_MEDIA_AUDIO
else
Manifest.permission.READ_EXTERNAL_STORAGE
### Permission request
[Request runtime permissions](https://developer.android.com/training/permissions/requesting)
Since Android 6.0 (API level 23):
Android will ignore permission request and will not show the request dialog
if the user's action implies "don't ask again."
This leaves the app in a crippled state and the user confused.
Google says "don't try to convince the user", so it returns false for `shouldShowRequestPermissionRationale`.
To help the user proceed, we show the `Request permission` button only if `shouldShowRequestPermissionRationale == true`
because there's a good chance the permission request dialog will not be ignored.
If `shouldShowRequestPermissionRationale == false` we instead show the "rationale" message and a button to open
the app info dialog where the user can explicitly grand the permission.

@ -0,0 +1 @@
/build

@ -0,0 +1,128 @@
plugins {
id("com.google.devtools.ksp")
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.dagger.hilt.android)
}
android {
namespace = "org.musicpd"
compileSdk = 35
defaultConfig {
applicationId = "org.musicpd"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
vectorDrawables {
useSupportLibrary = true
}
}
buildFeatures {
aidl = true
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.10"
}
buildTypes {
debug {
isMinifyEnabled = false
}
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
// flavors
flavorDimensions += "base"
productFlavors {
create("fail-test") {
// To test System.loadLibrary("mpd") failure
// exclude the native lib from the package
packaging {
jniLibs {
// it appears the 'excludes' is applied to all flavors
// even if it's only inside this flavor.
// this filters by task name to apply the exclusion only
// for this flavor name.
// (clearing the 'abiFilters' will only create a universal apk
// with all of the abi versions)
gradle.startParameter.getTaskNames().forEach { task ->
if (task.contains("fail-test", ignoreCase = true)) {
println("NOTICE: excluding libmpd.so from package $task for testing")
excludes += "**/libmpd.so"
}
}
}
}
}
create("arm64-v8a") {
ndk {
// ABI to include in package
//noinspection ChromeOsAbiSupport
abiFilters += listOf("arm64-v8a")
}
}
create("x86_64") {
ndk {
// ABI to include in package
abiFilters += listOf("x86_64")
}
}
create("universal") {
ndk {
// ABI to include in package
abiFilters += listOf("arm64-v8a", "x86_64")
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_9.toString()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.material3)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.material.icons.extended)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.compose.settings.ui.m3)
implementation(libs.compose.settings.storage.preferences)
implementation(libs.accompanist.permissions)
implementation(libs.hilt.android)
ksp(libs.dagger.compiler)
ksp(libs.hilt.compiler)
implementation(libs.androidx.media3.session)
// Android Studio Preview support
implementation(libs.androidx.ui.tooling.preview)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
implementation(libs.androidx.appcompat)
}

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="73"
android:versionName="0.23.15">
<uses-feature
android:name="android.software.leanback"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<application
android:allowBackup="true"
android:banner="@mipmap/ic_banner"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/Theme.MPD"
android:name=".MPDApplication">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name=".Receiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<receiver android:name=".AutomationReceiver"
android:exported="true">
<intent-filter>
<action android:name="org.musicpd.action.StartService" />
</intent-filter>
<intent-filter>
<action android:name="org.musicpd.action.StopService" />
</intent-filter>
</receiver>
<service
android:name=".Main"
android:foregroundServiceType="mediaPlayback"
/>
</application>
</manifest>

@ -0,0 +1,13 @@
package org.musicpd;
import org.musicpd.IMainCallback;
interface IMain
{
void start();
void stop();
void setPauseOnHeadphonesDisconnect(boolean enabled);
void setWakelockEnabled(boolean enabled);
boolean isRunning();
void registerCallback(IMainCallback cb);
void unregisterCallback(IMainCallback cb);
}

@ -0,0 +1,8 @@
package org.musicpd;
interface IMainCallback
{
void onStarted();
void onStopped();
void onError(String error);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

@ -0,0 +1,24 @@
package org.musicpd
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
class AutomationReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
when(intent.action) {
"org.musicpd.action.StartService" -> {
val wakelock = Preferences.getBoolean(
context,
Preferences.KEY_WAKELOCK, false
)
Main.startService(context, wakelock)
}
"org.musicpd.action.StopService" -> {
context.startService(Intent(context, Main::class.java)
.setAction(Main.SHUTDOWN_ACTION))
}
}
}
}

@ -0,0 +1,24 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
package org.musicpd;
import android.content.Context;
/**
* Bridge to native code.
*/
public class Bridge {
/* used by jni */
public interface LogListener {
public void onLog(int priority, String msg);
}
public static native void run(Context context, LogListener logListener);
public static native void shutdown();
public static native void pause();
public static native void playPause();
public static native void playNext();
public static native void playPrevious();
}

@ -0,0 +1,45 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
package org.musicpd
import android.content.Context
import android.os.Build
import android.util.Log
object Loader {
private const val TAG = "Loader"
private var loaded: Boolean = false
private var error: String? = null
private val failReason: String get() = error ?: ""
val isLoaded: Boolean get() = loaded
init {
load()
}
private fun load() {
if (loaded) return
loaded = try {
error = null
System.loadLibrary("mpd")
Log.i(TAG, "mpd lib loaded")
true
} catch (e: Throwable) {
error = e.message ?: e.javaClass.simpleName
Log.e(TAG, "failed to load mpd lib: $failReason")
false
}
}
fun loadFailureMessage(context: Context): String {
return context.getString(
R.string.mpd_load_failure_message,
Build.SUPPORTED_ABIS.joinToString(),
Build.PRODUCT,
Build.FINGERPRINT,
failReason
)
}
}

@ -0,0 +1,9 @@
package org.musicpd
import android.app.Application
import dagger.hilt.android.HiltAndroidApp
@HiltAndroidApp
class MPDApplication : Application() {
}

@ -0,0 +1,76 @@
package org.musicpd;
import android.annotation.SuppressLint;
import android.os.Looper;
import androidx.annotation.NonNull;
import androidx.media3.common.Player;
import androidx.media3.common.SimpleBasePlayer;
import androidx.media3.common.util.UnstableApi;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.Arrays;
import java.util.List;
@UnstableApi
public class MPDPlayer extends SimpleBasePlayer {
List<MediaItemData> placeholderItems;
public MPDPlayer(Looper looper) {
super(looper);
// Dummy items to let us receive next and previous commands
MediaItemData item0 = new MediaItemData.Builder(0)
.build();
MediaItemData item1 = new MediaItemData.Builder(1)
.build();
MediaItemData item2 = new MediaItemData.Builder(2)
.build();
MediaItemData[] items = new MediaItemData[] { item0, item1, item2 };
placeholderItems = Arrays.asList(items);
}
@NonNull
@Override
protected State getState() {
Commands commands = new Commands.Builder().addAll(
COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM,
COMMAND_SEEK_TO_NEXT_MEDIA_ITEM,
COMMAND_PLAY_PAUSE
).build();
return new State.Builder()
.setAvailableCommands(commands)
.setPlaybackState(Player.STATE_READY)
.setPlaylist(placeholderItems)
.setCurrentMediaItemIndex(1)
.build();
}
@NonNull
@Override
protected ListenableFuture<?> handleSetPlayWhenReady(boolean playWhenReady) {
Bridge.playPause();
return Futures.immediateVoidFuture();
}
@NonNull
@SuppressLint("SwitchIntDef")
@Override
protected ListenableFuture<?> handleSeek(int mediaItemIndex, long positionMs, int seekCommand) {
switch (seekCommand) {
case COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM:
case COMMAND_SEEK_TO_PREVIOUS:
Bridge.playPrevious();
break;
case COMMAND_SEEK_TO_NEXT_MEDIA_ITEM:
case COMMAND_SEEK_TO_NEXT:
Bridge.playNext();
break;
}
return Futures.immediateVoidFuture();
}
}

@ -0,0 +1,326 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
package org.musicpd
import android.app.Notification
import android.app.NotificationManager
import android.app.PendingIntent
import android.app.Service
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.media.AudioManager
import android.os.Build
import android.os.IBinder
import android.os.Looper
import android.os.PowerManager
import android.os.PowerManager.WakeLock
import android.os.RemoteCallbackList
import android.os.RemoteException
import android.util.Log
import androidx.annotation.OptIn
import androidx.core.app.ServiceCompat
import androidx.media3.common.util.UnstableApi
import androidx.media3.session.MediaSession
import dagger.hilt.android.AndroidEntryPoint
import org.musicpd.Bridge.LogListener
import org.musicpd.data.LoggingRepository
import java.lang.reflect.Constructor
import javax.inject.Inject
@AndroidEntryPoint
class Main : Service(), Runnable {
companion object {
private const val TAG = "Main"
private const val WAKELOCK_TAG = "mpd:wakelockmain"
private const val MAIN_STATUS_ERROR = -1
private const val MAIN_STATUS_STOPPED = 0
private const val MAIN_STATUS_STARTED = 1
private const val MSG_SEND_STATUS = 0
const val SHUTDOWN_ACTION: String = "org.musicpd.action.ShutdownMPD"
/*
* start Main service without any callback
*/
@JvmStatic
fun startService(context: Context, wakelock: Boolean) {
val intent = Intent(context, Main::class.java)
.putExtra("wakelock", wakelock)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) /* in Android 8+, we need to use this method
or else we'll get "IllegalStateException:
app is in background" */
context.startForegroundService(intent)
else context.startService(intent)
}
}
private lateinit var mpdApp: MPDApplication
private lateinit var mpdLoader: Loader
private var mThread: Thread? = null
private var mStatus = MAIN_STATUS_STOPPED
private var mAbort = false
private var mError: String? = null
private val mCallbacks = RemoteCallbackList<IMainCallback>()
private val mBinder: IBinder = MainStub(this)
private var mPauseOnHeadphonesDisconnect = false
private var mWakelock: WakeLock? = null
private var mMediaSession: MediaSession? = null
@JvmField
@Inject
var logging: LoggingRepository? = null
internal class MainStub(private val mService: Main) : IMain.Stub() {
override fun start() {
mService.start()
}
override fun stop() {
mService.stop()
}
override fun setPauseOnHeadphonesDisconnect(enabled: Boolean) {
mService.setPauseOnHeadphonesDisconnect(enabled)
}
override fun setWakelockEnabled(enabled: Boolean) {
mService.setWakelockEnabled(enabled)
}
override fun isRunning(): Boolean {
return mService.isRunning
}
override fun registerCallback(cb: IMainCallback) {
mService.registerCallback(cb)
}
override fun unregisterCallback(cb: IMainCallback) {
mService.unregisterCallback(cb)
}
}
override fun onCreate() {
super.onCreate()
mpdLoader = Loader
}
@Synchronized
private fun sendMessage(
@Suppress("SameParameterValue") what: Int,
arg1: Int,
arg2: Int,
obj: Any?
) {
var i = mCallbacks.beginBroadcast()
while (i > 0) {
i--
val cb = mCallbacks.getBroadcastItem(i)
try {
when (what) {
MSG_SEND_STATUS -> when (arg1) {
MAIN_STATUS_ERROR -> cb.onError(obj as String?)
MAIN_STATUS_STOPPED -> cb.onStopped()
MAIN_STATUS_STARTED -> cb.onStarted()
}
}
} catch (ignored: RemoteException) {
}
}
mCallbacks.finishBroadcast()
}
private val mLogListener = LogListener { priority, msg ->
logging?.addLogItem(priority, msg)
}
override fun onBind(intent: Intent): IBinder {
return mBinder
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
if (intent?.action == SHUTDOWN_ACTION) {
stop()
} else {
start()
if (intent?.getBooleanExtra(
"wakelock",
false
) == true
) setWakelockEnabled(true)
}
return START_REDELIVER_INTENT
}
override fun run() {
synchronized(this) {
if (mAbort) return
setStatus(MAIN_STATUS_STARTED, null)
}
Bridge.run(this, mLogListener)
setStatus(MAIN_STATUS_STOPPED, null)
}
@Synchronized
private fun setStatus(status: Int, error: String?) {
mStatus = status
mError = error
sendMessage(MSG_SEND_STATUS, mStatus, 0, mError)
}
private fun createNotificationBuilderWithChannel(): Notification.Builder? {
val notificationManager = getSystemService(NOTIFICATION_SERVICE) as? NotificationManager
?: return null
val id = "org.musicpd"
val name = "MPD service"
val importance = 3 /* NotificationManager.IMPORTANCE_DEFAULT */
try {
val ncClass = Class.forName("android.app.NotificationChannel")
val ncCtor = ncClass.getConstructor(
String::class.java,
CharSequence::class.java,
Int::class.javaPrimitiveType
)
val nc = ncCtor.newInstance(id, name, importance)
val nmCreateNotificationChannelMethod =
NotificationManager::class.java.getMethod("createNotificationChannel", ncClass)
nmCreateNotificationChannelMethod.invoke(notificationManager, nc)
val nbCtor: Constructor<*> = Notification.Builder::class.java.getConstructor(
Context::class.java, String::class.java
)
return nbCtor.newInstance(this, id) as Notification.Builder
} catch (e: Exception) {
Log.e(TAG, "error creating the NotificationChannel", e)
return null
}
}
@OptIn(markerClass = [UnstableApi::class])
private fun start() {
if (mThread != null) return
val filter = IntentFilter()
filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY)
registerReceiver(object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (!mPauseOnHeadphonesDisconnect) return
if (intent.action === AudioManager.ACTION_AUDIO_BECOMING_NOISY) pause()
}
}, filter)
val mainIntent = Intent(this, MainActivity::class.java)
mainIntent.setAction("android.intent.action.MAIN")
mainIntent.addCategory("android.intent.category.LAUNCHER")
val contentIntent = PendingIntent.getActivity(
this, 0,
mainIntent, PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
val nBuilder: Notification.Builder?
if (Build.VERSION.SDK_INT >= 26 /* Build.VERSION_CODES.O */) {
nBuilder = createNotificationBuilderWithChannel()
if (nBuilder == null) return
} else nBuilder = Notification.Builder(this)
val notification =
nBuilder.setContentTitle(getText(R.string.notification_title_mpd_running))
.setContentText(getText(R.string.notification_text_mpd_running))
.setSmallIcon(R.drawable.notification_icon)
.setContentIntent(contentIntent)
.build()
if (mpdLoader.isLoaded) {
mThread = Thread(this).apply { start() }
}
val player = MPDPlayer(Looper.getMainLooper())
mMediaSession = MediaSession.Builder(this, player).build()
startForeground(R.string.notification_title_mpd_running, notification)
startService(Intent(this, Main::class.java))
}
private fun stop() {
mMediaSession?.let {
it.release()
mMediaSession = null
}
mThread?.let { thread ->
if (thread.isAlive) {
synchronized(this) {
if (mStatus == MAIN_STATUS_STARTED) Bridge.shutdown()
else mAbort = true
}
}
try {
thread.join()
mThread = null
mAbort = false
} catch (ie: InterruptedException) {
Log.e(TAG, "failed to join", ie)
}
}
setWakelockEnabled(false)
ServiceCompat.stopForeground(this, ServiceCompat.STOP_FOREGROUND_REMOVE)
stopSelf()
}
private fun pause() {
if (mThread?.isAlive == true) {
synchronized(this) {
if (mStatus == MAIN_STATUS_STARTED) Bridge.pause()
}
}
}
private fun setPauseOnHeadphonesDisconnect(enabled: Boolean) {
mPauseOnHeadphonesDisconnect = enabled
}
private fun setWakelockEnabled(enabled: Boolean) {
if (enabled) {
val wakeLock =
mWakelock ?: run {
val pm = getSystemService(POWER_SERVICE) as PowerManager
pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_TAG).also {
mWakelock = it
}
}
wakeLock.acquire(10 * 60 * 1000L /*10 minutes*/)
Log.d(TAG, "Wakelock acquired")
} else {
mWakelock?.let {
it.release()
mWakelock = null
}
Log.d(TAG, "Wakelock released")
}
}
private val isRunning: Boolean
get() = mThread?.isAlive == true
private fun registerCallback(cb: IMainCallback?) {
if (cb != null) {
mCallbacks.register(cb)
sendMessage(MSG_SEND_STATUS, mStatus, 0, mError)
}
}
private fun unregisterCallback(cb: IMainCallback?) {
if (cb != null) {
mCallbacks.unregister(cb)
}
}
}

@ -0,0 +1,57 @@
package org.musicpd
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.compose.material3.MaterialTheme
import androidx.core.view.WindowCompat
import dagger.hilt.android.AndroidEntryPoint
import org.musicpd.ui.MPDApp
import org.musicpd.ui.SettingsViewModel
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
private val settingsViewModel: SettingsViewModel by viewModels()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
setContent {
MaterialTheme {
MPDApp(settingsViewModel = settingsViewModel)
}
}
}
private fun connectClient() {
val client = MainServiceClient(this, object : MainServiceClient.Callback {
override fun onStopped() {
settingsViewModel.updateStatus("", false)
}
override fun onStarted() {
settingsViewModel.updateStatus("MPD Service Started", true)
}
override fun onError(error: String) {
settingsViewModel.removeClient()
settingsViewModel.updateStatus(error, false)
connectClient()
}
})
settingsViewModel.setClient(client)
}
override fun onStart() {
//mFirstRun = false
connectClient()
super.onStart()
}
override fun onStop() {
settingsViewModel.removeClient()
super.onStop()
}
}

@ -0,0 +1,157 @@
package org.musicpd;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
/*
* Client that bind the Main Service in order to send commands and receive callback
*/
public class MainServiceClient {
private static final String REMOTE_ERROR = "MPD process was killed";
public interface Callback {
public void onStarted();
public void onStopped();
public void onError(String error);
}
private boolean mBound = false;
private final Context mContext;
private Callback mCallback;
private IMain mIMain = null;
private final IMainCallback.Stub mICallback = new IMainCallback.Stub() {
@Override
public void onStopped() throws RemoteException {
mCallback.onStopped();
}
@Override
public void onStarted() throws RemoteException {
mCallback.onStarted();
}
@Override
public void onError(String error) throws RemoteException {
mCallback.onError(error);
}
};
private final ServiceConnection mServiceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
synchronized (this) {
mIMain = IMain.Stub.asInterface(service);
try {
if (mCallback != null)
mIMain.registerCallback(mICallback);
} catch (RemoteException e) {
if (mCallback != null)
mCallback.onError(REMOTE_ERROR);
}
}
}
@Override
public void onServiceDisconnected(ComponentName name) {
if (mCallback != null)
mCallback.onError(REMOTE_ERROR);
}
};
public MainServiceClient(Context context, Callback cb) throws IllegalArgumentException {
if (context == null)
throw new IllegalArgumentException("Context can't be null");
mContext = context;
mCallback = cb;
mBound = mContext.bindService(new Intent(mContext, Main.class), mServiceConnection, Context.BIND_AUTO_CREATE);
}
public boolean start() {
synchronized (this) {
if (mIMain != null) {
try {
mIMain.start();
return true;
} catch (RemoteException e) {
}
}
return false;
}
}
public boolean stop() {
synchronized (this) {
if (mIMain != null) {
try {
mIMain.stop();
return true;
} catch (RemoteException e) {
}
}
return false;
}
}
public boolean setPauseOnHeadphonesDisconnect(boolean enabled) {
synchronized (this) {
if (mIMain != null) {
try {
mIMain.setPauseOnHeadphonesDisconnect(enabled);
return true;
} catch (RemoteException e) {
}
}
return false;
}
}
public boolean setWakelockEnabled(boolean enabled) {
synchronized (this) {
if (mIMain != null) {
try {
mIMain.setWakelockEnabled(enabled);
return true;
} catch (RemoteException e) {
}
}
return false;
}
}
public boolean isRunning() {
synchronized (this) {
if (mIMain != null) {
try {
return mIMain.isRunning();
} catch (RemoteException e) {
}
}
return false;
}
}
public void release() {
if (mBound) {
synchronized (this) {
if (mIMain != null && mICallback != null) {
try {
if (mCallback != null)
mIMain.unregisterCallback(mICallback);
} catch (RemoteException e) {
}
}
}
mBound = false;
mContext.unbindService(mServiceConnection);
}
}
}

@ -0,0 +1,34 @@
package org.musicpd;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.LinkAddress;
import android.net.LinkProperties;
import androidx.annotation.Nullable;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.util.List;
public class NetworkUtil {
@Nullable
public static String getDeviceIPV4Address(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
LinkProperties linkProperties = connectivityManager.getLinkProperties(connectivityManager.getActiveNetwork());
if (linkProperties != null) {
List<LinkAddress> linkAddresses = linkProperties.getLinkAddresses();
for (LinkAddress address : linkAddresses) {
if (!address.getAddress().isLinkLocalAddress() && !address.getAddress().isLoopbackAddress()) {
InetAddress address1 = address.getAddress();
if (address1 instanceof Inet4Address) {
return address1.getHostAddress();
}
}
}
}
return null;
}
}

@ -0,0 +1,34 @@
package org.musicpd;
import static android.content.Context.MODE_PRIVATE;
import android.content.Context;
import android.content.SharedPreferences;
public class Preferences {
private static final String TAG = "Settings";
public static final String KEY_RUN_ON_BOOT ="run_on_boot";
public static final String KEY_WAKELOCK ="wakelock";
public static final String KEY_PAUSE_ON_HEADPHONES_DISCONNECT ="pause_on_headphones_disconnect";
public static SharedPreferences get(Context context) {
return context.getSharedPreferences(TAG, MODE_PRIVATE);
}
public static void putBoolean(Context context, String key, boolean value) {
final SharedPreferences prefs = get(context);
if (prefs == null)
return;
final SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(key, value);
editor.apply();
}
public static boolean getBoolean(Context context, String key, boolean defValue) {
final SharedPreferences prefs = get(context);
return prefs != null ? prefs.getBoolean(key, defValue) : defValue;
}
}

@ -0,0 +1,34 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
package org.musicpd;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import java.util.Set;
public class Receiver extends BroadcastReceiver {
private static final Set<String> BOOT_ACTIONS = Set.of(
"android.intent.action.BOOT_COMPLETED",
"android.intent.action.QUICKBOOT_POWERON"
);
@Override
public void onReceive(Context context, Intent intent) {
Log.d("Receiver", "onReceive: " + intent);
if (BOOT_ACTIONS.contains(intent.getAction())) {
if (Preferences.getBoolean(context,
Preferences.KEY_RUN_ON_BOOT,
false)) {
final boolean wakelock =
Preferences.getBoolean(context,
Preferences.KEY_WAKELOCK, false);
Main.startService(context, wakelock);
}
}
}
}

@ -0,0 +1,34 @@
package org.musicpd.data
import android.util.Log
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import javax.inject.Inject
import javax.inject.Singleton
private const val MAX_LOGS = 500
@Singleton
class LoggingRepository @Inject constructor() {
private val _logItemFLow = MutableStateFlow(listOf<String>())
val logItemFLow: StateFlow<List<String>> = _logItemFLow
fun addLogItem(priority: Int, message: String) {
if (_logItemFLow.value.size > MAX_LOGS) {
_logItemFLow.value = _logItemFLow.value.drop(1)
}
val priorityString: String = when (priority) {
Log.DEBUG -> "D"
Log.ERROR -> "E"
Log.INFO -> "I"
Log.VERBOSE -> "V"
Log.WARN -> "W"
else -> ""
}
_logItemFLow.value = _logItemFLow.value + ("$priorityString/$message")
}
}

@ -0,0 +1,79 @@
package org.musicpd.ui
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.VerticalAlignBottom
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@Composable
fun LogView(messages: List<String>) {
val lazyListState = rememberLazyListState()
var userScrolled = remember { mutableStateOf(false) }
LaunchedEffect(lazyListState) {
snapshotFlow { lazyListState.isScrollInProgress }
.collect {
if (it) {
userScrolled.value = true
}
}
}
Box(Modifier.fillMaxSize()) {
LazyColumn(
Modifier.padding(4.dp),
lazyListState
) {
items(messages) { message ->
Text(text = message, fontFamily = FontFamily.Monospace)
}
CoroutineScope(Dispatchers.Main).launch {
lazyListState.scrollToItem(messages.count(), 0)
}
}
if (lazyListState.canScrollForward) {
FloatingActionButton(
onClick = {
userScrolled.value = false
CoroutineScope(Dispatchers.Main).launch {
lazyListState.scrollToItem(messages.count(), 0)
}
},
modifier = Modifier.padding(16.dp).align(Alignment.BottomEnd)
) {
Icon(Icons.Filled.VerticalAlignBottom, "Scroll to bottom icon")
}
}
}
}
@Preview
@Composable
fun LogViewPreview() {
val data = listOf("test",
"test2",
"test3")
LogView(data)
}

@ -0,0 +1,109 @@
package org.musicpd.ui
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.List
import androidx.compose.material.icons.filled.Home
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material3.Icon
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavController
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
enum class Screen {
HOME,
LOGS,
SETTINGS,
}
sealed class NavigationItem(val route: String, val label: String, val icon: ImageVector) {
data object Home : NavigationItem(
Screen.HOME.name,
"Home",
Icons.Default.Home
)
data object Logs : NavigationItem(
Screen.LOGS.name,
"Logs",
Icons.AutoMirrored.Filled.List)
data object Settings : NavigationItem(
Screen.SETTINGS.name,
"Settings",
Icons.Default.Settings)
}
@Composable
fun MPDApp(
navController: NavHostController = rememberNavController(),
settingsViewModel: SettingsViewModel = viewModel()
) {
Scaffold(
topBar = {
},
bottomBar = {
BottomNavigationBar(navController)
},
) { innerPadding ->
NavHost(
navController = navController,
startDestination = NavigationItem.Home.route,
modifier = Modifier.padding(innerPadding)
) {
composable(NavigationItem.Home.route) {
StatusScreen(settingsViewModel)
}
composable(NavigationItem.Logs.route) {
LogView(settingsViewModel.getLogs().collectAsStateWithLifecycle().value)
}
composable(NavigationItem.Settings.route) {
MPDSettings(settingsViewModel)
}
}
}
}
@Composable
fun BottomNavigationBar(navController: NavController) {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
val items = listOf(
NavigationItem.Home,
NavigationItem.Logs,
NavigationItem.Settings,
)
NavigationBar {
items.forEach { item ->
NavigationBarItem(
icon = {
Icon(
imageVector = item.icon,
contentDescription = null
)
},
label = { Text (item.label) },
onClick = {
navController.navigate(item.route) {
popUpTo(navController.graph.startDestinationId)
launchSingleTop = true
}
},
selected = currentRoute == item.route,
)
}
}
}

@ -0,0 +1,39 @@
package org.musicpd.ui
import android.app.Application
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Wifi
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import org.musicpd.NetworkUtil
@Composable
fun NetworkAddress() {
val address = NetworkUtil.getDeviceIPV4Address(LocalContext.current)
val padding = 4.dp
Row(
Modifier
.padding(padding)
.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center
) {
Icon(
imageVector = Icons.Default.Wifi,
contentDescription = "Wifi")
Spacer(Modifier.size(padding))
Text(text = address ?: "")
}
}

@ -0,0 +1,77 @@
package org.musicpd.ui
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.BatteryAlert
import androidx.compose.material.icons.filled.Headphones
import androidx.compose.material.icons.filled.PowerSettingsNew
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import com.alorma.compose.settings.storage.preferences.rememberPreferenceBooleanSettingState
import com.alorma.compose.settings.ui.SettingsSwitch
import org.musicpd.Preferences
import org.musicpd.R
@Composable
fun MPDSettings(settingsViewModel: SettingsViewModel) {
val context = LocalContext.current
Column(Modifier.fillMaxSize()) {
SettingsOptions(
onBootChanged = { newValue ->
if (newValue) {
settingsViewModel.startMPD(context)
}
},
onWakeLockChanged = { newValue ->
settingsViewModel.setWakelockEnabled(newValue)
},
onHeadphonesChanged = { newValue ->
settingsViewModel.setPauseOnHeadphonesDisconnect(newValue)
}
)
}
}
@Composable
fun SettingsOptions(
onBootChanged: (Boolean) -> Unit,
onWakeLockChanged: (Boolean) -> Unit,
onHeadphonesChanged: (Boolean) -> Unit
) {
val bootState = rememberPreferenceBooleanSettingState(
key = Preferences.KEY_RUN_ON_BOOT,
defaultValue = false
)
val wakelockState =
rememberPreferenceBooleanSettingState(key = Preferences.KEY_WAKELOCK, defaultValue = false)
val headphoneState = rememberPreferenceBooleanSettingState(
key = Preferences.KEY_PAUSE_ON_HEADPHONES_DISCONNECT,
defaultValue = false
)
SettingsSwitch(
icon = { Icon(imageVector = Icons.Default.PowerSettingsNew, contentDescription = "Power") },
title = { Text(text = stringResource(R.string.checkbox_run_on_boot)) },
onCheckedChange = onBootChanged,
state = bootState
)
SettingsSwitch(
icon = { Icon(imageVector = Icons.Default.BatteryAlert, contentDescription = "Battery") },
title = { Text(text = stringResource(R.string.checkbox_wakelock)) },
onCheckedChange = onWakeLockChanged,
state = wakelockState
)
SettingsSwitch(
icon = { Icon(imageVector = Icons.Default.Headphones, contentDescription = "Headphones") },
title = { Text(text = stringResource(R.string.checkbox_pause_on_headphones_disconnect)) },
onCheckedChange = onHeadphonesChanged,
state = headphoneState
)
}

@ -0,0 +1,73 @@
package org.musicpd.ui
import android.content.Context
import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import org.musicpd.Loader
import org.musicpd.MainServiceClient
import org.musicpd.Preferences
import org.musicpd.data.LoggingRepository
import javax.inject.Inject
@HiltViewModel
class SettingsViewModel @Inject constructor(
private var loggingRepository: LoggingRepository
) : ViewModel() {
private var mClient: MainServiceClient? = null
val mpdLoader = Loader
data class StatusUiState(
val statusMessage: String = "",
val running: Boolean = false
)
private val _statusUIState = MutableStateFlow(StatusUiState())
val statusUIState: StateFlow<StatusUiState> = _statusUIState.asStateFlow()
fun getLogs(): StateFlow<List<String>> {
return loggingRepository.logItemFLow
}
fun updateStatus(message: String, running: Boolean) {
_statusUIState.value = StatusUiState(message, running)
}
fun setClient(client: MainServiceClient) {
mClient = client
}
fun removeClient() {
mClient?.release()
mClient = null
}
fun startMPD(context: Context) {
mClient?.start()
if (Preferences.getBoolean(
context,
Preferences.KEY_WAKELOCK, false
)
) mClient?.setWakelockEnabled(true)
if (Preferences.getBoolean(
context,
Preferences.KEY_PAUSE_ON_HEADPHONES_DISCONNECT, false
)
) mClient?.setPauseOnHeadphonesDisconnect(true)
}
fun stopMPD() {
mClient?.stop()
}
fun setWakelockEnabled(enabled: Boolean) {
mClient?.setWakelockEnabled(enabled)
}
fun setPauseOnHeadphonesDisconnect(enabled: Boolean) {
mClient?.setPauseOnHeadphonesDisconnect(enabled)
}
}

@ -0,0 +1,188 @@
package org.musicpd.ui
import android.Manifest
import android.content.Context
import android.os.Build
import android.util.TypedValue
import androidx.annotation.AttrRes
import androidx.annotation.ColorInt
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Circle
import androidx.compose.material3.Button
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.google.accompanist.permissions.ExperimentalPermissionsApi
import com.google.accompanist.permissions.PermissionState
import com.google.accompanist.permissions.isGranted
import com.google.accompanist.permissions.rememberPermissionState
import com.google.accompanist.permissions.shouldShowRationale
import org.musicpd.R
import org.musicpd.utils.openAppSettings
@OptIn(ExperimentalPermissionsApi::class)
@Composable
fun StatusScreen(settingsViewModel: SettingsViewModel) {
val storagePermissionState = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
rememberPermissionState(
Manifest.permission.READ_MEDIA_AUDIO
)
} else {
rememberPermissionState(
Manifest.permission.READ_EXTERNAL_STORAGE
)
}
Column(
Modifier
.padding(4.dp)
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
NetworkAddress()
ServerStatus(settingsViewModel, storagePermissionState)
AudioMediaPermission(storagePermissionState)
MPDLoaderStatus(settingsViewModel)
}
}
@ColorInt
fun getThemeColorAttribute(context: Context, @AttrRes attr: Int): Int {
val value = TypedValue()
if (context.theme.resolveAttribute(attr, value, true)) {
return value.data
}
return android.graphics.Color.BLACK
}
@OptIn(ExperimentalPermissionsApi::class)
@Composable
fun ServerStatus(settingsViewModel: SettingsViewModel, storagePermissionState: PermissionState) {
val context = LocalContext.current
val statusUiState by settingsViewModel.statusUIState.collectAsState()
Column {
Row(
Modifier
.padding(4.dp)
.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceEvenly
) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(
imageVector = Icons.Default.Circle,
contentDescription = "",
tint = Color(
getThemeColorAttribute(
context,
if (statusUiState.running) R.attr.appColorPositive else R.attr.appColorNegative
)
),
modifier = Modifier
.padding(end = 8.dp)
.alpha(0.6f)
)
Text(text = stringResource(id = if (statusUiState.running) R.string.running else R.string.stopped))
}
Button(
onClick = {
if (statusUiState.running)
settingsViewModel.stopMPD()
else
settingsViewModel.startMPD(context)
},
enabled = settingsViewModel.mpdLoader.isLoaded
&& storagePermissionState.status.isGranted
) {
Text(
text = stringResource(id = if (statusUiState.running) R.string.stopMPD else R.string.startMPD)
)
}
}
Row(
Modifier
.padding(4.dp)
.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceEvenly
) {
Text(text = statusUiState.statusMessage)
}
}
}
@OptIn(ExperimentalPermissionsApi::class)
@Composable
fun AudioMediaPermission(storagePermissionState: PermissionState) {
val permissionStatus = storagePermissionState.status
if (!permissionStatus.isGranted) {
val context = LocalContext.current
Column(
Modifier
.padding(4.dp)
.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Text(
stringResource(id = R.string.external_files_permission_request),
Modifier.padding(16.dp)
)
if (storagePermissionState.status.shouldShowRationale) {
Button(onClick = {
storagePermissionState.launchPermissionRequest()
}) {
Text("Request permission")
}
} else {
OutlinedButton(
onClick = {
openAppSettings(context, context.packageName)
},
Modifier.padding(16.dp)
) {
Text(
stringResource(id = R.string.title_open_app_info),
color = MaterialTheme.colorScheme.secondary
)
}
}
}
}
}
@Composable
fun MPDLoaderStatus(settingsViewModel: SettingsViewModel) {
val loader = settingsViewModel.mpdLoader
if (!loader.isLoaded) {
val context = LocalContext.current
SelectionContainer {
Text(
loader.loadFailureMessage(context),
Modifier.padding(16.dp),
color = MaterialTheme.colorScheme.error
)
}
}
}

@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
package org.musicpd.utils
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.provider.Settings
import android.util.Log
private const val TAG = "IntentUtils"
fun openAppSettings(
context: Context,
packageName: String
) {
try {
context.startActivity(Intent().apply {
setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
setData(Uri.parse("package:$packageName"))
addCategory(Intent.CATEGORY_DEFAULT)
addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
})
} catch (e: ActivityNotFoundException) {
Log.e(
TAG,
"failed to open app settings for package: $packageName", e
)
}
}

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M1,9l2,2c4.97,-4.97 13.03,-4.97 18,0l2,-2C16.93,2.93 7.08,2.93 1,9zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0zM5,13l2,2c2.76,-2.76 7.24,-2.76 10,0l2,-2C15.14,9.14 8.87,9.14 5,13z"/>
</vector>

@ -0,0 +1,239 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="320dp"
android:height="180dp"
android:viewportWidth="320"
android:viewportHeight="180">
<path
android:pathData="M179.13,108.5H162.71V106.64C163.3,106.62 164.06,106.56 164.99,106.46C165.93,106.35 166.58,106.2 166.93,106.01C167.47,105.68 167.86,105.31 168.1,104.89C168.37,104.45 168.5,103.91 168.5,103.26V76.24H168.1L155.43,107.9H154.12L142.05,75.58H141.71V97.76C141.71,99.91 141.84,101.54 142.1,102.66C142.38,103.78 142.8,104.58 143.36,105.07C143.74,105.44 144.54,105.79 145.74,106.12C146.94,106.45 147.73,106.62 148.1,106.64V108.5H133.09V106.64C133.88,106.57 134.7,106.44 135.55,106.25C136.43,106.06 137.1,105.77 137.57,105.38C138.18,104.89 138.6,104.14 138.83,103.13C139.05,102.12 139.17,100.43 139.17,98.05V79.04C139.17,77.94 139.04,77.04 138.77,76.34C138.51,75.64 138.14,75.07 137.65,74.64C137.11,74.17 136.44,73.82 135.66,73.59C134.87,73.36 134.09,73.23 133.33,73.2V71.34H146L156.63,99.2L165.72,75.9C166.05,75.04 166.33,74.15 166.56,73.22C166.8,72.28 166.93,71.65 166.95,71.34H179.08V73.2C178.59,73.22 177.96,73.29 177.19,73.43C176.44,73.57 175.89,73.7 175.54,73.83C174.95,74.04 174.55,74.39 174.34,74.87C174.13,75.36 174.02,75.9 174.02,76.47V103.26C174.02,103.87 174.13,104.39 174.34,104.81C174.55,105.23 174.95,105.59 175.54,105.91C175.86,106.08 176.41,106.25 177.22,106.4C178.02,106.54 178.66,106.62 179.13,106.64V108.5Z"
android:fillColor="#000000"/>
<path
android:pathData="M212.6,80.5C212.6,82.44 212.21,84.16 211.45,85.66C210.7,87.15 209.65,88.38 208.3,89.36C206.98,90.33 205.52,91.05 203.93,91.5C202.34,91.96 200.66,92.18 198.88,92.18H194.71V103.45C194.71,104.06 194.81,104.6 195,105.07C195.21,105.52 195.63,105.87 196.26,106.12C196.57,106.24 197.12,106.35 197.91,106.46C198.71,106.56 199.44,106.62 200.11,106.64V108.5H184.16V106.64C184.58,106.61 185.18,106.54 185.96,106.46C186.77,106.37 187.33,106.26 187.64,106.12C188.16,105.89 188.54,105.56 188.77,105.12C189.01,104.68 189.13,104.13 189.13,103.45V76.63C189.13,76.02 189.05,75.47 188.87,74.98C188.7,74.49 188.29,74.12 187.64,73.88C186.98,73.65 186.31,73.49 185.65,73.41C185.01,73.3 184.45,73.23 183.98,73.2V71.34H200.95C204.4,71.34 207.2,72.18 209.35,73.85C211.52,75.51 212.6,77.73 212.6,80.5ZM204.64,86.84C205.23,86 205.62,85.14 205.82,84.25C206.01,83.34 206.1,82.53 206.1,81.81C206.1,80.82 205.98,79.81 205.74,78.78C205.51,77.75 205.11,76.85 204.53,76.08C203.92,75.26 203.12,74.62 202.12,74.17C201.13,73.71 199.89,73.49 198.4,73.49H194.71V89.91H197.38C199.27,89.91 200.8,89.62 201.97,89.04C203.15,88.45 204.04,87.71 204.64,86.84Z"
android:fillColor="#000000"/>
<path
android:pathData="M252.48,90.14C252.48,93.3 251.89,96.04 250.7,98.36C249.52,100.69 247.97,102.59 246.07,104.07C244.15,105.56 241.99,106.67 239.6,107.4C237.21,108.13 234.74,108.5 232.19,108.5H216.79V106.64C217.29,106.64 217.95,106.6 218.75,106.51C219.57,106.4 220.12,106.29 220.38,106.17C220.9,105.94 221.28,105.61 221.5,105.17C221.75,104.72 221.87,104.18 221.87,103.55V76.73C221.87,76.14 221.76,75.61 221.55,75.14C221.36,74.66 220.97,74.29 220.38,74.01C219.84,73.75 219.25,73.56 218.62,73.43C217.99,73.31 217.45,73.23 217,73.2V71.34H233.24C235.47,71.34 237.67,71.69 239.84,72.39C242,73.07 243.89,73.99 245.49,75.16C247.67,76.72 249.38,78.75 250.63,81.26C251.86,83.78 252.48,86.74 252.48,90.14ZM246.07,90.12C246.07,87.62 245.74,85.37 245.07,83.36C244.41,81.33 243.44,79.57 242.17,78.07C240.96,76.64 239.48,75.51 237.71,74.69C235.97,73.87 234.02,73.46 231.87,73.46C231.16,73.46 230.35,73.48 229.44,73.51C228.55,73.53 227.88,73.55 227.45,73.56V102.14C227.45,103.72 227.91,104.82 228.84,105.44C229.76,106.05 231.18,106.35 233.1,106.35C235.32,106.35 237.26,105.96 238.92,105.17C240.58,104.39 241.92,103.3 242.95,101.9C244.03,100.43 244.82,98.74 245.31,96.82C245.82,94.88 246.07,92.65 246.07,90.12Z"
android:fillColor="#000000"/>
<group>
<clip-path
android:pathData="M23,51h71v71h-71z"/>
<path
android:pathData="M87.49,88.31C87.49,88.07 87.29,87.87 87.06,87.87H60.89C60.66,87.87 60.46,88.07 60.46,88.31V110.83C60.46,111.07 60.66,111.26 60.89,111.26H87.06C87.29,111.26 87.49,111.07 87.49,110.83V88.31Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M93.82,68.38C93.82,68.14 93.63,67.95 93.39,67.95H59.19C58.96,67.95 58.76,68.14 58.76,68.38V97.86C58.76,98.1 58.96,98.29 59.19,98.29H93.39C93.63,98.29 93.82,98.1 93.82,97.86V68.38Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M91.36,96.94C91.36,96.73 91.2,96.57 90.99,96.57H59.64C59.44,96.57 59.28,96.73 59.28,96.94V101.2C59.28,101.4 59.44,101.56 59.64,101.56H90.99C91.2,101.56 91.36,101.4 91.36,101.2V96.94Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M89.3,96.89C89.3,96.75 89.19,96.64 89.05,96.64H59.09C58.96,96.64 58.85,96.75 58.85,96.89V99.8C58.85,99.94 58.96,100.05 59.09,100.05H89.05C89.19,100.05 89.3,99.94 89.3,99.8V96.89Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="76.53"
android:startY="102.12"
android:endX="69.28"
android:endY="95.45"
android:type="linear">
<item android:offset="0" android:color="#BFD2D2D2"/>
<item android:offset="1" android:color="#BFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M58.61,96.89C58.61,96.63 58.83,96.41 59.09,96.41H89.05C89.32,96.41 89.53,96.63 89.53,96.89V99.8C89.53,100.07 89.32,100.28 89.05,100.28H59.09C58.83,100.28 58.61,100.07 58.61,99.8V96.89ZM59.09,96.87C59.08,96.87 59.08,96.88 59.08,96.89V99.8C59.08,99.81 59.08,99.82 59.09,99.82H89.05C89.06,99.82 89.07,99.81 89.07,99.8V96.89C89.07,96.88 89.06,96.87 89.05,96.87H59.09Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M90.5,69.91C90.5,69.41 90.09,69 89.59,69H59.29C58.79,69 58.38,69.41 58.38,69.91V94.21C58.38,94.71 58.79,95.12 59.29,95.12H89.59C90.09,95.12 90.5,94.71 90.5,94.21V69.91Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="91.12"
android:startY="94.89"
android:endX="74.39"
android:endY="79.87"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M85.59,110.3C85.59,110.1 85.42,109.93 85.22,109.93H61.22C61.02,109.93 60.86,110.1 60.86,110.3V113.42C60.86,113.62 61.02,113.78 61.22,113.78H85.22C85.42,113.78 85.59,113.62 85.59,113.42V110.3Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M92.05,67.72C92.05,67.29 91.71,66.94 91.28,66.94H56.97C56.55,66.94 56.2,67.29 56.2,67.72V96.16C56.2,96.59 56.55,96.93 56.97,96.93H91.28C91.71,96.93 92.05,96.59 92.05,96.16V67.72Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="95.17"
android:startY="93.03"
android:endX="87.12"
android:endY="79.61"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M55.74,67.72C55.74,67.04 56.29,66.48 56.97,66.48H91.28C91.96,66.48 92.51,67.04 92.51,67.72V96.16C92.51,96.84 91.96,97.39 91.28,97.39H56.97C56.29,97.39 55.74,96.84 55.74,96.16V67.72ZM56.97,67.4C56.8,67.4 56.66,67.54 56.66,67.72V96.16C56.66,96.33 56.8,96.47 56.97,96.47H91.28C91.45,96.47 91.59,96.33 91.59,96.16V67.72C91.59,67.54 91.45,67.4 91.28,67.4H56.97Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M88.17,70.66C88.17,70.49 88.03,70.36 87.87,70.36H60.11C59.94,70.36 59.81,70.49 59.81,70.66V92.22C59.81,92.39 59.94,92.52 60.11,92.52H87.87C88.03,92.52 88.17,92.39 88.17,92.22V70.66Z"
android:fillColor="#00B4ED"
android:fillType="evenOdd"/>
<path
android:pathData="M59.59,70.66C59.59,70.37 59.82,70.14 60.11,70.14H87.87C88.16,70.14 88.39,70.37 88.39,70.66V92.22C88.39,92.51 88.16,92.74 87.87,92.74H60.11C59.82,92.74 59.59,92.51 59.59,92.22V70.66ZM60.11,70.58C60.06,70.58 60.03,70.61 60.03,70.66V92.22C60.03,92.27 60.06,92.31 60.11,92.31H87.87C87.91,92.31 87.95,92.27 87.95,92.22V70.66C87.95,70.61 87.91,70.58 87.87,70.58H60.11Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M84.93,89.59C84.93,89.09 84.52,88.68 84.02,88.68H61.07C60.57,88.68 60.17,89.09 60.17,89.59V107.91C60.17,108.41 60.57,108.82 61.07,108.82H84.02C84.52,108.82 84.93,108.41 84.93,107.91V89.59Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="85.4"
android:startY="108.64"
android:endX="72.51"
android:endY="97.06"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M72.64,108.86C72.35,110.81 63.69,112.41 53.46,112.41C43.24,112.41 35.07,110.81 35.36,108.86C35.66,106.92 44.32,105.32 54.54,105.32C64.77,105.32 72.94,106.92 72.64,108.86Z"
android:fillColor="#444040"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M46.49,87.74C43.2,95.65 45.43,104.45 51.42,107.24C57.42,110.04 65.06,105.82 68.34,97.92C71.63,90.01 69.4,81.21 63.41,78.42C57.41,75.62 49.77,79.83 46.49,87.74Z"
android:fillColor="#4E4D4B"
android:fillType="evenOdd"/>
<path
android:pathData="M68.58,86.44C69.43,89.79 69.19,93.78 67.61,97.58C66.03,101.38 63.41,104.26 60.51,105.86C57.6,107.47 54.45,107.76 51.73,106.49C49.01,105.23 47.09,102.57 46.25,99.22C45.4,95.87 45.64,91.88 47.22,88.08C48.8,84.28 51.42,81.4 54.32,79.79C57.23,78.19 60.37,77.9 63.1,79.17C65.82,80.43 67.74,83.09 68.58,86.44ZM70.13,86.06C69.18,82.34 66.99,79.19 63.72,77.67C60.44,76.14 56.77,76.56 53.54,78.34C50.31,80.12 47.46,83.29 45.75,87.4C44.04,91.5 43.76,95.87 44.7,99.6C45.65,103.32 47.84,106.47 51.11,107.99C54.39,109.52 58.06,109.1 61.29,107.32C64.52,105.54 67.37,102.37 69.08,98.26C70.78,94.15 71.07,89.79 70.13,86.06Z"
android:fillColor="#000000"
android:fillAlpha="0.95"
android:fillType="evenOdd"/>
<path
android:pathData="M30.48,75.66C23.76,88.96 25.17,103.77 33.61,108.47C42.05,113.17 54.53,106.08 61.25,92.78C67.98,79.48 66.56,64.67 58.12,59.98C49.68,55.28 37.21,62.36 30.48,75.66Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="89.23"
android:startY="61.39"
android:endX="8.66"
android:endY="47.26"
android:type="linear">
<item android:offset="0" android:color="#FFFFFFFF"/>
<item android:offset="1" android:color="#FF000000"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M64.24,73.24C64.78,78.94 63.51,85.74 60.24,92.22C56.96,98.7 52.31,103.62 47.51,106.34C42.69,109.07 37.89,109.53 34.13,107.43C30.37,105.34 28.04,100.92 27.49,95.2C26.95,89.5 28.22,82.7 31.49,76.22C34.77,69.75 39.42,64.83 44.22,62.1C49.04,59.37 53.84,58.92 57.6,61.01C61.36,63.1 63.7,67.53 64.24,73.24ZM66.51,73.07C65.92,66.88 63.33,61.55 58.65,58.95C53.96,56.34 48.31,57.08 43.09,60.04C37.86,63 32.92,68.28 29.47,75.1C26.02,81.92 24.63,89.17 25.23,95.38C25.81,101.57 28.4,106.9 33.09,109.5C37.77,112.11 43.42,111.37 48.64,108.41C53.87,105.44 58.81,100.17 62.26,93.35C65.71,86.52 67.1,79.27 66.51,73.07Z"
android:fillColor="#000000"
android:fillAlpha="0.95"
android:fillType="evenOdd"/>
<path
android:pathData="M31.01,75.59C25.32,87.25 26.23,100.23 33.04,104.34C39.84,108.46 50.12,102.25 55.81,90.6C61.51,78.94 60.59,65.96 53.78,61.84C46.98,57.73 36.7,63.93 31.01,75.59Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:centerX="16.83"
android:centerY="104.4"
android:gradientRadius="32.44"
android:type="radial">
<item android:offset="0" android:color="#9EFFFFFF"/>
<item android:offset="1" android:color="#FF5D6567"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M59.34,73.4C59.71,78.58 58.52,84.71 55.68,90.52C52.85,96.33 48.87,100.77 44.77,103.25C40.66,105.73 36.44,106.23 33.1,104.21C29.76,102.19 27.85,97.98 27.48,92.79C27.12,87.61 28.3,81.48 31.14,75.67C33.97,69.86 37.95,65.42 42.05,62.94C46.16,60.46 50.38,59.96 53.72,61.98C57.06,64 58.97,68.21 59.34,73.4ZM59.63,73.39C59.26,68.14 57.32,63.8 53.85,61.71C50.39,59.61 46.06,60.15 41.9,62.66C37.74,65.17 33.73,69.66 30.88,75.51C28.02,81.36 26.82,87.55 27.19,92.8C27.56,98.04 29.5,102.38 32.97,104.48C36.43,106.58 40.76,106.03 44.92,103.52C49.08,101.01 53.09,96.53 55.94,90.68C58.8,84.83 60,78.64 59.63,73.39Z"
android:fillColor="#000000"
android:fillAlpha="0.98"
android:fillType="evenOdd"/>
<path
android:pathData="M42.76,79.77C39.61,85.38 38.93,92.2 41.26,94.88C43.59,97.55 48.1,95.14 51.24,89.54C54.39,83.93 55.06,77.11 52.74,74.43C50.41,71.75 45.9,74.16 42.76,79.77Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M42.46,79.6C39.52,84.65 38.89,90.8 41.07,93.21C43.24,95.62 47.46,93.45 50.4,88.4C53.35,83.35 53.98,77.21 51.8,74.79C49.62,72.38 45.41,74.55 42.46,79.6Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="34.56"
android:startY="87.9"
android:endX="59.05"
android:endY="97.29"
android:type="linear">
<item android:offset="0" android:color="#FFD7D5D5"/>
<item android:offset="1" android:color="#66000000"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M52.89,80.57C52.64,83.01 51.76,85.78 50.3,88.28C48.84,90.79 47.06,92.58 45.39,93.44C43.72,94.3 42.18,94.22 41.15,93.07C40.11,91.93 39.72,89.87 39.97,87.43C40.22,85 41.11,82.22 42.57,79.72C44.03,77.21 45.8,75.43 47.47,74.57C49.15,73.7 50.69,73.78 51.72,74.93C52.75,76.07 53.14,78.13 52.89,80.57ZM53.15,80.64C53.41,78.15 53.02,75.93 51.88,74.66C50.73,73.39 49.08,73.35 47.37,74.23C45.65,75.11 43.84,76.94 42.36,79.48C40.88,82.03 39.97,84.85 39.71,87.36C39.46,89.85 39.84,92.08 40.99,93.35C42.13,94.61 43.79,94.65 45.5,93.77C47.22,92.89 49.02,91.06 50.51,88.52C51.99,85.97 52.9,83.15 53.15,80.64Z"
android:fillColor="#3F3B3B"
android:fillType="evenOdd"/>
<path
android:pathData="M84,110.24C84,110.1 83.89,109.99 83.75,109.99H60.77C60.64,109.99 60.53,110.1 60.53,110.24V112.37C60.53,112.5 60.64,112.61 60.77,112.61H83.75C83.89,112.61 84,112.5 84,112.37V110.24Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="74.16"
android:startY="114.32"
android:endX="68.55"
android:endY="108.99"
android:type="linear">
<item android:offset="0" android:color="#BFD2D2D2"/>
<item android:offset="1" android:color="#BFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M60.3,110.24C60.3,109.97 60.51,109.76 60.77,109.76H83.75C84.02,109.76 84.23,109.97 84.23,110.24V112.37C84.23,112.63 84.02,112.85 83.75,112.85H60.77C60.51,112.85 60.3,112.63 60.3,112.37V110.24ZM60.77,110.22C60.76,110.22 60.76,110.23 60.76,110.24V112.37C60.76,112.38 60.76,112.39 60.77,112.39H83.75C83.76,112.39 83.77,112.38 83.77,112.37V110.24C83.77,110.23 83.76,110.22 83.75,110.22H60.77Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M86.12,87.87C86.12,87.44 85.78,87.1 85.35,87.1H59.26C58.83,87.1 58.49,87.44 58.49,87.87V109.44C58.49,109.87 58.83,110.21 59.26,110.21H85.35C85.78,110.21 86.12,109.87 86.12,109.44V87.87Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="88.53"
android:startY="107.21"
android:endX="82.32"
android:endY="96.86"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M58.13,87.87C58.13,87.25 58.64,86.74 59.26,86.74H85.35C85.97,86.74 86.48,87.25 86.48,87.87V109.44C86.48,110.06 85.97,110.57 85.35,110.57H59.26C58.64,110.57 58.13,110.06 58.13,109.44V87.87ZM59.26,87.45C59.03,87.45 58.84,87.64 58.84,87.87V109.44C58.84,109.67 59.03,109.86 59.26,109.86H85.35C85.58,109.86 85.77,109.67 85.77,109.44V87.87C85.77,87.64 85.58,87.45 85.35,87.45H59.26Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M83.13,90.18C83.13,90.02 82.99,89.88 82.83,89.88H61.57C61.4,89.88 61.27,90.02 61.27,90.18V106.67C61.27,106.83 61.4,106.97 61.57,106.97H82.83C82.99,106.97 83.13,106.83 83.13,106.67V90.18Z"
android:fillColor="#003D88"
android:fillType="evenOdd"/>
<path
android:pathData="M61.1,90.18C61.1,89.92 61.31,89.71 61.57,89.71H82.83C83.09,89.71 83.3,89.92 83.3,90.18V106.67C83.3,106.93 83.09,107.14 82.83,107.14H61.57C61.31,107.14 61.1,106.93 61.1,106.67V90.18ZM61.57,90.05C61.5,90.05 61.44,90.11 61.44,90.18V106.67C61.44,106.74 61.5,106.8 61.57,106.8H82.83C82.9,106.8 82.96,106.74 82.96,106.67V90.18C82.96,90.11 82.9,90.05 82.83,90.05H61.57Z"
android:fillColor="#000000"
android:fillAlpha="0.93"
android:fillType="evenOdd"/>
</group>
</vector>

@ -0,0 +1,235 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.7121053"
android:scaleY="0.7121053"
android:translateX="14.83421"
android:translateY="16.25842">
<group>
<clip-path
android:pathData="M15,15h78v78h-78z"/>
<path
android:pathData="M85.85,55.98C85.85,55.72 85.63,55.51 85.37,55.51H56.63C56.37,55.51 56.15,55.72 56.15,55.98V80.73C56.15,80.99 56.37,81.2 56.63,81.2H85.37C85.63,81.2 85.85,80.99 85.85,80.73V55.98Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M92.81,34.1C92.81,33.83 92.59,33.62 92.33,33.62H54.76C54.5,33.62 54.29,33.83 54.29,34.1V66.48C54.29,66.74 54.5,66.96 54.76,66.96H92.33C92.59,66.96 92.81,66.74 92.81,66.48V34.1Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M90.1,65.47C90.1,65.24 89.92,65.06 89.7,65.06H55.26C55.03,65.06 54.85,65.24 54.85,65.47V70.15C54.85,70.37 55.03,70.55 55.26,70.55H89.7C89.92,70.55 90.1,70.37 90.1,70.15V65.47Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M87.84,65.41C87.84,65.26 87.72,65.14 87.57,65.14H54.65C54.5,65.14 54.38,65.26 54.38,65.41V68.61C54.38,68.76 54.5,68.89 54.65,68.89H87.57C87.72,68.89 87.84,68.76 87.84,68.61V65.41Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="73.8"
android:startY="71.16"
android:endX="65.84"
android:endY="63.83"
android:type="linear">
<item android:offset="0" android:color="#BFD2D2D2"/>
<item android:offset="1" android:color="#BFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M54.13,65.41C54.13,65.12 54.36,64.89 54.65,64.89H87.57C87.86,64.89 88.09,65.12 88.09,65.41V68.61C88.09,68.9 87.86,69.14 87.57,69.14H54.65C54.36,69.14 54.13,68.9 54.13,68.61V65.41ZM54.65,65.39C54.64,65.39 54.63,65.4 54.63,65.41V68.61C54.63,68.62 54.64,68.63 54.65,68.63H87.57C87.58,68.63 87.59,68.62 87.59,68.61V65.41C87.59,65.4 87.58,65.39 87.57,65.39H54.65Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M89.15,35.77C89.15,35.22 88.71,34.78 88.16,34.78H54.86C54.31,34.78 53.87,35.22 53.87,35.77V62.47C53.87,63.02 54.31,63.47 54.86,63.47H88.16C88.71,63.47 89.15,63.02 89.15,62.47V35.77Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="89.84"
android:startY="63.22"
android:endX="71.46"
android:endY="46.71"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M83.76,80.15C83.76,79.92 83.58,79.74 83.36,79.74H56.99C56.77,79.74 56.59,79.92 56.59,80.15V83.57C56.59,83.79 56.77,83.97 56.99,83.97H83.36C83.58,83.97 83.76,83.79 83.76,83.57V80.15Z"
android:fillColor="#000000"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M90.86,33.37C90.86,32.9 90.48,32.51 90.01,32.51H52.32C51.85,32.51 51.47,32.9 51.47,33.37V64.61C51.47,65.08 51.85,65.46 52.32,65.46H90.01C90.48,65.46 90.86,65.08 90.86,64.61V33.37Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="94.29"
android:startY="61.18"
android:endX="85.44"
android:endY="46.43"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M50.97,33.37C50.97,32.62 51.58,32.01 52.32,32.01H90.01C90.76,32.01 91.37,32.62 91.37,33.37V64.61C91.37,65.36 90.76,65.97 90.01,65.97H52.32C51.58,65.97 50.97,65.36 50.97,64.61V33.37ZM52.32,33.02C52.13,33.02 51.98,33.17 51.98,33.37V64.61C51.98,64.8 52.13,64.96 52.32,64.96H90.01C90.2,64.96 90.36,64.8 90.36,64.61V33.37C90.36,33.17 90.2,33.02 90.01,33.02H52.32Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M86.59,36.59C86.59,36.41 86.45,36.26 86.26,36.26H55.77C55.59,36.26 55.44,36.41 55.44,36.59V60.29C55.44,60.47 55.59,60.62 55.77,60.62H86.26C86.45,60.62 86.59,60.47 86.59,60.29V36.59Z"
android:fillColor="#00B4ED"
android:fillType="evenOdd"/>
<path
android:pathData="M55.2,36.59C55.2,36.28 55.45,36.02 55.77,36.02H86.26C86.58,36.02 86.83,36.28 86.83,36.59V60.29C86.83,60.6 86.58,60.86 86.26,60.86H55.77C55.45,60.86 55.2,60.6 55.2,60.29V36.59ZM55.77,36.51C55.72,36.51 55.68,36.55 55.68,36.59V60.29C55.68,60.34 55.72,60.38 55.77,60.38H86.26C86.31,60.38 86.35,60.34 86.35,60.29V36.59C86.35,36.55 86.31,36.51 86.26,36.51H55.77Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M83.03,57.4C83.03,56.85 82.59,56.4 82.04,56.4H56.83C56.28,56.4 55.83,56.85 55.83,57.4V77.52C55.83,78.07 56.28,78.52 56.83,78.52H82.04C82.59,78.52 83.03,78.07 83.03,77.52V57.4Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="83.56"
android:startY="78.32"
android:endX="69.39"
android:endY="65.6"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M69.54,78.57C69.21,80.71 59.7,82.46 48.47,82.46C37.23,82.46 28.26,80.71 28.58,78.57C28.91,76.43 38.42,74.68 49.65,74.68C60.89,74.68 69.87,76.43 69.54,78.57Z"
android:fillColor="#444040"
android:fillAlpha="0.47"
android:fillType="evenOdd"/>
<path
android:pathData="M40.8,55.36C37.19,64.05 39.64,73.72 46.22,76.79C52.81,79.86 61.2,75.23 64.81,66.55C68.42,57.86 65.98,48.19 59.39,45.12C52.8,42.05 44.41,46.68 40.8,55.36Z"
android:fillColor="#4E4D4B"
android:fillType="evenOdd"/>
<path
android:pathData="M65.08,53.93C66.01,57.61 65.74,62 64.01,66.17C62.27,70.34 59.4,73.51 56.2,75.27C53.01,77.03 49.55,77.36 46.57,75.97C43.58,74.57 41.47,71.66 40.54,67.98C39.61,64.3 39.87,59.91 41.61,55.74C43.34,51.56 46.22,48.39 49.41,46.63C52.6,44.87 56.06,44.55 59.05,45.94C62.04,47.33 64.15,50.25 65.08,53.93ZM66.77,53.52C65.74,49.43 63.33,45.97 59.73,44.3C56.13,42.62 52.1,43.08 48.55,45.03C45,46.99 41.87,50.47 39.99,54.99C38.12,59.5 37.81,64.29 38.84,68.39C39.88,72.48 42.29,75.93 45.88,77.61C49.48,79.29 53.51,78.83 57.06,76.87C60.62,74.92 63.74,71.43 65.62,66.92C67.5,62.41 67.81,57.62 66.77,53.52Z"
android:fillColor="#000000"
android:fillAlpha="0.95"
android:fillType="evenOdd"/>
<path
android:pathData="M23.22,42.09C15.83,56.7 17.38,72.97 26.65,78.13C35.93,83.29 49.63,75.52 57.02,60.9C64.41,46.29 62.86,30.02 53.59,24.86C44.31,19.7 30.61,27.48 23.22,42.09Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="87.76"
android:startY="26.41"
android:endX="-0.75"
android:endY="10.89"
android:type="linear">
<item android:offset="0" android:color="#FFFFFFFF"/>
<item android:offset="1" android:color="#FF000000"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M60.31,39.44C60.9,45.7 59.51,53.17 55.91,60.29C52.31,67.4 47.2,72.81 41.92,75.8C36.63,78.8 31.36,79.3 27.23,77C23.1,74.7 20.53,69.84 19.93,63.56C19.34,57.3 20.73,49.83 24.33,42.71C27.93,35.59 33.04,30.19 38.32,27.2C43.61,24.2 48.88,23.7 53.01,26C57.14,28.3 59.71,33.16 60.31,39.44ZM62.8,39.24C62.15,32.44 59.3,26.59 54.16,23.73C49.02,20.87 42.8,21.68 37.08,24.93C31.33,28.19 25.9,33.98 22.11,41.47C18.32,48.97 16.79,56.94 17.44,63.76C18.09,70.56 20.94,76.41 26.08,79.27C31.22,82.13 37.44,81.32 43.16,78.07C48.91,74.81 54.34,69.02 58.13,61.52C61.92,54.03 63.45,46.06 62.8,39.24Z"
android:fillColor="#000000"
android:fillAlpha="0.95"
android:fillType="evenOdd"/>
<path
android:pathData="M23.8,42.01C17.54,54.82 18.55,69.08 26.03,73.6C33.5,78.12 44.8,71.31 51.05,58.5C57.3,45.69 56.29,31.43 48.82,26.91C41.34,22.39 30.05,29.21 23.8,42.01Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:centerX="8.22"
android:centerY="73.66"
android:gradientRadius="35.64"
android:type="radial">
<item android:offset="0" android:color="#9EFFFFFF"/>
<item android:offset="1" android:color="#FF5D6567"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M54.92,39.6C55.32,45.3 54.02,52.03 50.91,58.41C47.79,64.79 43.42,69.68 38.91,72.4C34.4,75.12 29.77,75.67 26.1,73.45C22.43,71.23 20.32,66.61 19.92,60.91C19.52,55.22 20.82,48.48 23.94,42.1C27.05,35.72 31.42,30.84 35.93,28.12C40.45,25.39 45.08,24.84 48.75,27.06C52.41,29.28 54.52,33.91 54.92,39.6ZM55.24,39.6C54.84,33.83 52.7,29.07 48.89,26.76C45.09,24.46 40.33,25.06 35.77,27.81C31.2,30.57 26.79,35.5 23.65,41.93C20.51,48.35 19.2,55.15 19.6,60.92C20.01,66.68 22.14,71.45 25.95,73.75C29.76,76.06 34.51,75.46 39.08,72.7C43.65,69.94 48.05,65.01 51.19,58.59C54.33,52.16 55.65,45.36 55.24,39.6Z"
android:fillColor="#000000"
android:fillAlpha="0.98"
android:fillType="evenOdd"/>
<path
android:pathData="M36.7,46.61C33.25,52.77 32.51,60.26 35.06,63.2C37.62,66.14 42.57,63.5 46.03,57.34C49.48,51.18 50.22,43.69 47.67,40.74C45.11,37.8 40.16,40.45 36.7,46.61Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M36.38,46.42C33.15,51.97 32.46,58.72 34.85,61.37C37.24,64.02 41.87,61.64 45.1,56.09C48.34,50.54 49.03,43.79 46.64,41.14C44.25,38.49 39.62,40.87 36.38,46.42Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="27.7"
android:startY="55.54"
android:endX="54.6"
android:endY="65.85"
android:type="linear">
<item android:offset="0" android:color="#FFD7D5D5"/>
<item android:offset="1" android:color="#66000000"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M47.84,47.49C47.56,50.16 46.59,53.21 44.99,55.96C43.38,58.71 41.44,60.68 39.6,61.62C37.76,62.57 36.07,62.48 34.93,61.22C33.8,59.96 33.37,57.7 33.65,55.02C33.92,52.35 34.89,49.3 36.5,46.55C38.1,43.8 40.05,41.83 41.89,40.89C43.73,39.94 45.42,40.03 46.55,41.29C47.69,42.55 48.11,44.8 47.84,47.49ZM48.12,47.57C48.41,44.82 47.98,42.38 46.73,40.99C45.47,39.6 43.65,39.55 41.77,40.52C39.88,41.49 37.9,43.5 36.27,46.29C34.64,49.09 33.64,52.19 33.36,54.94C33.08,57.69 33.5,60.13 34.76,61.52C36.02,62.91 37.84,62.96 39.72,61.99C41.61,61.02 43.59,59.01 45.22,56.22C46.85,53.42 47.84,50.32 48.12,47.57Z"
android:fillColor="#3F3B3B"
android:fillType="evenOdd"/>
<path
android:pathData="M82.02,80.08C82.02,79.93 81.9,79.8 81.74,79.8H56.5C56.35,79.8 56.23,79.93 56.23,80.08V82.42C56.23,82.57 56.35,82.69 56.5,82.69H81.74C81.9,82.69 82.02,82.57 82.02,82.42V80.08Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="71.21"
android:startY="84.56"
android:endX="65.04"
android:endY="78.7"
android:type="linear">
<item android:offset="0" android:color="#BFD2D2D2"/>
<item android:offset="1" android:color="#BFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M55.97,80.08C55.97,79.79 56.21,79.55 56.5,79.55H81.74C82.04,79.55 82.27,79.79 82.27,80.08V82.42C82.27,82.71 82.04,82.94 81.74,82.94H56.5C56.21,82.94 55.97,82.71 55.97,82.42V80.08ZM56.5,80.06C56.49,80.06 56.48,80.07 56.48,80.08V82.42C56.48,82.43 56.49,82.44 56.5,82.44H81.74C81.76,82.44 81.76,82.43 81.76,82.42V80.08C81.76,80.07 81.76,80.06 81.74,80.06H56.5Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M84.35,55.51C84.35,55.04 83.96,54.65 83.5,54.65H54.84C54.37,54.65 53.99,55.04 53.99,55.51V79.2C53.99,79.67 54.37,80.05 54.84,80.05H83.5C83.96,80.05 84.35,79.67 84.35,79.2V55.51Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="86.99"
android:startY="76.75"
android:endX="80.17"
android:endY="65.38"
android:type="linear">
<item android:offset="0" android:color="#FFD2D2D2"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M53.6,55.51C53.6,54.82 54.15,54.26 54.84,54.26H83.5C84.18,54.26 84.74,54.82 84.74,55.51V79.2C84.74,79.89 84.18,80.44 83.5,80.44H54.84C54.15,80.44 53.6,79.89 53.6,79.2V55.51ZM54.84,55.04C54.58,55.04 54.38,55.25 54.38,55.51V79.2C54.38,79.45 54.58,79.66 54.84,79.66H83.5C83.75,79.66 83.96,79.45 83.96,79.2V55.51C83.96,55.25 83.75,55.04 83.5,55.04H54.84Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
<path
android:pathData="M81.06,58.05C81.06,57.86 80.91,57.72 80.73,57.72H57.37C57.19,57.72 57.04,57.86 57.04,58.05V76.16C57.04,76.34 57.19,76.49 57.37,76.49H80.73C80.91,76.49 81.06,76.34 81.06,76.16V58.05Z"
android:fillColor="#003D88"
android:fillType="evenOdd"/>
<path
android:pathData="M56.85,58.05C56.85,57.76 57.09,57.53 57.37,57.53H80.73C81.01,57.53 81.24,57.76 81.24,58.05V76.16C81.24,76.44 81.01,76.67 80.73,76.67H57.37C57.09,76.67 56.85,76.44 56.85,76.16V58.05ZM57.37,57.9C57.29,57.9 57.23,57.97 57.23,58.05V76.16C57.23,76.24 57.29,76.3 57.37,76.3H80.73C80.81,76.3 80.87,76.24 80.87,76.16V58.05C80.87,57.97 80.81,57.9 80.73,57.9H57.37Z"
android:fillColor="#000000"
android:fillAlpha="0.93"
android:fillType="evenOdd"/>
</group>
</group>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,22 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp" >
<ImageView android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_marginRight="10dp" />
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/image"
style="Custom Notification Title" />
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/image"
android:layout_below="@id/title"
style="Custom Notification Text" />
</RelativeLayout>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_banner_background"/>
<foreground android:drawable="@drawable/ic_banner_foreground"/>
</adaptive-icon>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_banner_background">#FFFFFF</color>
</resources>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">MPD</string>
<string name="notification_title_mpd_running">Music Player Daemon is running</string>
<string name="notification_text_mpd_running">Touch for MPD options.</string>
<string name="toggle_button_run_on">MPD is running</string>
<string name="toggle_button_run_off">MPD is not running</string>
<string name="checkbox_run_on_boot">Run MPD automatically on boot</string>
<string name="checkbox_wakelock">Prevent suspend when MPD is running (Wakelock)</string>
<string name="checkbox_pause_on_headphones_disconnect">Pause MPD when headphones disconnect</string>
<string name="external_files_permission_request">MPD requires access to external files to play local music. Please grant the permission.</string>
<string name="title_open_app_info">Open app info</string>
<string name="mpd_load_failure_message">"Failed to load the native MPD library.
Report this problem to us, and include the following information:
SUPPORTED_ABIS=%1$s
PRODUCT=%2$s
FINGERPRINT=%3$s
error=%4$s"
</string>
<string name="stopped">Stopped</string>
<string name="running">Running</string>
<string name="stopMPD">Stop MPD</string>
<string name="startMPD">Start MPD</string>
</resources>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="red_500">#F44336</color>
<color name="red_900">#B71C1C</color>
<color name="green_300">#81C784</color>
<color name="green_700">#388E3C</color>
<color name="colorErrorOnLight">@color/red_900</color>
<color name="colorErrorOnDark">@color/red_500</color>
<color name="colorSuccessOnLight">@color/green_700</color>
<color name="colorSuccessOnDark">@color/green_300</color>
<attr name="appColorNegative" format="color|reference" />
<attr name="appColorPositive" format="color|reference" />
<style name="Theme.MPD" parent="android:Theme.Material.Light.NoActionBar">
<item name="appColorNegative">@color/colorErrorOnLight</item>
<item name="appColorPositive">@color/colorSuccessOnLight</item>
</style>
</resources>

@ -0,0 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.google.devtools.ksp") version "1.9.22-1.0.16" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.dagger.hilt.android) apply false
}

@ -0,0 +1,82 @@
#!/usr/bin/env -S python3 -u
import os, os.path
import shutil
import sys, subprocess
if len(sys.argv) < 4:
print("Usage: build.py SDK_PATH NDK_PATH ABI [configure_args...]", file=sys.stderr)
sys.exit(1)
sdk_path = sys.argv[1]
ndk_path = sys.argv[2]
android_abi = sys.argv[3]
configure_args = sys.argv[4:]
if not os.path.isfile(os.path.join(sdk_path, 'licenses', 'android-sdk-license')):
print("SDK not found in", sdk_path, file=sys.stderr)
sys.exit(1)
if not os.path.isdir(ndk_path):
print("NDK not found in", ndk_path, file=sys.stderr)
sys.exit(1)
# the path to the MPD sources
mpd_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]) or '.', '..'))
sys.path[0] = os.path.join(mpd_path, 'python')
# output directories
from build.dirs import lib_path, tarball_path, src_path
from build.toolchain import AndroidNdkToolchain
# a list of third-party libraries to be used by MPD on Android
from build.libs import *
thirdparty_libs = [
libmodplug,
wildmidi,
gme,
ffmpeg,
libnfs,
]
# build the third-party libraries
for x in thirdparty_libs:
toolchain = AndroidNdkToolchain(mpd_path, lib_path,
tarball_path, src_path,
ndk_path, android_abi,
use_cxx=x.use_cxx)
if not x.is_installed(toolchain):
x.build(toolchain)
# configure and build MPD
toolchain = AndroidNdkToolchain(mpd_path, lib_path,
tarball_path, src_path,
ndk_path, android_abi,
use_cxx=True)
configure_args += [
'-Dandroid_sdk=' + sdk_path,
'-Dandroid_ndk=' + ndk_path,
'-Dandroid_abi=' + android_abi,
'-Dandroid_strip=' + toolchain.strip,
'-Dopenssl:asm=disabled',
'-Dwrap_mode=forcefallback'
]
from build.meson import configure as run_meson
run_meson(toolchain, mpd_path, '.', configure_args)
ninja = shutil.which("ninja")
subprocess.check_call([ninja], env=toolchain.env)
subprocess.check_call([ninja, 'install'], env=toolchain.env)
print("""
-------------------------------------
## To build the android app:
# cd ../../android
# ./gradlew assemble{}Debug
## or, for a universal apk (includes both arm64-v8a and x86_64)
# ./gradlew assembleUniversalDebug
-------------------------------------
""".format(android_abi.capitalize()))

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="mpd_rules">
<!-- setting these two properties works around a bug in Android
SDK's build.xml, which deletes all .class files every time -->
<property name="build.last.is.packaging.debug" value="true" />
<property name="build.is.packaging.debug" value="true" />
<target name="compile-jni-classes"
depends="-set-debug-mode,-compile"/>
</project>

@ -0,0 +1,54 @@
#!/bin/sh
# This script need the following modification in ANDROID_NDK in order to attach
# to the good :main pid
#--- a/prebuilt/linux-x86_64/bin/ndk-gdb.py
#+++ b/prebuilt/linux-x86_64/bin/ndk-gdb.py
#@@ -669,7 +669,7 @@
# log("Sleeping for {} seconds.".format(args.delay))
# time.sleep(args.delay)
#
#- pids = gdbrunner.get_pids(device, pkg_name)
#+ pids = gdbrunner.get_pids(device, pkg_name + ":main")
# if len(pids) == 0:
# error("Failed to find running process '{}'".format(pkg_name))
# if len(pids) > 1:
SCRIPT_PATH=$(dirname $0)
BUILD_PATH="`pwd`"
TMP_PATH="$BUILD_PATH/gdb"
NDK_GDB_ARGS="--force"
ANDROID_NDK=$1
if [ ! -f $ANDROID_NDK/source.properties ];then
echo "usage: $0 ANDROID_NDK"
exit 1
fi
if [ ! -f $BUILD_PATH/libmpd.so ];then
echo "This script need to be executed from the android build directory"
exit 1
fi
rm -rf "$TMP_PATH"
mkdir -p "$TMP_PATH"
ANDROID_MANIFEST="$SCRIPT_PATH/AndroidManifest.xml"
ABI=`ls "$BUILD_PATH/android/apk/apk/lib" --sort=time | head -n 1`
if [ ! -f "$ANDROID_MANIFEST" -o "$ABI" = "" ]; then
echo "Invalid manifest/ABI, did you try building first ?"
exit 1
fi
mkdir -p "$TMP_PATH"/jni
touch "$TMP_PATH"/jni/Android.mk
echo "APP_ABI := $ABI" > "$TMP_PATH"/jni/Application.mk
DEST=obj/local/$ABI
mkdir -p "$TMP_PATH/$DEST"
cp "$BUILD_PATH/libmpd.so" "$TMP_PATH/$DEST"
cp "$ANDROID_MANIFEST" "$TMP_PATH"
(cd "$TMP_PATH" && bash $ANDROID_NDK/ndk-gdb $NDK_GDB_ARGS)

@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

@ -0,0 +1,41 @@
[versions]
androidGradlePlugin = "8.5.2"
accompanistPermissions = "0.33.2-alpha"
activityCompose = "1.10.0"
appcompat = "1.7.0"
composeBom = "2025.01.01"
composeSettingsStoragePreferences = "1.0.3"
composeSettingsUiM3 = "1.0.3"
daggerCompiler = "2.49"
hiltAndroid = "2.49"
hiltCompiler = "2.49"
lifecycleRuntimeKtx = "2.8.7"
media3Session = "1.5.1"
navigationCompose = "2.8.6"
kotlin = "1.9.22"
[libraries]
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanistPermissions" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleRuntimeKtx" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" }
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
androidx-material3 = { module = "androidx.compose.material3:material3" }
androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "media3Session" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
compose-settings-storage-preferences = { module = "com.github.alorma:compose-settings-storage-preferences", version.ref = "composeSettingsStoragePreferences" }
compose-settings-ui-m3 = { module = "com.github.alorma:compose-settings-ui-m3", version.ref = "composeSettingsUiM3" }
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "daggerCompiler" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hiltCompiler" }
[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
dagger-hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hiltAndroid" }

Binary file not shown.

@ -0,0 +1,6 @@
#Sun Dec 17 15:00:03 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

185
android/gradlew vendored

@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

@ -0,0 +1,21 @@
javac = find_program('javac')
bridge_header = custom_target(
'org_musicpd_Bridge.h',
output: 'org_musicpd_Bridge.h',
input: [
'../app/src/main/java/org/musicpd/Bridge.java',
],
command: [
javac,
'-source', '1.8', '-target', '1.8',
'-Xlint:-options',
'-cp', join_paths(android_sdk_platform_dir, 'android.jar'),
# not interested in *.class, we only want the JNI header
'-d', '@PRIVATE_DIR@',
'-h', '@OUTDIR@',
'@INPUT@',
],
)

@ -0,0 +1,17 @@
android_package = 'org.musicpd'
android_package_path = join_paths(android_package.split('.'))
android_ndk = get_option('android_ndk')
android_sdk = get_option('android_sdk')
android_abi = get_option('android_abi')
android_sdk_build_tools_version = '34.0.0'
android_sdk_platform = 'android-34'
android_build_tools_dir = join_paths(android_sdk, 'build-tools', android_sdk_build_tools_version)
android_sdk_platform_dir = join_paths(android_sdk, 'platforms', android_sdk_platform)
android_gradlew = join_paths(meson.current_source_dir(), 'gradlew')
subdir('include')

@ -0,0 +1,18 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "MPD"
include(":app")

@ -0,0 +1,3 @@
/*
* css to override sphinx theme
*/

@ -0,0 +1,66 @@
Client Developer's Manual
#########################
Introduction
************
MPD is a music player without a user interface. The user interface
will be provided by independent clients, which connect to MPD over
socket connections (TCP or local sockets).
This chapter describes how to develop a client.
Before you develop a new client, consider joining an existing client
project. There are many clients, but few are mature; we need fewer,
but better clients.
Client Libraries
****************
There are many libraries which help with connecting to MPD. If you
develop a MPD client, use a library instead of reinventing the wheel.
The MPD website has a list of libraries: https://www.musicpd.org/libs/
Connecting to MPD
*****************
Do not hard-code your client to connect to ``localhost:6600``.
Instead, use the defaults of the client library. For example, with
:program:`libmpdclient`, don't do::
c = mpd_connection_new("localhost", 6600, 30000);
Instead, do::
c = mpd_connection_new(NULL, 0, 0);
This way, the library can choose the best defaults, maybe derived from
environment variables, so all MPD clients use the same settings.
If you need to reimplement those defaults (or if you are developing a
client library), this is a good set of addresses to attempt to connect
to:
- if the environment variable :envvar:`MPD_HOST` is set:
``$MPD_HOST:$MPD_PORT`` (:envvar:`MPD_PORT` defaulting to 6600)
- if the environment variable :envvar:`XDG_RUNTIME_DIR` is set:
``$XDG_RUNTIME_DIR/mpd/socket``
- :file:`/run/mpd/socket`
- ``localhost:$MPD_PORT`` (:envvar:`MPD_PORT` defaulting to 6600)
Environment Variables
*********************
The following environment variables should be obeyed by all clients
(preferably by the client library):
- :envvar:`MPD_HOST`: the host (or local socket path) to connect to;
on Linux, this may start with a ``@`` to connect to an abstract
socket. To use a password with MPD, set :envvar:`MPD_HOST` to
``password@host`` (then abstract socket requires double ``@``:
``password@@socket``).
- :envvar:`MPD_PORT`: the port number; defaults to 6600.
- :envvar:`MPD_TIMEOUT`: timeout for connecting to MPD and for waiting
for MPD's response in seconds. A good default is 30 seconds.

@ -0,0 +1,239 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.intersphinx']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'Music Player Daemon'
copyright = '2003-2025 The Music Player Daemon Project'
author = 'Max Kellermann'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
with open('../meson.build') as f:
import re
version = re.match(r"project\([^\)]*\bversion:\s*'([^']+)'",
f.read(4096)).group(1)
# The full version, including alpha/beta/rc tags.
release = version + '~git'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = "en"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
# today = ''
#
# Else, today_fmt is used as the format for a strftime call.
#
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
try:
__import__(html_theme)
except ModuleNotFoundError:
import sys
print(f"Warning: Sphinx theme {html_theme!r} not available, falling back to the default theme", file=sys.stderr)
del html_theme
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_theme_options = {
'navigation_depth': -1,
'sticky_navigation': False,
'includehidden': True,
'prev_next_buttons_location': 'both',
'github_url': "https://github.com/MusicPlayerDaemon/"
}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = ''
# A shorter title for the navigation bar. Default is the same as html_title.
#
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = [
'css/custom.css',
]
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
# html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
# html_last_updated_fmt = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}
# If false, no module index is generated.
#
# html_domain_indices = True
# If false, no index is generated.
#
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'
man_pages = [
('mpd.1', 'mpd', 'MPD documentation', [author], 1),
('mpd.conf.5', 'mpd.conf', 'mpd.conf documentation', [author], 5)
]

@ -0,0 +1,149 @@
Developer's Manual
##################
Introduction
************
This is a guide for those who wish to hack on the MPD source code. MPD is an open project, and we are always happy about contributions. So far, more than 150 people have contributed patches. This document is work in progress. Most of it may be incomplete yet. Please help!
Code Style
**********
* indent with tabs (width 8)
* don't write CPP when you can write C++: use inline functions and constexpr instead of macros
* comment your code, document your APIs
* the code should be C++23 compliant, and must compile with :program:`GCC` 12 and :program:`clang` 14
* all code must be exception-safe
* classes and functions names use CamelCase; variables are lower-case with words separated by underscore
Some example code:
.. code-block:: c
int
Foo(const char *abc, int xyz)
{
if (abc == nullptr) {
LogWarning("Foo happened!");
return -1;
}
return xyz;
}
Error handling
==============
If an error occurs, throw a C++ exception, preferably derived from
:code:`std::runtime_error`. The function's API documentation should
mention that. If a function cannot throw exceptions, add
:code:`noexcept` to its prototype.
Some parts of MPD use callbacks to report completion; the handler
classes usually have an "error" callback which receives a
:code:`std::exception_ptr`
(e.g. :code:`BufferedSocket::OnSocketError()`). Wrapping errors in
:code:`std::exception_ptr` allows propagating details about the error
across thread boundaries to the entity which is interested in handling
it (e.g. giving the MPD client details about an I/O error caught by
the decoder thread).
Out-of-memory errors (i.e. :code:`std::bad_alloc`) do not need to be
handled. Some operating systems such as Linux do not report
out-of-memory to userspace, and instead kill a process to recover.
Even if we know we are out of memory, there is little we can do except
for aborting the process quickly. Any other attempts to give back
memory may cause page faults on the way which make the situation
worse.
Error conditions which are caused by a bug do not need to be handled
at runtime; instead, use :code:`assert()` to detect them in debug
builds.
git Branches
************
There are two active branches in the git repository:
- the "unstable" branch called ``master`` where new features are
merged. This will become the next major release eventually.
- the "stable" branch (currently called ``v0.24.x``) where only bug
fixes are merged.
Once :program:`MPD` 0.25 is released, a new branch called ``v0.25.x``
will be created for 0.25 bug-fix releases; after that, ``v0.24.x``
will eventually cease to be maintained.
After bug fixes have been added to the "stable" branch, it will be
merged into ``master``. This ensures that all known bugs are fixed in
all active branches.
Hacking The Source
******************
MPD sources are managed in a git repository on
`Github <https://github.com/MusicPlayerDaemon/>`_.
Always write your code against the latest git:
.. code-block:: none
git clone https://github.com/MusicPlayerDaemon/MPD.git
If you already have a clone, update it:
.. code-block:: none
git pull --rebase https://github.com/MusicPlayerDaemon/MPD.git master
You can do without :code:`--rebase`, but we recommend that you rebase
your repository on the "master" repository all the time.
Configure with the option :code:`--werror`. Enable as many plugins as
possible, to be sure that you don't break any disabled code.
Don't mix several changes in one single patch. Create a separate patch for every change. Tools like :program:`stgit` help you with that. This way, we can review your patches more easily, and we can pick the patches we like most first.
Basic stgit usage
=================
stgit allows you to create a set of patches and refine all of them: you can go back to any patch at any time, and re-edit it (both the code and the commit message). You can reorder patches and insert new patches at any position. It encourages creating separate patches for tiny changes.
stgit needs to be initialized on a git repository:
.. code-block:: sh
stg init
Before you edit the code, create a patch:
.. code-block:: sh
stg new my-patch-name
stgit now asks you for the commit message.
Now edit the code. Once you're finished, you have to "refresh" the patch, i.e. your edits are incorporated into the patch you have created:
.. code-block:: sh
stg refresh
You may now continue editing the same patch, and refresh it as often as you like. Create more patches, edit and refresh them.
To view the list of patches, type stg series. To go back to a specific patch, type stg goto my-patch-name; now you can re-edit it (don't forget stg refresh when you're finished with that patch).
When the whole patch series is finished, convert stgit patches to git commits:
.. code-block:: sh
stg commit
Submitting Patches
******************
Submit pull requests on GitHub:
https://github.com/MusicPlayerDaemon/MPD/pulls

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
Music Player Daemon
===================
.. toctree::
:maxdepth: 2
:caption: Contents:
user
plugins
developer
client
protocol
.. toctree::
:maxdepth: 1
:caption: man pages:
mpd.1
mpd.conf.5
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

@ -0,0 +1,58 @@
if not get_option('html_manual') and not get_option('manpages')
subdir_done()
endif
sphinx = find_program('sphinx-build', required: get_option('documentation'))
if not sphinx.found()
subdir_done()
endif
if get_option('html_manual')
sphinx_output = custom_target(
'HTML documentation',
output: 'html',
input: [
'index.rst', 'user.rst', 'developer.rst',
'plugins.rst',
'client.rst',
'protocol.rst',
'conf.py',
'_static/css/custom.css'
],
command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
build_by_default: true,
install: true,
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
)
endif
if get_option('manpages')
custom_target(
'Manpage documentation',
output: ['mpd.1', 'mpd.conf.5'],
input: ['mpd.1.rst', 'conf.py'],
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTDIR@'],
build_by_default: true,
install: true,
install_dir: [join_paths(get_option('mandir'), 'man1'), join_paths(get_option('mandir'), 'man5')],
)
endif
if get_option('doxygen')
doxygen = find_program('doxygen', required: true)
conf_data = configuration_data()
conf_data.set('VERSION', meson.project_version())
conf_data.set('abs_top_srcdir', meson.source_root())
doxyfile = configure_file(
input: 'doxygen.conf.in',
output: 'Doxyfile',
configuration: conf_data
)
custom_target('Doxygen',
command: [doxygen, doxyfile],
output: ['api'],
build_by_default: true
)
endif

@ -0,0 +1,73 @@
===
mpd
===
SYNOPSIS
--------
``mpd`` [options] [CONF_FILE]
DESCRIPTION
------------
MPD is a daemon for playing music. Music is played through the configured audio output(s) (which are generally local, but can be remote). The daemon stores info about all available music, and this info can be easily searched and retrieved. Player control, info retrieval, and playlist management can all be managed remotely.
MPD searches for a config file in ``$XDG_CONFIG_HOME/mpd/mpd.conf``
then ``~/.mpdconf`` then ``~/.mpd/mpd.conf`` then ``/etc/mpd.conf`` or uses ``CONF_FILE``.
Read more about MPD at http://www.musicpd.org/
OPTIONS
-------
.. program:: mpd
.. option:: --help
Output a brief help message.
.. option:: --kill
Kill the currently running mpd session. The pid_file parameter must be specified in the config file for this to work.
.. option:: --no-config
Don't read from the configuration file.
.. option:: --no-daemon
Don't detach from console.
.. option:: --stderr
Print messages to stderr.
.. option:: --systemd
Used on Linux only so MPD can reliably detect whether it was started as a systemd service. Users shouldn't use this switch on the command line.
.. option:: --verbose
Verbose logging.
.. option:: --version
Print version information.
FILES
-----
:file:`$XDG_CONFIG_HOME/mpd/mpd.conf`
User configuration file (usually :file:`~/.config/mpd/mpd.conf`).
:file:`/etc/mpd.conf`
Global configuration file.
SEE ALSO
--------
:manpage:`mpd.conf(5)`, :manpage:`mpc(1)`
BUGS
----
If you find a bug, please report it at https://github.com/MusicPlayerDaemon/MPD/issues/

@ -0,0 +1,204 @@
========
mpd.conf
========
DESCRIPTION
------------
:file:`mpd.conf` is the configuration file for :manpage:`mpd(1)`. If
not specified on the command line, MPD first searches for it at
:file:`$XDG_CONFIG_HOME/mpd/mpd.conf` then at :file:`~/.mpdconf` then
at :file:`~/.mpd/mpd.conf` and then in :file:`/etc/mpd.conf`.
Each line in the configuration file contains a setting name and its value, e.g.:
:code:`connection_timeout "5"`
Lines starting with ``#`` are treated as comments and ignored.
For settings that specify a file system path, the tilde ('~') is expanded to $HOME.
In addition, the following path expansions are supported:
- `$HOME`
- `$XDG_CONFIG_HOME`
- `$XDG_MUSIC_DIR`
- `$XDG_CACHE_HOME`
- `$XDG_RUNTIME_DIR`
:code:`music_directory "~/Music"`
:code:`db_file "$XDG_CONFIG_HOME/mpd/database"`
Some of the settings are grouped in blocks with curly braces, e.g. per-plugin settings:
.. code-block:: none
audio_output {
type "alsa"
name "My ALSA output"
device "iec958:CARD=Intel,DEV=0"
mixer_control "PCM"
}
The :code:`include` directive can be used to include settings from
another file; the given file name is relative to the current file:
:code:`include "other.conf"`
You can use include_optional instead if you want the included file to be
optional; the directive will be ignored if the file does not exist:
:code:`include_optional "may_not_exist.conf"`
See :file:`docs/mpdconf.example` in the source tarball for an example
configuration file.
This manual is not complete, it lists only the most important options.
Please read the MPD user manual for a complete configuration guide:
http://www.musicpd.org/doc/user/
OPTIONAL PARAMETERS
-------------------
db_file <file>
This specifies where the db file will be stored.
log_file <file>
This specifies where the log file should be located. The special value "syslog" makes MPD use the local syslog daemon.
sticker_file <file>
The location of the sticker database. This is a database which manages
dynamic information attached to songs.
pid_file <file>
This specifies the file to save mpd's process ID in.
music_directory <directory>
This specifies the directory where music is located. If you do not configure
this, you can only play streams.
playlist_directory <directory>
This specifies the directory where saved playlists are stored. If
you do not configure this, you cannot save playlists.
state_file <file>
This specifies if a state file is used and where it is located. The state of
mpd will be saved to this file when mpd is terminated by a TERM signal or by
the :program:`kill` command. When mpd is restarted, it will read the state file and
restore the state of mpd (including the playlist).
restore_paused <yes or no>
Put MPD into pause mode instead of starting playback after startup.
user <username>
This specifies the user that MPD will run as, if set. MPD should never run
as root, and you may use this option to make MPD change its user id after
initialization. Do not use this option if you start MPD as an unprivileged
user.
port <port>
This specifies the port that mpd listens on. The default is 6600.
log_level <level>
Suppress all messages below the given threshold. The following
log levels are available:
- :samp:`error`: errors
- :samp:`warning`: warnings
- :samp:`notice`: interesting informational messages
- :samp:`info`: unimportant informational messages
- :samp:`verbose`: debug messages (for developers and for
troubleshooting)
The default is :samp:`notice`.
follow_outside_symlinks <yes or no>
Control if MPD will follow symbolic links pointing outside the music dir. You
must recreate the database after changing this option. The default is "yes".
follow_inside_symlinks <yes or no>
Control if MPD will follow symbolic links pointing inside the music dir,
potentially adding duplicates to the database. You must recreate the
database after changing this option. The default is "yes".
zeroconf_enabled <yes or no>
If yes, and MPD has been compiled with support for Avahi or Bonjour, service
information will be published with Zeroconf. The default is yes.
zeroconf_name <name>
If Zeroconf is enabled, this is the service name to publish. This name should
be unique to your local network, but name collisions will be properly dealt
with. The default is "Music Player @ %h", where %h will be replaced with the
hostname of the machine running MPD.
audio_output
See DESCRIPTION and the various ``AUDIO OUTPUT PARAMETERS`` sections for the
format of this parameter. Multiple audio_output sections may be specified. If
no audio_output section is specified, then MPD will scan for a usable audio
output.
filesystem_charset <charset>
This specifies the character set used for the filesystem. A list of supported
character sets can be obtained by running "iconv -l". The default is
determined from the locale when the db was originally created.
save_absolute_paths_in_playlists <yes or no>
This specifies whether relative or absolute paths for song filenames are used
when saving playlists. The default is "no".
auto_update <yes or no>
This specifies the whether to support automatic update of music database
when files are changed in music_directory. The default is to disable
autoupdate of database.
auto_update_depth <N>
Limit the depth of the directories being watched, 0 means only watch the
music directory itself. There is no limit by default.
REQUIRED AUDIO OUTPUT PARAMETERS
--------------------------------
type <type>
This specifies the audio output type. See the list of supported outputs in
``mpd --version`` for possible values.
name <name>
This specifies a unique name for the audio output.
OPTIONAL AUDIO OUTPUT PARAMETERS
--------------------------------
format <sample_rate:bits:channels>
This specifies the sample rate, bits per sample, and number of channels of
audio that is sent to the audio output device. See documentation for the
``audio_output_format`` parameter for more details. The default is to use
whatever audio format is passed to the audio output. Any of the three
attributes may be an asterisk to specify that this attribute should not be
enforced
replay_gain_handler <software, mixer or none>
Specifies how replay gain is applied. The default is "software", which uses
an internal software volume control. "mixer" uses the configured (hardware)
mixer control. "none" disables replay gain on this audio output.
mixer_type <hardware, software or none>
Specifies which mixer should be used for this audio output: the hardware
mixer (available for ALSA, OSS and PulseAudio), the software mixer or no
mixer ("none"). By default, the hardware mixer is used for devices which
support it, and none for the others.
FILES
-----
:file:`$XDG_CONFIG_HOME/mpd/mpd.conf`
User configuration file (usually :file:`~/.config/mpd/mpd.conf`).
:file:`/etc/mpd.conf`
Global configuration file.
SEE ALSO
--------
:manpage:`mpd(1)`, :manpage:`mpc(1)`

@ -0,0 +1,402 @@
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
#music_directory "$XDG_MUSIC_DIR"
#music_directory "~/music"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
#playlist_directory "$XDG_CONFIG_HOME/mpd/playlists"
#playlist_directory "~/.mpd/playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
#db_file "$XDG_CACHE_HOME/mpd/database"
#db_file "~/.mpd/database"
# These settings are the locations for the daemon log files for the daemon.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog.
#
# If you use systemd, do not configure a log_file. With systemd, MPD
# defaults to the systemd journal, which is fine.
#
#log_file "$XDG_CACHE_HOME/mpd/log"
#log_file "~/.mpd/log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
# If you use systemd, do not configure a pid_file.
#
#pid_file "$XDG_RUNTIME_DIR/mpd/mpd.pid"
#pid_file "~/.mpd/pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
#
#state_file "$XDG_RUNTIME_DIR/mpd/state"
#state_file "~/.mpd/state"
#
# The location of the sticker database. This is a database which
# manages dynamic information attached to songs.
#
#sticker_file "$XDG_CACHE_HOME/sticker.sql"
#sticker_file "~/.mpd/sticker.sql"
#
###############################################################################
# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
#user "nobody"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group "nogroup"
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other than the default, any.
# This setting can deny access to control of the daemon. Not effective if
# systemd socket activation is in use.
#
# For network
#bind_to_address "any"
#
# And for Unix Socket
#bind_to_address "$XDG_RUNTIME_DIR/mpd/socket"
#bind_to_address "~/.mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port "6600"
#
# Suppress all messages below the given threshold. Use "verbose" for
# troubleshooting. Available setting arguments are "notice", "info", "verbose",
# "warning" and "error".
#
#log_level "notice"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
#save_absolute_paths_in_playlists "no"
#
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. The complete list of possible values can be
# found in the user manual.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# This example just enables the "comment" tag without disabling all
# the other supported tags:
#metadata_to_use "+comment"
#
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
#
#auto_update "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself. There is no limit by default.
#
#auto_update_depth "3"
#
###############################################################################
# Symbolic link behavior ######################################################
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#
#follow_outside_symlinks "yes"
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#
#follow_inside_symlinks "yes"
#
###############################################################################
# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
#zeroconf_enabled "yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network. %h will be replaced with the hostname.
#
#zeroconf_name "Music Player @ %h"
#
###############################################################################
# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# setting can be specified multiple times for different password profiles.
#
#password "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in.
#
#default_permissions "read,add,control,admin"
#
###############################################################################
# Database #######################################################################
#
# An example of a database section instead of the old 'db_file' setting.
# It enables mounting other storages into the music directory.
#
#database {
# plugin "simple"
# path "~/.local/share/mpd/db"
# cache_directory "~/.local/share/mpd/cache"
#}
#
# An example of database config for a satellite setup
#
#music_directory "nfs://fileserver.local/srv/mp3"
#database {
# plugin "proxy"
# host "other.mpd.host"
# port "6600"
#}
# Input #######################################################################
#
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
}
#
###############################################################################
# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#
# An example of an ALSA output:
#
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## mixer_type "hardware" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
#}
#
# An example of an OSS output:
#
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## mixer_type "hardware" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
# type "shout"
# encoder "vorbis" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## url "http://example.com" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
## mixer_type "software" # optional
#}
#
# An example of a recorder output:
#
#audio_output {
# type "recorder"
# name "My recorder"
# encoder "vorbis" # optional, vorbis or lame
# path "/var/lib/mpd/recorder/mpd.ogg"
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# max_clients "0" # optional 0=no limit
#}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#
#audio_output {
# type "pulse"
# name "My Pulse Output"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
## media_role "media_role" #optional
#}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
# type "winmm"
# name "My WinMM output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
# or
## device "0" # optional
## mixer_type "hardware" # optional
#}
#
# An example of a wasapi output (Windows multimedia API).
#
#audio_output {
# type "wasapi"
# name "My WASAPI output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
# or
## device "0" # optional
## mixer_type "hardware" # optional
## Exclusive mode blocks all other audio source, and get best audio quality without resampling.
## exclusive "no" # optional
## Enumerate all devices in log.
## enumerate "no" # optional
#}
#
# An example of an openal output.
#
#audio_output {
# type "openal"
# name "My OpenAL output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
# An example of an sndio output.
#
#audio_output {
# type "sndio"
# name "sndio output"
# mixer_type "hardware"
#}
#
# An example of an OS X output:
#
#audio_output {
# type "osx"
# name "My OS X Device"
## device "Built-in Output" # optional
## channel_map "-1,-1,0,1" # optional
#}
#
## Example "pipe" output:
#
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
#}
#
## An example of a null output (for no audio output):
#
#audio_output {
# type "null"
# name "My Null Output"
# mixer_type "none" # optional
#}
#
###############################################################################
# Normalization automatic volume adjustments ##################################
#
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for
# more details about ReplayGain.
# This setting is off by default.
#
#replaygain "album"
#
###############################################################################
# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#
#filesystem_charset "UTF-8"
#
###############################################################################

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
sphinx-rtd-theme==2.0.0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,744 @@
project(
'mpd',
['c', 'cpp'],
version: '0.25',
meson_version: '>= 1.2',
default_options: [
'c_std=c11',
'build.c_std=c11',
'cpp_std=c++23',
'build.cpp_std=c++23',
'warning_level=3',
'fmt:cpp_std=c++23',
# If we build those libraries as Meson subproject, they shall be
# linked statically into the MPD executable.
'default_library=static',
'curl:default_library=static',
'expat:default_library=static',
'flac:default_library=static',
'fmt:default_library=static',
'gtest:default_library=static',
'id3tag:default_library=static',
'lame:default_library=static',
'libmicrohttpd:default_library=static',
'libmpdclient:default_library=static',
'libnpupnp:default_library=static',
'libsndfile:default_library=static',
'liburing:default_library=static',
'ogg:default_library=static',
'openssl:default_library=static',
'opus:default_library=static',
'sqlite3:default_library=static',
'vorbis:default_library=static',
# Not interested in compiler warnings from subprojects.
'curl:werror=false',
'curl:warning_level=0',
'expat:werror=false',
'expat:warning_level=0',
'flac:werror=false',
'flac:warning_level=0',
'fmt:warning_level=0',
'gtest:warning_level=0',
'id3tag:werror=false',
'id3tag:warning_level=0',
'lame:werror=false',
'lame:warning_level=0',
'libmicrohttpd:warning_level=0',
'libnpupnp:warning_level=0',
'libsndfile:warning_level=0',
'liburing:warning_level=0',
'sqlite3:warning_level=0',
'ogg:werror=false',
'ogg:warning_level=0',
'openssl:werror=false',
'openssl:warning_level=0',
'opus:werror=false',
'opus:warning_level=0',
'vorbis:warning_level=0',
# Disable subprojects features we don't need
'curl:tool=disabled',
'curl:tests=disabled',
'curl:unittests=disabled',
'curl:brotli=disabled',
'curl:cookies=disabled',
'curl:progress-meter=disabled',
'curl:zstd=disabled',
'curl:kerberos-auth=disabled',
'curl:negotiate-auth=disabled',
'curl:gss-api=disabled',
'curl:ntlm=disabled',
'curl:ssh=disabled',
'curl:dict=disabled',
'curl:file=disabled',
'curl:ftp=disabled',
'curl:gopher=disabled',
'curl:imap=disabled',
'curl:ldap=disabled',
'curl:ldaps=disabled',
'curl:mqtt=disabled',
'curl:pop3=disabled',
'curl:rtmp=disabled',
'curl:rtsp=disabled',
'curl:smb=disabled',
'curl:smtp=disabled',
'curl:telnet=disabled',
'curl:tftp=disabled',
'lame:decoder=false',
'lame:tools=disabled',
'libmpdclient:documentation=false',
'libmpdclient:test=false',
'libsndfile:examples=false',
'libsndfile:external_libs=disabled',
'libsndfile:mpeg=disabled',
'libsndfile:programs=false',
'libsndfile:sndio=disabled',
'openssl:build_cli=false',
'openssl:asm=disabled',
'opus:docs=disabled',
'opus:extra-programs=disabled',
'opus:tests=disabled',
],
license: 'GPLv2+',
)
version_cxx = vcs_tag(input: 'src/GitVersion.cxx', output: 'GitVersion.cxx')
compiler = meson.get_compiler('cpp')
c_compiler = meson.get_compiler('c')
if compiler.get_id() == 'gcc' and compiler.version().version_compare('<12')
warning('Your GCC version is too old. You need at least version 12.')
elif compiler.get_id() == 'clang' and compiler.version().version_compare('<14')
warning('Your clang version is too old. You need at least version 14.')
endif
version_conf = configuration_data()
version_conf.set_quoted('PACKAGE', meson.project_name())
version_conf.set_quoted('PACKAGE_NAME', meson.project_name())
version_conf.set_quoted('VERSION', meson.project_version())
version_conf.set_quoted('PROTOCOL_VERSION', '0.25.0')
configure_file(output: 'Version.h', configuration: version_conf)
conf = configuration_data()
conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
common_global_cppflags = [
'-D_GNU_SOURCE',
]
common_cppflags = [
]
test_global_common_flags = [
'-fvisibility=hidden',
]
test_common_flags = [
'-ffast-math',
'-ftree-vectorize',
'-Wcast-qual',
'-Wdouble-promotion',
'-Wmissing-declarations',
'-Wshadow',
'-Wunused',
'-Wvla',
'-Wwrite-strings',
# clang specific warning options:
'-Wunreachable-code-aggressive',
'-Wused-but-marked-unused',
# suppress bogus GCC12 warnings in libfmt headers
'-Wno-stringop-overflow',
# libfmt causes this warning due to -ffast-math
'-Wno-nan-infinity-disabled',
]
test_global_cxxflags = test_global_common_flags + [
]
test_global_cflags = test_global_common_flags + [
]
test_cxxflags = test_common_flags + [
'-fno-threadsafe-statics',
'-fmerge-all-constants',
'-Wcomma-subscript',
'-Wextra-semi',
'-Wmismatched-tags',
'-Woverloaded-virtual',
'-Wsign-promo',
'-Wsuggest-override',
'-Wvolatile',
'-Wvirtual-inheritance',
'-Wno-missing-field-initializers',
# a vtable without a dtor is just fine
'-Wno-non-virtual-dtor',
# clang specific warning options:
'-Wcomma',
'-Wheader-hygiene',
'-Winconsistent-missing-destructor-override',
]
test_cflags = test_common_flags + [
'-Wmissing-prototypes',
'-Wstrict-prototypes',
]
test_ldflags = [
# make relocations read-only (hardening)
'-Wl,-z,relro',
# no lazy binding, please - not worth it for a daemon
'-Wl,-z,now',
]
if get_option('buildtype') != 'debug'
test_global_cxxflags += [
'-ffunction-sections',
'-fdata-sections',
]
test_global_cflags += [
'-ffunction-sections',
'-fdata-sections',
]
test_ldflags += [
'-Wl,--gc-sections',
]
endif
if get_option('fuzzer')
fuzzer_flags = []
if get_option('libfuzzer')
fuzzer_flags += ['-fsanitize=fuzzer']
endif
if get_option('b_sanitize') == 'none'
fuzzer_flags += ['-fsanitize=address,undefined']
endif
add_global_arguments(fuzzer_flags, language: 'cpp')
add_global_arguments(fuzzer_flags, language: 'c')
add_global_link_arguments(fuzzer_flags, language: 'cpp')
endif
add_global_arguments(compiler.get_supported_arguments(test_global_cxxflags), language: 'cpp')
add_global_arguments(c_compiler.get_supported_arguments(test_global_cflags), language: 'c')
add_project_arguments(compiler.get_supported_arguments(test_cxxflags), language: 'cpp')
add_project_arguments(c_compiler.get_supported_arguments(test_cflags), language: 'c')
add_project_link_arguments(compiler.get_supported_link_arguments(test_ldflags), language: 'cpp')
is_linux = host_machine.system() == 'linux'
is_android = get_option('android_ndk') != ''
is_darwin = host_machine.system() == 'darwin'
is_windows = host_machine.system() == 'windows'
if is_android
common_cppflags += '-DANDROID'
endif
if is_windows
common_cppflags += [
# enable Windows Vista APIs
'-DWINVER=0x0600', '-D_WIN32_WINNT=0x0600',
# enable Unicode support (TCHAR=wchar_t) in the Windows API (macro
# "UNICODE) and the C library (macro "_UNICODE")
'-DUNICODE', '-D_UNICODE',
# enable strict type checking in the Windows API headers
'-DSTRICT',
# reduce header bloat by disabling obscure and obsolete Windows
# APIs
'-DWIN32_LEAN_AND_MEAN',
# disable more Windows APIs which are not used by MPD
'-DNOGDI', '-DNOBITMAP', '-DNOCOMM',
'-DNOUSER',
# reduce COM header bloat
'-DCOM_NO_WINDOWS_H',
# disable Internet Explorer specific APIs
'-D_WIN32_IE=0',
]
subdir('win32')
endif
if is_android
# With ndk27 libcpp doesn't seem to have a rune table defined for the
# localization module, tell it to use the one it ships with
common_cppflags += ['-D_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE']
subdir('android')
endif
add_global_arguments(common_global_cppflags, language: 'c')
add_global_arguments(common_global_cppflags, language: 'cpp')
add_project_arguments(common_cppflags, language: 'c')
add_project_arguments(common_cppflags, language: 'cpp')
enable_daemon = not is_windows and not is_android and get_option('daemon')
conf.set('ENABLE_DAEMON', enable_daemon)
conf.set('HAVE_GETPWNAM_R', compiler.has_function('getpwnam_r'))
conf.set('HAVE_INITGROUPS', compiler.has_function('initgroups'))
conf.set('HAVE_FNMATCH', compiler.has_function('fnmatch'))
conf.set('HAVE_STRNDUP', compiler.has_function('strndup', prefix: '#define _GNU_SOURCE\n#include <string.h>'))
conf.set('HAVE_STRCASESTR', compiler.has_function('strcasestr'))
conf.set('HAVE_PRCTL', is_linux)
if not get_option('syslog').disabled()
if compiler.has_function('syslog')
conf.set('HAVE_SYSLOG', true)
elif get_option('syslog').enabled()
error('syslog() not found')
endif
endif
enable_database = get_option('database')
enable_inotify = get_option('inotify') and is_linux and enable_database
conf.set('ENABLE_INOTIFY', enable_inotify)
enable_sacdiso = get_option('sacdiso')
conf.set('ENABLE_SACDISO', enable_sacdiso)
enable_dvdaiso = get_option('dvdaiso')
conf.set('ENABLE_DVDAISO', enable_dvdaiso)
inc = include_directories(
'src',
# for the generated config.h
'.',
)
if enable_sacdiso or enable_dvdaiso
inc = include_directories(
'src',
'.',
'src/lib/sacdiso',
'src/lib/sacdiso/libdstdec',
'src/lib/sacdiso/libdstdec/binding',
'src/lib/sacdiso/libdstdec/decoder',
'src/lib/dvdaiso',
'src/lib/dvdaiso/udf',
)
endif
subdir('src/lib/fmt')
log = static_library(
'log',
'src/Log.cxx',
'src/LogBackend.cxx',
include_directories: inc,
dependencies: fmt_dep,
)
log_dep = declare_dependency(
link_with: log,
dependencies: fmt_dep,
)
sources = [
version_cxx,
'src/Main.cxx',
'src/protocol/ArgParser.cxx',
'src/protocol/IdleFlags.cxx',
'src/command/CommandError.cxx',
'src/command/PositionArg.cxx',
'src/command/AllCommands.cxx',
'src/command/QueueCommands.cxx',
'src/command/TagCommands.cxx',
'src/command/PlayerCommands.cxx',
'src/command/PlaylistCommands.cxx',
'src/command/FileCommands.cxx',
'src/command/OutputCommands.cxx',
'src/command/MessageCommands.cxx',
'src/command/ClientCommands.cxx',
'src/command/PartitionCommands.cxx',
'src/command/OtherCommands.cxx',
'src/command/CommandListBuilder.cxx',
'src/config/PartitionConfig.cxx',
'src/config/PlayerConfig.cxx',
'src/config/ReplayGainConfig.cxx',
'src/Idle.cxx',
'src/decoder/Thread.cxx',
'src/decoder/Control.cxx',
'src/decoder/Bridge.cxx',
'src/decoder/DecoderPrint.cxx',
'src/client/Listener.cxx',
'src/client/Client.cxx',
'src/client/Config.cxx',
'src/client/Domain.cxx',
'src/client/Event.cxx',
'src/client/Expire.cxx',
'src/client/Idle.cxx',
'src/client/List.cxx',
'src/client/New.cxx',
'src/client/Process.cxx',
'src/client/Read.cxx',
'src/client/Write.cxx',
'src/client/Message.cxx',
'src/client/Subscribe.cxx',
'src/client/File.cxx',
'src/client/Response.cxx',
'src/client/ThreadBackgroundCommand.cxx',
'src/client/ProtocolFeature.cxx',
'src/Listen.cxx',
'src/LogInit.cxx',
'src/ls.cxx',
'src/Instance.cxx',
'src/MusicBuffer.cxx',
'src/MusicPipe.cxx',
'src/MusicChunk.cxx',
'src/MusicChunkPtr.cxx',
'src/Mapper.cxx',
'src/Partition.cxx',
'src/Permission.cxx',
'src/player/CrossFade.cxx',
'src/player/Thread.cxx',
'src/player/Control.cxx',
'src/PlaylistError.cxx',
'src/PlaylistPrint.cxx',
'src/PlaylistSave.cxx',
'src/playlist/Length.cxx',
'src/playlist/PlaylistStream.cxx',
'src/playlist/PlaylistMapper.cxx',
'src/playlist/PlaylistAny.cxx',
'src/playlist/PlaylistSong.cxx',
'src/playlist/PlaylistQueue.cxx',
'src/playlist/Print.cxx',
'src/db/PlaylistVector.cxx',
'src/queue/Queue.cxx',
'src/queue/Print.cxx',
'src/queue/Save.cxx',
'src/queue/Selection.cxx',
'src/queue/Playlist.cxx',
'src/queue/PlaylistControl.cxx',
'src/queue/PlaylistEdit.cxx',
'src/queue/PlaylistTag.cxx',
'src/queue/PlaylistState.cxx',
'src/LocateUri.cxx',
'src/SongUpdate.cxx',
'src/SongLoader.cxx',
'src/SongPrint.cxx',
'src/SongSave.cxx',
'src/StateFile.cxx',
'src/StateFileConfig.cxx',
'src/Stats.cxx',
'src/TagPrint.cxx',
'src/TagSave.cxx',
'src/TagFile.cxx',
'src/TagStream.cxx',
'src/TagAny.cxx',
'src/TimePrint.cxx',
'src/mixer/Memento.cxx',
'src/PlaylistFile.cxx',
]
if is_windows
sources += [
'src/win32/Win32Main.cxx',
]
endif
if not is_android
sources += [
'src/CommandLine.cxx',
'src/unix/SignalHandlers.cxx',
]
else
sources += [
'src/android/Context.cxx',
'src/android/AudioManager.cxx',
'src/android/Environment.cxx',
'src/android/LogListener.cxx',
]
endif
if enable_daemon
sources += 'src/unix/Daemon.cxx'
endif
if enable_database
sources += [
'src/storage/StorageState.cxx',
'src/queue/PlaylistUpdate.cxx',
'src/command/StorageCommands.cxx',
'src/command/DatabaseCommands.cxx',
]
endif
subdir('src/util')
subdir('src/cmdline')
subdir('src/time')
subdir('src/lib/icu')
subdir('src/fs')
subdir('src/io')
subdir('src/io/uring')
subdir('src/system')
subdir('src/system/linux')
subdir('src/thread')
subdir('src/net')
subdir('src/event')
subdir('src/win32')
subdir('src/apple')
subdir('src/fs/glue')
subdir('src/config')
subdir('src/pcm')
subdir('src/lib/dbus')
subdir('src/lib/smbclient')
subdir('src/lib/zlib')
subdir('src/lib/alsa')
subdir('src/lib/chromaprint')
subdir('src/lib/curl')
subdir('src/lib/expat')
subdir('src/lib/ffmpeg')
subdir('src/lib/gcrypt')
subdir('src/lib/nfs')
subdir('src/lib/nlohmann_json')
subdir('src/lib/oss')
subdir('src/lib/pcre')
subdir('src/lib/pipewire')
subdir('src/lib/pulse')
subdir('src/lib/sndio')
subdir('src/lib/sqlite')
subdir('src/lib/systemd')
subdir('src/lib/upnp')
subdir('src/lib/crypto')
subdir('src/zeroconf')
subdir('src/tag')
subdir('src/neighbor')
subdir('src/input')
subdir('src/archive')
subdir('src/filter')
subdir('src/mixer')
subdir('src/output')
subdir('src/lib/xiph')
subdir('src/decoder')
subdir('src/encoder')
subdir('src/song')
subdir('src/playlist')
if enable_sacdiso
subdir('src/lib/sacdiso')
endif
if enable_dvdaiso
subdir('src/lib/dvdaiso')
endif
if curl_dep.found()
sources += 'src/RemoteTagCache.cxx'
endif
if sqlite_dep.found()
sources += [
'src/command/StickerCommands.cxx',
'src/sticker/Database.cxx',
'src/sticker/Print.cxx',
'src/sticker/SongSticker.cxx',
'src/sticker/TagSticker.cxx',
'src/sticker/AllowedTags.cxx',
'src/sticker/CleanupService.cxx',
]
endif
if chromaprint_dep.found()
sources += [
'src/command/FingerprintCommands.cxx',
'src/lib/chromaprint/DecoderClient.cxx',
]
endif
basic = static_library(
'basic',
'src/ReplayGainMode.cxx',
'src/SingleMode.cxx',
'src/ConsumeMode.cxx',
include_directories: inc,
)
basic_dep = declare_dependency(
link_with: basic,
)
if enable_database
subdir('src/storage')
else
storage_glue_dep = dependency('', required: false)
endif
subdir('src/db')
if neighbor_glue_dep.found()
sources += 'src/command/NeighborCommands.cxx'
endif
if archive_glue_dep.found()
sources += [
'src/TagArchive.cxx',
]
if enable_database
sources += ['src/db/update/Archive.cxx']
endif
endif
if is_windows
sources += windows_resources
endif
link_args = []
more_deps = []
if is_android
subdir('src/java')
target_type = 'shared_library'
target_name = 'mpd'
link_args += [
'-Wl,--no-undefined,-shared,-Bsymbolic',
'-llog',
'-lz',
]
more_deps += [
declare_dependency(sources: [bridge_header]),
java_dep,
]
android_abi = get_option('android_abi')
install_dir = meson.current_source_dir() / 'android/app/src/main/jniLibs' / android_abi
else
target_type = 'executable'
target_name = 'mpd'
install_dir = get_option('bindir')
endif
if enable_sacdiso
more_deps += [
sacdiso_dep,
]
endif
if enable_dvdaiso
more_deps += [
dvdaiso_dep,
]
endif
# MPD build target removed - this project only builds mpd-dbcreate
# The mpd-dbcreate utility is a specialized database creator that
# uses MPD's codebase but with modified behavior for filtering
configure_file(output: 'config.h', configuration: conf)
# MPD Database Creator utility
# Build a new source list without Main.cxx
# Start with the custom sources and version_cxx
db_creator_sources = [
version_cxx,
'src/DbMain.cxx',
'src/db/update/FilteredSongUpdate.cxx',
'src/db/update/CueValidator.cxx',
]
# Add all source files from the main sources list except Main.cxx and version_cxx
# Since version_cxx is at index 0, we skip it using index tracking
source_index = 0
foreach src : sources
if source_index == 0
# Skip version_cxx (first element)
source_index += 1
else
# For all other elements, only check against Main.cxx
# This avoids comparing CustomTarget with string
if src == 'src/Main.cxx'
# Skip Main.cxx
else
db_creator_sources += src
endif
source_index += 1
endif
endforeach
mpd_dbcreate = executable(
'mpd-dbcreate',
db_creator_sources,
include_directories: inc,
dependencies: [
cmdline_dep,
basic_dep,
config_dep,
fs_dep,
net_dep,
util_dep,
event_dep,
thread_dep,
input_glue_dep,
archive_glue_dep,
decoder_glue_dep,
playlist_glue_dep,
db_glue_dep,
storage_glue_dep,
song_dep,
systemd_dep,
sqlite_dep,
chromaprint_dep,
neighbor_glue_dep,
output_glue_dep,
encoder_glue_dep,
mixer_glue_dep,
more_deps,
fmt_dep,
],
link_args: link_args,
install: true,
install_dir: get_option('bindir')
)
if systemd_dep.found()
subdir('systemd')
endif
if not is_android
install_data(
'mpd.svg',
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
)
install_data(
'AUTHORS', 'COPYING', 'NEWS', 'README.md',
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
)
endif
subdir('doc')
if get_option('test')
subdir('test')
endif
if get_option('fuzzer')
subdir('test/fuzzer')
endif

@ -0,0 +1,212 @@
option('documentation', type: 'feature', description: 'Build documentation')
option('html_manual', type: 'boolean', value: true, description: 'Build the HTML manual')
option('manpages', type: 'boolean', value: true, description: 'Build manual pages')
option('doxygen', type: 'boolean', value: false, description: 'Build doxygen source documentation')
option('syslog', type: 'feature', description: 'syslog support')
option('inotify', type: 'boolean', value: true, description: 'inotify support (for automatic database update)')
option('io_uring', type: 'feature', description: 'Linux io_uring support using liburing')
option('daemon', type: 'boolean', value: true, description: 'enable daemonization')
option('systemd', type: 'feature', description: 'systemd support')
option('systemd_system_unit_dir', type: 'string', description: 'systemd system service directory')
option('systemd_user_unit_dir', type: 'string', description: 'systemd user service directory')
#
# Options for developers
#
option('test', type: 'boolean', value: false, description: 'Build the unit tests and debug programs')
option('fuzzer', type: 'boolean', value: false, description: 'Build fuzzers')
option('libfuzzer', type: 'boolean', value: true, description: 'Enable libFuzzer support for the fuzzers')
#
# Android
#
option('android_sdk', type: 'string', description: 'The path where Android SDK is installed')
option('android_ndk', type: 'string', description: 'The path where Android NDK is installed')
option('android_abi', type: 'string', value: 'armeabi-v7a', description: 'The Android ABI to be built')
option('android_strip', type: 'string', value: 'strip', description: 'The "strip" tool from the NDK')
option('android_debug_keystore', type: 'string', description: 'The keystore file used to sign debug APK files')
option('android_keystore', type: 'string', description: 'The keystore file used to sign APK files')
option('android_keyalias', type: 'string', description: 'The key alias used to sign APK files')
option('android_keypass', type: 'string', description: 'The password of the keystore used to sign APK files')
#
# System call support
#
option('epoll', type: 'boolean', value: true, description: 'Use epoll on Linux')
option('eventfd', type: 'boolean', value: true, description: 'Use eventfd() on Linux')
option('signalfd', type: 'boolean', value: true, description: 'Use signalfd() on Linux')
#
# Network support
#
option('tcp', type: 'boolean', value: true, description: 'Support for clients connecting via TCP')
option('ipv6', type: 'feature', description: 'Support for IPv6')
option('local_socket', type: 'boolean', value: true, description: 'Support for clients connecting via local sockets')
#
# Audio formats
#
option('dsd', type: 'boolean', value: true, description: 'Support the DSD audio format')
#
# Database plugins
#
option('database', type: 'boolean', value: true, description: 'enable support for the music database')
option('upnp', type: 'combo',
choices: ['auto', 'pupnp', 'npupnp', 'disabled'],
value: 'auto',
description: 'UPnP client support')
option('libmpdclient', type: 'feature', description: 'libmpdclient support (for the proxy database plugin)')
#
# Neighbor plugins
#
option('neighbor', type: 'boolean', value: true, description: 'enable support for neighbor discovery')
#
# Storage plugins
#
option('udisks', type: 'feature', description: 'Support for removable media using udisks2')
option('webdav', type: 'feature', description: 'WebDAV support using CURL and Expat')
#
# Playlist plugins
#
option('cue', type: 'boolean', value: true, description: 'CUE sheet support')
#
# Input plugins
#
option('cdio_paranoia', type: 'feature', description: 'libcdio_paranoia input plugin')
option('curl', type: 'feature', description: 'HTTP client using CURL')
option('mms', type: 'feature', description: 'MMS protocol support using libmms')
option('nfs', type: 'feature', description: 'NFS protocol support using libnfs')
# The "smbclient" plugin is disabled by default because libsmbclient
# has a serious bug which crashes MPD very quickly:
# https://bugzilla.samba.org/show_bug.cgi?id=11413
option('smbclient', type: 'feature', value: 'disabled', description: 'SMB support using libsmbclient')
#
# Commercial services
#
option('qobuz', type: 'feature', description: 'Qobuz client')
#
# Archive plugins
#
option('bzip2', type: 'feature', description: 'bzip2 support using libbz2')
option('iso9660', type: 'feature', description: 'ISO9660 support using libiso9660')
option('zzip', type: 'feature', description: 'ZIP support using zziplib')
#
# Tag plugins
#
option('id3tag', type: 'feature', description: 'ID3 support using libid3tag')
option('chromaprint', type: 'feature', description: 'ChromaPrint / AcoustID support')
#
# Decoder plugins
#
option('adplug', type: 'feature', description: 'AdPlug decoder plugin')
option('audiofile', type: 'feature', description: 'libaudiofile decoder plugin')
option('faad', type: 'feature', description: 'AAC decoder using libfaad')
option('ffmpeg', type: 'feature', description: 'FFmpeg codec support')
option('flac', type: 'feature', description: 'FLAC decoder plugin')
option('fluidsynth', type: 'feature', description: 'fluidsynth MIDI decoder plugin')
option('gme', type: 'feature', description: 'Game Music Emulator decoder plugin')
option('mad', type: 'feature', description: 'MP3 decoder using libmad')
option('mikmod', type: 'feature', description: 'MikMod decoder plugin')
option('modplug', type: 'feature', description: 'Modplug decoder plugin')
option('openmpt', type: 'feature', description: 'OpenMPT decoder plugin')
option('mpcdec', type: 'feature', description: 'Musepack decoder plugin')
option('mpg123', type: 'feature', description: 'MP3 decoder using libmpg123')
option('opus', type: 'feature', description: 'Opus decoder plugin')
option('sidplay', type: 'feature', description: 'C64 SID support via libsidplayfp or libsidplay2')
option('sndfile', type: 'feature', description: 'libsndfile decoder plugin')
option('tremor', type: 'feature', description: 'Fixed-point vorbis decoder plugin')
option('vorbis', type: 'feature', description: 'Vorbis decoder plugin')
option('wavpack', type: 'feature', description: 'WavPack decoder plugin')
option('wildmidi', type: 'feature', description: 'WildMidi decoder plugin')
#
# Encoder plugins
#
option('vorbisenc', type: 'feature', description: 'Vorbis encoder plugin')
option('lame', type: 'feature', description: 'LAME MP3 encoder plugin')
option('twolame', type: 'feature', description: 'TwoLAME MP2 encoder plugin')
option('shine', type: 'feature', description: 'shine MP3 encoder plugin')
option('wave_encoder', type: 'boolean', value: true, description: 'PCM wave encoder encoder plugin')
#
# Filter plugins
#
option('libsamplerate', type: 'feature', description: 'libsamplerate resampler')
option('soxr', type: 'feature', description: 'libsoxr resampler')
#
# Output plugins
#
option('alsa', type: 'feature', description: 'ALSA support')
option('ao', type: 'feature', description: 'libao output plugin')
option('fifo', type: 'boolean', value: true, description: 'FIFO output plugin')
option('httpd', type: 'boolean', value: true, description: 'HTTP streaming output plugin')
option('jack', type: 'feature', description: 'JACK output plugin')
option('openal', type: 'feature', description: 'OpenAL output plugin')
option('oss', type: 'feature', description: 'Open Sound System support')
option('pipe', type: 'boolean', value: true, description: 'Pipe output plugin')
option('pipewire', type: 'feature', description: 'PipeWire support')
option('pulse', type: 'feature', description: 'PulseAudio support')
option('recorder', type: 'boolean', value: true, description: 'Recorder output plugin')
option('shout', type: 'feature', description: 'Shoutcast streaming support using libshout')
option('snapcast', type: 'boolean', value: true, description: 'Snapcast output plugin')
option('sndio', type: 'feature', description: 'sndio output plugin')
option('solaris_output', type: 'feature', description: 'Solaris /dev/audio support')
#
# Misc libraries
#
option('dbus', type: 'feature', description: 'D-Bus support')
option('expat', type: 'feature', description: 'Expat XML support')
option('icu', type: 'feature', description: 'Use libicu for Unicode')
option('iconv', type: 'feature', description: 'Use iconv() for character set conversion')
option('nlohmann_json', type: 'feature', description: 'nlohmann_json for JSON support')
option('pcre', type: 'feature', description: 'Enable regular expression support (using libpcre)')
option('sqlite', type: 'feature', description: 'SQLite database support (for stickers)')
option('zlib', type: 'feature', description: 'zlib support (for database compression)')
option('zeroconf', type: 'combo',
choices: ['auto', 'avahi', 'bonjour', 'disabled'],
value: 'auto',
description: 'Zeroconf support')
#
# DVD-Audio & Super Audio CD ISO support
#
option('dvdaiso', type: 'boolean', value: true, description: 'Support DVD-Audio ISO via libdvdaiso')
option('sacdiso', type: 'boolean', value: true, description: 'Support Super Audio CD ISO via libsacdiso')

@ -0,0 +1,857 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
x="0"
y="0"
width="128"
height="128"
id="svg1"
sodipodi:version="0.32"
sodipodi:docname="mpd.svg"
inkscape:version="0.47pre4 r22446"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-test5.png"
inkscape:export-xdpi="76.799988"
inkscape:export-ydpi="76.799988">
<sodipodi:namedview
id="base"
inkscape:zoom="2.6884788"
inkscape:cx="71.610485"
inkscape:cy="61.484977"
inkscape:window-width="1680"
inkscape:window-height="994"
inkscape:window-x="0"
inkscape:window-y="0"
showguides="true"
inkscape:guide-bbox="true"
showgrid="false"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 80 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="160 : 80 : 1"
inkscape:persp3d-origin="80 : 53.333333 : 1"
id="perspective118" />
<linearGradient
id="linearGradient919">
<stop
style="stop-color:#000000;stop-opacity:0.86092716;"
offset="0.0000000"
id="stop920" />
<stop
style="stop-color:#ffffff;stop-opacity:0.0000000;"
offset="1.0000000"
id="stop921" />
</linearGradient>
<linearGradient
id="linearGradient1068">
<stop
offset="0.0000000"
style="stop-color:#d2d2d2;stop-opacity:1.0000000;"
id="stop1070" />
<stop
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;"
id="stop1069" />
</linearGradient>
<linearGradient
id="linearGradient1065">
<stop
offset="0.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;"
id="stop1067" />
<stop
offset="1.0000000"
style="stop-color:#c2bfbf;stop-opacity:0.99607843;"
id="stop1066" />
</linearGradient>
<linearGradient
id="linearGradient1060">
<stop
offset="0.0000000"
style="stop-color:#878787;stop-opacity:1.0000000;"
id="stop1063" />
<stop
offset="1.0000000"
style="stop-color:#000000;stop-opacity:0.99607843;"
id="stop1061" />
</linearGradient>
<linearGradient
id="linearGradient645">
<stop
style="stop-color:#aca597;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop646" />
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop647" />
</linearGradient>
<linearGradient
id="linearGradient593">
<stop
style="stop-color:#478acf;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop594" />
<stop
style="stop-color:#65c6f7;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop595" />
</linearGradient>
<linearGradient
id="linearGradient574">
<stop
style="stop-color:#85ad92;stop-opacity:1.0000;"
offset="0"
id="stop575" />
<stop
style="stop-color:#559db2;stop-opacity:0.7725;"
offset="1"
id="stop576" />
</linearGradient>
<linearGradient
id="linearGradient570">
<stop
style="stop-color:#999999;stop-opacity:0.7176;"
offset="0"
id="stop571" />
<stop
style="stop-color:#ffffff;stop-opacity:0.3725;"
offset="1"
id="stop572" />
</linearGradient>
<linearGradient
id="linearGradient573"
xlink:href="#linearGradient1068"
x1="40.458553"
y1="389.65582"
x2="36.063946"
y2="357.28375"
gradientTransform="matrix(2.3025192,0,0,0.29683004,-0.91913426,-1.5117091)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient1213"
xlink:href="#linearGradient1068"
x1="123.71407"
y1="141.41566"
x2="98.353867"
y2="113.41083"
gradientTransform="matrix(0.91680324,0,0,0.74547827,-0.91913426,-1.5117091)"
gradientUnits="userSpaceOnUse" />
<radialGradient
id="radialGradient581"
xlink:href="#linearGradient919"
cx="0.095785439"
cy="0.16814159"
r="1.5409589"
fx="0.095785439"
fy="0.16814159" />
<linearGradient
id="linearGradient580"
xlink:href="#linearGradient1068"
x1="132.0352"
y1="135.68469"
x2="119.62381"
y2="111.07157"
gradientTransform="matrix(0.90170536,0,0,0.75796032,-0.91913426,-1.5117091)"
gradientUnits="userSpaceOnUse" />
<linearGradient
xlink:href="#linearGradient1060"
id="linearGradient901"
x1="0.93491787"
y1="0.92044502"
x2="-0.052546836"
y2="0.20347559" />
<linearGradient
xlink:href="#linearGradient593"
id="linearGradient902" />
<linearGradient
xlink:href="#linearGradient1068"
id="linearGradient916"
x1="0.14831461"
y1="-1.6875"
x2="0.43370786"
y2="1.8125" />
<defs
id="defs890">
<linearGradient
id="linearGradient922"
x1="0"
y1="0.5"
x2="1"
y2="0.5"
gradientUnits="objectBoundingBox"
spreadMethod="pad"
xlink:href="#linearGradient1065" />
<linearGradient
id="linearGradient908"
x1="0"
y1="0.5"
x2="1"
y2="0.5"
gradientUnits="objectBoundingBox"
spreadMethod="pad"
xlink:href="#linearGradient1060" />
<linearGradient
id="linearGradient894"
x1="0"
y1="0.5"
x2="1"
y2="0.5"
gradientUnits="objectBoundingBox"
spreadMethod="pad"
xlink:href="#linearGradient1068" />
<linearGradient
xlink:href="#linearGradient894"
id="linearGradient897"
x1="0.5955056"
y1="-0.33587787"
x2="0.61348313"
y2="1.1908396" />
<linearGradient
xlink:href="#linearGradient894"
id="linearGradient898"
x1="0.96449792"
y1="1.0278323"
x2="0.46738392"
y2="0.21800731" />
<linearGradient
xlink:href="#linearGradient908"
id="linearGradient907"
x1="0.57078654"
y1="2.3770492"
x2="0.33258426"
y2="0.49180329" />
<linearGradient
xlink:href="#linearGradient922"
id="linearGradient921"
x1="0.47058824"
y1="0.15384616"
x2="0.46547315"
y2="0.98380566" />
<linearGradient
xlink:href="#linearGradient922"
id="linearGradient948" />
<defs
id="defs987">
<linearGradient
id="linearGradient855"
x1="0"
y1="0.5"
x2="1"
y2="0.5"
gradientUnits="objectBoundingBox"
spreadMethod="pad"
xlink:href="#linearGradient908" />
<linearGradient
id="linearGradient1188"
x1="0"
y1="0.5"
x2="1"
y2="0.5"
gradientUnits="objectBoundingBox"
spreadMethod="pad"
xlink:href="#linearGradient922" />
<linearGradient
id="linearGradient831">
<stop
style="stop-color:#94897f;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop832" />
<stop
style="stop-color:#fff5fe;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop833" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient1188"
id="linearGradient834"
x1="0.87550199"
y1="0.34817815"
x2="-0.29317269"
y2="0.93522269"
gradientUnits="objectBoundingBox"
spreadMethod="pad" />
<radialGradient
xlink:href="#linearGradient1188"
id="radialGradient835"
r="0.55628061"
fy="0.28125"
fx="0.59090906"
cy="0.28125"
cx="0.59090906"
spreadMethod="pad" />
<linearGradient
xlink:href="#linearGradient1188"
id="linearGradient893"
x1="0.12793733"
y1="0.76923078"
x2="0.49608356"
y2="0.70850199" />
<linearGradient
xlink:href="#linearGradient855"
id="linearGradient625"
x1="0.035955057"
y1="1.0276498"
x2="0.053932585"
y2="-0.359447" />
<linearGradient
xlink:href="#linearGradient1188"
id="linearGradient627"
x1="1.2826855"
y1="0.12550607"
x2="-0.15547703"
y2="0.96356273" />
<radialGradient
xlink:href="#linearGradient1188"
id="radialGradient628"
r="1.5982224"
fy="0.4866707"
fx="0.36789617"
cy="0.4866707"
cx="0.36789617"
gradientTransform="scale(0.877379,1.139758)" />
<linearGradient
xlink:href="#linearGradient1188"
id="linearGradient628"
x1="0.76923078"
y1="0.14979757"
x2="0.41909814"
y2="0.73279351" />
</defs>
<sodipodi:namedview
id="namedview898"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.4732669"
inkscape:cx="50.051177"
inkscape:cy="18.096983"
inkscape:window-width="1022"
inkscape:window-height="670"
showguides="false"
snaptoguides="false"
showgrid="false"
snaptogrid="false"
inkscape:window-x="0"
inkscape:window-y="25">
<sodipodi:guide
orientation="vertical"
position="28.705556"
id="guide879" />
<sodipodi:guide
orientation="horizontal"
position="30.130655"
id="guide880" />
</sodipodi:namedview>
</defs>
<sodipodi:namedview
id="namedview1003"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.3368738"
inkscape:cx="24.541029"
inkscape:cy="14.368596"
inkscape:window-width="640"
inkscape:window-height="499"
showguides="true"
snaptoguides="true"
inkscape:window-x="138"
inkscape:window-y="169" />
<linearGradient
xlink:href="#linearGradient1060"
id="linearGradient1304"
x1="-0.20218579"
y1="0.21681416"
x2="0.67759562"
y2="0.57522124" />
<linearGradient
xlink:href="#linearGradient1065"
id="linearGradient1322"
x1="0.32404181"
y1="0.77876109"
x2="0.24041812"
y2="0.26548672" />
<defs
id="defs989">
<linearGradient
id="linearGradient850">
<stop
style="stop-color:#eed680;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop852" />
<stop
style="stop-color:#dfb546;stop-opacity:1.0000000;"
offset="0.68035328"
id="stop858" />
<stop
style="stop-color:#d8a429;stop-opacity:1.0000000;"
offset="0.77277374"
id="stop859" />
<stop
style="stop-color:#d1940c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop857" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient850"
id="linearGradient569"
x1="0.11875"
y1="0.12612613"
x2="0.59375"
y2="0.66066068"
spreadMethod="pad" />
<linearGradient
id="linearGradient839">
<stop
style="stop-color:#46a046;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop840" />
<stop
style="stop-color:#df421e;stop-opacity:1.0000000;"
offset="0.39364964"
id="stop841" />
<stop
style="stop-color:#ada7c8;stop-opacity:1.0000000;"
offset="0.72036445"
id="stop842" />
<stop
style="stop-color:#eed680;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop843" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient839"
id="linearGradient836"
x1="1.3267924e-17"
y1="0.5"
x2="1"
y2="0.5" />
<defs
id="defs604">
<linearGradient
id="linearGradient622">
<stop
style="stop-color:#f8e29d;stop-opacity:0.4471;"
offset="0"
id="stop623" />
<stop
style="stop-color:#272d2d;stop-opacity:0.4784;"
offset="1"
id="stop624" />
</linearGradient>
<linearGradient
id="linearGradient617">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop618" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop619" />
</linearGradient>
<linearGradient
id="linearGradient613">
<stop
style="stop-color:#ffffff;stop-opacity:0.6235;"
offset="0"
id="stop614" />
<stop
style="stop-color:#5d6567;stop-opacity:1;"
offset="1"
id="stop615" />
</linearGradient>
<linearGradient
id="linearGradient607">
<stop
style="stop-color:#d7d5d5;stop-opacity:1;"
offset="0"
id="stop608" />
<stop
style="stop-color:#000000;stop-opacity:0.4039;"
offset="1"
id="stop609" />
</linearGradient>
<radialGradient
xlink:href="#linearGradient607"
id="radialGradient610"
cx="1.4287461"
cy="0.75323397"
r="0.85534656"
fx="1.4287461"
fy="0.75323397"
gradientTransform="matrix(1,2.268336e-6,-1.975559e-5,1,5.713033e-8,3.856326e-8)" />
<linearGradient
xlink:href="#linearGradient617"
id="linearGradient612"
x1="7.7024956"
y1="-2.0263922"
x2="62.759903"
y2="56.137772"
gradientTransform="scale(0.9953779,1.0046436)"
gradientUnits="userSpaceOnUse" />
<radialGradient
xlink:href="#linearGradient613"
id="radialGradient616"
cx="58.70882"
cy="53.831562"
r="43.551846"
fx="58.70882"
fy="53.831562"
gradientTransform="scale(0.99517298,1.0048504)"
gradientUnits="userSpaceOnUse" />
<linearGradient
xlink:href="#linearGradient617"
id="linearGradient621" />
<linearGradient
xlink:href="#linearGradient617"
id="linearGradient626"
x1="72.060211"
y1="55.161442"
x2="32.409"
y2="12.126946"
gradientTransform="matrix(0.995134,-1.068631e-5,-1.31398e-7,1.00489,0,0)"
gradientUnits="userSpaceOnUse" />
<linearGradient
xlink:href="#linearGradient607"
id="linearGradient687"
x1="67.707405"
y1="49.314793"
x2="-10.031048"
y2="4.6068792"
gradientTransform="scale(0.99522839,1.0047945)"
gradientUnits="userSpaceOnUse" />
<linearGradient
xlink:href="#linearGradient617"
id="linearGradient742"
x1="-7.4378386"
y1="25.923714"
x2="18.009745"
y2="10.089797"
gradientTransform="scale(0.889853,1.123781)" />
</defs>
<sodipodi:namedview
id="namedview889"
showguides="true"
snaptoguides="true"
inkscape:zoom="7.5625000"
inkscape:cx="24.000000"
inkscape:cy="24.000000"
inkscape:window-width="640"
inkscape:window-height="496"
inkscape:window-x="0"
inkscape:window-y="26" />
</defs>
<sodipodi:namedview
id="namedview1023"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.5521067"
inkscape:cx="66.459318"
inkscape:cy="62.629296"
inkscape:window-width="1150"
inkscape:window-height="752"
showgrid="true"
snaptogrid="true"
inkscape:window-x="0"
inkscape:window-y="29">
<inkscape:grid
id="GridFromPre046Settings"
type="xygrid"
originx="0px"
originy="0px"
spacingx="1.0000000mm"
spacingy="1.0000000mm"
color="#0000ff"
empcolor="#0000ff"
opacity="0.2"
empopacity="0.4"
empspacing="5" />
</sodipodi:namedview>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1068"
id="linearGradient2924"
x1="41.673889"
y1="320.40921"
x2="36.082947"
y2="279.22458"
gradientTransform="matrix(2.3376099,0,0,0.29237422,-0.91913426,-1.5117091)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1068"
id="linearGradient2926"
x1="134.95444"
y1="108.16693"
x2="102.05431"
y2="71.835884"
gradientTransform="matrix(0.91680324,0,0,0.74547824,-0.91913426,-1.5117091)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1068"
id="linearGradient2928"
x1="145.32188"
y1="101.97199"
x2="129.22044"
y2="70.041069"
gradientTransform="matrix(0.90170536,0,0,0.75796032,-0.91913426,-1.5117091)"
gradientUnits="userSpaceOnUse" />
</defs>
<rect
style="fill-opacity:0.47154475;fill-rule:evenodd;stroke-width:3pt"
id="rect918"
width="48.72493"
height="42.16835"
ry="0.74231374"
x="67.536102"
y="66.474693"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.7811048" />
<rect
style="fill-opacity:0.47154475;fill-rule:evenodd;stroke-width:3pt"
id="rect1006"
width="63.211483"
height="54.705563"
ry="0.74231374"
x="64.47226"
y="30.558294"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.7811048" />
<rect
style="fill:#000000;fill-opacity:0.47058824;fill-rule:evenodd"
id="rect1005"
width="57.843418"
height="9.0050545"
ry="0.62889248"
x="65.398254"
y="82.153206"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.66175652" />
<rect
style="fill:url(#linearGradient2924);fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.82671446"
id="rect1007"
width="54.910637"
height="6.1445785"
ry="0.42912331"
x="64.622299"
y="82.282539"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.44939452" />
<rect
width="57.905403"
height="47.084496"
ry="1.7822117"
x="63.784973"
y="32.456562"
style="font-size:12px;fill:url(#linearGradient2926);fill-rule:evenodd;stroke:#000000;stroke-width:0"
id="rect1009"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="1.6336281" />
<rect
style="fill:#000000;fill-opacity:0.47058824;fill-rule:evenodd"
id="rect971"
width="44.58709"
height="6.9413123"
ry="0.62889248"
x="68.249886"
y="106.24529"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.66175652" />
<rect
width="64.637024"
height="54.068516"
ry="1.4120796"
x="59.853096"
y="28.740753"
style="font-size:12px;fill:url(#linearGradient2928);fill-rule:evenodd;stroke:#000000;stroke-width:1.65869105"
id="rect1008"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="1.3970968" />
<rect
width="51.129478"
height="39.964478"
ry="0.5422883"
x="66.358932"
y="34.89621"
style="font-size:12px;fill:#00b4ed;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.79054338;stroke-linejoin:round"
id="rect976"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.5422883" />
<metadata
id="metadata982">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<rect
width="44.634872"
height="36.293858"
ry="1.7822117"
x="67.006332"
y="67.937927"
style="font-size:12px;fill:url(#linearGradient1213);fill-rule:evenodd;stroke:#000000;stroke-width:0"
id="rect575"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="1.633628" />
<path
sodipodi:type="arc"
style="font-size:12px;fill:#444040;fill-opacity:0.47058824;fill-rule:evenodd"
id="path672"
d="m 68.473,57.85183 a 23.629898,3.2222576 0 1 1 -47.259797,0 23.629898,3.2222576 0 1 1 47.259797,0 z"
sodipodi:cx="44.843102"
sodipodi:cy="57.85183"
sodipodi:rx="23.629898"
sodipodi:ry="3.2222576"
transform="matrix(1.4221482,0,-0.30247168,1.9834766,9.6201687,-10.428817)"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big2.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998" />
<path
sodipodi:type="arc"
style="font-size:12px;fill:#4e4d4b;fill-rule:evenodd;stroke:#000000;stroke-width:2.30019999;stroke-opacity:0.9565"
id="path625"
d="m 58.291138,27.531645 a 19.367088,19.556963 0 1 1 -38.734177,0 19.367088,19.556963 0 1 1 38.734177,0 z"
sodipodi:cx="38.924049"
sodipodi:cy="27.531645"
sodipodi:rx="19.367088"
sodipodi:ry="19.556963"
transform="matrix(-1.0172416,-0.47376693,-0.5523759,1.3286212,116.84611,57.272851)"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big2.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998" />
<path
sodipodi:type="arc"
style="font-size:12px;fill:url(#linearGradient612);fill-rule:evenodd;stroke:#000000;stroke-width:2.06100011;stroke-opacity:0.9565"
id="path605"
d="m 58.291138,27.531645 a 19.367088,19.556963 0 1 1 -38.734177,0 19.367088,19.556963 0 1 1 38.734177,0 z"
sodipodi:cx="38.924049"
sodipodi:cy="27.531645"
sodipodi:rx="19.367088"
sodipodi:ry="19.556963"
transform="matrix(-1.4321234,-0.79696518,-1.1299666,2.2349846,128.07685,29.383033)"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big2.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998" />
<path
sodipodi:type="arc"
style="font-size:12px;fill:url(#radialGradient616);fill-rule:evenodd;stroke:#000000;stroke-width:0.317;stroke-opacity:0.97829997"
id="path606"
d="m 58.291138,27.531645 a 19.367088,19.556963 0 1 1 -38.734177,0 19.367088,19.556963 0 1 1 38.734177,0 z"
sodipodi:cx="38.924049"
sodipodi:cy="27.531645"
sodipodi:rx="19.367088"
sodipodi:ry="19.556963"
transform="matrix(-1.1546358,-0.69851175,-0.95634664,1.9588777,108.06887,31.115628)"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big2.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998" />
<path
sodipodi:type="arc"
style="font-size:12px;fill-rule:evenodd;stroke-width:1.63499999"
id="path686"
d="m 58.291138,27.531645 a 19.367088,19.556963 0 1 1 -38.734177,0 19.367088,19.556963 0 1 1 38.734177,0 z"
sodipodi:cx="38.924049"
sodipodi:cy="27.531645"
sodipodi:rx="19.367088"
sodipodi:ry="19.556963"
transform="matrix(-0.39495459,-0.4546194,-0.52881207,0.94219495,73.198184,52.427791)"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big2.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998" />
<path
sodipodi:type="arc"
style="font-size:12px;fill:url(#linearGradient687);fill-rule:evenodd;stroke:#3f3b3b;stroke-width:0.77380002"
id="path611"
d="m 58.291138,27.531645 a 19.367088,19.556963 0 1 1 -38.734177,0 19.367088,19.556963 0 1 1 38.734177,0 z"
sodipodi:cx="38.924049"
sodipodi:cy="27.531645"
sodipodi:rx="19.367088"
sodipodi:ry="19.556963"
transform="matrix(-0.36949013,-0.40957751,-0.49471918,0.84885391,70.248021,52.066881)"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big2.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998" />
<rect
style="fill:url(#linearGradient573);fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.82671446"
id="rect934"
width="42.326431"
height="4.7363882"
ry="0.42912331"
x="67.651756"
y="106.34497"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.44939449" />
<rect
width="49.823761"
height="41.677303"
ry="1.4120796"
x="63.975548"
y="65.073692"
style="font-size:12px;fill:url(#linearGradient580);fill-rule:evenodd;stroke:#000000;stroke-width:1.27855873;stroke-opacity:1"
id="rect562"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="1.3970969" />
<rect
width="39.411831"
height="30.805574"
ry="0.5422883"
x="68.990387"
y="70.097008"
style="font-size:12px;fill:#003d88;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.61407685;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.93023257"
id="rect975"
inkscape:export-filename="/cowserver/documents/httpd/vhosts/images/mpd-big7.png"
inkscape:export-xdpi="721.66998"
inkscape:export-ydpi="721.66998"
rx="0.5422883" />
</svg>

After

Width:  |  Height:  |  Size: 27 KiB

@ -0,0 +1,91 @@
import os.path, subprocess, sys
from typing import Collection, Iterable, Optional, Sequence, Union
from collections.abc import Mapping
from build.makeproject import MakeProject
from .toolchain import AnyToolchain
class AutotoolsProject(MakeProject):
def __init__(self, url: Union[str, Sequence[str]], md5: str, installed: str,
configure_args: Iterable[str]=[],
autogen: bool=False,
autoreconf: bool=False,
per_arch_cflags: Optional[Mapping[str, str]]=None,
cppflags: str='',
ldflags: str='',
libs: str='',
subdirs: Optional[Collection[str]]=None,
**kwargs):
MakeProject.__init__(self, url, md5, installed, **kwargs)
self.configure_args = configure_args
self.autogen = autogen
self.autoreconf = autoreconf
self.per_arch_cflags = per_arch_cflags
self.cppflags = cppflags
self.ldflags = ldflags
self.libs = libs
self.subdirs = subdirs
def configure(self, toolchain: AnyToolchain) -> str:
src = self.unpack(toolchain)
if self.autogen:
if sys.platform == 'darwin':
subprocess.check_call(['glibtoolize', '--force'], cwd=src)
else:
subprocess.check_call(['libtoolize', '--force'], cwd=src)
subprocess.check_call(['aclocal'], cwd=src)
subprocess.check_call(['automake', '--add-missing', '--force-missing', '--foreign'], cwd=src)
subprocess.check_call(['autoconf'], cwd=src)
if self.autoreconf:
subprocess.check_call(['autoreconf', '-vif'], cwd=src)
build = self.make_build_path(toolchain)
arch_cflags = ''
if self.per_arch_cflags is not None and toolchain.host_triplet is not None:
arch_cflags = self.per_arch_cflags.get(toolchain.host_triplet, '')
configure = [
os.path.join(src, 'configure'),
'CC=' + toolchain.cc,
'CXX=' + toolchain.cxx,
'CFLAGS=' + toolchain.cflags + ' ' + arch_cflags,
'CXXFLAGS=' + toolchain.cxxflags + ' ' + arch_cflags,
'CPPFLAGS=' + toolchain.cppflags + ' ' + self.cppflags,
'LDFLAGS=' + toolchain.ldflags + ' ' + self.ldflags,
'LIBS=' + toolchain.libs + ' ' + self.libs,
'AR=' + toolchain.ar,
'ARFLAGS=' + toolchain.arflags,
'RANLIB=' + toolchain.ranlib,
'STRIP=' + toolchain.strip,
'--prefix=' + toolchain.install_prefix,
'--disable-silent-rules',
]
if toolchain.host_triplet is not None:
configure.append('--host=' + toolchain.host_triplet)
configure.extend(self.configure_args)
try:
print(configure)
subprocess.check_call(configure, cwd=build, env=toolchain.env)
except subprocess.CalledProcessError:
# dump config.log after a failed configure run
try:
with open(os.path.join(build, 'config.log')) as f:
sys.stdout.write(f.read())
except:
pass
# re-raise the exception
raise
return build
def _build(self, toolchain: AnyToolchain) -> None:
build = self.configure(toolchain)
if self.subdirs is not None:
for subdir in self.subdirs:
self.build_make(toolchain, os.path.join(build, subdir))
else:
self.build_make(toolchain, build)

@ -0,0 +1,130 @@
import os
import re
import subprocess
from typing import cast, Optional, Sequence, TextIO, Union
from collections.abc import Mapping
from build.project import Project
from .toolchain import AnyToolchain
def __write_cmake_compiler(f: TextIO, language: str, compiler: str) -> None:
s = compiler.split(' ', 1)
if len(s) == 2:
print(f'set(CMAKE_{language}_COMPILER_LAUNCHER {s[0]})', file=f)
compiler = s[1]
print(f'set(CMAKE_{language}_COMPILER {compiler})', file=f)
def __write_cmake_toolchain_file(f: TextIO, toolchain: AnyToolchain) -> None:
if toolchain.is_darwin:
cmake_system_name = 'Darwin'
elif toolchain.is_windows:
cmake_system_name = 'Windows'
else:
cmake_system_name = 'Linux'
f.write(f"""
set(CMAKE_SYSTEM_NAME {cmake_system_name})
set(CMAKE_SYSTEM_PROCESSOR {toolchain.host_triplet.split('-', 1)[0]})
set(CMAKE_C_COMPILER_TARGET {toolchain.host_triplet})
set(CMAKE_CXX_COMPILER_TARGET {toolchain.host_triplet})
set(CMAKE_C_FLAGS_INIT "{toolchain.cflags} {toolchain.cppflags}")
set(CMAKE_CXX_FLAGS_INIT "{toolchain.cxxflags} {toolchain.cppflags}")
""")
__write_cmake_compiler(f, 'C', toolchain.cc)
__write_cmake_compiler(f, 'CXX', toolchain.cxx)
if cmake_system_name == 'Darwin':
# On macOS, cmake forcibly adds an "-isysroot" flag even if
# one is already present in the flags variable; this breaks
# cross-compiling for iOS, and can be worked around by setting
# the CMAKE_OSX_SYSROOT variable
# (https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html).
m = re.search(r'-isysroot +(\S+)', toolchain.cflags)
if m:
sysroot = m.group(1)
print(f'set(CMAKE_OSX_SYSROOT {sysroot})', file=f)
# search libraries and headers only in the sysroot, not on
# the build host
f.write(f"""
set(CMAKE_FIND_ROOT_PATH "{toolchain.install_prefix};{sysroot}")
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
""")
elif cmake_system_name == 'Windows':
# search libraries and headers only in the sysroot, not on
# the build host
f.write(f"""
set(CMAKE_FIND_ROOT_PATH "{toolchain.install_prefix}")
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
""")
def configure(toolchain: AnyToolchain, src: str, build: str, args: list[str]=[], env: Optional[Mapping[str, str]]=None) -> None:
cross_args: list[str] = []
if toolchain.is_windows:
cross_args.append('-DCMAKE_RC_COMPILER=' + cast(str, toolchain.windres))
configure = [
'cmake',
src,
'-DCMAKE_INSTALL_PREFIX=' + toolchain.install_prefix,
'-DCMAKE_BUILD_TYPE=release',
'-GNinja',
] + cross_args + args
if toolchain.host_triplet is not None:
# cross-compiling: write a toolchain file
os.makedirs(build, exist_ok=True)
# Several targets need a sysroot to prevent pkg-config from
# looking for libraries on the build host (TODO: fix this
# properly); but we must not do that on Android because the NDK
# has a sysroot already
if not toolchain.is_android and not toolchain.is_darwin:
cross_args.append('-DCMAKE_SYSROOT=' + toolchain.install_prefix)
cmake_toolchain_file = os.path.join(build, 'cmake_toolchain_file')
with open(cmake_toolchain_file, 'w') as f:
__write_cmake_toolchain_file(f, toolchain)
configure.append('-DCMAKE_TOOLCHAIN_FILE=' + cmake_toolchain_file)
if env is None:
env = toolchain.env
else:
env = {**toolchain.env, **env}
print(configure)
subprocess.check_call(configure, env=env, cwd=build)
class CmakeProject(Project):
def __init__(self, url: Union[str, Sequence[str]], md5: str, installed: str,
configure_args: list[str]=[],
windows_configure_args: list[str]=[],
env: Optional[Mapping[str, str]]=None,
**kwargs):
Project.__init__(self, url, md5, installed, **kwargs)
self.configure_args = configure_args
self.windows_configure_args = windows_configure_args
self.env = env
def configure(self, toolchain: AnyToolchain) -> str:
src = self.unpack(toolchain)
build = self.make_build_path(toolchain)
configure_args = self.configure_args
if toolchain.is_windows:
configure_args = configure_args + self.windows_configure_args
configure(toolchain, src, build, configure_args, self.env)
return build
def _build(self, toolchain: AnyToolchain) -> None:
build = self.configure(toolchain)
subprocess.check_call(['ninja', '-v', 'install'],
cwd=build, env=toolchain.env)

@ -0,0 +1,9 @@
import os.path
lib_path = os.path.abspath('lib')
shared_path = lib_path
if 'MPD_SHARED_LIB' in os.environ:
shared_path = os.environ['MPD_SHARED_LIB']
tarball_path = os.path.join(shared_path, 'download')
src_path = os.path.join(shared_path, 'src')

@ -0,0 +1,60 @@
from typing import Sequence, Union
import os
import sys
from tempfile import NamedTemporaryFile
import urllib.request
from .verify import verify_file_digest
def __to_string_sequence(x: Union[str, Sequence[str]]) -> Sequence[str]:
if isinstance(x, str):
return (x,)
else:
return x
def __get_any(x: Union[str, Sequence[str]]) -> str:
if isinstance(x, str):
return x
else:
return x[0]
def __download_one(url: str, path: str) -> None:
print("download", url)
urllib.request.urlretrieve(url, path)
def __download(urls: Sequence[str], path: str) -> None:
for url in urls[:-1]:
try:
__download_one(url, path)
return
except:
print("download error:", sys.exc_info()[0])
__download_one(urls[-1], path)
def __download_and_verify_to(urls: Sequence[str], md5: str, path: str) -> None:
__download(urls, path)
if not verify_file_digest(path, md5):
raise RuntimeError("Digest mismatch")
def download_basename(urls: Union[str, Sequence[str]]) -> str:
return os.path.basename(__get_any(urls))
def download_and_verify(urls: Union[str, Sequence[str]], md5: str, parent_path: str) -> str:
"""Download a file, verify its MD5 checksum and return the local path."""
base = download_basename(urls)
os.makedirs(parent_path, exist_ok=True)
path = os.path.join(parent_path, base)
try:
if verify_file_digest(path, md5): return path
os.unlink(path)
except FileNotFoundError:
pass
with NamedTemporaryFile(dir=parent_path) as tmp:
__download_and_verify_to(__to_string_sequence(urls), md5, tmp.name)
os.link(tmp.name, path)
return path

@ -0,0 +1,51 @@
import os.path, subprocess
from build.project import Project
class FfmpegProject(Project):
def __init__(self, url, md5, installed, configure_args=[],
cppflags='',
**kwargs):
Project.__init__(self, url, md5, installed, **kwargs)
self.configure_args = configure_args
self.cppflags = cppflags
def _build(self, toolchain):
src = self.unpack(toolchain)
build = self.make_build_path(toolchain)
if toolchain.is_arm:
arch = 'arm'
elif toolchain.is_aarch64:
arch = 'aarch64'
else:
arch = 'x86'
if toolchain.is_windows:
target_os = 'mingw32'
else:
target_os = 'linux'
configure = [
os.path.join(src, 'configure'),
'--cc=' + toolchain.cc,
'--cxx=' + toolchain.cxx,
'--nm=' + toolchain.nm,
'--extra-cflags=' + toolchain.cflags + ' ' + toolchain.cppflags + ' ' + self.cppflags,
'--extra-cxxflags=' + toolchain.cxxflags + ' ' + toolchain.cppflags + ' ' + self.cppflags,
'--extra-ldflags=' + toolchain.ldflags,
'--extra-libs=' + toolchain.libs,
'--ar=' + toolchain.ar,
'--ranlib=' + toolchain.ranlib,
'--enable-cross-compile',
'--arch=' + arch,
'--target-os=' + target_os,
'--prefix=' + toolchain.install_prefix,
] + self.configure_args
if toolchain.is_armv7:
configure.append('--cpu=cortex-a8')
subprocess.check_call(configure, cwd=build, env=toolchain.env)
subprocess.check_call(['/usr/bin/make', '--quiet', '-j12'], cwd=build, env=toolchain.env)
subprocess.check_call(['/usr/bin/make', '--quiet', 'install'], cwd=build, env=toolchain.env)

@ -0,0 +1,544 @@
import re
from os.path import abspath
from build.project import Project
from build.zlib import ZlibProject
from build.cmake import CmakeProject
from build.autotools import AutotoolsProject
from build.ffmpeg import FfmpegProject
libsamplerate = CmakeProject(
'https://github.com/libsndfile/libsamplerate/releases/download/0.2.2/libsamplerate-0.2.2.tar.xz',
'97c010fc25156c33cddc272c1935afab',
'lib/libsamplerate.a',
[
'-DBUILD_SHARED_LIBS=OFF',
'-DINSTALL_DOCS=OFF',
'-DINSTALL_CMAKE_PACKAGE_MODULE=OFF',
],
)
zlib = ZlibProject(
('http://zlib.net/zlib-1.3.1.tar.xz',
'https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.xz'),
'38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32',
'lib/libz.a',
)
libmodplug = AutotoolsProject(
'https://downloads.sourceforge.net/modplug-xmms/libmodplug/0.8.9.0/libmodplug-0.8.9.0.tar.gz',
'457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de',
'lib/libmodplug.a',
[
'--disable-shared', '--enable-static',
],
patches='src/lib/modplug/patches',
)
libopenmpt = AutotoolsProject(
'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.7.13+release.autotools.tar.gz',
'dcd7cde4f9c498eb496c4556e1c1b81353e2a74747e8270a42565117ea42e1f1',
'lib/libopenmpt.a',
[
'--disable-shared', '--enable-static',
'--disable-openmpt123',
'--disable-examples',
'--disable-tests',
'--disable-doxygen-doc',
'--without-mpg123', '--without-ogg', '--without-vorbis', '--without-vorbisfile',
'--without-portaudio', '--without-portaudiocpp', '--without-sndfile',
'--without-flac',
],
base='libopenmpt-0.7.13+release.autotools',
)
wildmidi = CmakeProject(
'https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.6/wildmidi-0.4.6.tar.gz',
'24ca992639ce76efa3737029fceb3672385d56e2ac0a15d50b40cc12d26e60de',
'lib/libWildMidi.a',
[
'-DBUILD_SHARED_LIBS=OFF',
'-DWANT_PLAYER=OFF',
'-DWANT_STATIC=ON',
],
)
gme = CmakeProject(
'https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-0.6.3.tar.xz',
'aba34e53ef0ec6a34b58b84e28bf8cfbccee6585cebca25333604c35db3e051d',
'lib/libgme.a',
[
'-DBUILD_SHARED_LIBS=OFF',
'-DENABLE_UBSAN=OFF',
'-DZLIB_INCLUDE_DIR=OFF',
'-DCMAKE_DISABLE_FIND_PACKAGE_SDL2=ON',
# cmake 4 complains about gme's cmake_minimum_required=2.6
'-DCMAKE_POLICY_VERSION_MINIMUM=3.5',
],
)
ffmpeg = FfmpegProject(
'http://ffmpeg.org/releases/ffmpeg-7.1.1.tar.xz',
'733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1',
'lib/libavcodec.a',
[
'--disable-shared', '--enable-static',
'--enable-gpl',
'--enable-small',
'--disable-pthreads',
'--disable-programs',
'--disable-doc',
'--disable-avdevice',
'--disable-swresample',
'--disable-swscale',
'--disable-postproc',
'--disable-avfilter',
'--disable-faan',
'--disable-pixelutils',
'--disable-network',
'--disable-encoders',
'--disable-hwaccels',
'--disable-muxers',
'--disable-protocols',
'--disable-devices',
'--disable-filters',
'--disable-v4l2_m2m',
'--disable-sdl2',
'--disable-vulkan',
'--disable-xlib',
'--disable-parser=bmp',
'--disable-parser=cavsvideo',
'--disable-parser=dvbsub',
'--disable-parser=dvdsub',
'--disable-parser=dvd_nav',
'--disable-parser=flac',
'--disable-parser=g729',
'--disable-parser=gsm',
'--disable-parser=h261',
'--disable-parser=h263',
'--disable-parser=h264',
'--disable-parser=hevc',
'--disable-parser=jpeg2000',
'--disable-parser=mjpeg',
'--disable-parser=mlp',
'--disable-parser=mpeg4video',
'--disable-parser=mpegvideo',
'--disable-parser=opus',
'--disable-parser=qoi',
'--disable-parser=rv30',
'--disable-parser=rv40',
'--disable-parser=vc1',
'--disable-parser=vp3',
'--disable-parser=vp8',
'--disable-parser=vp9',
'--disable-parser=png',
'--disable-parser=pnm',
'--disable-parser=webp',
'--disable-parser=xma',
'--disable-demuxer=aqtitle',
'--disable-demuxer=ass',
'--disable-demuxer=bethsoftvid',
'--disable-demuxer=bink',
'--disable-demuxer=cavsvideo',
'--disable-demuxer=cdxl',
'--disable-demuxer=dvbsub',
'--disable-demuxer=dvbtxt',
'--disable-demuxer=h261',
'--disable-demuxer=h263',
'--disable-demuxer=h264',
'--disable-demuxer=ico',
'--disable-demuxer=image2',
'--disable-demuxer=image2pipe',
'--disable-demuxer=image_bmp_pipe',
'--disable-demuxer=image_cri_pipe',
'--disable-demuxer=image_dds_pipe',
'--disable-demuxer=image_dpx_pipe',
'--disable-demuxer=image_exr_pipe',
'--disable-demuxer=image_gem_pipe',
'--disable-demuxer=image_gif_pipe',
'--disable-demuxer=image_j2k_pipe',
'--disable-demuxer=image_jpeg_pipe',
'--disable-demuxer=image_jpegls_pipe',
'--disable-demuxer=image_jpegxl_pipe',
'--disable-demuxer=image_pam_pipe',
'--disable-demuxer=image_pbm_pipe',
'--disable-demuxer=image_pcx_pipe',
'--disable-demuxer=image_pfm_pipe',
'--disable-demuxer=image_pgm_pipe',
'--disable-demuxer=image_pgmyuv_pipe',
'--disable-demuxer=image_pgx_pipe',
'--disable-demuxer=image_phm_pipe',
'--disable-demuxer=image_photocd_pipe',
'--disable-demuxer=image_pictor_pipe',
'--disable-demuxer=image_png_pipe',
'--disable-demuxer=image_ppm_pipe',
'--disable-demuxer=image_psd_pipe',
'--disable-demuxer=image_qdraw_pipe',
'--disable-demuxer=image_qoi_pipe',
'--disable-demuxer=image_sgi_pipe',
'--disable-demuxer=image_sunrast_pipe',
'--disable-demuxer=image_svg_pipe',
'--disable-demuxer=image_tiff_pipe',
'--disable-demuxer=image_vbn_pipe',
'--disable-demuxer=image_webp_pipe',
'--disable-demuxer=image_xbm_pipe',
'--disable-demuxer=image_xpm_pipe',
'--disable-demuxer=image_xwd_pipe',
'--disable-demuxer=jacosub',
'--disable-demuxer=lrc',
'--disable-demuxer=microdvd',
'--disable-demuxer=mjpeg',
'--disable-demuxer=mjpeg_2000',
'--disable-demuxer=mpegps',
'--disable-demuxer=mpegvideo',
'--disable-demuxer=mpl2',
'--disable-demuxer=mpsub',
'--disable-demuxer=pjs',
'--disable-demuxer=rawvideo',
'--disable-demuxer=realtext',
'--disable-demuxer=sami',
'--disable-demuxer=scc',
'--disable-demuxer=srt',
'--disable-demuxer=stl',
'--disable-demuxer=subviewer',
'--disable-demuxer=subviewer1',
'--disable-demuxer=swf',
'--disable-demuxer=tedcaptions',
'--disable-demuxer=vobsub',
'--disable-demuxer=vplayer',
'--disable-demuxer=webm_dash_manifest',
'--disable-demuxer=webvtt',
'--disable-demuxer=yuv4mpegpipe',
# we don't need these decoders, because we have the dedicated
# libraries
'--disable-decoder=flac',
'--disable-decoder=opus',
'--disable-decoder=vorbis',
# audio codecs nobody uses
'--disable-decoder=atrac1',
'--disable-decoder=atrac3',
'--disable-decoder=atrac3al',
'--disable-decoder=atrac3p',
'--disable-decoder=atrac3pal',
'--disable-decoder=binkaudio_dct',
'--disable-decoder=binkaudio_rdft',
'--disable-decoder=bmv_audio',
'--disable-decoder=dsicinaudio',
'--disable-decoder=dvaudio',
'--disable-decoder=metasound',
'--disable-decoder=paf_audio',
'--disable-decoder=ra_144',
'--disable-decoder=ra_288',
'--disable-decoder=ralf',
'--disable-decoder=qdm2',
'--disable-decoder=qdmc',
# disable lots of image and video codecs
'--disable-decoder=acelp_kelvin',
'--disable-decoder=agm',
'--disable-decoder=aic',
'--disable-decoder=alias_pix',
'--disable-decoder=ansi',
'--disable-decoder=apng',
'--disable-decoder=arbc',
'--disable-decoder=argo',
'--disable-decoder=ass',
'--disable-decoder=asv1',
'--disable-decoder=asv2',
'--disable-decoder=aura',
'--disable-decoder=aura2',
'--disable-decoder=avrn',
'--disable-decoder=avrp',
'--disable-decoder=avui',
'--disable-decoder=ayuv',
'--disable-decoder=bethsoftvid',
'--disable-decoder=bfi',
'--disable-decoder=bink',
'--disable-decoder=bintext',
'--disable-decoder=bitpacked',
'--disable-decoder=bmp',
'--disable-decoder=bmv_video',
'--disable-decoder=brender_pix',
'--disable-decoder=c93',
'--disable-decoder=cavs',
'--disable-decoder=ccaption',
'--disable-decoder=cdgraphics',
'--disable-decoder=cdtoons',
'--disable-decoder=cdxl',
'--disable-decoder=cfhd',
'--disable-decoder=cinepak',
'--disable-decoder=clearvideo',
'--disable-decoder=cljr',
'--disable-decoder=cllc',
'--disable-decoder=cpia',
'--disable-decoder=cscd',
'--disable-decoder=cyuv',
'--disable-decoder=dds',
'--disable-decoder=dirac',
'--disable-decoder=dnxhd',
'--disable-decoder=dpx',
'--disable-decoder=dsicinvideo',
'--disable-decoder=dvbsub',
'--disable-decoder=dvdsub',
'--disable-decoder=dvvideo',
'--disable-decoder=dxa',
'--disable-decoder=dxtory',
'--disable-decoder=dxv',
'--disable-decoder=eacmv',
'--disable-decoder=eamad',
'--disable-decoder=eatgq',
'--disable-decoder=eatgv',
'--disable-decoder=eatqi',
'--disable-decoder=eightbps',
'--disable-decoder=escape124',
'--disable-decoder=escape130',
'--disable-decoder=exr',
'--disable-decoder=ffv1',
'--disable-decoder=ffvhuff',
'--disable-decoder=ffwavesynth',
'--disable-decoder=fic',
'--disable-decoder=fits',
'--disable-decoder=flashsv',
'--disable-decoder=flashsv2',
'--disable-decoder=flic',
'--disable-decoder=flv',
'--disable-decoder=fmvc',
'--disable-decoder=fraps',
'--disable-decoder=fourxm',
'--disable-decoder=frwu',
'--disable-decoder=g2m',
'--disable-decoder=gdv',
'--disable-decoder=gem',
'--disable-decoder=gif',
'--disable-decoder=h261',
'--disable-decoder=h263',
'--disable-decoder=h263i',
'--disable-decoder=h263p',
'--disable-decoder=h264',
'--disable-decoder=hap',
'--disable-decoder=hevc',
'--disable-decoder=hnm4_video',
'--disable-decoder=hq_hqa',
'--disable-decoder=hqx',
'--disable-decoder=huffyuv',
'--disable-decoder=hymt',
'--disable-decoder=idcin',
'--disable-decoder=idf',
'--disable-decoder=iff_ilbm',
'--disable-decoder=imm4',
'--disable-decoder=indeo2',
'--disable-decoder=indeo3',
'--disable-decoder=indeo4',
'--disable-decoder=indeo5',
'--disable-decoder=interplay_video',
'--disable-decoder=ipu',
'--disable-decoder=jacosub',
'--disable-decoder=jpeg2000',
'--disable-decoder=jpegls',
'--disable-decoder=jv',
'--disable-decoder=kgv1',
'--disable-decoder=kmvc',
'--disable-decoder=lagarith',
'--disable-decoder=lead',
'--disable-decoder=loco',
'--disable-decoder=lscr',
'--disable-decoder=m101',
'--disable-decoder=magicyuv',
'--disable-decoder=mdec',
'--disable-decoder=microdvd',
'--disable-decoder=mimic',
'--disable-decoder=mjpeg',
'--disable-decoder=mmvideo',
'--disable-decoder=mpl2',
'--disable-decoder=mobiclip',
'--disable-decoder=motionpixels',
'--disable-decoder=movtext',
'--disable-decoder=mpeg1video',
'--disable-decoder=mpeg2video',
'--disable-decoder=mpeg4',
'--disable-decoder=mpegvideo',
'--disable-decoder=msa1',
'--disable-decoder=mscc',
'--disable-decoder=msmpeg4_crystalhd',
'--disable-decoder=msmpeg4v1',
'--disable-decoder=msmpeg4v2',
'--disable-decoder=msmpeg4v3',
'--disable-decoder=msp2',
'--disable-decoder=msrle',
'--disable-decoder=mss1',
'--disable-decoder=msvideo1',
'--disable-decoder=mszh',
'--disable-decoder=mts2',
'--disable-decoder=mv30',
'--disable-decoder=mvc1',
'--disable-decoder=mvc2',
'--disable-decoder=mvdv',
'--disable-decoder=mvha',
'--disable-decoder=mwsc',
'--disable-decoder=notchlc',
'--disable-decoder=nuv',
'--disable-decoder=on2avc',
'--disable-decoder=paf_video',
'--disable-decoder=pam',
'--disable-decoder=pbm',
'--disable-decoder=pcx',
'--disable-decoder=pdv',
'--disable-decoder=pfm',
'--disable-decoder=pgm',
'--disable-decoder=pgmyuv',
'--disable-decoder=pgssub',
'--disable-decoder=pgx',
'--disable-decoder=phm',
'--disable-decoder=photocd',
'--disable-decoder=png',
'--disable-decoder=pictor',
'--disable-decoder=pixlet',
'--disable-decoder=pjs',
'--disable-decoder=ppm',
'--disable-decoder=prores',
'--disable-decoder=prosumer',
'--disable-decoder=psd',
'--disable-decoder=ptx',
'--disable-decoder=qdraw',
'--disable-decoder=qoi',
'--disable-decoder=qpeg',
'--disable-decoder=qtrle',
'--disable-decoder=rawvideo',
'--disable-decoder=r10k',
'--disable-decoder=r210',
'--disable-decoder=rasc',
'--disable-decoder=realtext',
'--disable-decoder=rl2',
'--disable-decoder=rpza',
'--disable-decoder=roq',
'--disable-decoder=roq_dpcm',
'--disable-decoder=rscc',
'--disable-decoder=rv10',
'--disable-decoder=rv20',
'--disable-decoder=rv30',
'--disable-decoder=rv40',
'--disable-decoder=sami',
'--disable-decoder=sanm',
'--disable-decoder=scpr',
'--disable-decoder=screenpresso',
'--disable-decoder=sga',
'--disable-decoder=sgi',
'--disable-decoder=sgirle',
'--disable-decoder=sheervideo',
'--disable-decoder=simbiosis_imx',
'--disable-decoder=smc',
'--disable-decoder=snow',
'--disable-decoder=speedhq',
'--disable-decoder=srgc',
'--disable-decoder=srt',
'--disable-decoder=ssa',
'--disable-decoder=stl',
'--disable-decoder=subrip',
'--disable-decoder=subviewer',
'--disable-decoder=subviewer1',
'--disable-decoder=sunrast',
'--disable-decoder=svq1',
'--disable-decoder=svq3',
'--disable-decoder=targa',
'--disable-decoder=targa_y216',
'--disable-decoder=text',
'--disable-decoder=tiff',
'--disable-decoder=tiertexseqvideo',
'--disable-decoder=tmv',
'--disable-decoder=truemotion1',
'--disable-decoder=truemotion2',
'--disable-decoder=truemotion2rt',
'--disable-decoder=tscc',
'--disable-decoder=tscc2',
'--disable-decoder=twinvq',
'--disable-decoder=txd',
'--disable-decoder=ulti',
'--disable-decoder=utvideo',
'--disable-decoder=v210',
'--disable-decoder=v210x',
'--disable-decoder=v308',
'--disable-decoder=v408',
'--disable-decoder=v410',
'--disable-decoder=vb',
'--disable-decoder=vble',
'--disable-decoder=vbn',
'--disable-decoder=vc1',
'--disable-decoder=vcr1',
'--disable-decoder=vmdvideo',
'--disable-decoder=vmnc',
'--disable-decoder=vp3',
'--disable-decoder=vp5',
'--disable-decoder=vp6',
'--disable-decoder=vp7',
'--disable-decoder=vp8',
'--disable-decoder=vp9',
'--disable-decoder=vplayer',
'--disable-decoder=vqa',
'--disable-decoder=webvtt',
'--disable-decoder=wcmv',
'--disable-decoder=wmv1',
'--disable-decoder=wmv2',
'--disable-decoder=wmv3',
'--disable-decoder=wnv1',
'--disable-decoder=wrapped_avframe',
'--disable-decoder=xan_wc3',
'--disable-decoder=xan_wc4',
'--disable-decoder=xbin',
'--disable-decoder=xbm',
'--disable-decoder=xface',
'--disable-decoder=xl',
'--disable-decoder=xpm',
'--disable-decoder=xsub',
'--disable-decoder=xwd',
'--disable-decoder=y41p',
'--disable-decoder=ylc',
'--disable-decoder=yop',
'--disable-decoder=yuv4',
'--disable-decoder=zero12v',
'--disable-decoder=zerocodec',
'--disable-decoder=zlib',
'--disable-decoder=zmbv',
'--disable-bsf=av1_frame_merge',
'--disable-bsf=av1_frame_split',
'--disable-bsf=av1_metadata',
'--disable-bsf=dts2pts',
'--disable-bsf=h264_metadata',
'--disable-bsf=h264_mp4toannexb',
'--disable-bsf=h264_redundant_pps',
'--disable-bsf=hevc_metadata',
'--disable-bsf=hevc_mp4toannexb',
'--disable-bsf=mjpeg2jpeg',
'--disable-bsf=opus_metadata',
'--disable-bsf=pgs_frame_merge',
'--disable-bsf=text2movsub',
'--disable-bsf=vp9_metadata',
'--disable-bsf=vp9_raw_reorder',
'--disable-bsf=vp9_superframe',
'--disable-bsf=vp9_superframe_split',
],
)
libnfs = AutotoolsProject(
'https://github.com/sahlberg/libnfs/archive/libnfs-6.0.2.tar.gz',
'4e5459cc3e0242447879004e9ad28286d4d27daa42cbdcde423248fad911e747',
'lib/libnfs.a',
[
'--disable-shared', '--enable-static',
'--disable-debug',
# work around -Wtautological-compare
'--disable-werror',
'--disable-utils', '--disable-examples',
'--without-libkrb5',
],
base='libnfs-libnfs-6.0.2',
autoreconf=True,
)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save