From 649433cf1f78c27c1d52ddc1699c152d7156581d Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 26 Apr 2011 06:28:29 +0000 Subject: [PATCH 001/347] add an xcf generic loader. code totally taken from original xcf loader in imlib2. this app is gpl. SVN revision: 58918 --- legacy/evas_generic_loaders/AUTHORS | 2 + legacy/evas_generic_loaders/COPYING | 339 ++++ legacy/evas_generic_loaders/ChangeLog | 0 legacy/evas_generic_loaders/Makefile.am | 32 + legacy/evas_generic_loaders/NEWS | 0 legacy/evas_generic_loaders/README | 2 + legacy/evas_generic_loaders/autogen.sh | 36 + legacy/evas_generic_loaders/configure.ac | 116 ++ .../evas_generic_loaders/m4/ac_attribute.m4 | 47 + .../m4/ac_path_generic.m4 | 137 ++ legacy/evas_generic_loaders/src/Makefile.am | 3 + .../evas_generic_loaders/src/bin/Makefile.am | 3 + .../src/bin/xcf/Makefile.am | 21 + .../evas_generic_loaders/src/bin/xcf/common.h | 49 + .../evas_generic_loaders/src/bin/xcf/main.c | 1600 +++++++++++++++++ .../src/bin/xcf/pixelfuncs.c | 758 ++++++++ 16 files changed, 3145 insertions(+) create mode 100644 legacy/evas_generic_loaders/AUTHORS create mode 100644 legacy/evas_generic_loaders/COPYING create mode 100644 legacy/evas_generic_loaders/ChangeLog create mode 100644 legacy/evas_generic_loaders/Makefile.am create mode 100644 legacy/evas_generic_loaders/NEWS create mode 100644 legacy/evas_generic_loaders/README create mode 100755 legacy/evas_generic_loaders/autogen.sh create mode 100644 legacy/evas_generic_loaders/configure.ac create mode 100644 legacy/evas_generic_loaders/m4/ac_attribute.m4 create mode 100644 legacy/evas_generic_loaders/m4/ac_path_generic.m4 create mode 100644 legacy/evas_generic_loaders/src/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/xcf/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/xcf/common.h create mode 100644 legacy/evas_generic_loaders/src/bin/xcf/main.c create mode 100644 legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c diff --git a/legacy/evas_generic_loaders/AUTHORS b/legacy/evas_generic_loaders/AUTHORS new file mode 100644 index 0000000000..b0727a6c24 --- /dev/null +++ b/legacy/evas_generic_loaders/AUTHORS @@ -0,0 +1,2 @@ +The Rasterman (Carsten Haitzler) +Christian Kreibich diff --git a/legacy/evas_generic_loaders/COPYING b/legacy/evas_generic_loaders/COPYING new file mode 100644 index 0000000000..4189933be9 --- /dev/null +++ b/legacy/evas_generic_loaders/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: 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. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 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) 19yy 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. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog new file mode 100644 index 0000000000..e69de29bb2 diff --git a/legacy/evas_generic_loaders/Makefile.am b/legacy/evas_generic_loaders/Makefile.am new file mode 100644 index 0000000000..d4ce0b78b2 --- /dev/null +++ b/legacy/evas_generic_loaders/Makefile.am @@ -0,0 +1,32 @@ +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = src + +MAINTAINERCLEANFILES = \ +Makefile.in \ +aclocal.m4 \ +compile \ +config.guess \ +config.h.in \ +config.h.in~ \ +config.sub \ +configure \ +depcomp \ +install-sh \ +ltmain.sh \ +missing \ +$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \ +$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \ +m4/libtool.m4 \ +m4/lt~obsolete.m4 \ +m4/ltoptions.m4 \ +m4/ltsugar.m4 \ +m4/ltversion.m4 + +EXTRA_DIST = \ +AUTHORS \ +COPYING \ +autogen.sh \ +m4/ac_attribute.m4 \ +m4/ac_path_generic.m4 \ +README diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README new file mode 100644 index 0000000000..11212728f0 --- /dev/null +++ b/legacy/evas_generic_loaders/README @@ -0,0 +1,2 @@ +Additional "generic" loaders for Evas that are stand-alone executables +evas may run from its generic loader module diff --git a/legacy/evas_generic_loaders/autogen.sh b/legacy/evas_generic_loaders/autogen.sh new file mode 100755 index 0000000000..b7397d458f --- /dev/null +++ b/legacy/evas_generic_loaders/autogen.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +touch README +touch ABOUT-NLS + +echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 +echo "Running autoheader..." ; autoheader || exit 1 +echo "Running autoconf..." ; autoconf || exit 1 +echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 +echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + +W=0 + +rm -f config.cache-env.tmp +echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp +echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp +echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp +echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp +echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp + +cmp config.cache-env.tmp config.cache-env >> /dev/null +if [ $? -ne 0 ]; then + W=1; +fi + +if [ $W -ne 0 ]; then + echo "Cleaning configure cache..."; + rm -f config.cache config.cache-env + mv config.cache-env.tmp config.cache-env +else + rm -f config.cache-env.tmp +fi + +if [ -z "$NOCONFIGURE" ]; then + ./configure -C "$@" +fi diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac new file mode 100644 index 0000000000..a056f64f6c --- /dev/null +++ b/legacy/evas_generic_loaders/configure.ac @@ -0,0 +1,116 @@ +y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +m4_define([v_maj], [0]) +m4_define([v_min], [9]) +m4_define([v_mic], [999]) +m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) +##-- When released, remove the dnl on the below line +dnl m4_undefine([v_rev]) +##-- When doing snapshots - change soname. remove dnl on below line +dnl m4_define([relname], [ver-pre-svn-05]) +dnl m4_define([v_rel], [-release relname]) +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) +m4_define([lt_cur], m4_eval(v_maj + v_min)) +m4_define([lt_rev], v_mic) +m4_define([lt_age], v_min) +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## + +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_PREREQ([2.52]) +AC_CONFIG_SRCDIR([configure.ac]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_CONFIG_HEADERS([config.h]) + +AM_INIT_AUTOMAKE([1.6 dist-bzip2]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +AC_LIBTOOL_WIN32_DLL +define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl +AC_PROG_LIBTOOL + +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +m4_ifdef([v_rev], , [m4_define([v_rev], [0])]) +m4_ifdef([v_rel], , [m4_define([v_rel], [])]) +AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version]) +AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version]) +AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version]) +AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison]) +version_info="lt_cur:lt_rev:lt_age" +release_info="v_rel" +AC_SUBST(version_info) +AC_SUBST(release_info) +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +VMAJ=v_maj +AC_SUBST(VMAJ) + +### Needed information + +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_C_BIGENDIAN +AC_PROG_CC +PKG_PROG_PKG_CONFIG + +### Checks for libraries + +# Eina library +PKG_CHECK_MODULES(EINA, [eina >= 1.0.0]) + +### Checks for header files + +AC_CHECK_HEADER([zlib.h], + [dummy="yes"], + [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")]) + +AC_CHECK_HEADERS(netinet/in.h) + +SHM_OPEN_LIBS="" +AC_MSG_CHECKING([whether shm_open() is present]) +LIBS_save=${LIBS} +LIBS="${LIBS} -lrt" +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +#include + ]], + [[ +int fd; +fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +shm_unlink("/"); + ]])], + [ + have_shm_open="yes" + AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call]) + SHM_OPEN_LIBS="-lrt" + ], + [have_shm_open="no"]) +LIBS=${LIBS_save} +AC_MSG_RESULT([${have_shm_open}]) +AC_SUBST(SHM_OPEN_LIBS) + +### Checks for compiler characteristics +AM_PROG_CC_C_O +AC_C_CONST +AC_C_INLINE +AC_PROG_CC_STDC +AC_C___ATTRIBUTE__ + +### Checks for library functions +AC_ISC_POSIX +AC_FUNC_ALLOCA + +AC_OUTPUT([ +Makefile +src/Makefile +src/bin/Makefile +src/bin/xcf/Makefile +]) diff --git a/legacy/evas_generic_loaders/m4/ac_attribute.m4 b/legacy/evas_generic_loaders/m4/ac_attribute.m4 new file mode 100644 index 0000000000..23479a92ac --- /dev/null +++ b/legacy/evas_generic_loaders/m4/ac_attribute.m4 @@ -0,0 +1,47 @@ +dnl Copyright (C) 2004-2008 Kim Woelders +dnl Copyright (C) 2008 Vincent Torri +dnl That code is public domain and can be freely used or copied. +dnl Originally snatched from somewhere... + +dnl Macro for checking if the compiler supports __attribute__ + +dnl Usage: AC_C___ATTRIBUTE__ +dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__ +dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is +dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused)) +dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is +dnl defined to nothing. + +AC_DEFUN([AC_C___ATTRIBUTE__], +[ + +AC_MSG_CHECKING([for __attribute__]) + +AC_CACHE_VAL([ac_cv___attribute__], + [AC_TRY_COMPILE( + [ +#include + +int func(int x); +int foo(int x __attribute__ ((unused))) +{ + exit(1); +} + ], + [], + [ac_cv___attribute__="yes"], + [ac_cv___attribute__="no"] + )]) + +AC_MSG_RESULT($ac_cv___attribute__) + +if test "x${ac_cv___attribute__}" = "xyes" ; then + AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__]) + AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused]) + else + AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused]) +fi + +]) + +dnl End of ac_attribute.m4 diff --git a/legacy/evas_generic_loaders/m4/ac_path_generic.m4 b/legacy/evas_generic_loaders/m4/ac_path_generic.m4 new file mode 100644 index 0000000000..d42724115f --- /dev/null +++ b/legacy/evas_generic_loaders/m4/ac_path_generic.m4 @@ -0,0 +1,137 @@ +dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl +dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS +dnl +dnl The script must support `--cflags' and `--libs' args. +dnl If MINIMUM-VERSION is specified, the script must also support the +dnl `--version' arg. +dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, +dnl it must also support `--prefix' and `--exec-prefix'. +dnl (In other words, it must be like gtk-config.) +dnl +dnl For example: +dnl +dnl AC_PATH_GENERIC(Foo, 1.0.0) +dnl +dnl would run `foo-config --version' and check that it is at least 1.0.0 +dnl +dnl If so, the following would then be defined: +dnl +dnl FOO_CFLAGS to `foo-config --cflags` +dnl FOO_LIBS to `foo-config --libs` +dnl +dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) +dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) +dnl +dnl @author Angus Lees + +AC_DEFUN([AC_PATH_GENERIC], +[dnl +dnl we're going to need uppercase, lowercase and user-friendly versions of the +dnl string `LIBRARY' +pushdef([UP], translit([$1], [a-z], [A-Z]))dnl +pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl + +dnl +dnl Get the cflags and libraries from the LIBRARY-config script +dnl +AC_ARG_WITH(DOWN-prefix, + [ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)], + DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="") +AC_ARG_WITH(DOWN-exec-prefix, + [ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)], + DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="") + + if test x$DOWN[]_config_exec_prefix != x ; then + DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" + if test x${UP[]_CONFIG+set} != xset ; then + UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config + fi + fi + if test x$DOWN[]_config_prefix != x ; then + DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" + if test x${UP[]_CONFIG+set} != xset ; then + UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config + fi + fi + + AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no) + ifelse([$2], , + AC_MSG_CHECKING(for $1), + AC_MSG_CHECKING(for $1 - version >= $2) + ) + no_[]DOWN="" + if test "$UP[]_CONFIG" = "no" ; then + no_[]DOWN=yes + else + UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`" + UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`" + ifelse([$2], , ,[ + DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` + DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` + DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` + DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])" + DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])" + DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])" + + # Compare wanted version to what config script returned. + # If I knew what library was being run, i'd probably also compile + # a test program at this point (which also extracted and tested + # the version in some library-specific way) + if test "$DOWN[]_config_major_version" -lt \ + "$DOWN[]_wanted_major_version" \ + -o \( "$DOWN[]_config_major_version" -eq \ + "$DOWN[]_wanted_major_version" \ + -a "$DOWN[]_config_minor_version" -lt \ + "$DOWN[]_wanted_minor_version" \) \ + -o \( "$DOWN[]_config_major_version" -eq \ + "$DOWN[]_wanted_major_version" \ + -a "$DOWN[]_config_minor_version" -eq \ + "$DOWN[]_wanted_minor_version" \ + -a "$DOWN[]_config_micro_version" -lt \ + "$DOWN[]_wanted_micro_version" \) ; then + # older version found + no_[]DOWN=yes + echo -n "*** An old version of $1 " + echo -n "($DOWN[]_config_major_version" + echo -n ".$DOWN[]_config_minor_version" + echo ".$DOWN[]_config_micro_version) was found." + echo -n "*** You need a version of $1 newer than " + echo -n "$DOWN[]_wanted_major_version" + echo -n ".$DOWN[]_wanted_minor_version" + echo ".$DOWN[]_wanted_micro_version." + echo "***" + echo "*** If you have already installed a sufficiently new version, this error" + echo "*** probably means that the wrong copy of the DOWN-config shell script is" + echo "*** being found. The easiest way to fix this is to remove the old version" + echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the" + echo "*** correct copy of DOWN-config. (In this case, you will have to" + echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf" + echo "*** so that the correct libraries are found at run-time)" + fi + ]) + fi + if test "x$no_[]DOWN" = x ; then + AC_MSG_RESULT(yes) + ifelse([$3], , :, [$3]) + else + AC_MSG_RESULT(no) + if test "$UP[]_CONFIG" = "no" ; then + echo "*** The DOWN-config script installed by $1 could not be found" + echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the UP[]_CONFIG environment variable to the" + echo "*** full path to DOWN-config." + fi + UP[]_CFLAGS="" + UP[]_LIBS="" + ifelse([$4], , :, [$4]) + fi + AC_SUBST(UP[]_CFLAGS) + AC_SUBST(UP[]_LIBS) + + popdef([UP]) + popdef([DOWN]) +]) diff --git a/legacy/evas_generic_loaders/src/Makefile.am b/legacy/evas_generic_loaders/src/Makefile.am new file mode 100644 index 0000000000..1c5d6ee106 --- /dev/null +++ b/legacy/evas_generic_loaders/src/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = bin diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am new file mode 100644 index 0000000000..f64bd1c426 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = xcf diff --git a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am new file mode 100644 index 0000000000..8a1f15c44d --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am @@ -0,0 +1,21 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src \ +-I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/xcf \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ + +bin_PROGRAMS = evas_image_loader.xcf + +evas_image_loader_xcf_SOURCES = main.c pixelfuncs.c common.h +evas_image_loader_xcf_CFLAGS = @EINA_CFLAGS@ +evas_image_loader_xcf_LDADD = @EINA_LIBS@ -lz -lm @SHM_OPEN_LIBS@ +evas_image_loader_xcf_LDFLAGS = + +install-data-hook: + ln -sf evas_image_loader.xcf $(DESTDIR)$(bindir)/evas_image_loader.xcf.gz diff --git a/legacy/evas_generic_loaders/src/bin/xcf/common.h b/legacy/evas_generic_loaders/src/bin/xcf/common.h new file mode 100644 index 0000000000..a94afa2767 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/xcf/common.h @@ -0,0 +1,49 @@ +#ifndef __COMMON +#define __COMMON 1 + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DATABIG unsigned long long +#define DATA64 unsigned long long +#define DATA32 unsigned int +#define DATA16 unsigned short +#define DATA8 unsigned char + +#ifndef WORDS_BIGENDIAN + +#define A_VAL(p) ((DATA8 *)(p))[3] +#define R_VAL(p) ((DATA8 *)(p))[2] +#define G_VAL(p) ((DATA8 *)(p))[1] +#define B_VAL(p) ((DATA8 *)(p))[0] + +#else + +#define A_VAL(p) ((DATA8 *)(p))[0] +#define R_VAL(p) ((DATA8 *)(p))[1] +#define G_VAL(p) ((DATA8 *)(p))[2] +#define B_VAL(p) ((DATA8 *)(p))[3] + +#endif + +/* #define XCF_DBG */ + +#ifdef XCF_DBG +#define D(fmt, args...) fprintf(stderr, fmt, ## args) +#else +#define D(fmt, args...) +#endif + +#endif diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c new file mode 100644 index 0000000000..30eb708321 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -0,0 +1,1600 @@ +/* + + -----------------------------[ XCF Loader ]----------------------------- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + ------------------------------------------------------------------------ + + There's a quick overview of the XCF file structure in Gimp's source + tree, in docs/xcf.doc. However it's brief, so here's a more verbose + overview based on my understanding of XCF. All image characteristics + are defined in "properties". In the data stream properties are defined + through a 4 bit index number (see enum below), followed by a 4 byte + length. The property data directly follows this information. A list of + properties ends when PROP_END is encountered. There is a properties + block at the beginning of the file, as well as at the beginning of each + layer and channel. Layers and channels are read at offsets in the file, + the list of layers (resp. channels) is exhausted when the next offset + read in is zero. + + The actual image data is stored in tiles, which are by default 64x64 in + size, likely with smaller ones on the right and bottom edges. + + The position of the tiles on the image is left->right, row by row. The + actual DATA8* data is contained in a "level" which is contained in a + "hierarchy". I've not really understood the purpose of the hierarchy, as + it seems to always contain only one level anyway. + + Layer masks are stored as channels (basically grayscale layers with a + single color definition. For the purpose of this loader I replaced the + concept of a channel with a layer, since it doesn't really matter. + + Ok, hope this helps with understanding XCF. -- cK. + +*/ +#include "common.h" + +#define FREE(X) { free(X); X = NULL; } + +#define TILE_WIDTH 64 +#define TILE_HEIGHT 64 + +/* --------------------------------------------------------------------------- typedefs ------------ */ + +typedef struct _Layer Layer; +typedef struct _Tile Tile; + +/* ------------------------------------------------------------------------------ enums ------------ */ + + +/* These are all the properties that a layer or channel can have. + Only some of them are actually used. */ +typedef enum +{ + PROP_END = 0, + PROP_COLORMAP = 1, + PROP_ACTIVE_LAYER = 2, + PROP_ACTIVE_CHANNEL = 3, + PROP_SELECTION = 4, + PROP_FLOATING_SELECTION = 5, + PROP_OPACITY = 6, + PROP_MODE = 7, + PROP_VISIBLE = 8, + PROP_LINKED = 9, + PROP_PRESERVE_TRANSPARENCY = 10, + PROP_APPLY_MASK = 11, + PROP_EDIT_MASK = 12, + PROP_SHOW_MASK = 13, + PROP_SHOW_MASKED = 14, + PROP_OFFSETS = 15, + PROP_COLOR = 16, + PROP_COMPRESSION = 17, + PROP_GUIDES = 18, + PROP_RESOLUTION = 19, + PROP_TATTOO = 20, + PROP_PARASITES = 21, + PROP_UNIT = 22, + PROP_PATHS = 23, + PROP_USER_UNIT = 24 +} +PropType; + +/* The tiles can be stored in an encrypted fashion, defined as follows: */ +typedef enum +{ + COMPRESS_NONE = 0, + COMPRESS_RLE = 1, + COMPRESS_ZLIB = 2, + COMPRESS_FRACTAL = 3 /* Unused. */ +} CompressionType; + +/* Layer modes (*SIGH*) */ +typedef enum +{ + NORMAL_MODE, + DISSOLVE_MODE, + BEHIND_MODE, + MULTIPLY_MODE, + SCREEN_MODE, + OVERLAY_MODE, + DIFFERENCE_MODE, + ADDITION_MODE, + SUBTRACT_MODE, + DARKEN_ONLY_MODE, + LIGHTEN_ONLY_MODE, + HUE_MODE, + SATURATION_MODE, + COLOR_MODE, + VALUE_MODE, + DIVIDE_MODE, + ERASE_MODE, /*< skip >*/ + REPLACE_MODE, /*< skip >*/ + ANTI_ERASE_MODE /*< skip >*/ +} +LayerModeEffects; + +/* Base image types */ +typedef enum +{ + RGB, + GRAY, + INDEXED +} GimpImageBaseType; + +/* Image types */ +typedef enum +{ + RGB_GIMAGE, + RGBA_GIMAGE, + GRAY_GIMAGE, + GRAYA_GIMAGE, + INDEXED_GIMAGE, + INDEXEDA_GIMAGE +} GimpImageType; + +/* ---------------------------------------------------------------------------- structs ------------ */ + +/* Ok, this is what's left of Gimp's layer abstraction. I kicked out + all the stuff that's unnecessary and added the necessary stuff + from the Gimp drawable superclass. This one also serves as a + Channel, e.g. for use as a layer mask. + --cK. +*/ +struct _Layer +{ + int visible; /* controls visibility */ + int width, height; /* size of drawable */ + int bpp; /* depth */ + int offset_x, offset_y; /* offset of layer in image */ + + int ID; /* provides a unique ID */ + GimpImageType type; /* type of drawable */ + char has_alpha; /* drawable has alpha */ + + int preserve_trans; /* preserve transparency */ + + Layer *mask; /* possible layer mask */ + + int opacity; /* layer opacity */ + LayerModeEffects mode; /* layer combination mode */ + + + /* XCF stores the actual image data as tiles. A Layer is covered with + tiles, the tiles on the right and bottom will (usually) be a bit + smaller. num_rows and num_cols gives the number of tile rows and + columns. + */ + + Tile* tiles; /* tiles for drawable data */ + int num_rows; + int num_cols; + + /* After the tiles are read in, they're serialized int an array + of DATA8's, that will always contain 4 bpp data. Not optimal, + I know, but makes life easier + */ + + DATA8* data; + + /* Layers are stored as a linked list. */ + struct _Layer* next; + struct _Layer* prev; +}; + + +/* The tile structure: +*/ +struct _Tile +{ + unsigned char bpp; /* the bytes per pixel (1, 2, 3 or 4) */ + unsigned short ewidth; /* the effective width of the tile */ + unsigned short eheight; /* the effective height of the tile */ + + /* a tile's effective width and height may be smaller + * (but not larger) than TILE_WIDTH and TILE_HEIGHT. + * This is to handle edge tiles of a drawable. + */ + + DATA8 *data; +}; + + +/* This struct simply contains everything that didn't fit elsewhere, + based on GimpImage :) +*/ +struct _GimpImage +{ + int fd; + gzFile fp; + char* filename; + int cp; /* file stream pointer */ + int compression; /* file compression mode */ + int file_version; + + int width, height; /* width and height attributes */ + GimpImageBaseType base_type; /* base gimp_image type */ + + DATA32 floating_sel_offset; + + DATA8* cmap; /* colormap--for indexed */ + int num_cols; /* number of colors in map */ + + /* If a layer number was passed to the loader, it goes here: */ + int single_layer_index; + + /* Tadaa -- the final image data. Layers get pasted + onto this one, bottom-up. + */ + DATA8* data; + + Layer* layers; + Layer* last_layer; + Layer* floating_sel; +} +_image; + +/* ------------------------------------------------------------------------- prototypes ------------ */ + +/* stuff that was adapted from xcf.c */ + +static void xcf_seek_pos(int pos); +static int xcf_read_int32(gzFile *fp, DATA32 *data, int count); +static int xcf_read_int8(gzFile *fp, DATA8 *data, int count); +static int xcf_read_string(gzFile *fp, char **data, int count); +static char xcf_load_prop(PropType *prop_type, DATA32 *prop_size); +static void xcf_load_image(void); +static char xcf_load_image_props(void); + +static Layer* xcf_load_channel(void); +static char xcf_load_channel_props(Layer *layer); +static Layer* xcf_load_layer(void); +static char xcf_load_layer_props(Layer *layer); +static char xcf_load_hierarchy(Tile** tiles, int *num_rows, int *num_cols, int *bpp); +static char xcf_load_level(Tile** tiles, int hierarchy_width, int hierarchy_height, int bpp, int* num_rows, int *num_cols); +static char xcf_load_tile(Tile *tile); +static char xcf_load_tile_rle(Tile *tile, int data_length); + +/* new stuff :) */ + +static Tile* allocate_tiles(int width, int height, int bpp, int* num_rows, int* num_cols); +static void free_tiles(Tile* tiles, int num_tiles); +static void init_tile(Tile* tile, int width, int height, int bpp); +static Layer* new_layer(int width, int height, GimpImageType type, int opacity, LayerModeEffects mode); +static void free_layer(Layer* layer); +static void add_layer_to_image(Layer* layer); +static void read_tiles_into_data(Tile* tiles, int num_cols, int width, int height, int bpp, DATA8** data, int use_cmap); +static void apply_layer_mask(Layer* layer); +static void set_layer_opacity(Layer* layer); +static void flatten_image(void); + +static char xcf_file_init(char* filename); +static void xcf_cleanup(void); + +/* Stuff for layer merging: */ +extern void combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_add (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_sub (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_diff (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_darken (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_lighten (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_mult (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_div (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_screen (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_overlay (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_hue (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_sat (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_val (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_col (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); +extern void combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); + +static int shm_fd = -1; +static int shm_size = 0; +static void *shm_addr = NULL; +static char shmfile[1024] = ""; + +static void +shm_alloc(int dsize) +{ +#ifdef HAVE_SHM_OPEN + srand(time(NULL)); + do + { + snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", + (int)getpid(), (int)rand()); + shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + } + while (shm_fd < 0); + + if (ftruncate(shm_fd, dsize) < 0) + { + close(shm_fd); + shm_unlink(shmfile); + shm_fd = -1; + goto failed; + } + shm_addr = mmap(NULL, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0); + if (shm_addr == MAP_FAILED) + { + close(shm_fd); + shm_unlink(shmfile); + shm_fd = -1; + goto failed; + } + shm_size = dsize; + return; +failed: +#endif + shm_addr = malloc(dsize); +} + +static void +shm_free(void) +{ +#ifdef HAVE_SHM_OPEN + if (shm_fd >= 0) + { + munmap(shm_addr, shm_size); + close(shm_fd); + shm_fd = -1; + shm_addr = NULL; + return; + } +#endif + free(shm_addr); + shm_addr = NULL; + shm_fd = -1; +} + +/* ---------------------------------------------------------------------------- globals ------------ */ + +/* This makes using the Gimp sources easier */ +struct _GimpImage * image = &_image; + +/* ------------------------------------------------------------------------------- code ------------ */ + +static void +xcf_seek_pos(int pos) +{ + if (image->cp != pos) + { + image->cp = pos; + gzseek(image->fp, image->cp, SEEK_SET); + } +} + +static int +xcf_read_int32(gzFile *fp, + DATA32 *data, + int count) +{ + int total; + + total = count; + if (count > 0) + { + xcf_read_int8(fp, (DATA8*) data, count * 4); + while (count--) + { + *data = (DATA32) ntohl (*data); + data++; + } + } + return total * 4; +} + +static int +xcf_read_int8(gzFile *fp, + DATA8 *data, + int count) +{ + int total; + int bytes; + + total = count; + while (count > 0) + { + bytes = gzread(fp, data, count); + if (bytes <= 0) /* something bad happened */ + break; + count -= bytes; + data += bytes; + } + return total; +} + +static int +xcf_read_string(gzFile *fp, + char **data, + int count) +{ + DATA32 tmp; + int total; + int i; + + total = 0; + for (i = 0; i < count; i++) + { + total += xcf_read_int32(fp, &tmp, 1); + if (tmp > 0) + { + data[i] = malloc(sizeof(DATA8) * tmp); + if (data[i]) total += xcf_read_int8(fp, (DATA8 *)data[i], tmp); + } + else + data[i] = NULL; + } + return total; +} + + +static char +xcf_load_prop(PropType *prop_type, + DATA32 *prop_size) +{ + image->cp += xcf_read_int32(image->fp, (DATA32 *)prop_type, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)prop_size, 1); + return 1; +} + + +static char +xcf_load_image_props(void) +{ + PropType prop_type; + DATA32 prop_size; + + while (1) + { + if (!xcf_load_prop (&prop_type, &prop_size)) return 0; + switch (prop_type) + { + case PROP_END: + { + D("Finished reading image properties.\n"); + return 1; + } + case PROP_COLORMAP: + { + if (image->file_version == 0) + { + int i; + fprintf (stderr, + "XCF warning: version 0 of XCF file format\n" + "did not save indexed colormaps correctly.\n" + "Substituting grayscale map.\n"); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->num_cols, 1); + image->cmap = malloc(sizeof(DATA8) * image->num_cols * 3); + if (!image->cmap) return 0; + xcf_seek_pos (image->cp + image->num_cols); + for (i = 0; i < image->num_cols; i++) + { + image->cmap[(i * 3) + 0] = i; + image->cmap[(i * 3) + 1] = i; + image->cmap[(i * 3) + 2] = i; + } + } + else + { + D("Loading colormap.\n"); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->num_cols, 1); + image->cmap = malloc(sizeof(DATA8) * image->num_cols * 3); + if (!image->cmap) return 0; + image->cp += xcf_read_int8(image->fp, (DATA8 *)image->cmap, image->num_cols * 3); + } + } + break; + case PROP_COMPRESSION: + { + char compression; + + image->cp += xcf_read_int8(image->fp, (DATA8 *)&compression, 1); + + if ((compression != COMPRESS_NONE) && + (compression != COMPRESS_RLE) && + (compression != COMPRESS_ZLIB) && + (compression != COMPRESS_FRACTAL)) + { + fprintf (stderr, "unknown xcf compression type: %d\n", (int) compression); + return 0; + } + + D("Image compression type: %i\n", compression); + + image->compression = compression; + } + break; + /* I threw out all of the following: --cK */ + case PROP_TATTOO: + case PROP_PARASITES: + case PROP_UNIT: + case PROP_PATHS: + case PROP_USER_UNIT: + case PROP_GUIDES: + case PROP_RESOLUTION: + default: + { + DATA8 buf[16]; + int amount; + + D("Skipping unexpected/unknown image property: %d\n", prop_type); + + while (prop_size > 0) + { + amount = (16 < prop_size ? 16 : prop_size); + image->cp += xcf_read_int8 (image->fp, buf, amount); + prop_size -= (16 < amount ? 16 : amount); + } + } + break; + } + } + return 0; +} + + +static void +xcf_load_image(void) +{ + Layer *layer; + DATA32 saved_pos; + DATA32 offset; + int width; + int height; + int image_type; + int num_successful_elements = 0; + + /* read in the image width, height and type */ + image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&image_type, 1); + + image->width = width; + image->height = height; + image->base_type = image_type; + + D("Loading %ix%i image.\n", width, height); + + /* read the image properties */ + if (!xcf_load_image_props()) goto hard_error; + + while (1) + { + /* read in the offset of the next layer */ + image->cp += xcf_read_int32(image->fp, &offset, 1); + /* if the offset is 0 then we are at the end + * of the layer list. */ + if (offset == 0) break; + /* save the current position as it is where the + * next layer offset is stored. */ + saved_pos = image->cp; + /* seek to the layer offset */ + xcf_seek_pos(offset); + /* read in the layer */ + layer = xcf_load_layer(); + if (!layer) goto error; + num_successful_elements++; + /* add the layer to the image if it's visible */ + if (layer->visible) add_layer_to_image(layer); + else free_layer(layer); + /* restore the saved position so we'll be ready to + * read the next offset. */ + xcf_seek_pos (saved_pos); + } + /* If we were a Gimp we would now load the user-defined channels here ... */ + /* Flat-o-rama now :) */ + flatten_image(); + return; +error: + if (num_successful_elements == 0) goto hard_error; + fprintf(stderr, "XCF: This file is corrupt! I have loaded as much\nof it as I can, but it is incomplete.\n"); + return; +hard_error: + fprintf(stderr, "XCF: This file is corrupt! I could not even\nsalvage any partial image data from it.\n"); + return; +} + +static char +xcf_load_layer_props(Layer *layer) +{ + PropType prop_type; + DATA32 prop_size; + + while (1) + { + if (!xcf_load_prop(&prop_type, &prop_size)) return 0; + switch (prop_type) + { + case PROP_END: + { + D("Finished reading layer properties.\n"); + return 1; + } + case PROP_FLOATING_SELECTION: + D("Loading floating selection.\n"); + image->floating_sel = layer; + image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->floating_sel_offset, 1); + break; + case PROP_OPACITY: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->opacity, 1); + break; + case PROP_VISIBLE: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->visible, 1); + break; + case PROP_PRESERVE_TRANSPARENCY: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->preserve_trans, 1); + break; + case PROP_OFFSETS: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->offset_x, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->offset_y, 1); + break; + case PROP_MODE: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->mode, 1); + break; + + /* I threw out all of the following: --cK */ + case PROP_LINKED: + case PROP_ACTIVE_LAYER: + case PROP_TATTOO: + case PROP_APPLY_MASK: + case PROP_EDIT_MASK: + case PROP_SHOW_MASK: + case PROP_PARASITES: + default: + { + DATA8 buf[16]; + int amount; + + D("Skipping unexpected/unknown/unneeded channel property: %d\n", prop_type); + while (prop_size > 0) + { + amount = (16 < prop_size ? 16 : prop_size); + image->cp += xcf_read_int8 (image->fp, buf, amount); + prop_size -= (16 < amount ? 16 : amount); + } + } + break; + } + } + + return 0; +} + + +static Layer * +xcf_load_layer(void) +{ + Layer *layer; + Layer *layer_mask; + DATA32 hierarchy_offset; + DATA32 layer_mask_offset; + int width; + int height; + int type; + char *name; + + D("Loading one layer ...\n"); + /* read in the layer width, height and type */ + image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&type, 1); + image->cp += xcf_read_string(image->fp, &name, 1); + /* ugly, I know */ + FREE(name); + + /* create a new layer */ + layer = new_layer(width, height, type, 255, NORMAL_MODE); + if (!layer) return NULL; + + /* read in the layer properties */ + if (!xcf_load_layer_props(layer)) goto error; + + D("Loading opacity: %i \n", layer->opacity); + if (!layer->visible) return layer; + + /* read the hierarchy and layer mask offsets */ + image->cp += xcf_read_int32(image->fp, &hierarchy_offset, 1); + image->cp += xcf_read_int32(image->fp, &layer_mask_offset, 1); + /* read in the hierarchy */ + xcf_seek_pos(hierarchy_offset); + if (!xcf_load_hierarchy(&(layer->tiles), &(layer->num_rows), + &(layer->num_cols), &(layer->bpp))) + goto error; + + /* read in the layer mask */ + if (layer_mask_offset != 0) + { + D("Loading layer mask.\n"); + xcf_seek_pos(layer_mask_offset); + + layer_mask = xcf_load_channel(); + if (!layer_mask) goto error; + + /* set the offsets of the layer_mask */ + layer_mask->offset_x = layer->offset_x; + layer_mask->offset_y = layer->offset_y; + layer->mask = layer_mask; + } + read_tiles_into_data(layer->tiles, layer->num_cols, + layer->width, layer->height, + layer->bpp, &(layer->data), + 1); + free_tiles(layer->tiles, layer->num_rows * layer->num_cols); + layer->tiles = NULL; + set_layer_opacity(layer); + if (layer->mask) apply_layer_mask(layer); + + return layer; + +error: + free_layer(layer); + return NULL; +} + + +static void +read_tiles_into_data(Tile *tiles, int num_cols, int width, + int height, int bpp, DATA8 **data_p, int use_cmap) +{ + int tile_x, tile_y, x, y, offset_x, offset_y; + DATA8 *data; + DATA8 *ptr; + DATA8 *ptr2; + Tile *t; + int warned = 0; + + if (tiles) + { + if (*data_p) FREE(*data_p); + + /* Always allocate the data as 4 bytes per pixel */ + data = (*data_p) = malloc(sizeof(DATA32) * width * height); + if (!data) return; + + ptr = data; + for (y = 0; y < height; y++) + { + for (x = 0; x < width; x++) + { + tile_x = x / TILE_WIDTH; + tile_y = y / TILE_HEIGHT; + offset_x = x % TILE_WIDTH; + offset_y = y % TILE_HEIGHT; + + t = &tiles[(tile_y * num_cols) + tile_x]; + ptr2 = &(t->data[(offset_y * t->ewidth * bpp) + + (offset_x * bpp)]); + switch (bpp) + { + case 1: + { + /* use colormap if the image has one */ + if (image->cmap && use_cmap) + { + R_VAL(ptr) = image->cmap[(*(ptr2) * 3)]; + G_VAL(ptr) = image->cmap[(*(ptr2) * 3) + 1]; + B_VAL(ptr) = image->cmap[(*(ptr2) * 3) + 2]; + A_VAL(ptr) = 255; + } + /* else use colors themselves */ + else + { + R_VAL(ptr) = *(ptr2); + G_VAL(ptr) = *(ptr2); + B_VAL(ptr) = *(ptr2); + A_VAL(ptr) = 255; + } + break; + } + case 2: + { + /* use colormap if the image has one */ + if (image->cmap && use_cmap) + { + R_VAL(ptr) = image->cmap[(*(ptr2) * 3)]; + G_VAL(ptr) = image->cmap[(*(ptr2) * 3) + 1]; + B_VAL(ptr) = image->cmap[(*(ptr2) * 3) + 2]; + A_VAL(ptr) = *(ptr2 + 1); + } + /* else use colors themselves */ + else if (warned == 0) + { + warned++; + fprintf (stderr, "There's nothing to see here. 2 bpp without colormap not implemented yet.\n"); + } + break; + } + case 3: + { + if (image->cmap) + { + if (warned == 0) + { + warned++; + fprintf (stderr, "There's nothing to see here. 3 bpp with colormap not implemented yet.\n"); + } + } + else + { + R_VAL(ptr) = *(ptr2); + G_VAL(ptr) = *(ptr2 + 1); + B_VAL(ptr) = *(ptr2 + 2); + A_VAL(ptr) = 255; + } + break; + } + default: + { + R_VAL(ptr) = *(ptr2); + G_VAL(ptr) = *(ptr2 + 1); + B_VAL(ptr) = *(ptr2 + 2); + A_VAL(ptr) = *(ptr2 + 3); + break; + } + } + ptr += 4; + } + } + } +} + +static Layer * +xcf_load_channel(void) +{ + Layer *layer; + DATA32 hierarchy_offset; + int width; + int height; + char *name; + + D("Loading channel ...\n"); + /* read in the layer width, height and name */ + image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); + image->cp += xcf_read_string(image->fp, &name, 1); + + /* Yeah, still ugly :) */ + FREE(name); + + /* create a new channel */ + layer = new_layer(width, height, GRAY, 255, NORMAL_MODE); + if (!layer) return NULL; + /* read in the channel properties */ + if (!xcf_load_channel_props(layer)) goto error; + /* read the hierarchy and layer mask offsets */ + image->cp += xcf_read_int32(image->fp, &hierarchy_offset, 1); + /* read in the hierarchy */ + xcf_seek_pos(hierarchy_offset); + if (!xcf_load_hierarchy(&(layer->tiles), &(layer->num_rows), &(layer->num_cols), &(layer->bpp))) + goto error; + read_tiles_into_data(layer->tiles, layer->num_cols, layer->width, + layer->height, layer->bpp, &(layer->data), 0); + free_tiles(layer->tiles, layer->num_rows * layer->num_cols); + layer->tiles = NULL; + + D("Channel loaded successfully.\n"); + return layer; + +error: + free_layer(layer); + return NULL; +} + +static char +xcf_load_channel_props(Layer *layer) +{ + PropType prop_type; + DATA32 prop_size; + + while (1) + { + if (!xcf_load_prop(&prop_type, &prop_size)) return 0; + + switch (prop_type) + { + case PROP_END: + { + D("Finished loading channel props.\n"); + return 1; + } + case PROP_OPACITY: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->opacity, 1); + break; + case PROP_VISIBLE: + image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->visible, 1); + break; + case PROP_ACTIVE_CHANNEL: + case PROP_SHOW_MASKED: + case PROP_SELECTION: + case PROP_COLOR: + case PROP_TATTOO: + case PROP_PARASITES: + default: + { + DATA8 buf[16]; + int amount; + + D("Skipping unexpected/unknown/unneeded channel property: %d\n", prop_type); + + while (prop_size > 0) + { + amount = (16 < prop_size ? 16 : prop_size); + image->cp += xcf_read_int8(image->fp, buf, amount); + prop_size -= (16 < amount ? 16 : amount); + } + } + break; + } + } + return 0; +} + +static char +xcf_load_hierarchy(Tile **tiles, int *num_rows, int *num_cols, int *bpp) +{ + DATA32 saved_pos; + DATA32 offset; + DATA32 junk; + int width; + int height; + + image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)bpp, 1); + image->cp += xcf_read_int32(image->fp, &offset, 1); /* top level */ + + D("Loading hierarchy: width %i, height %i, bpp %i\n", width, height, *bpp); + + /* discard offsets for layers below first, if any. */ + do + { + image->cp += xcf_read_int32(image->fp, &junk, 1); + } + while (junk != 0); + /* save the current position as it is where the + * next level offset is stored. */ + saved_pos = image->cp; + /* seek to the level offset */ + xcf_seek_pos(offset); + /* read in the level */ + if (!xcf_load_level(tiles, width, height, *bpp, num_rows, num_cols)) + return 0; + /* restore the saved position so we'll be ready to + * read the next offset. */ + xcf_seek_pos (saved_pos); + D("Loaded hierarchy successfully.\n"); + return 1; +} + +static char +xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, + int bpp, int *num_rows, int *num_cols) +{ + DATA32 saved_pos; + DATA32 offset, offset2; + int ntiles; + int width; + int height; + int i; + int fail; + Tile *tiles; + Tile *current_tile; + + image->cp += xcf_read_int32(image->fp, (DATA32*) &width, 1); + image->cp += xcf_read_int32(image->fp, (DATA32*) &height, 1); + + if ((width != hierarchy_width) || (height != hierarchy_height)) return 0; + + D("Loading level of size %ix%i.\n", width, height); + (*tiles_p) = allocate_tiles(width, height, bpp, num_rows, num_cols); + tiles = (*tiles_p); + + image->cp += xcf_read_int32(image->fp, &offset, 1); + if (offset == 0) return 1; + + ntiles = (*num_rows) * (*num_cols); + for (i = 0; i < ntiles; i++) + { + current_tile = &(tiles[i]); + fail = 0; + + if (offset == 0) + { + D("Not enough tiles found in level\n"); + return 0; + } + + /* save the current position as it is where the + * next tile offset is stored. + */ + saved_pos = image->cp; + + /* read in the offset of the next tile so we can calculate the amount + of data needed for this tile*/ + image->cp += xcf_read_int32(image->fp, &offset2, 1); + + /* if the offset is 0 then we need to read in the maximum possible + allowing for negative compression */ + if (offset2 == 0) + offset2 = offset + (TILE_WIDTH * TILE_WIDTH * 4 * 1.5); + /* 1.5 is probably more than we need to allow */ + + /* seek to the tile offset */ + xcf_seek_pos(offset); + + /* read in the current_tile */ + switch (image->compression) + { + case COMPRESS_NONE: + if (!xcf_load_tile(current_tile)) fail = 1; + break; + case COMPRESS_RLE: + if (!xcf_load_tile_rle(current_tile, offset2 - offset)) fail = 1; + break; + case COMPRESS_ZLIB: + fprintf (stderr, "xcf: zlib compression unimplemented\n"); + fail = 1; + break; + case COMPRESS_FRACTAL: + fprintf (stderr, "xcf: fractal compression unimplemented\n"); + fail = 1; + break; + } + + if (fail) + { + D("Couldn't load tiles.\n"); + free_tiles(tiles, (*num_rows) * (*num_cols)); + return 0; + } + /* restore the saved position so we'll be ready to + * read the next offset. + */ + xcf_seek_pos(saved_pos); + /* read in the offset of the next tile */ + image->cp += xcf_read_int32(image->fp, &offset, 1); + } + + if (offset != 0) + { + D("encountered garbage after reading level: %d\n", offset); + return 0; + } + + D("Loaded level successfully.\n"); + return 1; +} + +static char +xcf_load_tile(Tile *tile) +{ + image->cp += xcf_read_int8(image->fp, tile->data, + tile->ewidth * tile->eheight * tile->bpp); + return 1; +} + +static char +xcf_load_tile_rle(Tile *tile, + int data_length) +{ + DATA8 *data; + DATA8 val; + int size; + int count; + int length; + int bpp; + int i, j; + int nmemb_read_successfully; + DATA8 *xcfdata, *xcfodata, *xcfdatalimit; + + data = tile->data; + bpp = tile->bpp; + + /*printf ("Reading encrypted tile %ix%ix%i, data_length %i\n", tile->ewidth, tile->eheight, tile->bpp, data_length);*/ + + xcfdata = xcfodata = malloc(sizeof(DATA8) * data_length); + if (!xcfdata) return 0; + + /* we have to use fread instead of xcf_read_* because we may be + reading past the end of the file here */ + nmemb_read_successfully = gzread(image->fp, xcfdata, data_length); + image->cp += nmemb_read_successfully; + + xcfdatalimit = &xcfodata[nmemb_read_successfully - 1]; + + for (i = 0; i < bpp; i++) + { + data = (tile->data) + i; + size = tile->ewidth * tile->eheight; + count = 0; + + while (size > 0) + { + if (xcfdata > xcfdatalimit) goto bogus_rle; + + val = *xcfdata++; + + length = val; + if (length >= 128) + { + length = 255 - (length - 1); + if (length == 128) + { + if (xcfdata >= xcfdatalimit) goto bogus_rle; + + length = (*xcfdata << 8) + xcfdata[1]; + xcfdata += 2; + } + + count += length; + size -= length; + + if (size < 0) goto bogus_rle; + if (&xcfdata[length-1] > xcfdatalimit) goto bogus_rle; + + while (length-- > 0) + { + *data = *xcfdata++; + data += bpp; + } + } + else + { + length += 1; + if (length == 128) + { + if (xcfdata >= xcfdatalimit) goto bogus_rle; + + length = (*xcfdata << 8) + xcfdata[1]; + xcfdata += 2; + } + + count += length; + size -= length; + + if (size < 0) goto bogus_rle; + if (xcfdata > xcfdatalimit) goto bogus_rle; + + val = *xcfdata++; + + for (j = 0; j < length; j++) + { + *data = val; + data += bpp; + } + } + } + } + FREE(xcfodata); + return 1; + +bogus_rle: + fprintf(stderr, "WHOOOOOP -- bogus rle? Highly unlikely, blame cK for this one :) \n"); + if (xcfodata) FREE(xcfodata); + return 0; +} + +static Layer * +new_layer(int width, int height, GimpImageType type, int opacity, LayerModeEffects mode) +{ + Layer *layer; + + layer = calloc(1, sizeof(Layer)); + if (!layer) + { + D("Couldn't allocate layer.\n"); + return NULL; + } + + layer->width = width; + layer->height = height; + layer->type = type; + layer->opacity = opacity; + layer->mode = mode; + layer->tiles = NULL; + layer->next = NULL; + layer->mask = NULL; + return layer; +} + +static void +free_layer(Layer *layer) +{ + if (layer) + { + if (layer->tiles) + free_tiles(layer->tiles, layer->num_rows * layer->num_cols); + if (layer->mask) free_layer(layer->mask); + if (layer->data) FREE(layer->data); + FREE(layer); + } +} + +static Tile * +allocate_tiles(int width, int height, int bpp, int* num_rows, int* num_cols) +{ + Tile* tiles; + int i, j, k, right_tile, bottom_tile; + int tile_width, tile_height; + + (*num_rows) = (height + TILE_HEIGHT - 1) / TILE_HEIGHT; + (*num_cols) = (width + TILE_WIDTH - 1) / TILE_WIDTH; + + tiles = malloc(sizeof(Tile) * (*num_rows) * (*num_cols)); + if (!tiles) + { + D("Couldn't allocate tiles.\n"); + return NULL; + } + + right_tile = width - (((*num_cols) - 1) * TILE_WIDTH); + bottom_tile = height - (((*num_rows) - 1) * TILE_HEIGHT); + + for (i = 0, k = 0; i < (*num_rows); i++) + { + for (j = 0; j < (*num_cols); j++, k++) + { + tile_width = ((j == (*num_cols) - 1) ? right_tile : TILE_WIDTH); + tile_height = ((i == (*num_rows) - 1) ? bottom_tile : TILE_HEIGHT); + init_tile(&(tiles[k]), tile_width, tile_height, bpp); + } + } + D("Allocated %ix%i tiles.\n", (*num_cols), (*num_rows)); + return tiles; +} + +static void +init_tile(Tile *tile, int width, int height, int bpp) +{ + if (tile) + { + tile->bpp = bpp; + tile->ewidth = width; + tile->eheight = height; + tile->data = malloc(sizeof(DATA8) * width * height * bpp); + if (!tile->data) + { + D("Couldn't allocate tile.\n"); + } + } +} + +static void +free_tiles(Tile *tiles, int num_tiles) +{ + int i; + + for (i = 0; i < num_tiles; i++) + { + if (tiles[i].data) FREE(tiles[i].data); + } + FREE(tiles); +} + +static void +add_layer_to_image(Layer *layer) +{ + if (layer) + { + if (image->last_layer) + { + image->last_layer->next = layer; + layer->prev = image->last_layer; + } + else + { + image->layers = layer; + layer->prev = NULL; + } + layer->next = NULL; + image->last_layer = layer; + } +} + +static void +set_layer_opacity(Layer *layer) +{ + int i; + DATA8* ptr; + + if (layer) + { + if (layer->opacity != 255) + { + for (i = 0, ptr = layer->data; i < layer->width * layer->height; i++, ptr += 4) + { + *(ptr + 3) = (*(ptr + 3) * layer->opacity) >> 8; + } + } + } +} + +static void +apply_layer_mask(Layer *layer) +{ + DATA8* ptr1; + DATA8* ptr2; + int i, tmp; + + D("Applying layer mask.\n"); + if (layer) + { + if (layer->mask) + { + ptr1 = layer->data; + ptr2 = layer->mask->data; + for (i = 0; i < layer->width * layer->height; i++) + { + tmp = (*(ptr1 + 3) * *(ptr2)) / 256; + if (tmp > 255) tmp = 255; + *(ptr1 + 3) = (DATA8)tmp; + ptr1 += 4; + ptr2 += 4; + } + } + } +} + +static void +flatten_image(void) +{ + Layer* l = image->last_layer; + Layer* lp; + int layer_index; + + shm_alloc(image->width * image->height * sizeof(DATA32)); + if (!shm_addr) return; + image->data = shm_addr; + memset(image->data, 0, image->width * image->height * sizeof(DATA32)); + + layer_index = 0; + + while (l) + { + /* Ok, paste each layer on top of the image, using the mode's merging type. + We're moving upward through the layer stack. + --cK. + */ + if ((image->single_layer_index < 0) || + (layer_index == image->single_layer_index)) + { + // FIXME: not all modes are implemented right + // xcf's may not render right :) + switch (l->mode) + { + case MULTIPLY_MODE: + D("MULTIPLY\n"); + combine_pixels_mult(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case DIVIDE_MODE: + D("DIVIDE\n"); + combine_pixels_div(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case SCREEN_MODE: + D("SCREEN\n"); + combine_pixels_screen(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case OVERLAY_MODE: + D("OVERLAY\n"); + combine_pixels_overlay(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case DIFFERENCE_MODE: + D("DIFF\n"); + combine_pixels_diff(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case ADDITION_MODE: + D("ADD\n"); + combine_pixels_add(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case SUBTRACT_MODE: + D("SUB\n"); + combine_pixels_sub(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case DARKEN_ONLY_MODE: + D("DARKEN\n"); + combine_pixels_darken(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case LIGHTEN_ONLY_MODE: + D("LIGHTEN\n"); + combine_pixels_lighten(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case HUE_MODE: + D("HUE\n"); + combine_pixels_hue(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case SATURATION_MODE: + D("SATURATION\n"); + combine_pixels_sat(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case VALUE_MODE: + D("VALUE\n"); + combine_pixels_val(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case COLOR_MODE: + D("COLOR\n"); + combine_pixels_col(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + case DISSOLVE_MODE: + D("DISSOLVE\n"); + combine_pixels_diss(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + /* None of the following is actually valid for layer blending, fall through: */ + case BEHIND_MODE: + case REPLACE_MODE: + case ERASE_MODE: + case ANTI_ERASE_MODE: + D("EEEEEK -- this mode shouldn't be here\n"); + + case NORMAL_MODE: + D("NORMAL\n"); + combine_pixels_normal(l->data, l->width, l->height, + image->data, image->width, image->height, + l->offset_x, l->offset_y); + break; + + default: + D("Unknown layer mode: %i. Skipping.\n", l->mode); + } + } + + lp = l->prev; + /* free the layer now, since it's not needed anymore */ + free_layer(l); + + l = lp; + layer_index++; + } + + /* We've used up all the layers now, so set them to NULL in the image: */ + image->layers = NULL; + image->last_layer = NULL; +} + +static char +xcf_file_init(char *filename) +{ + char success = 1; + char id[14]; + + image->single_layer_index = -1; + image->fd = open(filename, O_RDONLY); + if (image->fd < 0) return 0; + image->fp = gzdopen(image->fd, "r"); + if (!image->fp) return 0; + + image->filename = filename; + image->layers = NULL; + image->last_layer = NULL; + image->cmap = NULL; + image->num_cols = 0; + image->data = NULL; + + image->cp = 0; + + image->cp += xcf_read_int8(image->fp, (DATA8 *)id, 14); + if (strncmp(id, "gimp xcf ", 9)) + { + success = 0; + gzclose(image->fp); + close(image->fd); + } + else if (!strcmp(id + 9, "file")) + { + image->file_version = 0; + } + else if (id[9] == 'v') + { + image->file_version = atoi(id + 10); + } + else + { + success = 0; + gzclose(image->fp); + close(image->fd); + } + return success; +} + +static void +xcf_cleanup(void) +{ + Layer *l, *lp; + + if (image->fp) gzclose(image->fp); + if (image->fd >= 0) close(image->fd); + for (l = image->last_layer; l; l = lp) + { + lp = l->prev; + free_layer(l); + } + if (image->cmap) FREE(image->cmap); +} + +static void +premul_image(void) +{ + DATA32 *p, *end; + + end = (DATA32 *)image->data + (image->width * image->height); + for (p = (DATA32 *)image->data; p < end; p++) + { + unsigned int r, g, b, a; + + a = A_VAL(p); + r = (R_VAL(p) * a) / 255; + R_VAL(p) = r; + g = (G_VAL(p) * a) / 255; + G_VAL(p) = g; + b = (B_VAL(p) * a) / 255; + B_VAL(p) = b; + } +} + +int +main(int argc, char **argv) +{ + char *file; + int w, h, dsize; + + // grossly inefficient, multiple copies, but making it "work" for now + if (argc < 2) return -1; + file = argv[1]; + // FIXME: should alloc rgba data via shm_open + if (!xcf_file_init(file)) return -1; + xcf_load_image(); + premul_image(); + w = image->width; + h = image->height; + dsize = w * h * sizeof(DATA32); + printf("size %i %i\n", w, h); + printf("alpha 1\n"); + if (shm_fd >= 0) printf("shmfile %s\n", shmfile); + else + { + printf("data\n"); + fwrite(image->data, dsize, 1, stdout); + } + shm_free(); + xcf_cleanup(); + return 0; +} diff --git a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c new file mode 100644 index 0000000000..31d25ce051 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c @@ -0,0 +1,758 @@ +/* + + -----------------------------[ XCF Loader ]----------------------------- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "common.h" + +#define RS R_VAL(src + s_idx) +#define GS G_VAL(src + s_idx) +#define BS B_VAL(src + s_idx) +#define AS A_VAL(src + s_idx) +#define RD R_VAL(dest + d_idx) +#define GD G_VAL(dest + d_idx) +#define BD B_VAL(dest + d_idx) +#define AD A_VAL(dest + d_idx) + +#define EPS 0.00001 +#define PI 3.141592654 +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define INT_MULT(a,b,t) ((t) = (a) * (b) + 0x80, ((((t) >> 8) + (t)) >> 8)) +#define LINEAR(x,y,w) ((w*y + x)*4) + +void +rgb_to_hls (DATA8 *red, DATA8 *green, DATA8 *blue) +{ + int r, g, b; + double h, l, s; + int min, max; + int delta; + + r = *red; + g = *green; + b = *blue; + + if (r > g) + { + max = MAX (r, b); + min = MIN (g, b); + } + else + { + max = MAX (g, b); + min = MIN (r, b); + } + + l = (max + min) / 2.0; + + if (max == min) + { + s = 0.0; + h = 0.0; + } + else + { + delta = (max - min); + + if (l < 128) + s = 255 * (double) delta / (double) (max + min); + else + s = 255 * (double) delta / (double) (511 - max - min); + + if (r == max) + h = (g - b) / (double) delta; + else if (g == max) + h = 2 + (b - r) / (double) delta; + else + h = 4 + (r - g) / (double) delta; + + h = h * 42.5; + + if (h < 0) + h += 255; + else if (h > 255) + h -= 255; + } + + *red = h; + *green = l; + *blue = s; +} + + +DATA8 +gimp_hls_value (double n1, double n2, double hue) +{ + double value; + + if (hue > 255) + hue -= 255; + else if (hue < 0) + hue += 255; + if (hue < 42.5) + value = n1 + (n2 - n1) * (hue / 42.5); + else if (hue < 127.5) + value = n2; + else if (hue < 170) + value = n1 + (n2 - n1) * ((170 - hue) / 42.5); + else + value = n1; + + return (DATA8) (value * 255); +} + + +void +hls_to_rgb (DATA8 *hue, DATA8 *lightness, DATA8 *saturation) +{ + double h, l, s; + double m1, m2; + + h = *hue; + l = *lightness; + s = *saturation; + + if (s == 0) + { + /* achromatic case */ + *hue = l; + *lightness = l; + *saturation = l; + } + else + { + if (l < 128) + m2 = (l * (255 + s)) / 65025.0; + else + m2 = (l + s - (l * s) / 255.0) / 255.0; + + m1 = (l / 127.5) - m2; + + /* chromatic case */ + *hue = gimp_hls_value (m1, m2, h + 85); + *lightness = gimp_hls_value (m1, m2, h); + *saturation = gimp_hls_value (m1, m2, h - 85); + } +} + + +void +rgb_to_hsv (DATA8 *red, DATA8 *green, DATA8 *blue) +{ + int r, g, b; + double h, s, v; + int min, max; + int delta; + + h = 0.0; + + r = *red; + g = *green; + b = *blue; + + if (r > g) + { + max = MAX (r, b); + min = MIN (g, b); + } + else + { + max = MAX (g, b); + min = MIN (r, b); + } + + v = max; + + if (max != 0) + s = ((max - min) * 255) / (double) max; + else + s = 0; + + if (s == 0) + h = 0; + else + { + delta = max - min; + if (r == max) + h = (g - b) / (double) delta; + else if (g == max) + h = 2 + (b - r) / (double) delta; + else if (b == max) + h = 4 + (r - g) / (double) delta; + h *= 42.5; + + if (h < 0) + h += 255; + if (h > 255) + h -= 255; + } + + *red = h; + *green = s; + *blue = v; +} + +void +hsv_to_rgb (DATA8 *hue, DATA8 *saturation, DATA8 *value) +{ + double h, s, v; + double f, p, q, t; + + if (*saturation == 0) + { + *hue = *value; + *saturation = *value; + *value = *value; + } + else + { + h = *hue * 6.0 / 255.0; + s = *saturation / 255.0; + v = *value / 255.0; + + f = h - (int) h; + p = v * (1.0 - s); + q = v * (1.0 - (s * f)); + t = v * (1.0 - (s * (1.0 - f))); + + switch ((int) h) + { + case 0: + *hue = v * 255; + *saturation = t * 255; + *value = p * 255; + break; + + case 1: + *hue = q * 255; + *saturation = v * 255; + *value = p * 255; + break; + + case 2: + *hue = p * 255; + *saturation = v * 255; + *value = t * 255; + break; + + case 3: + *hue = p * 255; + *saturation = q * 255; + *value = v * 255; + break; + + case 4: + *hue = t * 255; + *saturation = p * 255; + *value = v * 255; + break; + + case 5: + *hue = v * 255; + *saturation = p * 255; + *value = q * 255; + break; + } + } +} + +/* translate negative destinations */ +void _clip(int * src_tl_x, int * src_tl_y, + int * src_br_x, int * src_br_y, + int * dest_x, int * dest_y, + int dest_w, int dest_h) +{ + if (*dest_x + *src_br_x >= dest_w) + { *src_br_x -= (*dest_x + *src_br_x) - dest_w; } + + if (*dest_y + *src_br_y >= dest_h) + { *src_br_y -= (*dest_y + *src_br_y) - dest_h; } + + if (*dest_x < 0) + { + *src_tl_x = -(*dest_x); + *dest_x = 0; + } + if (*dest_y < 0) + { + *src_tl_y = -(*dest_y); + *dest_y = 0; + } +} + +// FIXME: make sure layer alpha is used/applied in all cases +void +combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + int b; + unsigned char src_alpha; + unsigned char new_alpha; + float ratio, compl_ratio; + long tmp; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + src_alpha = AS; + + if (src_alpha != 0) + { + if (src_alpha == 255) + new_alpha = src_alpha; + else + new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp); + + b = 3; + if (new_alpha != 0) + { + ratio = (float) src_alpha / new_alpha; + compl_ratio = 1.0 - ratio; + + do + { + b--; + dest[d_idx + b] = + (unsigned char) (src[s_idx + b] * ratio + dest[d_idx + b] * compl_ratio + EPS); + } + while (b); + } + + AD = new_alpha; + } + } +} + + +void +combine_pixels_add (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + int tmp, tmp2; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + tmp2 = INT_MULT(AS, RS, tmp); + tmp = RD + tmp2; + RD = (tmp > 255 ? 255 : tmp); + + tmp2 = INT_MULT(AS, GS, tmp); + tmp = GD + tmp2; + GD = (tmp > 255 ? 255 : tmp); + + tmp2 = INT_MULT(AS, BS, tmp); + tmp = BD + tmp2; + BD = (tmp > 255 ? 255 : tmp); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_sub (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + int tmp, tmp2; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + tmp2 = INT_MULT(AS, RS, tmp); + tmp = RD - tmp2; + RD = (tmp < 0 ? 0 : tmp); + + tmp2 = INT_MULT(AS, GS, tmp); + tmp = GD - tmp2; + GD = (tmp < 0 ? 0 : tmp); + + tmp2 = INT_MULT(AS, BS, tmp); + tmp = BD - tmp2; + BD = (tmp < 0 ? 0 : tmp); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_diff (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + int tmp, tmp2; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + tmp2 = INT_MULT(AS, RS, tmp); + tmp = RD - tmp2; + RD = (tmp < 0 ? -tmp : tmp); + + tmp2 = INT_MULT(AS, GS, tmp); + tmp = GD - tmp2; + GD = (tmp < 0 ? -tmp : tmp); + + tmp2 = INT_MULT(AS, BS, tmp); + tmp = BD - tmp2; + BD = (tmp < 0 ? -tmp : tmp); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_darken (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + RD = MIN(RD, RS); + GD = MIN(GD, GS); + BD = MIN(BD, BS); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_lighten (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + RD = MAX(RD, RS); + GD = MAX(GD, GS); + BD = MAX(BD, BS); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_mult (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + int tmp, tmp2, tmp3; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + tmp2 = INT_MULT(RS, AS, tmp); + tmp2 = INT_MULT(RD, tmp2, tmp); + tmp3 = INT_MULT(RD, (255 - AS), tmp); + RD = (tmp2 + tmp3); + + tmp2 = INT_MULT(GS, AS, tmp); + tmp2 = INT_MULT(GD, tmp2, tmp); + tmp3 = INT_MULT(GD, (255 - AS), tmp); + GD = (tmp2 + tmp3); + + tmp2 = INT_MULT(BS, AS, tmp); + tmp2 = INT_MULT(BD, tmp2, tmp); + tmp3 = INT_MULT(BD, (255 - AS), tmp); + BD = (tmp2 + tmp3); + +// AS = MIN(AS, AD); + } + +// combine_pixels_normal(src, src_w, src_h, dest, dest_w, dest_h, dest_x, dest_y); +} + + +void +combine_pixels_div (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + RS = MIN(255, ((float)RD / (RS + 1)) * 256); + GS = MIN(255, ((float)GD / (GS + 1)) * 256); + BS = MIN(255, ((float)BD / (BS + 1)) * 256); + +// AS = MIN(AD, AS); + } + + combine_pixels_normal(src, src_w, src_h, dest, dest_w, dest_h, dest_x, dest_y); +} + + +void +combine_pixels_screen (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + RD = 255 - (((255 - RD) * (255 - RS)) >> 8); + GD = 255 - (((255 - GD) * (255 - GS)) >> 8); + BD = 255 - (((255 - BD) * (255 - BS)) >> 8); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_overlay (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + int tmp_screen, tmp_mult; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + tmp_screen = 255 - (((255 - RD) * (255 - RS)) >> 8); + tmp_mult = (RD * RS) >> 8; + RD = (RD * tmp_screen + (255 - RD) * tmp_mult) >> 8; + + tmp_screen = 255 - (((255 - GD) * (255 - GS)) >> 8); + tmp_mult = (GD * GS) >> 8; + GD = (GD * tmp_screen + (255 - GD) * tmp_mult) >> 8; + + tmp_screen = 255 - (((255 - BD) * (255 - BS)) >> 8); + tmp_mult = (BD * BS) >> 8; + BD = (BD * tmp_screen + (255 - BD) * tmp_mult) >> 8; + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_hsv (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y, int mode) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + rgb_to_hsv(&RS, &GS, &BS); + rgb_to_hsv(&RD, &GD, &BD); + + switch (mode) + { + case 0: /* hue mode */ + RD = RS; + break; + case 1: /* saturation mode */ + GD = GS; + break; + case 2: /* value mode */ + BD = BS; + break; + default: + break; + } + + hsv_to_rgb(&RD, &GD, &BD); +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_hue (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + combine_pixels_hsv(src, src_w, src_h, dest, dest_w, dest_h, dest_x, dest_y, 0); +} + + +void +combine_pixels_sat (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + combine_pixels_hsv(src, src_w, src_h, dest, dest_w, dest_h, dest_x, dest_y, 1); +} + + +void +combine_pixels_val (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + combine_pixels_hsv(src, src_w, src_h, dest, dest_w, dest_h, dest_x, dest_y, 2); +} + + +void +combine_pixels_col (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + rgb_to_hls(&RS, &GS, &BS); + rgb_to_hls(&RD, &GD, &BD); + RD = RS; + BD = BS; + hls_to_rgb(&RD, &GD, &BD); + +// AD = MIN(AD, AS); + } +} + + +void +combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y) +{ + int x, y, s_idx, d_idx; + int src_tl_x = 0, src_tl_y = 0; + int src_br_x = src_w, src_br_y = src_h; + + srand(12345); + + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); + + for (y = src_tl_y; y < src_br_y; y++) + for (x = src_tl_x; x < src_br_x; x++) + { + d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); + s_idx = LINEAR(x, y, src_w); + + if ((rand() % 255) < AS) + { + int b; + unsigned char src_alpha; + unsigned char new_alpha; + float ratio, compl_ratio; + long tmp; + + src_alpha = AS; + + if (src_alpha != 0) + { + if (src_alpha == 255) + new_alpha = src_alpha; + else + new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp); + + b = 3; + if (new_alpha != 0) + { + ratio = (float) src_alpha / new_alpha; + compl_ratio = 1.0 - ratio; + + do + { + b--; + dest[d_idx + b] = + (unsigned char) (src[s_idx + b] * ratio + dest[d_idx + b] * compl_ratio + EPS); + } + while (b); + } + + AD = new_alpha; + } + } + } +} From 8dd4da68e5302e282541f16bff2e8326e2a8c6cb Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 26 Apr 2011 07:46:01 +0000 Subject: [PATCH 002/347] some readme fun SVN revision: 58922 --- legacy/evas_generic_loaders/README | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 11212728f0..d0ccdea0b6 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,2 +1,27 @@ Additional "generic" loaders for Evas that are stand-alone executables -evas may run from its generic loader module +evas may run from its generic loader module. + +Generic loaders currently provided: + + XCF (.xcf .xcf.gz) + +Wanted: + + RAW + (libopenraw1 ??) + PDF + (use -key option to specific what page to get and load options for size + and use poppler and/or mupdf - look at epdf) + PS + (use -key option to specific what page to get and load options for size + and use ghostscript (libgs) to render etc.) + +Possible fun ones: + + MPG/AVI/OGV/MOV/MKV/WMV etc. + (use gstreamer and/or libxine or libvlc and snap one frame from the + middle somewhere) + PPT/PPTX + (beats me how u can render a page from these without a whole + office impl - but worth a try? libopenoffice/libllibreoffice if + it ever happens?) From 289ba689f99450b005cb94dd6fa62a930b293551 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 26 Apr 2011 09:41:27 +0000 Subject: [PATCH 003/347] make xcf loader support 2 stage. also document it a bit more. SVN revision: 58928 --- .../evas_generic_loaders/src/bin/xcf/common.h | 2 +- .../evas_generic_loaders/src/bin/xcf/main.c | 90 +++++++++++++------ 2 files changed, 66 insertions(+), 26 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/common.h b/legacy/evas_generic_loaders/src/bin/xcf/common.h index a94afa2767..a6de7444c4 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/common.h +++ b/legacy/evas_generic_loaders/src/bin/xcf/common.h @@ -38,7 +38,7 @@ #endif -/* #define XCF_DBG */ +//#define XCF_DBG #ifdef XCF_DBG #define D(fmt, args...) fprintf(stderr, fmt, ## args) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 30eb708321..6c4e6550e7 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -551,22 +551,8 @@ xcf_load_image(void) Layer *layer; DATA32 saved_pos; DATA32 offset; - int width; - int height; - int image_type; int num_successful_elements = 0; - /* read in the image width, height and type */ - image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&image_type, 1); - - image->width = width; - image->height = height; - image->base_type = image_type; - - D("Loading %ix%i image.\n", width, height); - /* read the image properties */ if (!xcf_load_image_props()) goto hard_error; @@ -1495,6 +1481,9 @@ xcf_file_init(char *filename) { char success = 1; char id[14]; + int width; + int height; + int image_type; image->single_layer_index = -1; image->fd = open(filename, O_RDONLY); @@ -1532,6 +1521,20 @@ xcf_file_init(char *filename) gzclose(image->fp); close(image->fd); } + + if (success) + { + image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->fp, (DATA32 *)&image_type, 1); + + image->width = width; + image->height = height; + image->base_type = image_type; + + D("Loading %ix%i image.\n", width, height); + } + return success; } @@ -1574,27 +1577,64 @@ int main(int argc, char **argv) { char *file; - int w, h, dsize; + int w, h, i; + int head_only = 0; - // grossly inefficient, multiple copies, but making it "work" for now if (argc < 2) return -1; + // file is ALWAYS first arg, other options come after file = argv[1]; - // FIXME: should alloc rgba data via shm_open + for (i = 2; i < argc; i++) + { + if (!strcmp(argv[i], "-head")) + // asked to only load header, not body/data + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { // not used by xcf loader + i++; + // const char *key = argv[i]; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { // not used by xcf loader + i++; + // int scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { // not used by xcf loader + i++; + // double dpi = ((double)atoi(argv[i])) / 1000.0; + } + else if (!strcmp(argv[i], "-opt-size")) + { // not used by xcf loader + i++; + // int size_w = atoi(argv[i]); + i++; + // int size_h = atoi(argv[i]); + } + } + D("xcf_file_init\n"); if (!xcf_file_init(file)) return -1; - xcf_load_image(); - premul_image(); + D("size %i %i\n", image->width, image->height); + if (!head_only) + { + xcf_load_image(); + premul_image(); + } w = image->width; h = image->height; - dsize = w * h * sizeof(DATA32); printf("size %i %i\n", w, h); printf("alpha 1\n"); - if (shm_fd >= 0) printf("shmfile %s\n", shmfile); - else + if (!head_only) { - printf("data\n"); - fwrite(image->data, dsize, 1, stdout); + if (shm_fd >= 0) printf("shmfile %s\n", shmfile); + else + { + printf("data\n"); + fwrite(image->data, w * h * sizeof(DATA32), 1, stdout); + } + shm_free(); } - shm_free(); + else + printf("done"); xcf_cleanup(); return 0; } From d8413f362644f652f4cfd389bfa785830e10f1e6 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 26 Apr 2011 09:42:25 +0000 Subject: [PATCH 004/347] comments. SVN revision: 58929 --- legacy/evas_generic_loaders/src/bin/xcf/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 6c4e6550e7..71260697b6 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -1628,6 +1628,8 @@ main(int argc, char **argv) if (shm_fd >= 0) printf("shmfile %s\n", shmfile); else { + // could also to "tmpfile %s\n" like shmfile but just + // a mmaped tmp file on the system printf("data\n"); fwrite(image->data, w * h * sizeof(DATA32), 1, stdout); } From 359af0d7289b4451690daeb3c56dc8568d9b673e Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sat, 30 Apr 2011 15:20:52 +0000 Subject: [PATCH 005/347] whitespaces-- SVN revision: 59055 --- .../evas_generic_loaders/src/bin/xcf/main.c | 248 +++++++++--------- .../src/bin/xcf/pixelfuncs.c | 118 ++++----- 2 files changed, 183 insertions(+), 183 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 71260697b6..1c649ba5a6 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -1,5 +1,5 @@ /* - + -----------------------------[ XCF Loader ]----------------------------- This program is free software; you can redistribute it and/or modify @@ -37,7 +37,7 @@ actual DATA8* data is contained in a "level" which is contained in a "hierarchy". I've not really understood the purpose of the hierarchy, as it seems to always contain only one level anyway. - + Layer masks are stored as channels (basically grayscale layers with a single color definition. For the purpose of this loader I replaced the concept of a channel with a layer, since it doesn't really matter. @@ -102,7 +102,7 @@ typedef enum } CompressionType; /* Layer modes (*SIGH*) */ -typedef enum +typedef enum { NORMAL_MODE, DISSOLVE_MODE, @@ -150,11 +150,11 @@ typedef enum /* Ok, this is what's left of Gimp's layer abstraction. I kicked out all the stuff that's unnecessary and added the necessary stuff from the Gimp drawable superclass. This one also serves as a - Channel, e.g. for use as a layer mask. + Channel, e.g. for use as a layer mask. --cK. */ struct _Layer -{ +{ int visible; /* controls visibility */ int width, height; /* size of drawable */ int bpp; /* depth */ @@ -220,7 +220,7 @@ struct _GimpImage int fd; gzFile fp; char* filename; - int cp; /* file stream pointer */ + int cp; /* file stream pointer */ int compression; /* file compression mode */ int file_version; @@ -312,12 +312,12 @@ shm_alloc(int dsize) srand(time(NULL)); do { - snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", + snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", (int)getpid(), (int)rand()); shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); } while (shm_fd < 0); - + if (ftruncate(shm_fd, dsize) < 0) { close(shm_fd); @@ -381,7 +381,7 @@ xcf_read_int32(gzFile *fp, int count) { int total; - + total = count; if (count > 0) { @@ -402,7 +402,7 @@ xcf_read_int8(gzFile *fp, { int total; int bytes; - + total = count; while (count > 0) { @@ -423,7 +423,7 @@ xcf_read_string(gzFile *fp, DATA32 tmp; int total; int i; - + total = 0; for (i = 0; i < count; i++) { @@ -455,7 +455,7 @@ xcf_load_image_props(void) { PropType prop_type; DATA32 prop_size; - + while (1) { if (!xcf_load_prop (&prop_type, &prop_size)) return 0; @@ -468,7 +468,7 @@ xcf_load_image_props(void) } case PROP_COLORMAP: { - if (image->file_version == 0) + if (image->file_version == 0) { int i; fprintf (stderr, @@ -479,14 +479,14 @@ xcf_load_image_props(void) image->cmap = malloc(sizeof(DATA8) * image->num_cols * 3); if (!image->cmap) return 0; xcf_seek_pos (image->cp + image->num_cols); - for (i = 0; i < image->num_cols; i++) + for (i = 0; i < image->num_cols; i++) { image->cmap[(i * 3) + 0] = i; image->cmap[(i * 3) + 1] = i; image->cmap[(i * 3) + 2] = i; } } - else + else { D("Loading colormap.\n"); image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->num_cols, 1); @@ -499,9 +499,9 @@ xcf_load_image_props(void) case PROP_COMPRESSION: { char compression; - + image->cp += xcf_read_int8(image->fp, (DATA8 *)&compression, 1); - + if ((compression != COMPRESS_NONE) && (compression != COMPRESS_RLE) && (compression != COMPRESS_ZLIB) && @@ -510,9 +510,9 @@ xcf_load_image_props(void) fprintf (stderr, "unknown xcf compression type: %d\n", (int) compression); return 0; } - + D("Image compression type: %i\n", compression); - + image->compression = compression; } break; @@ -528,9 +528,9 @@ xcf_load_image_props(void) { DATA8 buf[16]; int amount; - + D("Skipping unexpected/unknown image property: %d\n", prop_type); - + while (prop_size > 0) { amount = (16 < prop_size ? 16 : prop_size); @@ -552,10 +552,10 @@ xcf_load_image(void) DATA32 saved_pos; DATA32 offset; int num_successful_elements = 0; - + /* read the image properties */ if (!xcf_load_image_props()) goto hard_error; - + while (1) { /* read in the offset of the next layer */ @@ -587,7 +587,7 @@ error: if (num_successful_elements == 0) goto hard_error; fprintf(stderr, "XCF: This file is corrupt! I have loaded as much\nof it as I can, but it is incomplete.\n"); return; -hard_error: +hard_error: fprintf(stderr, "XCF: This file is corrupt! I could not even\nsalvage any partial image data from it.\n"); return; } @@ -597,7 +597,7 @@ xcf_load_layer_props(Layer *layer) { PropType prop_type; DATA32 prop_size; - + while (1) { if (!xcf_load_prop(&prop_type, &prop_size)) return 0; @@ -629,7 +629,7 @@ xcf_load_layer_props(Layer *layer) case PROP_MODE: image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->mode, 1); break; - + /* I threw out all of the following: --cK */ case PROP_LINKED: case PROP_ACTIVE_LAYER: @@ -642,7 +642,7 @@ xcf_load_layer_props(Layer *layer) { DATA8 buf[16]; int amount; - + D("Skipping unexpected/unknown/unneeded channel property: %d\n", prop_type); while (prop_size > 0) { @@ -670,7 +670,7 @@ xcf_load_layer(void) int height; int type; char *name; - + D("Loading one layer ...\n"); /* read in the layer width, height and type */ image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); @@ -686,16 +686,16 @@ xcf_load_layer(void) /* read in the layer properties */ if (!xcf_load_layer_props(layer)) goto error; - + D("Loading opacity: %i \n", layer->opacity); if (!layer->visible) return layer; - + /* read the hierarchy and layer mask offsets */ image->cp += xcf_read_int32(image->fp, &hierarchy_offset, 1); image->cp += xcf_read_int32(image->fp, &layer_mask_offset, 1); /* read in the hierarchy */ xcf_seek_pos(hierarchy_offset); - if (!xcf_load_hierarchy(&(layer->tiles), &(layer->num_rows), + if (!xcf_load_hierarchy(&(layer->tiles), &(layer->num_rows), &(layer->num_cols), &(layer->bpp))) goto error; @@ -704,10 +704,10 @@ xcf_load_layer(void) { D("Loading layer mask.\n"); xcf_seek_pos(layer_mask_offset); - + layer_mask = xcf_load_channel(); if (!layer_mask) goto error; - + /* set the offsets of the layer_mask */ layer_mask->offset_x = layer->offset_x; layer_mask->offset_y = layer->offset_y; @@ -721,9 +721,9 @@ xcf_load_layer(void) layer->tiles = NULL; set_layer_opacity(layer); if (layer->mask) apply_layer_mask(layer); - + return layer; - + error: free_layer(layer); return NULL; @@ -740,15 +740,15 @@ read_tiles_into_data(Tile *tiles, int num_cols, int width, DATA8 *ptr2; Tile *t; int warned = 0; - + if (tiles) { if (*data_p) FREE(*data_p); - + /* Always allocate the data as 4 bytes per pixel */ data = (*data_p) = malloc(sizeof(DATA32) * width * height); if (!data) return; - + ptr = data; for (y = 0; y < height; y++) { @@ -758,9 +758,9 @@ read_tiles_into_data(Tile *tiles, int num_cols, int width, tile_y = y / TILE_HEIGHT; offset_x = x % TILE_WIDTH; offset_y = y % TILE_HEIGHT; - + t = &tiles[(tile_y * num_cols) + tile_x]; - ptr2 = &(t->data[(offset_y * t->ewidth * bpp) + + ptr2 = &(t->data[(offset_y * t->ewidth * bpp) + (offset_x * bpp)]); switch (bpp) { @@ -844,16 +844,16 @@ xcf_load_channel(void) int width; int height; char *name; - + D("Loading channel ...\n"); /* read in the layer width, height and name */ image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); image->cp += xcf_read_string(image->fp, &name, 1); - + /* Yeah, still ugly :) */ FREE(name); - + /* create a new channel */ layer = new_layer(width, height, GRAY, 255, NORMAL_MODE); if (!layer) return NULL; @@ -869,10 +869,10 @@ xcf_load_channel(void) layer->height, layer->bpp, &(layer->data), 0); free_tiles(layer->tiles, layer->num_rows * layer->num_cols); layer->tiles = NULL; - + D("Channel loaded successfully.\n"); return layer; - + error: free_layer(layer); return NULL; @@ -883,11 +883,11 @@ xcf_load_channel_props(Layer *layer) { PropType prop_type; DATA32 prop_size; - + while (1) { if (!xcf_load_prop(&prop_type, &prop_size)) return 0; - + switch (prop_type) { case PROP_END: @@ -911,9 +911,9 @@ xcf_load_channel_props(Layer *layer) { DATA8 buf[16]; int amount; - + D("Skipping unexpected/unknown/unneeded channel property: %d\n", prop_type); - + while (prop_size > 0) { amount = (16 < prop_size ? 16 : prop_size); @@ -935,16 +935,16 @@ xcf_load_hierarchy(Tile **tiles, int *num_rows, int *num_cols, int *bpp) DATA32 junk; int width; int height; - + image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); image->cp += xcf_read_int32(image->fp, (DATA32 *)bpp, 1); image->cp += xcf_read_int32(image->fp, &offset, 1); /* top level */ - + D("Loading hierarchy: width %i, height %i, bpp %i\n", width, height, *bpp); - + /* discard offsets for layers below first, if any. */ - do + do { image->cp += xcf_read_int32(image->fp, &junk, 1); } @@ -965,7 +965,7 @@ xcf_load_hierarchy(Tile **tiles, int *num_rows, int *num_cols, int *bpp) } static char -xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, +xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, int bpp, int *num_rows, int *num_cols) { DATA32 saved_pos; @@ -977,49 +977,49 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, int fail; Tile *tiles; Tile *current_tile; - + image->cp += xcf_read_int32(image->fp, (DATA32*) &width, 1); image->cp += xcf_read_int32(image->fp, (DATA32*) &height, 1); - + if ((width != hierarchy_width) || (height != hierarchy_height)) return 0; - + D("Loading level of size %ix%i.\n", width, height); (*tiles_p) = allocate_tiles(width, height, bpp, num_rows, num_cols); tiles = (*tiles_p); - + image->cp += xcf_read_int32(image->fp, &offset, 1); if (offset == 0) return 1; - + ntiles = (*num_rows) * (*num_cols); for (i = 0; i < ntiles; i++) { current_tile = &(tiles[i]); fail = 0; - + if (offset == 0) { D("Not enough tiles found in level\n"); return 0; } - + /* save the current position as it is where the * next tile offset is stored. */ saved_pos = image->cp; - + /* read in the offset of the next tile so we can calculate the amount of data needed for this tile*/ image->cp += xcf_read_int32(image->fp, &offset2, 1); - + /* if the offset is 0 then we need to read in the maximum possible allowing for negative compression */ if (offset2 == 0) offset2 = offset + (TILE_WIDTH * TILE_WIDTH * 4 * 1.5); /* 1.5 is probably more than we need to allow */ - + /* seek to the tile offset */ xcf_seek_pos(offset); - + /* read in the current_tile */ switch (image->compression) { @@ -1038,8 +1038,8 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, fail = 1; break; } - - if (fail) + + if (fail) { D("Couldn't load tiles.\n"); free_tiles(tiles, (*num_rows) * (*num_cols)); @@ -1052,13 +1052,13 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, /* read in the offset of the next tile */ image->cp += xcf_read_int32(image->fp, &offset, 1); } - + if (offset != 0) { D("encountered garbage after reading level: %d\n", offset); return 0; } - + D("Loaded level successfully.\n"); return 1; } @@ -1066,7 +1066,7 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, static char xcf_load_tile(Tile *tile) { - image->cp += xcf_read_int8(image->fp, tile->data, + image->cp += xcf_read_int8(image->fp, tile->data, tile->ewidth * tile->eheight * tile->bpp); return 1; } @@ -1084,34 +1084,34 @@ xcf_load_tile_rle(Tile *tile, int i, j; int nmemb_read_successfully; DATA8 *xcfdata, *xcfodata, *xcfdatalimit; - + data = tile->data; bpp = tile->bpp; - + /*printf ("Reading encrypted tile %ix%ix%i, data_length %i\n", tile->ewidth, tile->eheight, tile->bpp, data_length);*/ - + xcfdata = xcfodata = malloc(sizeof(DATA8) * data_length); if (!xcfdata) return 0; - + /* we have to use fread instead of xcf_read_* because we may be reading past the end of the file here */ nmemb_read_successfully = gzread(image->fp, xcfdata, data_length); image->cp += nmemb_read_successfully; - + xcfdatalimit = &xcfodata[nmemb_read_successfully - 1]; - + for (i = 0; i < bpp; i++) { data = (tile->data) + i; size = tile->ewidth * tile->eheight; count = 0; - + while (size > 0) { if (xcfdata > xcfdatalimit) goto bogus_rle; - + val = *xcfdata++; - + length = val; if (length >= 128) { @@ -1119,17 +1119,17 @@ xcf_load_tile_rle(Tile *tile, if (length == 128) { if (xcfdata >= xcfdatalimit) goto bogus_rle; - + length = (*xcfdata << 8) + xcfdata[1]; xcfdata += 2; } - + count += length; size -= length; - + if (size < 0) goto bogus_rle; if (&xcfdata[length-1] > xcfdatalimit) goto bogus_rle; - + while (length-- > 0) { *data = *xcfdata++; @@ -1142,19 +1142,19 @@ xcf_load_tile_rle(Tile *tile, if (length == 128) { if (xcfdata >= xcfdatalimit) goto bogus_rle; - + length = (*xcfdata << 8) + xcfdata[1]; xcfdata += 2; } - + count += length; size -= length; - + if (size < 0) goto bogus_rle; if (xcfdata > xcfdatalimit) goto bogus_rle; - + val = *xcfdata++; - + for (j = 0; j < length; j++) { *data = val; @@ -1165,7 +1165,7 @@ xcf_load_tile_rle(Tile *tile, } FREE(xcfodata); return 1; - + bogus_rle: fprintf(stderr, "WHOOOOOP -- bogus rle? Highly unlikely, blame cK for this one :) \n"); if (xcfodata) FREE(xcfodata); @@ -1176,14 +1176,14 @@ static Layer * new_layer(int width, int height, GimpImageType type, int opacity, LayerModeEffects mode) { Layer *layer; - + layer = calloc(1, sizeof(Layer)); if (!layer) { D("Couldn't allocate layer.\n"); return NULL; } - + layer->width = width; layer->height = height; layer->type = type; @@ -1195,7 +1195,7 @@ new_layer(int width, int height, GimpImageType type, int opacity, LayerModeEffec return layer; } -static void +static void free_layer(Layer *layer) { if (layer) @@ -1208,26 +1208,26 @@ free_layer(Layer *layer) } } -static Tile * +static Tile * allocate_tiles(int width, int height, int bpp, int* num_rows, int* num_cols) { Tile* tiles; int i, j, k, right_tile, bottom_tile; int tile_width, tile_height; - + (*num_rows) = (height + TILE_HEIGHT - 1) / TILE_HEIGHT; (*num_cols) = (width + TILE_WIDTH - 1) / TILE_WIDTH; - + tiles = malloc(sizeof(Tile) * (*num_rows) * (*num_cols)); if (!tiles) { D("Couldn't allocate tiles.\n"); return NULL; } - + right_tile = width - (((*num_cols) - 1) * TILE_WIDTH); bottom_tile = height - (((*num_rows) - 1) * TILE_HEIGHT); - + for (i = 0, k = 0; i < (*num_rows); i++) { for (j = 0; j < (*num_cols); j++, k++) @@ -1257,11 +1257,11 @@ init_tile(Tile *tile, int width, int height, int bpp) } } -static void +static void free_tiles(Tile *tiles, int num_tiles) { int i; - + for (i = 0; i < num_tiles; i++) { if (tiles[i].data) FREE(tiles[i].data); @@ -1269,7 +1269,7 @@ free_tiles(Tile *tiles, int num_tiles) FREE(tiles); } -static void +static void add_layer_to_image(Layer *layer) { if (layer) @@ -1294,7 +1294,7 @@ set_layer_opacity(Layer *layer) { int i; DATA8* ptr; - + if (layer) { if (layer->opacity != 255) @@ -1313,7 +1313,7 @@ apply_layer_mask(Layer *layer) DATA8* ptr1; DATA8* ptr2; int i, tmp; - + D("Applying layer mask.\n"); if (layer) { @@ -1339,21 +1339,21 @@ flatten_image(void) Layer* l = image->last_layer; Layer* lp; int layer_index; - + shm_alloc(image->width * image->height * sizeof(DATA32)); if (!shm_addr) return; image->data = shm_addr; memset(image->data, 0, image->width * image->height * sizeof(DATA32)); - + layer_index = 0; - + while (l) - { + { /* Ok, paste each layer on top of the image, using the mode's merging type. We're moving upward through the layer stack. --cK. */ - if ((image->single_layer_index < 0) || + if ((image->single_layer_index < 0) || (layer_index == image->single_layer_index)) { // FIXME: not all modes are implemented right @@ -1450,27 +1450,27 @@ flatten_image(void) case ERASE_MODE: case ANTI_ERASE_MODE: D("EEEEEK -- this mode shouldn't be here\n"); - + case NORMAL_MODE: D("NORMAL\n"); combine_pixels_normal(l->data, l->width, l->height, image->data, image->width, image->height, l->offset_x, l->offset_y); break; - + default: D("Unknown layer mode: %i. Skipping.\n", l->mode); } } - + lp = l->prev; /* free the layer now, since it's not needed anymore */ free_layer(l); - + l = lp; layer_index++; } - + /* We've used up all the layers now, so set them to NULL in the image: */ image->layers = NULL; image->last_layer = NULL; @@ -1484,22 +1484,22 @@ xcf_file_init(char *filename) int width; int height; int image_type; - + image->single_layer_index = -1; image->fd = open(filename, O_RDONLY); if (image->fd < 0) return 0; image->fp = gzdopen(image->fd, "r"); if (!image->fp) return 0; - + image->filename = filename; image->layers = NULL; image->last_layer = NULL; image->cmap = NULL; image->num_cols = 0; image->data = NULL; - + image->cp = 0; - + image->cp += xcf_read_int8(image->fp, (DATA8 *)id, 14); if (strncmp(id, "gimp xcf ", 9)) { @@ -1510,8 +1510,8 @@ xcf_file_init(char *filename) else if (!strcmp(id + 9, "file")) { image->file_version = 0; - } - else if (id[9] == 'v') + } + else if (id[9] == 'v') { image->file_version = atoi(id + 10); } @@ -1527,14 +1527,14 @@ xcf_file_init(char *filename) image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); image->cp += xcf_read_int32(image->fp, (DATA32 *)&image_type, 1); - + image->width = width; image->height = height; image->base_type = image_type; - + D("Loading %ix%i image.\n", width, height); } - + return success; } @@ -1542,7 +1542,7 @@ static void xcf_cleanup(void) { Layer *l, *lp; - + if (image->fp) gzclose(image->fp); if (image->fd >= 0) close(image->fd); for (l = image->last_layer; l; l = lp) @@ -1557,12 +1557,12 @@ static void premul_image(void) { DATA32 *p, *end; - + end = (DATA32 *)image->data + (image->width * image->height); for (p = (DATA32 *)image->data; p < end; p++) { unsigned int r, g, b, a; - + a = A_VAL(p); r = (R_VAL(p) * a) / 255; R_VAL(p) = r; diff --git a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c index 31d25ce051..7bb93007f4 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c @@ -1,5 +1,5 @@ /* - + -----------------------------[ XCF Loader ]----------------------------- This program is free software; you can redistribute it and/or modify @@ -100,7 +100,7 @@ DATA8 gimp_hls_value (double n1, double n2, double hue) { double value; - + if (hue > 255) hue -= 255; else if (hue < 0) @@ -278,21 +278,21 @@ void _clip(int * src_tl_x, int * src_tl_y, int * dest_x, int * dest_y, int dest_w, int dest_h) { - if (*dest_x + *src_br_x >= dest_w) - { *src_br_x -= (*dest_x + *src_br_x) - dest_w; } + if (*dest_x + *src_br_x >= dest_w) + { *src_br_x -= (*dest_x + *src_br_x) - dest_w; } - if (*dest_y + *src_br_y >= dest_h) - { *src_br_y -= (*dest_y + *src_br_y) - dest_h; } + if (*dest_y + *src_br_y >= dest_h) + { *src_br_y -= (*dest_y + *src_br_y) - dest_h; } - if (*dest_x < 0) - { - *src_tl_x = -(*dest_x); - *dest_x = 0; - } - if (*dest_y < 0) - { - *src_tl_y = -(*dest_y); - *dest_y = 0; + if (*dest_x < 0) + { + *src_tl_x = -(*dest_x); + *dest_x = 0; + } + if (*dest_y < 0) + { + *src_tl_y = -(*dest_y); + *dest_y = 0; } } @@ -309,7 +309,7 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w unsigned char new_alpha; float ratio, compl_ratio; long tmp; - + _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); for (y = src_tl_y; y < src_br_y; y++) @@ -317,9 +317,9 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + src_alpha = AS; - + if (src_alpha != 0) { if (src_alpha == 255) @@ -327,22 +327,22 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w else new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp); - b = 3; - if (new_alpha != 0) - { - ratio = (float) src_alpha / new_alpha; - compl_ratio = 1.0 - ratio; - + b = 3; + if (new_alpha != 0) + { + ratio = (float) src_alpha / new_alpha; + compl_ratio = 1.0 - ratio; + do { - b--; - dest[d_idx + b] = - (unsigned char) (src[s_idx + b] * ratio + dest[d_idx + b] * compl_ratio + EPS); + b--; + dest[d_idx + b] = + (unsigned char) (src[s_idx + b] * ratio + dest[d_idx + b] * compl_ratio + EPS); } - while (b); + while (b); } - AD = new_alpha; + AD = new_alpha; } } } @@ -363,7 +363,7 @@ combine_pixels_add (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, i { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + tmp2 = INT_MULT(AS, RS, tmp); tmp = RD + tmp2; RD = (tmp > 255 ? 255 : tmp); @@ -396,7 +396,7 @@ combine_pixels_sub (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, i { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + tmp2 = INT_MULT(AS, RS, tmp); tmp = RD - tmp2; RD = (tmp < 0 ? 0 : tmp); @@ -429,7 +429,7 @@ combine_pixels_diff (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + tmp2 = INT_MULT(AS, RS, tmp); tmp = RD - tmp2; RD = (tmp < 0 ? -tmp : tmp); @@ -461,7 +461,7 @@ combine_pixels_darken (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + RD = MIN(RD, RS); GD = MIN(GD, GS); BD = MIN(BD, BS); @@ -485,7 +485,7 @@ combine_pixels_lighten (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_ { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + RD = MAX(RD, RS); GD = MAX(GD, GS); BD = MAX(BD, BS); @@ -515,7 +515,7 @@ combine_pixels_mult (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, tmp2 = INT_MULT(RD, tmp2, tmp); tmp3 = INT_MULT(RD, (255 - AS), tmp); RD = (tmp2 + tmp3); - + tmp2 = INT_MULT(GS, AS, tmp); tmp2 = INT_MULT(GD, tmp2, tmp); tmp3 = INT_MULT(GD, (255 - AS), tmp); @@ -547,7 +547,7 @@ combine_pixels_div (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, i { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + RS = MIN(255, ((float)RD / (RS + 1)) * 256); GS = MIN(255, ((float)GD / (GS + 1)) * 256); BS = MIN(255, ((float)BD / (BS + 1)) * 256); @@ -573,7 +573,7 @@ combine_pixels_screen (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + RD = 255 - (((255 - RD) * (255 - RS)) >> 8); GD = 255 - (((255 - GD) * (255 - GS)) >> 8); BD = 255 - (((255 - BD) * (255 - BS)) >> 8); @@ -598,7 +598,7 @@ combine_pixels_overlay (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_ { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + tmp_screen = 255 - (((255 - RD) * (255 - RS)) >> 8); tmp_mult = (RD * RS) >> 8; RD = (RD * tmp_screen + (255 - RD) * tmp_mult) >> 8; @@ -630,7 +630,7 @@ combine_pixels_hsv (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, i { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + rgb_to_hsv(&RS, &GS, &BS); rgb_to_hsv(&RD, &GD, &BD); @@ -648,9 +648,9 @@ combine_pixels_hsv (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, i default: break; } - + hsv_to_rgb(&RD, &GD, &BD); -// AD = MIN(AD, AS); +// AD = MIN(AD, AS); } } @@ -684,19 +684,19 @@ combine_pixels_col (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, i int src_br_x = src_w, src_br_y = src_h; _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); - + for (y = src_tl_y; y < src_br_y; y++) for (x = src_tl_x; x < src_br_x; x++) { d_idx = LINEAR((dest_x + x - src_tl_x), (dest_y + y - src_tl_y), dest_w); s_idx = LINEAR(x, y, src_w); - + rgb_to_hls(&RS, &GS, &BS); rgb_to_hls(&RD, &GD, &BD); RD = RS; BD = BS; hls_to_rgb(&RD, &GD, &BD); - + // AD = MIN(AD, AS); } } @@ -726,32 +726,32 @@ combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, unsigned char new_alpha; float ratio, compl_ratio; long tmp; - + src_alpha = AS; - + if (src_alpha != 0) { if (src_alpha == 255) new_alpha = src_alpha; else new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp); - - b = 3; - if (new_alpha != 0) - { - ratio = (float) src_alpha / new_alpha; - compl_ratio = 1.0 - ratio; - + + b = 3; + if (new_alpha != 0) + { + ratio = (float) src_alpha / new_alpha; + compl_ratio = 1.0 - ratio; + do { - b--; - dest[d_idx + b] = - (unsigned char) (src[s_idx + b] * ratio + dest[d_idx + b] * compl_ratio + EPS); + b--; + dest[d_idx + b] = + (unsigned char) (src[s_idx + b] * ratio + dest[d_idx + b] * compl_ratio + EPS); } - while (b); + while (b); } - - AD = new_alpha; + + AD = new_alpha; } } } From 476c349d861f230f0b68e10c4b4643119e41a848 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 11 May 2011 07:09:12 +0000 Subject: [PATCH 006/347] print dont with a newline. just for easier debugging. SVN revision: 59317 --- legacy/evas_generic_loaders/src/bin/xcf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 1c649ba5a6..e154812ada 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -1636,7 +1636,7 @@ main(int argc, char **argv) shm_free(); } else - printf("done"); + printf("done\n"); xcf_cleanup(); return 0; } From 110a75531d44dae80529a8ec7d563b1930ca8a45 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 12 May 2011 05:44:42 +0000 Subject: [PATCH 007/347] Add PDF loader (with some help from raster) SVN revision: 59338 --- legacy/evas_generic_loaders/TODO | 9 + legacy/evas_generic_loaders/configure.ac | 48 ++- .../evas_generic_loaders/src/bin/Makefile.am | 4 + .../src/bin/pdf/Makefile.am | 19 ++ .../evas_generic_loaders/src/bin/pdf/main.cpp | 304 ++++++++++++++++++ .../evas_generic_loaders/src/bin/xcf/common.h | 4 +- 6 files changed, 377 insertions(+), 11 deletions(-) create mode 100644 legacy/evas_generic_loaders/TODO create mode 100644 legacy/evas_generic_loaders/src/bin/pdf/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/pdf/main.cpp diff --git a/legacy/evas_generic_loaders/TODO b/legacy/evas_generic_loaders/TODO new file mode 100644 index 0000000000..f35cb337be --- /dev/null +++ b/legacy/evas_generic_loaders/TODO @@ -0,0 +1,9 @@ + +Modules to add: +--------------- + + [x] XCF + [x] PDF + [ ] PS + [ ] DVI + [ ] Djvu diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index a056f64f6c..b7db8eaf31 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -28,11 +28,6 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.6 dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_LIBTOOL_WIN32_DLL -define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl -define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl -AC_PROG_LIBTOOL - ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], , [m4_define([v_rev], [0])]) @@ -54,8 +49,10 @@ AC_SUBST(VMAJ) AC_CANONICAL_BUILD AC_CANONICAL_HOST -AC_C_BIGENDIAN + +### Checks for libraries AC_PROG_CC +AC_PROG_CXX PKG_PROG_PKG_CONFIG ### Checks for libraries @@ -63,14 +60,16 @@ PKG_PROG_PKG_CONFIG # Eina library PKG_CHECK_MODULES(EINA, [eina >= 1.0.0]) +PKG_CHECK_MODULES([POPPLER], [poppler >= 0.14], [have_poppler="yes"], [have_poppler="no"]) + +AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) + ### Checks for header files AC_CHECK_HEADER([zlib.h], [dummy="yes"], [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")]) -AC_CHECK_HEADERS(netinet/in.h) - SHM_OPEN_LIBS="" AC_MSG_CHECKING([whether shm_open() is present]) LIBS_save=${LIBS} @@ -102,15 +101,44 @@ AM_PROG_CC_C_O AC_C_CONST AC_C_INLINE AC_PROG_CC_STDC +AC_C_BIGENDIAN AC_C___ATTRIBUTE__ ### Checks for library functions AC_ISC_POSIX -AC_FUNC_ALLOCA -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile src/Makefile src/bin/Makefile src/bin/xcf/Makefile +src/bin/pdf/Makefile ]) + +AC_OUTPUT + +##################################################################### +## Info + +echo +echo +echo +echo "------------------------------------------------------------------------" +echo "$PACKAGE $VERSION" +echo "------------------------------------------------------------------------" +echo +echo +echo "Configuration Options Summary:" +echo +echo "Loaders:" +echo " XCF..................: yes" +echo " PDF..................: ${have_poppler}" +echo +echo "Compilation............: make (or gmake)" +echo " CPPFLAGS.............: $CPPFLAGS" +echo " CFLAGS...............: $CFLAGS" +echo " LDFLAGS..............: $LDFLAGS" +echo +echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')" +echo " prefix...............: $prefix" +echo diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index f64bd1c426..eae5af316a 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -1,3 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = xcf + +if HAVE_PDF +SUBDIRS += pdf +endif diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am new file mode 100644 index 0000000000..3700ceb1d6 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am @@ -0,0 +1,19 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src \ +-I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/pdf \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@POPPLER_CFLAGS@ + +bin_PROGRAMS = evas_image_loader.pdf + +evas_image_loader_pdf_SOURCES = main.cpp +evas_image_loader_pdf_CFLAGS = +evas_image_loader_pdf_LDADD = @POPPLER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ +evas_image_loader_pdf_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp new file mode 100644 index 0000000000..24017bb77d --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -0,0 +1,304 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + + +#define DATA32 unsigned int + +//#define PDF_DBG + +#ifdef PDF_DBG +#define D(fmt, args...) fprintf(stderr, fmt, ## args) +#else +#define D(fmt, args...) +#endif + + +PDFDoc *pdfdoc; +bool locked = false; +SplashOutputDev *output_dev; + +::Page *page; +int width = 0; +int height = 0; +void *data; + +static int shm_fd = -1; +static int shm_size = 0; +static void *shm_addr = NULL; +static char shmfile[1024] = ""; + +static void +shm_alloc(int dsize) +{ +#ifdef HAVE_SHM_OPEN + srand(time(NULL)); + do + { + snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", + (int)getpid(), (int)rand()); + shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + } + while (shm_fd < 0); + + if (ftruncate(shm_fd, dsize) < 0) + { + close(shm_fd); + shm_unlink(shmfile); + shm_fd = -1; + goto failed; + } + shm_addr = mmap(NULL, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0); + if (shm_addr == MAP_FAILED) + { + close(shm_fd); + shm_unlink(shmfile); + shm_fd = -1; + goto failed; + } + shm_size = dsize; + return; +failed: +#endif + shm_addr = malloc(dsize); +} + +static void +shm_free(void) +{ +#ifdef HAVE_SHM_OPEN + if (shm_fd >= 0) + { + munmap(shm_addr, shm_size); + close(shm_fd); + shm_fd = -1; + shm_addr = NULL; + return; + } +#endif + free(shm_addr); + shm_addr = NULL; + shm_fd = -1; +} + +Eina_Bool poppler_init(const char *file, int page_nbr, double dpi, int size_w, int size_h) +{ + Object obj; + SplashColor white; + + if (!file || !*file) + return EINA_FALSE; + + if (page_nbr < 0) + return EINA_FALSE; + + if (!(globalParams = new GlobalParams())) + return EINA_FALSE; + + if (!eina_init()) + goto del_global_param; + + if (globalParams->getAntialias()) + globalParams->setAntialias((char *)"yes"); + if (globalParams->getVectorAntialias()) + globalParams->setVectorAntialias((char *)"yes"); + + pdfdoc = new PDFDoc(new GooString(file), NULL); + if (!pdfdoc) + goto del_global_param; + + if (!pdfdoc->isOk() || (pdfdoc->getErrorCode() == errEncrypted)) + goto del_pdfdoc; + + if (page_nbr >= pdfdoc->getNumPages()) + goto del_pdfdoc; + + /* load the page */ + + page = pdfdoc->getCatalog()->getPage(page_nbr + 1); + if (!page || !page->isOk()) + goto del_pdfdoc; + + width = page->getMediaWidth(); + height = page->getMediaHeight(); + + if ((size_w > 0) || (size_h > 0)) + { + /* FIXME: tell poller to render at the new width and height + unsigned int w2 = width, h2 = height; + if (size_w > 0) + { + w2 = size_w; + h2 = (size_w * h) / w; + if ((size_h > 0) && (h2 > size_h)) + { + unsigned int w3; + h2 = size_h; + w3 = (size_h * w) / h; + if (w3 > w2) + w2 = w3; + } + } + else if (size_h > 0) + { + h2 = size_h; + w2 = (size_h * w) / h; + } + width = w2; + height = h2; + */ + } + else if (dpi > 0.0) + { + /* FIXME: tell poppler to render at this size + width = (width * dpi) / 72.0; + height = (height * dpi) / 72.0; + */ + } + + return EINA_TRUE; + + del_pdfdoc: + delete pdfdoc; + del_global_param: + delete globalParams; + + return EINA_FALSE; +} + +void poppler_shutdown() +{ + delete pdfdoc; + eina_shutdown(); + delete globalParams; +} + +void poppler_load_image(double dpi, int size_w, int size_h) +{ + SplashOutputDev *output_dev; + SplashColor white; + SplashColorPtr color_ptr; + + white[0] = 255; + white[1] = 255; + white[2] = 255; + white[3] = 255; + + output_dev = new SplashOutputDev(splashModeXBGR8, 4, gFalse, white); + if (!output_dev) + return; + + output_dev->startDoc(pdfdoc->getXRef()); + + if (dpi <= 0.0) dpi = 72.0; + + page->display(output_dev, + dpi, dpi, 0, + false, false, false, + pdfdoc->getCatalog()); + color_ptr = output_dev->getBitmap()->getDataPtr(); + + shm_alloc(width * height * sizeof(DATA32)); + if (!shm_addr) + goto del_outpput_dev; + data = shm_addr; + memcpy(data, color_ptr, width * height * sizeof(DATA32)); + + del_outpput_dev: + delete output_dev; +} + +int +main(int argc, char **argv) +{ + char *file; + int i; + int size_w = 0, size_h = 0; + int head_only = 0; + int page = 0; + double dpi = -1.0; + + if (argc < 2) return -1; + // file is ALWAYS first arg, other options come after + file = argv[1]; + for (i = 2; i < argc; i++) + { + if (!strcmp(argv[i], "-head")) + // asked to only load header, not body/data + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { + i++; + page = atoi(argv[i]); + i++; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { // not used by pdf loader + i++; + // int scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { + i++; + dpi = ((double)atoi(argv[i])) / 1000.0; // dpi is an int multiplied by 1000 (so 72dpi is 72000) + i++; + } + else if (!strcmp(argv[i], "-opt-size")) + { // not used by pdf loader + i++; + size_w = atoi(argv[i]); + i++; + size_h = atoi(argv[i]); + } + } + + D("poppler_file_init\n"); + D("dpi....: %f\n", dpi); + D("page...: %d\n", page); + + if (!poppler_init(file, page, dpi, size_w, size_h)) + return -1; + D("poppler_file_init done\n"); + + if (!head_only) + { + poppler_load_image(dpi, size_w, size_h); + } + + D("size...: %ix%i\n", width, height); + D("alpha..: 1\n"); + + printf("size %i %i\n", width, height); + printf("alpha 0\n"); + + if (!head_only) + { + if (shm_fd >= 0) printf("shmfile %s\n", shmfile); + else + { + // could also to "tmpfile %s\n" like shmfile but just + // a mmaped tmp file on the system + printf("data\n"); + fwrite(data, width * height * sizeof(DATA32), 1, stdout); + } + shm_free(); + } + else + printf("done\n"); + + poppler_shutdown(); + + return 0; +} diff --git a/legacy/evas_generic_loaders/src/bin/xcf/common.h b/legacy/evas_generic_loaders/src/bin/xcf/common.h index a6de7444c4..209c3c13e3 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/common.h +++ b/legacy/evas_generic_loaders/src/bin/xcf/common.h @@ -1,7 +1,9 @@ #ifndef __COMMON #define __COMMON 1 -#include "config.h" +#ifdef HAVE_CONFIG_H +# include +#endif #include #include From afce746e0b459965cb0cfecf06626fe596f9a409 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 13 May 2011 07:45:22 +0000 Subject: [PATCH 008/347] fix pdf loader to 1. handle load options for dpi and load size 2. handle pdf crop region properly 3. handle landscape oriented pdf's properly and render right. SVN revision: 59362 --- .../evas_generic_loaders/src/bin/pdf/main.cpp | 117 +++++++++++------- 1 file changed, 70 insertions(+), 47 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 24017bb77d..7cde8bf3a7 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -31,15 +31,18 @@ bool locked = false; SplashOutputDev *output_dev; ::Page *page; -int width = 0; -int height = 0; -void *data; +int width = 0, height = 0; +int crop_width = 0, crop_height = 0; +void *data = NULL; +double dpi = -1.0; static int shm_fd = -1; static int shm_size = 0; static void *shm_addr = NULL; static char shmfile[1024] = ""; +#define DEF_DPI 72.0 + static void shm_alloc(int dsize) { @@ -93,10 +96,12 @@ shm_free(void) shm_fd = -1; } -Eina_Bool poppler_init(const char *file, int page_nbr, double dpi, int size_w, int size_h) +Eina_Bool poppler_init(const char *file, int page_nbr, int size_w, int size_h) { Object obj; SplashColor white; + double w, h, cw, ch; + int rot; if (!file || !*file) return EINA_FALSE; @@ -131,42 +136,49 @@ Eina_Bool poppler_init(const char *file, int page_nbr, double dpi, int size_w, i if (!page || !page->isOk()) goto del_pdfdoc; - width = page->getMediaWidth(); - height = page->getMediaHeight(); - + w = page->getMediaWidth(); + h = page->getMediaHeight(); + cw = page->getCropWidth(); + ch = page->getCropHeight(); + rot = page->getRotate(); + if (cw > w) cw = w; + if (ch > h) ch = h; + if ((rot == 90) || (rot == 270)) + { + double t; + // swap width & height + t = w; w = h; h = t; + // swap crop width & height + t = cw; cw = ch; ch = t; + } + if ((size_w > 0) || (size_h > 0)) { - /* FIXME: tell poller to render at the new width and height - unsigned int w2 = width, h2 = height; - if (size_w > 0) - { - w2 = size_w; - h2 = (size_w * h) / w; - if ((size_h > 0) && (h2 > size_h)) - { - unsigned int w3; - h2 = size_h; - w3 = (size_h * w) / h; - if (w3 > w2) - w2 = w3; - } - } - else if (size_h > 0) + double w2 = cw, h2 = ch; + + w2 = size_w; + h2 = (size_w * ch) / cw; + if (h2 > size_h) { h2 = size_h; - w2 = (size_h * w) / h; + w2 = (size_h * cw) / ch; } - width = w2; - height = h2; - */ + D("XXXXXXXXXXXXXXXXXXXXx %3.3fx%3.3f\n", w2, h2); + if (w2 > h2) dpi = (w2 * DEF_DPI) / cw; + else dpi = (h2 * DEF_DPI) / ch; } - else if (dpi > 0.0) + + if (dpi > 0.0) { - /* FIXME: tell poppler to render at this size - width = (width * dpi) / 72.0; - height = (height * dpi) / 72.0; - */ + cw = (cw * dpi) / DEF_DPI; + ch = (ch * dpi) / DEF_DPI; + w = (w * dpi) / DEF_DPI; + h = (h * dpi) / DEF_DPI; } + width = w; + height = h; + crop_width = cw; + crop_height = ch; return EINA_TRUE; @@ -185,11 +197,13 @@ void poppler_shutdown() delete globalParams; } -void poppler_load_image(double dpi, int size_w, int size_h) +void poppler_load_image(int size_w, int size_h) { SplashOutputDev *output_dev; SplashColor white; SplashColorPtr color_ptr; + DATA32 *src, *dst; + int y; white[0] = 255; white[1] = 255; @@ -202,19 +216,25 @@ void poppler_load_image(double dpi, int size_w, int size_h) output_dev->startDoc(pdfdoc->getXRef()); - if (dpi <= 0.0) dpi = 72.0; + if (dpi <= 0.0) dpi = DEF_DPI; - page->display(output_dev, - dpi, dpi, 0, - false, false, false, - pdfdoc->getCatalog()); + page->displaySlice(output_dev, dpi, dpi, + 0, false, false, + 0, 0, width, height, + false, pdfdoc->getCatalog()); color_ptr = output_dev->getBitmap()->getDataPtr(); - shm_alloc(width * height * sizeof(DATA32)); - if (!shm_addr) - goto del_outpput_dev; + shm_alloc(crop_width * crop_height * sizeof(DATA32)); + if (!shm_addr) goto del_outpput_dev; data = shm_addr; - memcpy(data, color_ptr, width * height * sizeof(DATA32)); + src = (DATA32 *)color_ptr; + dst = (DATA32 *)data; + for (y = 0; y < crop_height; y++) + { + memcpy(dst, src, crop_width * sizeof(DATA32)); + src += width; + dst += crop_width; + } del_outpput_dev: delete output_dev; @@ -228,7 +248,6 @@ main(int argc, char **argv) int size_w = 0, size_h = 0; int head_only = 0; int page = 0; - double dpi = -1.0; if (argc < 2) return -1; // file is ALWAYS first arg, other options come after @@ -263,24 +282,28 @@ main(int argc, char **argv) size_h = atoi(argv[i]); } } + size_w = 400; + size_h = 400; D("poppler_file_init\n"); D("dpi....: %f\n", dpi); D("page...: %d\n", page); - if (!poppler_init(file, page, dpi, size_w, size_h)) + if (!poppler_init(file, page, size_w, size_h)) return -1; D("poppler_file_init done\n"); + D("dpi2...: %f\n", dpi); if (!head_only) { - poppler_load_image(dpi, size_w, size_h); + poppler_load_image(size_w, size_h); } D("size...: %ix%i\n", width, height); + D("crop...: %ix%i\n", crop_width, crop_height); D("alpha..: 1\n"); - printf("size %i %i\n", width, height); + printf("size %i %i\n", crop_width, crop_height); printf("alpha 0\n"); if (!head_only) @@ -291,7 +314,7 @@ main(int argc, char **argv) // could also to "tmpfile %s\n" like shmfile but just // a mmaped tmp file on the system printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); + fwrite(data, crop_width * crop_height * sizeof(DATA32), 1, stdout); } shm_free(); } From 5d86a0e33e8faea00825ae442b56677ffb35196a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 13 May 2011 07:48:44 +0000 Subject: [PATCH 009/347] oops - remove debugging! SVN revision: 59363 --- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 7cde8bf3a7..2dcbe62e2b 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -282,8 +282,6 @@ main(int argc, char **argv) size_h = atoi(argv[i]); } } - size_w = 400; - size_h = 400; D("poppler_file_init\n"); D("dpi....: %f\n", dpi); From 3684e4ca50ec7b283822fc350ce405b9c9d5a80b Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 13 May 2011 08:14:10 +0000 Subject: [PATCH 010/347] we only need 0.12 poppler actually SVN revision: 59364 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index b7db8eaf31..ccf5c01d0f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -60,7 +60,7 @@ PKG_PROG_PKG_CONFIG # Eina library PKG_CHECK_MODULES(EINA, [eina >= 1.0.0]) -PKG_CHECK_MODULES([POPPLER], [poppler >= 0.14], [have_poppler="yes"], [have_poppler="no"]) +PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_poppler="no"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) From fa21e407c4a142ae0caaf064e19b4846aa96de95 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 13 May 2011 09:06:56 +0000 Subject: [PATCH 011/347] make shmfile common code. SVN revision: 59365 --- legacy/evas_generic_loaders/configure.ac | 3 +- .../evas_generic_loaders/src/bin/Makefile.am | 3 +- .../src/bin/common/Makefile.am | 3 + .../src/bin/common/shmfile.c | 82 +++++++++++++++++++ .../src/bin/common/shmfile.h | 20 +++++ .../src/bin/pdf/Makefile.am | 5 +- .../evas_generic_loaders/src/bin/pdf/main.cpp | 59 +------------ .../src/bin/xcf/Makefile.am | 5 +- .../evas_generic_loaders/src/bin/xcf/main.c | 59 +------------ 9 files changed, 119 insertions(+), 120 deletions(-) create mode 100644 legacy/evas_generic_loaders/src/bin/common/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/common/shmfile.c create mode 100644 legacy/evas_generic_loaders/src/bin/common/shmfile.h diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index ccf5c01d0f..da8e13ddf6 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,7 +1,7 @@ y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [0]) -m4_define([v_min], [9]) +m4_define([v_min], [1]) m4_define([v_mic], [999]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) @@ -111,6 +111,7 @@ AC_CONFIG_FILES([ Makefile src/Makefile src/bin/Makefile +src/bin/common/Makefile src/bin/xcf/Makefile src/bin/pdf/Makefile ]) diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index eae5af316a..313e122ad4 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -1,6 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = xcf +SUBDIRS = common \ +xcf if HAVE_PDF SUBDIRS += pdf diff --git a/legacy/evas_generic_loaders/src/bin/common/Makefile.am b/legacy/evas_generic_loaders/src/bin/common/Makefile.am new file mode 100644 index 0000000000..94aa56020e --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/common/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = shmfile.c shmfile.h diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.c b/legacy/evas_generic_loaders/src/bin/common/shmfile.c new file mode 100644 index 0000000000..7af1f75a32 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.c @@ -0,0 +1,82 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int shm_fd = -1; +int shm_size = 0; +void *shm_addr = NULL; +char shmfile[1024] = ""; + +void +shm_alloc(int dsize) +{ +#ifdef HAVE_SHM_OPEN + srand(time(NULL)); + do + { + snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", + (int)getpid(), (int)rand()); + shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + } + while (shm_fd < 0); + + if (ftruncate(shm_fd, dsize) < 0) + { + close(shm_fd); + shm_unlink(shmfile); + shm_fd = -1; + goto failed; + } + shm_addr = mmap(NULL, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0); + if (shm_addr == MAP_FAILED) + { + close(shm_fd); + shm_unlink(shmfile); + shm_fd = -1; + goto failed; + } + shm_size = dsize; + return; +failed: +#endif + shm_addr = malloc(dsize); +} + +void +shm_free(void) +{ +#ifdef HAVE_SHM_OPEN + if (shm_fd >= 0) + { + munmap(shm_addr, shm_size); + close(shm_fd); + shm_fd = -1; + shm_addr = NULL; + return; + } +#endif + free(shm_addr); + shm_addr = NULL; + shm_fd = -1; +} + +#ifdef __cplusplus +} +#endif diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.h b/legacy/evas_generic_loaders/src/bin/common/shmfile.h new file mode 100644 index 0000000000..b41c9cba02 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.h @@ -0,0 +1,20 @@ +#ifndef SHMFILE_H +#define SHMFILE_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int shm_fd; +extern int shm_size; +extern void *shm_addr; +extern char *shmfile; + +void shm_alloc (int dsize); +void shm_free (void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am index 3700ceb1d6..a909b01e22 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/common \ -I$(top_srcdir)/src/bin/pdf \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ @@ -13,7 +14,9 @@ AM_CPPFLAGS = \ bin_PROGRAMS = evas_image_loader.pdf -evas_image_loader_pdf_SOURCES = main.cpp +evas_image_loader_pdf_SOURCES = \ +main.cpp \ +$(top_srcdir)/src/bin/common/shmfile.c evas_image_loader_pdf_CFLAGS = evas_image_loader_pdf_LDADD = @POPPLER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_pdf_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 2dcbe62e2b..115b3be421 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -14,6 +14,7 @@ #include +#include "shmfile.h" #define DATA32 unsigned int @@ -36,66 +37,8 @@ int crop_width = 0, crop_height = 0; void *data = NULL; double dpi = -1.0; -static int shm_fd = -1; -static int shm_size = 0; -static void *shm_addr = NULL; -static char shmfile[1024] = ""; - #define DEF_DPI 72.0 -static void -shm_alloc(int dsize) -{ -#ifdef HAVE_SHM_OPEN - srand(time(NULL)); - do - { - snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", - (int)getpid(), (int)rand()); - shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); - } - while (shm_fd < 0); - - if (ftruncate(shm_fd, dsize) < 0) - { - close(shm_fd); - shm_unlink(shmfile); - shm_fd = -1; - goto failed; - } - shm_addr = mmap(NULL, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0); - if (shm_addr == MAP_FAILED) - { - close(shm_fd); - shm_unlink(shmfile); - shm_fd = -1; - goto failed; - } - shm_size = dsize; - return; -failed: -#endif - shm_addr = malloc(dsize); -} - -static void -shm_free(void) -{ -#ifdef HAVE_SHM_OPEN - if (shm_fd >= 0) - { - munmap(shm_addr, shm_size); - close(shm_fd); - shm_fd = -1; - shm_addr = NULL; - return; - } -#endif - free(shm_addr); - shm_addr = NULL; - shm_fd = -1; -} - Eina_Bool poppler_init(const char *file, int page_nbr, int size_w, int size_h) { Object obj; diff --git a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am index 8a1f15c44d..6c85eb2105 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/common \ -I$(top_srcdir)/src/bin/xcf \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ @@ -12,7 +13,9 @@ AM_CPPFLAGS = \ bin_PROGRAMS = evas_image_loader.xcf -evas_image_loader_xcf_SOURCES = main.c pixelfuncs.c common.h +evas_image_loader_xcf_SOURCES = \ +main.c pixelfuncs.c common.h \ +$(top_srcdir)/src/bin/common/shmfile.c evas_image_loader_xcf_CFLAGS = @EINA_CFLAGS@ evas_image_loader_xcf_LDADD = @EINA_LIBS@ -lz -lm @SHM_OPEN_LIBS@ evas_image_loader_xcf_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index e154812ada..071d7638b6 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -46,6 +46,7 @@ */ #include "common.h" +#include "shmfile.h" #define FREE(X) { free(X); X = NULL; } @@ -300,64 +301,6 @@ extern void combine_pixels_val (DATA8* src, int src_w, int src_h, DATA8* dest, i extern void combine_pixels_col (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); extern void combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y); -static int shm_fd = -1; -static int shm_size = 0; -static void *shm_addr = NULL; -static char shmfile[1024] = ""; - -static void -shm_alloc(int dsize) -{ -#ifdef HAVE_SHM_OPEN - srand(time(NULL)); - do - { - snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", - (int)getpid(), (int)rand()); - shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); - } - while (shm_fd < 0); - - if (ftruncate(shm_fd, dsize) < 0) - { - close(shm_fd); - shm_unlink(shmfile); - shm_fd = -1; - goto failed; - } - shm_addr = mmap(NULL, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0); - if (shm_addr == MAP_FAILED) - { - close(shm_fd); - shm_unlink(shmfile); - shm_fd = -1; - goto failed; - } - shm_size = dsize; - return; -failed: -#endif - shm_addr = malloc(dsize); -} - -static void -shm_free(void) -{ -#ifdef HAVE_SHM_OPEN - if (shm_fd >= 0) - { - munmap(shm_addr, shm_size); - close(shm_fd); - shm_fd = -1; - shm_addr = NULL; - return; - } -#endif - free(shm_addr); - shm_addr = NULL; - shm_fd = -1; -} - /* ---------------------------------------------------------------------------- globals ------------ */ /* This makes using the Gimp sources easier */ From f95443695cbf5e369a1c426c7480be559682c06e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 16 May 2011 05:11:18 +0000 Subject: [PATCH 012/347] hmmm shmfile didnt point to the same place. thats odd. make it malloced. SVN revision: 59436 --- legacy/evas_generic_loaders/src/bin/common/shmfile.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.c b/legacy/evas_generic_loaders/src/bin/common/shmfile.c index 7af1f75a32..85e76d9458 100644 --- a/legacy/evas_generic_loaders/src/bin/common/shmfile.c +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.c @@ -22,16 +22,18 @@ extern "C" { int shm_fd = -1; int shm_size = 0; void *shm_addr = NULL; -char shmfile[1024] = ""; +char *shmfile = NULL; void shm_alloc(int dsize) { #ifdef HAVE_SHM_OPEN + if (!shmfile) shmfile = malloc(1024); + shmfile[0] = 0; srand(time(NULL)); do { - snprintf(shmfile, sizeof(shmfile), "/evas-loader-xcf.%i.%i", + snprintf(shmfile, sizeof(shmfile), "/evas-loader.%i.%i", (int)getpid(), (int)rand()); shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); } @@ -69,6 +71,8 @@ shm_free(void) close(shm_fd); shm_fd = -1; shm_addr = NULL; + if (shmfile) free(shmfile); + shmfile = NULL; return; } #endif From 8586caf61c3d7de57508b0938109b05f3a620313 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 16 May 2011 08:33:00 +0000 Subject: [PATCH 013/347] fix shmfile name printfing. SVN revision: 59437 --- legacy/evas_generic_loaders/src/bin/common/shmfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.c b/legacy/evas_generic_loaders/src/bin/common/shmfile.c index 85e76d9458..725c67baef 100644 --- a/legacy/evas_generic_loaders/src/bin/common/shmfile.c +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.c @@ -29,11 +29,12 @@ shm_alloc(int dsize) { #ifdef HAVE_SHM_OPEN if (!shmfile) shmfile = malloc(1024); + if (!shmfile) goto failed; shmfile[0] = 0; srand(time(NULL)); do { - snprintf(shmfile, sizeof(shmfile), "/evas-loader.%i.%i", + snprintf(shmfile, 1024, "/evas-loader.%i.%i", (int)getpid(), (int)rand()); shm_fd = shm_open(shmfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); } From 7291b6452cd99c27eb3d6dfdcdc73c17fe3efeb9 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 16 May 2011 08:34:08 +0000 Subject: [PATCH 014/347] improve gzipped xcf handling massively by buffering the entire file in ram (if needed) as opposed to seeking a gzipped stream. generic for non-gzippiend files too (buffer them all in ram0 SVN revision: 59438 --- .../evas_generic_loaders/src/bin/xcf/common.h | 2 +- .../evas_generic_loaders/src/bin/xcf/main.c | 275 +++++++++++++----- 2 files changed, 208 insertions(+), 69 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/common.h b/legacy/evas_generic_loaders/src/bin/xcf/common.h index 209c3c13e3..5abaab8677 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/common.h +++ b/legacy/evas_generic_loaders/src/bin/xcf/common.h @@ -40,7 +40,7 @@ #endif -//#define XCF_DBG +//#define XCF_DBG 1 #ifdef XCF_DBG #define D(fmt, args...) fprintf(stderr, fmt, ## args) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 071d7638b6..084d94a2d6 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -218,10 +218,9 @@ struct _Tile */ struct _GimpImage { - int fd; - gzFile fp; - char* filename; - int cp; /* file stream pointer */ + void *file; + char *filename; + long cp; int compression; /* file compression mode */ int file_version; @@ -249,12 +248,156 @@ _image; /* ------------------------------------------------------------------------- prototypes ------------ */ +typedef struct _File File; +typedef struct _Chunk Chunk; + +#define FBUF 1 +#define CHUNK_SIZE (32 * 1024) + +struct _Chunk +{ + int size; + unsigned char data[CHUNK_SIZE]; +}; + +struct _File +{ + int fd; + gzFile fp; + long pos, size; + int chunk_num; + Chunk **chunk; +}; + +static File * +f_open(const char *file) +{ + File *f; + + f = calloc(1, sizeof(File)); + if (!f) return NULL; + f->fd = open(file, O_RDONLY); + if (f->fd < 0) + { + D("open of %s failed\n", file); + free(f); + return NULL; + } + f->fp = gzdopen(f->fd, "r"); + if (!f->fp) + { + D("gzdopen of %i failed\n", f->fd); + close(f->fd); + free(f); + return NULL; + } + return f; +} + +static void +f_close(File *f) +{ + // FIXME: free chunks + gzclose(f->fp); + free(f); +} + +#ifdef FBUF +static void +_f_read_pos(File *f, long pos, long bytes) +{ + long i, cnum; + Chunk **cks; + + if (f->size > 0) return; + cnum = ((pos + bytes) / CHUNK_SIZE) + 1; + if (f->chunk_num >= cnum) return; + D("FFFF: go up to %li + %li, chunks %li\n", pos, bytes, cnum); + cks = realloc(f->chunk, sizeof(Chunk *) * cnum); + if (!cks) return; + f->chunk = cks; + for (i = f->chunk_num; i < cnum; i++) + { + if (f->size != 0) + { + f->chunk[i] = NULL; + continue; + } + f->chunk[i] = malloc(sizeof(Chunk)); + if (f->chunk[i]) + { + f->chunk[i]->size = gzread(f->fp, f->chunk[i]->data, CHUNK_SIZE); + D("FFFF: go %i\n", f->chunk[i]->size); + if (f->chunk[i]->size < CHUNK_SIZE) + { + f->size = (i * CHUNK_SIZE) + f->chunk[i]->size; + } + } + } + f->chunk_num = cnum; +} +#endif + +static long +f_read(File *f, unsigned char *dest, long bytes) +{ +#ifdef FBUF + long done = 0, off = 0; + int c; + unsigned char *p; + _f_read_pos(f, f->pos, bytes); + + c = f->pos / CHUNK_SIZE; + off = f->pos - (c * CHUNK_SIZE); + p = dest; + while ((done < bytes) && (c < f->chunk_num)) + { + long amount = bytes - done; + + if (!f->chunk[c]) break; + if (amount > (f->chunk[c]->size - off)) + amount = (f->chunk[c]->size - off); + if (amount < 1) return 0; + memcpy(p, f->chunk[c]->data + off, amount); + p += amount; + off = 0; + done += amount; + c++; + } + f->pos += done; + return done; +#else + long done = gzread(f->fp, dest, bytes); + f->pos += done; + return done; +#endif +} + +static void +f_seek(File *f, long pos) +{ +#ifdef FBUF + if (f->size > 0) + { + if (pos >= f->size) pos = f->size -1; + } +#endif + if (f->pos == pos) return; + f->pos = pos; +#ifdef FBUF + _f_read_pos(f, f->pos, 1); +#else + gzseek(f->fp, f->pos, SEEK_SET); +#endif +} + + /* stuff that was adapted from xcf.c */ static void xcf_seek_pos(int pos); -static int xcf_read_int32(gzFile *fp, DATA32 *data, int count); -static int xcf_read_int8(gzFile *fp, DATA8 *data, int count); -static int xcf_read_string(gzFile *fp, char **data, int count); +static int xcf_read_int32(void *fp, DATA32 *data, int count); +static int xcf_read_int8(void *fp, DATA8 *data, int count); +static int xcf_read_string(void *fp, char **data, int count); static char xcf_load_prop(PropType *prop_type, DATA32 *prop_size); static void xcf_load_image(void); static char xcf_load_image_props(void); @@ -314,12 +457,12 @@ xcf_seek_pos(int pos) if (image->cp != pos) { image->cp = pos; - gzseek(image->fp, image->cp, SEEK_SET); + f_seek(image->file, image->cp); } } static int -xcf_read_int32(gzFile *fp, +xcf_read_int32(void *fp, DATA32 *data, int count) { @@ -331,7 +474,7 @@ xcf_read_int32(gzFile *fp, xcf_read_int8(fp, (DATA8*) data, count * 4); while (count--) { - *data = (DATA32) ntohl (*data); + *data = (DATA32)ntohl(*data); data++; } } @@ -339,7 +482,7 @@ xcf_read_int32(gzFile *fp, } static int -xcf_read_int8(gzFile *fp, +xcf_read_int8(void *fp, DATA8 *data, int count) { @@ -349,7 +492,7 @@ xcf_read_int8(gzFile *fp, total = count; while (count > 0) { - bytes = gzread(fp, data, count); + bytes = f_read(fp, data, count); if (bytes <= 0) /* something bad happened */ break; count -= bytes; @@ -359,7 +502,7 @@ xcf_read_int8(gzFile *fp, } static int -xcf_read_string(gzFile *fp, +xcf_read_string(void *fp, char **data, int count) { @@ -387,8 +530,8 @@ static char xcf_load_prop(PropType *prop_type, DATA32 *prop_size) { - image->cp += xcf_read_int32(image->fp, (DATA32 *)prop_type, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)prop_size, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)prop_type, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)prop_size, 1); return 1; } @@ -418,7 +561,7 @@ xcf_load_image_props(void) "XCF warning: version 0 of XCF file format\n" "did not save indexed colormaps correctly.\n" "Substituting grayscale map.\n"); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->num_cols, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&image->num_cols, 1); image->cmap = malloc(sizeof(DATA8) * image->num_cols * 3); if (!image->cmap) return 0; xcf_seek_pos (image->cp + image->num_cols); @@ -432,10 +575,10 @@ xcf_load_image_props(void) else { D("Loading colormap.\n"); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->num_cols, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&image->num_cols, 1); image->cmap = malloc(sizeof(DATA8) * image->num_cols * 3); if (!image->cmap) return 0; - image->cp += xcf_read_int8(image->fp, (DATA8 *)image->cmap, image->num_cols * 3); + image->cp += xcf_read_int8(image->file, (DATA8 *)image->cmap, image->num_cols * 3); } } break; @@ -443,7 +586,7 @@ xcf_load_image_props(void) { char compression; - image->cp += xcf_read_int8(image->fp, (DATA8 *)&compression, 1); + image->cp += xcf_read_int8(image->file, (DATA8 *)&compression, 1); if ((compression != COMPRESS_NONE) && (compression != COMPRESS_RLE) && @@ -477,7 +620,7 @@ xcf_load_image_props(void) while (prop_size > 0) { amount = (16 < prop_size ? 16 : prop_size); - image->cp += xcf_read_int8 (image->fp, buf, amount); + image->cp += xcf_read_int8(image->file, buf, amount); prop_size -= (16 < amount ? 16 : amount); } } @@ -502,7 +645,7 @@ xcf_load_image(void) while (1) { /* read in the offset of the next layer */ - image->cp += xcf_read_int32(image->fp, &offset, 1); + image->cp += xcf_read_int32(image->file, &offset, 1); /* if the offset is 0 then we are at the end * of the layer list. */ if (offset == 0) break; @@ -554,23 +697,23 @@ xcf_load_layer_props(Layer *layer) case PROP_FLOATING_SELECTION: D("Loading floating selection.\n"); image->floating_sel = layer; - image->cp += xcf_read_int32(image->fp, (DATA32 *)&image->floating_sel_offset, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&image->floating_sel_offset, 1); break; case PROP_OPACITY: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->opacity, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->opacity, 1); break; case PROP_VISIBLE: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->visible, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->visible, 1); break; case PROP_PRESERVE_TRANSPARENCY: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->preserve_trans, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->preserve_trans, 1); break; case PROP_OFFSETS: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->offset_x, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->offset_y, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->offset_x, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->offset_y, 1); break; case PROP_MODE: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->mode, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->mode, 1); break; /* I threw out all of the following: --cK */ @@ -590,7 +733,7 @@ xcf_load_layer_props(Layer *layer) while (prop_size > 0) { amount = (16 < prop_size ? 16 : prop_size); - image->cp += xcf_read_int8 (image->fp, buf, amount); + image->cp += xcf_read_int8 (image->file, buf, amount); prop_size -= (16 < amount ? 16 : amount); } } @@ -616,10 +759,10 @@ xcf_load_layer(void) D("Loading one layer ...\n"); /* read in the layer width, height and type */ - image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&type, 1); - image->cp += xcf_read_string(image->fp, &name, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&type, 1); + image->cp += xcf_read_string(image->file, &name, 1); /* ugly, I know */ FREE(name); @@ -634,8 +777,8 @@ xcf_load_layer(void) if (!layer->visible) return layer; /* read the hierarchy and layer mask offsets */ - image->cp += xcf_read_int32(image->fp, &hierarchy_offset, 1); - image->cp += xcf_read_int32(image->fp, &layer_mask_offset, 1); + image->cp += xcf_read_int32(image->file, &hierarchy_offset, 1); + image->cp += xcf_read_int32(image->file, &layer_mask_offset, 1); /* read in the hierarchy */ xcf_seek_pos(hierarchy_offset); if (!xcf_load_hierarchy(&(layer->tiles), &(layer->num_rows), @@ -790,9 +933,9 @@ xcf_load_channel(void) D("Loading channel ...\n"); /* read in the layer width, height and name */ - image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); - image->cp += xcf_read_string(image->fp, &name, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&height, 1); + image->cp += xcf_read_string(image->file, &name, 1); /* Yeah, still ugly :) */ FREE(name); @@ -803,7 +946,7 @@ xcf_load_channel(void) /* read in the channel properties */ if (!xcf_load_channel_props(layer)) goto error; /* read the hierarchy and layer mask offsets */ - image->cp += xcf_read_int32(image->fp, &hierarchy_offset, 1); + image->cp += xcf_read_int32(image->file, &hierarchy_offset, 1); /* read in the hierarchy */ xcf_seek_pos(hierarchy_offset); if (!xcf_load_hierarchy(&(layer->tiles), &(layer->num_rows), &(layer->num_cols), &(layer->bpp))) @@ -839,10 +982,10 @@ xcf_load_channel_props(Layer *layer) return 1; } case PROP_OPACITY: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->opacity, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->opacity, 1); break; case PROP_VISIBLE: - image->cp += xcf_read_int32(image->fp, (DATA32 *)&layer->visible, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&layer->visible, 1); break; case PROP_ACTIVE_CHANNEL: case PROP_SHOW_MASKED: @@ -860,7 +1003,7 @@ xcf_load_channel_props(Layer *layer) while (prop_size > 0) { amount = (16 < prop_size ? 16 : prop_size); - image->cp += xcf_read_int8(image->fp, buf, amount); + image->cp += xcf_read_int8(image->file, buf, amount); prop_size -= (16 < amount ? 16 : amount); } } @@ -879,17 +1022,17 @@ xcf_load_hierarchy(Tile **tiles, int *num_rows, int *num_cols, int *bpp) int width; int height; - image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)bpp, 1); - image->cp += xcf_read_int32(image->fp, &offset, 1); /* top level */ + image->cp += xcf_read_int32(image->file, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)bpp, 1); + image->cp += xcf_read_int32(image->file, &offset, 1); /* top level */ D("Loading hierarchy: width %i, height %i, bpp %i\n", width, height, *bpp); /* discard offsets for layers below first, if any. */ do { - image->cp += xcf_read_int32(image->fp, &junk, 1); + image->cp += xcf_read_int32(image->file, &junk, 1); } while (junk != 0); /* save the current position as it is where the @@ -921,8 +1064,8 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, Tile *tiles; Tile *current_tile; - image->cp += xcf_read_int32(image->fp, (DATA32*) &width, 1); - image->cp += xcf_read_int32(image->fp, (DATA32*) &height, 1); + image->cp += xcf_read_int32(image->file, (DATA32*) &width, 1); + image->cp += xcf_read_int32(image->file, (DATA32*) &height, 1); if ((width != hierarchy_width) || (height != hierarchy_height)) return 0; @@ -930,7 +1073,7 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, (*tiles_p) = allocate_tiles(width, height, bpp, num_rows, num_cols); tiles = (*tiles_p); - image->cp += xcf_read_int32(image->fp, &offset, 1); + image->cp += xcf_read_int32(image->file, &offset, 1); if (offset == 0) return 1; ntiles = (*num_rows) * (*num_cols); @@ -952,7 +1095,7 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, /* read in the offset of the next tile so we can calculate the amount of data needed for this tile*/ - image->cp += xcf_read_int32(image->fp, &offset2, 1); + image->cp += xcf_read_int32(image->file, &offset2, 1); /* if the offset is 0 then we need to read in the maximum possible allowing for negative compression */ @@ -993,7 +1136,7 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, */ xcf_seek_pos(saved_pos); /* read in the offset of the next tile */ - image->cp += xcf_read_int32(image->fp, &offset, 1); + image->cp += xcf_read_int32(image->file, &offset, 1); } if (offset != 0) @@ -1009,7 +1152,7 @@ xcf_load_level(Tile **tiles_p, int hierarchy_width, int hierarchy_height, static char xcf_load_tile(Tile *tile) { - image->cp += xcf_read_int8(image->fp, tile->data, + image->cp += xcf_read_int8(image->file, tile->data, tile->ewidth * tile->eheight * tile->bpp); return 1; } @@ -1038,7 +1181,7 @@ xcf_load_tile_rle(Tile *tile, /* we have to use fread instead of xcf_read_* because we may be reading past the end of the file here */ - nmemb_read_successfully = gzread(image->fp, xcfdata, data_length); + nmemb_read_successfully = f_read(image->file, xcfdata, data_length); image->cp += nmemb_read_successfully; xcfdatalimit = &xcfodata[nmemb_read_successfully - 1]; @@ -1429,10 +1572,9 @@ xcf_file_init(char *filename) int image_type; image->single_layer_index = -1; - image->fd = open(filename, O_RDONLY); - if (image->fd < 0) return 0; - image->fp = gzdopen(image->fd, "r"); - if (!image->fp) return 0; + image->file = f_open(filename); + D("image->file = %p\n", image->file); + if (!image->file) return 0; image->filename = filename; image->layers = NULL; @@ -1443,12 +1585,11 @@ xcf_file_init(char *filename) image->cp = 0; - image->cp += xcf_read_int8(image->fp, (DATA8 *)id, 14); + image->cp += xcf_read_int8(image->file, (DATA8 *)id, 14); if (strncmp(id, "gimp xcf ", 9)) { success = 0; - gzclose(image->fp); - close(image->fd); + f_close(image->file); } else if (!strcmp(id + 9, "file")) { @@ -1461,15 +1602,14 @@ xcf_file_init(char *filename) else { success = 0; - gzclose(image->fp); - close(image->fd); + f_close(image->file); } if (success) { - image->cp += xcf_read_int32(image->fp, (DATA32 *)&width, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&height, 1); - image->cp += xcf_read_int32(image->fp, (DATA32 *)&image_type, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&image_type, 1); image->width = width; image->height = height; @@ -1486,8 +1626,7 @@ xcf_cleanup(void) { Layer *l, *lp; - if (image->fp) gzclose(image->fp); - if (image->fd >= 0) close(image->fd); + if (image->file) f_close(image->file); for (l = image->last_layer; l; l = lp) { lp = l->prev; From 2b85b66d5d0be596416a97f70aed625059b57a5a Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 19 May 2011 12:29:34 +0000 Subject: [PATCH 015/347] Add PostScript loader (using libspectre) SVN revision: 59532 --- legacy/evas_generic_loaders/configure.ac | 5 + .../evas_generic_loaders/src/bin/Makefile.am | 4 + .../src/bin/ps/Makefile.am | 22 ++ legacy/evas_generic_loaders/src/bin/ps/main.c | 265 ++++++++++++++++++ 4 files changed, 296 insertions(+) create mode 100644 legacy/evas_generic_loaders/src/bin/ps/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/ps/main.c diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index da8e13ddf6..18b513b21d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -62,7 +62,10 @@ PKG_CHECK_MODULES(EINA, [eina >= 1.0.0]) PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_poppler="no"]) +PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) + AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) +AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) ### Checks for header files @@ -114,6 +117,7 @@ src/bin/Makefile src/bin/common/Makefile src/bin/xcf/Makefile src/bin/pdf/Makefile +src/bin/ps/Makefile ]) AC_OUTPUT @@ -134,6 +138,7 @@ echo echo "Loaders:" echo " XCF..................: yes" echo " PDF..................: ${have_poppler}" +echo " PS...................: ${have_ps}" echo echo "Compilation............: make (or gmake)" echo " CPPFLAGS.............: $CPPFLAGS" diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index 313e122ad4..3ef298a36f 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -6,3 +6,7 @@ xcf if HAVE_PDF SUBDIRS += pdf endif + +if HAVE_PS +SUBDIRS += ps +endif diff --git a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am new file mode 100644 index 0000000000..f0c3ba5180 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am @@ -0,0 +1,22 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src \ +-I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/common \ +-I$(top_srcdir)/src/bin/ps \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@SPECTRE_CFLAGS@ + +bin_PROGRAMS = evas_image_loader.ps + +evas_image_loader_ps_SOURCES = \ +main.c \ +$(top_srcdir)/src/bin/common/shmfile.c +evas_image_loader_ps_CFLAGS = +evas_image_loader_ps_LDADD = @SPECTRE_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ +evas_image_loader_ps_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c new file mode 100644 index 0000000000..8960aef9f0 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -0,0 +1,265 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include + +#include + +#include "shmfile.h" + +#define DATA32 unsigned int + +#define PS_DBG + +#ifdef PS_DBG +#define D(fmt, args...) fprintf(stderr, fmt, ## args) +#else +#define D(fmt, args...) +#endif + + +SpectreDocument *psdoc; +unsigned int page_count; + +SpectrePage *page; + +int width = 0; +int height = 0; +void *data = NULL; +double dpi = -1.0; + +#define DEF_DPI 72.0 + +static Eina_Bool +_spectre_init(const char *file, int page_nbr, int size_w, int size_h) +{ + double w, h; + int ww, hh; + SpectreOrientation rot; + SpectreStatus status; + + if (!file || !*file) + return EINA_FALSE; + + if (page_nbr < 0) + return EINA_FALSE; + + if (!eina_init()) + return EINA_FALSE; + + psdoc = spectre_document_new(); + if (!psdoc) + goto shutdown_eina; + + spectre_document_load(psdoc, file); + status = spectre_document_status (psdoc); + if (status != SPECTRE_STATUS_SUCCESS) + { + D("[ps] %s\n", spectre_status_to_string(status)); + goto free_psdoc; + } + + page_count = spectre_document_get_n_pages(psdoc); + status = spectre_document_status(psdoc); + if (status != SPECTRE_STATUS_SUCCESS) + { + D("[eps] %s\n", spectre_status_to_string (status)); + goto free_psdoc; + } + + if (page_nbr >= page_count) + goto free_psdoc; + + /* load the page */ + + page = spectre_document_get_page(psdoc, page_nbr); + status = spectre_document_status(psdoc); + if (status != SPECTRE_STATUS_SUCCESS) + { + D("[eps] %s\n", spectre_status_to_string (status)); + goto free_psdoc; + } + + spectre_page_get_size(page, &ww, &hh); + w = ww; + h = hh; + rot = spectre_page_get_orientation(page); + + if ((rot == SPECTRE_ORIENTATION_LANDSCAPE) || (rot == SPECTRE_ORIENTATION_REVERSE_LANDSCAPE)) + { + double t; + // swap width & height + t = w; w = h; h = t; + } + + if ((size_w > 0) || (size_h > 0)) + { + double w2 = w, h2 = h; + + w2 = size_w; + h2 = (size_w * h) / w; + if (h2 > size_h) + { + h2 = size_h; + w2 = (size_h * w) / h; + } + D("XXXXXXXXXXXXXXXXXXXXx %3.3fx%3.3f\n", w2, h2); + if (w2 > h2) dpi = (w2 * DEF_DPI) / w; + else dpi = (h2 * DEF_DPI) / h; + } + + if (dpi > 0.0) + { + w = (w * dpi) / DEF_DPI; + h = (h * dpi) / DEF_DPI; + } + width = w; + height = h; + + return EINA_TRUE; + + free_page: + spectre_page_free(page); + free_psdoc: + spectre_document_free(psdoc); + shutdown_eina: + eina_shutdown(); + + return EINA_FALSE; +} + +static void +_spectre_shutdown() +{ + spectre_page_free(page); + spectre_document_free(psdoc); + eina_shutdown(); +} + +static void +_spectre_load_image(int size_w, int size_h) +{ + SpectreRenderContext *rc; + unsigned char *psdata; + int stride; + DATA32 *src; + DATA32 *dst; + int yy; + SpectreStatus status; + + rc = spectre_render_context_new(); + if (!rc) + return; + + spectre_page_render(page, rc, &psdata, &stride); + spectre_render_context_set_page_size (rc, width, height); + status = spectre_page_status(page); + if (status != SPECTRE_STATUS_SUCCESS) + { + D("[eps] %s\n", spectre_status_to_string (status)); + return; + } + + shm_alloc(width * height * sizeof(DATA32)); + if (!shm_addr) return; + data = shm_addr; + + if (stride == 4 * width) + memcpy(data, psdata, height * stride); + else + { + src = (DATA32 *)psdata; + dst = (DATA32 *)data; + for (yy = 0; yy < height; src += stride, dst += width, ++yy) + memcpy (dst, src, width * 4); + } + + spectre_render_context_free(rc); +} + +int +main(int argc, char **argv) +{ + char *file; + int i; + int size_w = 0, size_h = 0; + int head_only = 0; + int page = 0; + + if (argc < 2) return -1; + // file is ALWAYS first arg, other options come after + file = argv[1]; + for (i = 2; i < argc; i++) + { + if (!strcmp(argv[i], "-head")) + // asked to only load header, not body/data + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { + i++; + page = atoi(argv[i]); + i++; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { // not used by ps loader + i++; + // int scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { + i++; + dpi = ((double)atoi(argv[i])) / 1000.0; // dpi is an int multiplied by 1000 (so 72dpi is 72000) + i++; + } + else if (!strcmp(argv[i], "-opt-size")) + { // not used by ps loader + i++; + size_w = atoi(argv[i]); + i++; + size_h = atoi(argv[i]); + } + } + + D("_spectre_init_file\n"); + D("dpi....: %f\n", dpi); + D("page...: %d\n", page); + + if (!_spectre_init(file, page, size_w, size_h)) + return -1; + D("poppler_file_init done\n"); + + D("dpi2...: %f\n", dpi); + if (!head_only) + { + _spectre_load_image(size_w, size_h); + } + + D("size...: %ix%i\n", width, height); + D("alpha..: 1\n"); + + printf("size %i %i\n", width, height); + printf("alpha 0\n"); + + if (!head_only) + { + if (shm_fd >= 0) printf("shmfile %s\n", shmfile); + else + { + // could also to "tmpfile %s\n" like shmfile but just + // a mmaped tmp file on the system + printf("data\n"); + fwrite(data, width * height * sizeof(DATA32), 1, stdout); + } + shm_free(); + } + else + printf("done\n"); + + _spectre_shutdown(); + + return 0; +} From 6de0973471897c77845b7e775afcb5fa11b1fd5c Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 19 May 2011 12:47:11 +0000 Subject: [PATCH 016/347] update README and TODO SVN revision: 59535 --- legacy/evas_generic_loaders/README | 10 +++++----- legacy/evas_generic_loaders/TODO | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index d0ccdea0b6..c6fd727a7f 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -4,11 +4,6 @@ evas may run from its generic loader module. Generic loaders currently provided: XCF (.xcf .xcf.gz) - -Wanted: - - RAW - (libopenraw1 ??) PDF (use -key option to specific what page to get and load options for size and use poppler and/or mupdf - look at epdf) @@ -16,6 +11,11 @@ Wanted: (use -key option to specific what page to get and load options for size and use ghostscript (libgs) to render etc.) +Wanted: + + RAW + (libopenraw1 ??) + Possible fun ones: MPG/AVI/OGV/MOV/MKV/WMV etc. diff --git a/legacy/evas_generic_loaders/TODO b/legacy/evas_generic_loaders/TODO index f35cb337be..47d3388b23 100644 --- a/legacy/evas_generic_loaders/TODO +++ b/legacy/evas_generic_loaders/TODO @@ -4,6 +4,9 @@ Modules to add: [x] XCF [x] PDF - [ ] PS + [X] PS [ ] DVI [ ] Djvu + [ ] video files + [ ] RAW + [ ] PPT/PPTX From 5773dd7bfdaae5e383c190aa7e48229eaa6b8ba8 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 22 May 2011 13:32:41 +0000 Subject: [PATCH 017/347] fix ps loader pointer bug... oops. SVN revision: 59579 --- legacy/evas_generic_loaders/src/bin/ps/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index 8960aef9f0..d51ddde8ff 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -146,7 +146,7 @@ _spectre_load_image(int size_w, int size_h) SpectreRenderContext *rc; unsigned char *psdata; int stride; - DATA32 *src; + unsigned char *src; DATA32 *dst; int yy; SpectreStatus status; From 695bc3c18fd1f31dff9762d6abac82a058b42149 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 22 May 2011 13:40:53 +0000 Subject: [PATCH 018/347] and fix ps decoding colors SVN revision: 59582 --- legacy/evas_generic_loaders/src/bin/ps/main.c | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index d51ddde8ff..51789f20fd 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -140,6 +140,27 @@ _spectre_shutdown() eina_shutdown(); } +static void +_pixcopy(DATA32 *dst, unsigned char *src, int size) +{ + DATA32 *d; + unsigned char *s, *e; + + d = dst; + s = src; + e = s + size; + while (s < e) + { + d[0] = + 0xff000000 | + (s[2] << 16) | + (s[1] << 8 ) | + (s[0] ); + d++; + s += 4; + } +} + static void _spectre_load_image(int size_w, int size_h) { @@ -169,13 +190,13 @@ _spectre_load_image(int size_w, int size_h) data = shm_addr; if (stride == 4 * width) - memcpy(data, psdata, height * stride); + _pixcopy(data, psdata, height * stride); else { src = (DATA32 *)psdata; dst = (DATA32 *)data; for (yy = 0; yy < height; src += stride, dst += width, ++yy) - memcpy (dst, src, width * 4); + _pixcopy (dst, src, width * 4); } spectre_render_context_free(rc); From 0d2e9767746d3380014083b43e3cd5a584dc6156 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 25 May 2011 19:13:15 +0000 Subject: [PATCH 019/347] evas_generic_loader: warn-- SVN revision: 59676 --- legacy/evas_generic_loaders/src/bin/ps/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index 51789f20fd..fbb47d5f91 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -167,7 +167,7 @@ _spectre_load_image(int size_w, int size_h) SpectreRenderContext *rc; unsigned char *psdata; int stride; - unsigned char *src; + DATA32 *src; DATA32 *dst; int yy; SpectreStatus status; @@ -196,7 +196,7 @@ _spectre_load_image(int size_w, int size_h) src = (DATA32 *)psdata; dst = (DATA32 *)data; for (yy = 0; yy < height; src += stride, dst += width, ++yy) - _pixcopy (dst, src, width * 4); + _pixcopy (dst, (unsigned char *)src, width * 4); } spectre_render_context_free(rc); From 501f779c152ec1547d96da3d75a4b678c9733f97 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 25 May 2011 19:59:22 +0000 Subject: [PATCH 020/347] evas_generic_loader: fix this warning fine, dont broke stride oops SVN revision: 59678 --- legacy/evas_generic_loaders/src/bin/ps/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index fbb47d5f91..ac70a779cf 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -167,7 +167,7 @@ _spectre_load_image(int size_w, int size_h) SpectreRenderContext *rc; unsigned char *psdata; int stride; - DATA32 *src; + unsigned char *src; DATA32 *dst; int yy; SpectreStatus status; @@ -193,10 +193,10 @@ _spectre_load_image(int size_w, int size_h) _pixcopy(data, psdata, height * stride); else { - src = (DATA32 *)psdata; + src = psdata; dst = (DATA32 *)data; for (yy = 0; yy < height; src += stride, dst += width, ++yy) - _pixcopy (dst, (unsigned char *)src, width * 4); + _pixcopy (dst, src, width * 4); } spectre_render_context_free(rc); From f7bceaf9e1fb5ba960bb3410a8eecbd395d824c0 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 25 May 2011 20:16:17 +0000 Subject: [PATCH 021/347] evas_generic_loader: Add raw image format loader. There are dozens of raw photo formats: CRW, CR2, MRW, NEF, RAF, etc. 'RAW Format' does not exist; it is an illusion created by dcraw's ability to read all raw formats. So I use libraw who was nearest of dcraw. So we have more formats supported (foveon) and better rendering (default icc profile from camera) as libopenraw provides. shm_file seems doesn't work if someone want to fix it... I'm on SVN revision: 59679 --- legacy/evas_generic_loaders/configure.ac | 7 +- .../evas_generic_loaders/src/bin/Makefile.am | 4 + .../src/bin/raw/Makefile.am | 42 ++++ .../evas_generic_loaders/src/bin/raw/main.c | 205 ++++++++++++++++++ 4 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 legacy/evas_generic_loaders/src/bin/raw/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/raw/main.c diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 18b513b21d..125dbe8b94 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,4 +1,4 @@ -y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [0]) m4_define([v_min], [1]) @@ -64,8 +64,11 @@ PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_popp PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) +PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) + AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) +AM_CONDITIONAL(HAVE_RAW, test "x${have_raw}" = "xyes") ### Checks for header files @@ -116,6 +119,7 @@ src/Makefile src/bin/Makefile src/bin/common/Makefile src/bin/xcf/Makefile +src/bin/raw/Makefile src/bin/pdf/Makefile src/bin/ps/Makefile ]) @@ -139,6 +143,7 @@ echo "Loaders:" echo " XCF..................: yes" echo " PDF..................: ${have_poppler}" echo " PS...................: ${have_ps}" +echo " RAW..................: ${have_raw}" echo echo "Compilation............: make (or gmake)" echo " CPPFLAGS.............: $CPPFLAGS" diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index 3ef298a36f..498e29d680 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -7,6 +7,10 @@ if HAVE_PDF SUBDIRS += pdf endif +if HAVE_RAW +SUBDIRS += raw +endif + if HAVE_PS SUBDIRS += ps endif diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am new file mode 100644 index 0000000000..8dbac3c15b --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am @@ -0,0 +1,42 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src \ +-I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/common \ +-I$(top_srcdir)/src/bin/raw \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ + +if HAVE_RAW +bin_PROGRAMS = evas_image_loader.raw + +evas_image_loader_raw_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c +evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ +evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ +evas_image_loader_raw_LDFLAGS = +endif + +install-data-hook: + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.arw + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.cr2 + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.crw + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.dcr + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.dng + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.k25 + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.kdc + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.erf + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.mrw + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.nef + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.nrf + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.nrw + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.orf + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.rw2 + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.pef + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.raf + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.sr2 + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.srf + ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.x3f diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c new file mode 100644 index 0000000000..56970cfa35 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -0,0 +1,205 @@ +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "shmfile.h" + +#define DATA32 unsigned int +#define DATA8 unsigned char + +#define ARGB_JOIN(a,r,g,b) \ + (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) + +//#define RAW_DBG 1 + +#ifdef RAW_DBG +#define D(fmt, args...) fprintf(stderr, fmt, ## args) +#else +#define D(fmt, args...) +#endif + + +static int +read_raw_header(unsigned char *seg, int size, libraw_data_t *raw_data, int *w, int *h) +{ + int ret; + + D("raw_open_buffer\n"); + if ((ret = libraw_open_buffer(raw_data, seg, size)) != LIBRAW_SUCCESS) + return 0; + + D("raw_adjust_size\n"); + if ((ret = libraw_adjust_sizes_info_only(raw_data)) != LIBRAW_SUCCESS) + { + if (LIBRAW_FATAL_ERROR(ret)) + return 0; + } + + if ((raw_data->sizes.width < 1) || (raw_data->sizes.height < 1)) + return 0; + + *w = raw_data->sizes.iwidth; + *h = raw_data->sizes.iheight; + + return 1; + +} + + +static int +read_raw_data(unsigned char* seg, int size, libraw_data_t *raw_data, int *w, int *h) +{ + int ret, count; + libraw_processed_image_t *image = NULL; + DATA8 *bufptr; + DATA32 *dataptr; + + raw_data->params.half_size = 0; + raw_data->params.user_qual = 2; + + D("raw_open_buffer\n"); + if ((ret = libraw_open_buffer(raw_data, seg, size)) != LIBRAW_SUCCESS) + return 0; + + D("raw_open_unpack\n"); + if ((ret = libraw_unpack(raw_data)) != LIBRAW_SUCCESS) + return 0; + + D("raw_dcraw_process\n"); + if ((ret = libraw_dcraw_process(raw_data)) != LIBRAW_SUCCESS) + { + if (LIBRAW_FATAL_ERROR(ret)) + return 0;; + } + + D("raw_make_mem_image\n"); + image = libraw_dcraw_make_mem_image(raw_data, &ret); + if (image) + { + if ((image->width < 1) || (image->height < 1)) + goto clean_image; + *w = image->width; + *h = image->height; +// shm_alloc(image->width * image->height * (sizeof(DATA32))); +// if (!shm_addr) +// goto clean_image; + shm_addr = malloc(image->width * image->height * (sizeof(DATA32))); + memset(shm_addr, 0, image->width * image->height * (sizeof(DATA32))); + if (image->type != LIBRAW_IMAGE_BITMAP) + goto clean_image; + if (image->colors != 3) + goto clean_image; +#define SWAP(a, b) { a ^= b; a = (b ^=a); } + if ((image->bits == 16) && (htons(0x55aa) != 0x55aa)) + for (count = 0; count < image->data_size; count +=2) + SWAP(image->data[count], image->data[count + 1]); +#undef SWAP + dataptr = shm_addr; + bufptr = image->data; + for (count = image->width * image->height; count > 0; --count) + { + *dataptr = ARGB_JOIN(0xff, bufptr[0], bufptr[1], bufptr[2]); + dataptr++; + bufptr += 3; + } + + free(image); + } + return 1; + +clean_image: + free(image); + return 0; +} + + +int main(int argc, char **argv) +{ + char *file; + int i; + int w = 0, h = 0; + int head_only = 0; + int fd; + struct stat ss; + unsigned char *seg = MAP_FAILED; + libraw_data_t *raw_data = NULL; + + if (argc < 2) return -1; + file = argv[1]; + + for (i = 2; i < argc; ++i) + { + if (!strcmp(argv[i], "-head")) + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { // not used by raw loader + i++; + // const char *key = argv[i]; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { // not used by raw loader + i++; + // int scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { // not used by raw loader + i++; + // double dpi = ((double)atoi(argv[i])) / 1000.0; + } + else if (!strcmp(argv[i], "-opt-size")) + { // not used by raw loader + i++; + // int size_w = atoi(argv[i]); + i++; + // int size_h = atoi(argv[i]); + } + } + + fd = open(file, O_RDONLY); + if (fd < 0) return 0; + if (stat(file, &ss)) goto close_file; + seg = mmap(0, ss.st_size, PROT_READ, MAP_SHARED, fd, 0); + if (seg == MAP_FAILED) goto close_file; + + D("raw_init\n"); + raw_data = libraw_init(0); + + if (head_only != 0) + { + if (read_raw_header(seg, ss.st_size, raw_data, &w, &h)) + printf("size %d %d\n", w, h); + printf("done\n"); + } + else + { + if (read_raw_data(seg, ss.st_size, raw_data, &w, &h)) + { + printf("size %d %d\n", w, h); + printf("alpha 1\n"); + + if (shm_fd >= 0) printf("shm file %s\n", shmfile); + else + { + printf("data\n"); + fwrite(shm_addr, w * h * sizeof(DATA32), 1, stdout); + } + shm_free(); + } + } + D("raw_shutdown\n"); + if (raw_data) + libraw_close(raw_data); + if (seg != MAP_FAILED) munmap(seg, ss.st_size); + close(fd); + return 0; + +close_file: + close(fd); + return -1; +} + From cbe2d553e5ec4cc48f85ab9a532fd67443e30913 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 25 May 2011 21:07:41 +0000 Subject: [PATCH 022/347] evas_generic_loader: fill author SVN revision: 59681 --- legacy/evas_generic_loaders/AUTHORS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/evas_generic_loaders/AUTHORS b/legacy/evas_generic_loaders/AUTHORS index b0727a6c24..ea54311d0e 100644 --- a/legacy/evas_generic_loaders/AUTHORS +++ b/legacy/evas_generic_loaders/AUTHORS @@ -1,2 +1,4 @@ The Rasterman (Carsten Haitzler) Christian Kreibich +Vincent Torri +Michael Bouchaud From 0fa9851dfd3e2cc4423baecd5e70ff64f67cfc0c Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Wed, 25 May 2011 21:41:22 +0000 Subject: [PATCH 023/347] mail SVN revision: 59682 --- legacy/evas_generic_loaders/AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/AUTHORS b/legacy/evas_generic_loaders/AUTHORS index ea54311d0e..ea752feac9 100644 --- a/legacy/evas_generic_loaders/AUTHORS +++ b/legacy/evas_generic_loaders/AUTHORS @@ -1,4 +1,4 @@ The Rasterman (Carsten Haitzler) Christian Kreibich -Vincent Torri +Vincent Torri Michael Bouchaud From dabd521468aa190da428f1919304dbf6165d1076 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 26 May 2011 05:56:16 +0000 Subject: [PATCH 024/347] cleanup SVN revision: 59690 --- legacy/evas_generic_loaders/src/bin/ps/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index ac70a779cf..a2cc8c3072 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -251,7 +251,7 @@ main(int argc, char **argv) if (!_spectre_init(file, page, size_w, size_h)) return -1; - D("poppler_file_init done\n"); + D("_spectre_init done\n"); D("dpi2...: %f\n", dpi); if (!head_only) @@ -260,7 +260,7 @@ main(int argc, char **argv) } D("size...: %ix%i\n", width, height); - D("alpha..: 1\n"); + D("alpha..: 0\n"); printf("size %i %i\n", width, height); printf("alpha 0\n"); From 583770d42e4b228fd2d504fbe22ab95ea39c8d46 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Tue, 31 May 2011 10:21:25 +0000 Subject: [PATCH 025/347] evas_generic_loader: fix raw shmfile. It's a typo :P SVN revision: 59838 --- legacy/evas_generic_loaders/src/bin/raw/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index 56970cfa35..4d10216ecd 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -85,10 +85,9 @@ read_raw_data(unsigned char* seg, int size, libraw_data_t *raw_data, int *w, int goto clean_image; *w = image->width; *h = image->height; -// shm_alloc(image->width * image->height * (sizeof(DATA32))); -// if (!shm_addr) -// goto clean_image; - shm_addr = malloc(image->width * image->height * (sizeof(DATA32))); + shm_alloc(image->width * image->height * (sizeof(DATA32))); + if (!shm_addr) + goto clean_image; memset(shm_addr, 0, image->width * image->height * (sizeof(DATA32))); if (image->type != LIBRAW_IMAGE_BITMAP) goto clean_image; @@ -182,7 +181,7 @@ int main(int argc, char **argv) printf("size %d %d\n", w, h); printf("alpha 1\n"); - if (shm_fd >= 0) printf("shm file %s\n", shmfile); + if (shm_fd >= 0) printf("shmfile %s\n", shmfile); else { printf("data\n"); From 49431d4f139744cc9b5c1725ff644c2bf487f90b Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Tue, 31 May 2011 10:22:07 +0000 Subject: [PATCH 026/347] evas_generic_loader: update autotools (from vtorri) SVN revision: 59839 --- legacy/evas_generic_loaders/configure.ac | 4 +++- legacy/evas_generic_loaders/src/bin/Makefile.am | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 125dbe8b94..9a882f4b13 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -68,10 +68,12 @@ PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) -AM_CONDITIONAL(HAVE_RAW, test "x${have_raw}" = "xyes") +AM_CONDITIONAL(HAVE_RAW, [test "x${have_raw}" = "xyes"]) ### Checks for header files +AC_CHECK_HEADERS(netinet/in.h unistd.h) + AC_CHECK_HEADER([zlib.h], [dummy="yes"], [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")]) diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index 498e29d680..e1a99c269f 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -7,10 +7,11 @@ if HAVE_PDF SUBDIRS += pdf endif +if HAVE_PS +SUBDIRS += ps +endif + if HAVE_RAW SUBDIRS += raw endif -if HAVE_PS -SUBDIRS += ps -endif From 671504094c7ca8a70f7ecb2ddce71ba4686efd72 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Tue, 31 May 2011 10:35:17 +0000 Subject: [PATCH 027/347] evas_generic_loader: cleaning raw loader and take into account the comments from vtorri SVN revision: 59840 --- .../evas_generic_loaders/src/bin/raw/main.c | 129 +++++++++++------- 1 file changed, 81 insertions(+), 48 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index 4d10216ecd..5427ee31d3 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -1,6 +1,7 @@ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include -#include #include #include #include @@ -9,6 +10,17 @@ #include #include "shmfile.h" +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include + + #define DATA32 unsigned int #define DATA8 unsigned char @@ -23,14 +35,58 @@ #define D(fmt, args...) #endif +static int fd = -1; +static int seg_size = 0; +static unsigned char *seg = MAP_FAILED; +static libraw_data_t *raw_data = NULL; +static void *data = NULL; +static int width = 0; +static int height = 0; static int -read_raw_header(unsigned char *seg, int size, libraw_data_t *raw_data, int *w, int *h) +_raw_init(const char *file) +{ + struct stat ss; + fd = open(file, O_RDONLY); + if (fd < 0) return EINA_FALSE; + + if (stat(file, &ss)) goto close_file; + seg_size = ss.st_size; + seg = mmap(0, seg_size, PROT_READ, MAP_SHARED, fd, 0); + if (seg == MAP_FAILED) goto close_file; + + D("raw_init\n"); + raw_data = libraw_init(0); + raw_data->params.half_size = 0; + raw_data->params.user_qual = 2; + + D("raw_open_buffer\n"); + if (libraw_open_buffer(raw_data, seg, seg_size) != LIBRAW_SUCCESS) + return EINA_FALSE; + return EINA_TRUE; + +close_file: + close(fd); + return EINA_FALSE; +} + +static void +_raw_shutdown() +{ + D("raw_shutdown\n"); + if (raw_data) + libraw_close(raw_data); + if (seg != MAP_FAILED) munmap(seg, seg_size); + close(fd); +} + +static int +read_raw_header() { int ret; D("raw_open_buffer\n"); - if ((ret = libraw_open_buffer(raw_data, seg, size)) != LIBRAW_SUCCESS) + if ((ret = libraw_open_buffer(raw_data, seg, seg_size)) != LIBRAW_SUCCESS) return 0; D("raw_adjust_size\n"); @@ -43,8 +99,8 @@ read_raw_header(unsigned char *seg, int size, libraw_data_t *raw_data, int *w, i if ((raw_data->sizes.width < 1) || (raw_data->sizes.height < 1)) return 0; - *w = raw_data->sizes.iwidth; - *h = raw_data->sizes.iheight; + width = raw_data->sizes.iwidth; + height = raw_data->sizes.iheight; return 1; @@ -52,19 +108,13 @@ read_raw_header(unsigned char *seg, int size, libraw_data_t *raw_data, int *w, i static int -read_raw_data(unsigned char* seg, int size, libraw_data_t *raw_data, int *w, int *h) +read_raw_data() { int ret, count; libraw_processed_image_t *image = NULL; DATA8 *bufptr; DATA32 *dataptr; - raw_data->params.half_size = 0; - raw_data->params.user_qual = 2; - - D("raw_open_buffer\n"); - if ((ret = libraw_open_buffer(raw_data, seg, size)) != LIBRAW_SUCCESS) - return 0; D("raw_open_unpack\n"); if ((ret = libraw_unpack(raw_data)) != LIBRAW_SUCCESS) @@ -83,12 +133,8 @@ read_raw_data(unsigned char* seg, int size, libraw_data_t *raw_data, int *w, int { if ((image->width < 1) || (image->height < 1)) goto clean_image; - *w = image->width; - *h = image->height; - shm_alloc(image->width * image->height * (sizeof(DATA32))); - if (!shm_addr) - goto clean_image; - memset(shm_addr, 0, image->width * image->height * (sizeof(DATA32))); + width = image->width; + height = image->height; if (image->type != LIBRAW_IMAGE_BITMAP) goto clean_image; if (image->colors != 3) @@ -98,7 +144,12 @@ read_raw_data(unsigned char* seg, int size, libraw_data_t *raw_data, int *w, int for (count = 0; count < image->data_size; count +=2) SWAP(image->data[count], image->data[count + 1]); #undef SWAP - dataptr = shm_addr; + shm_alloc(image->width * image->height * (sizeof(DATA32))); + if (!shm_addr) + goto clean_image; + data = shm_addr; + memset(shm_addr, 0, image->width * image->height * (sizeof(DATA32))); + dataptr = data; bufptr = image->data; for (count = image->width * image->height; count > 0; --count) { @@ -121,12 +172,7 @@ int main(int argc, char **argv) { char *file; int i; - int w = 0, h = 0; int head_only = 0; - int fd; - struct stat ss; - unsigned char *seg = MAP_FAILED; - libraw_data_t *raw_data = NULL; if (argc < 2) return -1; file = argv[1]; @@ -159,46 +205,33 @@ int main(int argc, char **argv) } } - fd = open(file, O_RDONLY); - if (fd < 0) return 0; - if (stat(file, &ss)) goto close_file; - seg = mmap(0, ss.st_size, PROT_READ, MAP_SHARED, fd, 0); - if (seg == MAP_FAILED) goto close_file; - - D("raw_init\n"); - raw_data = libraw_init(0); - + if (!_raw_init(file)) return -1; if (head_only != 0) { - if (read_raw_header(seg, ss.st_size, raw_data, &w, &h)) - printf("size %d %d\n", w, h); + if (read_raw_header()) + { + printf("size %d %d\n", width, height); + printf("alpha 1\n"); + } printf("done\n"); } else { - if (read_raw_data(seg, ss.st_size, raw_data, &w, &h)) + if (read_raw_data()) { - printf("size %d %d\n", w, h); + printf("size %d %d\n", width, height); printf("alpha 1\n"); - if (shm_fd >= 0) printf("shmfile %s\n", shmfile); else { printf("data\n"); - fwrite(shm_addr, w * h * sizeof(DATA32), 1, stdout); + fwrite(data, width * height * sizeof(DATA32), 1, stdout); } shm_free(); } } - D("raw_shutdown\n"); - if (raw_data) - libraw_close(raw_data); - if (seg != MAP_FAILED) munmap(seg, ss.st_size); - close(fd); + _raw_shutdown(); return 0; -close_file: - close(fd); - return -1; } From c4001fcaefed58e1639dd8f9f5247a555b0af886 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 3 Jun 2011 22:38:13 +0000 Subject: [PATCH 028/347] Add gstreamer generic loader SVN revision: 59925 --- legacy/evas_generic_loaders/configure.ac | 18 +- .../evas_generic_loaders/src/bin/Makefile.am | 4 + .../src/bin/gst/Makefile.am | 41 +++ .../evas_generic_loaders/src/bin/gst/main.c | 250 ++++++++++++++++++ 4 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 legacy/evas_generic_loaders/src/bin/gst/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/gst/main.c diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 9a882f4b13..efba0822e0 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -66,6 +66,18 @@ PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) +GST_REQS=0.10.2 +GSTPLUG_REQS=0.10.1 +GST_MAJORMINOR=0.10 + +PKG_CHECK_MODULES([GSTREAMER], + [gstreamer-$GST_MAJORMINOR >= $GST_REQS + gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS + ], + [have_gst="yes"], + [have_gst="no"]) + +AM_CONDITIONAL(HAVE_GST, test "x${have_gst}" = "xyes") AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) AM_CONDITIONAL(HAVE_RAW, [test "x${have_raw}" = "xyes"]) @@ -120,10 +132,11 @@ Makefile src/Makefile src/bin/Makefile src/bin/common/Makefile -src/bin/xcf/Makefile -src/bin/raw/Makefile +src/bin/gst/Makefile src/bin/pdf/Makefile src/bin/ps/Makefile +src/bin/raw/Makefile +src/bin/xcf/Makefile ]) AC_OUTPUT @@ -143,6 +156,7 @@ echo "Configuration Options Summary:" echo echo "Loaders:" echo " XCF..................: yes" +echo " Gstreamer............: ${have_gst}" echo " PDF..................: ${have_poppler}" echo " PS...................: ${have_ps}" echo " RAW..................: ${have_raw}" diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index e1a99c269f..ac0215d552 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -3,6 +3,10 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = common \ xcf +if HAVE_GST +SUBDIRS += gst +endif + if HAVE_PDF SUBDIRS += pdf endif diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am new file mode 100644 index 0000000000..70d2443bda --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -0,0 +1,41 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src \ +-I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/common \ +-I$(top_srcdir)/src/bin/gst \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@GSTREAMER_CFLAGS@ + +bin_PROGRAMS = evas_image_loader.gst + +evas_image_loader_gst_SOURCES = \ +main.cpp \ +$(top_srcdir)/src/bin/common/shmfile.c +evas_image_loader_gst_CFLAGS = +evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ +evas_image_loader_gst_LDFLAGS = + +install-data-hook: + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3g2 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.asf + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.avi + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mkv + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mov + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpeg + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mxf + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.nut + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogg + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.webm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.weba + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.wmv diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c new file mode 100644 index 0000000000..1207cb4fc4 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -0,0 +1,250 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include + +#include + +#include "shmfile.h" + +#define DATA32 unsigned int + +#define GST_DBG + +#ifdef GST_DBG +#define D(fmt, args...) fprintf(stderr, fmt, ## args) +#else +#define D(fmt, args...) +#endif + +#define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000" + +static GstElement *pipeline = NULL; +static GstElement *sink = NULL; +static gint64 duration = -1; + +int width = 0; +int height = 0; +void *data = NULL; + + +static Eina_Bool +_gst_init(const char *filename) +{ + GstPad *pad; + GstCaps *caps; + GstStructure *structure; + gchar *descr; + gchar *uri; + GError *error = NULL; + GstFormat format; + GstStateChangeReturn ret; + + if (!filename || !*filename) + return EINA_FALSE; + + if (!gst_init_check(NULL, NULL, &error)) + return EINA_FALSE; + + if ((*filename == '/') || (*filename == '~')) + { + uri = g_filename_to_uri(filename, NULL, NULL); + if (!uri) + { + D("could not create new uri from %s", filename); + goto unref_pipeline; + } + } + else + uri = strdup(filename); + + D("Setting file %s\n", uri); + + descr = g_strdup_printf("uridecodebin uri=%s ! ffmpegcolorspace ! " + " appsink name=sink caps=\"" CAPS "\"", uri); + pipeline = gst_parse_launch(descr, &error); + free(uri); + + if (error != NULL) + { + D("could not construct pipeline: %s\n", error->message); + g_error_free (error); + goto gst_shutdown; + } + + sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); + + ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); + switch (ret) + { + case GST_STATE_CHANGE_FAILURE: + D("failed to play the file\n"); + goto unref_pipeline; + case GST_STATE_CHANGE_NO_PREROLL: + D("live sources not supported yet\n"); + goto unref_pipeline; + default: + break; + } + + ret = gst_element_get_state((pipeline), NULL, NULL, GST_CLOCK_TIME_NONE); + if (ret == GST_STATE_CHANGE_FAILURE) + { + D("could not complete pause\n"); + goto unref_pipeline; + } + + format = GST_FORMAT_TIME; + gst_element_query_duration (pipeline, &format, &duration); + if (duration == -1) + { + D("could not retrieve the duration, set it to 1s\n"); + duration = 1 * GST_SECOND; + } + + pad = gst_element_get_static_pad(sink, "sink"); + if (!pad) + { + D("could not retrieve the sink pad\n"); + goto unref_pipeline; + } + + caps = gst_pad_get_negotiated_caps(pad); + if (!caps) + goto unref_pad; + + structure = gst_caps_get_structure(caps, 0); + + if (!gst_structure_get_int(structure, "width", &width)) + goto unref_caps; + if (!gst_structure_get_int(structure, "height", &height)) + goto unref_caps; + + gst_caps_unref(caps); + gst_object_unref(pad); + + return EINA_TRUE; + + unref_caps: + gst_caps_unref(caps); + unref_pad: + gst_object_unref(pad); + unref_pipeline: + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref(pipeline); + gst_shutdown: + gst_deinit(); + + return EINA_FALSE; +} + +static void +_gst_shutdown() +{ + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref(pipeline); + gst_deinit(); +} + +static void +_gst_load_image(int size_w, int size_h) +{ + GstBuffer *buffer; + + D("load image\n"); + gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, + duration / 2); + g_signal_emit_by_name(sink, "pull-preroll", &buffer, NULL); + D("load image : %p %d\n", GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); + + shm_alloc(width * height * sizeof(DATA32)); + if (!shm_addr) return; + data = shm_addr; + + memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); +} + +int +main(int argc, char **argv) +{ + char *file; + int i; + int size_w = 0, size_h = 0; + int head_only = 0; + int page = 0; + + if (argc < 2) return -1; + // file is ALWAYS first arg, other options come after + file = argv[1]; + for (i = 2; i < argc; i++) + { + if (!strcmp(argv[i], "-head")) + // asked to only load header, not body/data + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { + i++; + page = atoi(argv[i]); + i++; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { // not used by ps loader + i++; + // int scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { + i++; + } + else if (!strcmp(argv[i], "-opt-size")) + { // not used by ps loader + i++; + size_w = atoi(argv[i]); + i++; + size_h = atoi(argv[i]); + } + } + + D("_gst_init_file\n"); + + if (!_gst_init(file)) + return -1; + D("_gst_init done\n"); + + if (!head_only) + { + _gst_load_image(size_w, size_h); + } + + D("size...: %ix%i\n", width, height); + D("alpha..: 0\n"); + + printf("size %i %i\n", width, height); + printf("alpha 0\n"); + + if (!head_only) + { + if (shm_fd >= 0) + { + printf("shmfile %s\n", shmfile); + } + else + { + // could also to "tmpfile %s\n" like shmfile but just + // a mmaped tmp file on the system + printf("data\n"); + fwrite(data, width * height * sizeof(DATA32), 1, stdout); + } + shm_free(); + } + else + printf("done\n"); + + _gst_shutdown(); + + return 0; +} From f3871d3dc6ba1bbb7b93d08c085068b26735bbdf Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 3 Jun 2011 23:00:31 +0000 Subject: [PATCH 029/347] update TODO and README SVN revision: 59927 --- legacy/evas_generic_loaders/README | 27 +++++++++++++++------------ legacy/evas_generic_loaders/TODO | 4 ++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index c6fd727a7f..94f991c75f 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -4,23 +4,26 @@ evas may run from its generic loader module. Generic loaders currently provided: XCF (.xcf .xcf.gz) - PDF - (use -key option to specific what page to get and load options for size - and use poppler and/or mupdf - look at epdf) - PS - (use -key option to specific what page to get and load options for size - and use ghostscript (libgs) to render etc.) -Wanted: + PDF (using poppler) + use -key option to specific what page to get and load options for size + Should we add mupdf ? - RAW - (libopenraw1 ??) + PS (using libspectre) + use -key option to specific what page to get and load options for size + Should we use directly libgs ? + + RAW (using libraw) + + MPG/AVI/OGV/MOV/MKV/WMV etc. (using Gstreamer) + Should we add libxine and vlc ? Possible fun ones: - MPG/AVI/OGV/MOV/MKV/WMV etc. - (use gstreamer and/or libxine or libvlc and snap one frame from the - middle somewhere) + DVI (using DVIlib, see edvi) + + DJVU (using libdjvu) + PPT/PPTX (beats me how u can render a page from these without a whole office impl - but worth a try? libopenoffice/libllibreoffice if diff --git a/legacy/evas_generic_loaders/TODO b/legacy/evas_generic_loaders/TODO index 47d3388b23..6081f9a61c 100644 --- a/legacy/evas_generic_loaders/TODO +++ b/legacy/evas_generic_loaders/TODO @@ -7,6 +7,6 @@ Modules to add: [X] PS [ ] DVI [ ] Djvu - [ ] video files - [ ] RAW + [X] video files + [X] RAW [ ] PPT/PPTX From c228a9b3a09d49fccb85070dfa16ff8da14a3ef9 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 3 Jun 2011 23:35:32 +0000 Subject: [PATCH 030/347] increase requested gstreamer versions SVN revision: 59928 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index efba0822e0..029f30e72d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -66,8 +66,8 @@ PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) -GST_REQS=0.10.2 -GSTPLUG_REQS=0.10.1 +GST_REQS=0.10.13 +GSTPLUG_REQS=0.10.13 GST_MAJORMINOR=0.10 PKG_CHECK_MODULES([GSTREAMER], From e5a8e331b73765f20aafa6108405ca349e319219 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 3 Jun 2011 23:52:36 +0000 Subject: [PATCH 031/347] add some more format extensions gst loader handles SVN revision: 59929 --- legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index 70d2443bda..b4bf1c44e1 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -22,20 +22,33 @@ evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_gst_LDFLAGS = install-data-hook: + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.263 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3g2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gpp + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gpp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3p2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.asf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.avi + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.fla + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.flv + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m1v + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2v ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mkv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mov ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpe ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpeg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mxf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.nut ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.swf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.webm ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.weba ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.wmv From 78a266ab46b347bcf140c5629324fd25ee58ddbf Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 3 Jun 2011 23:57:45 +0000 Subject: [PATCH 032/347] oops. meant 264 SVN revision: 59930 --- legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index b4bf1c44e1..aeca60ce7b 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -22,7 +22,7 @@ evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_gst_LDFLAGS = install-data-hook: - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.263 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.264 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3g2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp2 From f94d2a7aab0806c7c658c37f563ebab9397560d8 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 4 Jun 2011 00:00:18 +0000 Subject: [PATCH 033/347] add a note for extensions SVN revision: 59931 --- legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index aeca60ce7b..d7f8bbd088 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -21,6 +21,9 @@ evas_image_loader_gst_CFLAGS = evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_gst_LDFLAGS = +## good list of extensions: +## http://www.fileinfo.com/filetypes/video +## should check which ones gst does support and make sure they are here install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.264 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3g2 @@ -49,6 +52,7 @@ install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rm ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.swf + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ts ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.webm ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.weba ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.wmv From bb34b5d566939a062d0d19d7738e45506b6002b3 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 4 Jun 2011 03:07:18 +0000 Subject: [PATCH 034/347] extn++ SVN revision: 59944 --- legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index d7f8bbd088..c2eb0d23ce 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -41,6 +41,7 @@ install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mkv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mov ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m4v ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpe From 3b156e3c437334c2a115b1109624c1e0b956492f Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 4 Jun 2011 03:16:27 +0000 Subject: [PATCH 035/347] add more extn handlers SVN revision: 59945 --- .../src/bin/gst/Makefile.am | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index c2eb0d23ce..cf7a9aabbc 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -34,24 +34,41 @@ install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3p2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.asf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.avi + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdmv + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.clpi + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.cpi ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.fla ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.flv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m1v ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2v + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m4v ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mkv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mov ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m4v + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2t + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpl ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2ts ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpe ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpeg + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpls + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpl + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpls + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mts ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mxf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.nut + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.nuv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogm ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmj + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rms + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmx + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmvb ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.swf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ts ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.webm From 6d96b114b63069ff33463b040ef471ce49d40ed0 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 4 Jun 2011 05:26:39 +0000 Subject: [PATCH 036/347] sort extns alpahbetically SVN revision: 59949 --- legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index cf7a9aabbc..797ed74be1 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -34,26 +34,24 @@ install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3p2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.asf ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.avi - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdmv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdm + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdmv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.clpi ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.cpi ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.fla ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.flv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m1v + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2t ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2v ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m4v ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mkv ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mov - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2t - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpl - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2ts + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpe ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpeg - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpls + ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpl ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpls ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mts From 0ffa9cfab3310e907b1b64162031f7f64d450560 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 9 Jun 2011 14:10:50 +0000 Subject: [PATCH 037/347] libraw - also link to -lm SVN revision: 60133 --- legacy/evas_generic_loaders/src/bin/raw/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am index 8dbac3c15b..461ecf6711 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am @@ -16,7 +16,7 @@ bin_PROGRAMS = evas_image_loader.raw evas_image_loader_raw_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ -evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ +evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ -lm evas_image_loader_raw_LDFLAGS = endif From 587114e14970448d98cc254f5802fef044971f99 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 2 Aug 2011 04:13:33 +0000 Subject: [PATCH 038/347] that's it - remove autom4te.cache dirs again... - keep having to many problems about it storing invalid config when the same build trees are shared between multiple architectures and machines. :( better we build right than build fast. SVN revision: 61974 --- legacy/evas_generic_loaders/autogen.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/evas_generic_loaders/autogen.sh b/legacy/evas_generic_loaders/autogen.sh index b7397d458f..00116eaf80 100755 --- a/legacy/evas_generic_loaders/autogen.sh +++ b/legacy/evas_generic_loaders/autogen.sh @@ -1,5 +1,8 @@ #!/bin/sh +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh + touch README touch ABOUT-NLS From 03b2949f799bbbff174b9d19c691b68683a05482 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Thu, 1 Sep 2011 19:04:15 +0000 Subject: [PATCH 039/347] Add generic player backend (with vlc player). This generic player backend executes a separate player in another process. It receives the bytes to be drawn on the emotion object through a shared memory, and communicates with the player through a pipe, using the player standard input/output. The player must communicate with emotion using the defined commands specified in the Emotion_Generic_Plugin.h. It doesn't need to link against emotion, just include this file for easier implementation. This implementation was sponsored by Zodiac Aerospace. SVN revision: 63062 --- .../emotion_generic_players/src/Makefile.am | 8 + .../src/vlc/Makefile.am | 19 + .../src/vlc/emotion_generic_vlc.c | 700 ++++++++++++++++++ 3 files changed, 727 insertions(+) create mode 100644 legacy/emotion_generic_players/src/Makefile.am create mode 100644 legacy/emotion_generic_players/src/vlc/Makefile.am create mode 100644 legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c diff --git a/legacy/emotion_generic_players/src/Makefile.am b/legacy/emotion_generic_players/src/Makefile.am new file mode 100644 index 0000000000..ad31accc35 --- /dev/null +++ b/legacy/emotion_generic_players/src/Makefile.am @@ -0,0 +1,8 @@ + +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = + +if EMOTION_BUILD_VLC +SUBDIRS += vlc +endif diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am new file mode 100644 index 0000000000..4089b11e24 --- /dev/null +++ b/legacy/emotion_generic_players/src/vlc/Makefile.am @@ -0,0 +1,19 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/modules \ +-I$(top_srcdir)/src/modules/generic \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@VLC_CFLAGS@ + +pkgdir = $(libdir)/emotion/generic_players/$(MODULE_ARCH) + +bin_PROGRAMS = em_generic_vlc + +em_generic_vlc_SOURCES = emotion_generic_vlc.c +em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h +em_generic_vlc_LDADD = @VLC_LIBS@ diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c new file mode 100644 index 0000000000..773bbe9b7a --- /dev/null +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -0,0 +1,700 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +enum _Thread_Events { + EM_THREAD_POSITION_CHANGED, + EM_THREAD_LAST +}; + +struct _App { + Emotion_Generic_Video_Shared *vs; + Emotion_Generic_Video_Frame vf; + libvlc_instance_t *libvlc; + libvlc_media_t *m; + libvlc_media_player_t *mp; + libvlc_event_manager_t *event_mgr; + libvlc_event_manager_t *mevent_mgr; + char *filename; + char *shmname; + int w, h; + int fd_read; + int fd_write; + int size_sent; + int opening; + int closing; + int playing; +}; + +static pthread_mutex_t _mutex_fd = PTHREAD_MUTEX_INITIALIZER; + +int +_em_read_safe(int fd, void *buf, ssize_t size) +{ + ssize_t todo; + char *p; + + todo = size; + p = buf; + + while (todo > 0) + { + ssize_t r; + + r = read(fd, p, todo); + if (r > 0) + { + todo -= r; + p += r; + } + else if (r == 0) + return 0; + else + { + if (errno == EINTR || errno == EAGAIN) + continue; + else + { + fprintf(stderr, "could not read from fd %d: %s", + fd, strerror(errno)); + return 0; + } + } + } + + return 1; +} + +int +_em_write_safe(int fd, const void *buf, ssize_t size) +{ + ssize_t todo; + const char *p; + + todo = size; + p = buf; + + while (todo > 0) + { + ssize_t r; + + r = write(fd, p, todo); + if (r > 0) + { + todo -= r; + p += r; + } + else if (r == 0) + return 0; + else + { + if (errno == EINTR || errno == EAGAIN) + continue; + else + { + fprintf(stderr, "could not write to fd %d: %s", + fd, strerror(errno)); + return 0; + } + } + } + + return 1; +} + +static int +_em_str_read(char **str) +{ + int size; + int r; + char buf[PATH_MAX]; + + r = _em_read_safe(STDIN_FILENO, &size, sizeof(size)); + if (!r) + { + *str = NULL; + return 0; + } + + if (!size) + { + *str = NULL; + return 1; + } + + r = _em_read_safe(STDIN_FILENO, buf, size); + if (!r) + { + *str = NULL; + return 0; + } + + *str = strdup(buf); + return 1; +} + +static int +_em_cmd_read(void) +{ + int cmd; + _em_read_safe(STDIN_FILENO, &cmd, sizeof(cmd)); + + return cmd; +} + +static void +_send_cmd_start(int cmd) +{ + pthread_mutex_lock(&_mutex_fd); + _em_write_safe(STDOUT_FILENO, &cmd, sizeof(cmd)); +} + +static void +_send_cmd_finish(void) +{ + static const char c = '\n'; + _em_write_safe(STDOUT_FILENO, &c, sizeof(c)); + pthread_mutex_unlock(&_mutex_fd); +} + +static void +_send_cmd(int cmd) +{ + _send_cmd_start(cmd); + _send_cmd_finish(); +} + +static void +_send_cmd_str(const char *str) +{ + int len; + len = strlen(str) + 1; + _em_write_safe(STDOUT_FILENO, &len, sizeof(len)); + _em_write_safe(STDOUT_FILENO, str, len); +} + +#define SEND_CMD_PARAM(i) \ + _em_write_safe(STDOUT_FILENO, &(i), sizeof((i))); + +static void +_send_resize(int width, int height) +{ + _send_cmd_start(EM_RESULT_FRAME_SIZE); + SEND_CMD_PARAM(width); + SEND_CMD_PARAM(height); + _send_cmd_finish(); +} + +static void +_send_length_changed(const struct libvlc_event_t *ev) +{ + float length = ev->u.media_player_length_changed.new_length; + length /= 1000; + + fprintf(stderr, "length changed: %0.3f\n", length); + _send_cmd_start(EM_RESULT_LENGTH_CHANGED); + SEND_CMD_PARAM(length); + _send_cmd_finish(); +} + +static void +_send_time_changed(const struct libvlc_event_t *ev) +{ + float new_time = ev->u.media_player_time_changed.new_time; + new_time /= 1000; + _send_cmd_start(EM_RESULT_POSITION_CHANGED); + SEND_CMD_PARAM(new_time); + _send_cmd_finish(); +} + +static void +_send_seekable_changed(const struct libvlc_event_t *ev) +{ + int seekable = ev->u.media_player_seekable_changed.new_seekable; + _send_cmd_start(EM_RESULT_SEEKABLE_CHANGED); + SEND_CMD_PARAM(seekable); + _send_cmd_finish(); +} + +static void * +_lock(void *data, void **pixels) +{ + struct _App *app = data; + + if (app->playing) + *pixels = app->vf.frames[app->vs->frame.player]; + else + *pixels = NULL; + + return NULL; // picture identifier, not needed here +} + +static void +_unlock(void *data, void *id, void *const *pixels) +{ + struct _App *app = data; + + if (!app->playing) + return; + + sem_wait(&app->vs->lock); + app->vs->frame.last = app->vs->frame.player; + app->vs->frame.player = app->vs->frame.next; + app->vs->frame.next = app->vs->frame.last; + + sem_post(&app->vs->lock); +} + +static void +_display(void *data, void *id) +{ + struct _App *app = data; + if (!app->playing) + return; + + _send_cmd(EM_RESULT_FRAME_NEW); +} + +static void * +_tmp_lock(void *data, void **pixels) +{ + *pixels = NULL; + return NULL; +} + +static void +_tmp_unlock(void *data, void *id, void *const *pixels) +{ +} + +static void +_tmp_display(void *data, void *id) +{ +} + +static void +_play(struct _App *app) +{ + float pos; + + if (!app->mp) + return; + + _em_read_safe(STDIN_FILENO, &pos, sizeof(pos)); + + if (app->playing) + { + libvlc_media_player_set_pause(app->mp, 0); + } + else + { + libvlc_time_t new_time = pos * 1000; + libvlc_media_player_play(app->mp); + libvlc_media_player_set_time(app->mp, new_time); + app->playing = 1; + } +} + +static void +_stop(struct _App *app) +{ + if (app->mp) + libvlc_media_player_set_pause(app->mp, 1); +} + +static void +_send_file_closed(struct _App *app) +{ + app->closing = 0; + emotion_generic_shm_free(app->vs); + _send_cmd(EM_RESULT_FILE_CLOSE); +} + +static void +_send_file_set(struct _App *app) +{ + if (app->opening) + _send_cmd(EM_RESULT_FILE_SET); + + if (app->closing) + _send_file_closed(app); +} + +static void +_event_cb(const struct libvlc_event_t *ev, void *data) +{ + struct _App *app = data; + int thread_event; + + switch (ev->type) { + case libvlc_MediaPlayerTimeChanged: + _send_time_changed(ev); + break; + case libvlc_MediaPlayerPositionChanged: + thread_event = EM_THREAD_POSITION_CHANGED; + write(app->fd_write, &thread_event, sizeof(thread_event)); + break; + case libvlc_MediaPlayerLengthChanged: + _send_length_changed(ev); + break; + case libvlc_MediaPlayerSeekableChanged: + _send_seekable_changed(ev); + break; + case libvlc_MediaPlayerPlaying: + _send_resize(app->w, app->h); + break; + case libvlc_MediaPlayerStopped: + _send_file_set(app); + break; + case libvlc_MediaPlayerEndReached: + _send_cmd(EM_RESULT_PLAYBACK_STOPPED); + break; + } +} + +static void +_file_set(struct _App *app) +{ + _em_str_read(&app->filename); + + app->m = libvlc_media_new_path(app->libvlc, app->filename); + if (!app->m) + { + fprintf(stderr, "could not open path: \"%s\"\n", app->filename); + return; + } + app->mp = libvlc_media_player_new_from_media(app->m); + + if (!app->mp) + { + fprintf(stderr, "could not create new player from media.\n"); + return; + } + + app->opening = 1; + libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); + libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, NULL); + app->event_mgr = libvlc_media_player_event_manager(app->mp); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, + _event_cb, app); + + app->mevent_mgr = libvlc_media_event_manager(app->m); + + libvlc_audio_set_mute(app->mp, 1); + libvlc_media_player_play(app->mp); +} + +static void +_position_set(struct _App *app) +{ + if (!app->mp) + return; + + float position; + _em_read_safe(STDIN_FILENO, &position, sizeof(position)); + + libvlc_time_t new_time = position * 1000; + libvlc_media_player_set_time(app->mp, new_time); +} + +static void +_speed_set(struct _App *app) +{ + float rate; + + if (!app->mp) + return; + + _em_read_safe(STDIN_FILENO, &rate, sizeof(rate)); + + libvlc_media_player_set_rate(app->mp, rate); +} + +static void +_mute_set(struct _App *app) +{ + int mute; + + if (!app->mp) + return; + + _em_read_safe(STDIN_FILENO, &mute, sizeof(mute)); + + libvlc_audio_set_mute(app->mp, mute); +} + +static void +_volume_set(struct _App *app) +{ + float volume; + int vol; + + if (!app->mp) + return; + + _em_read_safe(STDIN_FILENO, &volume, sizeof(volume)); + vol = volume * 100; + + libvlc_audio_set_volume(app->mp, vol); +} + +static void +_audio_track_set(struct _App *app) +{ + int track; + + _em_read_safe(STDIN_FILENO, &track, sizeof(track)); + + libvlc_audio_set_track(app->mp, track); +} + +static void +_file_set_done(struct _App *app) +{ + emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); + app->w = app->vs->width; + app->h = app->vs->height; + libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); + libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); + app->opening = 0; + + + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, + _event_cb, app); + + libvlc_audio_set_mute(app->mp, 0); + _send_cmd(EM_RESULT_FILE_SET_DONE); +} + +static void +_file_close(struct _App *app) +{ + app->playing = 0; + if (libvlc_media_player_get_state(app->mp) != libvlc_Playing) + { + _send_file_closed(app); + return; + } + + app->closing = 1; + libvlc_media_player_stop(app->mp); + if (app->filename) + free(app->filename); + if (app->mp) + { + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + } +} + +static void +_process_emotion_commands(struct _App *app) +{ + int cmd = _em_cmd_read(); + switch (cmd) { + case EM_CMD_FILE_SET: + _file_set(app); + break; + case EM_CMD_FILE_SET_DONE: + _file_set_done(app); + break; + case EM_CMD_FILE_CLOSE: + _file_close(app); + break; + case EM_CMD_PLAY: + _play(app); + break; + case EM_CMD_STOP: + _stop(app); + break; + case EM_CMD_POSITION_SET: + _position_set(app); + break; + case EM_CMD_SPEED_SET: + _speed_set(app); + break; + case EM_CMD_AUDIO_MUTE_SET: + _mute_set(app); + break; + case EM_CMD_VOLUME_SET: + _volume_set(app); + break; + case EM_CMD_AUDIO_TRACK_SET: + _audio_track_set(app); + break; + }; +} + +static void +_send_track_info(libvlc_media_player_t *mp) +{ + int track_count, current; + libvlc_track_description_t *desc; + + current = libvlc_audio_get_track(mp); + track_count = libvlc_audio_get_track_count(mp); + desc = libvlc_audio_get_track_description(mp); + + _send_cmd_start(EM_RESULT_AUDIO_TRACK_INFO); + SEND_CMD_PARAM(current); + SEND_CMD_PARAM(track_count); + while (desc) + { + int tid = desc->i_id; + const char *name = desc->psz_name; + SEND_CMD_PARAM(tid); + _send_cmd_str(name); + desc = desc->p_next; + } + _send_cmd_finish(); +} + +static void +_position_changed(struct _App *app) +{ + if (!app->opening) + return; + + /* sending size info only once */ + int r, w, h; + r = libvlc_video_get_size(app->mp, 0, &w, &h); + if (r < 0) + return; + _send_resize(w, h); + + /* sending audio track info */ + // _send_track_info(app->mp); + + libvlc_media_player_stop(app->mp); +} + +static void +_process_thread_events(struct _App *app) +{ + int event; + size_t size; + + size = read(app->fd_read, &event, sizeof(event)); + if (size != sizeof(event)) + { + fprintf(stderr, "player: problem when reading thread event. size = %zd\n", size); + return; + } + + switch (event) { + case EM_THREAD_POSITION_CHANGED: + _position_changed(app); + break; + } +} + +int +main(int argc, const char *argv[]) +{ + struct _App app; + Emotion_Generic_Video_Shared *vs; + struct pollfd fds[2]; // watching on 2 file descriptors + int tpipe[2]; // pipe for comunicating events from threads + char shmname[256]; + char cwidth[64], cheight[64], cpitch[64], chroma[64]; + char buf[64]; + const char *vlc_argv[] = + { + "--quiet", + "--vout", + "vmem", + "--vmem-width", + cwidth, + "--vmem-height", + cheight, + "--vmem-pitch", + cpitch, + "--vmem-chroma", + chroma + }; + + int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); + snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH); + snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT); + snprintf(cpitch, sizeof(cpitch), "%d", DEFAULTWIDTH * 4); + snprintf(chroma, sizeof(chroma), "RV32"); + + app.libvlc = libvlc_new(vlc_argc, vlc_argv); + app.mp = NULL; + app.filename = NULL; + app.w = 0; + app.h = 0; + app.size_sent = 0; + app.opening = 0; + app.playing = 0; + app.closing = 0; + + if (_em_cmd_read() != EM_CMD_INIT) + { + fprintf(stderr, "player: wrong init command!\n"); + return -1; + } + + int size; + _em_read_safe(STDIN_FILENO, &size, sizeof(size)); + _em_read_safe(STDIN_FILENO, buf, size); + app.shmname = strdup(buf); + + _send_cmd(EM_RESULT_INIT); + + pipe(tpipe); + app.fd_read = tpipe[0]; + app.fd_write = tpipe[1]; + fds[0].fd = STDIN_FILENO; + fds[0].events = POLLIN; + fds[1].fd = app.fd_read; + fds[1].events = POLLIN; + + while (1) + { + int r; + + r = poll(fds, 2, 30); + if (r == 0) + continue; + else if (r < 0) + { + fprintf(stderr, "an error ocurred on poll().\n"); + break; + } + + if (fds[0].revents & POLLIN) + _process_emotion_commands(&app); + if (fds[1].revents & POLLIN) + _process_thread_events(&app); + } + + libvlc_release(app.libvlc); + + + return 0; +} +#undef SEND_CMD_PARAM From 9bd7579d920d4bfdc118e65ac341f3b5e714344b Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Thu, 1 Sep 2011 23:45:18 +0000 Subject: [PATCH 040/347] emotion: use eina_prefix to determine player location. Move players from $bindir to $libdir/emotion/utils and find them with eina_prefix. I was willing to play with this prefix thing, quite nice ;-) SVN revision: 63077 --- legacy/emotion_generic_players/src/vlc/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am index 4089b11e24..c32906e59f 100644 --- a/legacy/emotion_generic_players/src/vlc/Makefile.am +++ b/legacy/emotion_generic_players/src/vlc/Makefile.am @@ -10,9 +10,8 @@ AM_CPPFLAGS = \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @VLC_CFLAGS@ -pkgdir = $(libdir)/emotion/generic_players/$(MODULE_ARCH) - -bin_PROGRAMS = em_generic_vlc +internal_bindir = $(libdir)/emotion/utils +internal_bin_PROGRAMS = em_generic_vlc em_generic_vlc_SOURCES = emotion_generic_vlc.c em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h From 45b02a26cc448fe0da895ef12799ce718684fecb Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 2 Sep 2011 01:34:07 +0000 Subject: [PATCH 041/347] emotion/generic/vlc: die when parent dies. nasty fix for a nasty emotion behavior :-/ SVN revision: 63080 --- .../src/vlc/emotion_generic_vlc.c | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 773bbe9b7a..a9b8fd72ae 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -14,6 +14,9 @@ #include #include +#include +#include + #include #include @@ -616,7 +619,7 @@ main(int argc, const char *argv[]) { struct _App app; Emotion_Generic_Video_Shared *vs; - struct pollfd fds[2]; // watching on 2 file descriptors + struct pollfd fds[3]; int tpipe[2]; // pipe for comunicating events from threads char shmname[256]; char cwidth[64], cheight[64], cpitch[64], chroma[64]; @@ -642,6 +645,17 @@ main(int argc, const char *argv[]) snprintf(cpitch, sizeof(cpitch), "%d", DEFAULTWIDTH * 4); snprintf(chroma, sizeof(chroma), "RV32"); + /* + * Naughty xattr in emotion uses ecore_thread to run its thing, this + * may leave emotion's reference count high and it won't kill us... + * letting us play the video in the background. not good. + * + * prctl(PR_SET_PDEATHSIG) is a linux only thing. Need to find ways + * to do it on other platforms. Until then leave it breaking on + * such platforms so people port it instead of ignoring. + */ + prctl(PR_SET_PDEATHSIG, SIGHUP); + app.libvlc = libvlc_new(vlc_argc, vlc_argv); app.mp = NULL; app.filename = NULL; @@ -672,24 +686,43 @@ main(int argc, const char *argv[]) fds[0].events = POLLIN; fds[1].fd = app.fd_read; fds[1].events = POLLIN; + fds[2].fd = STDERR_FILENO; + fds[2].events = 0; while (1) { int r; - r = poll(fds, 2, 30); + r = poll(fds, 3, -1); if (r == 0) continue; else if (r < 0) { - fprintf(stderr, "an error ocurred on poll().\n"); + fprintf(stderr, + "emotion_generic_vlc: an error ocurred on poll(): %s\n", + strerror(errno)); break; } + if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) + { + fputs("emotion_generic_vlc: error communicating with stdin\n", + stderr); + break; + } + if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) + { + fputs("emotion_generic_vlc: error communicating with thread\n", + stderr); + break; + } + if (fds[0].revents & POLLIN) _process_emotion_commands(&app); if (fds[1].revents & POLLIN) _process_thread_events(&app); + if (fds[2].revents & (POLLERR | POLLHUP | POLLNVAL)) + break; } libvlc_release(app.libvlc); From 9384fe7712d7656210005feaadaed3fac1fadb8e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 3 Sep 2011 03:49:00 +0000 Subject: [PATCH 042/347] and make the generic loaders project actually put loaders in the new location SVN revision: 63104 --- .../src/bin/gst/Makefile.am | 95 ++++++++++--------- .../src/bin/pdf/Makefile.am | 1 + .../src/bin/ps/Makefile.am | 1 + .../src/bin/raw/Makefile.am | 39 ++++---- .../src/bin/xcf/Makefile.am | 3 +- 5 files changed, 72 insertions(+), 67 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index 797ed74be1..dbde260d63 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -13,6 +13,7 @@ AM_CPPFLAGS = \ @GSTREAMER_CFLAGS@ bin_PROGRAMS = evas_image_loader.gst +bindir = $(libdir)/evas/utils evas_image_loader_gst_SOURCES = \ main.cpp \ @@ -25,50 +26,50 @@ evas_image_loader_gst_LDFLAGS = ## http://www.fileinfo.com/filetypes/video ## should check which ones gst does support and make sure they are here install-data-hook: - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.264 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3g2 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gp2 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gpp - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3gpp2 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.3p2 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.asf - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.avi - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdm - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.bdmv - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.clpi - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.cpi - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.fla - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.flv - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m1v - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2t - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m2v - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.m4v - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mkv - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mov - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp2ts - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mp4 - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpe - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpeg - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpg - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpl - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mpls - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mts - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.mxf - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.nut - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.nuv - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogg - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogm - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ogv - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rm - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmj - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmm - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rms - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmx - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.rmvb - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.swf - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.ts - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.webm - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.weba - ln -sf evas_image_loader.gst $(DESTDIR)$(bindir)/evas_image_loader.wmv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.264 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3g2 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gp + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gpp + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gpp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3p2 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.asf + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.avi + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.bdm + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.bdmv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.clpi + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cpi + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.fla + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.flv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m1v + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m2t + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m2v + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m4v + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mkv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mov + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mp2 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mp2ts + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mp4 + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpe + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpeg + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpg + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpl + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpls + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mts + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mxf + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nut + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nuv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogg + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogm + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rm + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmj + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmm + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rms + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmx + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmvb + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.swf + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ts + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.webm + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.weba + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.wmv diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am index a909b01e22..5fc4f235d2 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am @@ -13,6 +13,7 @@ AM_CPPFLAGS = \ @POPPLER_CFLAGS@ bin_PROGRAMS = evas_image_loader.pdf +bindir = $(libdir)/evas/utils evas_image_loader_pdf_SOURCES = \ main.cpp \ diff --git a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am index f0c3ba5180..95f025ecfe 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am @@ -13,6 +13,7 @@ AM_CPPFLAGS = \ @SPECTRE_CFLAGS@ bin_PROGRAMS = evas_image_loader.ps +bindir = $(libdir)/evas/utils evas_image_loader_ps_SOURCES = \ main.c \ diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am index 461ecf6711..6424943c66 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am @@ -13,6 +13,7 @@ AM_CPPFLAGS = \ if HAVE_RAW bin_PROGRAMS = evas_image_loader.raw +bindir = $(libdir)/evas/utils evas_image_loader_raw_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ @@ -21,22 +22,22 @@ evas_image_loader_raw_LDFLAGS = endif install-data-hook: - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.arw - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.cr2 - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.crw - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.dcr - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.dng - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.k25 - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.kdc - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.erf - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.mrw - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.nef - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.nrf - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.nrw - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.orf - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.rw2 - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.pef - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.raf - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.sr2 - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.srf - ln -sf evas_image_loader.raw $(DESTDIR)$(bindir)/evas_image_loader.x3f + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.arw + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cr2 + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.crw + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dcr + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dng + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.k25 + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.kdc + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.erf + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mrw + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nef + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nrf + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nrw + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.orf + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rw2 + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pef + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.raf + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.sr2 + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.srf + ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.x3f diff --git a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am index 6c85eb2105..6f2205146e 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am @@ -12,6 +12,7 @@ AM_CPPFLAGS = \ @EINA_CFLAGS@ bin_PROGRAMS = evas_image_loader.xcf +bindir = $(libdir)/evas/utils evas_image_loader_xcf_SOURCES = \ main.c pixelfuncs.c common.h \ @@ -21,4 +22,4 @@ evas_image_loader_xcf_LDADD = @EINA_LIBS@ -lz -lm @SHM_OPEN_LIBS@ evas_image_loader_xcf_LDFLAGS = install-data-hook: - ln -sf evas_image_loader.xcf $(DESTDIR)$(bindir)/evas_image_loader.xcf.gz + ln -sf evas_image_loader.xcf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xcf.gz From 7b0656f7118af1b17ce6585b7cd89af492fa2dda Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Sat, 3 Sep 2011 20:47:28 +0000 Subject: [PATCH 043/347] Emotion: Really disable vlc SVN revision: 63132 --- legacy/emotion_generic_players/src/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/Makefile.am b/legacy/emotion_generic_players/src/Makefile.am index ad31accc35..7d1f5d8ed2 100644 --- a/legacy/emotion_generic_players/src/Makefile.am +++ b/legacy/emotion_generic_players/src/Makefile.am @@ -3,6 +3,6 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = -if EMOTION_BUILD_VLC -SUBDIRS += vlc -endif +#if EMOTION_BUILD_VLC +#SUBDIRS += vlc +#endif From 121b2c5ca866e84ae3533b5b8732e8213dadb854 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sun, 4 Sep 2011 00:07:41 +0000 Subject: [PATCH 044/347] remove old vlc, fix build bugs and introduce m4 for generic players. Previous commit to disable VLC messed everything, so this one fixes it doing: - remove old src/modules/vlc and related. - add EMOTION_CHECK_GENERIC_PLAYER() m4 macro - change previous EMOTION_BUILD_VLC to EMOTION_BUILD_GENERIC_VLC SVN revision: 63140 --- legacy/emotion_generic_players/src/Makefile.am | 6 +++--- legacy/emotion_generic_players/src/vlc/Makefile.am | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/src/Makefile.am b/legacy/emotion_generic_players/src/Makefile.am index 7d1f5d8ed2..bbdd8c34b6 100644 --- a/legacy/emotion_generic_players/src/Makefile.am +++ b/legacy/emotion_generic_players/src/Makefile.am @@ -3,6 +3,6 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = -#if EMOTION_BUILD_VLC -#SUBDIRS += vlc -#endif +if EMOTION_BUILD_GENERIC_VLC +SUBDIRS += vlc +endif diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am index c32906e59f..6d6a9f2b85 100644 --- a/legacy/emotion_generic_players/src/vlc/Makefile.am +++ b/legacy/emotion_generic_players/src/vlc/Makefile.am @@ -8,11 +8,11 @@ AM_CPPFLAGS = \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@VLC_CFLAGS@ +@GENERIC_VLC_CFLAGS@ internal_bindir = $(libdir)/emotion/utils internal_bin_PROGRAMS = em_generic_vlc em_generic_vlc_SOURCES = emotion_generic_vlc.c em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h -em_generic_vlc_LDADD = @VLC_LIBS@ +em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ From 1e6ae18dee541d37d4639b6547830665b1976e66 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 5 Sep 2011 13:11:53 +0000 Subject: [PATCH 045/347] emotion/generic: Add return value to EM_RESULT_FILE_SET_DONE. It now checks if was possible to get the shared memory, and returns true or false. This will command will also be used later to return false for file opening no matter what was the problem, and maybe the int parameter will indicate the type of error. SVN revision: 63197 --- .../src/vlc/emotion_generic_vlc.c | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index a9b8fd72ae..0df7c00f9d 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -471,12 +471,27 @@ _audio_track_set(struct _App *app) static void _file_set_done(struct _App *app) { - emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); + int r; + + app->opening = 0; + + r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); + if (!r) + { + free(app->filename); + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + app->filename = NULL; + app->m = NULL; + app->mp = NULL; + _send_cmd_start(EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(r); + _send_cmd_finish(); + } app->w = app->vs->width; app->h = app->vs->height; libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); - app->opening = 0; libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, @@ -489,7 +504,10 @@ _file_set_done(struct _App *app) _event_cb, app); libvlc_audio_set_mute(app->mp, 0); - _send_cmd(EM_RESULT_FILE_SET_DONE); + + _send_cmd_start(EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(r); + _send_cmd_finish(); } static void From 1c86f28c6ffc6c991689b9c8e100ec8226d90584 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 5 Sep 2011 13:12:17 +0000 Subject: [PATCH 046/347] emotion/generic - Use pipes instead of stdin/stdout for communication. Now the player will have the stdin and stdout available for anything else, and there's no need to make line-buffering with ecore_exe anymore. SVN revision: 63198 --- .../src/vlc/emotion_generic_vlc.c | 164 ++++++++++-------- 1 file changed, 88 insertions(+), 76 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 0df7c00f9d..425aeb4d60 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -36,8 +36,10 @@ struct _App { char *filename; char *shmname; int w, h; - int fd_read; - int fd_write; + int fd_read; // read commands from theads here + int fd_write; // write commands from threads here + int em_read; // read commands from emotion here + int em_write; // write commands to emotion here int size_sent; int opening; int closing; @@ -121,13 +123,13 @@ _em_write_safe(int fd, const void *buf, ssize_t size) } static int -_em_str_read(char **str) +_em_str_read(int fd, char **str) { int size; int r; char buf[PATH_MAX]; - r = _em_read_safe(STDIN_FILENO, &size, sizeof(size)); + r = _em_read_safe(fd, &size, sizeof(size)); if (!r) { *str = NULL; @@ -140,7 +142,7 @@ _em_str_read(char **str) return 1; } - r = _em_read_safe(STDIN_FILENO, buf, size); + r = _em_read_safe(fd, buf, size); if (!r) { *str = NULL; @@ -152,86 +154,84 @@ _em_str_read(char **str) } static int -_em_cmd_read(void) +_em_cmd_read(struct _App *app) { int cmd; - _em_read_safe(STDIN_FILENO, &cmd, sizeof(cmd)); + _em_read_safe(app->em_read, &cmd, sizeof(cmd)); return cmd; } static void -_send_cmd_start(int cmd) +_send_cmd_start(struct _App *app, int cmd) { pthread_mutex_lock(&_mutex_fd); - _em_write_safe(STDOUT_FILENO, &cmd, sizeof(cmd)); + _em_write_safe(app->em_write, &cmd, sizeof(cmd)); } static void -_send_cmd_finish(void) +_send_cmd_finish(struct _App *app) { - static const char c = '\n'; - _em_write_safe(STDOUT_FILENO, &c, sizeof(c)); pthread_mutex_unlock(&_mutex_fd); } static void -_send_cmd(int cmd) +_send_cmd(struct _App *app, int cmd) { - _send_cmd_start(cmd); - _send_cmd_finish(); + _send_cmd_start(app, cmd); + _send_cmd_finish(app); } static void -_send_cmd_str(const char *str) +_send_cmd_str(struct _App *app, const char *str) { int len; len = strlen(str) + 1; - _em_write_safe(STDOUT_FILENO, &len, sizeof(len)); - _em_write_safe(STDOUT_FILENO, str, len); + _em_write_safe(app->em_write, &len, sizeof(len)); + _em_write_safe(app->em_write, str, len); } -#define SEND_CMD_PARAM(i) \ - _em_write_safe(STDOUT_FILENO, &(i), sizeof((i))); +#define SEND_CMD_PARAM(app, i) \ + _em_write_safe((app)->em_write, &(i), sizeof((i))); static void -_send_resize(int width, int height) +_send_resize(struct _App *app, int width, int height) { - _send_cmd_start(EM_RESULT_FRAME_SIZE); - SEND_CMD_PARAM(width); - SEND_CMD_PARAM(height); - _send_cmd_finish(); + _send_cmd_start(app, EM_RESULT_FRAME_SIZE); + SEND_CMD_PARAM(app, width); + SEND_CMD_PARAM(app, height); + _send_cmd_finish(app); } static void -_send_length_changed(const struct libvlc_event_t *ev) +_send_length_changed(struct _App *app, const struct libvlc_event_t *ev) { float length = ev->u.media_player_length_changed.new_length; length /= 1000; fprintf(stderr, "length changed: %0.3f\n", length); - _send_cmd_start(EM_RESULT_LENGTH_CHANGED); - SEND_CMD_PARAM(length); - _send_cmd_finish(); + _send_cmd_start(app, EM_RESULT_LENGTH_CHANGED); + SEND_CMD_PARAM(app, length); + _send_cmd_finish(app); } static void -_send_time_changed(const struct libvlc_event_t *ev) +_send_time_changed(struct _App *app, const struct libvlc_event_t *ev) { float new_time = ev->u.media_player_time_changed.new_time; new_time /= 1000; - _send_cmd_start(EM_RESULT_POSITION_CHANGED); - SEND_CMD_PARAM(new_time); - _send_cmd_finish(); + _send_cmd_start(app, EM_RESULT_POSITION_CHANGED); + SEND_CMD_PARAM(app, new_time); + _send_cmd_finish(app); } static void -_send_seekable_changed(const struct libvlc_event_t *ev) +_send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) { int seekable = ev->u.media_player_seekable_changed.new_seekable; - _send_cmd_start(EM_RESULT_SEEKABLE_CHANGED); - SEND_CMD_PARAM(seekable); - _send_cmd_finish(); + _send_cmd_start(app, EM_RESULT_SEEKABLE_CHANGED); + SEND_CMD_PARAM(app, seekable); + _send_cmd_finish(app); } static void * @@ -270,7 +270,7 @@ _display(void *data, void *id) if (!app->playing) return; - _send_cmd(EM_RESULT_FRAME_NEW); + _send_cmd(app, EM_RESULT_FRAME_NEW); } static void * @@ -298,7 +298,7 @@ _play(struct _App *app) if (!app->mp) return; - _em_read_safe(STDIN_FILENO, &pos, sizeof(pos)); + _em_read_safe(app->em_read, &pos, sizeof(pos)); if (app->playing) { @@ -325,14 +325,14 @@ _send_file_closed(struct _App *app) { app->closing = 0; emotion_generic_shm_free(app->vs); - _send_cmd(EM_RESULT_FILE_CLOSE); + _send_cmd(app, EM_RESULT_FILE_CLOSE); } static void _send_file_set(struct _App *app) { if (app->opening) - _send_cmd(EM_RESULT_FILE_SET); + _send_cmd(app, EM_RESULT_FILE_SET); if (app->closing) _send_file_closed(app); @@ -346,26 +346,26 @@ _event_cb(const struct libvlc_event_t *ev, void *data) switch (ev->type) { case libvlc_MediaPlayerTimeChanged: - _send_time_changed(ev); + _send_time_changed(app, ev); break; case libvlc_MediaPlayerPositionChanged: thread_event = EM_THREAD_POSITION_CHANGED; write(app->fd_write, &thread_event, sizeof(thread_event)); break; case libvlc_MediaPlayerLengthChanged: - _send_length_changed(ev); + _send_length_changed(app, ev); break; case libvlc_MediaPlayerSeekableChanged: - _send_seekable_changed(ev); + _send_seekable_changed(app, ev); break; case libvlc_MediaPlayerPlaying: - _send_resize(app->w, app->h); + _send_resize(app, app->w, app->h); break; case libvlc_MediaPlayerStopped: _send_file_set(app); break; case libvlc_MediaPlayerEndReached: - _send_cmd(EM_RESULT_PLAYBACK_STOPPED); + _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); break; } } @@ -373,7 +373,7 @@ _event_cb(const struct libvlc_event_t *ev, void *data) static void _file_set(struct _App *app) { - _em_str_read(&app->filename); + _em_str_read(app->em_read, &app->filename); app->m = libvlc_media_new_path(app->libvlc, app->filename); if (!app->m) @@ -411,7 +411,7 @@ _position_set(struct _App *app) return; float position; - _em_read_safe(STDIN_FILENO, &position, sizeof(position)); + _em_read_safe(app->em_read, &position, sizeof(position)); libvlc_time_t new_time = position * 1000; libvlc_media_player_set_time(app->mp, new_time); @@ -425,7 +425,7 @@ _speed_set(struct _App *app) if (!app->mp) return; - _em_read_safe(STDIN_FILENO, &rate, sizeof(rate)); + _em_read_safe(app->em_read, &rate, sizeof(rate)); libvlc_media_player_set_rate(app->mp, rate); } @@ -438,7 +438,7 @@ _mute_set(struct _App *app) if (!app->mp) return; - _em_read_safe(STDIN_FILENO, &mute, sizeof(mute)); + _em_read_safe(app->em_read, &mute, sizeof(mute)); libvlc_audio_set_mute(app->mp, mute); } @@ -452,7 +452,7 @@ _volume_set(struct _App *app) if (!app->mp) return; - _em_read_safe(STDIN_FILENO, &volume, sizeof(volume)); + _em_read_safe(app->em_read, &volume, sizeof(volume)); vol = volume * 100; libvlc_audio_set_volume(app->mp, vol); @@ -463,7 +463,7 @@ _audio_track_set(struct _App *app) { int track; - _em_read_safe(STDIN_FILENO, &track, sizeof(track)); + _em_read_safe(app->em_read, &track, sizeof(track)); libvlc_audio_set_track(app->mp, track); } @@ -484,9 +484,9 @@ _file_set_done(struct _App *app) app->filename = NULL; app->m = NULL; app->mp = NULL; - _send_cmd_start(EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(r); - _send_cmd_finish(); + _send_cmd_start(app, EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(app, r); + _send_cmd_finish(app); } app->w = app->vs->width; app->h = app->vs->height; @@ -505,9 +505,9 @@ _file_set_done(struct _App *app) libvlc_audio_set_mute(app->mp, 0); - _send_cmd_start(EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(r); - _send_cmd_finish(); + _send_cmd_start(app, EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(app, r); + _send_cmd_finish(app); } static void @@ -534,7 +534,7 @@ _file_close(struct _App *app) static void _process_emotion_commands(struct _App *app) { - int cmd = _em_cmd_read(); + int cmd = _em_cmd_read(app); switch (cmd) { case EM_CMD_FILE_SET: _file_set(app); @@ -570,27 +570,27 @@ _process_emotion_commands(struct _App *app) } static void -_send_track_info(libvlc_media_player_t *mp) +_send_track_info(struct _App *app) { int track_count, current; libvlc_track_description_t *desc; - current = libvlc_audio_get_track(mp); - track_count = libvlc_audio_get_track_count(mp); - desc = libvlc_audio_get_track_description(mp); + current = libvlc_audio_get_track(app->mp); + track_count = libvlc_audio_get_track_count(app->mp); + desc = libvlc_audio_get_track_description(app->mp); - _send_cmd_start(EM_RESULT_AUDIO_TRACK_INFO); - SEND_CMD_PARAM(current); - SEND_CMD_PARAM(track_count); + _send_cmd_start(app, EM_RESULT_AUDIO_TRACK_INFO); + SEND_CMD_PARAM(app, current); + SEND_CMD_PARAM(app, track_count); while (desc) { int tid = desc->i_id; const char *name = desc->psz_name; - SEND_CMD_PARAM(tid); - _send_cmd_str(name); + SEND_CMD_PARAM(app, tid); + _send_cmd_str(app, name); desc = desc->p_next; } - _send_cmd_finish(); + _send_cmd_finish(app); } static void @@ -604,10 +604,10 @@ _position_changed(struct _App *app) r = libvlc_video_get_size(app->mp, 0, &w, &h); if (r < 0) return; - _send_resize(w, h); + _send_resize(app, w, h); /* sending audio track info */ - // _send_track_info(app->mp); + // _send_track_info(app); libvlc_media_player_stop(app->mp); } @@ -657,6 +657,18 @@ main(int argc, const char *argv[]) chroma }; + if (argc < 3) + { + fprintf(stderr, "player: missing paramters.\n"); + fprintf(stderr, "syntax:\n\t%s \n", argv[0]); + return -1; + } + + app.em_read = atoi(argv[1]); + app.em_write = atoi(argv[2]); + + fprintf(stderr, "reading commands from fd: %d, writing on fd: %d\n", app.em_read, app.em_write); + int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH); snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT); @@ -684,23 +696,23 @@ main(int argc, const char *argv[]) app.playing = 0; app.closing = 0; - if (_em_cmd_read() != EM_CMD_INIT) + if (_em_cmd_read(&app) != EM_CMD_INIT) { fprintf(stderr, "player: wrong init command!\n"); return -1; } int size; - _em_read_safe(STDIN_FILENO, &size, sizeof(size)); - _em_read_safe(STDIN_FILENO, buf, size); + _em_read_safe(app.em_read, &size, sizeof(size)); + _em_read_safe(app.em_read, buf, size); app.shmname = strdup(buf); - _send_cmd(EM_RESULT_INIT); + _send_cmd(&app, EM_RESULT_INIT); pipe(tpipe); app.fd_read = tpipe[0]; app.fd_write = tpipe[1]; - fds[0].fd = STDIN_FILENO; + fds[0].fd = app.em_read; fds[0].events = POLLIN; fds[1].fd = app.fd_read; fds[1].events = POLLIN; From 29c6d361e63ad7b744432fd029d535e17e9d1959 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 5 Sep 2011 16:07:00 +0000 Subject: [PATCH 047/347] emotion/generic - Don't start opening new file when another one is being open. SVN revision: 63203 --- .../src/vlc/emotion_generic_vlc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 425aeb4d60..a29793151e 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -373,6 +373,13 @@ _event_cb(const struct libvlc_event_t *ev, void *data) static void _file_set(struct _App *app) { + if (app->opening) + { + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + free(app->filename); + } + _em_str_read(app->em_read, &app->filename); app->m = libvlc_media_new_path(app->libvlc, app->filename); @@ -514,6 +521,9 @@ static void _file_close(struct _App *app) { app->playing = 0; + if (app->opening) + goto release_resources; + if (libvlc_media_player_get_state(app->mp) != libvlc_Playing) { _send_file_closed(app); @@ -521,6 +531,8 @@ _file_close(struct _App *app) } app->closing = 1; + +release_resources: libvlc_media_player_stop(app->mp); if (app->filename) free(app->filename); From 38cef9c793389f3dc30df9dfbbe0d503f7769a8d Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 5 Sep 2011 21:52:11 +0000 Subject: [PATCH 048/347] emotion/generic: Add audio/video/spu channel set/get/count. SVN revision: 63218 --- .../src/vlc/emotion_generic_vlc.c | 66 +++++++++++++++---- 1 file changed, 55 insertions(+), 11 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index a29793151e..2e13ed4878 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -475,6 +475,26 @@ _audio_track_set(struct _App *app) libvlc_audio_set_track(app->mp, track); } +static void +_video_track_set(struct _App *app) +{ + int track; + + _em_read_safe(app->em_read, &track, sizeof(track)); + + libvlc_video_set_track(app->mp, track); +} + +static void +_spu_track_set(struct _App *app) +{ + int track; + + _em_read_safe(app->em_read, &track, sizeof(track)); + + libvlc_video_set_spu(app->mp, track); +} + static void _file_set_done(struct _App *app) { @@ -578,22 +598,18 @@ _process_emotion_commands(struct _App *app) case EM_CMD_AUDIO_TRACK_SET: _audio_track_set(app); break; + case EM_CMD_VIDEO_TRACK_SET: + _video_track_set(app); + break; }; } static void -_send_track_info(struct _App *app) +_send_track_info(struct _App *app, int cmd, int current, int count, libvlc_track_description_t *desc) { - int track_count, current; - libvlc_track_description_t *desc; - - current = libvlc_audio_get_track(app->mp); - track_count = libvlc_audio_get_track_count(app->mp); - desc = libvlc_audio_get_track_description(app->mp); - - _send_cmd_start(app, EM_RESULT_AUDIO_TRACK_INFO); + _send_cmd_start(app, cmd); SEND_CMD_PARAM(app, current); - SEND_CMD_PARAM(app, track_count); + SEND_CMD_PARAM(app, count); while (desc) { int tid = desc->i_id; @@ -605,6 +621,34 @@ _send_track_info(struct _App *app) _send_cmd_finish(app); } +static void +_send_all_track_info(struct _App *app) +{ + int track_count, current; + libvlc_track_description_t *desc; + + current = libvlc_audio_get_track(app->mp); + track_count = libvlc_audio_get_track_count(app->mp); + desc = libvlc_audio_get_track_description(app->mp); + + _send_track_info(app, EM_RESULT_AUDIO_TRACK_INFO, + current, track_count, desc); + + current = libvlc_video_get_track(app->mp); + track_count = libvlc_video_get_track_count(app->mp); + desc = libvlc_video_get_track_description(app->mp); + + _send_track_info(app, EM_RESULT_VIDEO_TRACK_INFO, + current, track_count, desc); + + current = libvlc_video_get_spu(app->mp); + track_count = libvlc_video_get_spu_count(app->mp); + desc = libvlc_video_get_spu_description(app->mp); + + _send_track_info(app, EM_RESULT_SPU_TRACK_INFO, + current, track_count, desc); +} + static void _position_changed(struct _App *app) { @@ -619,7 +663,7 @@ _position_changed(struct _App *app) _send_resize(app, w, h); /* sending audio track info */ - // _send_track_info(app); + _send_all_track_info(app); libvlc_media_player_stop(app->mp); } From 6c4b4ccaf8951a0ad743183b95ecffeec15b0f06 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 5 Sep 2011 21:52:14 +0000 Subject: [PATCH 049/347] emotion/generic: Add support for fetching meta info. SVN revision: 63219 --- .../src/vlc/emotion_generic_vlc.c | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 2e13ed4878..b3e1eb1d1c 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -186,7 +186,10 @@ static void _send_cmd_str(struct _App *app, const char *str) { int len; - len = strlen(str) + 1; + if (str) + len = strlen(str) + 1; + else + len = 0; _em_write_safe(app->em_write, &len, sizeof(len)); _em_write_safe(app->em_write, str, len); } @@ -649,6 +652,36 @@ _send_all_track_info(struct _App *app) current, track_count, desc); } +static void +_send_all_meta_info(struct _App *app) +{ + const char *meta; + + _send_cmd_start(app, EM_RESULT_META_INFO); + + /* + * Will send in this order: title, artist, album, year, + * genre, comments, disc id and track count. + */ + meta = libvlc_media_get_meta(app->m, libvlc_meta_Title); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Artist); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Album); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Date); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Genre); + _send_cmd_str(app, meta); + meta = NULL; // sending empty comments + _send_cmd_str(app, meta); + meta = NULL; // sending empty disc id + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_TrackNumber); + _send_cmd_str(app, meta); + _send_cmd_finish(app); +} + static void _position_changed(struct _App *app) { @@ -665,6 +698,9 @@ _position_changed(struct _App *app) /* sending audio track info */ _send_all_track_info(app); + /* sending meta info */ + _send_all_meta_info(app); + libvlc_media_player_stop(app->mp); } From e0c4c65bbadf4c569f00b231d5c58c1c81d7f454 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 5 Sep 2011 21:52:18 +0000 Subject: [PATCH 050/347] emotion/generic: Fix frame dropping. Move the frame drop counter to the shared memory object, so the player can check its value and not send new frames if we didn't "consume" the previous one. Also move the triple buffering pointer changing to the display function, so it will only lock once when accessing the critical region. SVN revision: 63220 --- .../src/vlc/emotion_generic_vlc.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index b3e1eb1d1c..dfa0962132 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -253,17 +253,6 @@ _lock(void *data, void **pixels) static void _unlock(void *data, void *id, void *const *pixels) { - struct _App *app = data; - - if (!app->playing) - return; - - sem_wait(&app->vs->lock); - app->vs->frame.last = app->vs->frame.player; - app->vs->frame.player = app->vs->frame.next; - app->vs->frame.next = app->vs->frame.last; - - sem_post(&app->vs->lock); } static void @@ -273,7 +262,13 @@ _display(void *data, void *id) if (!app->playing) return; - _send_cmd(app, EM_RESULT_FRAME_NEW); + sem_wait(&app->vs->lock); + app->vs->frame.last = app->vs->frame.player; + app->vs->frame.player = app->vs->frame.next; + app->vs->frame.next = app->vs->frame.last; + if (!app->vs->frame_drop++) + _send_cmd(app, EM_RESULT_FRAME_NEW); + sem_post(&app->vs->lock); } static void * From 1d7ffacad83cd07c04e84b053ea1a210ac451c73 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 6 Sep 2011 12:37:03 +0000 Subject: [PATCH 051/347] emotion/generic: Don't send position update when skipping frames. SVN revision: 63227 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index dfa0962132..4fb8ba0b45 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -223,6 +223,8 @@ _send_time_changed(struct _App *app, const struct libvlc_event_t *ev) { float new_time = ev->u.media_player_time_changed.new_time; new_time /= 1000; + if (app->vs->frame_drop > 1) + return; _send_cmd_start(app, EM_RESULT_POSITION_CHANGED); SEND_CMD_PARAM(app, new_time); _send_cmd_finish(app); From 4438a21c43998b3ac36cd5ded104e1541a71671c Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 6 Sep 2011 21:15:46 +0000 Subject: [PATCH 052/347] emotion/generic: Non-blocking event reading from player. Temporarily disabled fetching/sending of channel and meta info. Will enable it with the next commit, to simplify code. SVN revision: 63236 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 4fb8ba0b45..81431281d4 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -693,10 +693,10 @@ _position_changed(struct _App *app) _send_resize(app, w, h); /* sending audio track info */ - _send_all_track_info(app); + // _send_all_track_info(app); /* sending meta info */ - _send_all_meta_info(app); + // _send_all_meta_info(app); libvlc_media_player_stop(app->mp); } From 0aa0de6f74c18203b864f952b3761e6903a3fdb0 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 6 Sep 2011 21:15:50 +0000 Subject: [PATCH 053/347] emotion/generic: Non-blocking track info retrieval. SVN revision: 63237 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 81431281d4..c4ab25b47a 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -693,7 +693,7 @@ _position_changed(struct _App *app) _send_resize(app, w, h); /* sending audio track info */ - // _send_all_track_info(app); + _send_all_track_info(app); /* sending meta info */ // _send_all_meta_info(app); From db329f7203419409a7fee40ae7939888d6c6740e Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 6 Sep 2011 21:15:53 +0000 Subject: [PATCH 054/347] emotion/generic: Non-blocking meta info retrieval. SVN revision: 63238 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index c4ab25b47a..4fb8ba0b45 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -696,7 +696,7 @@ _position_changed(struct _App *app) _send_all_track_info(app); /* sending meta info */ - // _send_all_meta_info(app); + _send_all_meta_info(app); libvlc_media_player_stop(app->mp); } From 99c1eed59e35abfdacaf0fd4aaba892bb137c0e9 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 14 Sep 2011 16:31:25 +0000 Subject: [PATCH 055/347] evas_generic_loader: fix install of raw image loader SVN revision: 63391 --- legacy/evas_generic_loaders/src/bin/raw/Makefile.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am index 6424943c66..08bfe46cd2 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am @@ -11,7 +11,6 @@ AM_CPPFLAGS = \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EINA_CFLAGS@ -if HAVE_RAW bin_PROGRAMS = evas_image_loader.raw bindir = $(libdir)/evas/utils @@ -19,7 +18,6 @@ evas_image_loader_raw_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ -lm evas_image_loader_raw_LDFLAGS = -endif install-data-hook: ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.arw From b9e350aa284ec4bfad9ba95712192af3d11e477d Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 3 Oct 2011 18:19:48 +0000 Subject: [PATCH 056/347] emotion/generic/vlc: VLC needs to write data somewhere. It seems that depending on the system, vlc can't use a NULL pointer to the pixels where it should write its data. So a small amount of memory should be allocated and passed to its rendering callbacks (specifically, the lock callback) when the file is being opened and decoded for the first time. Then this memory can be freed, since the real rendering will happen on the shared memory area. SVN revision: 63777 --- .../emotion_generic_players/src/vlc/emotion_generic_vlc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 4fb8ba0b45..848cabb1d6 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -35,6 +35,7 @@ struct _App { libvlc_event_manager_t *mevent_mgr; char *filename; char *shmname; + void *tmpbuffer; int w, h; int fd_read; // read commands from theads here int fd_write; // write commands from threads here @@ -276,7 +277,8 @@ _display(void *data, void *id) static void * _tmp_lock(void *data, void **pixels) { - *pixels = NULL; + struct _App *app = data; + *pixels = app->tmpbuffer; return NULL; } @@ -398,7 +400,7 @@ _file_set(struct _App *app) app->opening = 1; libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); - libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, NULL); + libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); app->event_mgr = libvlc_media_player_event_manager(app->mp); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, _event_cb, app); @@ -407,6 +409,7 @@ _file_set(struct _App *app) app->mevent_mgr = libvlc_media_event_manager(app->m); + app->tmpbuffer = malloc(sizeof(char) * DEFAULTWIDTH * DEFAULTHEIGHT * 4); libvlc_audio_set_mute(app->mp, 1); libvlc_media_player_play(app->mp); } @@ -560,6 +563,7 @@ release_resources: { libvlc_media_release(app->m); libvlc_media_player_release(app->mp); + free(app->tmpbuffer); } } From a1c7b5a1b21cc01c5d3adc5b0cafa239fe946a92 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 3 Oct 2011 18:24:12 +0000 Subject: [PATCH 057/347] emotion/build: Fix DSO build for em_generic_vlc. SVN revision: 63779 --- legacy/emotion_generic_players/src/vlc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am index 6d6a9f2b85..6b00d281c1 100644 --- a/legacy/emotion_generic_players/src/vlc/Makefile.am +++ b/legacy/emotion_generic_players/src/vlc/Makefile.am @@ -15,4 +15,4 @@ internal_bin_PROGRAMS = em_generic_vlc em_generic_vlc_SOURCES = emotion_generic_vlc.c em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h -em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ +em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ -lpthread -lrt From 34e627783bb3e2743c80016beade4c1d20de4335 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 3 Oct 2011 18:39:23 +0000 Subject: [PATCH 058/347] emotion/generic/vlc: Remove more warnings. SVN revision: 63781 --- .../src/vlc/emotion_generic_vlc.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 848cabb1d6..244592951a 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -488,16 +488,6 @@ _video_track_set(struct _App *app) libvlc_video_set_track(app->mp, track); } -static void -_spu_track_set(struct _App *app) -{ - int track; - - _em_read_safe(app->em_read, &track, sizeof(track)); - - libvlc_video_set_spu(app->mp, track); -} - static void _file_set_done(struct _App *app) { @@ -690,7 +680,8 @@ _position_changed(struct _App *app) return; /* sending size info only once */ - int r, w, h; + int r; + unsigned int w, h; r = libvlc_video_get_size(app->mp, 0, &w, &h); if (r < 0) return; @@ -729,10 +720,8 @@ int main(int argc, const char *argv[]) { struct _App app; - Emotion_Generic_Video_Shared *vs; struct pollfd fds[3]; int tpipe[2]; // pipe for comunicating events from threads - char shmname[256]; char cwidth[64], cheight[64], cpitch[64], chroma[64]; char buf[64]; const char *vlc_argv[] = From b428676d44cfeb5141cd7faabf89a71e41f49498 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 15 Nov 2011 09:41:20 +0000 Subject: [PATCH 059/347] pass discheck - actually compile... and up to 0.9.999 ver SVN revision: 65230 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 029f30e72d..a63e3295f8 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,7 +1,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [0]) -m4_define([v_min], [1]) +m4_define([v_min], [9]) m4_define([v_mic], [999]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) @@ -58,7 +58,7 @@ PKG_PROG_PKG_CONFIG ### Checks for libraries # Eina library -PKG_CHECK_MODULES(EINA, [eina >= 1.0.0]) +PKG_CHECK_MODULES(EINA, [eina >= 1.0.999]) PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_poppler="no"]) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index dbde260d63..a301083b48 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -16,7 +16,7 @@ bin_PROGRAMS = evas_image_loader.gst bindir = $(libdir)/evas/utils evas_image_loader_gst_SOURCES = \ -main.cpp \ +main.c \ $(top_srcdir)/src/bin/common/shmfile.c evas_image_loader_gst_CFLAGS = evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ From 2bdd9072d53f71e4860d56923c6386b673cca117 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 15 Nov 2011 11:56:01 +0000 Subject: [PATCH 060/347] update COPYING for evas generic loaders SVN revision: 65249 --- legacy/evas_generic_loaders/COPYING | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/COPYING b/legacy/evas_generic_loaders/COPYING index 4189933be9..f3f6a4abf6 100644 --- a/legacy/evas_generic_loaders/COPYING +++ b/legacy/evas_generic_loaders/COPYING @@ -1,4 +1,22 @@ - GNU GENERAL PUBLIC LICENSE +Copyright notice for Evas generic loaders: + +Copyright (C) 2011-2011 Carsten Haitzler and various contributors (see AUTHORS) + +This library 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; version 2 of the License. + +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. + +Below is a copy of the GNU General Public License that is distributed +along with this library. If you do not have a copy below, write to the Free +Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA + + GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. From fa5c8ccd2597e2bcbac30fd1e641d8357738a38b Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 15 Nov 2011 12:00:49 +0000 Subject: [PATCH 061/347] README update SVN revision: 65250 --- legacy/evas_generic_loaders/README | 47 ++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 94f991c75f..d7e543865d 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,5 +1,34 @@ -Additional "generic" loaders for Evas that are stand-alone executables -evas may run from its generic loader module. +Evas generic loaders 1.0.0 + +****************************************************************************** + + FOR ANY ISSUES PLEASE EMAIL: + enlightenment-devel@lists.sourceforge.net + +****************************************************************************** + +Requirements: +------------- + +Must: + libc + libm + zlib + +Recommended: + gstreamer + poppler + libraw + libspecter + + +These are additional "generic" loaders for Evas that are stand-alone +executables that evas may run from its generic loader module. This +means that if they crash, the application loading the image does not +crash also. In addition the licensing of these binaries will not +affect the license of any application that uses Evas as this uses a +completely generic execution system that allows anything to be plugged +in as a loader. Generic loaders currently provided: @@ -18,7 +47,7 @@ Generic loaders currently provided: MPG/AVI/OGV/MOV/MKV/WMV etc. (using Gstreamer) Should we add libxine and vlc ? -Possible fun ones: +Possible fun ones in future: DVI (using DVIlib, see edvi) @@ -28,3 +57,15 @@ Possible fun ones: (beats me how u can render a page from these without a whole office impl - but worth a try? libopenoffice/libllibreoffice if it ever happens?) + +------------------------------------------------------------------------------ +COMPILING AND INSTALLING: + + ./configure + make +(as root unless you are installing in your users directories): + make install + +NOTE: + you should put generic loaders in the same prefix as Evas or they +will not be found. From 980476d789d1e9bb529e9d6e432eef08d98d2363 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 16 Nov 2011 05:34:37 +0000 Subject: [PATCH 062/347] update release candidate trees to their release version in preparation for alpha SVN revision: 65280 --- legacy/evas_generic_loaders/configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index a63e3295f8..8290c874c9 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,12 +1,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_define([v_maj], [0]) -m4_define([v_min], [9]) -m4_define([v_mic], [999]) +m4_define([v_maj], [1]) +m4_define([v_min], [1]) +m4_define([v_mic], [0]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) +m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) @@ -58,7 +58,7 @@ PKG_PROG_PKG_CONFIG ### Checks for libraries # Eina library -PKG_CHECK_MODULES(EINA, [eina >= 1.0.999]) +PKG_CHECK_MODULES(EINA, [eina >= 1.1.0]) PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_poppler="no"]) From f02f231f0758f49d9f004503d0379d4b39e932d1 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 2 Dec 2011 09:10:56 +0000 Subject: [PATCH 063/347] and lets bump on to 1.x.99 (or so) for svn... and back to adding snap rev. SVN revision: 65802 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 8290c874c9..95be8b1e81 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -m4_undefine([v_rev]) +dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) From d945b2a11cf425434bea6bf19303248aeaeddcdc Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 2 Dec 2011 09:32:11 +0000 Subject: [PATCH 064/347] revert my 1.x.99 stuff so i can branch. SVN revision: 65803 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 95be8b1e81..8290c874c9 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [99]) +m4_define([v_mic], [0]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) +m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) From 564256f3774f2b68e396ddd8993cf39fab68de17 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 2 Dec 2011 09:45:25 +0000 Subject: [PATCH 065/347] and now go to normal-like svn revs SVN revision: 65806 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 8290c874c9..95be8b1e81 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -m4_undefine([v_rev]) +dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) From 5c40bc5f76f268fca18ca99f1594f7d863719003 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 4 Dec 2011 01:56:31 +0000 Subject: [PATCH 066/347] fix changelogs to mention release. SVN revision: 65860 --- legacy/evas_generic_loaders/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index e69de29bb2..1409c0bc2d 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -0,0 +1,3 @@ +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release From 9691179abe9e28b93b6b86722104c5454744c822 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 29 Dec 2011 11:28:27 +0000 Subject: [PATCH 067/347] add some mroe video file formats SVN revision: 66626 --- legacy/evas_generic_loaders/ChangeLog | 5 +++++ legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 3 +++ 2 files changed, 8 insertions(+) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index 1409c0bc2d..81b1f2297c 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -1,3 +1,8 @@ 2011-12-02 Carsten Haitzler (The Rasterman) 1.1.0 release + +2011-12-02 Carsten Haitzler (The Rasterman) + + * Add symlinks for *.dv, *.qt and *.rv video file formats + diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index a301083b48..d5ece5e133 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -39,6 +39,7 @@ install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.bdmv ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.clpi ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cpi + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dv ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.fla ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.flv ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m1v @@ -62,12 +63,14 @@ install-data-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogg ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogm ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogv + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.qt ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rm ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmj ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmm ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rms ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmx ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmvb + ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rv ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.swf ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ts ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.webm From 964e67b4624ad6db94f4aafde7d36552ca3b9cb5 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 30 Dec 2011 15:06:24 +0000 Subject: [PATCH 068/347] emotion: fix build with Eina_Semaphore. SVN revision: 66697 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 244592951a..0be1ee922d 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -18,6 +18,7 @@ #include #include + #include enum _Thread_Events { From 50cff9abb15ff525774a662aa90689f9be85ed35 Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Tue, 6 Mar 2012 20:57:50 +0000 Subject: [PATCH 069/347] Emotion: remove unused var on generic SVN revision: 68849 --- .../src/vlc/emotion_generic_vlc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 0be1ee922d..6d61451eec 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -172,7 +172,7 @@ _send_cmd_start(struct _App *app, int cmd) } static void -_send_cmd_finish(struct _App *app) +_send_cmd_finish(struct _App *app __UNUSED__) { pthread_mutex_unlock(&_mutex_fd); } @@ -255,12 +255,12 @@ _lock(void *data, void **pixels) } static void -_unlock(void *data, void *id, void *const *pixels) +_unlock(void *data __UNUSED__, void *id __UNUSED__, void *const *pixels __UNUSED__) { } static void -_display(void *data, void *id) +_display(void *data, void *id __UNUSED__) { struct _App *app = data; if (!app->playing) @@ -284,12 +284,12 @@ _tmp_lock(void *data, void **pixels) } static void -_tmp_unlock(void *data, void *id, void *const *pixels) +_tmp_unlock(void *data __UNUSED__, void *id __UNUSED__, void *const *pixels __UNUSED__) { } static void -_tmp_display(void *data, void *id) +_tmp_display(void *data __UNUSED__, void *id __UNUSED__) { } From 65505d9ca8886c483458d4949b090a14317d7ef9 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Thu, 15 Mar 2012 20:43:17 +0000 Subject: [PATCH 070/347] Don't abort when there's no video size. For music, it does make sense to return -1. SVN revision: 69436 --- .../emotion_generic_players/src/vlc/emotion_generic_vlc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 6d61451eec..f286da3580 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -214,7 +214,6 @@ _send_length_changed(struct _App *app, const struct libvlc_event_t *ev) float length = ev->u.media_player_length_changed.new_length; length /= 1000; - fprintf(stderr, "length changed: %0.3f\n", length); _send_cmd_start(app, EM_RESULT_LENGTH_CHANGED); SEND_CMD_PARAM(app, length); _send_cmd_finish(app); @@ -685,7 +684,10 @@ _position_changed(struct _App *app) unsigned int w, h; r = libvlc_video_get_size(app->mp, 0, &w, &h); if (r < 0) - return; + { + w = 1; + h = 1; + } _send_resize(app, w, h); /* sending audio track info */ @@ -750,8 +752,6 @@ main(int argc, const char *argv[]) app.em_read = atoi(argv[1]); app.em_write = atoi(argv[2]); - fprintf(stderr, "reading commands from fd: %d, writing on fd: %d\n", app.em_read, app.em_write); - int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH); snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT); From 80e06eb5a50f5f189d017e6354f905272fe2c50c Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Thu, 15 Mar 2012 20:43:21 +0000 Subject: [PATCH 071/347] emotion/generic-vlc: Add callback for reaching end of playback. SVN revision: 69437 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index f286da3580..feecac3285 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -522,6 +522,8 @@ _file_set_done(struct _App *app) _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, + _event_cb, app); libvlc_audio_set_mute(app->mp, 0); From 8991bdf573d1a5a5310a9a6fa4b6362b5a57127c Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 17 Mar 2012 04:17:29 +0000 Subject: [PATCH 072/347] gear up svn for release. one of many steps/things to do. SVN revision: 69481 --- legacy/evas_generic_loaders/README | 2 +- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index d7e543865d..06edf95950 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,4 +1,4 @@ -Evas generic loaders 1.0.0 +Evas generic loaders 1.2.0 ****************************************************************************** diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 95be8b1e81..4ef512b9db 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,12 +1,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [1]) -m4_define([v_mic], [99]) +m4_define([v_min], [2]) +m4_define([v_mic], [0]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) +m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver]-alpha, [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 425137737bed3967b633c26659bdd3afa9b41142 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 17 Mar 2012 06:25:41 +0000 Subject: [PATCH 073/347] and work more on getting release in shape - version requirements. (god this is a pain in the butt) SVN revision: 69484 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 4ef512b9db..1de6be5a7a 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -58,7 +58,7 @@ PKG_PROG_PKG_CONFIG ### Checks for libraries # Eina library -PKG_CHECK_MODULES(EINA, [eina >= 1.1.0]) +PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_poppler="no"]) From dc94e41ac514b74b1bd13f3992d22be061f544fd Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 18 Mar 2012 01:52:19 +0000 Subject: [PATCH 074/347] fix distcheck SVN revision: 69491 --- legacy/evas_generic_loaders/ChangeLog | 4 ++++ legacy/evas_generic_loaders/src/bin/gst/Makefile.am | 2 +- legacy/evas_generic_loaders/src/bin/raw/Makefile.am | 2 +- legacy/evas_generic_loaders/src/bin/xcf/Makefile.am | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index 81b1f2297c..aa6f734c00 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -6,3 +6,7 @@ * Add symlinks for *.dv, *.qt and *.rv video file formats +2012-03-18 Carsten Haitzler (The Rasterman) + + * Fix distcheck with highly parallel builds + diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index d5ece5e133..bbc73739a3 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -25,7 +25,7 @@ evas_image_loader_gst_LDFLAGS = ## good list of extensions: ## http://www.fileinfo.com/filetypes/video ## should check which ones gst does support and make sure they are here -install-data-hook: +install-exec-hook: ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.264 ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3g2 ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gp diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am index 08bfe46cd2..d9fa0739ad 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am @@ -19,7 +19,7 @@ evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ -lm evas_image_loader_raw_LDFLAGS = -install-data-hook: +install-exec-hook: ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.arw ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cr2 ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.crw diff --git a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am index 6f2205146e..8d3d0b19a9 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am @@ -21,5 +21,5 @@ evas_image_loader_xcf_CFLAGS = @EINA_CFLAGS@ evas_image_loader_xcf_LDADD = @EINA_LIBS@ -lz -lm @SHM_OPEN_LIBS@ evas_image_loader_xcf_LDFLAGS = -install-data-hook: +install-exec-hook: ln -sf evas_image_loader.xcf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xcf.gz From 3d730505185d0dffc30bf00eaa4362b735429923 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Fri, 23 Mar 2012 19:42:38 +0000 Subject: [PATCH 075/347] emotion/generic-vlc: Don't try to stop the player from event thread. Must send the command through the pipe so the main thread can stop it. SVN revision: 69591 --- .../src/vlc/emotion_generic_vlc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index feecac3285..266ae65019 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -23,6 +23,7 @@ enum _Thread_Events { EM_THREAD_POSITION_CHANGED, + EM_THREAD_PLAYBACK_STOPPED, EM_THREAD_LAST }; @@ -367,7 +368,8 @@ _event_cb(const struct libvlc_event_t *ev, void *data) _send_file_set(app); break; case libvlc_MediaPlayerEndReached: - _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + thread_event = EM_THREAD_PLAYBACK_STOPPED; + write(app->fd_write, &thread_event, sizeof(thread_event)); break; } } @@ -718,6 +720,11 @@ _process_thread_events(struct _App *app) case EM_THREAD_POSITION_CHANGED: _position_changed(app); break; + case EM_THREAD_PLAYBACK_STOPPED: + libvlc_media_player_stop(app->mp); + app->playing = 0; + _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + break; } } From 37978d7d6f3b3969ccda1758fdd92db4615f542c Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Fri, 23 Mar 2012 20:18:22 +0000 Subject: [PATCH 076/347] emotion/generic-vlc: Change playing position before start playing. This will avoid that a video that reached its end starts playing from that end when started again. SVN revision: 69592 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 266ae65019..72649ace9b 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -310,8 +310,8 @@ _play(struct _App *app) else { libvlc_time_t new_time = pos * 1000; - libvlc_media_player_play(app->mp); libvlc_media_player_set_time(app->mp, new_time); + libvlc_media_player_play(app->mp); app->playing = 1; } } From be6981e639967b97b4fb24f4de9fbbff23413483 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sun, 25 Mar 2012 18:43:21 +0000 Subject: [PATCH 077/347] Emotion: Fix shm_open check + various autotools cleaning This works in linux, and should fix shm_detection on BSD (including Mac) BSD, Mac and solaris users : please check that it compiles and shm_open is detected SVN revision: 69618 --- legacy/emotion_generic_players/src/vlc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am index 6b00d281c1..ca9d22a92f 100644 --- a/legacy/emotion_generic_players/src/vlc/Makefile.am +++ b/legacy/emotion_generic_players/src/vlc/Makefile.am @@ -15,4 +15,4 @@ internal_bin_PROGRAMS = em_generic_vlc em_generic_vlc_SOURCES = emotion_generic_vlc.c em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h -em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ -lpthread -lrt +em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ -lpthread From 9a6f2b66b1d2808a96ce28cffc695405da058906 Mon Sep 17 00:00:00 2001 From: "Samuel F. Baggen" Date: Fri, 13 Apr 2012 09:44:09 +0000 Subject: [PATCH 078/347] typo SVN revision: 70166 --- legacy/evas_generic_loaders/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 06edf95950..9c4ee86181 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -19,7 +19,7 @@ Recommended: gstreamer poppler libraw - libspecter + libspectre These are additional "generic" loaders for Evas that are stand-alone From 6ccfcd2cdb750754875a9e5b47ea70a666ff5959 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 16 Apr 2012 06:37:30 +0000 Subject: [PATCH 079/347] news file update SVN revision: 70215 --- legacy/evas_generic_loaders/NEWS | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index e69de29bb2..c3ffaf33b8 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -0,0 +1,13 @@ +Evas Generic Loaders 1.2.0 + +Changes since Evas Generic Loaders 1.1.0: +----------------------------------------- + +Additions: + + * symlinks for *.dv, *.qt and *.rv video file formats + +Fixes: + + * distcheck for parallel builds + From 3efd9b7088412c1e64a26862f23061a47b1b1d3e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 21 Apr 2012 01:52:12 +0000 Subject: [PATCH 080/347] tag everything as beta in svn. SVN revision: 70375 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 1de6be5a7a..251613280f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver]-alpha, [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver]-beta, [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 81ff017938ddda264a02f22eafb046aa693e8210 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 26 Apr 2012 04:35:43 +0000 Subject: [PATCH 081/347] and removed the -beta tag... SVN revision: 70489 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 251613280f..bd9e61ee8a 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver]-beta, [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From b88c8346fb0e3340219eb5de9df333a9280d66df Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 26 Apr 2012 04:51:32 +0000 Subject: [PATCH 082/347] restore .99 micro versions for trunk and add back svnrev vers too. SVN revision: 70492 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index bd9e61ee8a..cc20d90e1d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [2]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -m4_undefine([v_rev]) +dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) From 6ef5addd50c600446919e121aaeecc0dfb4ca8c6 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 26 Apr 2012 08:07:22 +0000 Subject: [PATCH 083/347] efl: add release point in ChangeLog files. SVN revision: 70494 --- legacy/evas_generic_loaders/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index aa6f734c00..affb093795 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -10,3 +10,6 @@ * Fix distcheck with highly parallel builds +2012-04-26 Carsten Haitzler (The Rasterman) + + 1.2.0 release From 9109dde8bd60a74ef565b6cb3230378297ca2abd Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 18 May 2012 04:53:35 +0000 Subject: [PATCH 084/347] evas_generic_loaders: add a rsvg generic loader. NOTE: we have to much user complaining about instability in e17 due to librsvg. Moving it to a generic loader "resolve" this issue... SVN revision: 71222 --- legacy/evas_generic_loaders/ChangeLog | 5 + legacy/evas_generic_loaders/NEWS | 9 + legacy/evas_generic_loaders/configure.ac | 5 + .../evas_generic_loaders/src/bin/Makefile.am | 3 + .../src/bin/svg/Makefile.am | 21 ++ .../evas_generic_loaders/src/bin/svg/main.c | 212 ++++++++++++++++++ 6 files changed, 255 insertions(+) create mode 100644 legacy/evas_generic_loaders/src/bin/svg/Makefile.am create mode 100644 legacy/evas_generic_loaders/src/bin/svg/main.c diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index affb093795..487d24ae59 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -13,3 +13,8 @@ 2012-04-26 Carsten Haitzler (The Rasterman) 1.2.0 release + +2012-05-18 Cedric Bail + + * Make rsvg backend use the generic backend as it is our main + source of crash in e17. diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index c3ffaf33b8..a76ebdd2f8 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,3 +1,12 @@ +Evas Generic Loaders 1.3.0 + +Changes since Evas Generic Loaders 1.2.0: +----------------------------------------- + +Additions: + + * Add a librsvg generic loader. + Evas Generic Loaders 1.2.0 Changes since Evas Generic Loaders 1.1.0: diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index cc20d90e1d..c2b0573fa3 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -66,6 +66,8 @@ PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) +PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_svg="yes"], [have_svg="no"]) + GST_REQS=0.10.13 GSTPLUG_REQS=0.10.13 GST_MAJORMINOR=0.10 @@ -81,6 +83,7 @@ AM_CONDITIONAL(HAVE_GST, test "x${have_gst}" = "xyes") AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) AM_CONDITIONAL(HAVE_RAW, [test "x${have_raw}" = "xyes"]) +AM_CONDITIONAL([HAVE_SVG], [test "x${have_svg}" = "xyes"]) ### Checks for header files @@ -137,6 +140,7 @@ src/bin/pdf/Makefile src/bin/ps/Makefile src/bin/raw/Makefile src/bin/xcf/Makefile +src/bin/svg/Makefile ]) AC_OUTPUT @@ -160,6 +164,7 @@ echo " Gstreamer............: ${have_gst}" echo " PDF..................: ${have_poppler}" echo " PS...................: ${have_ps}" echo " RAW..................: ${have_raw}" +echo " SVG..................: ${have_svg}" echo echo "Compilation............: make (or gmake)" echo " CPPFLAGS.............: $CPPFLAGS" diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am index ac0215d552..040ae49f79 100644 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/Makefile.am @@ -19,3 +19,6 @@ if HAVE_RAW SUBDIRS += raw endif +if HAVE_SVG +SUBDIRS += svg +endif diff --git a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am new file mode 100644 index 0000000000..6ea0778e8e --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am @@ -0,0 +1,21 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src \ +-I$(top_srcdir)/src/bin \ +-I$(top_srcdir)/src/bin/common \ +-I$(top_srcdir)/src/bin/svg \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ + +bin_PROGRAMS = evas_image_loader.svg +bindir = $(libdir)/evas/utils + +evas_image_loader_svg_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c +evas_image_loader_svg_CFLAGS = @SVG_CFLAGS@ +evas_image_loader_svg_LDADD = @SVG_LIBS@ @SHM_OPEN_LIBS@ -lm +evas_image_loader_svg_LDFLAGS = + diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c new file mode 100644 index 0000000000..021fc64eca --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -0,0 +1,212 @@ +#ifdef HAVE_CONFIG_H +#include +#endif +#include +#include "shmfile.h" + +#include + +#include +#include + +#define DATA32 unsigned int + +static RsvgHandle *rsvg = NULL; +static int width = 0; +static int height = 0; +static RsvgDimensionData dim; + +static inline Eina_Bool evas_image_load_file_is_svg(const char *file) +{ + int i, len = strlen(file); + Eina_Bool is_gz = EINA_FALSE; + + for (i = len - 1; i > 0; i--) + { + if (file[i] == '.') + { + if (is_gz) + break; + else if (strcasecmp(file + i + 1, "gz") == 0) + is_gz = EINA_TRUE; + else + break; + } + } + + if (i < 1) return EINA_FALSE; + i++; + if (i >= len) return EINA_FALSE; + if (strncasecmp(file + i, "svg", 3) != 0) return EINA_FALSE; + i += 3; + if (is_gz) + { + if (file[i] == '.') return EINA_TRUE; + else return EINA_FALSE; + } + else + { + if (file[i] == '\0') return EINA_TRUE; + else if (((file[i] == 'z') || (file[i] == 'Z')) && (!file[i + 1])) return EINA_TRUE; + else return EINA_FALSE; + } +} + +static int +_svg_init(const char *file) +{ + rsvg_init(); + + if (!evas_image_load_file_is_svg(file)) return 0; + + rsvg = rsvg_handle_new_from_file(file, NULL); + + return 1; +} + +static void +_svg_shutdown(void) +{ + if (rsvg) + { + rsvg_handle_close(rsvg, NULL); + g_object_unref(rsvg); + } + // Maybe it's not crashing anymore, let's try it. + rsvg_term(); +} + +static int +read_svg_header(int scale_down, double dpi, int size_w, int size_h) +{ + rsvg_handle_set_dpi(rsvg, 75.0); + rsvg_handle_get_dimensions(rsvg, &dim); + width = dim.width; + height = dim.height; + + if ((width < 1) || (height < 1)) return 0; + + if (scale_down > 1) + { + width /= scale_down; + height /= scale_down; + } + else if (dpi > 0.0) + { + width = (width * dpi) / 75; + height = (height * dpi) / 75; + } + else if (size_w > 0 && size_h > 0) + { + int w, h; + + w = size_w; + h = (size_w * height) / width; + if (h > size_h) + { + h = size_h; + w = (size_h * width) / height; + } + width = w; + height = h; + } + if (width < 1) width = 1; + if (height < 1) height = 1; + + return 1; +} + +static int +read_svg_data(void) +{ + cairo_surface_t *surface; + cairo_t *cr; + + shm_alloc(width * height * (sizeof(DATA32))); + if (!shm_addr) return 0; + + memset(shm_addr, 0, width * height * sizeof (DATA32)); + surface = cairo_image_surface_create_for_data((unsigned char *)shm_addr, CAIRO_FORMAT_ARGB32, + width, height, width * sizeof(DATA32));; + if (!surface) return 0; + + cr = cairo_create(surface); + if (!cr) return 0; + + cairo_scale(cr, (double) width / dim.em, (double) height / dim.ex); + rsvg_handle_render_cairo(rsvg, cr); + cairo_surface_destroy(surface); + cairo_destroy(cr); + + return 1; +} + +int main(int argc, char **argv) +{ + char *file; + int i; + int head_only = 0; + int scale_down = 0; + double dpi = 0.0; + int size_w = 0, size_h = 0; + + if (argc < 2) return -1; + file = argv[1]; + + for (i = 2; i < argc; ++i) + { + if (!strcmp(argv[i], "-head")) + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { // not used by svg loader + i++; + // const char *key = argv[i]; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { + i++; + scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { + i++; + dpi = ((double)atoi(argv[i])) / 1000.0; + } + else if (!strcmp(argv[i], "-opt-size")) + { + i++; + size_w = atoi(argv[i]); + i++; + size_h = atoi(argv[i]); + } + } + + if (!_svg_init(file)) return -1; + if (!read_svg_header(scale_down, dpi, size_w, size_h)) return -1; + + if (head_only != 0) + { + printf("size %d %d\n", width, height); + printf("alpha 1\n"); + printf("done\n"); + } + else + { + if (read_svg_data()) + { + printf("size %d %d\n", width, height); + printf("alpha 1\n"); + if (shm_fd >= 0) printf("shmfile %s\n", shmfile); + else + { + printf("data\n"); + fwrite(shm_addr, width * height * sizeof(DATA32), 1, stdout); + } + shm_free(); + } + } + _svg_shutdown(); + return 0; + +} + From a6011e62983269305e158f097ad69fcc10a25234 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 31 May 2012 14:05:38 +0000 Subject: [PATCH 085/347] evas_generic_loaders/configure.ac: Extend lipoppler check to avoid 0.20 and upwards libpoppler changed API with 0.20 and our code is not prepared for that. Thus make sure we only build the pdf loader when we find a working lib version. Thanks goes to vtorri for autoconf consulting SVN revision: 71584 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index c2b0573fa3..a0a993d129 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -60,7 +60,7 @@ PKG_PROG_PKG_CONFIG # Eina library PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) -PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12], [have_poppler="yes"], [have_poppler="no"]) +PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12 poppler < 0.20], [have_poppler="yes"], [have_poppler="no"]) PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) From 439d28c7173bd233cb518af03dbd0ca862c8ee48 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 5 Jun 2012 10:30:38 +0000 Subject: [PATCH 086/347] evas_generic_loaders: add support for poppler 0.20. Patch by Fanina "cippp" Cristian . SVN revision: 71706 --- legacy/evas_generic_loaders/AUTHORS | 1 + legacy/evas_generic_loaders/ChangeLog | 4 ++++ legacy/evas_generic_loaders/NEWS | 1 + legacy/evas_generic_loaders/configure.ac | 7 +++++++ legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 12 ++++++++++++ 5 files changed, 25 insertions(+) diff --git a/legacy/evas_generic_loaders/AUTHORS b/legacy/evas_generic_loaders/AUTHORS index ea752feac9..2538a1a39b 100644 --- a/legacy/evas_generic_loaders/AUTHORS +++ b/legacy/evas_generic_loaders/AUTHORS @@ -2,3 +2,4 @@ The Rasterman (Carsten Haitzler) Christian Kreibich Vincent Torri Michael Bouchaud +Fanina "cippp" Cristian diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index 487d24ae59..c48c81bd87 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -18,3 +18,7 @@ * Make rsvg backend use the generic backend as it is our main source of crash in e17. + +2012-05-06 Fanina Cristian + + * Add support for Poppler 0.20. diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index a76ebdd2f8..4d4030eed9 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -6,6 +6,7 @@ Changes since Evas Generic Loaders 1.2.0: Additions: * Add a librsvg generic loader. + * Add support for poppler 0.20 Evas Generic Loaders 1.2.0 diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index a0a993d129..093b29f7a7 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -60,7 +60,14 @@ PKG_PROG_PKG_CONFIG # Eina library PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) +have_poppler="no" PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12 poppler < 0.20], [have_poppler="yes"], [have_poppler="no"]) +PKG_CHECK_MODULES([POPPLER2], [poppler >= 0.20], + [ + have_poppler="yes" + AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) + ], + [have_poppler="${have_poppler}"]) PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 115b3be421..b1fe1f2c95 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -157,14 +157,26 @@ void poppler_load_image(int size_w, int size_h) if (!output_dev) return; +#ifdef HAVE_POPPLER_020 + output_dev->startDoc(pdfdoc); +#else output_dev->startDoc(pdfdoc->getXRef()); +#endif if (dpi <= 0.0) dpi = DEF_DPI; + +#ifdef HAVE_POPPLER_020 + page->displaySlice(output_dev, dpi, dpi, + 0, false, false, + 0, 0, width, height, + false, NULL, NULL); +#else page->displaySlice(output_dev, dpi, dpi, 0, false, false, 0, 0, width, height, false, pdfdoc->getCatalog()); +#endif color_ptr = output_dev->getBitmap()->getDataPtr(); shm_alloc(crop_width * crop_height * sizeof(DATA32)); From 721f2a0e462fa9e026f36baef19d3fac9f28e610 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 6 Jun 2012 10:36:37 +0000 Subject: [PATCH 087/347] generic loaders can now be determined by configure flags SVN revision: 71740 --- legacy/evas_generic_loaders/configure.ac | 82 +++++++++++++++++++----- 1 file changed, 65 insertions(+), 17 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 093b29f7a7..bdc84a5a12 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -60,32 +60,80 @@ PKG_PROG_PKG_CONFIG # Eina library PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) -have_poppler="no" -PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12 poppler < 0.20], [have_poppler="yes"], [have_poppler="no"]) -PKG_CHECK_MODULES([POPPLER2], [poppler >= 0.20], - [ - have_poppler="yes" - AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) - ], - [have_poppler="${have_poppler}"]) +want_poppler=yes +AC_ARG_ENABLE([poppler], + [AC_HELP_STRING([--disable-poppler], [disable poppler support @<:@default==enabled@:>@])], + [want_poppler=$enableval] +) -PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) +if test "x$want_poppler" = "xyes" ; then + PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12 poppler < 0.20], [have_poppler="yes"], [have_poppler="no"]) + PKG_CHECK_MODULES([POPPLER2], [poppler >= 0.20], + [ + have_poppler="yes" + AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) + ], + [have_poppler="${have_poppler}"]) +else + have_poppler=no +fi -PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) +want_spectre=yes +AC_ARG_ENABLE([spectre], + [AC_HELP_STRING([--disable-spectre], [disable spectre support @<:@default==enabled@:>@])], + [want_spectre=$enableval] +) -PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_svg="yes"], [have_svg="no"]) +if test "x$want_spectre" = "xyes" ; then + PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) +else + have_ps=no +fi + +want_libraw=yes +AC_ARG_ENABLE([libraw], + [AC_HELP_STRING([--disable-libraw], [disable libraw support @<:@default==enabled@:>@])], + [want_libraw=$enableval] +) + +if test "x$want_libraw" = "xyes" ; then + PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) +else + have_raw=no +fi + +want_svg=yes +AC_ARG_ENABLE([svg], + [AC_HELP_STRING([--disable-svg], [disable svg support @<:@default==enabled@:>@])], + [want_svg=$enableval] +) + +if test "x$want_svg" = "xyes" ; then + PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_svg="yes"], [have_svg="no"]) +else + have_svg=no +fi GST_REQS=0.10.13 GSTPLUG_REQS=0.10.13 GST_MAJORMINOR=0.10 -PKG_CHECK_MODULES([GSTREAMER], - [gstreamer-$GST_MAJORMINOR >= $GST_REQS - gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS - ], - [have_gst="yes"], - [have_gst="no"]) +want_gst=yes +AC_ARG_ENABLE([gstreamer], + [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], + [want_gstreamer=$enableval] +) +if test "x$want_gstreamer" = "xyes" ; then + PKG_CHECK_MODULES([GSTREAMER], + [gstreamer-$GST_MAJORMINOR >= $GST_REQS + gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS + ], + [have_gst="yes"], + [have_gst="no"]) +else + have_gst=no +fi AM_CONDITIONAL(HAVE_GST, test "x${have_gst}" = "xyes") AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) From d51241246928766930fc00e7eb5357453d66c6ea Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 7 Jun 2012 22:18:45 +0000 Subject: [PATCH 088/347] Fix compilation with poppler >= 0.20 SVN revision: 71824 --- legacy/evas_generic_loaders/configure.ac | 66 +++++++++++++----------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index bdc84a5a12..970998cc30 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -60,29 +60,42 @@ PKG_PROG_PKG_CONFIG # Eina library PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) -want_poppler=yes AC_ARG_ENABLE([poppler], [AC_HELP_STRING([--disable-poppler], [disable poppler support @<:@default==enabled@:>@])], - [want_poppler=$enableval] -) + [want_poppler=$enableval], + [want_poppler="yes"]) -if test "x$want_poppler" = "xyes" ; then - PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12 poppler < 0.20], [have_poppler="yes"], [have_poppler="no"]) - PKG_CHECK_MODULES([POPPLER2], [poppler >= 0.20], - [ - have_poppler="yes" - AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) - ], - [have_poppler="${have_poppler}"]) +if test "x${want_poppler}" = "xyes" ; then + PKG_CHECK_EXISTS([poppler >= 0.12 poppler < 0.20], + [ + poppler_pc="poppler >= 0.12 poppler < 0.20" + have_poppler="yes" + ], + [have_poppler="no"]) + + if test "x${have_poppler}" = "xno" ; then + PKG_CHECK_EXISTS([poppler >= 0.20], + [ + poppler_pc="poppler >= 0.20" + AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) + have_poppler="yes" + ], + [have_poppler="no"]) + fi + + if test "x${have_poppler}" = "xyes" ; then + PKG_CHECK_MODULES([POPPLER], [${poppler_pc}], + [have_poppler="yes"], + [have_poppler="no"]) + fi else - have_poppler=no + have_poppler="no" fi -want_spectre=yes AC_ARG_ENABLE([spectre], [AC_HELP_STRING([--disable-spectre], [disable spectre support @<:@default==enabled@:>@])], - [want_spectre=$enableval] -) + [want_spectre=$enableval], + [want_spectre="yes"]) if test "x$want_spectre" = "xyes" ; then PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) @@ -91,11 +104,10 @@ else fi -want_libraw=yes AC_ARG_ENABLE([libraw], [AC_HELP_STRING([--disable-libraw], [disable libraw support @<:@default==enabled@:>@])], - [want_libraw=$enableval] -) + [want_libraw=$enableval], + [want_libraw="yes"]) if test "x$want_libraw" = "xyes" ; then PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) @@ -103,10 +115,10 @@ else have_raw=no fi -want_svg=yes AC_ARG_ENABLE([svg], [AC_HELP_STRING([--disable-svg], [disable svg support @<:@default==enabled@:>@])], - [want_svg=$enableval] + [want_svg=$enableval], + [want_svg="yes"] ) if test "x$want_svg" = "xyes" ; then @@ -118,11 +130,10 @@ GST_REQS=0.10.13 GSTPLUG_REQS=0.10.13 GST_MAJORMINOR=0.10 -want_gst=yes AC_ARG_ENABLE([gstreamer], [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], - [want_gstreamer=$enableval] -) + [want_gstreamer=$enableval], + [want_gstreamer="yes"]) if test "x$want_gstreamer" = "xyes" ; then PKG_CHECK_MODULES([GSTREAMER], @@ -134,10 +145,10 @@ if test "x$want_gstreamer" = "xyes" ; then else have_gst=no fi -AM_CONDITIONAL(HAVE_GST, test "x${have_gst}" = "xyes") +AM_CONDITIONAL([HAVE_GST], [test "x${have_gst}" = "xyes"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) -AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) -AM_CONDITIONAL(HAVE_RAW, [test "x${have_raw}" = "xyes"]) +AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) +AM_CONDITIONAL([HAVE_RAW], [test "x${have_raw}" = "xyes"]) AM_CONDITIONAL([HAVE_SVG], [test "x${have_svg}" = "xyes"]) ### Checks for header files @@ -176,14 +187,11 @@ AC_SUBST(SHM_OPEN_LIBS) ### Checks for compiler characteristics AM_PROG_CC_C_O -AC_C_CONST AC_C_INLINE -AC_PROG_CC_STDC AC_C_BIGENDIAN AC_C___ATTRIBUTE__ ### Checks for library functions -AC_ISC_POSIX AC_CONFIG_FILES([ Makefile From d83dd24951f917942c440da4dc28f44db93c750c Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 8 Jun 2012 04:59:37 +0000 Subject: [PATCH 089/347] emotion: Add support for "playback_started" callback to generic player. Patch by Pierre Le Magourou SVN revision: 71830 --- .../emotion_generic_players/src/vlc/emotion_generic_vlc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 72649ace9b..4fe1d16fbc 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -23,6 +23,7 @@ enum _Thread_Events { EM_THREAD_POSITION_CHANGED, + EM_THREAD_PLAYBACK_STARTED, EM_THREAD_PLAYBACK_STOPPED, EM_THREAD_LAST }; @@ -363,6 +364,8 @@ _event_cb(const struct libvlc_event_t *ev, void *data) break; case libvlc_MediaPlayerPlaying: _send_resize(app, app->w, app->h); + thread_event = EM_THREAD_PLAYBACK_STARTED; + write(app->fd_write, &thread_event, sizeof(thread_event)); break; case libvlc_MediaPlayerStopped: _send_file_set(app); @@ -720,6 +723,9 @@ _process_thread_events(struct _App *app) case EM_THREAD_POSITION_CHANGED: _position_changed(app); break; + case EM_THREAD_PLAYBACK_STARTED: + _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); + break; case EM_THREAD_PLAYBACK_STOPPED: libvlc_media_player_stop(app->mp); app->playing = 0; From c1c529f2cfd7986c9fdf65ee049494f978a76672 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 8 Jun 2012 05:10:29 +0000 Subject: [PATCH 090/347] emotion: implement SPU switch for generic/vlc. Patch by Hugo Camboulive . SVN revision: 71831 --- .../src/vlc/emotion_generic_vlc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 4fe1d16fbc..7ec0a6f6c2 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -473,6 +473,16 @@ _volume_set(struct _App *app) libvlc_audio_set_volume(app->mp, vol); } +static void +_spu_track_set(struct _App *app) +{ + int track; + + _em_read_safe(app->em_read, &track, sizeof(track)); + + libvlc_video_set_spu(app->mp, track); +} + static void _audio_track_set(struct _App *app) { @@ -596,6 +606,9 @@ _process_emotion_commands(struct _App *app) case EM_CMD_VOLUME_SET: _volume_set(app); break; + case EM_CMD_SPU_TRACK_SET: + _spu_track_set(app); + break; case EM_CMD_AUDIO_TRACK_SET: _audio_track_set(app); break; From 7cd502180a18d9470663d36bc4ada2225846361c Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Fri, 15 Jun 2012 07:58:01 +0000 Subject: [PATCH 091/347] GAMES, emap, darkness, evas, evas_generic_loaders, MARKETING: Updated/Added .gitignore. SVN revision: 72171 --- legacy/evas_generic_loaders/.gitignore | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 legacy/evas_generic_loaders/.gitignore diff --git a/legacy/evas_generic_loaders/.gitignore b/legacy/evas_generic_loaders/.gitignore new file mode 100644 index 0000000000..2de4485bc4 --- /dev/null +++ b/legacy/evas_generic_loaders/.gitignore @@ -0,0 +1,64 @@ +*~ +*.swp +*.swo +ABOUT-NLS +INSTALL +Makefile +Makefile.in +aclocal.m4 +autom4te.cache/ +compile +config.cache +config.cache-env +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +depcomp +install-sh +ltmain.sh +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 +missing +src/Makefile +src/Makefile.in +src/bin/Makefile +src/bin/Makefile.in +src/bin/common/Makefile +src/bin/common/Makefile.in +src/bin/gst/.deps/ +src/bin/gst/Makefile +src/bin/gst/Makefile.in +src/bin/gst/evas_image_loader.gst +src/bin/gst/evas_image_loader_gst-main.o +src/bin/gst/evas_image_loader_gst-shmfile.o +src/bin/pdf/.deps/ +src/bin/pdf/Makefile +src/bin/pdf/Makefile.in +src/bin/ps/.deps/ +src/bin/ps/Makefile +src/bin/ps/Makefile.in +src/bin/raw/.deps/ +src/bin/raw/Makefile +src/bin/raw/Makefile.in +src/bin/svg/.deps/ +src/bin/svg/Makefile +src/bin/svg/Makefile.in +src/bin/svg/evas_image_loader.svg +src/bin/svg/evas_image_loader_svg-main.o +src/bin/svg/evas_image_loader_svg-shmfile.o +src/bin/xcf/.deps/ +src/bin/xcf/Makefile +src/bin/xcf/Makefile.in +src/bin/xcf/evas_image_loader.xcf +src/bin/xcf/evas_image_loader_xcf-main.o +src/bin/xcf/evas_image_loader_xcf-pixelfuncs.o +src/bin/xcf/evas_image_loader_xcf-shmfile.o +stamp-h1 + From f913c6433e9d7d4ad44373b04bccc84ae6152f30 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 19 Jun 2012 06:16:41 +0000 Subject: [PATCH 092/347] missing @EFL_SHM_OPEN_LIBS@ for shm_open. SVN revision: 72439 --- legacy/emotion_generic_players/src/vlc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am index ca9d22a92f..5cda1b95b4 100644 --- a/legacy/emotion_generic_players/src/vlc/Makefile.am +++ b/legacy/emotion_generic_players/src/vlc/Makefile.am @@ -15,4 +15,4 @@ internal_bin_PROGRAMS = em_generic_vlc em_generic_vlc_SOURCES = emotion_generic_vlc.c em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h -em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ -lpthread +em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ @EFL_SHM_OPEN_LIBS@ -lpthread From 198bfa025d2c0d6050f1cfd5e7192d1ae1c8f011 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 30 Jun 2012 05:32:04 +0000 Subject: [PATCH 093/347] add gst loader timeout. SVN revision: 73071 --- legacy/evas_generic_loaders/ChangeLog | 6 ++++++ legacy/evas_generic_loaders/src/bin/gst/main.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index c48c81bd87..f29db937cc 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -22,3 +22,9 @@ 2012-05-06 Fanina Cristian * Add support for Poppler 0.20. + +2012-06-30 Carsten Haitzler (The Rasterman) + + * Add timeout (default 5 seconds) for gstreamer loader in case + gst hangs. + diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 1207cb4fc4..18723ac5a8 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -4,6 +4,8 @@ #include #include +#include +#include #include @@ -21,6 +23,8 @@ #define D(fmt, args...) #endif +#define TIMEOUT 5 + #define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000" static GstElement *pipeline = NULL; @@ -168,6 +172,13 @@ _gst_load_image(int size_w, int size_h) memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); } +static void +timeout(int val) +{ + // error - timeout :( + exit(-7); +} + int main(int argc, char **argv) { @@ -209,6 +220,10 @@ main(int argc, char **argv) } } + // timeout: if we can't manage to get this done in TIMEOUT seconds, give up. + signal(SIGALRM, timeout); + alarm(TIMEOUT); + D("_gst_init_file\n"); if (!_gst_init(file)) From 8e30ffbaa5076cb5247ff62900c3d20b5ed6c4c0 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 9 Jul 2012 10:20:21 +0000 Subject: [PATCH 094/347] update all versions in @sincs, README's and configure.ac's etc. to reflect a unified release version, for now 1.6.99. SVN revision: 73498 --- legacy/evas_generic_loaders/README | 2 +- legacy/evas_generic_loaders/configure.ac | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 9c4ee86181..c656fa1c65 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,4 +1,4 @@ -Evas generic loaders 1.2.0 +Evas generic loaders 1.7.0 ****************************************************************************** diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 970998cc30..9df235d9da 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,7 +1,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [2]) +m4_define([v_min], [6]) m4_define([v_mic], [99]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) @@ -58,7 +58,7 @@ PKG_PROG_PKG_CONFIG ### Checks for libraries # Eina library -PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) +PKG_CHECK_MODULES(EINA, [eina >= 1.6.99]) AC_ARG_ENABLE([poppler], [AC_HELP_STRING([--disable-poppler], [disable poppler support @<:@default==enabled@:>@])], From 2ca4c3be16bb898b04e5c08f73380b798ffc1bb9 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 10 Aug 2012 10:37:05 +0000 Subject: [PATCH 095/347] alpha release of 1.7 - let's roll. ALPHA! SVN revision: 75091 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 9df235d9da..b2621f157d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -6,7 +6,7 @@ m4_define([v_mic], [99]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) +m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 1095e49c21e89623208908aee3c068b81ca9891a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 10 Aug 2012 10:51:17 +0000 Subject: [PATCH 096/347] more updates for 1.7.0 alpha. SVN revision: 75095 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index b2621f157d..82852bb0c7 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,8 +1,8 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [6]) -m4_define([v_mic], [99]) +m4_define([v_min], [7]) +m4_define([v_mic], [0]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line From 04ce80413d4c082d526d7e42c7cab480635efc42 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 10 Aug 2012 14:05:23 +0000 Subject: [PATCH 097/347] evas_generic_loaders: fix version in NEWS SVN revision: 75109 --- legacy/evas_generic_loaders/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 4d4030eed9..7cc8c51d0c 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,4 @@ -Evas Generic Loaders 1.3.0 +Evas Generic Loaders 1.7.0 Changes since Evas Generic Loaders 1.2.0: ----------------------------------------- From aee3db28ae66f1011931b10ab359f8bed7543c2a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 16 Aug 2012 00:55:51 +0000 Subject: [PATCH 098/347] update README SVN revision: 75300 --- legacy/evas_generic_loaders/README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index c656fa1c65..91e62cc892 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -20,6 +20,7 @@ Recommended: poppler libraw libspectre + librsvg These are additional "generic" loaders for Evas that are stand-alone @@ -43,6 +44,8 @@ Generic loaders currently provided: Should we use directly libgs ? RAW (using libraw) + + SVG (using librsvg) MPG/AVI/OGV/MOV/MKV/WMV etc. (using Gstreamer) Should we add libxine and vlc ? @@ -53,7 +56,7 @@ Possible fun ones in future: DJVU (using libdjvu) - PPT/PPTX + PPT/PPTX/DOC/DOCX/XLS... (beats me how u can render a page from these without a whole office impl - but worth a try? libopenoffice/libllibreoffice if it ever happens?) From dcc905bd188b818496aa666446e57378dea0d927 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 17 Aug 2012 03:57:49 +0000 Subject: [PATCH 099/347] tag as beta... SVN revision: 75344 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 82852bb0c7..53e4c32eb8 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 5171e93dc55f5edbe4b86c6b4e78cc0e54c5861d Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 21 Aug 2012 09:17:38 +0000 Subject: [PATCH 100/347] emotion: fix priority_set/get Patch by Sohyun Kim SVN revision: 75495 --- .../src/vlc/emotion_generic_vlc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 7ec0a6f6c2..f41506491e 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -25,6 +25,7 @@ enum _Thread_Events { EM_THREAD_POSITION_CHANGED, EM_THREAD_PLAYBACK_STARTED, EM_THREAD_PLAYBACK_STOPPED, + EM_THREAD_EOF, EM_THREAD_LAST }; @@ -311,6 +312,7 @@ _play(struct _App *app) else { libvlc_time_t new_time = pos * 1000; + fprintf(stderr, "pos %f\n", pos); libvlc_media_player_set_time(app->mp, new_time); libvlc_media_player_play(app->mp); app->playing = 1; @@ -371,9 +373,11 @@ _event_cb(const struct libvlc_event_t *ev, void *data) _send_file_set(app); break; case libvlc_MediaPlayerEndReached: - thread_event = EM_THREAD_PLAYBACK_STOPPED; - write(app->fd_write, &thread_event, sizeof(thread_event)); - break; + thread_event = EM_THREAD_EOF; + write(app->fd_write, &thread_event, sizeof(thread_event)); + /* thread_event = EM_THREAD_PLAYBACK_STOPPED; */ + /* write(app->fd_write, &thread_event, sizeof(thread_event)); */ + break; } } @@ -739,6 +743,10 @@ _process_thread_events(struct _App *app) case EM_THREAD_PLAYBACK_STARTED: _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; + case EM_THREAD_EOF: + _send_cmd(app, EM_RESULT_FILE_EOF); + app->playing = 0; + break; case EM_THREAD_PLAYBACK_STOPPED: libvlc_media_player_stop(app->mp); app->playing = 0; From 86e4278771b150af3e02da162b2f2dcb88053be6 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 21 Aug 2012 09:20:08 +0000 Subject: [PATCH 101/347] emotion: oops, this files should never have gotten in. SVN revision: 75496 --- .../src/vlc/emotion_generic_vlc.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index f41506491e..7ec0a6f6c2 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -25,7 +25,6 @@ enum _Thread_Events { EM_THREAD_POSITION_CHANGED, EM_THREAD_PLAYBACK_STARTED, EM_THREAD_PLAYBACK_STOPPED, - EM_THREAD_EOF, EM_THREAD_LAST }; @@ -312,7 +311,6 @@ _play(struct _App *app) else { libvlc_time_t new_time = pos * 1000; - fprintf(stderr, "pos %f\n", pos); libvlc_media_player_set_time(app->mp, new_time); libvlc_media_player_play(app->mp); app->playing = 1; @@ -373,11 +371,9 @@ _event_cb(const struct libvlc_event_t *ev, void *data) _send_file_set(app); break; case libvlc_MediaPlayerEndReached: - thread_event = EM_THREAD_EOF; - write(app->fd_write, &thread_event, sizeof(thread_event)); - /* thread_event = EM_THREAD_PLAYBACK_STOPPED; */ - /* write(app->fd_write, &thread_event, sizeof(thread_event)); */ - break; + thread_event = EM_THREAD_PLAYBACK_STOPPED; + write(app->fd_write, &thread_event, sizeof(thread_event)); + break; } } @@ -743,10 +739,6 @@ _process_thread_events(struct _App *app) case EM_THREAD_PLAYBACK_STARTED: _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; - case EM_THREAD_EOF: - _send_cmd(app, EM_RESULT_FILE_EOF); - app->playing = 0; - break; case EM_THREAD_PLAYBACK_STOPPED: libvlc_media_player_stop(app->mp); app->playing = 0; From 7ed7b191c773096e2ca440eb79ed893cf5840d5e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 27 Aug 2012 10:24:41 +0000 Subject: [PATCH 102/347] no this isnt release - this is simply me removing the beta tag so when we release it's ready. SVN revision: 75740 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 53e4c32eb8..20e5f29bbf 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From a77b8103c9760eef7287d787da52f7b8c88310a7 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 28 Aug 2012 09:17:34 +0000 Subject: [PATCH 103/347] emotion: reset VLC pipeline on EOS. NOTE: I gave up and completely restart the child, seems like the only reliable way to do it. SVN revision: 75769 --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 7ec0a6f6c2..583036df6f 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -312,7 +312,7 @@ _play(struct _App *app) { libvlc_time_t new_time = pos * 1000; libvlc_media_player_set_time(app->mp, new_time); - libvlc_media_player_play(app->mp); + libvlc_media_player_play(app->mp); app->playing = 1; } } @@ -395,8 +395,8 @@ _file_set(struct _App *app) fprintf(stderr, "could not open path: \"%s\"\n", app->filename); return; } - app->mp = libvlc_media_player_new_from_media(app->m); + app->mp = libvlc_media_player_new_from_media(app->m); if (!app->mp) { fprintf(stderr, "could not create new player from media.\n"); @@ -740,7 +740,6 @@ _process_thread_events(struct _App *app) _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; case EM_THREAD_PLAYBACK_STOPPED: - libvlc_media_player_stop(app->mp); app->playing = 0; _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); break; From 943b5ca9591cf12d58d6ee2acedc83e4435cc573 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 30 Aug 2012 10:34:01 +0000 Subject: [PATCH 104/347] and up ver to 1.7.99 now in svn. nack to svnrev num at end. SVN revision: 75869 --- legacy/evas_generic_loaders/README | 2 +- legacy/evas_generic_loaders/configure.ac | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 91e62cc892..c69ab09c63 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,4 +1,4 @@ -Evas generic loaders 1.7.0 +Evas generic loaders 1.7.99 ****************************************************************************** diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 20e5f29bbf..c9fdcdeb42 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [7]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -m4_undefine([v_rev]) +dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) From 1ab195a7c5a20b3122001597256d06b1447aa923 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 30 Aug 2012 10:55:40 +0000 Subject: [PATCH 105/347] ChangeLog: state we did a release. SVN revision: 75873 --- legacy/evas_generic_loaders/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index f29db937cc..50b8892106 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -28,3 +28,6 @@ * Add timeout (default 5 seconds) for gstreamer loader in case gst hangs. +2012-04-26 Carsten Haitzler (The Rasterman) + + 1.7.0 release From 32fe3e1619e45254439a3e3860ba67231f88a696 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 30 Aug 2012 11:26:00 +0000 Subject: [PATCH 106/347] ChangeLog: back in time. SVN revision: 75875 --- legacy/evas_generic_loaders/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index 50b8892106..94bdc620bf 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -28,6 +28,6 @@ * Add timeout (default 5 seconds) for gstreamer loader in case gst hangs. -2012-04-26 Carsten Haitzler (The Rasterman) +2012-08-30 Carsten Haitzler (The Rasterman) 1.7.0 release From f80c3d9399984adc3b1c2fe90dfaf52342e44020 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 18 Sep 2012 14:14:35 +0000 Subject: [PATCH 107/347] evas_generic_loaders: Update .gitignore to ignore more build files SVN revision: 76822 --- legacy/evas_generic_loaders/.gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/.gitignore b/legacy/evas_generic_loaders/.gitignore index 2de4485bc4..052891014c 100644 --- a/legacy/evas_generic_loaders/.gitignore +++ b/legacy/evas_generic_loaders/.gitignore @@ -41,6 +41,12 @@ src/bin/gst/evas_image_loader_gst-shmfile.o src/bin/pdf/.deps/ src/bin/pdf/Makefile src/bin/pdf/Makefile.in +src/bin/pdf/evas_image_loader.pdf +src/bin/pdf/evas_image_loader_pdf-shmfile.o +src/bin/pdf/main.o +src/bin/ps/evas_image_loader.ps +src/bin/ps/evas_image_loader_ps-main.o +src/bin/ps/evas_image_loader_ps-shmfile.o src/bin/ps/.deps/ src/bin/ps/Makefile src/bin/ps/Makefile.in @@ -61,4 +67,3 @@ src/bin/xcf/evas_image_loader_xcf-main.o src/bin/xcf/evas_image_loader_xcf-pixelfuncs.o src/bin/xcf/evas_image_loader_xcf-shmfile.o stamp-h1 - From 764ddff2f89837995642fcd709bb1fb5fb252f2a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 26 Sep 2012 08:07:33 +0000 Subject: [PATCH 108/347] add timeouts to all generic loaders - same timer infra. SVN revision: 77076 --- legacy/evas_generic_loaders/ChangeLog | 5 +++++ legacy/evas_generic_loaders/NEWS | 10 +++++++++- .../src/bin/common/Makefile.am | 2 +- .../src/bin/common/timeout.c | 16 ++++++++++++++++ .../src/bin/common/timeout.h | 14 ++++++++++++++ .../evas_generic_loaders/src/bin/gst/Makefile.am | 3 ++- legacy/evas_generic_loaders/src/bin/gst/main.c | 15 ++------------- .../evas_generic_loaders/src/bin/pdf/Makefile.am | 3 ++- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 3 +++ .../evas_generic_loaders/src/bin/ps/Makefile.am | 3 ++- legacy/evas_generic_loaders/src/bin/ps/main.c | 3 +++ .../evas_generic_loaders/src/bin/raw/Makefile.am | 5 ++++- legacy/evas_generic_loaders/src/bin/raw/main.c | 3 +++ .../evas_generic_loaders/src/bin/svg/Makefile.am | 5 ++++- legacy/evas_generic_loaders/src/bin/svg/main.c | 3 +++ .../evas_generic_loaders/src/bin/xcf/Makefile.am | 3 ++- legacy/evas_generic_loaders/src/bin/xcf/main.c | 5 +++++ 17 files changed, 80 insertions(+), 21 deletions(-) create mode 100644 legacy/evas_generic_loaders/src/bin/common/timeout.c create mode 100644 legacy/evas_generic_loaders/src/bin/common/timeout.h diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index 94bdc620bf..4e435e67d0 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -31,3 +31,8 @@ 2012-08-30 Carsten Haitzler (The Rasterman) 1.7.0 release + +2012-09-26 Carsten Haitzler (The Rasterman) + + * Add various alarm/signal based timeouts for all generic + loaders in case they get stuck diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 7cc8c51d0c..bc4a04cc56 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,12 @@ -Evas Generic Loaders 1.7.0 +Evas Generic Loaders 1.8.0 + +Changes since Evas Generic Loaders 1.7.0: +----------------------------------------- + +Improvements: + + * All generic loader binaries have built-in timeouts in case they + get stuck. Changes since Evas Generic Loaders 1.2.0: ----------------------------------------- diff --git a/legacy/evas_generic_loaders/src/bin/common/Makefile.am b/legacy/evas_generic_loaders/src/bin/common/Makefile.am index 94aa56020e..59035f0389 100644 --- a/legacy/evas_generic_loaders/src/bin/common/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/common/Makefile.am @@ -1,3 +1,3 @@ MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = shmfile.c shmfile.h +EXTRA_DIST = shmfile.c shmfile.h timeout.c timeout.h diff --git a/legacy/evas_generic_loaders/src/bin/common/timeout.c b/legacy/evas_generic_loaders/src/bin/common/timeout.c new file mode 100644 index 0000000000..6d52aa9609 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/common/timeout.c @@ -0,0 +1,16 @@ +#include +#include + +static void +_timeout(int val) +{ + _exit(-1); + if (val) return; +} + +void +timeout_init(int seconds) +{ + signal(SIGALRM, _timeout); + alarm(seconds); +} diff --git a/legacy/evas_generic_loaders/src/bin/common/timeout.h b/legacy/evas_generic_loaders/src/bin/common/timeout.h new file mode 100644 index 0000000000..8725627e06 --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/common/timeout.h @@ -0,0 +1,14 @@ +#ifndef TIMEOUT_H +#define TIMEOUT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +void timeout_init(int seconds); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index bbc73739a3..f680d6426f 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -17,7 +17,8 @@ bindir = $(libdir)/evas/utils evas_image_loader_gst_SOURCES = \ main.c \ -$(top_srcdir)/src/bin/common/shmfile.c +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c evas_image_loader_gst_CFLAGS = evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_gst_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 18723ac5a8..738ae3df2f 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -5,13 +5,13 @@ #include #include #include -#include #include #include #include "shmfile.h" +#include "timeout.h" #define DATA32 unsigned int @@ -23,8 +23,6 @@ #define D(fmt, args...) #endif -#define TIMEOUT 5 - #define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000" static GstElement *pipeline = NULL; @@ -172,13 +170,6 @@ _gst_load_image(int size_w, int size_h) memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); } -static void -timeout(int val) -{ - // error - timeout :( - exit(-7); -} - int main(int argc, char **argv) { @@ -220,9 +211,7 @@ main(int argc, char **argv) } } - // timeout: if we can't manage to get this done in TIMEOUT seconds, give up. - signal(SIGALRM, timeout); - alarm(TIMEOUT); + timeout_init(10); D("_gst_init_file\n"); diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am index 5fc4f235d2..9269c1c258 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am @@ -17,7 +17,8 @@ bindir = $(libdir)/evas/utils evas_image_loader_pdf_SOURCES = \ main.cpp \ -$(top_srcdir)/src/bin/common/shmfile.c +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c evas_image_loader_pdf_CFLAGS = evas_image_loader_pdf_LDADD = @POPPLER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_pdf_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index b1fe1f2c95..cc4f532fc1 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -15,6 +15,7 @@ #include #include "shmfile.h" +#include "timeout.h" #define DATA32 unsigned int @@ -242,6 +243,8 @@ main(int argc, char **argv) D("dpi....: %f\n", dpi); D("page...: %d\n", page); + timeout_init(10); + if (!poppler_init(file, page, size_w, size_h)) return -1; D("poppler_file_init done\n"); diff --git a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am index 95f025ecfe..eb62cc62a4 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am @@ -17,7 +17,8 @@ bindir = $(libdir)/evas/utils evas_image_loader_ps_SOURCES = \ main.c \ -$(top_srcdir)/src/bin/common/shmfile.c +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c evas_image_loader_ps_CFLAGS = evas_image_loader_ps_LDADD = @SPECTRE_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_ps_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index a2cc8c3072..39a34e6f8f 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -10,6 +10,7 @@ #include #include "shmfile.h" +#include "timeout.h" #define DATA32 unsigned int @@ -249,6 +250,8 @@ main(int argc, char **argv) D("dpi....: %f\n", dpi); D("page...: %d\n", page); + timeout_init(10); + if (!_spectre_init(file, page, size_w, size_h)) return -1; D("_spectre_init done\n"); diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am index d9fa0739ad..90d90055b8 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am @@ -14,7 +14,10 @@ AM_CPPFLAGS = \ bin_PROGRAMS = evas_image_loader.raw bindir = $(libdir)/evas/utils -evas_image_loader_raw_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c +evas_image_loader_raw_SOURCES = \ +main.c \ +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ -lm evas_image_loader_raw_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index 5427ee31d3..31626c226f 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -9,6 +9,7 @@ #include #include #include "shmfile.h" +#include "timeout.h" #ifdef HAVE_NETINET_IN_H # include @@ -205,6 +206,8 @@ int main(int argc, char **argv) } } + timeout_init(4); + if (!_raw_init(file)) return -1; if (head_only != 0) { diff --git a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am index 6ea0778e8e..5366673225 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am @@ -14,7 +14,10 @@ AM_CPPFLAGS = \ bin_PROGRAMS = evas_image_loader.svg bindir = $(libdir)/evas/utils -evas_image_loader_svg_SOURCES = main.c $(top_srcdir)/src/bin/common/shmfile.c +evas_image_loader_svg_SOURCES = \ +main.c \ +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c evas_image_loader_svg_CFLAGS = @SVG_CFLAGS@ evas_image_loader_svg_LDADD = @SVG_LIBS@ @SHM_OPEN_LIBS@ -lm evas_image_loader_svg_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c index 021fc64eca..9a3515347b 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/main.c +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -3,6 +3,7 @@ #endif #include #include "shmfile.h" +#include "timeout.h" #include @@ -181,6 +182,8 @@ int main(int argc, char **argv) } } + timeout_init(5); + if (!_svg_init(file)) return -1; if (!read_svg_header(scale_down, dpi, size_w, size_h)) return -1; diff --git a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am index 8d3d0b19a9..041e8b31d2 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am @@ -16,7 +16,8 @@ bindir = $(libdir)/evas/utils evas_image_loader_xcf_SOURCES = \ main.c pixelfuncs.c common.h \ -$(top_srcdir)/src/bin/common/shmfile.c +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c evas_image_loader_xcf_CFLAGS = @EINA_CFLAGS@ evas_image_loader_xcf_LDADD = @EINA_LIBS@ -lz -lm @SHM_OPEN_LIBS@ evas_image_loader_xcf_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 084d94a2d6..62212cf93d 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -47,6 +47,7 @@ */ #include "common.h" #include "shmfile.h" +#include "timeout.h" #define FREE(X) { free(X); X = NULL; } @@ -1693,8 +1694,12 @@ main(int argc, char **argv) // int size_h = atoi(argv[i]); } } + + timeout_init(8); + D("xcf_file_init\n"); if (!xcf_file_init(file)) return -1; + D("size %i %i\n", image->width, image->height); if (!head_only) { From f1a88e0726ab4bc4994eca202fdcfcdb61a8d750 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 4 Oct 2012 12:25:33 +0000 Subject: [PATCH 109/347] shut up gst debug printfs SVN revision: 77433 --- legacy/evas_generic_loaders/src/bin/gst/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 738ae3df2f..7449ea6508 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -15,7 +15,7 @@ #define DATA32 unsigned int -#define GST_DBG +//#define GST_DBG #ifdef GST_DBG #define D(fmt, args...) fprintf(stderr, fmt, ## args) From 306d657e9a53a7ce63b5edd2b28f567f7c338b4a Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 9 Oct 2012 08:06:31 +0000 Subject: [PATCH 110/347] evas_generic_loaders: Don't use deprecated code SVN revision: 77619 --- legacy/evas_generic_loaders/configure.ac | 8 ++++++++ legacy/evas_generic_loaders/src/bin/svg/main.c | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index c9fdcdeb42..86fbd061ef 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -121,8 +121,16 @@ AC_ARG_ENABLE([svg], [want_svg="yes"] ) +have_svg_2_36="no" if test "x$want_svg" = "xyes" ; then PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_svg="yes"], [have_svg="no"]) + PKG_CHECK_MODULES( + [SVG_2_36], [librsvg-2.0 >= 2.36.0 cairo >= 1.0.0], + [ + have_svg_2_36="yes" + AC_DEFINE(HAVE_SVG_2_36, 1, [Have librsvg >= 2.36]) + ], + [have_svg_2_36="no"]) else have_svg=no fi diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c index 9a3515347b..366fe603e3 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/main.c +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -56,7 +56,11 @@ static inline Eina_Bool evas_image_load_file_is_svg(const char *file) static int _svg_init(const char *file) { +#ifdef HAVE_SVG_2_36 + g_type_init(); +#else rsvg_init(); +#endif if (!evas_image_load_file_is_svg(file)) return 0; @@ -74,7 +78,9 @@ _svg_shutdown(void) g_object_unref(rsvg); } // Maybe it's not crashing anymore, let's try it. +#ifndef HAVE_SVG_2_36 rsvg_term(); +#endif } static int From 7129ab6a52676205f2ce02b20d686c5f28453625 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Nov 2012 15:45:56 +0000 Subject: [PATCH 111/347] evas_generic_loaders: Update .gitignore file SVN revision: 79173 --- legacy/evas_generic_loaders/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/evas_generic_loaders/.gitignore b/legacy/evas_generic_loaders/.gitignore index 052891014c..ee63fb2227 100644 --- a/legacy/evas_generic_loaders/.gitignore +++ b/legacy/evas_generic_loaders/.gitignore @@ -67,3 +67,6 @@ src/bin/xcf/evas_image_loader_xcf-main.o src/bin/xcf/evas_image_loader_xcf-pixelfuncs.o src/bin/xcf/evas_image_loader_xcf-shmfile.o stamp-h1 +src/bin/gst/evas_image_loader_gst-timeout.o +src/bin/svg/evas_image_loader_svg-timeout.o +src/bin/xcf/evas_image_loader_xcf-timeout.o From 7d8f061a4a7f4b0ff9f7ba58ab2d97f1a03ff53c Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 4 Dec 2012 00:45:47 +0000 Subject: [PATCH 112/347] emotion/generic/vlc: Only send frame size when it's not zero. SVN revision: 80117 --- .../src/vlc/emotion_generic_vlc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 583036df6f..836eda3a45 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -708,7 +708,12 @@ _position_changed(struct _App *app) w = 1; h = 1; } - _send_resize(app, w, h); + + if (w > 0 || h > 0) + { + _send_resize(app, w, h); + app->size_sent = 1; + } /* sending audio track info */ _send_all_track_info(app); @@ -716,7 +721,8 @@ _position_changed(struct _App *app) /* sending meta info */ _send_all_meta_info(app); - libvlc_media_player_stop(app->mp); + if (app->size_sent) + libvlc_media_player_stop(app->mp); } static void From 36113f208511606fb9a7e85cf25cf87d729702bc Mon Sep 17 00:00:00 2001 From: Leandro Dorileo Date: Wed, 2 Jan 2013 21:03:30 +0000 Subject: [PATCH 113/347] Emotion: introce emotion_object_video_subtitle_file_set() call For setting an arbitrary subtitle file, this patch introduces the emotion_object_video_subtitle_file_set() and its counterpart emotion_object_video_subtitle_file_get(). The tag @sice were added as 1.7.2 since we're preparing a backport to stable tree. SVN revision: 82019 --- .../src/vlc/emotion_generic_vlc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 836eda3a45..d15341667a 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -37,6 +37,7 @@ struct _App { libvlc_event_manager_t *event_mgr; libvlc_event_manager_t *mevent_mgr; char *filename; + char *subtitle_path; char *shmname; void *tmpbuffer; int w, h; @@ -313,6 +314,10 @@ _play(struct _App *app) libvlc_time_t new_time = pos * 1000; libvlc_media_player_set_time(app->mp, new_time); libvlc_media_player_play(app->mp); + + if (app->subtitle_path) + libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); + app->playing = 1; } } @@ -377,6 +382,12 @@ _event_cb(const struct libvlc_event_t *ev, void *data) } } +static void +_subtitle_set(struct _App *app) +{ + _em_str_read(app->em_read, &app->subtitle_path); +} + static void _file_set(struct _App *app) { @@ -585,6 +596,9 @@ _process_emotion_commands(struct _App *app) case EM_CMD_FILE_SET_DONE: _file_set_done(app); break; + case EM_CMD_SUBTITLE_SET: + _subtitle_set(app); + break; case EM_CMD_FILE_CLOSE: _file_close(app); break; @@ -805,6 +819,7 @@ main(int argc, const char *argv[]) app.libvlc = libvlc_new(vlc_argc, vlc_argv); app.mp = NULL; app.filename = NULL; + app.subtitle_path = NULL; app.w = 0; app.h = 0; app.size_sent = 0; From 9bfc2751725c241994a4319f874c9f642ef300fa Mon Sep 17 00:00:00 2001 From: Leandro Dorileo Date: Thu, 3 Jan 2013 20:27:08 +0000 Subject: [PATCH 114/347] Emotion: generic vlc player now uses eina_log SVN revision: 82098 --- .../src/vlc/emotion_generic_vlc.c | 68 ++++++++++++------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index d15341667a..a20717303c 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -20,6 +20,14 @@ #include #include +#include + +static int _em_vlc_log_dom = -1; +#define ERR(...) EINA_LOG_DOM_ERR(_em_vlc_log_dom, __VA_ARGS__) +#define DBG(...) EINA_LOG_DOM_DBG(_em_vlc_log_dom, __VA_ARGS__) +#define INF(...) EINA_LOG_DOM_INFO(_em_vlc_log_dom, __VA_ARGS__) +#define WRN(...) EINA_LOG_DOM_WARN(_em_vlc_log_dom, __VA_ARGS__) +#define CRIT(...) EINA_LOG_DOM_CRIT(_em_vlc_log_dom, __VA_ARGS__) enum _Thread_Events { EM_THREAD_POSITION_CHANGED, @@ -80,8 +88,7 @@ _em_read_safe(int fd, void *buf, ssize_t size) continue; else { - fprintf(stderr, "could not read from fd %d: %s", - fd, strerror(errno)); + ERR("could not read from fd %d: %s", fd, strerror(errno)); return 0; } } @@ -117,8 +124,7 @@ _em_write_safe(int fd, const void *buf, ssize_t size) continue; else { - fprintf(stderr, "could not write to fd %d: %s", - fd, strerror(errno)); + ERR("could not write to fd %d: %s", fd, strerror(errno)); return 0; } } @@ -403,14 +409,14 @@ _file_set(struct _App *app) app->m = libvlc_media_new_path(app->libvlc, app->filename); if (!app->m) { - fprintf(stderr, "could not open path: \"%s\"\n", app->filename); + ERR("could not open path: \"%s\"", app->filename); return; } app->mp = libvlc_media_player_new_from_media(app->m); if (!app->mp) { - fprintf(stderr, "could not create new player from media.\n"); + ERR("could not create new player from media."); return; } @@ -748,8 +754,8 @@ _process_thread_events(struct _App *app) size = read(app->fd_read, &event, sizeof(event)); if (size != sizeof(event)) { - fprintf(stderr, "player: problem when reading thread event. size = %zd\n", size); - return; + ERR("player: problem when reading thread event. size = %zd", size); + return; } switch (event) { @@ -774,6 +780,24 @@ main(int argc, const char *argv[]) int tpipe[2]; // pipe for comunicating events from threads char cwidth[64], cheight[64], cpitch[64], chroma[64]; char buf[64]; + + if (!eina_init()) + { + EINA_LOG_CRIT("Can't initialize generic vlc player, eina failed."); + return -1; + } + + _em_vlc_log_dom = eina_log_domain_register("emotion_generic_vlc", + EINA_COLOR_CYAN); + if (_em_vlc_log_dom < 0) + { + EINA_LOG_CRIT("Unable to register emotion_generic_vlc log domain."); + goto error; + } + + if (!eina_log_domain_level_check(_em_vlc_log_dom, EINA_LOG_LEVEL_WARN)) + eina_log_domain_level_set("emotion_generic_vlc", EINA_LOG_LEVEL_WARN); + const char *vlc_argv[] = { "--quiet", @@ -791,9 +815,9 @@ main(int argc, const char *argv[]) if (argc < 3) { - fprintf(stderr, "player: missing paramters.\n"); - fprintf(stderr, "syntax:\n\t%s \n", argv[0]); - return -1; + ERR("missing parameters."); + ERR("syntax:\n\t%s ", argv[0]); + goto error; } app.em_read = atoi(argv[1]); @@ -829,8 +853,8 @@ main(int argc, const char *argv[]) if (_em_cmd_read(&app) != EM_CMD_INIT) { - fprintf(stderr, "player: wrong init command!\n"); - return -1; + ERR("wrong init command!"); + goto error; } int size; @@ -859,22 +883,18 @@ main(int argc, const char *argv[]) continue; else if (r < 0) { - fprintf(stderr, - "emotion_generic_vlc: an error ocurred on poll(): %s\n", - strerror(errno)); - break; + ERR("an error ocurred on poll(): %s", strerror(errno)); + break; } if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) { - fputs("emotion_generic_vlc: error communicating with stdin\n", - stderr); + ERR("error communicating with stdin", stderr); break; } if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) { - fputs("emotion_generic_vlc: error communicating with thread\n", - stderr); + ERR("error communicating with thread", stderr); break; } @@ -887,8 +907,10 @@ main(int argc, const char *argv[]) } libvlc_release(app.libvlc); - - return 0; + + error: + eina_shutdown(); + return -1; } #undef SEND_CMD_PARAM From cfdbc0473dc9922c0873fc40d6088bddd9e3a8d8 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 11 Jan 2013 03:07:58 +0000 Subject: [PATCH 115/347] add emotion_generic_players project. This is similar to evas_generic_loaders. It contains VLC player engine. SVN revision: 82603 --- legacy/emotion_generic_players/AUTHORS | 9 ++ legacy/emotion_generic_players/COPYING | 25 +++ legacy/emotion_generic_players/ChangeLog | 5 + legacy/emotion_generic_players/Makefile.am | 40 +++++ legacy/emotion_generic_players/NEWS | 0 legacy/emotion_generic_players/README | 24 +++ legacy/emotion_generic_players/autogen.sh | 10 ++ legacy/emotion_generic_players/configure.ac | 142 ++++++++++++++++++ .../m4/efl_compiler.m4 | 98 ++++++++++++ .../m4/emotion_generic_players.m4 | 37 +++++ .../emotion_generic_players/src/Makefile.am | 8 - .../src/vlc/Makefile.am | 18 --- .../src/vlc/emotion_generic_vlc.c | 14 +- 13 files changed, 397 insertions(+), 33 deletions(-) create mode 100644 legacy/emotion_generic_players/AUTHORS create mode 100644 legacy/emotion_generic_players/COPYING create mode 100644 legacy/emotion_generic_players/ChangeLog create mode 100644 legacy/emotion_generic_players/Makefile.am create mode 100644 legacy/emotion_generic_players/NEWS create mode 100644 legacy/emotion_generic_players/README create mode 100755 legacy/emotion_generic_players/autogen.sh create mode 100644 legacy/emotion_generic_players/configure.ac create mode 100644 legacy/emotion_generic_players/m4/efl_compiler.m4 create mode 100644 legacy/emotion_generic_players/m4/emotion_generic_players.m4 delete mode 100644 legacy/emotion_generic_players/src/Makefile.am delete mode 100644 legacy/emotion_generic_players/src/vlc/Makefile.am diff --git a/legacy/emotion_generic_players/AUTHORS b/legacy/emotion_generic_players/AUTHORS new file mode 100644 index 0000000000..3270ec5387 --- /dev/null +++ b/legacy/emotion_generic_players/AUTHORS @@ -0,0 +1,9 @@ +VLC +--- +Cedric Bail +Hugo Camboulive +Leandro Dorileo +Pierre Le Magourou +Rafael Antognolli +Sohyun Kim + diff --git a/legacy/emotion_generic_players/COPYING b/legacy/emotion_generic_players/COPYING new file mode 100644 index 0000000000..aab836272d --- /dev/null +++ b/legacy/emotion_generic_players/COPYING @@ -0,0 +1,25 @@ +Copyright notice for Emotion: + +Copyright (C) 2004-2011 Carsten Haitzler and various contributors (see AUTHORS) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED "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. diff --git a/legacy/emotion_generic_players/ChangeLog b/legacy/emotion_generic_players/ChangeLog new file mode 100644 index 0000000000..2d381b5fd9 --- /dev/null +++ b/legacy/emotion_generic_players/ChangeLog @@ -0,0 +1,5 @@ +2012-01-10 Gustavo Sverzut Barbieri (k-s) + + * Created the project based on previous + emotion/src/generic_players, as it was removed when Emotion was + merged into EFL single-tree. diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am new file mode 100644 index 0000000000..7c5e7c5c3f --- /dev/null +++ b/legacy/emotion_generic_players/Makefile.am @@ -0,0 +1,40 @@ +AUTOMAKE_OPTIONS = subdir-objects +ACLOCAL_AMFLAGS = -I m4 + +AM_MAKEFLAGS = --no-print-directory +AM_CFLAGS = \ +@EFL_CFLAGS@ \ +@EMOTION_CFLAGS@ + +AM_LDFLAGS = \ +@EFL_LDFLAGS@ + +EXTRA_DIST = \ +README \ +AUTHORS \ +COPYING \ +m4/efl_compiler_flag.m4 + +MAINTAINERCLEANFILES = \ +aclocal.m4 \ +compile \ +config.guess \ +config.h.in \ +config.sub \ +configure \ +depcomp \ +install-sh \ +ltmain.sh \ +Makefile.in \ +missing \ +mkinstalldirs + +emotiongenericplayersdir = $(EMOTION_GENERIC_PLAYERS_DIR) +emotiongenericplayers_PROGRAMS = + +if HAVE_VLC +emotiongenericplayers_PROGRAMS += src/vlc/vlc +src_vlc_vlc_SOURCES = src/vlc/emotion_generic_vlc.c +src_vlc_vlc_CPPFLAGS = @VLC_CFLAGS@ +src_vlc_vlc_LDADD = @VLC_LIBS@ +endif diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README new file mode 100644 index 0000000000..711f36cfca --- /dev/null +++ b/legacy/emotion_generic_players/README @@ -0,0 +1,24 @@ +Players for Emotion using "generic" module. + +EMOTION GENERIC PLAYERS +======================= + +Emotion support multiple modules provided as shared-objects under +${prefix}/lib/emotion/modules, making it extensible. However these +live in the same process as the application, thus problems handling +the media may crash or halt the application. Unfortunately media +handling is very error prone due multiple sources, sinks, decoders et +al, each with their own level of stability. + +To solve this emotion ships with a "generic" module that will be a +layer to talk to another process, the "player", using pipes and shared +memory (shm). If this external process dies, the main application +remains working (without any media, of course). Thus it is safer and +have some nice qualities as avoiding bringing in many libraries to +decode media, saving memory in the application process, etc. + +A secondary benefit is that the generic player is a separate process +and does not link with the user application code or EFL, avoiding +license conflicts. Many decoding libraries or elements exist in +conflicting licenses with GPL, LGPL or even proprietary code. + diff --git a/legacy/emotion_generic_players/autogen.sh b/legacy/emotion_generic_players/autogen.sh new file mode 100755 index 0000000000..d265ba52df --- /dev/null +++ b/legacy/emotion_generic_players/autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh config.cache + +autoreconf -vif + +if [ -z "$NOCONFIGURE" ]; then + exec ./configure -C "$@" +fi diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac new file mode 100644 index 0000000000..bbefa25ba3 --- /dev/null +++ b/legacy/emotion_generic_players/configure.ac @@ -0,0 +1,142 @@ +m4_define([v_maj], [1]) +m4_define([v_min], [7]) +m4_define([v_mic], [99]) + +dnl m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) + +#### FIXME: i am sure that we can do some m4 to automagically do the stuff below for release and snapshots + +##-- When released, remove the dnl on the below line +dnl m4_undefine([v_rev]) + +m4_define([v_rel], []) +##-- When doing snapshots - change soname. remove dnl on below line +dnl m4_define([relname], [ver-pre-svn-07]) +dnl m4_define([v_rel], [-release relname]) + +m4_ifdef([v_rev], [m4_define([proj_version], [v_maj.v_min.v_mic.v_rev])], [m4_define([proj_version], [v_maj.v_min.v_mic])]) + +AC_INIT([emotion_generic_players], [proj_version], [enlightenment-devel@lists.sourceforge.net]) +AC_PREREQ([2.59]) +AC_CONFIG_SRCDIR([configure.ac]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_CONFIG_HEADERS([config.h]) + +AC_USE_SYSTEM_EXTENSIONS +AC_CANONICAL_HOST + +AM_INIT_AUTOMAKE([1.6 dist-bzip2]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +AC_LANG([C]) +AC_PROG_CC_C99 +AM_PROG_CC_C_O + +PKG_PROG_PKG_CONFIG +if test "x${PKG_CONFIG}" = "x" ; then + AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...]) +fi + +#### Additional options to configure + +AC_ARG_WITH([profile], + [AC_HELP_STRING([--with-profile=PROFILE], + [use the predefined build profile, one of: dev, debug and release. + @<:@default=dev@:>@])], + [build_profile=${withval}], + [build_profile=dev]) + +case "${build_profile}" in + dev|debug|release) + ;; + *) + AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}]) + ;; +esac + +with_max_log_level="" +case "${build_profile}" in + release) + with_max_log_level="3" + ;; +esac + +if test -n "${with_max_log_level}"; then + AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}]) + AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.]) +fi + + +#### Checks for compiler characteristics + +EFL_CHECK_COMPILER_FLAGS([EFL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections]) +EFL_CHECK_LINKER_FLAGS([EFL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed]) +case "${build_profile}" in + dev) + EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow]) + ;; +esac + + +#### Main dependency: emotion + +PKG_CHECK_MODULES([EMOTION], [emotion >= v_maj.v_min]) + +MODULE_ARCH=`pkg-config --variable=module_arch emotion` +if test -z "${MODULE_ARCH}"; then + EMOTION_VERSION=`pkg-config --modversion emotion | cut -d. -f1-3` + case "$host_os" in + mingw32ce*) + MODULE_ARCH="$host_os-$host_cpu" + ;; + *) + MODULE_ARCH="$host_os-$host_cpu-${EMOTION_VERSION}" + ;; + esac +fi + +EMOTION_GENERIC_PLAYERS_DIR=`pkg-config --variable=generic_players emotion` +if test -z "${EMOTION_GENERIC_PLAYERS_DIR}"; then + EMOTION_GENERIC_PLAYERS_DIR="`pkg-config --variable=libdir emotion`/emotion/generic_players" +fi +EMOTION_GENERIC_PLAYERS_DIR="${EMOTION_GENERIC_PLAYERS_DIR}/${MODULE_ARCH}" + +AC_MSG_CHECKING([where to install generic players]) +AC_MSG_RESULT([${EMOTION_GENERIC_PLAYERS_DIR}]) +AC_SUBST(EMOTION_GENERIC_PLAYERS_DIR) + +#### Players +EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 0.9 eina >= 1.1.99]) + + +AC_CONFIG_FILES([ +Makefile +]) + +AC_OUTPUT + +echo +echo +echo +echo "------------------------------------------------------------------------" +echo "$PACKAGE_NAME $PACKAGE_VERSION" +echo "------------------------------------------------------------------------" +echo +echo "Configuration Options Summary:" +echo " Build Profile..........: ${build_profile}" +echo +echo "Players:" +echo " VLC....................: ${with_vlc}" +echo +echo "Compilation..............: make (or gmake)" +echo " CPPFLAGS...............: $CPPFLAGS" +echo " CFLAGS.................: $CFLAGS" +echo " CXXFLAGS...............: $CXXFLAGS" +echo " LDFLAGS................: $LDFLAGS" +echo +echo "Installation.............: make install (as root if needed, with 'su' or 'sudo')" +echo " prefix.................: $prefix" +echo " emotion generic players: ${EMOTION_GENERIC_PLAYERS_DIR}" +echo diff --git a/legacy/emotion_generic_players/m4/efl_compiler.m4 b/legacy/emotion_generic_players/m4/efl_compiler.m4 new file mode 100644 index 0000000000..6b98390e5c --- /dev/null +++ b/legacy/emotion_generic_players/m4/efl_compiler.m4 @@ -0,0 +1,98 @@ +dnl Copyright (C) 2012 Vincent Torri +dnl This code is public domain and can be freely used or copied. + +dnl Macro that check if compiler of linker flags are available + + +dnl Macro that checks for a compiler flag availability +dnl +dnl EFL_CHECK_COMPILER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) +dnl AC_SUBST : EFL_CFLAGS (EFL being replaced by its value) + +AC_DEFUN([EFL_CHECK_COMPILER_FLAG], +[ +m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) +m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z])) + +dnl store in options -Wfoo if -Wno-foo is passed +option=m4_bpatsubst([[$2]], [-Wno-], [-W]) + +CFLAGS_save="${CFLAGS}" +CFLAGS="${CFLAGS} ${option}" + +AC_LANG_PUSH([C]) +AC_MSG_CHECKING([whether the compiler supports $2]) + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]])], + [have_flag="yes"], + [have_flag="no"]) +AC_MSG_RESULT([${have_flag}]) + +CFLAGS="${CFLAGS_save}" +AC_LANG_POP([C]) + +if test "x${have_flag}" = "xyes" ; then + UPEFL[_CFLAGS]="${UPEFL[_CFLAGS]} [$2]" +fi +AC_ARG_VAR(UPEFL[_CFLAGS], [preprocessor flags for $2]) +AC_SUBST(UPEFL[_CFLAGS]) + +m4_popdef([UP]) +m4_popdef([UPEFL]) +]) + +dnl Macro that iterates over a sequence of white separated flags +dnl and that call EFL_CHECK_COMPILER_FLAG() for each of these flags +dnl +dnl EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS) + +AC_DEFUN([EFL_CHECK_COMPILER_FLAGS], +[ +m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))]) +]) + + +dnl Macro that checks for a linker flag availability +dnl +dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) +dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value) + +AC_DEFUN([EFL_CHECK_LINKER_FLAG], +[ +m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) +m4_pushdef([UP], m4_translit([[$2]], [,-a-z], [__A-Z])) + +LDFLAGS_save="${LDFLAGS}" +LDFLAGS="${LDFLAGS} $2" + +AC_LANG_PUSH([C]) +AC_MSG_CHECKING([whether the linker supports $2]) + +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]])], + [have_flag="yes"], + [have_flag="no"]) +AC_MSG_RESULT([${have_flag}]) + +LDFLAGS="${LDFLAGS_save}" +AC_LANG_POP([C]) + +if test "x${have_flag}" = "xyes" ; then + UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]" +fi +AC_SUBST(UPEFL[_LDFLAGS]) + +m4_popdef([UP]) +m4_popdef([UPEFL]) +]) + +dnl Macro that iterates over a sequence of white separated flags +dnl and that call EFL_CHECK_LINKER_FLAG() for each of these flags +dnl +dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS) + +AC_DEFUN([EFL_CHECK_LINKER_FLAGS], +[ +m4_foreach_w([flag], [$2], [EFL_CHECK_LINKER_FLAG([$1], m4_defn([flag]))]) +]) diff --git a/legacy/emotion_generic_players/m4/emotion_generic_players.m4 b/legacy/emotion_generic_players/m4/emotion_generic_players.m4 new file mode 100644 index 0000000000..d852dbaa29 --- /dev/null +++ b/legacy/emotion_generic_players/m4/emotion_generic_players.m4 @@ -0,0 +1,37 @@ +dnl EMOTION_GENERIC_PLAYER(NAME, DEFAULT_STATE, [PKG_CONFIG_DEPS]) +dnl Does the following: +dnl * AC_ARG_WITH(NAME) +dnl * define with_name to yes or no +dnl * PKG_CHECK_MODULES(NAME, PKG_CONFIG_DEPS) +dnl * AC_DEFINE([HAVE_NAME]) +dnl * AM_CONDITIONAL([HAVE_NAME]) +AC_DEFUN([EMOTION_GENERIC_PLAYER], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +AC_ARG_WITH([DOWN], + [AC_HELP_STRING([--with-]m4_defn([DOWN]), + [build generic player ]m4_defn([UP])[. @<:@default=$2@:>@])], + [], [with_]m4_defn([DOWN])[="$2"]) + +if test "${with_[]m4_defn([DOWN])}" = "yes"; then + m4_ifval([$3], [dnl + PKG_CHECK_MODULES(m4_defn([UP]), [$3]) + ], [dnl + m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" + m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" + AC_SUBST(m4_defn([UP])[_LIBS]) + AC_SUBST(m4_defn([UP])[_CFLAGS]) + ]) + + AC_SEARCH_LIBS([shm_open], [rt], [], [AC_MSG_ERROR([unable to find the shm_open() function])]) + if test "${ac_cv_search_shm_open}" != "none required"; then + m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${ac_cv_search_shm_open}" + fi +fi +AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$with_[]m4_defn([DOWN])" = "yes"]) + +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) diff --git a/legacy/emotion_generic_players/src/Makefile.am b/legacy/emotion_generic_players/src/Makefile.am deleted file mode 100644 index bbdd8c34b6..0000000000 --- a/legacy/emotion_generic_players/src/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -SUBDIRS = - -if EMOTION_BUILD_GENERIC_VLC -SUBDIRS += vlc -endif diff --git a/legacy/emotion_generic_players/src/vlc/Makefile.am b/legacy/emotion_generic_players/src/vlc/Makefile.am deleted file mode 100644 index 5cda1b95b4..0000000000 --- a/legacy/emotion_generic_players/src/vlc/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/modules \ --I$(top_srcdir)/src/modules/generic \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@GENERIC_VLC_CFLAGS@ - -internal_bindir = $(libdir)/emotion/utils -internal_bin_PROGRAMS = em_generic_vlc - -em_generic_vlc_SOURCES = emotion_generic_vlc.c -em_generic_vlc_DEPENDENCIES = $(top_srcdir)/src/modules/generic/Emotion_Generic_Plugin.h -em_generic_vlc_LDADD = @GENERIC_VLC_LIBS@ @EFL_SHM_OPEN_LIBS@ -lpthread diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index a20717303c..2bf441ee1f 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -181,7 +181,7 @@ _send_cmd_start(struct _App *app, int cmd) } static void -_send_cmd_finish(struct _App *app __UNUSED__) +_send_cmd_finish(struct _App *app EINA_UNUSED) { pthread_mutex_unlock(&_mutex_fd); } @@ -263,12 +263,12 @@ _lock(void *data, void **pixels) } static void -_unlock(void *data __UNUSED__, void *id __UNUSED__, void *const *pixels __UNUSED__) +_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) { } static void -_display(void *data, void *id __UNUSED__) +_display(void *data, void *id EINA_UNUSED) { struct _App *app = data; if (!app->playing) @@ -292,12 +292,12 @@ _tmp_lock(void *data, void **pixels) } static void -_tmp_unlock(void *data __UNUSED__, void *id __UNUSED__, void *const *pixels __UNUSED__) +_tmp_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) { } static void -_tmp_display(void *data __UNUSED__, void *id __UNUSED__) +_tmp_display(void *data EINA_UNUSED, void *id EINA_UNUSED) { } @@ -889,12 +889,12 @@ main(int argc, const char *argv[]) if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) { - ERR("error communicating with stdin", stderr); + ERR("error communicating with stdin"); break; } if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) { - ERR("error communicating with thread", stderr); + ERR("error communicating with thread"); break; } From fd401156a69d82eb4278d9725199dae58b2f774b Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Fri, 8 Feb 2013 15:47:11 +0000 Subject: [PATCH 116/347] efl, evas_generic_loaders: Removed unused variable. Set EINA_UNUSED to unused variables. SVN revision: 83788 --- legacy/evas_generic_loaders/src/bin/gst/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 7449ea6508..1081da79e1 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -153,7 +153,7 @@ _gst_shutdown() } static void -_gst_load_image(int size_w, int size_h) +_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED) { GstBuffer *buffer; From 8c264048ce81203faeaba5a57f85400e3b906af4 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 27 Feb 2013 12:39:51 +0900 Subject: [PATCH 117/347] pdf: improve detection of all Poppler dependencies. People are sometime crazy and GlobalParams.h is provided on debian package libpoppler-private-dev without any proper .pc. So here we are detecting it with some black magic autofoo. Should fix track ticket #1860. --- legacy/evas_generic_loaders/configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 86fbd061ef..eadad880e7 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -88,6 +88,20 @@ if test "x${want_poppler}" = "xyes" ; then [have_poppler="yes"], [have_poppler="no"]) fi + + if test "x${have_poppler}" = "xyes" ; then + AC_LANG(C++) + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="${CPPFLAGS} ${POPPLER_CFLAGS}" + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="${CXXFLAGS} ${POPPLER_CFLAGS}" + AC_CHECK_HEADERS([GlobalParams.h], + [have_poppler="yes"], + [have_poppler="no"]) + CXXFLAGS=$save_CXXFLAGS + CPPFLAGS=$save_CPPFLAGS + AC_LANG(C) + fi else have_poppler="no" fi From cdfa20d949e0d615f5afe2d1b05b22b94e52a7dc Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 27 Feb 2013 12:44:00 +0900 Subject: [PATCH 118/347] gitignore: cleanup and ignore all generated files. --- legacy/evas_generic_loaders/.gitignore | 53 +++++--------------------- 1 file changed, 10 insertions(+), 43 deletions(-) diff --git a/legacy/evas_generic_loaders/.gitignore b/legacy/evas_generic_loaders/.gitignore index ee63fb2227..0b33bc80ca 100644 --- a/legacy/evas_generic_loaders/.gitignore +++ b/legacy/evas_generic_loaders/.gitignore @@ -1,4 +1,5 @@ *~ +*.o *.swp *.swo ABOUT-NLS @@ -26,47 +27,13 @@ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 missing -src/Makefile -src/Makefile.in -src/bin/Makefile -src/bin/Makefile.in -src/bin/common/Makefile -src/bin/common/Makefile.in -src/bin/gst/.deps/ -src/bin/gst/Makefile -src/bin/gst/Makefile.in -src/bin/gst/evas_image_loader.gst -src/bin/gst/evas_image_loader_gst-main.o -src/bin/gst/evas_image_loader_gst-shmfile.o -src/bin/pdf/.deps/ -src/bin/pdf/Makefile -src/bin/pdf/Makefile.in -src/bin/pdf/evas_image_loader.pdf -src/bin/pdf/evas_image_loader_pdf-shmfile.o -src/bin/pdf/main.o -src/bin/ps/evas_image_loader.ps -src/bin/ps/evas_image_loader_ps-main.o -src/bin/ps/evas_image_loader_ps-shmfile.o -src/bin/ps/.deps/ -src/bin/ps/Makefile -src/bin/ps/Makefile.in -src/bin/raw/.deps/ -src/bin/raw/Makefile -src/bin/raw/Makefile.in -src/bin/svg/.deps/ -src/bin/svg/Makefile -src/bin/svg/Makefile.in -src/bin/svg/evas_image_loader.svg -src/bin/svg/evas_image_loader_svg-main.o -src/bin/svg/evas_image_loader_svg-shmfile.o -src/bin/xcf/.deps/ -src/bin/xcf/Makefile -src/bin/xcf/Makefile.in -src/bin/xcf/evas_image_loader.xcf -src/bin/xcf/evas_image_loader_xcf-main.o -src/bin/xcf/evas_image_loader_xcf-pixelfuncs.o -src/bin/xcf/evas_image_loader_xcf-shmfile.o +Makefile +Makefile.in +.deps stamp-h1 -src/bin/gst/evas_image_loader_gst-timeout.o -src/bin/svg/evas_image_loader_svg-timeout.o -src/bin/xcf/evas_image_loader_xcf-timeout.o +src/bin/gst/evas_image_loader.gst +src/bin/pdf/evas_image_loader.pdf +src/bin/ps/evas_image_loader.ps +src/bin/svg/evas_image_loader.svg +src/bin/xcf/evas_image_loader.xcf +src/bin/raw/evas_image_loader.raw From 0ab6be0eb4e13c93016e7e110b920bdcccd26b0c Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 27 Feb 2013 12:12:43 +0000 Subject: [PATCH 119/347] emotion_generic_players: improve portability by using EFL infrastructure. SVN revision: 84391 --- legacy/emotion_generic_players/configure.ac | 2 +- .../src/vlc/emotion_generic_vlc.c | 1202 +++++++---------- 2 files changed, 521 insertions(+), 683 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index bbefa25ba3..e219d34199 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -108,7 +108,7 @@ AC_MSG_RESULT([${EMOTION_GENERIC_PLAYERS_DIR}]) AC_SUBST(EMOTION_GENERIC_PLAYERS_DIR) #### Players -EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 0.9 eina >= 1.1.99]) +EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 0.9 eina >= 1.1.99 ecore >= 1.7.99]) AC_CONFIG_FILES([ diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 2bf441ee1f..fb0c9004cd 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -21,6 +21,7 @@ #include #include +#include static int _em_vlc_log_dom = -1; #define ERR(...) EINA_LOG_DOM_ERR(_em_vlc_log_dom, __VA_ARGS__) @@ -30,313 +31,77 @@ static int _em_vlc_log_dom = -1; #define CRIT(...) EINA_LOG_DOM_CRIT(_em_vlc_log_dom, __VA_ARGS__) enum _Thread_Events { - EM_THREAD_POSITION_CHANGED, - EM_THREAD_PLAYBACK_STARTED, - EM_THREAD_PLAYBACK_STOPPED, - EM_THREAD_LAST + EM_THREAD_POSITION_CHANGED, + EM_THREAD_PLAYBACK_STARTED, + EM_THREAD_PLAYBACK_STOPPED, + EM_THREAD_LAST }; +typedef struct _App App; struct _App { - Emotion_Generic_Video_Shared *vs; - Emotion_Generic_Video_Frame vf; - libvlc_instance_t *libvlc; - libvlc_media_t *m; - libvlc_media_player_t *mp; - libvlc_event_manager_t *event_mgr; - libvlc_event_manager_t *mevent_mgr; - char *filename; - char *subtitle_path; - char *shmname; - void *tmpbuffer; - int w, h; - int fd_read; // read commands from theads here - int fd_write; // write commands from threads here - int em_read; // read commands from emotion here - int em_write; // write commands to emotion here - int size_sent; - int opening; - int closing; - int playing; + Emotion_Generic_Video_Shared *vs; + Emotion_Generic_Video_Frame vf; + libvlc_instance_t *libvlc; + libvlc_media_t *m; + libvlc_media_player_t *mp; + libvlc_event_manager_t *event_mgr; + libvlc_event_manager_t *mevent_mgr; + char *filename; + char *subtitle_path; + char *shmname; + void *tmpbuffer; + int w, h; + // Use Ecore infra for that instead + Ecore_Pipe *fd_read; // read commands from theads here + Ecore_Pipe *fd_write; // write commands from threads here + /* int em_read; // read commands from emotion here */ + /* int em_write; // write commands to emotion here */ + int size_sent; + int opening; + int closing; + int playing; + + int last_order; + + Eina_Bool inited; }; -static pthread_mutex_t _mutex_fd = PTHREAD_MUTEX_INITIALIZER; - -int -_em_read_safe(int fd, void *buf, ssize_t size) +Eina_Bool +exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) { - ssize_t todo; - char *p; - - todo = size; - p = buf; - - while (todo > 0) - { - ssize_t r; - - r = read(fd, p, todo); - if (r > 0) - { - todo -= r; - p += r; - } - else if (r == 0) - return 0; - else - { - if (errno == EINTR || errno == EAGAIN) - continue; - else - { - ERR("could not read from fd %d: %s", fd, strerror(errno)); - return 0; - } - } - } - - return 1; + ecore_main_loop_quit(); + return EINA_TRUE; } -int -_em_write_safe(int fd, const void *buf, ssize_t size) +#define SEND_CMD_PARAM(app, i) \ + if ((app)->fd_write) \ + if (!ecore_pipe_write((app)->fd_write, &(i), sizeof((i)))) \ + ecore_main_loop_quit(); + +static void +_send_cmd(App *app, int cmd) { - ssize_t todo; - const char *p; - - todo = size; - p = buf; - - while (todo > 0) - { - ssize_t r; - - r = write(fd, p, todo); - if (r > 0) - { - todo -= r; - p += r; - } - else if (r == 0) - return 0; - else - { - if (errno == EINTR || errno == EAGAIN) - continue; - else - { - ERR("could not write to fd %d: %s", fd, strerror(errno)); - return 0; - } - } - } - - return 1; -} - -static int -_em_str_read(int fd, char **str) -{ - int size; - int r; - char buf[PATH_MAX]; - - r = _em_read_safe(fd, &size, sizeof(size)); - if (!r) - { - *str = NULL; - return 0; - } - - if (!size) - { - *str = NULL; - return 1; - } - - r = _em_read_safe(fd, buf, size); - if (!r) - { - *str = NULL; - return 0; - } - - *str = strdup(buf); - return 1; -} - -static int -_em_cmd_read(struct _App *app) -{ - int cmd; - _em_read_safe(app->em_read, &cmd, sizeof(cmd)); - - return cmd; + if (app->fd_write) + if (!ecore_pipe_write(app->fd_write, &cmd, sizeof(cmd))) + ecore_main_loop_quit(); } static void -_send_cmd_start(struct _App *app, int cmd) -{ - pthread_mutex_lock(&_mutex_fd); - _em_write_safe(app->em_write, &cmd, sizeof(cmd)); -} - -static void -_send_cmd_finish(struct _App *app EINA_UNUSED) -{ - pthread_mutex_unlock(&_mutex_fd); -} - -static void -_send_cmd(struct _App *app, int cmd) -{ - _send_cmd_start(app, cmd); - _send_cmd_finish(app); -} - -static void -_send_cmd_str(struct _App *app, const char *str) +_send_cmd_str(App *app, const char *str) { int len; - if (str) - len = strlen(str) + 1; - else - len = 0; - _em_write_safe(app->em_write, &len, sizeof(len)); - _em_write_safe(app->em_write, str, len); -} -#define SEND_CMD_PARAM(app, i) \ - _em_write_safe((app)->em_write, &(i), sizeof((i))); - -static void -_send_resize(struct _App *app, int width, int height) -{ - _send_cmd_start(app, EM_RESULT_FRAME_SIZE); - SEND_CMD_PARAM(app, width); - SEND_CMD_PARAM(app, height); - _send_cmd_finish(app); + len = str ? strlen(str) + 1 : 0; + if (app->fd_write) + if (!ecore_pipe_write(app->fd_write, &len, sizeof(len))) + ecore_main_loop_quit(); + if (app->fd_write) + if (!ecore_pipe_write(app->fd_write, str, len)) + ecore_main_loop_quit(); } static void -_send_length_changed(struct _App *app, const struct libvlc_event_t *ev) -{ - float length = ev->u.media_player_length_changed.new_length; - length /= 1000; - - _send_cmd_start(app, EM_RESULT_LENGTH_CHANGED); - SEND_CMD_PARAM(app, length); - _send_cmd_finish(app); -} - -static void -_send_time_changed(struct _App *app, const struct libvlc_event_t *ev) -{ - float new_time = ev->u.media_player_time_changed.new_time; - new_time /= 1000; - if (app->vs->frame_drop > 1) - return; - _send_cmd_start(app, EM_RESULT_POSITION_CHANGED); - SEND_CMD_PARAM(app, new_time); - _send_cmd_finish(app); -} - -static void -_send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) -{ - int seekable = ev->u.media_player_seekable_changed.new_seekable; - _send_cmd_start(app, EM_RESULT_SEEKABLE_CHANGED); - SEND_CMD_PARAM(app, seekable); - _send_cmd_finish(app); -} - -static void * -_lock(void *data, void **pixels) -{ - struct _App *app = data; - - if (app->playing) - *pixels = app->vf.frames[app->vs->frame.player]; - else - *pixels = NULL; - - return NULL; // picture identifier, not needed here -} - -static void -_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) -{ -} - -static void -_display(void *data, void *id EINA_UNUSED) -{ - struct _App *app = data; - if (!app->playing) - return; - - sem_wait(&app->vs->lock); - app->vs->frame.last = app->vs->frame.player; - app->vs->frame.player = app->vs->frame.next; - app->vs->frame.next = app->vs->frame.last; - if (!app->vs->frame_drop++) - _send_cmd(app, EM_RESULT_FRAME_NEW); - sem_post(&app->vs->lock); -} - -static void * -_tmp_lock(void *data, void **pixels) -{ - struct _App *app = data; - *pixels = app->tmpbuffer; - return NULL; -} - -static void -_tmp_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) -{ -} - -static void -_tmp_display(void *data EINA_UNUSED, void *id EINA_UNUSED) -{ -} - -static void -_play(struct _App *app) -{ - float pos; - - if (!app->mp) - return; - - _em_read_safe(app->em_read, &pos, sizeof(pos)); - - if (app->playing) - { - libvlc_media_player_set_pause(app->mp, 0); - } - else - { - libvlc_time_t new_time = pos * 1000; - libvlc_media_player_set_time(app->mp, new_time); - libvlc_media_player_play(app->mp); - - if (app->subtitle_path) - libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); - - app->playing = 1; - } -} - -static void -_stop(struct _App *app) -{ - if (app->mp) - libvlc_media_player_set_pause(app->mp, 1); -} - -static void -_send_file_closed(struct _App *app) +_send_file_closed(App *app) { app->closing = 0; emotion_generic_shm_free(app->vs); @@ -344,304 +109,29 @@ _send_file_closed(struct _App *app) } static void -_send_file_set(struct _App *app) +_send_time_changed(struct _App *app, const struct libvlc_event_t *ev) { - if (app->opening) - _send_cmd(app, EM_RESULT_FILE_SET); + float new_time = ev->u.media_player_time_changed.new_time; - if (app->closing) - _send_file_closed(app); -} - -static void -_event_cb(const struct libvlc_event_t *ev, void *data) -{ - struct _App *app = data; - int thread_event; - - switch (ev->type) { - case libvlc_MediaPlayerTimeChanged: - _send_time_changed(app, ev); - break; - case libvlc_MediaPlayerPositionChanged: - thread_event = EM_THREAD_POSITION_CHANGED; - write(app->fd_write, &thread_event, sizeof(thread_event)); - break; - case libvlc_MediaPlayerLengthChanged: - _send_length_changed(app, ev); - break; - case libvlc_MediaPlayerSeekableChanged: - _send_seekable_changed(app, ev); - break; - case libvlc_MediaPlayerPlaying: - _send_resize(app, app->w, app->h); - thread_event = EM_THREAD_PLAYBACK_STARTED; - write(app->fd_write, &thread_event, sizeof(thread_event)); - break; - case libvlc_MediaPlayerStopped: - _send_file_set(app); - break; - case libvlc_MediaPlayerEndReached: - thread_event = EM_THREAD_PLAYBACK_STOPPED; - write(app->fd_write, &thread_event, sizeof(thread_event)); - break; - } -} - -static void -_subtitle_set(struct _App *app) -{ - _em_str_read(app->em_read, &app->subtitle_path); -} - -static void -_file_set(struct _App *app) -{ - if (app->opening) - { - libvlc_media_release(app->m); - libvlc_media_player_release(app->mp); - free(app->filename); - } - - _em_str_read(app->em_read, &app->filename); - - app->m = libvlc_media_new_path(app->libvlc, app->filename); - if (!app->m) - { - ERR("could not open path: \"%s\"", app->filename); - return; - } - - app->mp = libvlc_media_player_new_from_media(app->m); - if (!app->mp) - { - ERR("could not create new player from media."); - return; - } - - app->opening = 1; - libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); - libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); - app->event_mgr = libvlc_media_player_event_manager(app->mp); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, - _event_cb, app); - - app->mevent_mgr = libvlc_media_event_manager(app->m); - - app->tmpbuffer = malloc(sizeof(char) * DEFAULTWIDTH * DEFAULTHEIGHT * 4); - libvlc_audio_set_mute(app->mp, 1); - libvlc_media_player_play(app->mp); -} - -static void -_position_set(struct _App *app) -{ - if (!app->mp) + new_time /= 1000; + if (app->vs->frame_drop > 1) return; - - float position; - _em_read_safe(app->em_read, &position, sizeof(position)); - - libvlc_time_t new_time = position * 1000; - libvlc_media_player_set_time(app->mp, new_time); + _send_cmd(app, EM_RESULT_POSITION_CHANGED); + SEND_CMD_PARAM(app, new_time); } static void -_speed_set(struct _App *app) +_send_resize(struct _App *app, int width, int height) { - float rate; - - if (!app->mp) - return; - - _em_read_safe(app->em_read, &rate, sizeof(rate)); - - libvlc_media_player_set_rate(app->mp, rate); -} - -static void -_mute_set(struct _App *app) -{ - int mute; - - if (!app->mp) - return; - - _em_read_safe(app->em_read, &mute, sizeof(mute)); - - libvlc_audio_set_mute(app->mp, mute); -} - -static void -_volume_set(struct _App *app) -{ - float volume; - int vol; - - if (!app->mp) - return; - - _em_read_safe(app->em_read, &volume, sizeof(volume)); - vol = volume * 100; - - libvlc_audio_set_volume(app->mp, vol); -} - -static void -_spu_track_set(struct _App *app) -{ - int track; - - _em_read_safe(app->em_read, &track, sizeof(track)); - - libvlc_video_set_spu(app->mp, track); -} - -static void -_audio_track_set(struct _App *app) -{ - int track; - - _em_read_safe(app->em_read, &track, sizeof(track)); - - libvlc_audio_set_track(app->mp, track); -} - -static void -_video_track_set(struct _App *app) -{ - int track; - - _em_read_safe(app->em_read, &track, sizeof(track)); - - libvlc_video_set_track(app->mp, track); -} - -static void -_file_set_done(struct _App *app) -{ - int r; - - app->opening = 0; - - r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); - if (!r) - { - free(app->filename); - libvlc_media_release(app->m); - libvlc_media_player_release(app->mp); - app->filename = NULL; - app->m = NULL; - app->mp = NULL; - _send_cmd_start(app, EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(app, r); - _send_cmd_finish(app); - } - app->w = app->vs->width; - app->h = app->vs->height; - libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); - libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); - - - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, - _event_cb, app); - - libvlc_audio_set_mute(app->mp, 0); - - _send_cmd_start(app, EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(app, r); - _send_cmd_finish(app); -} - -static void -_file_close(struct _App *app) -{ - app->playing = 0; - if (app->opening) - goto release_resources; - - if (libvlc_media_player_get_state(app->mp) != libvlc_Playing) - { - _send_file_closed(app); - return; - } - - app->closing = 1; - -release_resources: - libvlc_media_player_stop(app->mp); - if (app->filename) - free(app->filename); - if (app->mp) - { - libvlc_media_release(app->m); - libvlc_media_player_release(app->mp); - free(app->tmpbuffer); - } -} - -static void -_process_emotion_commands(struct _App *app) -{ - int cmd = _em_cmd_read(app); - switch (cmd) { - case EM_CMD_FILE_SET: - _file_set(app); - break; - case EM_CMD_FILE_SET_DONE: - _file_set_done(app); - break; - case EM_CMD_SUBTITLE_SET: - _subtitle_set(app); - break; - case EM_CMD_FILE_CLOSE: - _file_close(app); - break; - case EM_CMD_PLAY: - _play(app); - break; - case EM_CMD_STOP: - _stop(app); - break; - case EM_CMD_POSITION_SET: - _position_set(app); - break; - case EM_CMD_SPEED_SET: - _speed_set(app); - break; - case EM_CMD_AUDIO_MUTE_SET: - _mute_set(app); - break; - case EM_CMD_VOLUME_SET: - _volume_set(app); - break; - case EM_CMD_SPU_TRACK_SET: - _spu_track_set(app); - break; - case EM_CMD_AUDIO_TRACK_SET: - _audio_track_set(app); - break; - case EM_CMD_VIDEO_TRACK_SET: - _video_track_set(app); - break; - }; + _send_cmd(app, EM_RESULT_FRAME_SIZE); + SEND_CMD_PARAM(app, width); + SEND_CMD_PARAM(app, height); } static void _send_track_info(struct _App *app, int cmd, int current, int count, libvlc_track_description_t *desc) { - _send_cmd_start(app, cmd); + _send_cmd(app, cmd); SEND_CMD_PARAM(app, current); SEND_CMD_PARAM(app, count); while (desc) @@ -652,7 +142,6 @@ _send_track_info(struct _App *app, int cmd, int current, int count, libvlc_track _send_cmd_str(app, name); desc = desc->p_next; } - _send_cmd_finish(app); } static void @@ -688,7 +177,7 @@ _send_all_meta_info(struct _App *app) { const char *meta; - _send_cmd_start(app, EM_RESULT_META_INFO); + _send_cmd(app, EM_RESULT_META_INFO); /* * Will send in this order: title, artist, album, year, @@ -710,18 +199,29 @@ _send_all_meta_info(struct _App *app) _send_cmd_str(app, meta); meta = libvlc_media_get_meta(app->m, libvlc_meta_TrackNumber); _send_cmd_str(app, meta); - _send_cmd_finish(app); +} + +static Eina_Bool +_loaded_idler(void *data) +{ + App *app = data; + + if (app->mp) + libvlc_media_player_stop(app->mp); + + return EINA_FALSE; } static void -_position_changed(struct _App *app) +_position_changed(App *app) { + int r; + unsigned int w, h; + if (!app->opening) return; /* sending size info only once */ - int r; - unsigned int w, h; r = libvlc_video_get_size(app->mp, 0, &w, &h); if (r < 0) { @@ -741,45 +241,448 @@ _position_changed(struct _App *app) /* sending meta info */ _send_all_meta_info(app); - if (app->size_sent) - libvlc_media_player_stop(app->mp); + ecore_idler_add(_loaded_idler, app); } static void -_process_thread_events(struct _App *app) +_send_length_changed(struct _App *app, const struct libvlc_event_t *ev) { - int event; - size_t size; + float length = ev->u.media_player_length_changed.new_length; + length /= 1000; - size = read(app->fd_read, &event, sizeof(event)); - if (size != sizeof(event)) - { - ERR("player: problem when reading thread event. size = %zd", size); - return; - } + _send_cmd(app, EM_RESULT_LENGTH_CHANGED); + SEND_CMD_PARAM(app, length); +} - switch (event) { - case EM_THREAD_POSITION_CHANGED: +static void +_send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) +{ + int seekable = ev->u.media_player_seekable_changed.new_seekable; + + _send_cmd(app, EM_RESULT_SEEKABLE_CHANGED); + SEND_CMD_PARAM(app, seekable); +} + +static void +_send_file_set(struct _App *app) +{ + if (app->opening) + _send_cmd(app, EM_RESULT_FILE_SET); + + if (app->closing) + _send_file_closed(app); +} + +static void +_event_cb(const struct libvlc_event_t *ev, void *data) +{ + App *app = data; + + ecore_thread_main_loop_begin(); + switch (ev->type) { + case libvlc_MediaPlayerTimeChanged: + _send_time_changed(app, ev); + break; + case libvlc_MediaPlayerPositionChanged: _position_changed(app); break; - case EM_THREAD_PLAYBACK_STARTED: + case libvlc_MediaPlayerLengthChanged: + _send_length_changed(app, ev); + break; + case libvlc_MediaPlayerSeekableChanged: + _send_seekable_changed(app, ev); + break; + case libvlc_MediaPlayerPlaying: + _send_resize(app, app->w, app->h); _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; - case EM_THREAD_PLAYBACK_STOPPED: + case libvlc_MediaPlayerStopped: + _send_file_set(app); + break; + case libvlc_MediaPlayerEndReached: app->playing = 0; _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); break; } + ecore_thread_main_loop_end(); +} + +static void * +_tmp_lock(void *data, void **pixels) +{ + App *app = data; + *pixels = app->tmpbuffer; + return NULL; +} + +static void +_tmp_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) +{ +} + +static void +_tmp_display(void *data EINA_UNUSED, void *id EINA_UNUSED) +{ +} + +static void +_file_set(App *app) +{ + app->m = libvlc_media_new_path(app->libvlc, app->filename); + if (!app->m) + { + ERR("could not open path: \"%s\"", app->filename); + return; + } + + app->mp = libvlc_media_player_new_from_media(app->m); + if (!app->mp) + { + ERR("could not create new player from media."); + return; + } + + app->opening = 1; + libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); + libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); + app->event_mgr = libvlc_media_player_event_manager(app->mp); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, + _event_cb, app); + + app->mevent_mgr = libvlc_media_event_manager(app->m); + + app->tmpbuffer = malloc(sizeof(char) * DEFAULTWIDTH * DEFAULTHEIGHT * 4); + libvlc_audio_set_mute(app->mp, 1); + libvlc_media_player_play(app->mp); +} + +static void * +_lock(void *data, void **pixels) +{ + App *app = data; + + if (app->playing) + *pixels = app->vf.frames[app->vs->frame.player]; + else + *pixels = NULL; + + return NULL; // picture identifier, not needed here +} + +static void +_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) +{ +} + +static void +_display(void *data, void *id EINA_UNUSED) +{ + App *app = data; + + if (!app->playing) + return; + + eina_semaphore_lock(&app->vs->lock); + app->vs->frame.last = app->vs->frame.player; + app->vs->frame.player = app->vs->frame.next; + app->vs->frame.next = app->vs->frame.last; + if (!app->vs->frame_drop++) + _send_cmd(app, EM_RESULT_FRAME_NEW); + eina_semaphore_release(&app->vs->lock, 1); +} + +static void +_file_set_done(App *app) +{ + int r; + + app->opening = 0; + + r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); + if (!r) + { + free(app->filename); + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + app->filename = NULL; + app->m = NULL; + app->mp = NULL; + + _send_cmd(app, EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(app, r); + } + app->w = app->vs->width; + app->h = app->vs->height; + libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); + libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); + + + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, + _event_cb, app); + + libvlc_audio_set_mute(app->mp, 0); + + _send_cmd(app, EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(app, r); +} + +static void +_file_close(App *app) +{ + app->playing = 0; + if (app->opening) + goto release_resources; + + if (libvlc_media_player_get_state(app->mp) != libvlc_Playing) + { + _send_file_closed(app); + return; + } + + app->closing = 1; + +release_resources: + libvlc_media_player_stop(app->mp); + if (app->filename) + free(app->filename); + if (app->mp) + { + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + free(app->tmpbuffer); + } +} + +static void +_stop(App *app) +{ + if (app->mp) + libvlc_media_player_set_pause(app->mp, 1); +} + +static void +_play(App *app, float pos) +{ + if (!app->mp) + return; + + if (app->playing) + { + libvlc_media_player_set_pause(app->mp, 0); + } + else + { + libvlc_time_t new_time = pos * 1000; + libvlc_media_player_set_time(app->mp, new_time); + libvlc_media_player_play(app->mp); + + if (app->subtitle_path) + libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); + + app->playing = 1; + } +} + +static void +_position_set(struct _App *app, float position) +{ + libvlc_time_t new_time; + + if (!app->mp) + return; + + new_time = position * 1000; + libvlc_media_player_set_time(app->mp, new_time); +} + +static void +_speed_set(App *app, float rate) +{ + if (!app->mp) + return; + + libvlc_media_player_set_rate(app->mp, rate); +} + +static void +_mute_set(App *app, int mute) +{ + if (!app->mp) + return; + + libvlc_audio_set_mute(app->mp, mute); +} + +static void +_volume_set(App *app, float volume) +{ + int vol; + + if (!app->mp) + return; + + vol = volume * 100; + + libvlc_audio_set_volume(app->mp, vol); +} + +static void +_spu_track_set(App *app, int track) +{ + libvlc_video_set_spu(app->mp, track); +} + +static void +_audio_track_set(App *app, int track) +{ + libvlc_audio_set_track(app->mp, track); +} + +static void +_video_track_set(App *app, int track) +{ + libvlc_video_set_track(app->mp, track); +} + +static void +_remote_command(void *data, void *buffer, unsigned int nbyte) +{ + App *app = data; + + if (nbyte == 0) + { + fprintf(stderr, "death is comming\n"); + ecore_main_loop_quit(); + return ; + } + + if (app->last_order == EM_CMD_LAST) + { + if (nbyte != sizeof (int)) + { + ERR("didn't receive a valid command from emotion (%i) !", nbyte); + ecore_main_loop_quit(); + return ; + } + + app->last_order = *((int*) buffer); + + if (!app->inited && + app->last_order != EM_CMD_INIT) + { + ERR("wrong init command!"); + ecore_main_loop_quit(); + return ; + } + + switch (app->last_order) + { + case EM_CMD_FILE_SET: + if (app->opening) + { + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + free(app->filename); + app->opening = 0; + } + break; + case EM_CMD_FILE_SET_DONE: + _file_set_done(app); + app->last_order = EM_CMD_LAST; + break; + case EM_CMD_FILE_CLOSE: + _file_close(app); + app->last_order = EM_CMD_LAST; + break; + } + } + else + { + switch (app->last_order) + { + case EM_CMD_INIT: + app->shmname = strdup(buffer); + app->inited = EINA_TRUE; + _send_cmd(app, EM_RESULT_INIT); + break; + case EM_CMD_FILE_SET: + app->filename = strdup(buffer); + _file_set(app); + break; + case EM_CMD_SUBTITLE_SET: + app->subtitle_path = strdup(buffer); + break; + case EM_CMD_PLAY: + _play(app, *(float*) buffer); + break; + case EM_CMD_STOP: + _stop(app); + break; + case EM_CMD_POSITION_SET: + _position_set(app, *(float*) buffer); + break; + case EM_CMD_SPEED_SET: + _speed_set(app, *(float*) buffer); + break; + case EM_CMD_AUDIO_MUTE_SET: + _mute_set(app, *(int*) buffer); + break; + case EM_CMD_VOLUME_SET: + _volume_set(app, *(float*) buffer); + break; + case EM_CMD_SPU_TRACK_SET: + _spu_track_set(app, *(int*) buffer); + break; + case EM_CMD_AUDIO_TRACK_SET: + _audio_track_set(app, *(int*) buffer); + break; + case EM_CMD_VIDEO_TRACK_SET: + _video_track_set(app, *(int*) buffer); + break; + } + app->last_order = EM_CMD_LAST; + } +} + +void +_dummy(void *data EINA_UNUSED, void *buffer EINA_UNUSED, unsigned int nbyte EINA_UNUSED) +{ + /* This function is useless for the pipe we use to send message back to emotion, + but still needed */ } int main(int argc, const char *argv[]) { - struct _App app; - struct pollfd fds[3]; - int tpipe[2]; // pipe for comunicating events from threads + App app; + Ecore_Event_Handler *hld; char cwidth[64], cheight[64], cpitch[64], chroma[64]; - char buf[64]; + int vlc_argc; + + const char *vlc_argv[] = + { + "--quiet", + "--vout", + "vmem", + "--vmem-width", + cwidth, + "--vmem-height", + cheight, + "--vmem-pitch", + cpitch, + "--vmem-chroma", + chroma + }; if (!eina_init()) { @@ -798,21 +701,6 @@ main(int argc, const char *argv[]) if (!eina_log_domain_level_check(_em_vlc_log_dom, EINA_LOG_LEVEL_WARN)) eina_log_domain_level_set("emotion_generic_vlc", EINA_LOG_LEVEL_WARN); - const char *vlc_argv[] = - { - "--quiet", - "--vout", - "vmem", - "--vmem-width", - cwidth, - "--vmem-height", - cheight, - "--vmem-pitch", - cpitch, - "--vmem-chroma", - chroma - }; - if (argc < 3) { ERR("missing parameters."); @@ -820,25 +708,20 @@ main(int argc, const char *argv[]) goto error; } - app.em_read = atoi(argv[1]); - app.em_write = atoi(argv[2]); + ecore_init(); - int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); + app.fd_read = ecore_pipe_full_add(_remote_command, &app, + atoi(argv[1]), -1, EINA_FALSE, EINA_FALSE); + app.fd_write = ecore_pipe_full_add(_dummy, NULL, + -1, atoi(argv[2]), EINA_FALSE, EINA_FALSE); + + vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH); snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT); snprintf(cpitch, sizeof(cpitch), "%d", DEFAULTWIDTH * 4); snprintf(chroma, sizeof(chroma), "RV32"); - /* - * Naughty xattr in emotion uses ecore_thread to run its thing, this - * may leave emotion's reference count high and it won't kill us... - * letting us play the video in the background. not good. - * - * prctl(PR_SET_PDEATHSIG) is a linux only thing. Need to find ways - * to do it on other platforms. Until then leave it breaking on - * such platforms so people port it instead of ignoring. - */ - prctl(PR_SET_PDEATHSIG, SIGHUP); + hld = ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP, exit_func, NULL); app.libvlc = libvlc_new(vlc_argc, vlc_argv); app.mp = NULL; @@ -850,63 +733,18 @@ main(int argc, const char *argv[]) app.opening = 0; app.playing = 0; app.closing = 0; + app.last_order = EM_CMD_LAST; + app.inited = EINA_FALSE; - if (_em_cmd_read(&app) != EM_CMD_INIT) - { - ERR("wrong init command!"); - goto error; - } - - int size; - _em_read_safe(app.em_read, &size, sizeof(size)); - _em_read_safe(app.em_read, buf, size); - app.shmname = strdup(buf); - - _send_cmd(&app, EM_RESULT_INIT); - - pipe(tpipe); - app.fd_read = tpipe[0]; - app.fd_write = tpipe[1]; - fds[0].fd = app.em_read; - fds[0].events = POLLIN; - fds[1].fd = app.fd_read; - fds[1].events = POLLIN; - fds[2].fd = STDERR_FILENO; - fds[2].events = 0; - - while (1) - { - int r; - - r = poll(fds, 3, -1); - if (r == 0) - continue; - else if (r < 0) - { - ERR("an error ocurred on poll(): %s", strerror(errno)); - break; - } - - if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) - { - ERR("error communicating with stdin"); - break; - } - if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) - { - ERR("error communicating with thread"); - break; - } - - if (fds[0].revents & POLLIN) - _process_emotion_commands(&app); - if (fds[1].revents & POLLIN) - _process_thread_events(&app); - if (fds[2].revents & (POLLERR | POLLHUP | POLLNVAL)) - break; - } + ecore_main_loop_begin(); libvlc_release(app.libvlc); + + ecore_event_handler_del(hld); + + ecore_shutdown(); + eina_shutdown(); + return 0; error: From 2a92f697a22466e4312603810f2e335e993ec1f5 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 10 Mar 2013 22:08:49 +0900 Subject: [PATCH 120/347] how did the evas_generic_loaders svg loader forget its symlinks for .svgz and .svg.gz? --- legacy/evas_generic_loaders/src/bin/svg/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am index 5366673225..e5d85a7de4 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am @@ -22,3 +22,7 @@ evas_image_loader_svg_CFLAGS = @SVG_CFLAGS@ evas_image_loader_svg_LDADD = @SVG_LIBS@ @SHM_OPEN_LIBS@ -lm evas_image_loader_svg_LDFLAGS = + +install-exec-hook: + ln -sf evas_image_loader.svg $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.svgz + ln -sf evas_image_loader.svg $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.svg.gz From 3125a83d9856bd586945f6603b4d56ab7becc3e6 Mon Sep 17 00:00:00 2001 From: "Alex-P. Natsios" Date: Sat, 23 Mar 2013 13:36:04 +0900 Subject: [PATCH 121/347] Evas_generic_loaders returns 1.7.99.UnversionedDirectory. this patch makes it behave like E and EFL. --- legacy/evas_generic_loaders/configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index eadad880e7..aad822bb81 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -3,8 +3,7 @@ m4_define([v_maj], [1]) m4_define([v_min], [7]) m4_define([v_mic], [99]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) -m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) +m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line From ef31669c3d8d55b96f13872ff57fe847ea596ee0 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 26 Mar 2013 08:00:20 +0900 Subject: [PATCH 122/347] .gitignore: added git ignores. --- legacy/emotion_generic_players/.gitignore | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 legacy/emotion_generic_players/.gitignore diff --git a/legacy/emotion_generic_players/.gitignore b/legacy/emotion_generic_players/.gitignore new file mode 100644 index 0000000000..e50b1f1cc8 --- /dev/null +++ b/legacy/emotion_generic_players/.gitignore @@ -0,0 +1,23 @@ +INSTALL +Makefile +Makefile.in +aclocal.m4 +autom4te.cache/ +compile +config.cache +config.guess +config.h +config.h.in +config.h.in~ +config.log +config.status +config.sub +configure +depcomp +install-sh +missing +src/vlc/.deps/ +src/vlc/.dirstamp +src/vlc/src_vlc_vlc-emotion_generic_vlc.o +src/vlc/vlc +stamp-h1 From 0aec1efe93895c6b19bf7d3edd70d53c82812fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 15 May 2013 16:12:03 +0200 Subject: [PATCH 123/347] well, shut up some warnings --- legacy/evas_generic_loaders/src/bin/ps/main.c | 6 +++--- legacy/evas_generic_loaders/src/bin/xcf/main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index 39a34e6f8f..3caa615009 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -24,7 +24,7 @@ SpectreDocument *psdoc; -unsigned int page_count; +int page_count; SpectrePage *page; @@ -82,7 +82,7 @@ _spectre_init(const char *file, int page_nbr, int size_w, int size_h) if (status != SPECTRE_STATUS_SUCCESS) { D("[eps] %s\n", spectre_status_to_string (status)); - goto free_psdoc; + goto free_page; } spectre_page_get_size(page, &ww, &hh); @@ -163,7 +163,7 @@ _pixcopy(DATA32 *dst, unsigned char *src, int size) } static void -_spectre_load_image(int size_w, int size_h) +_spectre_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED) { SpectreRenderContext *rc; unsigned char *psdata; diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 62212cf93d..dca44d0c73 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -942,7 +942,7 @@ xcf_load_channel(void) FREE(name); /* create a new channel */ - layer = new_layer(width, height, GRAY, 255, NORMAL_MODE); + layer = new_layer(width, height, GRAY_GIMAGE, 255, NORMAL_MODE); if (!layer) return NULL; /* read in the channel properties */ if (!xcf_load_channel_props(layer)) goto error; From 83d98c287ae10a25d1ac8378658f248e560f60b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 15 May 2013 16:22:24 +0200 Subject: [PATCH 124/347] add glib-2 and librsvg version checks --- legacy/evas_generic_loaders/src/bin/svg/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c index 366fe603e3..89a48fa395 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/main.c +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -8,7 +8,9 @@ #include #include +#if !LIBRSVG_CHECK_VERSION(2,36,2) #include +#endif #define DATA32 unsigned int @@ -57,7 +59,9 @@ static int _svg_init(const char *file) { #ifdef HAVE_SVG_2_36 +# if !defined(GLIB_VERSION_2_36) g_type_init(); +# endif #else rsvg_init(); #endif From bc429a6486c4c4ff73bff81ca3412c4677b22cce Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 17 May 2013 08:08:19 +0900 Subject: [PATCH 125/347] fix back #if version check that breaks on older rsvg's --- legacy/evas_generic_loaders/src/bin/svg/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c index 89a48fa395..b8d85f0ea0 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/main.c +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -8,7 +8,9 @@ #include #include -#if !LIBRSVG_CHECK_VERSION(2,36,2) +#include +#if LIBRSVG_CHECK_VERSION(2,36,2) +#else #include #endif From 39fce076c6d1db48bea5b03ea5c81d1cd854872f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 18 May 2013 21:05:39 +0200 Subject: [PATCH 126/347] rsvg: include librsvg-features.h only if LIBRSVG_CHECK_VERSION is not defined --- legacy/evas_generic_loaders/src/bin/svg/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c index b8d85f0ea0..b6c844cf3e 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/main.c +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -8,10 +8,12 @@ #include #include -#include +#ifndef LIBRSVG_CHECK_VERSION +# include +#endif #if LIBRSVG_CHECK_VERSION(2,36,2) #else -#include +# include #endif #define DATA32 unsigned int From 72a26598646a669c163b91977ba0139158c563f5 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 18:35:05 +0900 Subject: [PATCH 127/347] add pkgbuild from git. --- legacy/evas_generic_loaders/configure.ac | 1 + .../evas_generic_loaders/pkgbuild/PKGBUILD.in | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index aad822bb81..44ed0c4a34 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -225,6 +225,7 @@ src/bin/ps/Makefile src/bin/raw/Makefile src/bin/xcf/Makefile src/bin/svg/Makefile +pkgbuild/PKGBUILD ]) AC_OUTPUT diff --git a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in new file mode 100644 index 0000000000..0768e171c7 --- /dev/null +++ b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in @@ -0,0 +1,40 @@ +# Maintainer: Enlightenment Developers +pkgname=('evas_generic_loaders') +pkgver=@VERSION@ +pkgrel=1 +pkgdesc="Evas external binary executable loaders - GIT development snapshot" +arch=('i686' 'x86_64' 'arm') +url="http://www.enlightenment.org" +license=('GPL2') +makedepends=() +depends=('poppler' 'libraw' 'libspectre' 'librsvg' 'gstreamer0.10' + 'gstreamer0.10-base' 'gstreamer0.10-good' + 'gstreamer0.10-bad' 'gstreamer0.10-ugly' 'gstreamer0.10-ffmpeg') +provides=("evas_generic_loaders=$pkgver") +conflicts=('evas_generic_loaders-svn') +options=('strip' 'zipman' '!libtool' 'debug') +buildflags="-O2 -g -fvisibility=hidden -fomit-frame-pointer" +build() { + export LDFLAGS="" + cd "../.." + make clean distclean + ./configure --prefix=/usr \ + --disable-static + make +} + +#check() { +# cd "../.." +# make -k check +#} + +package() { + cd "../.." + rm -rf $pkgdir/usr + make -j1 DESTDIR="$pkgdir/" install + install -Dm644 README $pkgdir/usr/share/$pkgname/licenses/$pkgname/README + install -Dm644 NEWS $pkgdir/usr/share/$pkgname/licenses/$pkgname/NEWS + install -Dm644 ChangeLog $pkgdir/usr/share/$pkgname/licenses/$pkgname/ChangeLog + install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/licenses/$pkgname/AUTHORS + install -Dm644 COPYING $pkgdir/usr/share/$pkgname/licenses/$pkgname/licenses/COPYING +} From 0d0475fe7c0b3379b220e3de9737422796f3cbb9 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 19:03:12 +0900 Subject: [PATCH 128/347] add pkgbuild --- legacy/emotion_generic_players/configure.ac | 1 + .../pkgbuild/PKGBUILD.in | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 legacy/emotion_generic_players/pkgbuild/PKGBUILD.in diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index e219d34199..da0012b021 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -113,6 +113,7 @@ EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 0.9 eina >= 1.1.99 ecore >= 1.7. AC_CONFIG_FILES([ Makefile +pkgbuild/PKGBUILD ]) AC_OUTPUT diff --git a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in new file mode 100644 index 0000000000..6d46478b59 --- /dev/null +++ b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in @@ -0,0 +1,40 @@ +# Maintainer: Enlightenment Developers +pkgname=('emotion_generic_players') +pkgver=@VERSION@ +pkgrel=1 +pkgdesc="Emotion external binary executable players - GIT development snapshot" +arch=('i686' 'x86_64' 'arm') +url="http://www.enlightenment.org" +license=('BSD') +makedepends=() +depends=('vlc' 'libdvdcss' 'libbluray' 'flac' 'vcdimager' 'libcdio' + 'ttf-freefont' 'ttf-dejavu' 'opus' 'libssh2') +provides=("emotion_generic_players=$pkgver") +conflicts=('emotion_generic_players-svn') +options=('strip' 'zipman' '!libtool' 'debug') +buildflags="-O2 -g -fvisibility=hidden -fomit-frame-pointer" +build() { + export LDFLAGS="" + cd "../.." + make clean distclean + ./configure --prefix=/usr \ + --disable-static + make +} + +#check() { +# cd "../.." +# make -k check +#} + +package() { + cd "../.." + rm -rf $pkgdir/usr + make -j1 DESTDIR="$pkgdir/" install + install -Dm644 README $pkgdir/usr/share/$pkgname/README + install -Dm644 NEWS $pkgdir/usr/share/$pkgname/NEWS + install -Dm644 ChangeLog $pkgdir/usr/share/$pkgname/ChangeLog + install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/AUTHORS + install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING + ln -s ../licenses/$pkgname/COPYING $pkgdir/usr/share/$pkgname/COPYING +} From cc78603594213750a377dcf2eb3aa45c203a706c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 19:09:44 +0900 Subject: [PATCH 129/347] update pkgbuild --- legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in index 0768e171c7..214498576b 100644 --- a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in +++ b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in @@ -10,7 +10,7 @@ makedepends=() depends=('poppler' 'libraw' 'libspectre' 'librsvg' 'gstreamer0.10' 'gstreamer0.10-base' 'gstreamer0.10-good' 'gstreamer0.10-bad' 'gstreamer0.10-ugly' 'gstreamer0.10-ffmpeg') -provides=("evas_generic_loaders=$pkgver") +provides=("evas_generic_loaders=$pkgver" 'evas_generic_loaders-svn') conflicts=('evas_generic_loaders-svn') options=('strip' 'zipman' '!libtool' 'debug') buildflags="-O2 -g -fvisibility=hidden -fomit-frame-pointer" @@ -32,9 +32,10 @@ package() { cd "../.." rm -rf $pkgdir/usr make -j1 DESTDIR="$pkgdir/" install - install -Dm644 README $pkgdir/usr/share/$pkgname/licenses/$pkgname/README - install -Dm644 NEWS $pkgdir/usr/share/$pkgname/licenses/$pkgname/NEWS - install -Dm644 ChangeLog $pkgdir/usr/share/$pkgname/licenses/$pkgname/ChangeLog - install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/licenses/$pkgname/AUTHORS - install -Dm644 COPYING $pkgdir/usr/share/$pkgname/licenses/$pkgname/licenses/COPYING + install -Dm644 README $pkgdir/usr/share/$pkgname/README + install -Dm644 NEWS $pkgdir/usr/share/$pkgname/NEWS + install -Dm644 ChangeLog $pkgdir/usr/share/$pkgname/ChangeLog + install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/AUTHORS + install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING + ln -s ../licenses/$pkgname/COPYING $pkgdir/usr/share/$pkgname/COPYING } From b13cadc651a9551a67ab6270ec37b5d7a175f790 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 19:10:54 +0900 Subject: [PATCH 130/347] update pkgbuild --- legacy/emotion_generic_players/pkgbuild/PKGBUILD.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in index 6d46478b59..6082a1778e 100644 --- a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in +++ b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in @@ -9,7 +9,7 @@ license=('BSD') makedepends=() depends=('vlc' 'libdvdcss' 'libbluray' 'flac' 'vcdimager' 'libcdio' 'ttf-freefont' 'ttf-dejavu' 'opus' 'libssh2') -provides=("emotion_generic_players=$pkgver") +provides=("emotion_generic_players=$pkgver" 'emotion_generic_players-svn') conflicts=('emotion_generic_players-svn') options=('strip' 'zipman' '!libtool' 'debug') buildflags="-O2 -g -fvisibility=hidden -fomit-frame-pointer" From 655e2831d8181376a1c79cc44a19459e9db6225d Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 20:07:50 +0900 Subject: [PATCH 131/347] update .gitignore --- legacy/evas_generic_loaders/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legacy/evas_generic_loaders/.gitignore b/legacy/evas_generic_loaders/.gitignore index 0b33bc80ca..34b8e2cd89 100644 --- a/legacy/evas_generic_loaders/.gitignore +++ b/legacy/evas_generic_loaders/.gitignore @@ -37,3 +37,7 @@ src/bin/ps/evas_image_loader.ps src/bin/svg/evas_image_loader.svg src/bin/xcf/evas_image_loader.xcf src/bin/raw/evas_image_loader.raw +pkgbuild/PKGBUILD +pkgbuild/pkg +pkgbuild/src +pkgbuild/*.tar.xz From ad82dc2a76039ade514abdd7aee15260added92c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 20:08:51 +0900 Subject: [PATCH 132/347] update gitignore --- legacy/emotion_generic_players/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/legacy/emotion_generic_players/.gitignore b/legacy/emotion_generic_players/.gitignore index e50b1f1cc8..bd0957f9cc 100644 --- a/legacy/emotion_generic_players/.gitignore +++ b/legacy/emotion_generic_players/.gitignore @@ -1,3 +1,4 @@ +*~ INSTALL Makefile Makefile.in @@ -21,3 +22,7 @@ src/vlc/.dirstamp src/vlc/src_vlc_vlc-emotion_generic_vlc.o src/vlc/vlc stamp-h1 +pkgbuild/PKGBUILD +pkgbuild/pkg +pkgbuild/src +pkgbuild/*.tar.xz From 77b2e883874c7a42dbe9915e43e6fd922505aba9 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 20:26:53 +0900 Subject: [PATCH 133/347] fix configure.ac for to be consistent with other efl and use git revlist... --- legacy/emotion_generic_players/configure.ac | 25 +++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index da0012b021..f97a392c48 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,23 +1,24 @@ +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [7]) m4_define([v_mic], [99]) - -dnl m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) -m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) - -#### FIXME: i am sure that we can do some m4 to automagically do the stuff below for release and snapshots - +m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) - -m4_define([v_rel], []) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [ver-pre-svn-07]) +dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], +[m4_define([v_ver], [v_maj.v_min.v_mic])]) +m4_define([lt_cur], m4_eval(v_maj + v_min)) +m4_define([lt_rev], v_mic) +m4_define([lt_age], v_min) +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## +##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_ifdef([v_rev], [m4_define([proj_version], [v_maj.v_min.v_mic.v_rev])], [m4_define([proj_version], [v_maj.v_min.v_mic])]) - -AC_INIT([emotion_generic_players], [proj_version], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 156ae026cb793d6823570543a60abd584c822373 Mon Sep 17 00:00:00 2001 From: Doug Newgard Date: Sun, 9 Jun 2013 22:13:11 +0900 Subject: [PATCH 134/347] Remove 'lesser' when this isn't LGPL Just fixing a typo. Adding raster as Reviewer because he's the one listed in the file. --- legacy/evas_generic_loaders/COPYING | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/COPYING b/legacy/evas_generic_loaders/COPYING index f3f6a4abf6..cd661164e9 100644 --- a/legacy/evas_generic_loaders/COPYING +++ b/legacy/evas_generic_loaders/COPYING @@ -8,8 +8,7 @@ Free Software Foundation; version 2 of the License. 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. +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Below is a copy of the GNU General Public License that is distributed along with this library. If you do not have a copy below, write to the Free From 30944650ddc16bdbedce06c94d58b4f84e8bcd19 Mon Sep 17 00:00:00 2001 From: davemds Date: Sun, 16 Jun 2013 10:00:22 +0200 Subject: [PATCH 135/347] Emotion VLC: better args to init vlc This new set of opts disable the display of the title "inside" the video, and disable the automatic search and use of .srt files. --- .../src/vlc/emotion_generic_vlc.c | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index fb0c9004cd..665f932c35 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -666,23 +666,20 @@ main(int argc, const char *argv[]) { App app; Ecore_Event_Handler *hld; - char cwidth[64], cheight[64], cpitch[64], chroma[64]; int vlc_argc; const char *vlc_argv[] = { "--quiet", - "--vout", - "vmem", - "--vmem-width", - cwidth, - "--vmem-height", - cheight, - "--vmem-pitch", - cpitch, - "--vmem-chroma", - chroma + "--intf", "dummy", /* no interface */ + "--vout", "dummy", /* we don't want video (output) */ + "--no-video-title-show", /* nor the filename displayed */ + "--no-sub-autodetect-file", /* we don't want automatic subtitles */ + "--no-stats", /* no stats */ + "--no-inhibit", /* we don't want interfaces */ + "--no-disable-screensaver", /* we don't want interfaces */ }; + vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); if (!eina_init()) { @@ -715,12 +712,6 @@ main(int argc, const char *argv[]) app.fd_write = ecore_pipe_full_add(_dummy, NULL, -1, atoi(argv[2]), EINA_FALSE, EINA_FALSE); - vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); - snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH); - snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT); - snprintf(cpitch, sizeof(cpitch), "%d", DEFAULTWIDTH * 4); - snprintf(chroma, sizeof(chroma), "RV32"); - hld = ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP, exit_func, NULL); app.libvlc = libvlc_new(vlc_argc, vlc_argv); From 3d20d1706e4d98b386c4186b9eb48966be12355e Mon Sep 17 00:00:00 2001 From: davemds Date: Sun, 16 Jun 2013 10:12:27 +0200 Subject: [PATCH 136/347] Emotion VLC: indentation tabs-- --- .../src/vlc/emotion_generic_vlc.c | 95 ++++++++++--------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 665f932c35..ae3f14f203 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -136,11 +136,11 @@ _send_track_info(struct _App *app, int cmd, int current, int count, libvlc_track SEND_CMD_PARAM(app, count); while (desc) { - int tid = desc->i_id; - const char *name = desc->psz_name; - SEND_CMD_PARAM(app, tid); - _send_cmd_str(app, name); - desc = desc->p_next; + int tid = desc->i_id; + const char *name = desc->psz_name; + SEND_CMD_PARAM(app, tid); + _send_cmd_str(app, name); + desc = desc->p_next; } } @@ -155,21 +155,21 @@ _send_all_track_info(struct _App *app) desc = libvlc_audio_get_track_description(app->mp); _send_track_info(app, EM_RESULT_AUDIO_TRACK_INFO, - current, track_count, desc); + current, track_count, desc); current = libvlc_video_get_track(app->mp); track_count = libvlc_video_get_track_count(app->mp); desc = libvlc_video_get_track_description(app->mp); _send_track_info(app, EM_RESULT_VIDEO_TRACK_INFO, - current, track_count, desc); + current, track_count, desc); current = libvlc_video_get_spu(app->mp); track_count = libvlc_video_get_spu_count(app->mp); desc = libvlc_video_get_spu_description(app->mp); _send_track_info(app, EM_RESULT_SPU_TRACK_INFO, - current, track_count, desc); + current, track_count, desc); } static void @@ -225,8 +225,8 @@ _position_changed(App *app) r = libvlc_video_get_size(app->mp, 0, &w, &h); if (r < 0) { - w = 1; - h = 1; + w = 1; + h = 1; } if (w > 0 || h > 0) @@ -279,30 +279,31 @@ _event_cb(const struct libvlc_event_t *ev, void *data) App *app = data; ecore_thread_main_loop_begin(); - switch (ev->type) { + switch (ev->type) + { case libvlc_MediaPlayerTimeChanged: _send_time_changed(app, ev); - break; + break; case libvlc_MediaPlayerPositionChanged: - _position_changed(app); - break; + _position_changed(app); + break; case libvlc_MediaPlayerLengthChanged: - _send_length_changed(app, ev); - break; + _send_length_changed(app, ev); + break; case libvlc_MediaPlayerSeekableChanged: - _send_seekable_changed(app, ev); - break; + _send_seekable_changed(app, ev); + break; case libvlc_MediaPlayerPlaying: - _send_resize(app, app->w, app->h); - _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); - break; + _send_resize(app, app->w, app->h); + _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); + break; case libvlc_MediaPlayerStopped: - _send_file_set(app); - break; + _send_file_set(app); + break; case libvlc_MediaPlayerEndReached: app->playing = 0; - _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); - break; + _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + break; } ecore_thread_main_loop_end(); } @@ -331,15 +332,15 @@ _file_set(App *app) app->m = libvlc_media_new_path(app->libvlc, app->filename); if (!app->m) { - ERR("could not open path: \"%s\"", app->filename); - return; + ERR("could not open path: \"%s\"", app->filename); + return; } app->mp = libvlc_media_player_new_from_media(app->m); if (!app->mp) { - ERR("could not create new player from media."); - return; + ERR("could not create new player from media."); + return; } app->opening = 1; @@ -347,9 +348,9 @@ _file_set(App *app) libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); app->event_mgr = libvlc_media_player_event_manager(app->mp); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, - _event_cb, app); + _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, - _event_cb, app); + _event_cb, app); app->mevent_mgr = libvlc_media_event_manager(app->m); @@ -403,15 +404,15 @@ _file_set_done(App *app) r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); if (!r) { - free(app->filename); + free(app->filename); libvlc_media_release(app->m); libvlc_media_player_release(app->mp); - app->filename = NULL; - app->m = NULL; - app->mp = NULL; + app->filename = NULL; + app->m = NULL; + app->mp = NULL; _send_cmd(app, EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(app, r); + SEND_CMD_PARAM(app, r); } app->w = app->vs->width; app->h = app->vs->height; @@ -420,13 +421,13 @@ _file_set_done(App *app) libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, - _event_cb, app); + _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, - _event_cb, app); + _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, - _event_cb, app); + _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, - _event_cb, app); + _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, _event_cb, app); @@ -445,8 +446,8 @@ _file_close(App *app) if (libvlc_media_player_get_state(app->mp) != libvlc_Playing) { - _send_file_closed(app); - return; + _send_file_closed(app); + return; } app->closing = 1; @@ -459,7 +460,7 @@ release_resources: { libvlc_media_release(app->m); libvlc_media_player_release(app->mp); - free(app->tmpbuffer); + free(app->tmpbuffer); } } @@ -478,18 +479,18 @@ _play(App *app, float pos) if (app->playing) { - libvlc_media_player_set_pause(app->mp, 0); + libvlc_media_player_set_pause(app->mp, 0); } else { - libvlc_time_t new_time = pos * 1000; - libvlc_media_player_set_time(app->mp, new_time); + libvlc_time_t new_time = pos * 1000; + libvlc_media_player_set_time(app->mp, new_time); libvlc_media_player_play(app->mp); if (app->subtitle_path) libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); - app->playing = 1; + app->playing = 1; } } From 92ff2927f10faa10ea12d9dca40b3a3e03dc3570 Mon Sep 17 00:00:00 2001 From: Doug Newgard Date: Sat, 22 Jun 2013 12:33:52 +0900 Subject: [PATCH 137/347] Evas_generic_loaders: PKGBUILD cleanup pkgname is just a variable instead of an array when it's not a split package Don't need empty makedepends array Add 'efl' to depends Removed 'gstreamer0.10' from deps, already going to be pulled in by the plugins Changed gstreamer deps to the plugin packages, that's what's actually needed by this package Doesn't need to provide itself or the obsolete -svn version Doesn't need to confict with the obsolete -svn version, if someone still has this, they're so far out of date it's not very likely they're paying any attention at all Removed 'strip' and 'zipman' options, they're already default, no need to override if someone chooses to change that. Removed -O2 and -g build flags for the same reason Removed buildflags and specified them in the CFLAGS variable Removed LDFLAGS declariation, why were we clearing this? Removed --disable-static, no static libs are built (I checked this time) No need to rm -rf $pkgdir/usr Double quote all paths with variables Install only license declaration, GPL2 is already on the system --- .../evas_generic_loaders/pkgbuild/PKGBUILD.in | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in index 214498576b..7aaebf4962 100644 --- a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in +++ b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in @@ -1,25 +1,20 @@ # Maintainer: Enlightenment Developers -pkgname=('evas_generic_loaders') +pkgname=evas_generic_loaders pkgver=@VERSION@ pkgrel=1 pkgdesc="Evas external binary executable loaders - GIT development snapshot" arch=('i686' 'x86_64' 'arm') url="http://www.enlightenment.org" license=('GPL2') -makedepends=() -depends=('poppler' 'libraw' 'libspectre' 'librsvg' 'gstreamer0.10' - 'gstreamer0.10-base' 'gstreamer0.10-good' - 'gstreamer0.10-bad' 'gstreamer0.10-ugly' 'gstreamer0.10-ffmpeg') -provides=("evas_generic_loaders=$pkgver" 'evas_generic_loaders-svn') -conflicts=('evas_generic_loaders-svn') -options=('strip' 'zipman' '!libtool' 'debug') -buildflags="-O2 -g -fvisibility=hidden -fomit-frame-pointer" +depends=('efl' 'poppler' 'libraw' 'libspectre' 'librsvg' 'gstreamer0.10-base-plugins' + 'gstreamer0.10-good-plugins' 'gstreamer0.10-bad-plugins' + 'gstreamer0.10-ugly-plugins' 'gstreamer0.10-ffmpeg') +options=('!libtool' 'debug') build() { - export LDFLAGS="" cd "../.." + export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer" make clean distclean - ./configure --prefix=/usr \ - --disable-static + ./configure --prefix=/usr make } @@ -30,12 +25,12 @@ build() { package() { cd "../.." - rm -rf $pkgdir/usr make -j1 DESTDIR="$pkgdir/" install - install -Dm644 README $pkgdir/usr/share/$pkgname/README - install -Dm644 NEWS $pkgdir/usr/share/$pkgname/NEWS - install -Dm644 ChangeLog $pkgdir/usr/share/$pkgname/ChangeLog - install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/AUTHORS - install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING - ln -s ../licenses/$pkgname/COPYING $pkgdir/usr/share/$pkgname/COPYING + install -Dm644 README "$pkgdir/usr/share/$pkgname/README" + install -Dm644 NEWS "$pkgdir/usr/share/$pkgname/NEWS" + install -Dm644 ChangeLog "$pkgdir/usr/share/$pkgname/ChangeLog" + install -Dm644 AUTHORS "$pkgdir/usr/share/$pkgname/AUTHORS" + install -d "$pkgdir/usr/share/licenses/$pkgname" + sed -n '1,/PARTICULAR PURPOSE/p' COPYING > "$pkgdir/usr/share/licenses/$pkgname/COPYING" + ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/$pkgname/COPYING" } From 8a2f5258d76031b7dfabe8b0b658b55ae70b4442 Mon Sep 17 00:00:00 2001 From: Doug Newgard Date: Sat, 22 Jun 2013 12:35:06 +0900 Subject: [PATCH 138/347] Emotion_generic_player: PKGBUILD cleanup pkgname is just a variable instead of an array when it's not a split package Don't need empty makedepends array Add 'efl' to depends Remove deps that are already supplied by other deps Doesn't need to provide itself or the obsolete -svn version Doesn't need to confict with the obsolete -svn version, if someone still has this, they're so far out of date it's not very likely they're paying any attention at all Removed 'strip' and 'zipman' options, they're already default, no need to override if Removed '!libtool' option, none are generated Removed -O2 and -g build flags for the same reason Removed buildflags and specified them in the CFLAGS and CXXFLAGS variables Removed LDFLAGS declariation, why were we clearing this? Removed --disable-static, no static libs are built (I checked this time) No need to rm -rf $pkgdir/usr Double quote all paths with variables --- .../pkgbuild/PKGBUILD.in | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in index 6082a1778e..b7aa2bb4c1 100644 --- a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in +++ b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in @@ -1,24 +1,20 @@ # Maintainer: Enlightenment Developers -pkgname=('emotion_generic_players') +pkgname=emotion_generic_players pkgver=@VERSION@ pkgrel=1 pkgdesc="Emotion external binary executable players - GIT development snapshot" arch=('i686' 'x86_64' 'arm') url="http://www.enlightenment.org" license=('BSD') -makedepends=() -depends=('vlc' 'libdvdcss' 'libbluray' 'flac' 'vcdimager' 'libcdio' - 'ttf-freefont' 'ttf-dejavu' 'opus' 'libssh2') -provides=("emotion_generic_players=$pkgver" 'emotion_generic_players-svn') -conflicts=('emotion_generic_players-svn') -options=('strip' 'zipman' '!libtool' 'debug') -buildflags="-O2 -g -fvisibility=hidden -fomit-frame-pointer" +depends=('efl' 'vlc' 'libdvdcss' 'vcdimager' 'libcdio' + 'ttf-freefont' 'ttf-dejavu' 'libssh2') +options=('debug') build() { - export LDFLAGS="" cd "../.." + export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer" + export CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fomit-frame-pointer" make clean distclean - ./configure --prefix=/usr \ - --disable-static + ./configure --prefix=/usr make } @@ -29,12 +25,11 @@ build() { package() { cd "../.." - rm -rf $pkgdir/usr make -j1 DESTDIR="$pkgdir/" install - install -Dm644 README $pkgdir/usr/share/$pkgname/README - install -Dm644 NEWS $pkgdir/usr/share/$pkgname/NEWS - install -Dm644 ChangeLog $pkgdir/usr/share/$pkgname/ChangeLog - install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/AUTHORS - install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING - ln -s ../licenses/$pkgname/COPYING $pkgdir/usr/share/$pkgname/COPYING + install -Dm644 README "$pkgdir/usr/share/$pkgname/README" + install -Dm644 NEWS "$pkgdir/usr/share/$pkgname/NEWS" + install -Dm644 ChangeLog "$pkgdir/usr/share/$pkgname/ChangeLog" + install -Dm644 AUTHORS "$pkgdir/usr/share/$pkgname/AUTHORS" + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/$pkgname/COPYING" } From 18d60e0ae5059f2f5d27b113f0c0fae2bf60e1c5 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Thu, 8 Aug 2013 09:46:21 +0900 Subject: [PATCH 139/347] vlc: this include seems useless now. --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index ae3f14f203..204f9337eb 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -14,7 +14,6 @@ #include #include -#include #include #include From e09401f3692afbbe694bce96f44ae8e125a8e82d Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Thu, 31 Oct 2013 18:29:28 +0900 Subject: [PATCH 140/347] pdf: add support for generic script generating pdf from anything. --- .../evas_generic_loaders/src/bin/pdf/main.cpp | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index cc4f532fc1..a68b21f0f0 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -4,6 +4,9 @@ #include #include +#include +#include +#include #include #include @@ -199,6 +202,10 @@ void poppler_load_image(int size_w, int size_h) int main(int argc, char **argv) { + Eina_Tmpstr *tmpdir = NULL; + Eina_Tmpstr *generated = NULL; + char *extension; + char *dir; char *file; int i; int size_w = 0, size_h = 0; @@ -239,12 +246,62 @@ main(int argc, char **argv) } } - D("poppler_file_init\n"); D("dpi....: %f\n", dpi); D("page...: %d\n", page); + // This is a funny hack to call an external tool to generate a pdf that will then be processed by poppler + extension = strrchr(file, '.'); + dir = dirname(argv[0]); + if (extension && dir && strcmp(extension, ".pdf")) + { + if (eina_file_mkdtemp("evas_generic_pdf_loaderXXXXXX", &tmpdir)) + { + Eina_Strbuf *tmp; + FILE *cmd; + + tmp = eina_strbuf_new(); + eina_strbuf_append_printf(tmp, "%s/evas_generic_pdf_loader.%s '%s' %s", dir, extension + 1, file, tmpdir); + + cmd = popen(eina_strbuf_string_get(tmp), "r"); + D("running preprocessing process '%s'...\n", eina_strbuf_string_get(tmp)); + eina_strbuf_reset(tmp); + + if (cmd) + { + struct stat st; + const char *filename; + char buf[1024]; + + while (fgets(buf, sizeof (buf), cmd)) + ; + pclose(cmd); + + filename = basename(file); + generated = eina_tmpstr_add_length(filename, strlen(filename) - strlen(extension)); + + eina_strbuf_append_printf(tmp, "%s/%s.pdf", tmpdir, generated); + + eina_tmpstr_del(generated); + generated = NULL; + + if (stat(eina_strbuf_string_get(tmp), &st) == 0) + { + generated = eina_tmpstr_add_length(eina_strbuf_string_get(tmp), + eina_strbuf_length_get(tmp)); + file = (char*) generated; + } + } + + D("generated file: '%s'\n", generated); + eina_strbuf_free(tmp); + } + } + + // Let's force a timeout if things go wrong timeout_init(10); - + + // Now process the pdf (or the generated pdf) + D("poppler_file_init\n"); if (!poppler_init(file, page, size_w, size_h)) return -1; D("poppler_file_init done\n"); @@ -279,5 +336,14 @@ main(int argc, char **argv) poppler_shutdown(); + if (tmpdir) + { + if (generated) unlink(generated); + rmdir(tmpdir); + + eina_tmpstr_del(tmpdir); + eina_tmpstr_del(generated); + } + return 0; } From 0ad516b11bad68952ad5a6eeac873fc8120fbbc7 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Thu, 31 Oct 2013 18:30:55 +0900 Subject: [PATCH 141/347] pdf: use the generic infrastructure to generate pdf for presentation slide. Be aware this is quite heavy and for some reason terminology seems to trigger quite a lot of try here. The generic infrastructure could be improved and use a cache of generated pdf (right now to display one image, we will generate the pdf at least 2 times !). --- legacy/evas_generic_loaders/src/bin/pdf/Makefile.am | 9 +++++++++ .../src/bin/pdf/evas_generic_pdf_loader.libreoffice | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am index 9269c1c258..52176c45a9 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am @@ -12,6 +12,7 @@ AM_CPPFLAGS = \ @EINA_CFLAGS@ \ @POPPLER_CFLAGS@ +bin_SCRIPTS = evas_generic_pdf_loader.libreoffice bin_PROGRAMS = evas_image_loader.pdf bindir = $(libdir)/evas/utils @@ -22,3 +23,11 @@ $(top_srcdir)/src/bin/common/timeout.c evas_image_loader_pdf_CFLAGS = evas_image_loader_pdf_LDADD = @POPPLER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_pdf_LDFLAGS = + +install-exec-hook: + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ppt + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pptx + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odp + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ppt + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.pptx + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odp diff --git a/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice b/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice new file mode 100644 index 0000000000..1809b1d63e --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/lib/libreoffice/program/soffice.bin --headless --convert-to pdf --outdir "$2" "$1" From 556704c11bed4a464e3083c7248cbc10eae51a0a Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 4 Nov 2013 18:32:55 +0900 Subject: [PATCH 142/347] alpha1 release autofoo/build tree work to pass distcheck and actually work --- legacy/emotion_generic_players/Makefile.am | 18 +++++++++++++++--- legacy/emotion_generic_players/configure.ac | 11 ++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am index 7c5e7c5c3f..97c53d5eab 100644 --- a/legacy/emotion_generic_players/Makefile.am +++ b/legacy/emotion_generic_players/Makefile.am @@ -13,7 +13,8 @@ EXTRA_DIST = \ README \ AUTHORS \ COPYING \ -m4/efl_compiler_flag.m4 +m4/efl_compiler.m4 \ +m4/emotion_generic_players.m4 MAINTAINERCLEANFILES = \ aclocal.m4 \ @@ -27,9 +28,20 @@ install-sh \ ltmain.sh \ Makefile.in \ missing \ -mkinstalldirs +mkinstalldirs \ +m4/libtool.m4 \ +m4/lt~obsolete.m4 \ +m4/ltoptions.m4 \ +m4/ltsugar.m4 \ +m4/ltversion.m4 + + +# this won't pass distcheck :( +#emotiongenericplayersdir = $(EMOTION_GENERIC_PLAYERS_DIR) + +emotiongenericplayersdir = \ +$(DESTDIR)$(libdir)/emotion/generic_players/$(MODULE_ARCH) -emotiongenericplayersdir = $(EMOTION_GENERIC_PLAYERS_DIR) emotiongenericplayers_PROGRAMS = if HAVE_VLC diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index f97a392c48..cda4f8e224 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [7]) -m4_define([v_mic], [99]) -m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) +m4_define([v_min], [8]) +m4_define([v_mic], [0]) +dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [ver-pre-svn-05]) +dnl m4_define([relname], [alpha1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) @@ -107,6 +107,7 @@ EMOTION_GENERIC_PLAYERS_DIR="${EMOTION_GENERIC_PLAYERS_DIR}/${MODULE_ARCH}" AC_MSG_CHECKING([where to install generic players]) AC_MSG_RESULT([${EMOTION_GENERIC_PLAYERS_DIR}]) AC_SUBST(EMOTION_GENERIC_PLAYERS_DIR) +AC_SUBST(MODULE_ARCH) #### Players EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 0.9 eina >= 1.1.99 ecore >= 1.7.99]) From 95fb6a948613c6fe1b2f25bf1516ac1c17b72f9b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 4 Nov 2013 18:33:00 +0900 Subject: [PATCH 143/347] alpha1 release autofoo/build tree work to pass distcheck and actually work --- legacy/evas_generic_loaders/configure.ac | 10 +++++----- .../evas_generic_loaders/src/bin/pdf/Makefile.am | 16 ++++++++++++++++ .../bin/pdf/evas_generic_pdf_loader.libreoffice | 0 3 files changed, 21 insertions(+), 5 deletions(-) mode change 100644 => 100755 legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 44ed0c4a34..13d95522f1 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [7]) -m4_define([v_mic], [99]) -m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) +m4_define([v_min], [8]) +m4_define([v_mic], [0]) +dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [ver-pre-svn-05]) +m4_define([relname], [alpha1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am index 52176c45a9..d57c9a0a16 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am @@ -12,6 +12,8 @@ AM_CPPFLAGS = \ @EINA_CFLAGS@ \ @POPPLER_CFLAGS@ +EXTRA_DIST = evas_generic_pdf_loader.libreoffice + bin_SCRIPTS = evas_generic_pdf_loader.libreoffice bin_PROGRAMS = evas_image_loader.pdf bindir = $(libdir)/evas/utils @@ -28,6 +30,20 @@ install-exec-hook: ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ppt ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pptx ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odp + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xls + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xlsx + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ods + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.doc + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.docx + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odt + ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rtf ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ppt ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.pptx ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odp + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.xls + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.xlsx + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ods + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.doc + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.docx + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odt + ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.rtf diff --git a/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice b/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice old mode 100644 new mode 100755 From aa9b639b346a51f94f9820bae7e3a6f58a4a49c7 Mon Sep 17 00:00:00 2001 From: Jerome Pinot Date: Tue, 5 Nov 2013 23:33:47 +0900 Subject: [PATCH 144/347] Remove extraneous $(DESTDIR) in Makefile.am. --- legacy/emotion_generic_players/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am index 97c53d5eab..03550265d1 100644 --- a/legacy/emotion_generic_players/Makefile.am +++ b/legacy/emotion_generic_players/Makefile.am @@ -40,7 +40,7 @@ m4/ltversion.m4 #emotiongenericplayersdir = $(EMOTION_GENERIC_PLAYERS_DIR) emotiongenericplayersdir = \ -$(DESTDIR)$(libdir)/emotion/generic_players/$(MODULE_ARCH) +$(libdir)/emotion/generic_players/$(MODULE_ARCH) emotiongenericplayers_PROGRAMS = From 2b721e8f902f23b1a1dbf0915231ffa81f853a9b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 7 Nov 2013 17:26:09 +0900 Subject: [PATCH 145/347] reandme -> 1.8.0 --- legacy/evas_generic_loaders/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index c69ab09c63..780549d207 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,4 +1,4 @@ -Evas generic loaders 1.7.99 +Evas generic loaders 1.8.0. ****************************************************************************** From 5aa5aee8716fbb11a33bd046713b5852dac7d74e Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 7 Nov 2013 17:26:54 +0900 Subject: [PATCH 146/347] readme has standard 1.8.0 header now --- legacy/emotion_generic_players/README | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README index 711f36cfca..759cf9f90b 100644 --- a/legacy/emotion_generic_players/README +++ b/legacy/emotion_generic_players/README @@ -1,3 +1,12 @@ +Emotion Generic Players 1.8.0. + +****************************************************************************** + + FOR ANY ISSUES PLEASE EMAIL: + enlightenment-devel@lists.sourceforge.net + +****************************************************************************** + Players for Emotion using "generic" module. EMOTION GENERIC PLAYERS From 7e0bbecf92a667c38b5d6d9fbd487860fc06ed2a Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 19 Nov 2013 17:20:22 +0900 Subject: [PATCH 147/347] 1.8.0-alpha2 --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index cda4f8e224..09457c71a7 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [alpha1]) +dnl m4_define([relname], [alpha2]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 350e6e07a430e108860efa7e9f123207fc063a74 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 19 Nov 2013 17:22:00 +0900 Subject: [PATCH 148/347] 1.8.0-alpha2 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 13d95522f1..3363010d65 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [alpha1]) +m4_define([relname], [alpha2]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 503d648c2a7336bb2c1788c8cba7c812083b9905 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 25 Nov 2013 14:52:07 +0900 Subject: [PATCH 149/347] 1.8.0-beta1 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 3363010d65..df0082a364 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [alpha2]) +m4_define([relname], [beta1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From f820ef2bfd3048d9a7c0ff4105cebae3e7e698dc Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 25 Nov 2013 14:52:12 +0900 Subject: [PATCH 150/347] 1.8.0-beta1 --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 09457c71a7..dc6e5a77de 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [alpha2]) +dnl m4_define([relname], [beta1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From e84ed727b0f5875dfc99d428651f9f2aba5dd4c6 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 27 Nov 2013 00:12:18 +0900 Subject: [PATCH 151/347] gst loader - early quit if gst stream has no video streams this should fix the hang/pause in T551. so T551 fixed by this. --- legacy/evas_generic_loaders/src/bin/gst/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 1081da79e1..140fe02f97 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -45,6 +45,7 @@ _gst_init(const char *filename) GError *error = NULL; GstFormat format; GstStateChangeReturn ret; + int vidstr = 0; if (!filename || !*filename) return EINA_FALSE; @@ -77,6 +78,15 @@ _gst_init(const char *filename) g_error_free (error); goto gst_shutdown; } + + g_object_get(G_OBJECT(pipeline), + "n-video", &vidstr, + NULL); + if (vidstr <= 0) + { + D("no video stream\n"); + goto gst_shutdown; + } sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); From 4d2c68e86e657d98fcda7782fa2ed5532e59a2f6 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Fri, 29 Nov 2013 17:52:14 +0900 Subject: [PATCH 152/347] vlc: properly detect frame format size and send information back to emotion. This should fix T582. There is more to do as on some system mute is not working and we get a double sound along with the slow startup. --- .../src/vlc/emotion_generic_vlc.c | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 204f9337eb..48581e5f34 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -325,6 +325,31 @@ _tmp_display(void *data EINA_UNUSED, void *id EINA_UNUSED) { } +static unsigned +_tmp_format(void **opaque, char *chroma, + unsigned *width, unsigned *height, + unsigned *pitches, unsigned *lines) +{ + App *app = *opaque; + + app->tmpbuffer = realloc(app->tmpbuffer, + *width * *height * 4 * sizeof (char)); + strcpy(chroma, "RV32"); + pitches[0] = pitches[1] = pitches[2] = *width * 4; + lines[0] = lines[1] = lines[2] = *height; + + _send_resize(app, *width, *height); + + return 1; +} + +static void +_tmp_play(void *data EINA_UNUSED, + const void *samples EINA_UNUSED, unsigned count EINA_UNUSED, + int64_t pts EINA_UNUSED) +{ +} + static void _file_set(App *app) { @@ -345,6 +370,13 @@ _file_set(App *app) app->opening = 1; libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); + libvlc_video_set_format_callbacks(app->mp, _tmp_format, NULL); + /* On my system the mute below is not working and I can't find a way + to make it work, so the following set should help, but then it has + other side effect... + */ + /* libvlc_audio_set_callbacks(app->mp, _tmp_play, NULL, NULL, NULL, NULL, app); */ + app->event_mgr = libvlc_media_player_event_manager(app->mp); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, _event_cb, app); @@ -418,7 +450,6 @@ _file_set_done(App *app) libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, @@ -561,7 +592,6 @@ _remote_command(void *data, void *buffer, unsigned int nbyte) if (nbyte == 0) { - fprintf(stderr, "death is comming\n"); ecore_main_loop_quit(); return ; } From 64938785b44e44ba854f80432b15fd659103b3b6 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 29 Nov 2013 19:08:26 +0900 Subject: [PATCH 153/347] readme - update readme for efl 1.8 lots of extra documentation and information now in the README --- legacy/evas_generic_loaders/README | 103 ++++++++++++++++------------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 780549d207..7af8301a01 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,27 +1,10 @@ -Evas generic loaders 1.8.0. +Evas generic loaders 1.8.0 +========================== ****************************************************************************** - FOR ANY ISSUES PLEASE EMAIL: enlightenment-devel@lists.sourceforge.net - ****************************************************************************** - -Requirements: -------------- - -Must: - libc - libm - zlib - -Recommended: - gstreamer - poppler - libraw - libspectre - librsvg - These are additional "generic" loaders for Evas that are stand-alone executables that evas may run from its generic loader module. This @@ -31,44 +14,72 @@ affect the license of any application that uses Evas as this uses a completely generic execution system that allows anything to be plugged in as a loader. + +REQUIREMENTS +------------ + +Required by default: + + libc + libm + zlib + +Highly recommended: + + gstreamer (0.10) (ensure you have all the gstreamer codecs you need/want) + poppler + libraw + libspectre + librsvg + +Sugested: + + libreoffice + + +COMPONENTS +---------- + Generic loaders currently provided: - XCF (.xcf .xcf.gz) + * **XCF** (.xcf .xcf.gz) - PDF (using poppler) - use -key option to specific what page to get and load options for size - Should we add mupdf ? + * **PDF** (using poppler) + * use -key option to specific what page to get and load options for size + Should we add mupdf ? - PS (using libspectre) - use -key option to specific what page to get and load options for size - Should we use directly libgs ? + * **PS** (using libspectre) + * use -key option to specific what page to get and load options for size + Should we use directly libgs ? - RAW (using libraw) + * **RAW** (using libraw) - SVG (using librsvg) + * **SVG** (using librsvg) - MPG/AVI/OGV/MOV/MKV/WMV etc. (using Gstreamer) - Should we add libxine and vlc ? + * **MPG/AVI/OGV/MOV/MKV/WMV** etc. (using gstreamer) + * Should we add libxine and vlc ? + + * **PPT/PPTX/DOC/DOCX/XLS** etc. + * Required PDF loader, and uses libreoffice binaries as slaves to + export PDFs to load -Possible fun ones in future: - DVI (using DVIlib, see edvi) +COMPILING AND INSTALLING +------------------------ - DJVU (using libdjvu) + ./configure + make + sudo make install - PPT/PPTX/DOC/DOCX/XLS... - (beats me how u can render a page from these without a whole - office impl - but worth a try? libopenoffice/libllibreoffice if - it ever happens?) ------------------------------------------------------------------------------- -COMPILING AND INSTALLING: +COMPILER FLAGS +-------------- - ./configure - make -(as root unless you are installing in your users directories): - make install +You may want to change the install prefix for EFL with: -NOTE: - you should put generic loaders in the same prefix as Evas or they -will not be found. + --prefix=/path/to/prefix + +**NOTE:** + +You should put generic loaders in the same prefix as EFL or they will +not be found by EFL at runtime. From af4b4fb554baae47a2ebfa48bd6083115568b153 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 29 Nov 2013 19:08:33 +0900 Subject: [PATCH 154/347] readme - update readme for efl 1.8 lots of extra documentation and information now in the README --- legacy/emotion_generic_players/README | 56 +++++++++++++++++++++------ 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README index 759cf9f90b..5d6fceca64 100644 --- a/legacy/emotion_generic_players/README +++ b/legacy/emotion_generic_players/README @@ -1,33 +1,65 @@ -Emotion Generic Players 1.8.0. +Emotion Generic Players 1.8.0 +============================= ****************************************************************************** - FOR ANY ISSUES PLEASE EMAIL: enlightenment-devel@lists.sourceforge.net - ****************************************************************************** -Players for Emotion using "generic" module. +These are binary players for Emotion using the "generic" module. -EMOTION GENERIC PLAYERS -======================= - -Emotion support multiple modules provided as shared-objects under -${prefix}/lib/emotion/modules, making it extensible. However these +Emotion supports multiple modules provided as shared-objects under +PREFIX/lib/emotion/modules, making it extensible. However these live in the same process as the application, thus problems handling the media may crash or halt the application. Unfortunately media handling is very error prone due multiple sources, sinks, decoders et al, each with their own level of stability. -To solve this emotion ships with a "generic" module that will be a +To solve this, Emotion ships with a "generic" module that is a layer to talk to another process, the "player", using pipes and shared memory (shm). If this external process dies, the main application remains working (without any media, of course). Thus it is safer and -have some nice qualities as avoiding bringing in many libraries to +has some nice side effects such as avoiding bringing in many libraries to decode media, saving memory in the application process, etc. A secondary benefit is that the generic player is a separate process and does not link with the user application code or EFL, avoiding -license conflicts. Many decoding libraries or elements exist in +license conflicts. Many decoding libraries or elements exist with conflicting licenses with GPL, LGPL or even proprietary code. + +REQUIREMENTS +------------ + + vlc (library) + + +COMPONENTS +---------- + +**VLC Generic Player:** + +//GPL v2 license// + +This is a binary that uses the VLC library (libvlc) to play videos +inot shared memory. + +COMPILING AND INSTALLING +------------------------ + + ./configure + make + sudo make install + + +COMPILER FLAGS +-------------- + +You may want to change the install prefix for EFL with: + + --prefix=/path/to/prefix + +**NOTE:** + +You should put generic players in the same prefix as EFL or they will +not be found by EFL at runtime. From 8a7c8b6bd880a9c40606ef2bdbd218226b2c76e3 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 29 Nov 2013 19:37:09 +0900 Subject: [PATCH 155/347] v1.8.0-beta2 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index df0082a364..47dbd23783 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [beta1]) +m4_define([relname], [beta2]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 5f7297a979d9c0e054abe349428b4ec4130f6694 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 29 Nov 2013 19:37:20 +0900 Subject: [PATCH 156/347] v1.8.0-beta2 --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index dc6e5a77de..5d4688a65b 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [beta1]) +dnl m4_define([relname], [beta2]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 733d64c9b9bc3b79c26c6b97134aae518ba50cf3 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 14:53:49 +0900 Subject: [PATCH 157/347] readme - make requirements list a bullet list --- legacy/evas_generic_loaders/README | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 7af8301a01..1f1f7126c2 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -20,21 +20,21 @@ REQUIREMENTS Required by default: - libc - libm - zlib + * libc + * libm + * zlib Highly recommended: - gstreamer (0.10) (ensure you have all the gstreamer codecs you need/want) - poppler - libraw - libspectre - librsvg + * gstreamer (0.10) (ensure you have all the gstreamer codecs you need/want) + * poppler + * libraw + * libspectre + * librsvg Sugested: - libreoffice + * libreoffice COMPONENTS From fa115a5052143bfcab45abe76d61648c6bf012de Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 14:54:18 +0900 Subject: [PATCH 158/347] readme - make requirements list a bullet list --- legacy/emotion_generic_players/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README index 5d6fceca64..0fbc6a8d57 100644 --- a/legacy/emotion_generic_players/README +++ b/legacy/emotion_generic_players/README @@ -31,7 +31,7 @@ conflicting licenses with GPL, LGPL or even proprietary code. REQUIREMENTS ------------ - vlc (library) + * vlc (libvlc) COMPONENTS From 45a6458c88b9dca6086ba0c92154eb67db41a7ec Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 16:08:27 +0900 Subject: [PATCH 159/347] add libreoffice news --- legacy/evas_generic_loaders/NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index bc4a04cc56..a5746c24ab 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -7,6 +7,7 @@ Improvements: * All generic loader binaries have built-in timeouts in case they get stuck. + * Libreoffice support for thumbnailing office documents Changes since Evas Generic Loaders 1.2.0: ----------------------------------------- From 63a9dd73841834ad0f3cf4c580fb03653626166b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 19:02:37 +0900 Subject: [PATCH 160/347] v1.8.0 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 47dbd23783..dcc44db26d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [beta2]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 89349cd9bbd75f07a06082993114960d3090f915 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 19:02:39 +0900 Subject: [PATCH 161/347] v1.8.0 --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 5d4688a65b..a5c561cc93 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [beta2]) +dnl m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 58d6c943aacbae5201f0bc18067865d9d4315593 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 Dec 2013 12:27:23 -0500 Subject: [PATCH 162/347] bugfix: support gstreamer 0.10 and 1.0 commit 576b20e11c24c079d944fbbfb2d8902c4b313c10 last week broke gstreamer usage with 0.10 (n-video property not present until >= 1.0), but we required 0.10. not a great idea since most distros seem to still ship 0.10 by default, which means that ALL gst image loads would always fail --- legacy/evas_generic_loaders/configure.ac | 20 ++++++++++++++++--- .../evas_generic_loaders/src/bin/gst/main.c | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index dcc44db26d..11ac25fd05 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -147,9 +147,9 @@ if test "x$want_svg" = "xyes" ; then else have_svg=no fi -GST_REQS=0.10.13 -GSTPLUG_REQS=0.10.13 -GST_MAJORMINOR=0.10 +GST_REQS=1.0 +GSTPLUG_REQS=1.0 +GST_MAJORMINOR=1.0 AC_ARG_ENABLE([gstreamer], [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], @@ -163,9 +163,23 @@ if test "x$want_gstreamer" = "xyes" ; then ], [have_gst="yes"], [have_gst="no"]) + if test "x$have_gst" = "xno" ; then + GST_REQS=0.10.13 + GSTPLUG_REQS=0.10.13 + GST_MAJORMINOR=0.10 + PKG_CHECK_MODULES([GSTREAMER], + [gstreamer-$GST_MAJORMINOR >= $GST_REQS + gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS + ], + [have_gst="yes" + AC_DEFINE_UNQUOTED([USE_OLD_GST], [1], [using older gstreamer]) + ], + [have_gst="no"]) + fi else have_gst=no fi + AM_CONDITIONAL([HAVE_GST], [test "x${have_gst}" = "xyes"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 140fe02f97..2f396badd4 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -78,7 +78,7 @@ _gst_init(const char *filename) g_error_free (error); goto gst_shutdown; } - +#ifndef USE_OLD_GST g_object_get(G_OBJECT(pipeline), "n-video", &vidstr, NULL); @@ -87,7 +87,7 @@ _gst_init(const char *filename) D("no video stream\n"); goto gst_shutdown; } - +#endif sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); From 3dd97971db653621eab748fb9d1a9a359ae0d1fe Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 Dec 2013 12:34:32 -0500 Subject: [PATCH 163/347] Revert "bugfix: support gstreamer 0.10 and 1.0" This reverts commit e629f406a55489bcbf46f1e6b76b47fdfa72094b. somehow this went from compiling to not compiling in the time that I committed. I blame cedric. --- legacy/evas_generic_loaders/configure.ac | 20 +++---------------- .../evas_generic_loaders/src/bin/gst/main.c | 4 ++-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 11ac25fd05..dcc44db26d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -147,9 +147,9 @@ if test "x$want_svg" = "xyes" ; then else have_svg=no fi -GST_REQS=1.0 -GSTPLUG_REQS=1.0 -GST_MAJORMINOR=1.0 +GST_REQS=0.10.13 +GSTPLUG_REQS=0.10.13 +GST_MAJORMINOR=0.10 AC_ARG_ENABLE([gstreamer], [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], @@ -163,23 +163,9 @@ if test "x$want_gstreamer" = "xyes" ; then ], [have_gst="yes"], [have_gst="no"]) - if test "x$have_gst" = "xno" ; then - GST_REQS=0.10.13 - GSTPLUG_REQS=0.10.13 - GST_MAJORMINOR=0.10 - PKG_CHECK_MODULES([GSTREAMER], - [gstreamer-$GST_MAJORMINOR >= $GST_REQS - gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS - ], - [have_gst="yes" - AC_DEFINE_UNQUOTED([USE_OLD_GST], [1], [using older gstreamer]) - ], - [have_gst="no"]) - fi else have_gst=no fi - AM_CONDITIONAL([HAVE_GST], [test "x${have_gst}" = "xyes"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 2f396badd4..140fe02f97 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -78,7 +78,7 @@ _gst_init(const char *filename) g_error_free (error); goto gst_shutdown; } -#ifndef USE_OLD_GST + g_object_get(G_OBJECT(pipeline), "n-video", &vidstr, NULL); @@ -87,7 +87,7 @@ _gst_init(const char *filename) D("no video stream\n"); goto gst_shutdown; } -#endif + sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); From a12299d4e0fc54d07b0e330a44eb2c4d6764e104 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 Dec 2013 12:36:14 -0500 Subject: [PATCH 164/347] bugfix: unbreak gstreamer plugin apparently the only way to fix this in 0.10 without newer apis is to not fix it --- legacy/evas_generic_loaders/src/bin/gst/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 140fe02f97..4ef774aa98 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -78,7 +78,7 @@ _gst_init(const char *filename) g_error_free (error); goto gst_shutdown; } - +/* needs gst 1.0+ g_object_get(G_OBJECT(pipeline), "n-video", &vidstr, NULL); @@ -87,7 +87,7 @@ _gst_init(const char *filename) D("no video stream\n"); goto gst_shutdown; } - +*/ sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); From cd54a4e1e37da7478a828c9f612ecc883ccec581 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 Dec 2013 14:16:20 -0500 Subject: [PATCH 165/347] bugfix: add a typefind to gstreamer plugin pipeline previously, we would load any file and try to force it into video/x-raw-rgb, which was (obviously) problematic for audio-only files. with a typefind added to the pipeline, only files which can output to video/x-raw-rgb will be processed --- legacy/evas_generic_loaders/src/bin/gst/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 4ef774aa98..5e3fc7c12a 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -67,7 +67,7 @@ _gst_init(const char *filename) D("Setting file %s\n", uri); - descr = g_strdup_printf("uridecodebin uri=%s ! ffmpegcolorspace ! " + descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! ffmpegcolorspace ! " " appsink name=sink caps=\"" CAPS "\"", uri); pipeline = gst_parse_launch(descr, &error); free(uri); From baac6515a61331becd66f449f79cd6a27d4beb1f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 Dec 2013 14:19:41 -0500 Subject: [PATCH 166/347] add note on why checking n-video gst property will never work (not just 1.0+) --- legacy/evas_generic_loaders/src/bin/gst/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 5e3fc7c12a..833eb43732 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -79,6 +79,7 @@ _gst_init(const char *filename) goto gst_shutdown; } /* needs gst 1.0+ + * also only works on playbin objects!!! this is a uridecodebin! g_object_get(G_OBJECT(pipeline), "n-video", &vidstr, NULL); From 7575e6249c0c2e1e194bd0634905cf11788d5084 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 19 Dec 2013 15:43:27 +0900 Subject: [PATCH 167/347] bump to 1.8.99 for dev --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index a5c561cc93..44a68c6b7b 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,7 +2,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [8]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) From 20c029e1b9e60e9e9adf6bfc69380621d594fb34 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 19 Dec 2013 15:43:55 +0900 Subject: [PATCH 168/347] bump to 1.8.99 for dev --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index dcc44db26d..6d8831c9c4 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,7 +2,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [8]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) From 4e2cad04cab0c292499280870da77828044ea1de Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 9 Jan 2014 09:46:36 +0900 Subject: [PATCH 169/347] check for libvlc >= 2.0 as a minimum as we use 2.x funcs --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 44a68c6b7b..096f694534 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,6 +1,6 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_define([v_maj], [1]) +m4_define(v_maj], [1]) m4_define([v_min], [8]) m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) @@ -110,7 +110,7 @@ AC_SUBST(EMOTION_GENERIC_PLAYERS_DIR) AC_SUBST(MODULE_ARCH) #### Players -EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 0.9 eina >= 1.1.99 ecore >= 1.7.99]) +EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 2.0 eina >= 1.1.99 ecore >= 1.7.99]) AC_CONFIG_FILES([ From 5588f5fc3c5c86dedcbca6657322a1a4fa67a1ee Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 9 Jan 2014 14:17:35 +0900 Subject: [PATCH 170/347] configure: fix typos. --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 096f694534..e2f6f62064 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,6 +1,6 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_define(v_maj], [1]) +m4_define([v_maj], [1]) m4_define([v_min], [8]) m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) From 2092f311707017bfc4dfe18587f02cbd15807e0c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 13 Jan 2014 05:11:49 +0900 Subject: [PATCH 171/347] gst loader - support key as stream position in 1/1000th of a second --- .../evas_generic_loaders/src/bin/gst/main.c | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 833eb43732..c6e4dd03fb 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -45,7 +45,7 @@ _gst_init(const char *filename) GError *error = NULL; GstFormat format; GstStateChangeReturn ret; - int vidstr = 0; +// int vidstr = 0; if (!filename || !*filename) return EINA_FALSE; @@ -164,13 +164,17 @@ _gst_shutdown() } static void -_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED) +_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) { GstBuffer *buffer; D("load image\n"); - gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - duration / 2); + if (pos >= 0.0) + gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, + pos * 1000000000.0); + else + gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, + duration / 2); g_signal_emit_by_name(sink, "pull-preroll", &buffer, NULL); D("load image : %p %d\n", GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); @@ -184,11 +188,11 @@ _gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED) int main(int argc, char **argv) { - char *file; - int i; + char *file, *p; + int i, numonly; int size_w = 0, size_h = 0; int head_only = 0; - int page = 0; + long long pos = -1.0; if (argc < 2) return -1; // file is ALWAYS first arg, other options come after @@ -201,7 +205,16 @@ main(int argc, char **argv) else if (!strcmp(argv[i], "-key")) { i++; - page = atoi(argv[i]); + numonly = 1; + for (p = argv[i]; *p; p++) + { + if ((!*p < '0') || (*p > 9)) + { + numonly = 0; + break; + } + } + if (numonly) pos = (double)(atoll(argv[i])) / 1000.0; i++; } else if (!strcmp(argv[i], "-opt-scale-down-by")) @@ -232,7 +245,7 @@ main(int argc, char **argv) if (!head_only) { - _gst_load_image(size_w, size_h); + _gst_load_image(size_w, size_h, pos); } D("size...: %ix%i\n", width, height); From 58fd81e407418431e0da3c952aaf923fcc1496ab Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Sat, 18 Jan 2014 19:23:59 +0900 Subject: [PATCH 172/347] emotion_generic_players - commented out unused func. --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 48581e5f34..145833f1c0 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -343,12 +343,14 @@ _tmp_format(void **opaque, char *chroma, return 1; } +/* static void _tmp_play(void *data EINA_UNUSED, const void *samples EINA_UNUSED, unsigned count EINA_UNUSED, int64_t pts EINA_UNUSED) { } +*/ static void _file_set(App *app) From 95f50d79c33270974be8dddce6352a6c3504c2f9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 11 Feb 2014 16:21:30 -0500 Subject: [PATCH 173/347] 1.9.0 alpha1 --- legacy/emotion_generic_players/configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index e2f6f62064..97ebee1288 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [8]) -m4_define([v_mic], [99]) +m4_define([v_min], [9]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -dnl m4_define([relname], [dev]) +m4_define([relname], [alpha1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From b77f794f661f5b7f8ec5b5265a1783a76cc85c61 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 11 Feb 2014 16:18:35 -0500 Subject: [PATCH 174/347] 1.9.0 alpha1 --- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 6d8831c9c4..6e7fd1d513 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [8]) -m4_define([v_mic], [99]) +m4_define([v_min], [9]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [alpha1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 47ca3994c52d9e2c2c120612990bed09b24a939f Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 12 Feb 2014 15:59:47 +0900 Subject: [PATCH 175/347] simplify player version dir fallback to match efl 1.9 simplification changes --- legacy/emotion_generic_players/configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 97ebee1288..9a572f180d 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -87,13 +87,13 @@ PKG_CHECK_MODULES([EMOTION], [emotion >= v_maj.v_min]) MODULE_ARCH=`pkg-config --variable=module_arch emotion` if test -z "${MODULE_ARCH}"; then - EMOTION_VERSION=`pkg-config --modversion emotion | cut -d. -f1-3` + EMOTION_VERSION=`pkg-config --modversion emotion | cut -d. -f1-2` case "$host_os" in mingw32ce*) - MODULE_ARCH="$host_os-$host_cpu" + MODULE_ARCH="v" ;; *) - MODULE_ARCH="$host_os-$host_cpu-${EMOTION_VERSION}" + MODULE_ARCH="v-${EMOTION_VERSION}" ;; esac fi From b0366fc0c397a61dd128e39d2147530caae93984 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 12 Feb 2014 16:02:04 +0900 Subject: [PATCH 176/347] update README version --- legacy/emotion_generic_players/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README index 0fbc6a8d57..698ec51e25 100644 --- a/legacy/emotion_generic_players/README +++ b/legacy/emotion_generic_players/README @@ -1,4 +1,4 @@ -Emotion Generic Players 1.8.0 +Emotion Generic Players 1.9.0 ============================= ****************************************************************************** From 091e7a2bf1b9f478d9149bf76ab7a1834d63b612 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 12 Feb 2014 16:02:43 +0900 Subject: [PATCH 177/347] update copying dates --- legacy/emotion_generic_players/COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/COPYING b/legacy/emotion_generic_players/COPYING index aab836272d..94cdd8072a 100644 --- a/legacy/emotion_generic_players/COPYING +++ b/legacy/emotion_generic_players/COPYING @@ -1,6 +1,6 @@ Copyright notice for Emotion: -Copyright (C) 2004-2011 Carsten Haitzler and various contributors (see AUTHORS) +Copyright (C) 2004-2014 Carsten Haitzler and various contributors (see AUTHORS) All rights reserved. From c0a86cbb35c2aa748a5d3aac94562fab3e384d4c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 12 Feb 2014 16:03:09 +0900 Subject: [PATCH 178/347] update readme+copying version/dates --- legacy/evas_generic_loaders/COPYING | 2 +- legacy/evas_generic_loaders/README | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/COPYING b/legacy/evas_generic_loaders/COPYING index cd661164e9..57fa99e62d 100644 --- a/legacy/evas_generic_loaders/COPYING +++ b/legacy/evas_generic_loaders/COPYING @@ -1,6 +1,6 @@ Copyright notice for Evas generic loaders: -Copyright (C) 2011-2011 Carsten Haitzler and various contributors (see AUTHORS) +Copyright (C) 2011-2014 Carsten Haitzler and various contributors (see AUTHORS) This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 1f1f7126c2..7cf9c57077 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,4 +1,4 @@ -Evas generic loaders 1.8.0 +Evas generic loaders 1.9.0 ========================== ****************************************************************************** From 752200ce495ac1eb945cf846077225f7e893803c Mon Sep 17 00:00:00 2001 From: davemds Date: Sun, 16 Feb 2014 13:50:20 +0100 Subject: [PATCH 179/347] Emotion VLC backend: fix pause/stop to work again. The EM_CMD_STOP command do not have any parameter so it must be handled in the first call of the pipe. --- .../emotion_generic_players/src/vlc/emotion_generic_vlc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 145833f1c0..8c4e04990e 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -636,6 +636,10 @@ _remote_command(void *data, void *buffer, unsigned int nbyte) _file_close(app); app->last_order = EM_CMD_LAST; break; + case EM_CMD_STOP: + _stop(app); + app->last_order = EM_CMD_LAST; + break; } } else @@ -657,9 +661,6 @@ _remote_command(void *data, void *buffer, unsigned int nbyte) case EM_CMD_PLAY: _play(app, *(float*) buffer); break; - case EM_CMD_STOP: - _stop(app); - break; case EM_CMD_POSITION_SET: _position_set(app, *(float*) buffer); break; From ad23b1e40350c447567ac69558eccfae3bd1b960 Mon Sep 17 00:00:00 2001 From: davemds Date: Sun, 16 Feb 2014 21:38:34 +0100 Subject: [PATCH 180/347] Emotion VLC: cleanup: only changed function order in file. --- .../src/vlc/emotion_generic_vlc.c | 162 +++++++++--------- 1 file changed, 84 insertions(+), 78 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 8c4e04990e..19078cea18 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -65,16 +65,11 @@ struct _App { Eina_Bool inited; }; -Eina_Bool -exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) -{ - ecore_main_loop_quit(); - return EINA_TRUE; -} -#define SEND_CMD_PARAM(app, i) \ - if ((app)->fd_write) \ - if (!ecore_pipe_write((app)->fd_write, &(i), sizeof((i)))) \ +/* Commands sent to the emotion pipe */ +#define SEND_CMD_PARAM(app, i) \ + if ((app)->fd_write) \ + if (!ecore_pipe_write((app)->fd_write, &(i), sizeof((i)))) \ ecore_main_loop_quit(); static void @@ -200,6 +195,37 @@ _send_all_meta_info(struct _App *app) _send_cmd_str(app, meta); } +static void +_send_length_changed(struct _App *app, const struct libvlc_event_t *ev) +{ + float length = ev->u.media_player_length_changed.new_length; + length /= 1000; + + _send_cmd(app, EM_RESULT_LENGTH_CHANGED); + SEND_CMD_PARAM(app, length); +} + +static void +_send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) +{ + int seekable = ev->u.media_player_seekable_changed.new_seekable; + + _send_cmd(app, EM_RESULT_SEEKABLE_CHANGED); + SEND_CMD_PARAM(app, seekable); +} + +static void +_send_file_set(struct _App *app) +{ + if (app->opening) + _send_cmd(app, EM_RESULT_FILE_SET); + + if (app->closing) + _send_file_closed(app); +} + + +/* libvlc */ static Eina_Bool _loaded_idler(void *data) { @@ -243,35 +269,6 @@ _position_changed(App *app) ecore_idler_add(_loaded_idler, app); } -static void -_send_length_changed(struct _App *app, const struct libvlc_event_t *ev) -{ - float length = ev->u.media_player_length_changed.new_length; - length /= 1000; - - _send_cmd(app, EM_RESULT_LENGTH_CHANGED); - SEND_CMD_PARAM(app, length); -} - -static void -_send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) -{ - int seekable = ev->u.media_player_seekable_changed.new_seekable; - - _send_cmd(app, EM_RESULT_SEEKABLE_CHANGED); - SEND_CMD_PARAM(app, seekable); -} - -static void -_send_file_set(struct _App *app) -{ - if (app->opening) - _send_cmd(app, EM_RESULT_FILE_SET); - - if (app->closing) - _send_file_closed(app); -} - static void _event_cb(const struct libvlc_event_t *ev, void *data) { @@ -352,9 +349,47 @@ _tmp_play(void *data EINA_UNUSED, } */ +static void * +_lock(void *data, void **pixels) +{ + App *app = data; + + if (app->playing) + *pixels = app->vf.frames[app->vs->frame.player]; + else + *pixels = NULL; + + return NULL; // picture identifier, not needed here +} + +static void +_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) +{ +} + +static void +_display(void *data, void *id EINA_UNUSED) +{ + App *app = data; + + if (!app->playing) + return; + + eina_semaphore_lock(&app->vs->lock); + app->vs->frame.last = app->vs->frame.player; + app->vs->frame.player = app->vs->frame.next; + app->vs->frame.next = app->vs->frame.last; + if (!app->vs->frame_drop++) + _send_cmd(app, EM_RESULT_FRAME_NEW); + eina_semaphore_release(&app->vs->lock, 1); +} + + +/* Commands received from the emotion pipe */ static void _file_set(App *app) { + DBG("Path: %s", app->filename); app->m = libvlc_media_new_path(app->libvlc, app->filename); if (!app->m) { @@ -392,41 +427,6 @@ _file_set(App *app) libvlc_media_player_play(app->mp); } -static void * -_lock(void *data, void **pixels) -{ - App *app = data; - - if (app->playing) - *pixels = app->vf.frames[app->vs->frame.player]; - else - *pixels = NULL; - - return NULL; // picture identifier, not needed here -} - -static void -_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) -{ -} - -static void -_display(void *data, void *id EINA_UNUSED) -{ - App *app = data; - - if (!app->playing) - return; - - eina_semaphore_lock(&app->vs->lock); - app->vs->frame.last = app->vs->frame.player; - app->vs->frame.player = app->vs->frame.next; - app->vs->frame.next = app->vs->frame.last; - if (!app->vs->frame_drop++) - _send_cmd(app, EM_RESULT_FRAME_NEW); - eina_semaphore_release(&app->vs->lock, 1); -} - static void _file_set_done(App *app) { @@ -687,11 +687,19 @@ _remote_command(void *data, void *buffer, unsigned int nbyte) } } -void +static void _dummy(void *data EINA_UNUSED, void *buffer EINA_UNUSED, unsigned int nbyte EINA_UNUSED) { - /* This function is useless for the pipe we use to send message back to emotion, - but still needed */ + /* This function is useless for the pipe we use to send message back + to emotion, but still needed */ +} + +/* Main */ +Eina_Bool +exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) +{ + ecore_main_loop_quit(); + return EINA_TRUE; } int @@ -763,12 +771,10 @@ main(int argc, const char *argv[]) ecore_main_loop_begin(); libvlc_release(app.libvlc); - ecore_event_handler_del(hld); ecore_shutdown(); eina_shutdown(); - return 0; error: From 8bc5616f004220cea11f390d4be91d888011c869 Mon Sep 17 00:00:00 2001 From: davemds Date: Sun, 16 Feb 2014 22:40:36 +0100 Subject: [PATCH 181/347] Emotion VLC player: debug++ --- .../src/vlc/emotion_generic_vlc.c | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 19078cea18..d0bc23e631 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -50,11 +50,8 @@ struct _App { char *shmname; void *tmpbuffer; int w, h; - // Use Ecore infra for that instead - Ecore_Pipe *fd_read; // read commands from theads here - Ecore_Pipe *fd_write; // write commands from threads here - /* int em_read; // read commands from emotion here */ - /* int em_write; // write commands to emotion here */ + Ecore_Pipe *fd_read; // read commands from emotion here + Ecore_Pipe *fd_write; // write commands for emotion here int size_sent; int opening; int closing; @@ -278,25 +275,32 @@ _event_cb(const struct libvlc_event_t *ev, void *data) switch (ev->type) { case libvlc_MediaPlayerTimeChanged: + DBG("libvlc_MediaPlayerTimeChanged"); _send_time_changed(app, ev); break; case libvlc_MediaPlayerPositionChanged: + DBG("libvlc_MediaPlayerPositionChanged"); _position_changed(app); break; case libvlc_MediaPlayerLengthChanged: + DBG("libvlc_MediaPlayerLengthChanged"); _send_length_changed(app, ev); break; case libvlc_MediaPlayerSeekableChanged: + DBG("libvlc_MediaPlayerSeekableChanged"); _send_seekable_changed(app, ev); break; case libvlc_MediaPlayerPlaying: + DBG("libvlc_MediaPlayerPlaying"); _send_resize(app, app->w, app->h); _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; case libvlc_MediaPlayerStopped: + DBG("libvlc_MediaPlayerStopped"); _send_file_set(app); break; case libvlc_MediaPlayerEndReached: + DBG("libvlc_MediaPlayerEndReached"); app->playing = 0; _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); break; @@ -336,6 +340,7 @@ _tmp_format(void **opaque, char *chroma, lines[0] = lines[1] = lines[2] = *height; _send_resize(app, *width, *height); + DBG("%d %d", *width, *height); return 1; } @@ -405,9 +410,10 @@ _file_set(App *app) } app->opening = 1; - libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); + libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); // needed?? libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); libvlc_video_set_format_callbacks(app->mp, _tmp_format, NULL); + /* On my system the mute below is not working and I can't find a way to make it work, so the following set should help, but then it has other side effect... @@ -420,7 +426,7 @@ _file_set(App *app) libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, _event_cb, app); - app->mevent_mgr = libvlc_media_event_manager(app->m); + app->mevent_mgr = libvlc_media_event_manager(app->m); // needed?? app->tmpbuffer = malloc(sizeof(char) * DEFAULTWIDTH * DEFAULTHEIGHT * 4); libvlc_audio_set_mute(app->mp, 1); @@ -432,6 +438,7 @@ _file_set_done(App *app) { int r; + DBG("Path: %s", app->filename); app->opening = 0; r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); @@ -472,6 +479,7 @@ _file_set_done(App *app) static void _file_close(App *app) { + DBG("Path: %s", app->filename); app->playing = 0; if (app->opening) goto release_resources; @@ -499,6 +507,7 @@ release_resources: static void _stop(App *app) { + DBG("Stop"); if (app->mp) libvlc_media_player_set_pause(app->mp, 1); } @@ -506,6 +515,7 @@ _stop(App *app) static void _play(App *app, float pos) { + DBG("Play at %.3f", pos); if (!app->mp) return; @@ -531,6 +541,7 @@ _position_set(struct _App *app, float position) { libvlc_time_t new_time; + DBG("Posistion set %.3f", position); if (!app->mp) return; @@ -541,6 +552,7 @@ _position_set(struct _App *app, float position) static void _speed_set(App *app, float rate) { + DBG("Speed set %.3f", rate); if (!app->mp) return; @@ -550,6 +562,7 @@ _speed_set(App *app, float rate) static void _mute_set(App *app, int mute) { + DBG("Mute %d", mute); if (!app->mp) return; @@ -561,6 +574,7 @@ _volume_set(App *app, float volume) { int vol; + DBG("Volume set %.2f", volume); if (!app->mp) return; @@ -572,18 +586,21 @@ _volume_set(App *app, float volume) static void _spu_track_set(App *app, int track) { + DBG("SPU track %d", track); libvlc_video_set_spu(app->mp, track); } static void _audio_track_set(App *app, int track) { + DBG("Audio track %d", track); libvlc_audio_set_track(app->mp, track); } static void _video_track_set(App *app, int track) { + DBG("Video Track %d", track); libvlc_video_set_track(app->mp, track); } @@ -698,6 +715,7 @@ _dummy(void *data EINA_UNUSED, void *buffer EINA_UNUSED, unsigned int nbyte EINA Eina_Bool exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) { + DBG("Quit signal received !"); ecore_main_loop_quit(); return EINA_TRUE; } From 56b8834c2044d1106c2921dc8aab0304056ecfb7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 18 Feb 2014 15:39:21 +0100 Subject: [PATCH 182/347] release: Bump version to 1.9.0-beta1 Prepare tarballs for a first beta release. --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 9a572f180d..20fb15f54f 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [alpha1]) +m4_define([relname], [beta1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From d9fc3ba4094e602f66fbd0fa635b3804b06f00f4 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 18 Feb 2014 15:39:40 +0100 Subject: [PATCH 183/347] release: Bump version to 1.9.0-beta1 Prepare tarballs for a first beta release. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 6e7fd1d513..cee4324a53 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [alpha1]) +m4_define([relname], [beta1]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 7536ad4145ced98be2877736a18b971e9944b1d6 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 19 Feb 2014 13:46:47 +0100 Subject: [PATCH 184/347] release: Update NEWS file and add out of date notice to ChangeLog Might not be the final NEWS file but a start which includes all noteworthy changes since 1.8.0. Adding a note to the ChangeLog so people know it will no longer get updated. --- legacy/evas_generic_loaders/ChangeLog | 6 ++++++ legacy/evas_generic_loaders/NEWS | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog index 4e435e67d0..9d3b7f13d2 100644 --- a/legacy/evas_generic_loaders/ChangeLog +++ b/legacy/evas_generic_loaders/ChangeLog @@ -36,3 +36,9 @@ * Add various alarm/signal based timeouts for all generic loaders in case they get stuck + +OUT OF DATE NOTICE: +------------------- +With the start of the 1.9.x release cycle we now longer update the ChangeLog and rely on git log for +this functionality. We keep however a NEWS files for a high level overview of changes in a new +release which will be filled at the end of the release cycle. diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index a5746c24ab..d1e1edb4dd 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,19 @@ -Evas Generic Loaders 1.8.0 +Evas Generic Loaders 1.9.0 + +Changes since Evas Generic Loaders 1.8.0: +----------------------------------------- + +Improvements: + + * gst loader - support key as stream position in 1/1000th of a second + +Fixes: + + * bugfix: add a typefind to gstreamer plugin pipeline + previously, we would load any file and try to force it into video/x-raw-rgb, which was + (obviously) problematic for audio-only files. with a typefind added to the pipeline, only + files which can output to video/x-raw-rgb will be processed + * bugfix: unbreak gstreamer plugin by not using the n-video property which is only available in 1.0+ Changes since Evas Generic Loaders 1.7.0: ----------------------------------------- From 083a6ebb6f894a97550c24e1a6a1f6bb6fa4e027 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 19 Feb 2014 14:08:41 +0100 Subject: [PATCH 185/347] release: Update NEWS file and add out of date notice to ChangeLog Might not be the final NEWS file but a start which includes all noteworthy changes since 1.8.0. Adding a note to the ChangeLog so people know it will no longer get updated. Also clarify README that libvlc >= 2.0 is needed. --- legacy/emotion_generic_players/ChangeLog | 7 +++++++ legacy/emotion_generic_players/NEWS | 18 ++++++++++++++++++ legacy/emotion_generic_players/README | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/ChangeLog b/legacy/emotion_generic_players/ChangeLog index 2d381b5fd9..b1c5ebd34e 100644 --- a/legacy/emotion_generic_players/ChangeLog +++ b/legacy/emotion_generic_players/ChangeLog @@ -3,3 +3,10 @@ * Created the project based on previous emotion/src/generic_players, as it was removed when Emotion was merged into EFL single-tree. + + +OUT OF DATE NOTICE: +------------------- +With the start of the 1.9.x release cycle we now longer update the ChangeLog and rely on git log for +this functionality. We keep however a NEWS files for a high level overview of changes in a new +release which will be filled at the end of the release cycle. diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index e69de29bb2..d6812d2633 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -0,0 +1,18 @@ +Emotion Generic Players 1.9.0 + +Changes since Emotion Generic Players 1.8.0: +-------------------------------------------- + +Improvements: + + * Emotion VLC player: debug++ + * Emotion VLC: cleanup: only changed function order in file. + * Simplify player version dir fallback to match efl 1.9 simplification changes + * Emotion_generic_players - commented out unused func. + +Fixes: + + * Emotion VLC backend: fix pause/stop to work again. + The EM_CMD_STOP command do not have any parameter so it must be + handled in the first call of the pipe. + * Check for libvlc >= 2.0 as a minimum as we use 2.x funcs diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README index 698ec51e25..783fe37d53 100644 --- a/legacy/emotion_generic_players/README +++ b/legacy/emotion_generic_players/README @@ -31,7 +31,7 @@ conflicting licenses with GPL, LGPL or even proprietary code. REQUIREMENTS ------------ - * vlc (libvlc) + * vlc (libvlc >= 2.0) COMPONENTS From a30d3e2f418f621c8f0faab94baf385233a546f0 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 20 Feb 2014 12:08:19 +0100 Subject: [PATCH 186/347] AUTHORS: Fill in authors from git log to AUTHORS list --- legacy/evas_generic_loaders/AUTHORS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/legacy/evas_generic_loaders/AUTHORS b/legacy/evas_generic_loaders/AUTHORS index 2538a1a39b..6dc53f580d 100644 --- a/legacy/evas_generic_loaders/AUTHORS +++ b/legacy/evas_generic_loaders/AUTHORS @@ -3,3 +3,13 @@ Christian Kreibich Vincent Torri Michael Bouchaud Fanina "cippp" Cristian +Cedric BAIL +Jérémy Zurcher +Stefan Schmidt +Daniel Juyung Seo +Doug Newgard +Mike Blumenkrantz +Alex-P. Natsios +Jihoon Kim +Samuel F. Baggen +Sebastian Dransfeld From de53992f066c261a6a8c8a60f884c3e76bdbbf8f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 20 Feb 2014 12:12:32 +0100 Subject: [PATCH 187/347] AUTHORS: Fill in authors from git log --- legacy/emotion_generic_players/AUTHORS | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/AUTHORS b/legacy/emotion_generic_players/AUTHORS index 3270ec5387..e64ccfdaad 100644 --- a/legacy/emotion_generic_players/AUTHORS +++ b/legacy/emotion_generic_players/AUTHORS @@ -6,4 +6,15 @@ Leandro Dorileo Pierre Le Magourou Rafael Antognolli Sohyun Kim - +Carsten Haitzler (Rasterman) +davemds +Gustavo Sverzut Barbieri +Stefan Schmidt +Bruno Dilly +ChunEon Park +Daniel Juyung Seo +Doug Newgard +Jerome Pinot +Mike Blumenkrantz +Sebastian Dransfeld +Vincent Torri From 341565b0d9591578d7a3033fd261d5b11aace8dc Mon Sep 17 00:00:00 2001 From: davemds Date: Thu, 20 Feb 2014 22:45:16 +0100 Subject: [PATCH 188/347] Emotion VLC: remove quite all the old hacks. This commit remove all the hacks that was there on the loading stage. Instead of using the tmp format callback system now simply connect to the MediaPlayerPlaying event on first startup and pause the video as soon as it start. No more need for the tmp buffer allocation and the delayed stop using idler. All this fix the first outstanding bug: audio was audible on start (before the real play command from emotion) --- .../src/vlc/emotion_generic_vlc.c | 249 ++++++------------ 1 file changed, 76 insertions(+), 173 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index d0bc23e631..b9a0aabc82 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -29,32 +29,24 @@ static int _em_vlc_log_dom = -1; #define WRN(...) EINA_LOG_DOM_WARN(_em_vlc_log_dom, __VA_ARGS__) #define CRIT(...) EINA_LOG_DOM_CRIT(_em_vlc_log_dom, __VA_ARGS__) -enum _Thread_Events { - EM_THREAD_POSITION_CHANGED, - EM_THREAD_PLAYBACK_STARTED, - EM_THREAD_PLAYBACK_STOPPED, - EM_THREAD_LAST -}; typedef struct _App App; struct _App { Emotion_Generic_Video_Shared *vs; Emotion_Generic_Video_Frame vf; + libvlc_instance_t *libvlc; libvlc_media_t *m; libvlc_media_player_t *mp; libvlc_event_manager_t *event_mgr; - libvlc_event_manager_t *mevent_mgr; + char *filename; char *subtitle_path; char *shmname; - void *tmpbuffer; - int w, h; + unsigned w, h; Ecore_Pipe *fd_read; // read commands from emotion here Ecore_Pipe *fd_write; // write commands for emotion here - int size_sent; int opening; - int closing; int playing; int last_order; @@ -94,8 +86,6 @@ _send_cmd_str(App *app, const char *str) static void _send_file_closed(App *app) { - app->closing = 0; - emotion_generic_shm_free(app->vs); _send_cmd(app, EM_RESULT_FILE_CLOSE); } @@ -193,11 +183,11 @@ _send_all_meta_info(struct _App *app) } static void -_send_length_changed(struct _App *app, const struct libvlc_event_t *ev) +_send_length_changed(struct _App *app) { - float length = ev->u.media_player_length_changed.new_length; - length /= 1000; + float length = libvlc_media_player_get_length(app->mp); + length /= 1000; _send_cmd(app, EM_RESULT_LENGTH_CHANGED); SEND_CMD_PARAM(app, length); } @@ -211,61 +201,6 @@ _send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) SEND_CMD_PARAM(app, seekable); } -static void -_send_file_set(struct _App *app) -{ - if (app->opening) - _send_cmd(app, EM_RESULT_FILE_SET); - - if (app->closing) - _send_file_closed(app); -} - - -/* libvlc */ -static Eina_Bool -_loaded_idler(void *data) -{ - App *app = data; - - if (app->mp) - libvlc_media_player_stop(app->mp); - - return EINA_FALSE; -} - -static void -_position_changed(App *app) -{ - int r; - unsigned int w, h; - - if (!app->opening) - return; - - /* sending size info only once */ - r = libvlc_video_get_size(app->mp, 0, &w, &h); - if (r < 0) - { - w = 1; - h = 1; - } - - if (w > 0 || h > 0) - { - _send_resize(app, w, h); - app->size_sent = 1; - } - - /* sending audio track info */ - _send_all_track_info(app); - - /* sending meta info */ - _send_all_meta_info(app); - - ecore_idler_add(_loaded_idler, app); -} - static void _event_cb(const struct libvlc_event_t *ev, void *data) { @@ -278,13 +213,9 @@ _event_cb(const struct libvlc_event_t *ev, void *data) DBG("libvlc_MediaPlayerTimeChanged"); _send_time_changed(app, ev); break; - case libvlc_MediaPlayerPositionChanged: - DBG("libvlc_MediaPlayerPositionChanged"); - _position_changed(app); - break; case libvlc_MediaPlayerLengthChanged: DBG("libvlc_MediaPlayerLengthChanged"); - _send_length_changed(app, ev); + _send_length_changed(app); break; case libvlc_MediaPlayerSeekableChanged: DBG("libvlc_MediaPlayerSeekableChanged"); @@ -292,12 +223,12 @@ _event_cb(const struct libvlc_event_t *ev, void *data) break; case libvlc_MediaPlayerPlaying: DBG("libvlc_MediaPlayerPlaying"); - _send_resize(app, app->w, app->h); + _send_resize(app, app->w, app->h); // THIS IS WRONG BUT NEEDED...check in emotion why! _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; case libvlc_MediaPlayerStopped: DBG("libvlc_MediaPlayerStopped"); - _send_file_set(app); + _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); break; case libvlc_MediaPlayerEndReached: DBG("libvlc_MediaPlayerEndReached"); @@ -308,51 +239,39 @@ _event_cb(const struct libvlc_event_t *ev, void *data) ecore_thread_main_loop_end(); } -static void * -_tmp_lock(void *data, void **pixels) + +static void +_tmp_playing_event_cb(const struct libvlc_event_t *ev, void *data) { App *app = data; - *pixels = app->tmpbuffer; - return NULL; + + if (ev->type != libvlc_MediaPlayerPlaying) + return; + + /* pause and stop listening the temporary event */ + libvlc_event_detach(app->event_mgr,libvlc_MediaPlayerPlaying, + _tmp_playing_event_cb, app); + libvlc_media_player_set_pause(app->mp, 1); + + /* sending size info */ + libvlc_video_get_size(app->mp, 0, &app->w, &app->h); + _send_resize(app, app->w, app->h); + + /* sending total lenght */ + _send_length_changed(app); + + /* sending audio track info */ + _send_all_track_info(app); + + /* sending meta info */ + _send_all_meta_info(app); + + /* ok, we are done! Now let emotion create the shmem for us */ + _send_cmd(app, EM_RESULT_FILE_SET); + + ERR("libvlc_MediaPlayerPlaying %d %d", app->w, app->h); } -static void -_tmp_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) -{ -} - -static void -_tmp_display(void *data EINA_UNUSED, void *id EINA_UNUSED) -{ -} - -static unsigned -_tmp_format(void **opaque, char *chroma, - unsigned *width, unsigned *height, - unsigned *pitches, unsigned *lines) -{ - App *app = *opaque; - - app->tmpbuffer = realloc(app->tmpbuffer, - *width * *height * 4 * sizeof (char)); - strcpy(chroma, "RV32"); - pitches[0] = pitches[1] = pitches[2] = *width * 4; - lines[0] = lines[1] = lines[2] = *height; - - _send_resize(app, *width, *height); - DBG("%d %d", *width, *height); - - return 1; -} - -/* -static void -_tmp_play(void *data EINA_UNUSED, - const void *samples EINA_UNUSED, unsigned count EINA_UNUSED, - int64_t pts EINA_UNUSED) -{ -} -*/ static void * _lock(void *data, void **pixels) @@ -410,26 +329,14 @@ _file_set(App *app) } app->opening = 1; - libvlc_video_set_format(app->mp, "RV32", DEFAULTWIDTH, DEFAULTHEIGHT, DEFAULTWIDTH * 4); // needed?? - libvlc_video_set_callbacks(app->mp, _tmp_lock, _tmp_unlock, _tmp_display, app); - libvlc_video_set_format_callbacks(app->mp, _tmp_format, NULL); - - /* On my system the mute below is not working and I can't find a way - to make it work, so the following set should help, but then it has - other side effect... - */ - /* libvlc_audio_set_callbacks(app->mp, _tmp_play, NULL, NULL, NULL, NULL, app); */ + /* Here we start playing and connect a temporary callback to know when + * the file is parsed and ready to be played for real. + */ app->event_mgr = libvlc_media_player_event_manager(app->mp); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, - _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _tmp_playing_event_cb, app); - app->mevent_mgr = libvlc_media_event_manager(app->m); // needed?? - - app->tmpbuffer = malloc(sizeof(char) * DEFAULTWIDTH * DEFAULTHEIGHT * 4); - libvlc_audio_set_mute(app->mp, 1); libvlc_media_player_play(app->mp); } @@ -450,27 +357,27 @@ _file_set_done(App *app) app->filename = NULL; app->m = NULL; app->mp = NULL; - - _send_cmd(app, EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(app, r); } - app->w = app->vs->width; - app->h = app->vs->height; - libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); - libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); + else + { + libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); + libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, - _event_cb, app); - - libvlc_audio_set_mute(app->mp, 0); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, + _event_cb, app); + } _send_cmd(app, EM_RESULT_FILE_SET_DONE); SEND_CMD_PARAM(app, r); @@ -479,29 +386,24 @@ _file_set_done(App *app) static void _file_close(App *app) { - DBG("Path: %s", app->filename); + DBG("closing file"); + + if (!app->mp) + return; + app->playing = 0; - if (app->opening) - goto release_resources; - - if (libvlc_media_player_get_state(app->mp) != libvlc_Playing) - { - _send_file_closed(app); - return; - } - - app->closing = 1; - -release_resources: libvlc_media_player_stop(app->mp); - if (app->filename) - free(app->filename); + + free(app->filename); + free(app->subtitle_path); if (app->mp) { libvlc_media_release(app->m); libvlc_media_player_release(app->mp); - free(app->tmpbuffer); } + emotion_generic_shm_free(app->vs); + + _send_file_closed(app); } static void @@ -516,6 +418,7 @@ static void _play(App *app, float pos) { DBG("Play at %.3f", pos); + if (!app->mp) return; @@ -779,16 +682,16 @@ main(int argc, const char *argv[]) app.subtitle_path = NULL; app.w = 0; app.h = 0; - app.size_sent = 0; app.opening = 0; app.playing = 0; - app.closing = 0; app.last_order = EM_CMD_LAST; app.inited = EINA_FALSE; ecore_main_loop_begin(); libvlc_release(app.libvlc); + ecore_pipe_del(app.fd_read); + ecore_pipe_del(app.fd_write); ecore_event_handler_del(hld); ecore_shutdown(); From d9bc6b6ad0a6c9ca1459f27a826c1526ee67b460 Mon Sep 17 00:00:00 2001 From: davemds Date: Thu, 20 Feb 2014 23:00:20 +0100 Subject: [PATCH 189/347] Emotion VLC: no more need to send the size twice. --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index b9a0aabc82..069d04bb19 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -223,7 +223,6 @@ _event_cb(const struct libvlc_event_t *ev, void *data) break; case libvlc_MediaPlayerPlaying: DBG("libvlc_MediaPlayerPlaying"); - _send_resize(app, app->w, app->h); // THIS IS WRONG BUT NEEDED...check in emotion why! _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; case libvlc_MediaPlayerStopped: @@ -268,8 +267,6 @@ _tmp_playing_event_cb(const struct libvlc_event_t *ev, void *data) /* ok, we are done! Now let emotion create the shmem for us */ _send_cmd(app, EM_RESULT_FILE_SET); - - ERR("libvlc_MediaPlayerPlaying %d %d", app->w, app->h); } From 52777310e7502721c26d76fa9a54993a1e4bfcd0 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 21 Feb 2014 14:37:49 +0100 Subject: [PATCH 190/347] release: Bump version to 1.9.0-beta2 Second and most likely last beta release before the 1.9 final. Give it a good testing over the weekend. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index cee4324a53..a10a15db61 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [beta1]) +m4_define([relname], [beta2]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 0affdc76302bb3126b5dc435f10af2ed538f1ea7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 21 Feb 2014 14:45:44 +0100 Subject: [PATCH 191/347] release: Bump version to 1.9.0-beta2 Second and most likely last beta release before the 1.9 final. Give it a good testing over the weekend. --- legacy/emotion_generic_players/NEWS | 3 +++ legacy/emotion_generic_players/configure.ac | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index d6812d2633..d66fd760b6 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -9,6 +9,7 @@ Improvements: * Emotion VLC: cleanup: only changed function order in file. * Simplify player version dir fallback to match efl 1.9 simplification changes * Emotion_generic_players - commented out unused func. + * Emotion VLC: no more need to send the size twice. Fixes: @@ -16,3 +17,5 @@ Fixes: The EM_CMD_STOP command do not have any parameter so it must be handled in the first call of the pipe. * Check for libvlc >= 2.0 as a minimum as we use 2.x funcs + * Emotion VLC: remove quite all the old hacks from loading stage which fixes the problem that + audio was audible on start diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 20fb15f54f..cc603e0b92 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [beta1]) +m4_define([relname], [beta2]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 59a9ddb93a006a9c564a40dbe802c152fce89119 Mon Sep 17 00:00:00 2001 From: davemds Date: Fri, 21 Feb 2014 20:54:08 +0100 Subject: [PATCH 192/347] Emotion VLC: fix the volume/mute bug. Set again the volume and the mute state every time the video start to play, this fix the setting of the volume/mute before the complete loading of the file. --- .../src/vlc/emotion_generic_vlc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 069d04bb19..fbc8bb301b 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -48,6 +48,8 @@ struct _App { Ecore_Pipe *fd_write; // write commands for emotion here int opening; int playing; + int volume; + Eina_Bool audio_muted; int last_order; @@ -223,6 +225,8 @@ _event_cb(const struct libvlc_event_t *ev, void *data) break; case libvlc_MediaPlayerPlaying: DBG("libvlc_MediaPlayerPlaying"); + libvlc_audio_set_volume(app->mp, app->volume); + libvlc_audio_set_mute(app->mp, app->audio_muted); _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); break; case libvlc_MediaPlayerStopped: @@ -466,21 +470,19 @@ _mute_set(App *app, int mute) if (!app->mp) return; + app->audio_muted = mute; libvlc_audio_set_mute(app->mp, mute); } static void _volume_set(App *app, float volume) { - int vol; - DBG("Volume set %.2f", volume); if (!app->mp) return; - vol = volume * 100; - - libvlc_audio_set_volume(app->mp, vol); + app->volume = volume * 100; + libvlc_audio_set_volume(app->mp, app->volume); } static void From fb46a014f0c0ab4a807f8349eafb9b29e7d9cf6c Mon Sep 17 00:00:00 2001 From: davemds Date: Sat, 22 Feb 2014 11:26:40 +0100 Subject: [PATCH 193/347] Emotion VLC: recreate the player when end reached. Fix the restart-play-when-end-reached bug. --- .../src/vlc/emotion_generic_vlc.c | 48 +++++++++++-------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index fbc8bb301b..177f9f728e 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -56,6 +56,7 @@ struct _App { Eina_Bool inited; }; +static void _player_setup(App *app); /* Commands sent to the emotion pipe */ #define SEND_CMD_PARAM(app, i) \ @@ -212,7 +213,7 @@ _event_cb(const struct libvlc_event_t *ev, void *data) switch (ev->type) { case libvlc_MediaPlayerTimeChanged: - DBG("libvlc_MediaPlayerTimeChanged"); + // DBG("libvlc_MediaPlayerTimeChanged"); _send_time_changed(app, ev); break; case libvlc_MediaPlayerLengthChanged: @@ -236,13 +237,15 @@ _event_cb(const struct libvlc_event_t *ev, void *data) case libvlc_MediaPlayerEndReached: DBG("libvlc_MediaPlayerEndReached"); app->playing = 0; + /* vlc had released the media_playere here, we create a new one */ + app->mp = libvlc_media_player_new_from_media(app->m); + _player_setup(app); _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); break; } ecore_thread_main_loop_end(); } - static void _tmp_playing_event_cb(const struct libvlc_event_t *ev, void *data) { @@ -309,6 +312,29 @@ _display(void *data, void *id EINA_UNUSED) eina_semaphore_release(&app->vs->lock, 1); } +static void +_player_setup(App *app) +{ + + libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); + libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); + + app->event_mgr = libvlc_media_player_event_manager(app->mp); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, + _event_cb, app); +} /* Commands received from the emotion pipe */ static void @@ -361,23 +387,7 @@ _file_set_done(App *app) } else { - libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); - libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); - - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, - _event_cb, app); + _player_setup(app); } _send_cmd(app, EM_RESULT_FILE_SET_DONE); From 2e0fd02ec56af61383146a6f043bc8597fceb70d Mon Sep 17 00:00:00 2001 From: davemds Date: Sat, 22 Feb 2014 11:48:58 +0100 Subject: [PATCH 194/347] Emotion VLC: we have a typedef for 'struct _App'. Use it. --- .../src/vlc/emotion_generic_vlc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 177f9f728e..f15d718843 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -93,7 +93,7 @@ _send_file_closed(App *app) } static void -_send_time_changed(struct _App *app, const struct libvlc_event_t *ev) +_send_time_changed(App *app, const struct libvlc_event_t *ev) { float new_time = ev->u.media_player_time_changed.new_time; @@ -105,7 +105,7 @@ _send_time_changed(struct _App *app, const struct libvlc_event_t *ev) } static void -_send_resize(struct _App *app, int width, int height) +_send_resize(App *app, int width, int height) { _send_cmd(app, EM_RESULT_FRAME_SIZE); SEND_CMD_PARAM(app, width); @@ -113,7 +113,7 @@ _send_resize(struct _App *app, int width, int height) } static void -_send_track_info(struct _App *app, int cmd, int current, int count, libvlc_track_description_t *desc) +_send_track_info(App *app, int cmd, int current, int count, libvlc_track_description_t *desc) { _send_cmd(app, cmd); SEND_CMD_PARAM(app, current); @@ -129,7 +129,7 @@ _send_track_info(struct _App *app, int cmd, int current, int count, libvlc_track } static void -_send_all_track_info(struct _App *app) +_send_all_track_info(App *app) { int track_count, current; libvlc_track_description_t *desc; @@ -157,7 +157,7 @@ _send_all_track_info(struct _App *app) } static void -_send_all_meta_info(struct _App *app) +_send_all_meta_info(App *app) { const char *meta; @@ -186,7 +186,7 @@ _send_all_meta_info(struct _App *app) } static void -_send_length_changed(struct _App *app) +_send_length_changed(App *app) { float length = libvlc_media_player_get_length(app->mp); @@ -196,7 +196,7 @@ _send_length_changed(struct _App *app) } static void -_send_seekable_changed(struct _App *app, const struct libvlc_event_t *ev) +_send_seekable_changed(App *app, const struct libvlc_event_t *ev) { int seekable = ev->u.media_player_seekable_changed.new_seekable; @@ -451,7 +451,7 @@ _play(App *app, float pos) } static void -_position_set(struct _App *app, float position) +_position_set(App *app, float position) { libvlc_time_t new_time; From d9b0d0c146729539413d8e79f7e081c1ca813cd9 Mon Sep 17 00:00:00 2001 From: davemds Date: Sat, 22 Feb 2014 12:12:12 +0100 Subject: [PATCH 195/347] Emotion VLC: defer the resource free until the video is actually stopped. Fix vlc complainig on shutdown. --- .../src/vlc/emotion_generic_vlc.c | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index f15d718843..70a8255b94 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -47,6 +47,7 @@ struct _App { Ecore_Pipe *fd_read; // read commands from emotion here Ecore_Pipe *fd_write; // write commands for emotion here int opening; + int closing; int playing; int volume; Eina_Bool audio_muted; @@ -233,6 +234,21 @@ _event_cb(const struct libvlc_event_t *ev, void *data) case libvlc_MediaPlayerStopped: DBG("libvlc_MediaPlayerStopped"); _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + if (app->closing) + { + free(app->filename); + app->filename = NULL; + free(app->subtitle_path); + app->subtitle_path = NULL; + libvlc_media_release(app->m); + app->m = NULL; + libvlc_media_player_release(app->mp); + app->mp = NULL; + emotion_generic_shm_free(app->vs); + app->playing = 0; + app->closing = 0; + _send_file_closed(app); + } break; case libvlc_MediaPlayerEndReached: DBG("libvlc_MediaPlayerEndReached"); @@ -402,19 +418,8 @@ _file_close(App *app) if (!app->mp) return; - app->playing = 0; + app->closing = 1; libvlc_media_player_stop(app->mp); - - free(app->filename); - free(app->subtitle_path); - if (app->mp) - { - libvlc_media_release(app->m); - libvlc_media_player_release(app->mp); - } - emotion_generic_shm_free(app->vs); - - _send_file_closed(app); } static void From e20f0a2418ffcb5d2694ad2eefe7f6991167bf5c Mon Sep 17 00:00:00 2001 From: davemds Date: Sat, 22 Feb 2014 12:19:34 +0100 Subject: [PATCH 196/347] Emotion VLC: use Eina_Bool instead of int for bools. And reorder members in the App struct. --- .../src/vlc/emotion_generic_vlc.c | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 70a8255b94..fb0d0cac5d 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -40,20 +40,20 @@ struct _App { libvlc_media_player_t *mp; libvlc_event_manager_t *event_mgr; + Ecore_Pipe *fd_read; // read commands from emotion here + Ecore_Pipe *fd_write; // write commands for emotion here + int last_order; // current command received from emotion + char *filename; char *subtitle_path; char *shmname; unsigned w, h; - Ecore_Pipe *fd_read; // read commands from emotion here - Ecore_Pipe *fd_write; // write commands for emotion here - int opening; - int closing; - int playing; int volume; Eina_Bool audio_muted; - int last_order; - + Eina_Bool opening; + Eina_Bool closing; + Eina_Bool playing; Eina_Bool inited; }; @@ -245,14 +245,14 @@ _event_cb(const struct libvlc_event_t *ev, void *data) libvlc_media_player_release(app->mp); app->mp = NULL; emotion_generic_shm_free(app->vs); - app->playing = 0; - app->closing = 0; + app->playing = EINA_FALSE; + app->closing = EINA_FALSE; _send_file_closed(app); } break; case libvlc_MediaPlayerEndReached: DBG("libvlc_MediaPlayerEndReached"); - app->playing = 0; + app->playing = EINA_FALSE; /* vlc had released the media_playere here, we create a new one */ app->mp = libvlc_media_player_new_from_media(app->m); _player_setup(app); @@ -371,7 +371,7 @@ _file_set(App *app) return; } - app->opening = 1; + app->opening = EINA_TRUE; /* Here we start playing and connect a temporary callback to know when * the file is parsed and ready to be played for real. @@ -389,7 +389,7 @@ _file_set_done(App *app) int r; DBG("Path: %s", app->filename); - app->opening = 0; + app->opening = EINA_FALSE; r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); if (!r) @@ -418,7 +418,7 @@ _file_close(App *app) if (!app->mp) return; - app->closing = 1; + app->closing = EINA_TRUE; libvlc_media_player_stop(app->mp); } @@ -451,7 +451,7 @@ _play(App *app, float pos) if (app->subtitle_path) libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); - app->playing = 1; + app->playing = EINA_TRUE; } } @@ -559,7 +559,7 @@ _remote_command(void *data, void *buffer, unsigned int nbyte) libvlc_media_release(app->m); libvlc_media_player_release(app->mp); free(app->filename); - app->opening = 0; + app->opening = EINA_FALSE; } break; case EM_CMD_FILE_SET_DONE: @@ -696,10 +696,10 @@ main(int argc, const char *argv[]) app.subtitle_path = NULL; app.w = 0; app.h = 0; - app.opening = 0; - app.playing = 0; - app.last_order = EM_CMD_LAST; + app.opening = EINA_FALSE; + app.playing = EINA_FALSE; app.inited = EINA_FALSE; + app.last_order = EM_CMD_LAST; ecore_main_loop_begin(); From 3539f5c882b5ed64d541cbd5b09bb8fce38c6d1c Mon Sep 17 00:00:00 2001 From: davemds Date: Sat, 22 Feb 2014 13:03:52 +0100 Subject: [PATCH 197/347] Emotion VLC: fix send position_change while paused. VLC does not emit the TimeChanged event while the video is paused, so if the user change position while paused emotion is not aware of the change. This commit force the event to emotion if the video is paused --- .../src/vlc/emotion_generic_vlc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index fb0d0cac5d..02d25ec42a 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -94,13 +94,15 @@ _send_file_closed(App *app) } static void -_send_time_changed(App *app, const struct libvlc_event_t *ev) +_send_time_changed(App *app) { - float new_time = ev->u.media_player_time_changed.new_time; + float new_time; - new_time /= 1000; if (app->vs->frame_drop > 1) return; + + new_time = libvlc_media_player_get_time(app->mp); + new_time /= 1000; _send_cmd(app, EM_RESULT_POSITION_CHANGED); SEND_CMD_PARAM(app, new_time); } @@ -215,7 +217,7 @@ _event_cb(const struct libvlc_event_t *ev, void *data) { case libvlc_MediaPlayerTimeChanged: // DBG("libvlc_MediaPlayerTimeChanged"); - _send_time_changed(app, ev); + _send_time_changed(app); break; case libvlc_MediaPlayerLengthChanged: DBG("libvlc_MediaPlayerLengthChanged"); @@ -460,12 +462,15 @@ _position_set(App *app, float position) { libvlc_time_t new_time; - DBG("Posistion set %.3f", position); + DBG("Position set %.3f", position); if (!app->mp) return; new_time = position * 1000; libvlc_media_player_set_time(app->mp, new_time); + + if (libvlc_media_player_get_state(app->mp) == libvlc_Paused) + _send_time_changed(app); } static void From 4286857217bd510da99d5104ec5a3633018443dc Mon Sep 17 00:00:00 2001 From: davemds Date: Sat, 22 Feb 2014 15:46:06 +0100 Subject: [PATCH 198/347] unify the usage of my name --- legacy/emotion_generic_players/AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/AUTHORS b/legacy/emotion_generic_players/AUTHORS index e64ccfdaad..e7965e98cb 100644 --- a/legacy/emotion_generic_players/AUTHORS +++ b/legacy/emotion_generic_players/AUTHORS @@ -7,7 +7,7 @@ Pierre Le Magourou Rafael Antognolli Sohyun Kim Carsten Haitzler (Rasterman) -davemds +Davide Andreoli Gustavo Sverzut Barbieri Stefan Schmidt Bruno Dilly From fd729745626615fc68d8d2dc6a95b66e1e67253a Mon Sep 17 00:00:00 2001 From: davemds Date: Sun, 23 Feb 2014 11:49:42 +0100 Subject: [PATCH 199/347] Emotion VLC: fix the random-player-stop bug !! Bug explanation: VLC has 2 different async mechanism that we use, one is the event callback system that report player status changes and one is the display func that is called at every frame. They run independently and can occur "at the same time". We use ecore_pipe_write() in both and the result is that occasionally we send to the pipe 2 commands mixed togheter (the FRAME_NEW and the LENGTH_CHANGED). So emotion (on the other side of the pipe) receive a wrong command and stop the player. The fix: Use a mutex (Eina_Lock) while sending commands to the pipe so that we can send 2 commands "at the same time". The SPANK credits: BIG BIG SPANK goes to cedric (of course) that removed the command lock mechanism in revision 10ebda80419 --- .../src/vlc/emotion_generic_vlc.c | 91 ++++++++++++++++--- 1 file changed, 76 insertions(+), 15 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 02d25ec42a..3f90bd7b22 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -42,6 +42,7 @@ struct _App { Ecore_Pipe *fd_read; // read commands from emotion here Ecore_Pipe *fd_write; // write commands for emotion here + Eina_Lock cmd_mutex;// lock used to send just one command at a time int last_order; // current command received from emotion char *filename; @@ -59,7 +60,8 @@ struct _App { static void _player_setup(App *app); -/* Commands sent to the emotion pipe */ + +/* Utilities to send commands back to emotion */ #define SEND_CMD_PARAM(app, i) \ if ((app)->fd_write) \ if (!ecore_pipe_write((app)->fd_write, &(i), sizeof((i)))) \ @@ -68,9 +70,13 @@ static void _player_setup(App *app); static void _send_cmd(App *app, int cmd) { - if (app->fd_write) - if (!ecore_pipe_write(app->fd_write, &cmd, sizeof(cmd))) - ecore_main_loop_quit(); + if (!app->fd_write) + return; + + eina_lock_take(&app->cmd_mutex); /* LOCK HERE */ + + if (!ecore_pipe_write(app->fd_write, &cmd, sizeof(cmd))) + ecore_main_loop_quit(); } static void @@ -87,10 +93,18 @@ _send_cmd_str(App *app, const char *str) ecore_main_loop_quit(); } +static void +_send_cmd_finish(App *app) +{ + eina_lock_release(&app->cmd_mutex); /* UNLOCK HERE */ +} + +/* Commands sent to the emotion pipe */ static void _send_file_closed(App *app) { _send_cmd(app, EM_RESULT_FILE_CLOSE); + _send_cmd_finish(app); } static void @@ -105,6 +119,7 @@ _send_time_changed(App *app) new_time /= 1000; _send_cmd(app, EM_RESULT_POSITION_CHANGED); SEND_CMD_PARAM(app, new_time); + _send_cmd_finish(app); } static void @@ -113,6 +128,7 @@ _send_resize(App *app, int width, int height) _send_cmd(app, EM_RESULT_FRAME_SIZE); SEND_CMD_PARAM(app, width); SEND_CMD_PARAM(app, height); + _send_cmd_finish(app); } static void @@ -129,6 +145,7 @@ _send_track_info(App *app, int cmd, int current, int count, libvlc_track_descrip _send_cmd_str(app, name); desc = desc->p_next; } + _send_cmd_finish(app); } static void @@ -186,6 +203,8 @@ _send_all_meta_info(App *app) _send_cmd_str(app, meta); meta = libvlc_media_get_meta(app->m, libvlc_meta_TrackNumber); _send_cmd_str(app, meta); + + _send_cmd_finish(app); } static void @@ -196,6 +215,7 @@ _send_length_changed(App *app) length /= 1000; _send_cmd(app, EM_RESULT_LENGTH_CHANGED); SEND_CMD_PARAM(app, length); + _send_cmd_finish(app); } static void @@ -205,8 +225,47 @@ _send_seekable_changed(App *app, const struct libvlc_event_t *ev) _send_cmd(app, EM_RESULT_SEEKABLE_CHANGED); SEND_CMD_PARAM(app, seekable); + _send_cmd_finish(app); } +static void +_send_playback_started(App *app) +{ + _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); + _send_cmd_finish(app); +} + +static void +_send_playback_stopped(App *app) +{ + _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + _send_cmd_finish(app); +} + +static void +_send_init(App *app) +{ + _send_cmd(app, EM_RESULT_INIT); + _send_cmd_finish(app); +} + +static void +_send_file_set(App *app) +{ + _send_cmd(app, EM_RESULT_FILE_SET); + _send_cmd_finish(app); +} + +static void +_send_file_set_done(App *app, int success) +{ + _send_cmd(app, EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(app, success); + _send_cmd_finish(app); +} + + +/* VLC events and callbacks */ static void _event_cb(const struct libvlc_event_t *ev, void *data) { @@ -231,11 +290,11 @@ _event_cb(const struct libvlc_event_t *ev, void *data) DBG("libvlc_MediaPlayerPlaying"); libvlc_audio_set_volume(app->mp, app->volume); libvlc_audio_set_mute(app->mp, app->audio_muted); - _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); + _send_playback_started(app); break; case libvlc_MediaPlayerStopped: DBG("libvlc_MediaPlayerStopped"); - _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + _send_playback_stopped(app); if (app->closing) { free(app->filename); @@ -258,7 +317,7 @@ _event_cb(const struct libvlc_event_t *ev, void *data) /* vlc had released the media_playere here, we create a new one */ app->mp = libvlc_media_player_new_from_media(app->m); _player_setup(app); - _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + _send_playback_stopped(app); break; } ecore_thread_main_loop_end(); @@ -291,10 +350,9 @@ _tmp_playing_event_cb(const struct libvlc_event_t *ev, void *data) _send_all_meta_info(app); /* ok, we are done! Now let emotion create the shmem for us */ - _send_cmd(app, EM_RESULT_FILE_SET); + _send_file_set(app); } - static void * _lock(void *data, void **pixels) { @@ -326,7 +384,10 @@ _display(void *data, void *id EINA_UNUSED) app->vs->frame.player = app->vs->frame.next; app->vs->frame.next = app->vs->frame.last; if (!app->vs->frame_drop++) - _send_cmd(app, EM_RESULT_FRAME_NEW); + { + _send_cmd(app, EM_RESULT_FRAME_NEW); + _send_cmd_finish(app); + } eina_semaphore_release(&app->vs->lock, 1); } @@ -348,8 +409,6 @@ _player_setup(App *app) _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPositionChanged, - _event_cb, app); libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, _event_cb, app); } @@ -408,8 +467,7 @@ _file_set_done(App *app) _player_setup(app); } - _send_cmd(app, EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(app, r); + _send_file_set_done(app, r); } static void @@ -588,7 +646,7 @@ _remote_command(void *data, void *buffer, unsigned int nbyte) case EM_CMD_INIT: app->shmname = strdup(buffer); app->inited = EINA_TRUE; - _send_cmd(app, EM_RESULT_INIT); + _send_init(app); break; case EM_CMD_FILE_SET: app->filename = strdup(buffer); @@ -688,6 +746,8 @@ main(int argc, const char *argv[]) ecore_init(); + eina_lock_new(&app.cmd_mutex); + app.fd_read = ecore_pipe_full_add(_remote_command, &app, atoi(argv[1]), -1, EINA_FALSE, EINA_FALSE); app.fd_write = ecore_pipe_full_add(_dummy, NULL, @@ -712,6 +772,7 @@ main(int argc, const char *argv[]) ecore_pipe_del(app.fd_read); ecore_pipe_del(app.fd_write); ecore_event_handler_del(hld); + eina_lock_free(&app.cmd_mutex); ecore_shutdown(); eina_shutdown(); From 7c77281b8fc9cfb8750c68579ba8b23fd4d36684 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 24 Feb 2014 16:57:52 +0100 Subject: [PATCH 200/347] Release version 1.9.0 --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index a10a15db61..55a3675057 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [beta2]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 79ccf66a5cc55d57a4718084d50545968e6aee4c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 24 Feb 2014 17:04:06 +0100 Subject: [PATCH 201/347] Release version 1.9.0 --- legacy/emotion_generic_players/NEWS | 6 ++++++ legacy/emotion_generic_players/configure.ac | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index d66fd760b6..bdebc48bf9 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -10,6 +10,8 @@ Improvements: * Simplify player version dir fallback to match efl 1.9 simplification changes * Emotion_generic_players - commented out unused func. * Emotion VLC: no more need to send the size twice. + * Emotion VLC: use Eina_Bool instead of int for bools. + * Emotion VLC: defer the resource free until the video is actually stopped. Fixes: @@ -19,3 +21,7 @@ Fixes: * Check for libvlc >= 2.0 as a minimum as we use 2.x funcs * Emotion VLC: remove quite all the old hacks from loading stage which fixes the problem that audio was audible on start + * Emotion VLC: fix the random-player-stop bug !! + * Emotion VLC: fix send position_change while paused. + * Emotion VLC: recreate the player when end reached. + * Emotion VLC: fix the volume/mute bug. diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index cc603e0b92..a079f33c78 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -7,7 +7,7 @@ dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || ech ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [beta2]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 4347c174bd3259ef76935d94c60d3606bd47897f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 26 Feb 2014 09:32:44 +0100 Subject: [PATCH 202/347] configure: Bump version to 1.9.99 to indicate development cycle 1.9 is released and the master branch is now in development mode again. Make sure the version indicates that. --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 55a3675057..973e89ed17 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,7 +2,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [9]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) From f44914a730a4e981e3f164f45919ac97bf9a3f16 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 26 Feb 2014 09:34:38 +0100 Subject: [PATCH 203/347] configure: Bump version to 1.9.99 to indicate development cycle 1.9 is released and the master branch is now in development mode again. Make sure the version indicates that. --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index a079f33c78..4bb4d157e5 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,7 +2,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [9]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) From 3e9bfb7924d14883097dee073632a0cc863295c3 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 7 Mar 2014 16:11:32 +0900 Subject: [PATCH 204/347] license: update FSF address. @fix T1042. --- legacy/evas_generic_loaders/COPYING | 40 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/legacy/evas_generic_loaders/COPYING b/legacy/evas_generic_loaders/COPYING index 57fa99e62d..879517275d 100644 --- a/legacy/evas_generic_loaders/COPYING +++ b/legacy/evas_generic_loaders/COPYING @@ -16,14 +16,14 @@ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111 USA + 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 + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -32,7 +32,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +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 @@ -72,8 +72,8 @@ 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 + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -127,7 +127,7 @@ above, provided that you also meet all of these conditions: 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 @@ -185,7 +185,7 @@ 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 @@ -242,7 +242,7 @@ 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 @@ -272,7 +272,7 @@ 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 + 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 @@ -294,9 +294,9 @@ 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 - - Appendix: How to Apply These Terms to Your New Programs + 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 @@ -308,7 +308,7 @@ 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. - Copyright (C) 19yy + Copyright (C) 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 @@ -320,16 +320,16 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA + 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) 19yy name of author + 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. @@ -352,5 +352,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. From 784d23eef7a3564dc82c9189c9e706f0e272daf0 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 28 Apr 2014 12:44:24 +0200 Subject: [PATCH 205/347] release: v1.10.0 alpha1 --- legacy/evas_generic_loaders/NEWS | 10 ++++++++-- legacy/evas_generic_loaders/configure.ac | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index d1e1edb4dd..c3329c232d 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,11 @@ -Evas Generic Loaders 1.9.0 +Evas Generic Loaders 1.10.0 + +Changes since Evas Generic Loaders 1.9.0: +----------------------------------------- + +Fixes: + + * license: update FSF address. (T1042) Changes since Evas Generic Loaders 1.8.0: ----------------------------------------- @@ -44,4 +51,3 @@ Additions: Fixes: * distcheck for parallel builds - diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 973e89ed17..617f13f596 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [9]) -m4_define([v_mic], [99]) +m4_define([v_min], [10]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From bbf50133a36738e5e408964db00c431e64e70b0e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 28 Apr 2014 12:56:05 +0200 Subject: [PATCH 206/347] release: v1.10.0 alpha1 --- legacy/emotion_generic_players/NEWS | 7 ++++++- legacy/emotion_generic_players/configure.ac | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index bdebc48bf9..03c6966a9a 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,4 +1,9 @@ -Emotion Generic Players 1.9.0 +Emotion Generic Players 1.10.0 + +Changes since Emotion Generic Players 1.9.0: +-------------------------------------------- + +No changes since version 1.9.0 Changes since Emotion Generic Players 1.8.0: -------------------------------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 4bb4d157e5..3cc805ef3f 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [9]) -m4_define([v_mic], [99]) +m4_define([v_min], [10]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From 9f478993a577b87b37aa459bd4a9359449e28cd1 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 28 Apr 2014 13:24:08 +0200 Subject: [PATCH 207/347] release: Fix alpha release tarball name --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 3cc805ef3f..9996c01077 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From e3cdac19f50c0c7dc48735a9c55b3b3a48e25cae Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 28 Apr 2014 13:24:46 +0200 Subject: [PATCH 208/347] release: Fix alpha release tarball name --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 617f13f596..d715a380e1 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From a571fe0464d3c3f553c1def24e750423b4f1a0c3 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 5 May 2014 16:17:46 +0200 Subject: [PATCH 209/347] release: v1.10.0 beta1 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index d715a380e1..4f84503d1e 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 3310d81a8267ce587a6021f3a2867fa4bb8435ad Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 5 May 2014 16:19:07 +0200 Subject: [PATCH 210/347] release: v1.10.0 beta1 --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 9996c01077..1fb705e7dc 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From d3ec100d55903cb023bb07f2ee7724b4f47447f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 7 May 2014 09:39:29 +0200 Subject: [PATCH 211/347] silence warnings: shadows and different signs --- legacy/evas_generic_loaders/src/bin/ps/main.c | 8 ++++---- legacy/evas_generic_loaders/src/bin/raw/main.c | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index 3caa615009..a994ec2dab 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -210,7 +210,7 @@ main(int argc, char **argv) int i; int size_w = 0, size_h = 0; int head_only = 0; - int page = 0; + int page_nbr = 0; if (argc < 2) return -1; // file is ALWAYS first arg, other options come after @@ -223,7 +223,7 @@ main(int argc, char **argv) else if (!strcmp(argv[i], "-key")) { i++; - page = atoi(argv[i]); + page_nbr = atoi(argv[i]); i++; } else if (!strcmp(argv[i], "-opt-scale-down-by")) @@ -248,11 +248,11 @@ main(int argc, char **argv) D("_spectre_init_file\n"); D("dpi....: %f\n", dpi); - D("page...: %d\n", page); + D("page...: %d\n", page_nbr); timeout_init(10); - if (!_spectre_init(file, page, size_w, size_h)) + if (!_spectre_init(file, page_nbr, size_w, size_h)) return -1; D("_spectre_init done\n"); diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index 31626c226f..98476f3bc4 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -111,7 +111,8 @@ read_raw_header() static int read_raw_data() { - int ret, count; + int ret; + unsigned int count; libraw_processed_image_t *image = NULL; DATA8 *bufptr; DATA32 *dataptr; From c4f8ae2ad9eddc14f4c4222652cff747d502e6b4 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Fri, 9 May 2014 12:02:15 +0200 Subject: [PATCH 212/347] vlc: fix ogv support in emotion_generic. T1192 Thanks for the help from Luca Barbato. --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 3f90bd7b22..11343bbbe9 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -717,6 +717,8 @@ main(int argc, const char *argv[]) "--no-stats", /* no stats */ "--no-inhibit", /* we don't want interfaces */ "--no-disable-screensaver", /* we don't want interfaces */ + "--codec", "avcodec", + "--demux", "avformat" }; vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); From 53434c863d0f7f977f92017706144703867de48e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 May 2014 14:57:46 +0200 Subject: [PATCH 213/347] release: v1.10.0 beta2 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 4f84503d1e..fd72a152a6 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 809c21404de6a61d427eeebbdefa2c42b5b7d046 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 May 2014 14:59:02 +0200 Subject: [PATCH 214/347] release: v1.10.0 beta2 --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 1fb705e7dc..e12577eb65 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 94123a1690fd1f0a5de5f268d04567918271063a Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Sat, 17 May 2014 02:10:44 +0900 Subject: [PATCH 215/347] README - fixed typo --- legacy/evas_generic_loaders/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index 7cf9c57077..f0ea8b350c 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -32,7 +32,7 @@ Highly recommended: * libspectre * librsvg -Sugested: +Suggested: * libreoffice From d491fa7e5eef5275976294a4d2be79581cb73784 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 May 2014 11:10:14 +0200 Subject: [PATCH 216/347] release: v1.10.0 beta3 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index fd72a152a6..4fda83d710 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 4ef0e660bc5b5150d9461c76272e1f2060e0bc5c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 May 2014 11:11:26 +0200 Subject: [PATCH 217/347] release: v1.10.0 beta3 --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index e12577eb65..63079da121 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From cced1d059686aca965311c9a8cc546ffa2f54af3 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 10:09:44 +0200 Subject: [PATCH 218/347] autotools: Add xz as additional tarball format If this turns out well we will remove bz2 in 1.12 --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 63079da121..bc76e47f35 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -28,7 +28,7 @@ AC_CONFIG_HEADERS([config.h]) AC_USE_SYSTEM_EXTENSIONS AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.6 dist-bzip2]) +AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_LANG([C]) From 5dbf9adb3bb86ed00727e032b4a74f557c1b7823 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 10:12:24 +0200 Subject: [PATCH 219/347] release: v1.10.0 --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index bc76e47f35..dded4820f9 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 48551cc1da17d662383ae0b02c9ea2cd1526ebcc Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 10:15:31 +0200 Subject: [PATCH 220/347] autotools: Add xz as additional tarball format If this turns out well we will remove bz2 in 1.12 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 4fda83d710..4b92b93b1e 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -24,7 +24,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.6 dist-bzip2]) +AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## From 5b0b898fe5df432c57d82788546b8104db098b56 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 10:25:33 +0200 Subject: [PATCH 221/347] release: v1.10.0 --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 4b92b93b1e..ed2ccbff37 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From dfb245cd5cd168d9f3065a1dbffde3501d0e8b7e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 12:13:09 +0200 Subject: [PATCH 222/347] release: Switch back to development mode Open for 1.1 changes now. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index ed2ccbff37..ee7f965916 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [10]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From d4ad352a2081d0b30ccddd6d9a5ef9c59bca7d5c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 12:17:41 +0200 Subject: [PATCH 223/347] release: Switch back to development mode Open for 1.11 changes now. --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index dded4820f9..0a6c2730d3 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [10]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From 1b1bcd75da1f3cb439cbc5e6d502bcaa1c3b682e Mon Sep 17 00:00:00 2001 From: Luca Galli Date: Tue, 27 May 2014 17:48:22 +0900 Subject: [PATCH 224/347] Trying to port evas_generic_loaders to gstreamer1.0 Summary: Resulting video files thumbnail are grey and glitched Reviewers: raster, cedric CC: cedric Differential Revision: https://phab.enlightenment.org/D819 --- legacy/evas_generic_loaders/configure.ac | 19 ++++++++++++++--- .../evas_generic_loaders/src/bin/gst/main.c | 21 ++++++++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index ee7f965916..c7aaf5068f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -147,9 +147,9 @@ if test "x$want_svg" = "xyes" ; then else have_svg=no fi -GST_REQS=0.10.13 -GSTPLUG_REQS=0.10.13 -GST_MAJORMINOR=0.10 +GST_REQS=1.0 +GSTPLUG_REQS=1.0 +GST_MAJORMINOR=1.0 AC_ARG_ENABLE([gstreamer], [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], @@ -163,6 +163,19 @@ if test "x$want_gstreamer" = "xyes" ; then ], [have_gst="yes"], [have_gst="no"]) + if test "x$have_gst" = "xno" ; then + GST_REQS=0.10.13 + GSTPLUG_REQS=0.10.13 + GST_MAJORMINOR=0.10 + PKG_CHECK_MODULES([GSTREAMER], + [gstreamer-$GST_MAJORMINOR >= $GST_REQS + gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS + ], + [have_gst="yes" + AC_DEFINE_UNQUOTED([USE_OLD_GST], [1], [using older gstreamer]) + ], + [have_gst="no"]) + fi else have_gst=no fi diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index c6e4dd03fb..526e1a6ab8 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -23,7 +23,7 @@ #define D(fmt, args...) #endif -#define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000" +#define CAPS "video/x-raw,format=RGB" static GstElement *pipeline = NULL; static GstElement *sink = NULL; @@ -67,7 +67,7 @@ _gst_init(const char *filename) D("Setting file %s\n", uri); - descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! ffmpegcolorspace ! " + descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! videoconvert ! " " appsink name=sink caps=\"" CAPS "\"", uri); pipeline = gst_parse_launch(descr, &error); free(uri); @@ -112,7 +112,7 @@ _gst_init(const char *filename) } format = GST_FORMAT_TIME; - gst_element_query_duration (pipeline, &format, &duration); + gst_element_query_duration (pipeline, format, &duration); if (duration == -1) { D("could not retrieve the duration, set it to 1s\n"); @@ -126,7 +126,7 @@ _gst_init(const char *filename) goto unref_pipeline; } - caps = gst_pad_get_negotiated_caps(pad); + caps = gst_pad_get_current_caps(pad); if (!caps) goto unref_pad; @@ -167,6 +167,8 @@ static void _gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) { GstBuffer *buffer; + GstMapInfo info; + GstSample *sample; D("load image\n"); if (pos >= 0.0) @@ -175,14 +177,19 @@ _gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) else gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, duration / 2); - g_signal_emit_by_name(sink, "pull-preroll", &buffer, NULL); - D("load image : %p %d\n", GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); + g_signal_emit_by_name(sink, "pull-preroll", &sample, NULL); shm_alloc(width * height * sizeof(DATA32)); if (!shm_addr) return; data = shm_addr; - memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); + buffer = gst_sample_get_buffer (sample); + gst_buffer_map (buffer, &info, GST_MAP_READ); + D("load image: %p %d\n", info.data, info.size); + + memcpy(data, info.data, info.size); + + gst_buffer_unmap(buffer, &info); } int From b2742e34ab6bf9e7ee0266d55a0dc7f636c9e317 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 27 May 2014 18:08:30 +0900 Subject: [PATCH 225/347] add in older gst 0.10 support in evas_generic_loaders --- legacy/evas_generic_loaders/configure.ac | 36 ++- .../src/bin/gst/Makefile.am | 12 + .../src/bin/gst/main_0_10.c | 278 ++++++++++++++++++ 3 files changed, 311 insertions(+), 15 deletions(-) create mode 100644 legacy/evas_generic_loaders/src/bin/gst/main_0_10.c diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index c7aaf5068f..0e8211c36c 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -147,6 +147,13 @@ if test "x$want_svg" = "xyes" ; then else have_svg=no fi + +want_gst1="yes" +AC_ARG_ENABLE([gstreamer1], + [AC_HELP_STRING([--disable-gstreamer1], [disable gstreamer1 support @<:@default==enabled@:>@])], + [want_gst1=$enableval], + [want_gst1="yes"]) + GST_REQS=1.0 GSTPLUG_REQS=1.0 GST_MAJORMINOR=1.0 @@ -157,29 +164,28 @@ AC_ARG_ENABLE([gstreamer], [want_gstreamer="yes"]) if test "x$want_gstreamer" = "xyes" ; then - PKG_CHECK_MODULES([GSTREAMER], - [gstreamer-$GST_MAJORMINOR >= $GST_REQS - gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS - ], - [have_gst="yes"], - [have_gst="no"]) - if test "x$have_gst" = "xno" ; then - GST_REQS=0.10.13 - GSTPLUG_REQS=0.10.13 - GST_MAJORMINOR=0.10 + have_gst="no"; + if test "x$want_gst1" = "xyes" ; then PKG_CHECK_MODULES([GSTREAMER], - [gstreamer-$GST_MAJORMINOR >= $GST_REQS - gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS + [gstreamer-1.0 >= 1.0 + gstreamer-plugins-base-1.0 >= 1.0 ], - [have_gst="yes" - AC_DEFINE_UNQUOTED([USE_OLD_GST], [1], [using older gstreamer]) + [have_gst="yes"; have_gst1="yes";], + [have_gst="no"; have_gst1="no";]) + fi + if test "x$have_gst" = "xno" ; then + PKG_CHECK_MODULES([GSTREAMER], + [gstreamer-0.10 >= 0.10.13 + gstreamer-plugins-base-0.10 >= 0.10.13 ], - [have_gst="no"]) + [have_gst="yes"; have_gst1="no";], + [have_gst="no"; have_gst1="no";]) fi else have_gst=no fi AM_CONDITIONAL([HAVE_GST], [test "x${have_gst}" = "xyes"]) +AM_CONDITIONAL([HAVE_GST1], [test "x${have_gst1}" = "xyes"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) AM_CONDITIONAL([HAVE_RAW], [test "x${have_raw}" = "xyes"]) diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am index f680d6426f..955c623f07 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am @@ -15,10 +15,22 @@ AM_CPPFLAGS = \ bin_PROGRAMS = evas_image_loader.gst bindir = $(libdir)/evas/utils +if HAVE_GST1 + evas_image_loader_gst_SOURCES = \ main.c \ $(top_srcdir)/src/bin/common/shmfile.c \ $(top_srcdir)/src/bin/common/timeout.c + +else + +evas_image_loader_gst_SOURCES = \ +main_0_10.c \ +$(top_srcdir)/src/bin/common/shmfile.c \ +$(top_srcdir)/src/bin/common/timeout.c + +endif + evas_image_loader_gst_CFLAGS = evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ evas_image_loader_gst_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c b/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c new file mode 100644 index 0000000000..c6e4dd03fb --- /dev/null +++ b/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c @@ -0,0 +1,278 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include + +#include + +#include "shmfile.h" +#include "timeout.h" + +#define DATA32 unsigned int + +//#define GST_DBG + +#ifdef GST_DBG +#define D(fmt, args...) fprintf(stderr, fmt, ## args) +#else +#define D(fmt, args...) +#endif + +#define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000" + +static GstElement *pipeline = NULL; +static GstElement *sink = NULL; +static gint64 duration = -1; + +int width = 0; +int height = 0; +void *data = NULL; + + +static Eina_Bool +_gst_init(const char *filename) +{ + GstPad *pad; + GstCaps *caps; + GstStructure *structure; + gchar *descr; + gchar *uri; + GError *error = NULL; + GstFormat format; + GstStateChangeReturn ret; +// int vidstr = 0; + + if (!filename || !*filename) + return EINA_FALSE; + + if (!gst_init_check(NULL, NULL, &error)) + return EINA_FALSE; + + if ((*filename == '/') || (*filename == '~')) + { + uri = g_filename_to_uri(filename, NULL, NULL); + if (!uri) + { + D("could not create new uri from %s", filename); + goto unref_pipeline; + } + } + else + uri = strdup(filename); + + D("Setting file %s\n", uri); + + descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! ffmpegcolorspace ! " + " appsink name=sink caps=\"" CAPS "\"", uri); + pipeline = gst_parse_launch(descr, &error); + free(uri); + + if (error != NULL) + { + D("could not construct pipeline: %s\n", error->message); + g_error_free (error); + goto gst_shutdown; + } +/* needs gst 1.0+ + * also only works on playbin objects!!! this is a uridecodebin! + g_object_get(G_OBJECT(pipeline), + "n-video", &vidstr, + NULL); + if (vidstr <= 0) + { + D("no video stream\n"); + goto gst_shutdown; + } +*/ + sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); + + ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); + switch (ret) + { + case GST_STATE_CHANGE_FAILURE: + D("failed to play the file\n"); + goto unref_pipeline; + case GST_STATE_CHANGE_NO_PREROLL: + D("live sources not supported yet\n"); + goto unref_pipeline; + default: + break; + } + + ret = gst_element_get_state((pipeline), NULL, NULL, GST_CLOCK_TIME_NONE); + if (ret == GST_STATE_CHANGE_FAILURE) + { + D("could not complete pause\n"); + goto unref_pipeline; + } + + format = GST_FORMAT_TIME; + gst_element_query_duration (pipeline, &format, &duration); + if (duration == -1) + { + D("could not retrieve the duration, set it to 1s\n"); + duration = 1 * GST_SECOND; + } + + pad = gst_element_get_static_pad(sink, "sink"); + if (!pad) + { + D("could not retrieve the sink pad\n"); + goto unref_pipeline; + } + + caps = gst_pad_get_negotiated_caps(pad); + if (!caps) + goto unref_pad; + + structure = gst_caps_get_structure(caps, 0); + + if (!gst_structure_get_int(structure, "width", &width)) + goto unref_caps; + if (!gst_structure_get_int(structure, "height", &height)) + goto unref_caps; + + gst_caps_unref(caps); + gst_object_unref(pad); + + return EINA_TRUE; + + unref_caps: + gst_caps_unref(caps); + unref_pad: + gst_object_unref(pad); + unref_pipeline: + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref(pipeline); + gst_shutdown: + gst_deinit(); + + return EINA_FALSE; +} + +static void +_gst_shutdown() +{ + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref(pipeline); + gst_deinit(); +} + +static void +_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) +{ + GstBuffer *buffer; + + D("load image\n"); + if (pos >= 0.0) + gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, + pos * 1000000000.0); + else + gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, + duration / 2); + g_signal_emit_by_name(sink, "pull-preroll", &buffer, NULL); + D("load image : %p %d\n", GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); + + shm_alloc(width * height * sizeof(DATA32)); + if (!shm_addr) return; + data = shm_addr; + + memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); +} + +int +main(int argc, char **argv) +{ + char *file, *p; + int i, numonly; + int size_w = 0, size_h = 0; + int head_only = 0; + long long pos = -1.0; + + if (argc < 2) return -1; + // file is ALWAYS first arg, other options come after + file = argv[1]; + for (i = 2; i < argc; i++) + { + if (!strcmp(argv[i], "-head")) + // asked to only load header, not body/data + head_only = 1; + else if (!strcmp(argv[i], "-key")) + { + i++; + numonly = 1; + for (p = argv[i]; *p; p++) + { + if ((!*p < '0') || (*p > 9)) + { + numonly = 0; + break; + } + } + if (numonly) pos = (double)(atoll(argv[i])) / 1000.0; + i++; + } + else if (!strcmp(argv[i], "-opt-scale-down-by")) + { // not used by ps loader + i++; + // int scale_down = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-opt-dpi")) + { + i++; + } + else if (!strcmp(argv[i], "-opt-size")) + { // not used by ps loader + i++; + size_w = atoi(argv[i]); + i++; + size_h = atoi(argv[i]); + } + } + + timeout_init(10); + + D("_gst_init_file\n"); + + if (!_gst_init(file)) + return -1; + D("_gst_init done\n"); + + if (!head_only) + { + _gst_load_image(size_w, size_h, pos); + } + + D("size...: %ix%i\n", width, height); + D("alpha..: 0\n"); + + printf("size %i %i\n", width, height); + printf("alpha 0\n"); + + if (!head_only) + { + if (shm_fd >= 0) + { + printf("shmfile %s\n", shmfile); + } + else + { + // could also to "tmpfile %s\n" like shmfile but just + // a mmaped tmp file on the system + printf("data\n"); + fwrite(data, width * height * sizeof(DATA32), 1, stdout); + } + shm_free(); + } + else + printf("done\n"); + + _gst_shutdown(); + + return 0; +} From bc9ce4bd09155825f6993b1c74eebf5587400182 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 27 May 2014 18:09:10 +0900 Subject: [PATCH 226/347] add arcconfig for evas_generic_loaders --- legacy/evas_generic_loaders/.arcconfig | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 legacy/evas_generic_loaders/.arcconfig diff --git a/legacy/evas_generic_loaders/.arcconfig b/legacy/evas_generic_loaders/.arcconfig new file mode 100644 index 0000000000..7d7c8a684c --- /dev/null +++ b/legacy/evas_generic_loaders/.arcconfig @@ -0,0 +1,4 @@ +{ + "project_id" : "evas_generic_loaders", + "conduit_uri" : "https://phab.enlightenment.org/" +} From 3e7d29339cb9b906d0f111acc3871eb7db9b201b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 28 May 2014 21:13:34 +0200 Subject: [PATCH 227/347] build: Add fake doc target Needed to have it run on the nightly jenkins builds. --- legacy/emotion_generic_players/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am index 03550265d1..ec4045b682 100644 --- a/legacy/emotion_generic_players/Makefile.am +++ b/legacy/emotion_generic_players/Makefile.am @@ -50,3 +50,8 @@ src_vlc_vlc_SOURCES = src/vlc/emotion_generic_vlc.c src_vlc_vlc_CPPFLAGS = @VLC_CFLAGS@ src_vlc_vlc_LDADD = @VLC_LIBS@ endif + +.PHONY: doc + +doc: + @echo "Empty doc target until we have real documentation." From 502336f9074c153e5cc270ece8bfe74c29eef582 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 28 May 2014 21:48:52 +0200 Subject: [PATCH 228/347] build: Add fake doc target Needed to have it run on the nightly jenkins builds. --- legacy/evas_generic_loaders/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/legacy/evas_generic_loaders/Makefile.am b/legacy/evas_generic_loaders/Makefile.am index d4ce0b78b2..9203d09c50 100644 --- a/legacy/evas_generic_loaders/Makefile.am +++ b/legacy/evas_generic_loaders/Makefile.am @@ -30,3 +30,8 @@ autogen.sh \ m4/ac_attribute.m4 \ m4/ac_path_generic.m4 \ README + +.PHONY: doc + +doc: + @echo "Empty doc target until we have real documentation." From 3eb6976f3964a99bcf6fe4e3973eff653586c219 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 5 Jun 2014 17:19:12 +0100 Subject: [PATCH 229/347] Add autogen.sh to EXTRA_DIST. Thanks to Jef91 for pointing this out. @fix --- legacy/emotion_generic_players/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am index ec4045b682..8c5907bfe6 100644 --- a/legacy/emotion_generic_players/Makefile.am +++ b/legacy/emotion_generic_players/Makefile.am @@ -13,6 +13,7 @@ EXTRA_DIST = \ README \ AUTHORS \ COPYING \ +autogen.sh \ m4/efl_compiler.m4 \ m4/emotion_generic_players.m4 From 42ea8644f617d4905ac12c2d92fda9dba68464c0 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 5 Jun 2014 17:28:52 +0100 Subject: [PATCH 230/347] Revert "Add autogen.sh to EXTRA_DIST." This reverts commit d500d92653b9ec0de2ae111d454f86747930d3fb. --- legacy/emotion_generic_players/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am index 8c5907bfe6..ec4045b682 100644 --- a/legacy/emotion_generic_players/Makefile.am +++ b/legacy/emotion_generic_players/Makefile.am @@ -13,7 +13,6 @@ EXTRA_DIST = \ README \ AUTHORS \ COPYING \ -autogen.sh \ m4/efl_compiler.m4 \ m4/emotion_generic_players.m4 From 997c518eba55213540980fcf880e9f72b83bfa75 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 5 Jun 2014 17:31:20 +0100 Subject: [PATCH 231/347] Remove autogen.sh from the dist tarball. This should not be distributed. @fix. --- legacy/evas_generic_loaders/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/legacy/evas_generic_loaders/Makefile.am b/legacy/evas_generic_loaders/Makefile.am index 9203d09c50..96dec582ec 100644 --- a/legacy/evas_generic_loaders/Makefile.am +++ b/legacy/evas_generic_loaders/Makefile.am @@ -26,7 +26,6 @@ m4/ltversion.m4 EXTRA_DIST = \ AUTHORS \ COPYING \ -autogen.sh \ m4/ac_attribute.m4 \ m4/ac_path_generic.m4 \ README From c4388d01a9e67a956daa5d5bf16b9d94e4d3621c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 22 Jun 2014 10:15:41 +0900 Subject: [PATCH 232/347] gst1 support fixed now to do argb properly --- legacy/evas_generic_loaders/src/bin/gst/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 526e1a6ab8..3dffbb2a75 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -23,7 +23,11 @@ #define D(fmt, args...) #endif -#define CAPS "video/x-raw,format=RGB" +#ifdef WORDS_BIGENDIAN +# define CAPS "video/x-raw,format=ARGB" +#else +# define CAPS "video/x-raw,format=BGRA" +#endif static GstElement *pipeline = NULL; static GstElement *sink = NULL; @@ -107,7 +111,7 @@ _gst_init(const char *filename) ret = gst_element_get_state((pipeline), NULL, NULL, GST_CLOCK_TIME_NONE); if (ret == GST_STATE_CHANGE_FAILURE) { - D("could not complete pause\n"); + D("could not complete pause\n"); goto unref_pipeline; } @@ -115,14 +119,14 @@ _gst_init(const char *filename) gst_element_query_duration (pipeline, format, &duration); if (duration == -1) { - D("could not retrieve the duration, set it to 1s\n"); + D("could not retrieve the duration, set it to 1s\n"); duration = 1 * GST_SECOND; } pad = gst_element_get_static_pad(sink, "sink"); if (!pad) { - D("could not retrieve the sink pad\n"); + D("could not retrieve the sink pad\n"); goto unref_pipeline; } @@ -243,7 +247,7 @@ main(int argc, char **argv) } timeout_init(10); - + D("_gst_init_file\n"); if (!_gst_init(file)) From ea29de10a01e44eecb42e2522f8f084ab756390d Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 23 Jul 2014 17:05:05 +0900 Subject: [PATCH 233/347] update TODO for generic loaders --- legacy/evas_generic_loaders/TODO | 7 ------- 1 file changed, 7 deletions(-) diff --git a/legacy/evas_generic_loaders/TODO b/legacy/evas_generic_loaders/TODO index 6081f9a61c..ce7ede1e90 100644 --- a/legacy/evas_generic_loaders/TODO +++ b/legacy/evas_generic_loaders/TODO @@ -1,12 +1,5 @@ - Modules to add: --------------- - [x] XCF - [x] PDF - [X] PS [ ] DVI [ ] Djvu - [X] video files - [X] RAW - [ ] PPT/PPTX From e336d1037de0373067929d9a4ef35d859a40415c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 1 Aug 2014 10:48:39 +0200 Subject: [PATCH 234/347] release: Update NEWS and bump version for 1.11.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 21 ++++++++++++++++++++- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index c3329c232d..23b4417dba 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,16 @@ -Evas Generic Loaders 1.10.0 +Evas Generic Loaders 1.11.0 + +Changes since Evas Generic Loaders 1.10.0: +------------------------------------------ + +Features: + + * Trying to port evas_generic_loaders to gstreamer1.0 + * Add in older gst 0.10 support in evas_generic_loaders + +Fixes: + + * gst1 support fixed now to do argb properly Changes since Evas Generic Loaders 1.9.0: ----------------------------------------- @@ -51,3 +63,10 @@ Additions: Fixes: * distcheck for parallel builds +Changes since 1.10.0: +--------------------- +Features: + +Fixes: + + * Remove autogen.sh from the dist tarball. diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 0e8211c36c..c98b50adf1 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [10]) -m4_define([v_mic], [99]) +m4_define([v_min], [11]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 1a0cee13233270bfc42807bc479201c687cb72e7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 1 Aug 2014 10:51:34 +0200 Subject: [PATCH 235/347] release: Update NEWS and bump version for 1.11.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 14 +++++++++++++- legacy/emotion_generic_players/configure.ac | 8 ++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index 03c6966a9a..cfaf38e60f 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,4 +1,9 @@ -Emotion Generic Players 1.10.0 +Emotion Generic Players 1.11.0 + +Changes since Emotion Generic Players 1.10.0: +--------------------------------------------- + +No changes since version 1.10.0 Changes since Emotion Generic Players 1.9.0: -------------------------------------------- @@ -30,3 +35,10 @@ Fixes: * Emotion VLC: fix send position_change while paused. * Emotion VLC: recreate the player when end reached. * Emotion VLC: fix the volume/mute bug. +Changes since 1.10.0: +--------------------- +Features: + +Fixes: + + * Add autogen.sh to EXTRA_DIST. diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 0a6c2730d3..5424d9c10f 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [10]) -m4_define([v_mic], [99]) +m4_define([v_min], [11]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From df37ec259415a32bdca8129ee55e56247ff70b75 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 1 Aug 2014 10:59:39 +0200 Subject: [PATCH 236/347] NEWS: Remove wrong entry for 1.11 changes --- legacy/evas_generic_loaders/NEWS | 7 ------- 1 file changed, 7 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 23b4417dba..c5dc032ec6 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -63,10 +63,3 @@ Additions: Fixes: * distcheck for parallel builds -Changes since 1.10.0: ---------------------- -Features: - -Fixes: - - * Remove autogen.sh from the dist tarball. From 272365fb6f2472666501626bec24fd451aaaa462 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 1 Aug 2014 11:00:45 +0200 Subject: [PATCH 237/347] NEWS: Remove wrong entry for 1.11 changes --- legacy/emotion_generic_players/NEWS | 7 ------- 1 file changed, 7 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index cfaf38e60f..66cc03be1b 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -35,10 +35,3 @@ Fixes: * Emotion VLC: fix send position_change while paused. * Emotion VLC: recreate the player when end reached. * Emotion VLC: fix the volume/mute bug. -Changes since 1.10.0: ---------------------- -Features: - -Fixes: - - * Add autogen.sh to EXTRA_DIST. From d1ac39f0b0b13c738ec3a82bf3fee2bdbd095981 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 3 Aug 2014 21:12:07 +0900 Subject: [PATCH 238/347] fix gst video loader in generic to have key actually work this never worked - key in gst loader was meant to be position in seconds (well an integer with 1000 units per second). it was just wrong and never worked. works now. :) @fix --- legacy/evas_generic_loaders/src/bin/gst/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 3dffbb2a75..050b74ffaa 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -119,6 +119,7 @@ _gst_init(const char *filename) gst_element_query_duration (pipeline, format, &duration); if (duration == -1) { + fprintf(stderr, "duration fetch err\n"); D("could not retrieve the duration, set it to 1s\n"); duration = 1 * GST_SECOND; } @@ -219,13 +220,13 @@ main(int argc, char **argv) numonly = 1; for (p = argv[i]; *p; p++) { - if ((!*p < '0') || (*p > 9)) + if ((*p < '0') || (*p > '9')) { numonly = 0; break; } } - if (numonly) pos = (double)(atoll(argv[i])) / 1000.0; + if (numonly) pos = atoll(argv[i]) * 1000000; i++; } else if (!strcmp(argv[i], "-opt-scale-down-by")) @@ -254,6 +255,8 @@ main(int argc, char **argv) return -1; D("_gst_init done\n"); + if ((pos >= 0) && (pos > duration)) return -1; + if (!head_only) { _gst_load_image(size_w, size_h, pos); From 3ca02d58808b010632eb8e1a0bfb2e572797ffac Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 3 Aug 2014 21:14:55 +0900 Subject: [PATCH 239/347] actually fix gst generic loader --- legacy/evas_generic_loaders/src/bin/gst/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 050b74ffaa..77f3910949 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -178,7 +178,7 @@ _gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) D("load image\n"); if (pos >= 0.0) gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - pos * 1000000000.0); + pos); else gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, duration / 2); From 59d758690a9a10c811f0bd94bf10cd5a767dce18 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 4 Aug 2014 19:51:08 +0200 Subject: [PATCH 240/347] release: Update NEWS and bump version for 1.11.0-beta1 release --- legacy/evas_generic_loaders/NEWS | 2 ++ legacy/evas_generic_loaders/configure.ac | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index c5dc032ec6..a46f4c1d13 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -11,6 +11,8 @@ Features: Fixes: * gst1 support fixed now to do argb properly + * Remove autogen.sh from the dist tarball. + * fix gst video loader in generic to have key actually work Changes since Evas Generic Loaders 1.9.0: ----------------------------------------- diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index c98b50adf1..9635ef5cce 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From d3a5d79229b92c50f00462d1c8a8e719e4fea6a6 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 4 Aug 2014 19:52:31 +0200 Subject: [PATCH 241/347] release: Update NEWS and bump version for 1.11.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 5424d9c10f..70dd98e9e1 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 08559a9ba6e8b3da3730fe0571d40d4abcd46854 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Aug 2014 12:52:26 +0200 Subject: [PATCH 242/347] release: Update NEWS and bump version for 1.11.0-beta2 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 9635ef5cce..6057e5b17f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From a34bc904b7c364285a0ad91a26ea6a2553a088cb Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Aug 2014 12:53:27 +0200 Subject: [PATCH 243/347] release: Update NEWS and bump version for 1.11.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 70dd98e9e1..a1e5ea7000 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 849cb1190aba455c16e22cd46cbcd90d7752603c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 15 Aug 2014 00:26:05 +0900 Subject: [PATCH 244/347] emotion generic players - work around vlc bug that segvs this should fix T1530 --- .../emotion_generic_players/src/vlc/emotion_generic_vlc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 11343bbbe9..0e328ca356 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -717,11 +717,14 @@ main(int argc, const char *argv[]) "--no-stats", /* no stats */ "--no-inhibit", /* we don't want interfaces */ "--no-disable-screensaver", /* we don't want interfaces */ - "--codec", "avcodec", - "--demux", "avformat" +// XXX: causes newer vlcs to segv! +// "--codec", "avcodec", +// XXX: disable this just in case +// "--demux", "avformat" }; vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); + memset(&app, 0, sizeof(app)); if (!eina_init()) { EINA_LOG_CRIT("Can't initialize generic vlc player, eina failed."); From 41c00ffd8669de9c46aceb06b4897d643e3654f2 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 15 Aug 2014 11:39:03 +0200 Subject: [PATCH 245/347] README: Update version for upcoming 1.11 release --- legacy/emotion_generic_players/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README index 783fe37d53..1681ae2b1d 100644 --- a/legacy/emotion_generic_players/README +++ b/legacy/emotion_generic_players/README @@ -1,5 +1,5 @@ -Emotion Generic Players 1.9.0 -============================= +Emotion Generic Players 1.11.0 +============================== ****************************************************************************** FOR ANY ISSUES PLEASE EMAIL: From 8c5db73b9c6fb16d85b65570e11583c69f49505b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 15 Aug 2014 11:41:05 +0200 Subject: [PATCH 246/347] NEWS: Manually add fix for T1530 Not tagged with @fix so our tooling would not pick it up. As this is the only relevant change here in 1.11 add it by hand. --- legacy/emotion_generic_players/NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index 66cc03be1b..b9271dc49a 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -3,7 +3,8 @@ Emotion Generic Players 1.11.0 Changes since Emotion Generic Players 1.10.0: --------------------------------------------- -No changes since version 1.10.0 +Fixes: + * emotion generic players - work around vlc bug that segvs (T1530) Changes since Emotion Generic Players 1.9.0: -------------------------------------------- From 3964cac585b752dc1bad4b4aaa4052f815999b95 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 15 Aug 2014 11:49:26 +0200 Subject: [PATCH 247/347] README: Update for upcoming 1.11 and mention gstreamer 1.x support --- legacy/evas_generic_loaders/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README index f0ea8b350c..2e0f816758 100644 --- a/legacy/evas_generic_loaders/README +++ b/legacy/evas_generic_loaders/README @@ -1,5 +1,5 @@ -Evas generic loaders 1.9.0 -========================== +Evas generic loaders 1.11.0 +=========================== ****************************************************************************** FOR ANY ISSUES PLEASE EMAIL: @@ -26,7 +26,7 @@ Required by default: Highly recommended: - * gstreamer (0.10) (ensure you have all the gstreamer codecs you need/want) + * gstreamer (1.x or 0.10) (ensure you have all the gstreamer codecs you need/want) * poppler * libraw * libspectre From af4efdfc4d0ae11a28521496f877e6e0a036846c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 20 Aug 2014 17:31:27 +0200 Subject: [PATCH 248/347] release: Update NEWS and bump version for 1.11.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 6057e5b17f..cd0257c618 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From ebfa3db4cd27d31146d3cf23bea6350a7f95ceab Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 20 Aug 2014 17:38:19 +0200 Subject: [PATCH 249/347] release: Update NEWS and bump version for 1.11.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index a1e5ea7000..fe62e3d391 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 93378011c8d9753033c99f4bced24fe5b929ed3e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 20 Aug 2014 18:01:08 +0200 Subject: [PATCH 250/347] configure: Switch to dev mode again and set version to .99 Merge window for 1.12 is open. --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index fe62e3d391..6847a7224a 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [11]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From 78f61621c535162d056996d97edd10c88654e8c8 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 20 Aug 2014 18:01:53 +0200 Subject: [PATCH 251/347] configure: Switch to dev mode again and set version to .99 Merge window for 1.12 is open. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index cd0257c618..92e2dab577 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [11]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From 6af818de1ac52b56d4e0887cbc59f4b7fde80e42 Mon Sep 17 00:00:00 2001 From: Igor Murzov Date: Thu, 21 Aug 2014 13:41:27 +0400 Subject: [PATCH 252/347] Improve LO binary detection --- .../src/bin/pdf/evas_generic_pdf_loader.libreoffice | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice b/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice index 1809b1d63e..b36e11e322 100755 --- a/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice +++ b/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice @@ -1,2 +1,8 @@ #!/bin/sh -/usr/lib/libreoffice/program/soffice.bin --headless --convert-to pdf --outdir "$2" "$1" +LOBIN=soffice +if [ -x /usr/lib/libreoffice/program/soffice.bin ]; then + LOBIN=/usr/lib/libreoffice/program/soffice.bin +elif [ -x /usr/lib64/libreoffice/program/soffice.bin ]; then + LOBIN=/usr/lib64/libreoffice/program/soffice.bin +fi +$LOBIN --headless --convert-to pdf --outdir "$2" "$1" From 01e59fc95057ee71b26e196a61ae6ba6d01d68df Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 21 Oct 2014 17:02:43 +0200 Subject: [PATCH 253/347] release: Update NEWS and bump version for 1.12.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 9 ++++++++- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index a46f4c1d13..3b1098d7d5 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,11 @@ -Evas Generic Loaders 1.11.0 +Evas Generic Loaders 1.12.0 + +Changes since 1.11.0: +--------------------- + +Fixes: + + * Improve LO binary detection Changes since Evas Generic Loaders 1.10.0: ------------------------------------------ diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 92e2dab577..bc75ca3079 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [11]) -m4_define([v_mic], [99]) +m4_define([v_min], [12]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 7a09113ac0ec99a13cd67ccac55e23454132e3c7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 21 Oct 2014 17:03:49 +0200 Subject: [PATCH 254/347] release: Update NEWS and bump version for 1.12.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 7 ++++++- legacy/emotion_generic_players/configure.ac | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index b9271dc49a..e286650d98 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,4 +1,9 @@ -Emotion Generic Players 1.11.0 +Emotion Generic Players 1.12.0 + +Changes since 1.11.0: +--------------------- + +No significant changes in this release. Changes since Emotion Generic Players 1.10.0: --------------------------------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 6847a7224a..168da968b6 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [11]) -m4_define([v_mic], [99]) +m4_define([v_min], [12]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 2a054514b66a1c57bed156bf253b412a8bd616ac Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 27 Oct 2014 13:19:00 +0100 Subject: [PATCH 255/347] release: Update NEWS and bump version for 1.12.0-beta1 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index bc75ca3079..995a30de8d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 686e71423f5669db54588db8343be7d579e2e655 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 27 Oct 2014 13:20:24 +0100 Subject: [PATCH 256/347] release: Update NEWS and bump version for 1.12.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 168da968b6..7ea34fbf42 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 6e53af8509b2eae6c91d9fbfe60fa10f83aad331 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 28 Oct 2014 09:55:40 +0100 Subject: [PATCH 257/347] xcf: Make sure complete calculation is unsigned Fixes CID63748 and CID 63749 @fix --- legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c index 7bb93007f4..f0c0754da1 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c @@ -308,7 +308,7 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w unsigned char src_alpha; unsigned char new_alpha; float ratio, compl_ratio; - long tmp; + unsigned long tmp; _clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h); @@ -325,7 +325,7 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w if (src_alpha == 255) new_alpha = src_alpha; else - new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp); + new_alpha = AD + INT_MULT((255u - AD), src_alpha, tmp); b = 3; if (new_alpha != 0) @@ -725,7 +725,7 @@ combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, unsigned char src_alpha; unsigned char new_alpha; float ratio, compl_ratio; - long tmp; + unsigned long tmp; src_alpha = AS; @@ -734,7 +734,7 @@ combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, if (src_alpha == 255) new_alpha = src_alpha; else - new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp); + new_alpha = AD + INT_MULT((255u - AD), src_alpha, tmp); b = 3; if (new_alpha != 0) From 16da37cb2c8f90dc75061d038d2b2d44bf080165 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 28 Oct 2014 10:03:11 +0100 Subject: [PATCH 258/347] raw: Make sure to keep the correct sign unsigned short * unsigned short = int, so for large image sizes the calculation will be wrong. Fixes CID 63746 and CID 63747 @fix --- legacy/evas_generic_loaders/src/bin/common/shmfile.c | 2 +- legacy/evas_generic_loaders/src/bin/common/shmfile.h | 2 +- legacy/evas_generic_loaders/src/bin/raw/main.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.c b/legacy/evas_generic_loaders/src/bin/common/shmfile.c index 725c67baef..7a51eddb5a 100644 --- a/legacy/evas_generic_loaders/src/bin/common/shmfile.c +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.c @@ -25,7 +25,7 @@ void *shm_addr = NULL; char *shmfile = NULL; void -shm_alloc(int dsize) +shm_alloc(unsigned long dsize) { #ifdef HAVE_SHM_OPEN if (!shmfile) shmfile = malloc(1024); diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.h b/legacy/evas_generic_loaders/src/bin/common/shmfile.h index b41c9cba02..f70a8fd157 100644 --- a/legacy/evas_generic_loaders/src/bin/common/shmfile.h +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.h @@ -10,7 +10,7 @@ extern int shm_size; extern void *shm_addr; extern char *shmfile; -void shm_alloc (int dsize); +void shm_alloc (unsigned long dsize); void shm_free (void); #ifdef __cplusplus diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index 98476f3bc4..2e361198c5 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -37,7 +37,7 @@ #endif static int fd = -1; -static int seg_size = 0; +static size_t seg_size = 0; static unsigned char *seg = MAP_FAILED; static libraw_data_t *raw_data = NULL; static void *data = NULL; @@ -146,14 +146,14 @@ read_raw_data() for (count = 0; count < image->data_size; count +=2) SWAP(image->data[count], image->data[count + 1]); #undef SWAP - shm_alloc(image->width * image->height * (sizeof(DATA32))); + shm_alloc((unsigned int)(image->width * image->height) * (sizeof(DATA32))); if (!shm_addr) goto clean_image; data = shm_addr; - memset(shm_addr, 0, image->width * image->height * (sizeof(DATA32))); + memset(shm_addr, 0, (unsigned int)(image->width * image->height) * (sizeof(DATA32))); dataptr = data; bufptr = image->data; - for (count = image->width * image->height; count > 0; --count) + for (count = (unsigned int)(image->width * image->height); count > 0; --count) { *dataptr = ARGB_JOIN(0xff, bufptr[0], bufptr[1], bufptr[2]); dataptr++; @@ -229,7 +229,7 @@ int main(int argc, char **argv) else { printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); + fwrite(data, (unsigned int)(width * height) * sizeof(DATA32), 1, stdout); } shm_free(); } From 093cb0e8393d99f1ed7dcfdd1a2953225fadd95e Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 28 Oct 2014 10:05:52 +0100 Subject: [PATCH 259/347] xcf: Remove self assignment Fixes CID 63745 --- legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c index f0c0754da1..acddad3717 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c @@ -218,7 +218,7 @@ hsv_to_rgb (DATA8 *hue, DATA8 *saturation, DATA8 *value) { *hue = *value; *saturation = *value; - *value = *value; + /* *value = *value; */ } else { From 659c3346ce37c61748c2f9f1bdd024332eca13f0 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 28 Oct 2014 10:08:58 +0100 Subject: [PATCH 260/347] xcf: Add comment for fall through Coverity likes a fall through comment if we really mean it. Fixes CID 63744 --- legacy/evas_generic_loaders/src/bin/xcf/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index dca44d0c73..70ade8cd52 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -1537,6 +1537,7 @@ flatten_image(void) case ERASE_MODE: case ANTI_ERASE_MODE: D("EEEEEK -- this mode shouldn't be here\n"); + /* Fall through */ case NORMAL_MODE: D("NORMAL\n"); From cad99f07d414894139e310f3a549ffbd1ad87c65 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 28 Oct 2014 10:12:40 +0100 Subject: [PATCH 261/347] xcf: Remove dead code We already make sure amount <= 16 two lines above, so no need to check again. Fixes CID 63741, CID 63742 and CID 63743 --- legacy/evas_generic_loaders/src/bin/xcf/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 70ade8cd52..48f2751b89 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -622,7 +622,7 @@ xcf_load_image_props(void) { amount = (16 < prop_size ? 16 : prop_size); image->cp += xcf_read_int8(image->file, buf, amount); - prop_size -= (16 < amount ? 16 : amount); + prop_size -= amount; } } break; @@ -735,7 +735,7 @@ xcf_load_layer_props(Layer *layer) { amount = (16 < prop_size ? 16 : prop_size); image->cp += xcf_read_int8 (image->file, buf, amount); - prop_size -= (16 < amount ? 16 : amount); + prop_size -= amount; } } break; @@ -1005,7 +1005,7 @@ xcf_load_channel_props(Layer *layer) { amount = (16 < prop_size ? 16 : prop_size); image->cp += xcf_read_int8(image->file, buf, amount); - prop_size -= (16 < amount ? 16 : amount); + prop_size -= amount; } } break; From eb391d45ddefc2e9e3485c3d70f178f86ce42387 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 3 Nov 2014 12:59:49 +0100 Subject: [PATCH 262/347] release: Update NEWS and bump version for 1.12.0-beta2 release --- legacy/evas_generic_loaders/NEWS | 2 ++ legacy/evas_generic_loaders/configure.ac | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 3b1098d7d5..0d5e1a5e4c 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -6,6 +6,8 @@ Changes since 1.11.0: Fixes: * Improve LO binary detection + * xcf: Make sure complete calculation is unsigned (CID63748, CID63749) + * raw: Make sure to keep the correct sign (CID63746, CID63747) Changes since Evas Generic Loaders 1.10.0: ------------------------------------------ diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 995a30de8d..9721c8077c 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 23d56d0d9f2cc251755c65d4f00d995a55ecb56d Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 3 Nov 2014 13:00:32 +0100 Subject: [PATCH 263/347] release: Update NEWS and bump version for 1.12.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 7ea34fbf42..3ee15a3896 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 8ddcd79c4eec5ea666130aba9bd22058c0e29945 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 10 Nov 2014 12:27:15 +0100 Subject: [PATCH 264/347] release: Update NEWS and bump version for 1.12.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 9721c8077c..94f217bb97 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 57b0d1d75d23e284e41efdef1092140984f0462f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 10 Nov 2014 12:27:59 +0100 Subject: [PATCH 265/347] release: Update NEWS and bump version for 1.12.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 3ee15a3896..2fe21c5393 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 5df1132495aa6ba99f5a29ceb93af357356008aa Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 10 Nov 2014 14:02:51 +0100 Subject: [PATCH 266/347] configure: Switch to dev mode again. Merge window for 1.13 is open now. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 94f217bb97..e2786e991d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [12]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From 8f461252801c9fcd2aa13ee1082242b3a220f9ad Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 10 Nov 2014 14:03:35 +0100 Subject: [PATCH 267/347] configure: Switch to dev mode again. Merge window for 1.13 is open now. --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 2fe21c5393..ccabd5ef23 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [12]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From eaf9d839922fd27b53dbbcfdfbfc1959862d17ad Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 11 Nov 2014 10:22:39 +0100 Subject: [PATCH 268/347] build: Remove bzip2 tarballs from distcheck When adding xz as third compression format in May 2014 I mentioned that I'm going to remove bzip2 in favor of xz in 1.12. I heard no complains but I left it in for 1.12. With 1.13 starting its time to remove it. From now on it will be only gz and xz compressed tarballs. --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index e2786e991d..f3980a42c9 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -24,7 +24,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz]) +AM_INIT_AUTOMAKE([1.6 dist-xz]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## From d609ed1ecc149f69df8471f0bb819955e960069a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 11 Nov 2014 10:26:36 +0100 Subject: [PATCH 269/347] build: Remove bzip2 tarballs from distcheck When adding xz as third compression format in May 2014 I mentioned that I'm going to remove bzip2 in favor of xz in 1.12. I heard no complains but I left it in for 1.12. With 1.13 starting its time to remove it. From now on it will be only gz and xz compressed tarballs. --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index ccabd5ef23..37177f41b9 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -28,7 +28,7 @@ AC_CONFIG_HEADERS([config.h]) AC_USE_SYSTEM_EXTENSIONS AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz]) +AM_INIT_AUTOMAKE([1.6 dist-xz]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_LANG([C]) From 5cfc341f8c624e8e638154f066251a7e6243fe47 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Jan 2015 14:09:20 +0100 Subject: [PATCH 270/347] release: Update NEWS and bump version for 1.13.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 7 ++++++- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 0d5e1a5e4c..07f4f3f2b2 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,9 @@ -Evas Generic Loaders 1.12.0 +Evas Generic Loaders 1.13.0 + +Changes since 1.12.0: +--------------------- + + * No relevant changes. Changes since 1.11.0: --------------------- diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index f3980a42c9..4be8278d6d 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [12]) -m4_define([v_mic], [99]) +m4_define([v_min], [13]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From b2acbad301f1c132d248625c2766f340d627360a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Jan 2015 14:10:20 +0100 Subject: [PATCH 271/347] release: Update NEWS and bump version for 1.13.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 7 ++++++- legacy/emotion_generic_players/configure.ac | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index e286650d98..26600f3688 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,4 +1,9 @@ -Emotion Generic Players 1.12.0 +Emotion Generic Players 1.13.0 + +Changes since 1.12.0: +--------------------- + +No significant changes in this release. Changes since 1.11.0: --------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 37177f41b9..c3f86937a4 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [12]) -m4_define([v_mic], [99]) +m4_define([v_min], [13]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From bad00245f76b2d53bd7276956328c64b55c5be20 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 Jan 2015 15:10:33 +0100 Subject: [PATCH 272/347] release: Update NEWS and bump version for 1.13.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index c3f86937a4..a535aa5028 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From c731a6929a4d3aaf8e77ab280a2444e03bab2d98 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 Jan 2015 15:09:26 +0100 Subject: [PATCH 273/347] release: Update NEWS and bump version for 1.13.0-beta1 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 4be8278d6d..b54ba305db 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From c566139277aec206e7d235bbd43349f48d328312 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 Jan 2015 13:27:19 +0100 Subject: [PATCH 274/347] release: Update NEWS and bump version for 1.13.0-beta2 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index b54ba305db..33e32814b1 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 0298af3f9291f621482d902014de8096891680b8 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 Jan 2015 13:27:54 +0100 Subject: [PATCH 275/347] release: Update NEWS and bump version for 1.13.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index a535aa5028..171a3d2450 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From d9eee6a0a84fd4e29023edcfee09d71f94e93904 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 3 Feb 2015 10:14:21 +0100 Subject: [PATCH 276/347] release: Update NEWS and bump version for 1.13.0-beta3 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 33e32814b1..79791971a2 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 4d5cfe2d24e510730e9defc9ef1098669c33aefb Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 3 Feb 2015 10:17:21 +0100 Subject: [PATCH 277/347] release: Update NEWS and bump version for 1.13.0-beta3 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 171a3d2450..be3c5d5b98 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From bbaf4865537b50003cb74919428f130c06443e58 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Feb 2015 13:34:01 +0100 Subject: [PATCH 278/347] release: Update NEWS and bump version for 1.13.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 79791971a2..6734317099 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 0a12c7c3e42644e111e758e48ce9d9f9827beea6 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Feb 2015 13:34:35 +0100 Subject: [PATCH 279/347] release: Update NEWS and bump version for 1.13.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index be3c5d5b98..9f00d54e0f 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From fee0c2a3af5bf83ab45908624c90f35c72d18385 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Feb 2015 14:10:12 +0100 Subject: [PATCH 280/347] configure: Switch to dev mode again. Merge window for 1.14 is open now. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 6734317099..7e1358461f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [13]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From 52932e89cdba93b757656fe0b07bcea700403d57 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Feb 2015 14:10:55 +0100 Subject: [PATCH 281/347] configure: Switch to dev mode again. Merge window for 1.14 is open now. --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 9f00d54e0f..d588a8fb8c 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [13]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From 7e544dccf46c2bbf67bbb4930f843c3f059c8e4d Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 6 Mar 2015 10:44:50 +0100 Subject: [PATCH 282/347] pdf: Add support for changes with poppler >= 0.31 With 0.31 poppler removed some parts of GlobalParams which they do not consider a public API. The antialias setting can now be done over the output device. Fixes T2184 @fix --- legacy/evas_generic_loaders/configure.ac | 14 ++++++++++++-- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 10 ++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 7e1358461f..1079c6e908 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -73,15 +73,25 @@ if test "x${want_poppler}" = "xyes" ; then [have_poppler="no"]) if test "x${have_poppler}" = "xno" ; then - PKG_CHECK_EXISTS([poppler >= 0.20], + PKG_CHECK_EXISTS([poppler >= 0.20 poppler < 0.31], [ - poppler_pc="poppler >= 0.20" + poppler_pc="poppler >= 0.20 poppler < 0.31" AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) have_poppler="yes" ], [have_poppler="no"]) fi + if test "x${have_poppler}" = "xno" ; then + PKG_CHECK_EXISTS([poppler >= 0.31], + [ + poppler_pc="poppler >= 0.31" + AC_DEFINE(HAVE_POPPLER_031, 1, [Have poppler 0.31]) + have_poppler="yes" + ], + [have_poppler="no"]) + fi + if test "x${have_poppler}" = "xyes" ; then PKG_CHECK_MODULES([POPPLER], [${poppler_pc}], [have_poppler="yes"], diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index a68b21f0f0..78f918e357 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -62,10 +62,12 @@ Eina_Bool poppler_init(const char *file, int page_nbr, int size_w, int size_h) if (!eina_init()) goto del_global_param; +#ifndef HAVE_POPPLER_031 if (globalParams->getAntialias()) globalParams->setAntialias((char *)"yes"); if (globalParams->getVectorAntialias()) globalParams->setVectorAntialias((char *)"yes"); +#endif pdfdoc = new PDFDoc(new GooString(file), NULL); if (!pdfdoc) @@ -161,7 +163,7 @@ void poppler_load_image(int size_w, int size_h) if (!output_dev) return; -#ifdef HAVE_POPPLER_020 +#if defined(HAVE_POPPLER_020) || defined(HAVE_POPPLER_031) output_dev->startDoc(pdfdoc); #else output_dev->startDoc(pdfdoc->getXRef()); @@ -169,8 +171,12 @@ void poppler_load_image(int size_w, int size_h) if (dpi <= 0.0) dpi = DEF_DPI; +#ifdef HAVE_POPPLER_031 + output_dev->setFontAntialias(EINA_TRUE); + output_dev->setVectorAntialias(EINA_TRUE); +#endif -#ifdef HAVE_POPPLER_020 +#if defined(HAVE_POPPLER_020) || defined(HAVE_POPPLER_031) page->displaySlice(output_dev, dpi, dpi, 0, false, false, 0, 0, width, height, From c6fe65190bb9361c50d44c3e0c293fb3c1eaccd4 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 7 Apr 2015 14:25:41 +0200 Subject: [PATCH 283/347] release: Update NEWS and bump version for 1.14.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 11 ++++++++++- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 07f4f3f2b2..8175b044c4 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,4 +1,13 @@ -Evas Generic Loaders 1.13.0 +=========================== +Evas Generic Loaders 1.14.0 +=========================== + +Changes since 1.13.0: +--------------------- + +Fixes: + + * pdf: Add support for changes with poppler >= 0.31 (T2184) Changes since 1.12.0: --------------------- diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 1079c6e908..a3c60d19a6 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [13]) -m4_define([v_mic], [99]) +m4_define([v_min], [14]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From ed95e46ee6efaaa904737827a47c480de6509ae7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 7 Apr 2015 14:26:54 +0200 Subject: [PATCH 284/347] release: Update NEWS and bump version for 1.14.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 9 ++++++++- legacy/emotion_generic_players/configure.ac | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index 26600f3688..94d3cdec7d 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,4 +1,11 @@ -Emotion Generic Players 1.13.0 +============================== +Emotion Generic Players 1.14.0 +============================== + +Changes since 1.13.0: +--------------------- + +No significant changes in this release. Changes since 1.12.0: --------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index d588a8fb8c..becefb53d8 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [13]) -m4_define([v_mic], [99]) +m4_define([v_min], [14]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 82c6e479b1b453d50f70f531240314d1daa9e64c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 13 Apr 2015 16:10:58 +0200 Subject: [PATCH 285/347] release: Update NEWS and bump version for 1.14.0-beta1 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index a3c60d19a6..d56d6a1fee 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 34aa385d5742bfddc1845f14226b4264e5e6f1c7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 13 Apr 2015 16:11:45 +0200 Subject: [PATCH 286/347] release: Update NEWS and bump version for 1.14.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index becefb53d8..fe83562f22 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 8047d9ba605d628d923902a125bd1d9d86b57aec Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 20 Apr 2015 12:36:41 +0200 Subject: [PATCH 287/347] release: Update NEWS and bump version for 1.14.0-beta2 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index d56d6a1fee..5d6fc1cdf3 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 8f39dba4c80d37e9b5d9bdf71fe22e52bde2d20a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 20 Apr 2015 12:37:25 +0200 Subject: [PATCH 288/347] release: Update NEWS and bump version for 1.14.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index fe83562f22..008e709ffe 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 81c36d771bb806b081931ee1c2e7468bc612d543 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 27 Apr 2015 14:47:21 +0200 Subject: [PATCH 289/347] release: Update NEWS and bump version for 1.14.0-beta3 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 5d6fc1cdf3..c8a585d6f9 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From af35f43ab4d79990d0c0507f6cf2803dda313081 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 27 Apr 2015 14:48:05 +0200 Subject: [PATCH 290/347] release: Update NEWS and bump version for 1.14.0-beta3 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 008e709ffe..04f01f4ac3 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 0b61e3254fd1c769a08419d60ea19f0bfd80b462 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 6 May 2015 15:28:20 +0200 Subject: [PATCH 291/347] release: Update NEWS and bump version for 1.14.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index c8a585d6f9..d71fec1660 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 4173b271cea9363941f2bc819f801642608c3d38 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 6 May 2015 15:29:03 +0200 Subject: [PATCH 292/347] release: Update NEWS and bump version for 1.14.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 04f01f4ac3..882f29634b 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From f89e8a93480c1f9f6e9b785ca0816318ae0d5318 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 6 May 2015 16:01:05 +0200 Subject: [PATCH 293/347] configure: Switch to dev mode again. Merge window for 1.15 is open now. --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index d71fec1660..f6e1296bb5 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [14]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From b9c18a968917ecf1e519e55b022a12b5e8b9118a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 6 May 2015 16:01:28 +0200 Subject: [PATCH 294/347] configure: Switch to dev mode again. Merge window for 1.15 is open now. --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 882f29634b..38ed771380 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [14]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From 8087933c2200a9c52efe0d862dd143567d4e835a Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Thu, 9 Jul 2015 04:28:30 +0900 Subject: [PATCH 295/347] release: Update NEWS and bump version for 1.15.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 7 ++++++- legacy/emotion_generic_players/configure.ac | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index 94d3cdec7d..ed7e089d81 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,7 +1,12 @@ ============================== -Emotion Generic Players 1.14.0 +Emotion Generic Players 1.15.0 ============================== +Changes since 1.14.0: +--------------------- + +No significant changes in this release. + Changes since 1.13.0: --------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 38ed771380..0aa5048f5f 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [14]) -m4_define([v_mic], [99]) +m4_define([v_min], [15]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 85c8c5000dcd610e4ef943638dbae1a8057f8dd8 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Thu, 9 Jul 2015 04:29:59 +0900 Subject: [PATCH 296/347] release: Update NEWS and bump version for 1.15.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 7 ++++++- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 8175b044c4..bd168ab08a 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,7 +1,12 @@ =========================== -Evas Generic Loaders 1.14.0 +Evas Generic Loaders 1.15.0 =========================== +Changes since 1.14.0: +--------------------- + +No significant changes in this release. + Changes since 1.13.0: --------------------- diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index f6e1296bb5..95ee081e8f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [14]) -m4_define([v_mic], [99]) +m4_define([v_min], [15]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From e3ff8ffe7db1a78c9c59999803262da8d6ca1b09 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 14 Jul 2015 00:11:54 +0900 Subject: [PATCH 297/347] release: Update NEWS and bump version for 1.15.0-beta1 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 95ee081e8f..fdc7c54558 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 89727d8718eddfd6edebd31059ce2e691a546a55 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 14 Jul 2015 00:13:36 +0900 Subject: [PATCH 298/347] release: Update NEWS and bump version for 1.15.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 0aa5048f5f..4fc3a1bdac 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 20bbe267280171d4ea2e9823f07a80d4ca5fc534 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 21 Jul 2015 08:35:13 +0900 Subject: [PATCH 299/347] release: Update NEWS and bump version for 1.15.0-beta2 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index fdc7c54558..b21316e62f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 7680d73d6ab917c56a0acd2375935fdf605b8c56 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 21 Jul 2015 08:35:45 +0900 Subject: [PATCH 300/347] release: Update NEWS and bump version for 1.15.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 4fc3a1bdac..bf600c5e58 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 19cc89f2bae62cdcef38b67d9f5e2268de669275 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 28 Jul 2015 01:42:05 +0900 Subject: [PATCH 301/347] release: Update NEWS and bump version for 1.15.0-beta3 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index b21316e62f..bd43d712fa 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 13c18707ef0f5d993e909a3a28940db942349963 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 28 Jul 2015 01:42:34 +0900 Subject: [PATCH 302/347] release: Update NEWS and bump version for 1.15.0-beta3 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index bf600c5e58..1d9d1b54fa 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 83253a84e732738ed799c7743a61ae0373a8976c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 4 Aug 2015 11:18:27 +0200 Subject: [PATCH 303/347] release: Update NEWS and bump version for 1.15.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index bd43d712fa..41ed9f024f 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 37380956078c1e82370fc87970d2d026ac9d4ec6 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 4 Aug 2015 11:19:16 +0200 Subject: [PATCH 304/347] release: Update NEWS and bump version for 1.15.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 1d9d1b54fa..e3a7b1a992 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 1908d08a7df272d8a35f57737ad70094f3dafd5b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 4 Aug 2015 11:44:46 +0200 Subject: [PATCH 305/347] configure: Switch to dev mode again. Merge window for 1.16 is open now --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index e3a7b1a992..c1995f8071 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [15]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From df47798bba6ca9de3d6017f32822fbe026c7bfbd Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 4 Aug 2015 11:45:46 +0200 Subject: [PATCH 306/347] configure: Switch to dev mode again. Merge window for 1.16 is open now --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 41ed9f024f..aa7f20918e 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [15]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From a673ffa1bd1d9e548efb0fa3dc32fc54fd723d86 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 11 Aug 2015 21:34:48 +0900 Subject: [PATCH 307/347] generic loaders - fix load if process esits before stdout produced i found that generic loaders broke on my machine. stdout was never reaching the app. child process exited and never sent stdout before parent got anything - it all was lost in buffers somewhere. this fixes it. fflush stdout. nasty little bugger. @fix --- legacy/evas_generic_loaders/src/bin/gst/main.c | 2 +- legacy/evas_generic_loaders/src/bin/gst/main_0_10.c | 2 +- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 2 +- legacy/evas_generic_loaders/src/bin/ps/main.c | 2 +- legacy/evas_generic_loaders/src/bin/raw/main.c | 1 + legacy/evas_generic_loaders/src/bin/svg/main.c | 1 + legacy/evas_generic_loaders/src/bin/xcf/main.c | 1 + 7 files changed, 7 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c index 77f3910949..d9e6fa786c 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main.c @@ -287,6 +287,6 @@ main(int argc, char **argv) printf("done\n"); _gst_shutdown(); - + fflush(stdout); return 0; } diff --git a/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c b/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c index c6e4dd03fb..3e0c02b823 100644 --- a/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c +++ b/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c @@ -273,6 +273,6 @@ main(int argc, char **argv) printf("done\n"); _gst_shutdown(); - + fflush(stdout); return 0; } diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 78f918e357..d2cf8562f7 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -350,6 +350,6 @@ main(int argc, char **argv) eina_tmpstr_del(tmpdir); eina_tmpstr_del(generated); } - + fflush(stdout); return 0; } diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index a994ec2dab..92c29a782a 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -284,6 +284,6 @@ main(int argc, char **argv) printf("done\n"); _spectre_shutdown(); - + fflush(stdout); return 0; } diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index 2e361198c5..bceb9ff666 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -235,6 +235,7 @@ int main(int argc, char **argv) } } _raw_shutdown(); + fflush(stdout); return 0; } diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/legacy/evas_generic_loaders/src/bin/svg/main.c index b6c844cf3e..5fc7912e87 100644 --- a/legacy/evas_generic_loaders/src/bin/svg/main.c +++ b/legacy/evas_generic_loaders/src/bin/svg/main.c @@ -223,6 +223,7 @@ int main(int argc, char **argv) } } _svg_shutdown(); + fflush(stdout); return 0; } diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 48f2751b89..7b798cacac 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -1726,5 +1726,6 @@ main(int argc, char **argv) else printf("done\n"); xcf_cleanup(); + fflush(stdout); return 0; } From fb491cf62936c47736b39bc96d90850417c0b809 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 11 Aug 2015 09:43:15 -0400 Subject: [PATCH 308/347] evas-generic-loaders: Remove unused variable Summary: This removes an unused variable in the pdf loader Signed-off-by: Chris Michael --- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index d2cf8562f7..8164d5fcaa 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -46,7 +46,6 @@ double dpi = -1.0; Eina_Bool poppler_init(const char *file, int page_nbr, int size_w, int size_h) { Object obj; - SplashColor white; double w, h, cw, ch; int rot; From 9ae9062422e65d5ea26ff6999ebc6064f25086a9 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 11 Aug 2015 09:44:38 -0400 Subject: [PATCH 309/347] evas-generic-loaders: Add missing EINA_UNUSED Summary: This adds missing EINA_UNUSED for function paramaters which are not being used Signed-off-by: Chris Michael --- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 8164d5fcaa..7eaca4ed88 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -145,7 +145,7 @@ void poppler_shutdown() delete globalParams; } -void poppler_load_image(int size_w, int size_h) +void poppler_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED) { SplashOutputDev *output_dev; SplashColor white; From 8546c83d5384a869ce0f3848c444f46a54b0cacc Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 5 Oct 2015 16:40:37 +0200 Subject: [PATCH 310/347] release: Update NEWS and bump version for 1.16.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 9 ++++++++- legacy/evas_generic_loaders/configure.ac | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index bd168ab08a..3684af3f53 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,7 +1,14 @@ =========================== -Evas Generic Loaders 1.15.0 +Evas Generic Loaders 1.16.0 =========================== +Changes since 1.15.0: +--------------------- + +Fixes: + + * generic loaders - fix load if process esits before stdout produced + Changes since 1.14.0: --------------------- diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index aa7f20918e..1742a3949a 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [15]) -m4_define([v_mic], [99]) +m4_define([v_min], [16]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 841283eade019406f145aab3891c927eb8413280 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 5 Oct 2015 16:41:41 +0200 Subject: [PATCH 311/347] release: Update NEWS and bump version for 1.16.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 7 ++++++- legacy/emotion_generic_players/configure.ac | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index ed7e089d81..a29c62193f 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,7 +1,12 @@ ============================== -Emotion Generic Players 1.15.0 +Emotion Generic Players 1.16.0 ============================== +Changes since 1.15.0: +--------------------- + +No significant changes in this release. + Changes since 1.14.0: --------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index c1995f8071..207aa5f2ec 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,13 +1,13 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [15]) -m4_define([v_mic], [99]) +m4_define([v_min], [16]) +m4_define([v_mic], [0]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) +m4_define([relname], [release]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From c8bf8aab056858bfb70e911db013e24a521f1326 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Oct 2015 12:04:18 +0200 Subject: [PATCH 312/347] release: Update NEWS and bump version for 1.16.0-beta1 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 1742a3949a..70b0e27408 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 83f08f410da12926a6d981401ac47473b31bd02f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Oct 2015 12:08:53 +0200 Subject: [PATCH 313/347] release: Update NEWS and bump version for 1.16.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 207aa5f2ec..293afaf030 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From e09fe7b1e1c05179d013f95ad4d83efd3c53e861 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 Oct 2015 13:53:52 +0200 Subject: [PATCH 314/347] release: Update NEWS and bump version for 1.16.0-beta2 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 70b0e27408..aac304a0f2 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From d656c30ebdd8587278d4e0d13f17b6b6c436445b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 Oct 2015 13:54:35 +0200 Subject: [PATCH 315/347] release: Update NEWS and bump version for 1.16.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 293afaf030..31895a2d80 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From b085e8066a696ec10b9e10b26957a486479845ca Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 Oct 2015 03:57:23 +0100 Subject: [PATCH 316/347] release: Update NEWS and bump version for 1.16.0-beta3 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index aac304a0f2..7c5acf9a46 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 624e67ec5f04f63eae76c61c3d99deb27e700ea6 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 Oct 2015 03:58:15 +0100 Subject: [PATCH 317/347] release: Update NEWS and bump version for 1.16.0-beta3 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 31895a2d80..963d0d8df2 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 99c39efef4686c5099c3c7321176b7fa3021aa7d Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 11:06:45 +0100 Subject: [PATCH 318/347] release: Update NEWS and bump version for 1.16.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 7c5acf9a46..c6f568edd4 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -17,7 +17,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([evas_generic_loaders], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From fd5c45e9fd73aa66b0a9677bd6c88812bcf121ca Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 11:07:31 +0100 Subject: [PATCH 319/347] release: Update NEWS and bump version for 1.16.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 963d0d8df2..c75d488f9e 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([emotion_generic_players], [v_ver-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 53fab398d035ffa311e9aa7d31cb4add813b9b92 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 11:47:13 +0100 Subject: [PATCH 320/347] configure: Switch to dev mode again. Merge window for 1.17 is open now --- legacy/emotion_generic_players/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index c75d488f9e..a526807fb1 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [16]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], From 9834f8b073ea4cfa70a14c6e84e64fd65faf0cfe Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 11:47:42 +0100 Subject: [PATCH 321/347] configure: Switch to dev mode again. Merge window for 1.17 is open now --- legacy/evas_generic_loaders/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index c6f568edd4..ed0da4cb97 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -2,12 +2,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [16]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [release]) +m4_define([relname], [dev]) dnl m4_define([v_rel], [-release relname]) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) From db9ef84894334120e8193f02e2a4a2616b0cf922 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 16:06:16 +0100 Subject: [PATCH 322/347] build: use the same version handling macros as efl and elementary Instead of having our slightly different set of macros here for version handling switch to the efl.m4 file we are already using. This annoyed me since I took over the release handling 2 years back. --- legacy/evas_generic_loaders/configure.ac | 41 +-- legacy/evas_generic_loaders/m4/efl.m4 | 449 +++++++++++++++++++++++ 2 files changed, 452 insertions(+), 38 deletions(-) create mode 100644 legacy/evas_generic_loaders/m4/efl.m4 diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index ed0da4cb97..0db5f25a37 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,23 +1,5 @@ -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_define([v_maj], [1]) -m4_define([v_min], [16]) -m4_define([v_mic], [99]) -dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) -##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) -##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) -dnl m4_define([v_rel], [-release relname]) -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])]) -m4_define([lt_cur], m4_eval(v_maj + v_min)) -m4_define([lt_rev], v_mic) -m4_define([lt_age], v_min) -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## - -AC_INIT([evas_generic_loaders], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +EFL_VERSION([1], [16], [99], [dev]) +AC_INIT([evas_generic_loaders], [efl_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) @@ -27,23 +9,6 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.6 dist-xz]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_ifdef([v_rev], , [m4_define([v_rev], [0])]) -m4_ifdef([v_rel], , [m4_define([v_rel], [])]) -AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version]) -AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version]) -AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version]) -AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison]) -version_info="lt_cur:lt_rev:lt_age" -release_info="v_rel" -AC_SUBST(version_info) -AC_SUBST(release_info) -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -VMAJ=v_maj -AC_SUBST(VMAJ) - ### Needed information AC_CANONICAL_BUILD @@ -266,7 +231,7 @@ echo echo echo echo "------------------------------------------------------------------------" -echo "$PACKAGE $VERSION" +echo "$PACKAGE_NAME $PACKAGE_VERSION" echo "------------------------------------------------------------------------" echo echo diff --git a/legacy/evas_generic_loaders/m4/efl.m4 b/legacy/evas_generic_loaders/m4/efl.m4 new file mode 100644 index 0000000000..3598ce78fe --- /dev/null +++ b/legacy/evas_generic_loaders/m4/efl.m4 @@ -0,0 +1,449 @@ +dnl file to manage modules in efl + +dnl EFL_VERSION(major, minor, micro, release) +dnl This setup EFL version information and should be called BEFORE AC_INIT(). +dnl +dnl release parameter is 'dev' to use from SVN or libtool -release field. +dnl It may be empty if not dev (svn/live build) and no -release is to be used. +dnl +dnl Examples: +dnl EFL_VERSION(1, 7, 99, dev) +dnl EFL_VERSION(1, 7, 99, ver-1234) +dnl This will define couple of m4 symbols: +dnl v_maj = given major number (first parameter) +dnl v_min = given minor number (second parameter) +dnl v_mic = given micro number (third parameter) +dnl v_rev = if release, it's 0, otherwise it's dev_version. +dnl v_rel = if release, it's -release followed by fourth parameter, +dnl otherwise it's empty. (mostly for libtool) +dnl efl_version = if release, it's major.minor.micro, otherwise it's +dnl major.minor.micro.dev_version +dnl dev_version = development version (svn revision). +dnl def_build_profile = dev or release based on 'dev' release parameter. +AC_DEFUN([EFL_VERSION], +[dnl +m4_define([v_maj], [$1])dnl +m4_define([v_min], [$2])dnl +m4_define([v_mic], [$3])dnl +m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl +m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl +m4_define([v_rel], [])dnl +m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl +m4_define([efl_version], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl +dnl m4_define([efl_version], [v_maj.v_min.v_mic])dnl +]) + +dnl EFL_COLOR +dnl will check if terminal supports color and if color is wanted by user. +dnl +dnl Used Variables: +dnl WANT_COLOR: if no, forces no color output. +dnl TERM: used to check if color should be enabled. +dnl +dnl Defined Variables: +dnl COLOR_YES: to be used in positive/yes conditions +dnl COLOR_NO: to be used in negative/no conditions +dnl COLOR_OTHER: to be used to highlight some other condition +dnl COLOR_RESET: to reset color +dnl want_color: yes or no +AC_DEFUN([EFL_COLOR], +[dnl +case "$TERM" in + xterm|xterm-color|xterm-256color|Eterm|aterm|kterm|rxvt*|screen|gnome|interix) + want_color="${WANT_COLOR:-yes}" + ;; + *) + want_color="no" + ;; +esac + +### echo compatibility + +## the BSD echo does not have the -e option (it is the default behaviour) +echo_e= +if test "`echo -e x`" = "x"; then + echo_e=-e +fi +AC_SUBST([ECHO_E], [${echo_e}]) + +if test "${want_color}" = "yes"; then + COLOR_YES=`echo $echo_e "\033@<:@1;32m"` + COLOR_NO=`echo $echo_e "\033@<:@1;31m"` + COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"` + COLOR_RESET=`echo $echo_e "\033@<:@0m"` +else + COLOR_YES="" + COLOR_NO="" + COLOR_OTHER="" + COLOR_RESET="" +fi +]) + +dnl EFL_INIT() +dnl Will AC_DEFINE() the following: +dnl VMAJ = v_maj +dnl VMIN = v_min +dnl VMIC = v_mic +dnl VREV = v_rev +dnl Will AC_SUBST() the following: +dnl VMAJ = v_maj +dnl VMIN = v_min +dnl VMIC = v_mic +dnl EFL_LTLIBRARY_FLAGS="-no-undefined -version-info ..." +dnl EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" +dnl Will define the following m4: +dnl lt_cur = libtool 'current' field of libtool's -version-info +dnl lt_rev = libtool 'revision' field of libtool's -version-info +dnl lt_age = libtool 'age' field of libtool's -version-info +AC_DEFUN([EFL_INIT], +[dnl +AC_REQUIRE([EFL_COLOR])dnl +AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl +AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl +AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl +AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl +VMAJ=v_maj +VMIN=v_min +VMIC=v_mic +AC_SUBST([VMAJ])dnl +AC_SUBST([VMIN])dnl +AC_SUBST([VMIC])dnl +dnl +dnl TODO: warning - lt_cur: +dnl the previous code assumed v_maj + v_min, but this will be a problem when +dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped +dnl we multiply it by 100. +m4_define([lt_cur], m4_if(m4_cmp(v_maj, 1), 0, m4_eval(v_maj + v_min), m4_eval(v_maj * 100 + v_min)))dnl +m4_define([lt_rev], v_mic)dnl +m4_define([lt_age], v_min)dnl +dnl +EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel" +AC_SUBST(EFL_LTLIBRARY_FLAGS)dnl +EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" +AC_SUBST([EFL_LTMODULE_FLAGS])dnl +AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel]) +]) + +dnl EFL_EVAL_PKGS(EFL) +dnl does PKG_CHECK_MODULES() for given EFL +AC_DEFUN([EFL_EVAL_PKGS], +[dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +if test "x${requirements_pc_deps_[]m4_defn([DOWNEFL])}" != "x"; then + PKG_CHECK_MODULES([$1], [${requirements_pc_deps_[]m4_defn([DOWNEFL])}]) +fi +m4_popdef([DOWNEFL])dnl +]) + +dnl EFL_INTERNAL_DEPEND_PKG(EFL, OTHEREFL) +dnl Adds a pkg-config dependency on another EFL. +AC_DEFUN([EFL_INTERNAL_DEPEND_PKG], +[dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl +dnl TODO: we need to fix the package config names for 2.0 +dnl TODO: and make them uniform in scheme. +depname="$2" +libdirname="m4_defn([DOWNOTHER])" +libname="m4_defn([DOWNOTHER])" +case "m4_defn([DOWNOTHER])" in + ethumb_client) + depname="ethumb_client" + ;; +esac +requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" +requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" +requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}" +requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_public_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}" +m4_popdef([DOWNOTHER])dnl +m4_popdef([DOWNEFL])dnl +]) + +dnl EFL_PLATFORM_DEPEND(EFL, PLATFORM) +dnl PLATFORM is one of: all, evil, escape, exotic +AC_DEFUN([EFL_PLATFORM_DEPEND], +[dnl +m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl +case "m4_defn([DOWNOTHER])" in + all) + if test "x${efl_lib_optional_evil}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [evil]) + elif test "x${efl_lib_optional_escape}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [escape]) + elif test "x${efl_lib_optional_exotic}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [exotic]) + fi + ;; + *) + if test "x${efl_lib_optional_[]m4_defn([DOWNOTHER])}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [$2]) + fi + ;; +esac +m4_popdef([DOWNOTHER])dnl +]) + +dnl EFL_CRYPTO_DEPEND(EFL) +dnl the given EFL will use/depend on system crypto settings +AC_DEFUN([EFL_CRYPTO_DEPEND], +[dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_crypto} ${requirements_pc_[][]m4_defn([DOWNEFL])}" +requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_crypto} ${requirements_pc_deps_[][]m4_defn([DOWNEFL])}" +requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_crypto} ${requirements_libs_[][]m4_defn([DOWNEFL])}" +requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_crypto} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" +m4_popdef([DOWNEFL])dnl +]) + +dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME, +dnl and inserts dependencies in proper variables +AC_DEFUN([EFL_DEPEND_PKG], +[dnl +m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl +m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl + + have_[]m4_defn([DOWNNAME])="no" + + EFL_PKG_CHECK_STRICT([$3], [ + AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.]) + requirements_pc_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_[][]m4_defn([DOWNEFL])}" + requirements_pc_deps_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_deps_[]m4_defn([DOWNEFL])}" + have_[]m4_defn([DOWNNAME])="yes" + + $4 + + ], [$5]) + +m4_popdef([DOWNNAME]) +m4_popdef([UPNAME]) +m4_popdef([DOWNEFL]) +m4_popdef([UPEFL]) +]) + +dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG], +[dnl +m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl + + have_[]m4_defn([DOWN])="no" + if test "x$2" = "xyes"; then + EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6]) + fi +m4_popdef([DOWN])dnl +]) + +dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) +AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG], +[dnl + if test "x$2" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [$3]) + fi +]) + +dnl EFL_ADD_LIBS(PKG, LIBS) +dnl Add libraries that the EFL library will depend on +dnl See EFL_DEPEND_PKG() for pkg-config version. +AC_DEFUN([EFL_ADD_LIBS], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2" +m4_popdef([DOWN])dnl +]) + +dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS) +dnl Add libraries that the EFL library will depend on when used. +dnl +dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG, +dnl this one is used when linking PKG to other libraries or applications. +dnl +dnl For instance if you use some other library in your header that user +dnl inclues. +AC_DEFUN([EFL_ADD_PUBLIC_LIBS], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2" +m4_popdef([DOWN])dnl +]) + +dnl EFL_ADD_CFLAGS(PKG, CFLAGS) +dnl Add CFLAGS that the EFL library will use +dnl See EFL_DEPEND_PKG() for pkg-config version. +AC_DEFUN([EFL_ADD_CFLAGS], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_cflags_[]m4_defn([DOWN])="${requirements_cflags_[]m4_defn([DOWN])} $2" +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_START(PKG) +dnl start the setup of an EFL library, defines variables and prints a notice +dnl +dnl Exports (AC_SUBST) +dnl PKG_CFLAGS: what to use for CFLAGS +dnl +dnl PKG_LDFLAGS: what to use for LDFLAGS +dnl +dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes +dnl everything else. +dnl +dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this +dnl package depend. Used in automake's _DEPENDENCIES. +dnl +dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using +dnl this PKG (PKG_LIBS + libpkg.la) +dnl +dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la +dnl +dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg, +dnl includes internal EFL (used in 'Requires.private' in pkg.pc) +dnl +dnl requirements_libs_pkg: external libraries this package needs when +dnl linking (used in 'Libs.private' in pkg.pc) +dnl +dnl requirements_public_libs_pkg: external libraries other packages need +dnl when using this (used in 'Libs' in pkg.pc) +dnl +dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS). +dnl +dnl Variables: +dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this +dnl pkg (used in EFL_EVAL_PKGS()) +dnl +dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la +dnl that this package depend. +dnl +dnl requirements_internal_deps_libs_pkg: external libraries that are public +dnl dependencies (due internal libs). +dnl +AC_DEFUN([EFL_LIB_START], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +requirements_internal_libs_[]m4_defn([DOWN])="" +requirements_internal_deps_libs_[]m4_defn([DOWN])="" +requirements_libs_[]m4_defn([DOWN])="" +requirements_public_libs_[]m4_defn([DOWN])="" +requirements_cflags_[]m4_defn([DOWN])="" +requirements_pc_[]m4_defn([DOWN])="" +requirements_pc_deps_[]m4_defn([DOWN])="" + +m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" +m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS}" +USE_[]m4_defn([UP])_LIBS="${USE_[]m4_defn([UP])_LIBS}" +USE_[]m4_defn([UP])_INTERNAL_LIBS="${USE_[]m4_defn([UP])_INTERNAL_LIBS}" +m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}" +m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" + +AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl +AC_SUBST(m4_defn([UP])[_LIBS])dnl +AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl +AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl +AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl +AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl +AC_SUBST(m4_defn([UP])[_CFLAGS])dnl +AC_MSG_NOTICE([Start $1 checks])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_END(PKG) +dnl finishes the setup of an EFL library +AC_DEFUN([EFL_LIB_END], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +libdirname="m4_defn([DOWN])" +libname="m4_defn([DOWN])" + +m4_defn([UP])_LDFLAGS="${EFLALL_COV_LDFLAGS} ${EFLALL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" +m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFLALL_COV_LIBS} ${EFLALL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_eflall} " +m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" +USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" +USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la" +m4_defn([UP])_CFLAGS="${EFLALL_COV_CFLAGS} ${EFLALL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} -I\$(top_srcdir)/src/bindings/${libdirname} -I\$(top_builddir)/src/bindings/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_eflall} -DEFL_[]m4_defn([UP])_BUILD=1" +requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_eflall}" +requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_eflall}" + +AC_MSG_NOTICE([Finished $1 checks])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_START_OPTIONAL(PKG, TEST) +dnl test if library should be build and then EFL_LIB_START() +dnl must call EFL_LIB_END_OPTIONAL() to close it. +AC_DEFUN([EFL_LIB_START_OPTIONAL], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +if $2; then + efl_lib_optional_[]m4_defn([DOWN])="yes" +else + efl_lib_optional_[]m4_defn([DOWN])="no" + AC_MSG_NOTICE([Skipping $1 checks (disabled)]) +fi + +if test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"; then + EFL_LIB_START([$1]) + AC_DEFINE([HAVE_]m4_defn([UP]), [1], [optional EFL $1 is enabled]) +dnl closed at EFL_LIB_END_OPTIONAL() +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_END_OPTIONAL(PKG) +dnl closes block started by EFL_LIB_START_OPTIONAL() and then +dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG]) +AC_DEFUN([EFL_LIB_END_OPTIONAL], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +dnl close if started at EFL_LIB_START_OPTIONAL() + EFL_LIB_END([$1]) +fi + +AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_ADD_FEATURE(PKG, NAME, [VALUE]) +dnl if VALUE is not specified, will use ${have_name} instead. +dnl +dnl Defined Variables: +dnl features_pkg +AC_DEFUN([EFL_ADD_FEATURE], +[dnl +m4_pushdef([DOWNPKG], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl + +value="m4_if($3, , [${have_]m4_defn([DOWNNAME])[:-${want_]m4_defn([DOWNNAME])[}}], [$3])" +case "${value}" in + yes) + tmp="${COLOR_YES}+$2${COLOR_RESET}" + ;; + no) + tmp="${COLOR_NO}-$2${COLOR_RESET}" + ;; + *) + tmp="${COLOR_OTHER}$2=${value}${COLOR_RESET}" + ;; +esac +if test -z "${features_[]m4_defn([DOWNPKG])}"; then + features_[]m4_defn([DOWNPKG])="${tmp}" +else + features_[]m4_defn([DOWNPKG])="${features_[]m4_defn([DOWNPKG])} ${tmp}" +fi +m4_popdef([DOWNNAME])dnl +m4_popdef([DOWNPKG])dnl +]) From ce482412495c24ded0448e788799f6949ec805ac Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 16:10:23 +0100 Subject: [PATCH 323/347] build: use the same version handling macros as efl and elementary Instead of having our slightly different set of macros here for version handling switch to the efl.m4 file we are already using. This annoyed me since I took over the release handling 2 years back. --- legacy/emotion_generic_players/configure.ac | 23 +- legacy/emotion_generic_players/m4/efl.m4 | 449 ++++++++++++++++++++ 2 files changed, 451 insertions(+), 21 deletions(-) create mode 100644 legacy/emotion_generic_players/m4/efl.m4 diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index a526807fb1..cfd9156b55 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,24 +1,5 @@ -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_define([v_maj], [1]) -m4_define([v_min], [16]) -m4_define([v_mic], [99]) -dnl m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n'])) -##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) -##-- When doing snapshots - change soname. remove dnl on below line -m4_define([relname], [dev]) -dnl m4_define([v_rel], [-release relname]) -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], -[m4_define([v_ver], [v_maj.v_min.v_mic])]) -m4_define([lt_cur], m4_eval(v_maj + v_min)) -m4_define([lt_rev], v_mic) -m4_define([lt_age], v_min) -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## - -AC_INIT([emotion_generic_players], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +EFL_VERSION([1], [16], [99], [dev]) +AC_INIT([emotion_generic_players], [efl_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/legacy/emotion_generic_players/m4/efl.m4 b/legacy/emotion_generic_players/m4/efl.m4 new file mode 100644 index 0000000000..3598ce78fe --- /dev/null +++ b/legacy/emotion_generic_players/m4/efl.m4 @@ -0,0 +1,449 @@ +dnl file to manage modules in efl + +dnl EFL_VERSION(major, minor, micro, release) +dnl This setup EFL version information and should be called BEFORE AC_INIT(). +dnl +dnl release parameter is 'dev' to use from SVN or libtool -release field. +dnl It may be empty if not dev (svn/live build) and no -release is to be used. +dnl +dnl Examples: +dnl EFL_VERSION(1, 7, 99, dev) +dnl EFL_VERSION(1, 7, 99, ver-1234) +dnl This will define couple of m4 symbols: +dnl v_maj = given major number (first parameter) +dnl v_min = given minor number (second parameter) +dnl v_mic = given micro number (third parameter) +dnl v_rev = if release, it's 0, otherwise it's dev_version. +dnl v_rel = if release, it's -release followed by fourth parameter, +dnl otherwise it's empty. (mostly for libtool) +dnl efl_version = if release, it's major.minor.micro, otherwise it's +dnl major.minor.micro.dev_version +dnl dev_version = development version (svn revision). +dnl def_build_profile = dev or release based on 'dev' release parameter. +AC_DEFUN([EFL_VERSION], +[dnl +m4_define([v_maj], [$1])dnl +m4_define([v_min], [$2])dnl +m4_define([v_mic], [$3])dnl +m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl +m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl +m4_define([v_rel], [])dnl +m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl +m4_define([efl_version], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl +dnl m4_define([efl_version], [v_maj.v_min.v_mic])dnl +]) + +dnl EFL_COLOR +dnl will check if terminal supports color and if color is wanted by user. +dnl +dnl Used Variables: +dnl WANT_COLOR: if no, forces no color output. +dnl TERM: used to check if color should be enabled. +dnl +dnl Defined Variables: +dnl COLOR_YES: to be used in positive/yes conditions +dnl COLOR_NO: to be used in negative/no conditions +dnl COLOR_OTHER: to be used to highlight some other condition +dnl COLOR_RESET: to reset color +dnl want_color: yes or no +AC_DEFUN([EFL_COLOR], +[dnl +case "$TERM" in + xterm|xterm-color|xterm-256color|Eterm|aterm|kterm|rxvt*|screen|gnome|interix) + want_color="${WANT_COLOR:-yes}" + ;; + *) + want_color="no" + ;; +esac + +### echo compatibility + +## the BSD echo does not have the -e option (it is the default behaviour) +echo_e= +if test "`echo -e x`" = "x"; then + echo_e=-e +fi +AC_SUBST([ECHO_E], [${echo_e}]) + +if test "${want_color}" = "yes"; then + COLOR_YES=`echo $echo_e "\033@<:@1;32m"` + COLOR_NO=`echo $echo_e "\033@<:@1;31m"` + COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"` + COLOR_RESET=`echo $echo_e "\033@<:@0m"` +else + COLOR_YES="" + COLOR_NO="" + COLOR_OTHER="" + COLOR_RESET="" +fi +]) + +dnl EFL_INIT() +dnl Will AC_DEFINE() the following: +dnl VMAJ = v_maj +dnl VMIN = v_min +dnl VMIC = v_mic +dnl VREV = v_rev +dnl Will AC_SUBST() the following: +dnl VMAJ = v_maj +dnl VMIN = v_min +dnl VMIC = v_mic +dnl EFL_LTLIBRARY_FLAGS="-no-undefined -version-info ..." +dnl EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" +dnl Will define the following m4: +dnl lt_cur = libtool 'current' field of libtool's -version-info +dnl lt_rev = libtool 'revision' field of libtool's -version-info +dnl lt_age = libtool 'age' field of libtool's -version-info +AC_DEFUN([EFL_INIT], +[dnl +AC_REQUIRE([EFL_COLOR])dnl +AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl +AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl +AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl +AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl +VMAJ=v_maj +VMIN=v_min +VMIC=v_mic +AC_SUBST([VMAJ])dnl +AC_SUBST([VMIN])dnl +AC_SUBST([VMIC])dnl +dnl +dnl TODO: warning - lt_cur: +dnl the previous code assumed v_maj + v_min, but this will be a problem when +dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped +dnl we multiply it by 100. +m4_define([lt_cur], m4_if(m4_cmp(v_maj, 1), 0, m4_eval(v_maj + v_min), m4_eval(v_maj * 100 + v_min)))dnl +m4_define([lt_rev], v_mic)dnl +m4_define([lt_age], v_min)dnl +dnl +EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel" +AC_SUBST(EFL_LTLIBRARY_FLAGS)dnl +EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" +AC_SUBST([EFL_LTMODULE_FLAGS])dnl +AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel]) +]) + +dnl EFL_EVAL_PKGS(EFL) +dnl does PKG_CHECK_MODULES() for given EFL +AC_DEFUN([EFL_EVAL_PKGS], +[dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +if test "x${requirements_pc_deps_[]m4_defn([DOWNEFL])}" != "x"; then + PKG_CHECK_MODULES([$1], [${requirements_pc_deps_[]m4_defn([DOWNEFL])}]) +fi +m4_popdef([DOWNEFL])dnl +]) + +dnl EFL_INTERNAL_DEPEND_PKG(EFL, OTHEREFL) +dnl Adds a pkg-config dependency on another EFL. +AC_DEFUN([EFL_INTERNAL_DEPEND_PKG], +[dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl +dnl TODO: we need to fix the package config names for 2.0 +dnl TODO: and make them uniform in scheme. +depname="$2" +libdirname="m4_defn([DOWNOTHER])" +libname="m4_defn([DOWNOTHER])" +case "m4_defn([DOWNOTHER])" in + ethumb_client) + depname="ethumb_client" + ;; +esac +requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" +requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" +requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}" +requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_public_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}" +m4_popdef([DOWNOTHER])dnl +m4_popdef([DOWNEFL])dnl +]) + +dnl EFL_PLATFORM_DEPEND(EFL, PLATFORM) +dnl PLATFORM is one of: all, evil, escape, exotic +AC_DEFUN([EFL_PLATFORM_DEPEND], +[dnl +m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl +case "m4_defn([DOWNOTHER])" in + all) + if test "x${efl_lib_optional_evil}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [evil]) + elif test "x${efl_lib_optional_escape}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [escape]) + elif test "x${efl_lib_optional_exotic}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [exotic]) + fi + ;; + *) + if test "x${efl_lib_optional_[]m4_defn([DOWNOTHER])}" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [$2]) + fi + ;; +esac +m4_popdef([DOWNOTHER])dnl +]) + +dnl EFL_CRYPTO_DEPEND(EFL) +dnl the given EFL will use/depend on system crypto settings +AC_DEFUN([EFL_CRYPTO_DEPEND], +[dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_crypto} ${requirements_pc_[][]m4_defn([DOWNEFL])}" +requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_crypto} ${requirements_pc_deps_[][]m4_defn([DOWNEFL])}" +requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_crypto} ${requirements_libs_[][]m4_defn([DOWNEFL])}" +requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_crypto} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" +m4_popdef([DOWNEFL])dnl +]) + +dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME, +dnl and inserts dependencies in proper variables +AC_DEFUN([EFL_DEPEND_PKG], +[dnl +m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl +m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl +m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl + + have_[]m4_defn([DOWNNAME])="no" + + EFL_PKG_CHECK_STRICT([$3], [ + AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.]) + requirements_pc_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_[][]m4_defn([DOWNEFL])}" + requirements_pc_deps_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_deps_[]m4_defn([DOWNEFL])}" + have_[]m4_defn([DOWNNAME])="yes" + + $4 + + ], [$5]) + +m4_popdef([DOWNNAME]) +m4_popdef([UPNAME]) +m4_popdef([DOWNEFL]) +m4_popdef([UPEFL]) +]) + +dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG], +[dnl +m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl + + have_[]m4_defn([DOWN])="no" + if test "x$2" = "xyes"; then + EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6]) + fi +m4_popdef([DOWN])dnl +]) + +dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) +AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG], +[dnl + if test "x$2" = "xyes"; then + EFL_INTERNAL_DEPEND_PKG([$1], [$3]) + fi +]) + +dnl EFL_ADD_LIBS(PKG, LIBS) +dnl Add libraries that the EFL library will depend on +dnl See EFL_DEPEND_PKG() for pkg-config version. +AC_DEFUN([EFL_ADD_LIBS], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2" +m4_popdef([DOWN])dnl +]) + +dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS) +dnl Add libraries that the EFL library will depend on when used. +dnl +dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG, +dnl this one is used when linking PKG to other libraries or applications. +dnl +dnl For instance if you use some other library in your header that user +dnl inclues. +AC_DEFUN([EFL_ADD_PUBLIC_LIBS], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2" +m4_popdef([DOWN])dnl +]) + +dnl EFL_ADD_CFLAGS(PKG, CFLAGS) +dnl Add CFLAGS that the EFL library will use +dnl See EFL_DEPEND_PKG() for pkg-config version. +AC_DEFUN([EFL_ADD_CFLAGS], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +requirements_cflags_[]m4_defn([DOWN])="${requirements_cflags_[]m4_defn([DOWN])} $2" +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_START(PKG) +dnl start the setup of an EFL library, defines variables and prints a notice +dnl +dnl Exports (AC_SUBST) +dnl PKG_CFLAGS: what to use for CFLAGS +dnl +dnl PKG_LDFLAGS: what to use for LDFLAGS +dnl +dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes +dnl everything else. +dnl +dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this +dnl package depend. Used in automake's _DEPENDENCIES. +dnl +dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using +dnl this PKG (PKG_LIBS + libpkg.la) +dnl +dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la +dnl +dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg, +dnl includes internal EFL (used in 'Requires.private' in pkg.pc) +dnl +dnl requirements_libs_pkg: external libraries this package needs when +dnl linking (used in 'Libs.private' in pkg.pc) +dnl +dnl requirements_public_libs_pkg: external libraries other packages need +dnl when using this (used in 'Libs' in pkg.pc) +dnl +dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS). +dnl +dnl Variables: +dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this +dnl pkg (used in EFL_EVAL_PKGS()) +dnl +dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la +dnl that this package depend. +dnl +dnl requirements_internal_deps_libs_pkg: external libraries that are public +dnl dependencies (due internal libs). +dnl +AC_DEFUN([EFL_LIB_START], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +requirements_internal_libs_[]m4_defn([DOWN])="" +requirements_internal_deps_libs_[]m4_defn([DOWN])="" +requirements_libs_[]m4_defn([DOWN])="" +requirements_public_libs_[]m4_defn([DOWN])="" +requirements_cflags_[]m4_defn([DOWN])="" +requirements_pc_[]m4_defn([DOWN])="" +requirements_pc_deps_[]m4_defn([DOWN])="" + +m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" +m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS}" +USE_[]m4_defn([UP])_LIBS="${USE_[]m4_defn([UP])_LIBS}" +USE_[]m4_defn([UP])_INTERNAL_LIBS="${USE_[]m4_defn([UP])_INTERNAL_LIBS}" +m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}" +m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" + +AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl +AC_SUBST(m4_defn([UP])[_LIBS])dnl +AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl +AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl +AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl +AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl +AC_SUBST(m4_defn([UP])[_CFLAGS])dnl +AC_MSG_NOTICE([Start $1 checks])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_END(PKG) +dnl finishes the setup of an EFL library +AC_DEFUN([EFL_LIB_END], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +libdirname="m4_defn([DOWN])" +libname="m4_defn([DOWN])" + +m4_defn([UP])_LDFLAGS="${EFLALL_COV_LDFLAGS} ${EFLALL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" +m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFLALL_COV_LIBS} ${EFLALL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_eflall} " +m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" +USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" +USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la" +m4_defn([UP])_CFLAGS="${EFLALL_COV_CFLAGS} ${EFLALL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} -I\$(top_srcdir)/src/bindings/${libdirname} -I\$(top_builddir)/src/bindings/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_eflall} -DEFL_[]m4_defn([UP])_BUILD=1" +requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_eflall}" +requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_eflall}" + +AC_MSG_NOTICE([Finished $1 checks])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_START_OPTIONAL(PKG, TEST) +dnl test if library should be build and then EFL_LIB_START() +dnl must call EFL_LIB_END_OPTIONAL() to close it. +AC_DEFUN([EFL_LIB_START_OPTIONAL], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +if $2; then + efl_lib_optional_[]m4_defn([DOWN])="yes" +else + efl_lib_optional_[]m4_defn([DOWN])="no" + AC_MSG_NOTICE([Skipping $1 checks (disabled)]) +fi + +if test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"; then + EFL_LIB_START([$1]) + AC_DEFINE([HAVE_]m4_defn([UP]), [1], [optional EFL $1 is enabled]) +dnl closed at EFL_LIB_END_OPTIONAL() +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_LIB_END_OPTIONAL(PKG) +dnl closes block started by EFL_LIB_START_OPTIONAL() and then +dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG]) +AC_DEFUN([EFL_LIB_END_OPTIONAL], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +dnl close if started at EFL_LIB_START_OPTIONAL() + EFL_LIB_END([$1]) +fi + +AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) + +dnl EFL_ADD_FEATURE(PKG, NAME, [VALUE]) +dnl if VALUE is not specified, will use ${have_name} instead. +dnl +dnl Defined Variables: +dnl features_pkg +AC_DEFUN([EFL_ADD_FEATURE], +[dnl +m4_pushdef([DOWNPKG], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl + +value="m4_if($3, , [${have_]m4_defn([DOWNNAME])[:-${want_]m4_defn([DOWNNAME])[}}], [$3])" +case "${value}" in + yes) + tmp="${COLOR_YES}+$2${COLOR_RESET}" + ;; + no) + tmp="${COLOR_NO}-$2${COLOR_RESET}" + ;; + *) + tmp="${COLOR_OTHER}$2=${value}${COLOR_RESET}" + ;; +esac +if test -z "${features_[]m4_defn([DOWNPKG])}"; then + features_[]m4_defn([DOWNPKG])="${tmp}" +else + features_[]m4_defn([DOWNPKG])="${features_[]m4_defn([DOWNPKG])} ${tmp}" +fi +m4_popdef([DOWNNAME])dnl +m4_popdef([DOWNPKG])dnl +]) From d54cf32f8961be599a33ed3784b123747b6f803f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 14:32:04 +0100 Subject: [PATCH 324/347] emotions_generic: make exit_func() static as it is only used in this file --- legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c index 0e328ca356..456509e673 100644 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c @@ -692,7 +692,7 @@ _dummy(void *data EINA_UNUSED, void *buffer EINA_UNUSED, unsigned int nbyte EINA } /* Main */ -Eina_Bool +static Eina_Bool exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) { DBG("Quit signal received !"); From de6120c8350fa6ecde82c6c128352057d58bc82f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 15:48:09 +0100 Subject: [PATCH 325/347] xcf: mark functions static if possible --- legacy/evas_generic_loaders/src/bin/xcf/main.c | 2 +- .../evas_generic_loaders/src/bin/xcf/pixelfuncs.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 7b798cacac..1cef05bf1a 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -448,7 +448,7 @@ extern void combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, /* ---------------------------------------------------------------------------- globals ------------ */ /* This makes using the Gimp sources easier */ -struct _GimpImage * image = &_image; +static struct _GimpImage * image = &_image; /* ------------------------------------------------------------------------------- code ------------ */ diff --git a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c index acddad3717..67d66d8129 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c @@ -36,7 +36,7 @@ #define INT_MULT(a,b,t) ((t) = (a) * (b) + 0x80, ((((t) >> 8) + (t)) >> 8)) #define LINEAR(x,y,w) ((w*y + x)*4) -void +static void rgb_to_hls (DATA8 *red, DATA8 *green, DATA8 *blue) { int r, g, b; @@ -96,7 +96,7 @@ rgb_to_hls (DATA8 *red, DATA8 *green, DATA8 *blue) } -DATA8 +static DATA8 gimp_hls_value (double n1, double n2, double hue) { double value; @@ -118,7 +118,7 @@ gimp_hls_value (double n1, double n2, double hue) } -void +static void hls_to_rgb (DATA8 *hue, DATA8 *lightness, DATA8 *saturation) { double h, l, s; @@ -152,7 +152,7 @@ hls_to_rgb (DATA8 *hue, DATA8 *lightness, DATA8 *saturation) } -void +static void rgb_to_hsv (DATA8 *red, DATA8 *green, DATA8 *blue) { int r, g, b; @@ -208,7 +208,7 @@ rgb_to_hsv (DATA8 *red, DATA8 *green, DATA8 *blue) *blue = v; } -void +static void hsv_to_rgb (DATA8 *hue, DATA8 *saturation, DATA8 *value) { double h, s, v; @@ -273,6 +273,7 @@ hsv_to_rgb (DATA8 *hue, DATA8 *saturation, DATA8 *value) } /* translate negative destinations */ +static void _clip(int * src_tl_x, int * src_tl_y, int * src_br_x, int * src_br_y, int * dest_x, int * dest_y, @@ -616,7 +617,7 @@ combine_pixels_overlay (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_ } -void +static void combine_pixels_hsv (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w, int dest_h, int dest_x, int dest_y, int mode) { int x, y, s_idx, d_idx; From a26e3dccb0ecbe91415f57ac4c7ae0321a60a49a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 16:02:02 +0100 Subject: [PATCH 326/347] common: mark local symbol static --- legacy/evas_generic_loaders/src/bin/common/shmfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.c b/legacy/evas_generic_loaders/src/bin/common/shmfile.c index 7a51eddb5a..538a3149a7 100644 --- a/legacy/evas_generic_loaders/src/bin/common/shmfile.c +++ b/legacy/evas_generic_loaders/src/bin/common/shmfile.c @@ -20,7 +20,7 @@ extern "C" { #endif int shm_fd = -1; -int shm_size = 0; +static int shm_size = 0; void *shm_addr = NULL; char *shmfile = NULL; From 34b1fbe46370b78012977794f7727ab97b42052f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 16:03:25 +0100 Subject: [PATCH 327/347] pdf: remove unused global variable This started out as a warning about a shadowed global variable but turned out to be an unused global variable as the one in local scope handles all cases. --- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index 7eaca4ed88..e33e18b566 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -33,7 +33,6 @@ PDFDoc *pdfdoc; bool locked = false; -SplashOutputDev *output_dev; ::Page *page; int width = 0, height = 0; From 7b00942dfd190f7e5ae33a8904cd99b8a0711297 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 16:10:19 +0100 Subject: [PATCH 328/347] pdf: avoid shadowing a global varibale by renaming oe in local scope The global page variable is actually a poppler type and the local one only the page number as int. --- legacy/evas_generic_loaders/src/bin/pdf/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp index e33e18b566..6b1de13ce0 100644 --- a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp +++ b/legacy/evas_generic_loaders/src/bin/pdf/main.cpp @@ -214,7 +214,7 @@ main(int argc, char **argv) int i; int size_w = 0, size_h = 0; int head_only = 0; - int page = 0; + int page_num = 0; if (argc < 2) return -1; // file is ALWAYS first arg, other options come after @@ -227,7 +227,7 @@ main(int argc, char **argv) else if (!strcmp(argv[i], "-key")) { i++; - page = atoi(argv[i]); + page_num = atoi(argv[i]); i++; } else if (!strcmp(argv[i], "-opt-scale-down-by")) @@ -251,7 +251,7 @@ main(int argc, char **argv) } D("dpi....: %f\n", dpi); - D("page...: %d\n", page); + D("page...: %d\n", page_num); // This is a funny hack to call an external tool to generate a pdf that will then be processed by poppler extension = strrchr(file, '.'); @@ -306,7 +306,7 @@ main(int argc, char **argv) // Now process the pdf (or the generated pdf) D("poppler_file_init\n"); - if (!poppler_init(file, page, size_w, size_h)) + if (!poppler_init(file, page_num, size_w, size_h)) return -1; D("poppler_file_init done\n"); From 449cc482226785bda147e6d66e8376931f109613 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 16:15:20 +0100 Subject: [PATCH 329/347] ps: mark local symbols static --- legacy/evas_generic_loaders/src/bin/ps/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/legacy/evas_generic_loaders/src/bin/ps/main.c index 92c29a782a..48e8a4b6f6 100644 --- a/legacy/evas_generic_loaders/src/bin/ps/main.c +++ b/legacy/evas_generic_loaders/src/bin/ps/main.c @@ -23,15 +23,15 @@ #endif -SpectreDocument *psdoc; -int page_count; +static SpectreDocument *psdoc; +static int page_count; -SpectrePage *page; +static SpectrePage *page; -int width = 0; -int height = 0; -void *data = NULL; -double dpi = -1.0; +static int width = 0; +static int height = 0; +static void *data = NULL; +static double dpi = -1.0; #define DEF_DPI 72.0 From e676088d5b585d9fef01612fcd13ab6627827bc1 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 16:20:34 +0100 Subject: [PATCH 330/347] raw: pass NULL to mmap() instead 0 for address Surprising to see this. mmap() expects a void * as address here. If we want to let the kernel choose the address we should really pass in NULL instead of the integer 0 --- legacy/evas_generic_loaders/src/bin/raw/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/legacy/evas_generic_loaders/src/bin/raw/main.c index bceb9ff666..ac9f810048 100644 --- a/legacy/evas_generic_loaders/src/bin/raw/main.c +++ b/legacy/evas_generic_loaders/src/bin/raw/main.c @@ -53,7 +53,7 @@ _raw_init(const char *file) if (stat(file, &ss)) goto close_file; seg_size = ss.st_size; - seg = mmap(0, seg_size, PROT_READ, MAP_SHARED, fd, 0); + seg = mmap(NULL, seg_size, PROT_READ, MAP_SHARED, fd, 0); if (seg == MAP_FAILED) goto close_file; D("raw_init\n"); From d85aef518b61fea8bc5ba82b527d48c931880f4f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 26 Nov 2015 23:31:45 +0100 Subject: [PATCH 331/347] xcf: fix indent for some code parts to match surroundings The file uses 3 spaces for initial indent while some code blocks have been added with two spaces. Purely cosmetic but found while playing around with smatch. --- .../evas_generic_loaders/src/bin/xcf/main.c | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/legacy/evas_generic_loaders/src/bin/xcf/main.c index 1cef05bf1a..373823bf32 100644 --- a/legacy/evas_generic_loaders/src/bin/xcf/main.c +++ b/legacy/evas_generic_loaders/src/bin/xcf/main.c @@ -665,11 +665,11 @@ xcf_load_image(void) /* restore the saved position so we'll be ready to * read the next offset. */ xcf_seek_pos (saved_pos); - } - /* If we were a Gimp we would now load the user-defined channels here ... */ - /* Flat-o-rama now :) */ - flatten_image(); - return; + } + /* If we were a Gimp we would now load the user-defined channels here ... */ + /* Flat-o-rama now :) */ + flatten_image(); + return; error: if (num_successful_elements == 0) goto hard_error; fprintf(stderr, "XCF: This file is corrupt! I have loaded as much\nof it as I can, but it is incomplete.\n"); @@ -758,18 +758,18 @@ xcf_load_layer(void) int type; char *name; - D("Loading one layer ...\n"); - /* read in the layer width, height and type */ - image->cp += xcf_read_int32(image->file, (DATA32 *)&width, 1); - image->cp += xcf_read_int32(image->file, (DATA32 *)&height, 1); - image->cp += xcf_read_int32(image->file, (DATA32 *)&type, 1); - image->cp += xcf_read_string(image->file, &name, 1); - /* ugly, I know */ - FREE(name); + D("Loading one layer ...\n"); + /* read in the layer width, height and type */ + image->cp += xcf_read_int32(image->file, (DATA32 *)&width, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&height, 1); + image->cp += xcf_read_int32(image->file, (DATA32 *)&type, 1); + image->cp += xcf_read_string(image->file, &name, 1); + /* ugly, I know */ + FREE(name); - /* create a new layer */ - layer = new_layer(width, height, type, 255, NORMAL_MODE); - if (!layer) return NULL; + /* create a new layer */ + layer = new_layer(width, height, type, 255, NORMAL_MODE); + if (!layer) return NULL; /* read in the layer properties */ if (!xcf_load_layer_props(layer)) goto error; From 2b9dfd57ace43e5c88a20b63f5be115004c6e69e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 5 Jan 2016 15:21:43 +0100 Subject: [PATCH 332/347] release: Update NEWS and bump version for 1.17.0-alpha1 release --- legacy/evas_generic_loaders/NEWS | 7 ++++++- legacy/evas_generic_loaders/configure.ac | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS index 3684af3f53..3928651cf2 100644 --- a/legacy/evas_generic_loaders/NEWS +++ b/legacy/evas_generic_loaders/NEWS @@ -1,7 +1,12 @@ =========================== -Evas Generic Loaders 1.16.0 +Evas Generic Loaders 1.17.0 =========================== +Changes since 1.16.0: +--------------------- + +No significant changes in this release. + Changes since 1.15.0: --------------------- diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 0db5f25a37..36f635161b 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,5 +1,5 @@ -EFL_VERSION([1], [16], [99], [dev]) -AC_INIT([evas_generic_loaders], [efl_version], [enlightenment-devel@lists.sourceforge.net]) +EFL_VERSION([1], [17], [0], [release]) +AC_INIT([evas_generic_loaders], [efl_version-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From b0143c53a214e75b9d008df14115a1d57eef9733 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 5 Jan 2016 15:22:51 +0100 Subject: [PATCH 333/347] release: Update NEWS and bump version for 1.17.0-alpha1 release --- legacy/emotion_generic_players/NEWS | 7 ++++++- legacy/emotion_generic_players/configure.ac | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS index a29c62193f..46eaa3e68b 100644 --- a/legacy/emotion_generic_players/NEWS +++ b/legacy/emotion_generic_players/NEWS @@ -1,7 +1,12 @@ ============================== -Emotion Generic Players 1.16.0 +Emotion Generic Players 1.17.0 ============================== +Changes since 1.16.0: +--------------------- + +No significant changes in this release. + Changes since 1.15.0: --------------------- diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index cfd9156b55..2ebb1049c3 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,5 +1,5 @@ -EFL_VERSION([1], [16], [99], [dev]) -AC_INIT([emotion_generic_players], [efl_version], [enlightenment-devel@lists.sourceforge.net]) +EFL_VERSION([1], [17], [0], [release]) +AC_INIT([emotion_generic_players], [efl_version-alpha1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 5089bd6072fe2407b7e9ae5fef17bb08c74ef617 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Jan 2016 12:56:01 +0100 Subject: [PATCH 334/347] release: Update NEWS and bump version for 1.17.0-beta1 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 36f635161b..43215416fe 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([evas_generic_loaders], [efl_version-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [efl_version-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From aa10b6fee116cf3ffcc378ed1e4751e6a741b649 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Jan 2016 12:57:28 +0100 Subject: [PATCH 335/347] release: Update NEWS and bump version for 1.17.0-beta1 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 2ebb1049c3..dd24655d45 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([emotion_generic_players], [efl_version-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [efl_version-beta1], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From d6501919a6f8365bf3c255059abf501f390372c9 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 18 Jan 2016 14:08:33 +0100 Subject: [PATCH 336/347] release: Update NEWS and bump version for 1.17.0-beta2 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 43215416fe..e4c1635e5a 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([evas_generic_loaders], [efl_version-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [efl_version-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 1e509418d5f5b7f389358c3dd90ecc7f4728f280 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 18 Jan 2016 14:09:13 +0100 Subject: [PATCH 337/347] release: Update NEWS and bump version for 1.17.0-beta2 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index dd24655d45..84bd98a05b 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([emotion_generic_players], [efl_version-beta1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [efl_version-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 0c0f8a4197e463236023ab253b79313f93f1d6f5 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 25 Jan 2016 17:57:54 +0100 Subject: [PATCH 338/347] release: Update NEWS and bump version for 1.17.0-beta3 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index e4c1635e5a..e7a1ef16cc 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([evas_generic_loaders], [efl_version-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [efl_version-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 499e42b3fd5d5a259e73b75c4c08777ff5e019d7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 25 Jan 2016 17:58:45 +0100 Subject: [PATCH 339/347] release: Update NEWS and bump version for 1.17.0-beta3 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 84bd98a05b..0f07bcd83e 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([emotion_generic_players], [efl_version-beta2], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [efl_version-beta3], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From 39eb30eb23d3802537d1e47dc85df35da00a5487 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 2 Feb 2016 10:46:01 +0100 Subject: [PATCH 340/347] release: Update NEWS and bump version for 1.17.0 release --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index e7a1ef16cc..557641bec3 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([evas_generic_loaders], [efl_version-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([evas_generic_loaders], [efl_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From af72dcc6bd1347c2ad020e4bf1a89383a6319541 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 2 Feb 2016 10:46:50 +0100 Subject: [PATCH 341/347] release: Update NEWS and bump version for 1.17.0 release --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index 0f07bcd83e..d2c035e939 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [17], [0], [release]) -AC_INIT([emotion_generic_players], [efl_version-beta3], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([emotion_generic_players], [efl_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) From a4705af6b9e6733e8609c32afcc8c20f29fda59a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 2 Feb 2016 11:20:41 +0100 Subject: [PATCH 342/347] configure: Switch to dev mode again. Merge window for 1.18 is now open. --- legacy/evas_generic_loaders/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac index 557641bec3..50e2745e38 100644 --- a/legacy/evas_generic_loaders/configure.ac +++ b/legacy/evas_generic_loaders/configure.ac @@ -1,4 +1,4 @@ -EFL_VERSION([1], [17], [0], [release]) +EFL_VERSION([1], [17], [99], [dev]) AC_INIT([evas_generic_loaders], [efl_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) From 2674c74e382eddbb7b1c193ac80717b6f5426c06 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 2 Feb 2016 11:21:21 +0100 Subject: [PATCH 343/347] configure: Switch to dev mode again. Merge window for 1.18 is now open. --- legacy/emotion_generic_players/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac index d2c035e939..5963ddffe5 100644 --- a/legacy/emotion_generic_players/configure.ac +++ b/legacy/emotion_generic_players/configure.ac @@ -1,4 +1,4 @@ -EFL_VERSION([1], [17], [0], [release]) +EFL_VERSION([1], [17], [99], [dev]) AC_INIT([emotion_generic_players], [efl_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([configure.ac]) From 36f15d761a2d39fc81c38a9db7b13d1d571ef453 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 1 Jun 2016 11:32:15 -0700 Subject: [PATCH 344/347] emotion: integrate generic legacy vlc support in the build system. --- AUTHORS | 21 + configure.ac | 5 +- legacy/emotion_generic_players/AUTHORS | 20 - m4/emotion_generic_players.m4 | 37 + src/Makefile_Emotion.am | 21 + src/generic/emotion/vlc/emotion_generic_vlc.c | 790 ++++++++++++++++++ 6 files changed, 873 insertions(+), 21 deletions(-) delete mode 100644 legacy/emotion_generic_players/AUTHORS create mode 100644 m4/emotion_generic_players.m4 create mode 100644 src/generic/emotion/vlc/emotion_generic_vlc.c diff --git a/AUTHORS b/AUTHORS index 8787d431bd..e5ed206c2d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -344,6 +344,27 @@ Leandro Dorileo Michael Bouchaud (yoz) Aymeric Dumaz +Emotion Generic VLC +--- +Cedric Bail +Hugo Camboulive +Leandro Dorileo +Pierre Le Magourou +Rafael Antognolli +Sohyun Kim +Carsten Haitzler (Rasterman) +Davide Andreoli +Gustavo Sverzut Barbieri +Stefan Schmidt +Bruno Dilly +ChunEon Park +Daniel Juyung Seo +Doug Newgard +Jerome Pinot +Mike Blumenkrantz +Sebastian Dransfeld +Vincent Torri + Ethumb ------ Rafael Antognolli diff --git a/configure.ac b/configure.ac index 875968d833..1f70416ca5 100644 --- a/configure.ac +++ b/configure.ac @@ -4902,10 +4902,13 @@ fi ### Check availability +## Generic player +EMOTION_GENERIC_PLAYER([GENERIC_VLC], [yes], [libvlc >= 2.0 eina >= 1.1.99 ecore >= 1.7.99]) +EFL_ADD_FEATURE([EMOTION], [generic_vlc], [${with_generic_vlc}]) + EFL_LIB_END([Emotion]) #### End of Emotion - #### Ethumb EFL_LIB_START([Ethumb]) diff --git a/legacy/emotion_generic_players/AUTHORS b/legacy/emotion_generic_players/AUTHORS deleted file mode 100644 index e7965e98cb..0000000000 --- a/legacy/emotion_generic_players/AUTHORS +++ /dev/null @@ -1,20 +0,0 @@ -VLC ---- -Cedric Bail -Hugo Camboulive -Leandro Dorileo -Pierre Le Magourou -Rafael Antognolli -Sohyun Kim -Carsten Haitzler (Rasterman) -Davide Andreoli -Gustavo Sverzut Barbieri -Stefan Schmidt -Bruno Dilly -ChunEon Park -Daniel Juyung Seo -Doug Newgard -Jerome Pinot -Mike Blumenkrantz -Sebastian Dransfeld -Vincent Torri diff --git a/m4/emotion_generic_players.m4 b/m4/emotion_generic_players.m4 new file mode 100644 index 0000000000..d852dbaa29 --- /dev/null +++ b/m4/emotion_generic_players.m4 @@ -0,0 +1,37 @@ +dnl EMOTION_GENERIC_PLAYER(NAME, DEFAULT_STATE, [PKG_CONFIG_DEPS]) +dnl Does the following: +dnl * AC_ARG_WITH(NAME) +dnl * define with_name to yes or no +dnl * PKG_CHECK_MODULES(NAME, PKG_CONFIG_DEPS) +dnl * AC_DEFINE([HAVE_NAME]) +dnl * AM_CONDITIONAL([HAVE_NAME]) +AC_DEFUN([EMOTION_GENERIC_PLAYER], +[dnl +m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl +m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl + +AC_ARG_WITH([DOWN], + [AC_HELP_STRING([--with-]m4_defn([DOWN]), + [build generic player ]m4_defn([UP])[. @<:@default=$2@:>@])], + [], [with_]m4_defn([DOWN])[="$2"]) + +if test "${with_[]m4_defn([DOWN])}" = "yes"; then + m4_ifval([$3], [dnl + PKG_CHECK_MODULES(m4_defn([UP]), [$3]) + ], [dnl + m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" + m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" + AC_SUBST(m4_defn([UP])[_LIBS]) + AC_SUBST(m4_defn([UP])[_CFLAGS]) + ]) + + AC_SEARCH_LIBS([shm_open], [rt], [], [AC_MSG_ERROR([unable to find the shm_open() function])]) + if test "${ac_cv_search_shm_open}" != "none required"; then + m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${ac_cv_search_shm_open}" + fi +fi +AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$with_[]m4_defn([DOWN])" = "yes"]) + +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl +]) diff --git a/src/Makefile_Emotion.am b/src/Makefile_Emotion.am index 87285a8e0d..1175d2baf4 100644 --- a/src/Makefile_Emotion.am +++ b/src/Makefile_Emotion.am @@ -354,3 +354,24 @@ CLEANFILES += $(generated_emotion_js_bindings) GENERATED_JS_BINDINGS += $(generated_emotion_js_bindings) endif + +emotiongenericplayersdir = \ +$(libdir)/emotion/generic_players/$(MODULE_ARCH) + +emotiongenericplayers_PROGRAMS = + +if HAVE_GENERIC_VLC + +emotiongenericplayers_PROGRAMS += generic/emotion/vlc/vlc +generic_emotion_vlc_vlc_SOURCES = generic/emotion/vlc/emotion_generic_vlc.c +generic_emotion_vlc_vlc_CPPFLAGS = \ +-I$(top_srcdir)/src/modules/emotion/generic \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/emotion\" \ +-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \ +-DEMOTION_GENERIC_PLAYERS_DIR=\"$(libdir)/emotion/generic_players/$(MODULE_ARCH)\" \ +@GENERIC_VLC_CFLAGS@ +generic_emotion_vlc_vlc_LDADD = @GENERIC_VLC_LIBS@ + +endif diff --git a/src/generic/emotion/vlc/emotion_generic_vlc.c b/src/generic/emotion/vlc/emotion_generic_vlc.c new file mode 100644 index 0000000000..456509e673 --- /dev/null +++ b/src/generic/emotion/vlc/emotion_generic_vlc.c @@ -0,0 +1,790 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +static int _em_vlc_log_dom = -1; +#define ERR(...) EINA_LOG_DOM_ERR(_em_vlc_log_dom, __VA_ARGS__) +#define DBG(...) EINA_LOG_DOM_DBG(_em_vlc_log_dom, __VA_ARGS__) +#define INF(...) EINA_LOG_DOM_INFO(_em_vlc_log_dom, __VA_ARGS__) +#define WRN(...) EINA_LOG_DOM_WARN(_em_vlc_log_dom, __VA_ARGS__) +#define CRIT(...) EINA_LOG_DOM_CRIT(_em_vlc_log_dom, __VA_ARGS__) + + +typedef struct _App App; +struct _App { + Emotion_Generic_Video_Shared *vs; + Emotion_Generic_Video_Frame vf; + + libvlc_instance_t *libvlc; + libvlc_media_t *m; + libvlc_media_player_t *mp; + libvlc_event_manager_t *event_mgr; + + Ecore_Pipe *fd_read; // read commands from emotion here + Ecore_Pipe *fd_write; // write commands for emotion here + Eina_Lock cmd_mutex;// lock used to send just one command at a time + int last_order; // current command received from emotion + + char *filename; + char *subtitle_path; + char *shmname; + unsigned w, h; + int volume; + Eina_Bool audio_muted; + + Eina_Bool opening; + Eina_Bool closing; + Eina_Bool playing; + Eina_Bool inited; +}; + +static void _player_setup(App *app); + + +/* Utilities to send commands back to emotion */ +#define SEND_CMD_PARAM(app, i) \ + if ((app)->fd_write) \ + if (!ecore_pipe_write((app)->fd_write, &(i), sizeof((i)))) \ + ecore_main_loop_quit(); + +static void +_send_cmd(App *app, int cmd) +{ + if (!app->fd_write) + return; + + eina_lock_take(&app->cmd_mutex); /* LOCK HERE */ + + if (!ecore_pipe_write(app->fd_write, &cmd, sizeof(cmd))) + ecore_main_loop_quit(); +} + +static void +_send_cmd_str(App *app, const char *str) +{ + int len; + + len = str ? strlen(str) + 1 : 0; + if (app->fd_write) + if (!ecore_pipe_write(app->fd_write, &len, sizeof(len))) + ecore_main_loop_quit(); + if (app->fd_write) + if (!ecore_pipe_write(app->fd_write, str, len)) + ecore_main_loop_quit(); +} + +static void +_send_cmd_finish(App *app) +{ + eina_lock_release(&app->cmd_mutex); /* UNLOCK HERE */ +} + +/* Commands sent to the emotion pipe */ +static void +_send_file_closed(App *app) +{ + _send_cmd(app, EM_RESULT_FILE_CLOSE); + _send_cmd_finish(app); +} + +static void +_send_time_changed(App *app) +{ + float new_time; + + if (app->vs->frame_drop > 1) + return; + + new_time = libvlc_media_player_get_time(app->mp); + new_time /= 1000; + _send_cmd(app, EM_RESULT_POSITION_CHANGED); + SEND_CMD_PARAM(app, new_time); + _send_cmd_finish(app); +} + +static void +_send_resize(App *app, int width, int height) +{ + _send_cmd(app, EM_RESULT_FRAME_SIZE); + SEND_CMD_PARAM(app, width); + SEND_CMD_PARAM(app, height); + _send_cmd_finish(app); +} + +static void +_send_track_info(App *app, int cmd, int current, int count, libvlc_track_description_t *desc) +{ + _send_cmd(app, cmd); + SEND_CMD_PARAM(app, current); + SEND_CMD_PARAM(app, count); + while (desc) + { + int tid = desc->i_id; + const char *name = desc->psz_name; + SEND_CMD_PARAM(app, tid); + _send_cmd_str(app, name); + desc = desc->p_next; + } + _send_cmd_finish(app); +} + +static void +_send_all_track_info(App *app) +{ + int track_count, current; + libvlc_track_description_t *desc; + + current = libvlc_audio_get_track(app->mp); + track_count = libvlc_audio_get_track_count(app->mp); + desc = libvlc_audio_get_track_description(app->mp); + + _send_track_info(app, EM_RESULT_AUDIO_TRACK_INFO, + current, track_count, desc); + + current = libvlc_video_get_track(app->mp); + track_count = libvlc_video_get_track_count(app->mp); + desc = libvlc_video_get_track_description(app->mp); + + _send_track_info(app, EM_RESULT_VIDEO_TRACK_INFO, + current, track_count, desc); + + current = libvlc_video_get_spu(app->mp); + track_count = libvlc_video_get_spu_count(app->mp); + desc = libvlc_video_get_spu_description(app->mp); + + _send_track_info(app, EM_RESULT_SPU_TRACK_INFO, + current, track_count, desc); +} + +static void +_send_all_meta_info(App *app) +{ + const char *meta; + + _send_cmd(app, EM_RESULT_META_INFO); + + /* + * Will send in this order: title, artist, album, year, + * genre, comments, disc id and track count. + */ + meta = libvlc_media_get_meta(app->m, libvlc_meta_Title); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Artist); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Album); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Date); + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_Genre); + _send_cmd_str(app, meta); + meta = NULL; // sending empty comments + _send_cmd_str(app, meta); + meta = NULL; // sending empty disc id + _send_cmd_str(app, meta); + meta = libvlc_media_get_meta(app->m, libvlc_meta_TrackNumber); + _send_cmd_str(app, meta); + + _send_cmd_finish(app); +} + +static void +_send_length_changed(App *app) +{ + float length = libvlc_media_player_get_length(app->mp); + + length /= 1000; + _send_cmd(app, EM_RESULT_LENGTH_CHANGED); + SEND_CMD_PARAM(app, length); + _send_cmd_finish(app); +} + +static void +_send_seekable_changed(App *app, const struct libvlc_event_t *ev) +{ + int seekable = ev->u.media_player_seekable_changed.new_seekable; + + _send_cmd(app, EM_RESULT_SEEKABLE_CHANGED); + SEND_CMD_PARAM(app, seekable); + _send_cmd_finish(app); +} + +static void +_send_playback_started(App *app) +{ + _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); + _send_cmd_finish(app); +} + +static void +_send_playback_stopped(App *app) +{ + _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); + _send_cmd_finish(app); +} + +static void +_send_init(App *app) +{ + _send_cmd(app, EM_RESULT_INIT); + _send_cmd_finish(app); +} + +static void +_send_file_set(App *app) +{ + _send_cmd(app, EM_RESULT_FILE_SET); + _send_cmd_finish(app); +} + +static void +_send_file_set_done(App *app, int success) +{ + _send_cmd(app, EM_RESULT_FILE_SET_DONE); + SEND_CMD_PARAM(app, success); + _send_cmd_finish(app); +} + + +/* VLC events and callbacks */ +static void +_event_cb(const struct libvlc_event_t *ev, void *data) +{ + App *app = data; + + ecore_thread_main_loop_begin(); + switch (ev->type) + { + case libvlc_MediaPlayerTimeChanged: + // DBG("libvlc_MediaPlayerTimeChanged"); + _send_time_changed(app); + break; + case libvlc_MediaPlayerLengthChanged: + DBG("libvlc_MediaPlayerLengthChanged"); + _send_length_changed(app); + break; + case libvlc_MediaPlayerSeekableChanged: + DBG("libvlc_MediaPlayerSeekableChanged"); + _send_seekable_changed(app, ev); + break; + case libvlc_MediaPlayerPlaying: + DBG("libvlc_MediaPlayerPlaying"); + libvlc_audio_set_volume(app->mp, app->volume); + libvlc_audio_set_mute(app->mp, app->audio_muted); + _send_playback_started(app); + break; + case libvlc_MediaPlayerStopped: + DBG("libvlc_MediaPlayerStopped"); + _send_playback_stopped(app); + if (app->closing) + { + free(app->filename); + app->filename = NULL; + free(app->subtitle_path); + app->subtitle_path = NULL; + libvlc_media_release(app->m); + app->m = NULL; + libvlc_media_player_release(app->mp); + app->mp = NULL; + emotion_generic_shm_free(app->vs); + app->playing = EINA_FALSE; + app->closing = EINA_FALSE; + _send_file_closed(app); + } + break; + case libvlc_MediaPlayerEndReached: + DBG("libvlc_MediaPlayerEndReached"); + app->playing = EINA_FALSE; + /* vlc had released the media_playere here, we create a new one */ + app->mp = libvlc_media_player_new_from_media(app->m); + _player_setup(app); + _send_playback_stopped(app); + break; + } + ecore_thread_main_loop_end(); +} + +static void +_tmp_playing_event_cb(const struct libvlc_event_t *ev, void *data) +{ + App *app = data; + + if (ev->type != libvlc_MediaPlayerPlaying) + return; + + /* pause and stop listening the temporary event */ + libvlc_event_detach(app->event_mgr,libvlc_MediaPlayerPlaying, + _tmp_playing_event_cb, app); + libvlc_media_player_set_pause(app->mp, 1); + + /* sending size info */ + libvlc_video_get_size(app->mp, 0, &app->w, &app->h); + _send_resize(app, app->w, app->h); + + /* sending total lenght */ + _send_length_changed(app); + + /* sending audio track info */ + _send_all_track_info(app); + + /* sending meta info */ + _send_all_meta_info(app); + + /* ok, we are done! Now let emotion create the shmem for us */ + _send_file_set(app); +} + +static void * +_lock(void *data, void **pixels) +{ + App *app = data; + + if (app->playing) + *pixels = app->vf.frames[app->vs->frame.player]; + else + *pixels = NULL; + + return NULL; // picture identifier, not needed here +} + +static void +_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) +{ +} + +static void +_display(void *data, void *id EINA_UNUSED) +{ + App *app = data; + + if (!app->playing) + return; + + eina_semaphore_lock(&app->vs->lock); + app->vs->frame.last = app->vs->frame.player; + app->vs->frame.player = app->vs->frame.next; + app->vs->frame.next = app->vs->frame.last; + if (!app->vs->frame_drop++) + { + _send_cmd(app, EM_RESULT_FRAME_NEW); + _send_cmd_finish(app); + } + eina_semaphore_release(&app->vs->lock, 1); +} + +static void +_player_setup(App *app) +{ + + libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); + libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); + + app->event_mgr = libvlc_media_player_event_manager(app->mp); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, + _event_cb, app); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, + _event_cb, app); +} + +/* Commands received from the emotion pipe */ +static void +_file_set(App *app) +{ + DBG("Path: %s", app->filename); + app->m = libvlc_media_new_path(app->libvlc, app->filename); + if (!app->m) + { + ERR("could not open path: \"%s\"", app->filename); + return; + } + + app->mp = libvlc_media_player_new_from_media(app->m); + if (!app->mp) + { + ERR("could not create new player from media."); + return; + } + + app->opening = EINA_TRUE; + + /* Here we start playing and connect a temporary callback to know when + * the file is parsed and ready to be played for real. + */ + app->event_mgr = libvlc_media_player_event_manager(app->mp); + libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, + _tmp_playing_event_cb, app); + + libvlc_media_player_play(app->mp); +} + +static void +_file_set_done(App *app) +{ + int r; + + DBG("Path: %s", app->filename); + app->opening = EINA_FALSE; + + r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); + if (!r) + { + free(app->filename); + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + app->filename = NULL; + app->m = NULL; + app->mp = NULL; + } + else + { + _player_setup(app); + } + + _send_file_set_done(app, r); +} + +static void +_file_close(App *app) +{ + DBG("closing file"); + + if (!app->mp) + return; + + app->closing = EINA_TRUE; + libvlc_media_player_stop(app->mp); +} + +static void +_stop(App *app) +{ + DBG("Stop"); + if (app->mp) + libvlc_media_player_set_pause(app->mp, 1); +} + +static void +_play(App *app, float pos) +{ + DBG("Play at %.3f", pos); + + if (!app->mp) + return; + + if (app->playing) + { + libvlc_media_player_set_pause(app->mp, 0); + } + else + { + libvlc_time_t new_time = pos * 1000; + libvlc_media_player_set_time(app->mp, new_time); + libvlc_media_player_play(app->mp); + + if (app->subtitle_path) + libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); + + app->playing = EINA_TRUE; + } +} + +static void +_position_set(App *app, float position) +{ + libvlc_time_t new_time; + + DBG("Position set %.3f", position); + if (!app->mp) + return; + + new_time = position * 1000; + libvlc_media_player_set_time(app->mp, new_time); + + if (libvlc_media_player_get_state(app->mp) == libvlc_Paused) + _send_time_changed(app); +} + +static void +_speed_set(App *app, float rate) +{ + DBG("Speed set %.3f", rate); + if (!app->mp) + return; + + libvlc_media_player_set_rate(app->mp, rate); +} + +static void +_mute_set(App *app, int mute) +{ + DBG("Mute %d", mute); + if (!app->mp) + return; + + app->audio_muted = mute; + libvlc_audio_set_mute(app->mp, mute); +} + +static void +_volume_set(App *app, float volume) +{ + DBG("Volume set %.2f", volume); + if (!app->mp) + return; + + app->volume = volume * 100; + libvlc_audio_set_volume(app->mp, app->volume); +} + +static void +_spu_track_set(App *app, int track) +{ + DBG("SPU track %d", track); + libvlc_video_set_spu(app->mp, track); +} + +static void +_audio_track_set(App *app, int track) +{ + DBG("Audio track %d", track); + libvlc_audio_set_track(app->mp, track); +} + +static void +_video_track_set(App *app, int track) +{ + DBG("Video Track %d", track); + libvlc_video_set_track(app->mp, track); +} + +static void +_remote_command(void *data, void *buffer, unsigned int nbyte) +{ + App *app = data; + + if (nbyte == 0) + { + ecore_main_loop_quit(); + return ; + } + + if (app->last_order == EM_CMD_LAST) + { + if (nbyte != sizeof (int)) + { + ERR("didn't receive a valid command from emotion (%i) !", nbyte); + ecore_main_loop_quit(); + return ; + } + + app->last_order = *((int*) buffer); + + if (!app->inited && + app->last_order != EM_CMD_INIT) + { + ERR("wrong init command!"); + ecore_main_loop_quit(); + return ; + } + + switch (app->last_order) + { + case EM_CMD_FILE_SET: + if (app->opening) + { + libvlc_media_release(app->m); + libvlc_media_player_release(app->mp); + free(app->filename); + app->opening = EINA_FALSE; + } + break; + case EM_CMD_FILE_SET_DONE: + _file_set_done(app); + app->last_order = EM_CMD_LAST; + break; + case EM_CMD_FILE_CLOSE: + _file_close(app); + app->last_order = EM_CMD_LAST; + break; + case EM_CMD_STOP: + _stop(app); + app->last_order = EM_CMD_LAST; + break; + } + } + else + { + switch (app->last_order) + { + case EM_CMD_INIT: + app->shmname = strdup(buffer); + app->inited = EINA_TRUE; + _send_init(app); + break; + case EM_CMD_FILE_SET: + app->filename = strdup(buffer); + _file_set(app); + break; + case EM_CMD_SUBTITLE_SET: + app->subtitle_path = strdup(buffer); + break; + case EM_CMD_PLAY: + _play(app, *(float*) buffer); + break; + case EM_CMD_POSITION_SET: + _position_set(app, *(float*) buffer); + break; + case EM_CMD_SPEED_SET: + _speed_set(app, *(float*) buffer); + break; + case EM_CMD_AUDIO_MUTE_SET: + _mute_set(app, *(int*) buffer); + break; + case EM_CMD_VOLUME_SET: + _volume_set(app, *(float*) buffer); + break; + case EM_CMD_SPU_TRACK_SET: + _spu_track_set(app, *(int*) buffer); + break; + case EM_CMD_AUDIO_TRACK_SET: + _audio_track_set(app, *(int*) buffer); + break; + case EM_CMD_VIDEO_TRACK_SET: + _video_track_set(app, *(int*) buffer); + break; + } + app->last_order = EM_CMD_LAST; + } +} + +static void +_dummy(void *data EINA_UNUSED, void *buffer EINA_UNUSED, unsigned int nbyte EINA_UNUSED) +{ + /* This function is useless for the pipe we use to send message back + to emotion, but still needed */ +} + +/* Main */ +static Eina_Bool +exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) +{ + DBG("Quit signal received !"); + ecore_main_loop_quit(); + return EINA_TRUE; +} + +int +main(int argc, const char *argv[]) +{ + App app; + Ecore_Event_Handler *hld; + int vlc_argc; + + const char *vlc_argv[] = + { + "--quiet", + "--intf", "dummy", /* no interface */ + "--vout", "dummy", /* we don't want video (output) */ + "--no-video-title-show", /* nor the filename displayed */ + "--no-sub-autodetect-file", /* we don't want automatic subtitles */ + "--no-stats", /* no stats */ + "--no-inhibit", /* we don't want interfaces */ + "--no-disable-screensaver", /* we don't want interfaces */ +// XXX: causes newer vlcs to segv! +// "--codec", "avcodec", +// XXX: disable this just in case +// "--demux", "avformat" + }; + vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); + + memset(&app, 0, sizeof(app)); + if (!eina_init()) + { + EINA_LOG_CRIT("Can't initialize generic vlc player, eina failed."); + return -1; + } + + _em_vlc_log_dom = eina_log_domain_register("emotion_generic_vlc", + EINA_COLOR_CYAN); + if (_em_vlc_log_dom < 0) + { + EINA_LOG_CRIT("Unable to register emotion_generic_vlc log domain."); + goto error; + } + + if (!eina_log_domain_level_check(_em_vlc_log_dom, EINA_LOG_LEVEL_WARN)) + eina_log_domain_level_set("emotion_generic_vlc", EINA_LOG_LEVEL_WARN); + + if (argc < 3) + { + ERR("missing parameters."); + ERR("syntax:\n\t%s ", argv[0]); + goto error; + } + + ecore_init(); + + eina_lock_new(&app.cmd_mutex); + + app.fd_read = ecore_pipe_full_add(_remote_command, &app, + atoi(argv[1]), -1, EINA_FALSE, EINA_FALSE); + app.fd_write = ecore_pipe_full_add(_dummy, NULL, + -1, atoi(argv[2]), EINA_FALSE, EINA_FALSE); + + hld = ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP, exit_func, NULL); + + app.libvlc = libvlc_new(vlc_argc, vlc_argv); + app.mp = NULL; + app.filename = NULL; + app.subtitle_path = NULL; + app.w = 0; + app.h = 0; + app.opening = EINA_FALSE; + app.playing = EINA_FALSE; + app.inited = EINA_FALSE; + app.last_order = EM_CMD_LAST; + + ecore_main_loop_begin(); + + libvlc_release(app.libvlc); + ecore_pipe_del(app.fd_read); + ecore_pipe_del(app.fd_write); + ecore_event_handler_del(hld); + eina_lock_free(&app.cmd_mutex); + + ecore_shutdown(); + eina_shutdown(); + return 0; + + error: + eina_shutdown(); + return -1; +} +#undef SEND_CMD_PARAM From 6b5ed1b7118cd99b99a8d133b3e466952885f945 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 1 Jun 2016 16:59:02 -0700 Subject: [PATCH 345/347] evas: integrate evas generic loaders into our single tree build system. --- AUTHORS | 19 + COPYING | 2 + configure.ac | 93 +++ .../m4/emotion_generic_players.m4 | 37 - .../src/vlc/emotion_generic_vlc.c | 790 ------------------ legacy/evas_generic_loaders/AUTHORS | 15 - legacy/evas_generic_loaders/COPYING | 356 -------- .../evas_generic_loaders/src/bin/Makefile.am | 24 - .../src/bin/common/Makefile.am | 3 - .../src/bin/gst/Makefile.am | 91 -- .../evas_generic_loaders/src/bin/gst/main.c | 292 ------- .../src/bin/gst/main_0_10.c | 278 ------ .../src/bin/pdf/Makefile.am | 49 -- .../src/bin/ps/Makefile.am | 24 - .../src/bin/raw/Makefile.am | 44 - .../src/bin/svg/Makefile.am | 28 - .../src/bin/xcf/Makefile.am | 26 - src/Makefile_Evas.am | 153 ++++ src/generic/.gitignore | 5 + .../bin => src/generic/evas}/common/shmfile.c | 0 .../bin => src/generic/evas}/common/shmfile.h | 0 .../bin => src/generic/evas}/common/timeout.c | 0 .../bin => src/generic/evas}/common/timeout.h | 0 .../pdf/evas_generic_pdf_loader.libreoffice | 0 .../src/bin => src/generic/evas}/pdf/main.cpp | 0 .../src/bin => src/generic/evas}/ps/main.c | 0 .../src/bin => src/generic/evas}/raw/main.c | 0 .../src/bin => src/generic/evas}/svg/main.c | 0 .../src/bin => src/generic/evas}/xcf/common.h | 0 .../src/bin => src/generic/evas}/xcf/main.c | 0 .../bin => src/generic/evas}/xcf/pixelfuncs.c | 0 31 files changed, 272 insertions(+), 2057 deletions(-) delete mode 100644 legacy/emotion_generic_players/m4/emotion_generic_players.m4 delete mode 100644 legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c delete mode 100644 legacy/evas_generic_loaders/AUTHORS delete mode 100644 legacy/evas_generic_loaders/COPYING delete mode 100644 legacy/evas_generic_loaders/src/bin/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/common/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/gst/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/gst/main.c delete mode 100644 legacy/evas_generic_loaders/src/bin/gst/main_0_10.c delete mode 100644 legacy/evas_generic_loaders/src/bin/pdf/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/ps/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/raw/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/svg/Makefile.am delete mode 100644 legacy/evas_generic_loaders/src/bin/xcf/Makefile.am create mode 100644 src/generic/.gitignore rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/common/shmfile.c (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/common/shmfile.h (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/common/timeout.c (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/common/timeout.h (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/pdf/evas_generic_pdf_loader.libreoffice (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/pdf/main.cpp (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/ps/main.c (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/raw/main.c (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/svg/main.c (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/xcf/common.h (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/xcf/main.c (100%) rename {legacy/evas_generic_loaders/src/bin => src/generic/evas}/xcf/pixelfuncs.c (100%) diff --git a/AUTHORS b/AUTHORS index e5ed206c2d..5243ed7747 100644 --- a/AUTHORS +++ b/AUTHORS @@ -149,6 +149,25 @@ Michelle Legrand Romain Perier Subodh Kumar +Evas Generic Loaders +-------------------- + +The Rasterman (Carsten Haitzler) +Christian Kreibich +Vincent Torri +Michael Bouchaud +Fanina "cippp" Cristian +Cedric BAIL +Jérémy Zurcher +Stefan Schmidt +Daniel Juyung Seo +Doug Newgard +Mike Blumenkrantz +Alex-P. Natsios +Jihoon Kim +Samuel F. Baggen +Sebastian Dransfeld + Ecore ----- diff --git a/COPYING b/COPYING index 506e516297..7afe4c5866 100644 --- a/COPYING +++ b/COPYING @@ -34,6 +34,8 @@ ethumb: licenses/COPYING.LGPL eolian: licenses/COPYING.BSD elua: licenses/COPYING.BSD elementary: licenses/COPYING.LGPL +generic/evas: licenses/COPYING.GPL (separate binary/executable) +generic/emotion: licenses/COPYING.GPL (separate binary/executable) NOTE: If linked together, the result will be effectively be LGPL (or GPL if escape is used) due to license characteristics. diff --git a/configure.ac b/configure.ac index 1f70416ca5..f9d6a562aa 100644 --- a/configure.ac +++ b/configure.ac @@ -2807,6 +2807,99 @@ EFL_ADD_FEATURE([EVAS], [tile-rotate]) EFL_ADD_FEATURE([EVAS], [dither-mask], [${build_evas_dither_mask}]) EFL_ADD_FEATURE([EVAS], [hyphen]) +#### Generic backend + +### Option to turn on generic loader for evas +want_poppler="no" +want_spectre="no" +want_libraw="no" +want_rsvg="no" + +AC_ARG_ENABLE([poppler], + [AC_HELP_STRING([--enable-poppler], [enable poppler support @<:@default==disabled@:>@])], + [want_poppler=$enableval]) + +AC_ARG_ENABLE([spectre], + [AC_HELP_STRING([--enable-spectre], [enable spectre support @<:@default==disabled@:>@])], + [want_spectre=$enableval]) + +AC_ARG_ENABLE([libraw], + [AC_HELP_STRING([--enable-libraw], [enable libraw support @<:@default==disabled@:>@])], + [want_libraw=$enableval]) + +AC_ARG_ENABLE([librsvg], + [AC_HELP_STRING([--enable-librsvg], [enable svg support @<:@default==disabled@:>@])], + [want_rsvg=$enableval]) + +have_poppler="no" +have_spectre="no" +have_raw="no" +have_rsvg="no" + +### Check needed dependency for each generic loader +if test "x${want_poppler}" = "xyes"; then + PKG_CHECK_EXISTS([poppler >= 0.12 poppler < 0.20], + [ + poppler_pc="poppler >= 0.12 poppler < 0.20" + have_poppler="yes" + ], + [have_poppler="no"]) + + if test "x${have_poppler}" = "xno" ; then + PKG_CHECK_EXISTS([poppler >= 0.20 poppler < 0.31], + [ + poppler_pc="poppler >= 0.20 poppler < 0.31" + AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) + have_poppler="yes" + ], + [have_poppler="no"]) + fi + + if test "x${have_poppler}" = "xno" ; then + PKG_CHECK_EXISTS([poppler >= 0.31], + [ + poppler_pc="poppler >= 0.31" + AC_DEFINE(HAVE_POPPLER_031, 1, [Have poppler 0.31]) + have_poppler="yes" + ], + [have_poppler="no"]) + fi + + if test "x${have_poppler}" = "xyes" ; then + PKG_CHECK_MODULES([POPPLER], [${poppler_pc}], + [have_poppler="yes"]) + fi +fi + +if test "x${want_spectre}" = "xyes"; then + PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_spectre="yes"]) +fi + +if test "x${want_libraw}" = "xyes"; then + PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"]) +fi + +if test "x${want_librsvg}" = "xyes"; then + PKG_CHECK_MODULES([RSVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_rsvg="yes"]) + PKG_CHECK_MODULES( + [SVG_2_36], [librsvg-2.0 >= 2.36.0 cairo >= 1.0.0], + [ + have_rsvg_2_36="yes" + AC_DEFINE(HAVE_SVG_2_36, 1, [Have librsvg >= 2.36]) + ], + [have_rsvg_2_36="no"]) +fi + +AM_CONDITIONAL([HAVE_POPPLER], [test "x${have_poppler}" = "xyes"]) +AM_CONDITIONAL([HAVE_SPECTRE], [test "x${have_spectre}" = "xyes"]) +AM_CONDITIONAL([HAVE_LIBRAW], [test "x${have_raw}" = "xyes"]) +AM_CONDITIONAL([HAVE_RSVG], [test "x${have_rsvg}" = "xyes"]) + +EFL_ADD_FEATURE([EVAS_LOADER], [poppler], [${want_poppler}]) +EFL_ADD_FEATURE([EVAS_LOADER], [spectre], [${want_spectre}]) +EFL_ADD_FEATURE([EVAS_LOADER], [raw], [${want_libraw}]) +EFL_ADD_FEATURE([EVAS_LOADER], [rsvg], [${want_rsvg}]) + EFL_LIB_END([Evas]) #### End of Evas diff --git a/legacy/emotion_generic_players/m4/emotion_generic_players.m4 b/legacy/emotion_generic_players/m4/emotion_generic_players.m4 deleted file mode 100644 index d852dbaa29..0000000000 --- a/legacy/emotion_generic_players/m4/emotion_generic_players.m4 +++ /dev/null @@ -1,37 +0,0 @@ -dnl EMOTION_GENERIC_PLAYER(NAME, DEFAULT_STATE, [PKG_CONFIG_DEPS]) -dnl Does the following: -dnl * AC_ARG_WITH(NAME) -dnl * define with_name to yes or no -dnl * PKG_CHECK_MODULES(NAME, PKG_CONFIG_DEPS) -dnl * AC_DEFINE([HAVE_NAME]) -dnl * AM_CONDITIONAL([HAVE_NAME]) -AC_DEFUN([EMOTION_GENERIC_PLAYER], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -AC_ARG_WITH([DOWN], - [AC_HELP_STRING([--with-]m4_defn([DOWN]), - [build generic player ]m4_defn([UP])[. @<:@default=$2@:>@])], - [], [with_]m4_defn([DOWN])[="$2"]) - -if test "${with_[]m4_defn([DOWN])}" = "yes"; then - m4_ifval([$3], [dnl - PKG_CHECK_MODULES(m4_defn([UP]), [$3]) - ], [dnl - m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" - m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" - AC_SUBST(m4_defn([UP])[_LIBS]) - AC_SUBST(m4_defn([UP])[_CFLAGS]) - ]) - - AC_SEARCH_LIBS([shm_open], [rt], [], [AC_MSG_ERROR([unable to find the shm_open() function])]) - if test "${ac_cv_search_shm_open}" != "none required"; then - m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${ac_cv_search_shm_open}" - fi -fi -AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$with_[]m4_defn([DOWN])" = "yes"]) - -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) diff --git a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c b/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c deleted file mode 100644 index 456509e673..0000000000 --- a/legacy/emotion_generic_players/src/vlc/emotion_generic_vlc.c +++ /dev/null @@ -1,790 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -static int _em_vlc_log_dom = -1; -#define ERR(...) EINA_LOG_DOM_ERR(_em_vlc_log_dom, __VA_ARGS__) -#define DBG(...) EINA_LOG_DOM_DBG(_em_vlc_log_dom, __VA_ARGS__) -#define INF(...) EINA_LOG_DOM_INFO(_em_vlc_log_dom, __VA_ARGS__) -#define WRN(...) EINA_LOG_DOM_WARN(_em_vlc_log_dom, __VA_ARGS__) -#define CRIT(...) EINA_LOG_DOM_CRIT(_em_vlc_log_dom, __VA_ARGS__) - - -typedef struct _App App; -struct _App { - Emotion_Generic_Video_Shared *vs; - Emotion_Generic_Video_Frame vf; - - libvlc_instance_t *libvlc; - libvlc_media_t *m; - libvlc_media_player_t *mp; - libvlc_event_manager_t *event_mgr; - - Ecore_Pipe *fd_read; // read commands from emotion here - Ecore_Pipe *fd_write; // write commands for emotion here - Eina_Lock cmd_mutex;// lock used to send just one command at a time - int last_order; // current command received from emotion - - char *filename; - char *subtitle_path; - char *shmname; - unsigned w, h; - int volume; - Eina_Bool audio_muted; - - Eina_Bool opening; - Eina_Bool closing; - Eina_Bool playing; - Eina_Bool inited; -}; - -static void _player_setup(App *app); - - -/* Utilities to send commands back to emotion */ -#define SEND_CMD_PARAM(app, i) \ - if ((app)->fd_write) \ - if (!ecore_pipe_write((app)->fd_write, &(i), sizeof((i)))) \ - ecore_main_loop_quit(); - -static void -_send_cmd(App *app, int cmd) -{ - if (!app->fd_write) - return; - - eina_lock_take(&app->cmd_mutex); /* LOCK HERE */ - - if (!ecore_pipe_write(app->fd_write, &cmd, sizeof(cmd))) - ecore_main_loop_quit(); -} - -static void -_send_cmd_str(App *app, const char *str) -{ - int len; - - len = str ? strlen(str) + 1 : 0; - if (app->fd_write) - if (!ecore_pipe_write(app->fd_write, &len, sizeof(len))) - ecore_main_loop_quit(); - if (app->fd_write) - if (!ecore_pipe_write(app->fd_write, str, len)) - ecore_main_loop_quit(); -} - -static void -_send_cmd_finish(App *app) -{ - eina_lock_release(&app->cmd_mutex); /* UNLOCK HERE */ -} - -/* Commands sent to the emotion pipe */ -static void -_send_file_closed(App *app) -{ - _send_cmd(app, EM_RESULT_FILE_CLOSE); - _send_cmd_finish(app); -} - -static void -_send_time_changed(App *app) -{ - float new_time; - - if (app->vs->frame_drop > 1) - return; - - new_time = libvlc_media_player_get_time(app->mp); - new_time /= 1000; - _send_cmd(app, EM_RESULT_POSITION_CHANGED); - SEND_CMD_PARAM(app, new_time); - _send_cmd_finish(app); -} - -static void -_send_resize(App *app, int width, int height) -{ - _send_cmd(app, EM_RESULT_FRAME_SIZE); - SEND_CMD_PARAM(app, width); - SEND_CMD_PARAM(app, height); - _send_cmd_finish(app); -} - -static void -_send_track_info(App *app, int cmd, int current, int count, libvlc_track_description_t *desc) -{ - _send_cmd(app, cmd); - SEND_CMD_PARAM(app, current); - SEND_CMD_PARAM(app, count); - while (desc) - { - int tid = desc->i_id; - const char *name = desc->psz_name; - SEND_CMD_PARAM(app, tid); - _send_cmd_str(app, name); - desc = desc->p_next; - } - _send_cmd_finish(app); -} - -static void -_send_all_track_info(App *app) -{ - int track_count, current; - libvlc_track_description_t *desc; - - current = libvlc_audio_get_track(app->mp); - track_count = libvlc_audio_get_track_count(app->mp); - desc = libvlc_audio_get_track_description(app->mp); - - _send_track_info(app, EM_RESULT_AUDIO_TRACK_INFO, - current, track_count, desc); - - current = libvlc_video_get_track(app->mp); - track_count = libvlc_video_get_track_count(app->mp); - desc = libvlc_video_get_track_description(app->mp); - - _send_track_info(app, EM_RESULT_VIDEO_TRACK_INFO, - current, track_count, desc); - - current = libvlc_video_get_spu(app->mp); - track_count = libvlc_video_get_spu_count(app->mp); - desc = libvlc_video_get_spu_description(app->mp); - - _send_track_info(app, EM_RESULT_SPU_TRACK_INFO, - current, track_count, desc); -} - -static void -_send_all_meta_info(App *app) -{ - const char *meta; - - _send_cmd(app, EM_RESULT_META_INFO); - - /* - * Will send in this order: title, artist, album, year, - * genre, comments, disc id and track count. - */ - meta = libvlc_media_get_meta(app->m, libvlc_meta_Title); - _send_cmd_str(app, meta); - meta = libvlc_media_get_meta(app->m, libvlc_meta_Artist); - _send_cmd_str(app, meta); - meta = libvlc_media_get_meta(app->m, libvlc_meta_Album); - _send_cmd_str(app, meta); - meta = libvlc_media_get_meta(app->m, libvlc_meta_Date); - _send_cmd_str(app, meta); - meta = libvlc_media_get_meta(app->m, libvlc_meta_Genre); - _send_cmd_str(app, meta); - meta = NULL; // sending empty comments - _send_cmd_str(app, meta); - meta = NULL; // sending empty disc id - _send_cmd_str(app, meta); - meta = libvlc_media_get_meta(app->m, libvlc_meta_TrackNumber); - _send_cmd_str(app, meta); - - _send_cmd_finish(app); -} - -static void -_send_length_changed(App *app) -{ - float length = libvlc_media_player_get_length(app->mp); - - length /= 1000; - _send_cmd(app, EM_RESULT_LENGTH_CHANGED); - SEND_CMD_PARAM(app, length); - _send_cmd_finish(app); -} - -static void -_send_seekable_changed(App *app, const struct libvlc_event_t *ev) -{ - int seekable = ev->u.media_player_seekable_changed.new_seekable; - - _send_cmd(app, EM_RESULT_SEEKABLE_CHANGED); - SEND_CMD_PARAM(app, seekable); - _send_cmd_finish(app); -} - -static void -_send_playback_started(App *app) -{ - _send_cmd(app, EM_RESULT_PLAYBACK_STARTED); - _send_cmd_finish(app); -} - -static void -_send_playback_stopped(App *app) -{ - _send_cmd(app, EM_RESULT_PLAYBACK_STOPPED); - _send_cmd_finish(app); -} - -static void -_send_init(App *app) -{ - _send_cmd(app, EM_RESULT_INIT); - _send_cmd_finish(app); -} - -static void -_send_file_set(App *app) -{ - _send_cmd(app, EM_RESULT_FILE_SET); - _send_cmd_finish(app); -} - -static void -_send_file_set_done(App *app, int success) -{ - _send_cmd(app, EM_RESULT_FILE_SET_DONE); - SEND_CMD_PARAM(app, success); - _send_cmd_finish(app); -} - - -/* VLC events and callbacks */ -static void -_event_cb(const struct libvlc_event_t *ev, void *data) -{ - App *app = data; - - ecore_thread_main_loop_begin(); - switch (ev->type) - { - case libvlc_MediaPlayerTimeChanged: - // DBG("libvlc_MediaPlayerTimeChanged"); - _send_time_changed(app); - break; - case libvlc_MediaPlayerLengthChanged: - DBG("libvlc_MediaPlayerLengthChanged"); - _send_length_changed(app); - break; - case libvlc_MediaPlayerSeekableChanged: - DBG("libvlc_MediaPlayerSeekableChanged"); - _send_seekable_changed(app, ev); - break; - case libvlc_MediaPlayerPlaying: - DBG("libvlc_MediaPlayerPlaying"); - libvlc_audio_set_volume(app->mp, app->volume); - libvlc_audio_set_mute(app->mp, app->audio_muted); - _send_playback_started(app); - break; - case libvlc_MediaPlayerStopped: - DBG("libvlc_MediaPlayerStopped"); - _send_playback_stopped(app); - if (app->closing) - { - free(app->filename); - app->filename = NULL; - free(app->subtitle_path); - app->subtitle_path = NULL; - libvlc_media_release(app->m); - app->m = NULL; - libvlc_media_player_release(app->mp); - app->mp = NULL; - emotion_generic_shm_free(app->vs); - app->playing = EINA_FALSE; - app->closing = EINA_FALSE; - _send_file_closed(app); - } - break; - case libvlc_MediaPlayerEndReached: - DBG("libvlc_MediaPlayerEndReached"); - app->playing = EINA_FALSE; - /* vlc had released the media_playere here, we create a new one */ - app->mp = libvlc_media_player_new_from_media(app->m); - _player_setup(app); - _send_playback_stopped(app); - break; - } - ecore_thread_main_loop_end(); -} - -static void -_tmp_playing_event_cb(const struct libvlc_event_t *ev, void *data) -{ - App *app = data; - - if (ev->type != libvlc_MediaPlayerPlaying) - return; - - /* pause and stop listening the temporary event */ - libvlc_event_detach(app->event_mgr,libvlc_MediaPlayerPlaying, - _tmp_playing_event_cb, app); - libvlc_media_player_set_pause(app->mp, 1); - - /* sending size info */ - libvlc_video_get_size(app->mp, 0, &app->w, &app->h); - _send_resize(app, app->w, app->h); - - /* sending total lenght */ - _send_length_changed(app); - - /* sending audio track info */ - _send_all_track_info(app); - - /* sending meta info */ - _send_all_meta_info(app); - - /* ok, we are done! Now let emotion create the shmem for us */ - _send_file_set(app); -} - -static void * -_lock(void *data, void **pixels) -{ - App *app = data; - - if (app->playing) - *pixels = app->vf.frames[app->vs->frame.player]; - else - *pixels = NULL; - - return NULL; // picture identifier, not needed here -} - -static void -_unlock(void *data EINA_UNUSED, void *id EINA_UNUSED, void *const *pixels EINA_UNUSED) -{ -} - -static void -_display(void *data, void *id EINA_UNUSED) -{ - App *app = data; - - if (!app->playing) - return; - - eina_semaphore_lock(&app->vs->lock); - app->vs->frame.last = app->vs->frame.player; - app->vs->frame.player = app->vs->frame.next; - app->vs->frame.next = app->vs->frame.last; - if (!app->vs->frame_drop++) - { - _send_cmd(app, EM_RESULT_FRAME_NEW); - _send_cmd_finish(app); - } - eina_semaphore_release(&app->vs->lock, 1); -} - -static void -_player_setup(App *app) -{ - - libvlc_video_set_format(app->mp, "RV32", app->w, app->h, app->w * 4); - libvlc_video_set_callbacks(app->mp, _lock, _unlock, _display, app); - - app->event_mgr = libvlc_media_player_event_manager(app->mp); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerTimeChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerLengthChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerSeekableChanged, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerEndReached, - _event_cb, app); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerStopped, - _event_cb, app); -} - -/* Commands received from the emotion pipe */ -static void -_file_set(App *app) -{ - DBG("Path: %s", app->filename); - app->m = libvlc_media_new_path(app->libvlc, app->filename); - if (!app->m) - { - ERR("could not open path: \"%s\"", app->filename); - return; - } - - app->mp = libvlc_media_player_new_from_media(app->m); - if (!app->mp) - { - ERR("could not create new player from media."); - return; - } - - app->opening = EINA_TRUE; - - /* Here we start playing and connect a temporary callback to know when - * the file is parsed and ready to be played for real. - */ - app->event_mgr = libvlc_media_player_event_manager(app->mp); - libvlc_event_attach(app->event_mgr, libvlc_MediaPlayerPlaying, - _tmp_playing_event_cb, app); - - libvlc_media_player_play(app->mp); -} - -static void -_file_set_done(App *app) -{ - int r; - - DBG("Path: %s", app->filename); - app->opening = EINA_FALSE; - - r = emotion_generic_shm_get(app->shmname, &app->vs, &app->vf); - if (!r) - { - free(app->filename); - libvlc_media_release(app->m); - libvlc_media_player_release(app->mp); - app->filename = NULL; - app->m = NULL; - app->mp = NULL; - } - else - { - _player_setup(app); - } - - _send_file_set_done(app, r); -} - -static void -_file_close(App *app) -{ - DBG("closing file"); - - if (!app->mp) - return; - - app->closing = EINA_TRUE; - libvlc_media_player_stop(app->mp); -} - -static void -_stop(App *app) -{ - DBG("Stop"); - if (app->mp) - libvlc_media_player_set_pause(app->mp, 1); -} - -static void -_play(App *app, float pos) -{ - DBG("Play at %.3f", pos); - - if (!app->mp) - return; - - if (app->playing) - { - libvlc_media_player_set_pause(app->mp, 0); - } - else - { - libvlc_time_t new_time = pos * 1000; - libvlc_media_player_set_time(app->mp, new_time); - libvlc_media_player_play(app->mp); - - if (app->subtitle_path) - libvlc_video_set_subtitle_file(app->mp, app->subtitle_path); - - app->playing = EINA_TRUE; - } -} - -static void -_position_set(App *app, float position) -{ - libvlc_time_t new_time; - - DBG("Position set %.3f", position); - if (!app->mp) - return; - - new_time = position * 1000; - libvlc_media_player_set_time(app->mp, new_time); - - if (libvlc_media_player_get_state(app->mp) == libvlc_Paused) - _send_time_changed(app); -} - -static void -_speed_set(App *app, float rate) -{ - DBG("Speed set %.3f", rate); - if (!app->mp) - return; - - libvlc_media_player_set_rate(app->mp, rate); -} - -static void -_mute_set(App *app, int mute) -{ - DBG("Mute %d", mute); - if (!app->mp) - return; - - app->audio_muted = mute; - libvlc_audio_set_mute(app->mp, mute); -} - -static void -_volume_set(App *app, float volume) -{ - DBG("Volume set %.2f", volume); - if (!app->mp) - return; - - app->volume = volume * 100; - libvlc_audio_set_volume(app->mp, app->volume); -} - -static void -_spu_track_set(App *app, int track) -{ - DBG("SPU track %d", track); - libvlc_video_set_spu(app->mp, track); -} - -static void -_audio_track_set(App *app, int track) -{ - DBG("Audio track %d", track); - libvlc_audio_set_track(app->mp, track); -} - -static void -_video_track_set(App *app, int track) -{ - DBG("Video Track %d", track); - libvlc_video_set_track(app->mp, track); -} - -static void -_remote_command(void *data, void *buffer, unsigned int nbyte) -{ - App *app = data; - - if (nbyte == 0) - { - ecore_main_loop_quit(); - return ; - } - - if (app->last_order == EM_CMD_LAST) - { - if (nbyte != sizeof (int)) - { - ERR("didn't receive a valid command from emotion (%i) !", nbyte); - ecore_main_loop_quit(); - return ; - } - - app->last_order = *((int*) buffer); - - if (!app->inited && - app->last_order != EM_CMD_INIT) - { - ERR("wrong init command!"); - ecore_main_loop_quit(); - return ; - } - - switch (app->last_order) - { - case EM_CMD_FILE_SET: - if (app->opening) - { - libvlc_media_release(app->m); - libvlc_media_player_release(app->mp); - free(app->filename); - app->opening = EINA_FALSE; - } - break; - case EM_CMD_FILE_SET_DONE: - _file_set_done(app); - app->last_order = EM_CMD_LAST; - break; - case EM_CMD_FILE_CLOSE: - _file_close(app); - app->last_order = EM_CMD_LAST; - break; - case EM_CMD_STOP: - _stop(app); - app->last_order = EM_CMD_LAST; - break; - } - } - else - { - switch (app->last_order) - { - case EM_CMD_INIT: - app->shmname = strdup(buffer); - app->inited = EINA_TRUE; - _send_init(app); - break; - case EM_CMD_FILE_SET: - app->filename = strdup(buffer); - _file_set(app); - break; - case EM_CMD_SUBTITLE_SET: - app->subtitle_path = strdup(buffer); - break; - case EM_CMD_PLAY: - _play(app, *(float*) buffer); - break; - case EM_CMD_POSITION_SET: - _position_set(app, *(float*) buffer); - break; - case EM_CMD_SPEED_SET: - _speed_set(app, *(float*) buffer); - break; - case EM_CMD_AUDIO_MUTE_SET: - _mute_set(app, *(int*) buffer); - break; - case EM_CMD_VOLUME_SET: - _volume_set(app, *(float*) buffer); - break; - case EM_CMD_SPU_TRACK_SET: - _spu_track_set(app, *(int*) buffer); - break; - case EM_CMD_AUDIO_TRACK_SET: - _audio_track_set(app, *(int*) buffer); - break; - case EM_CMD_VIDEO_TRACK_SET: - _video_track_set(app, *(int*) buffer); - break; - } - app->last_order = EM_CMD_LAST; - } -} - -static void -_dummy(void *data EINA_UNUSED, void *buffer EINA_UNUSED, unsigned int nbyte EINA_UNUSED) -{ - /* This function is useless for the pipe we use to send message back - to emotion, but still needed */ -} - -/* Main */ -static Eina_Bool -exit_func(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED) -{ - DBG("Quit signal received !"); - ecore_main_loop_quit(); - return EINA_TRUE; -} - -int -main(int argc, const char *argv[]) -{ - App app; - Ecore_Event_Handler *hld; - int vlc_argc; - - const char *vlc_argv[] = - { - "--quiet", - "--intf", "dummy", /* no interface */ - "--vout", "dummy", /* we don't want video (output) */ - "--no-video-title-show", /* nor the filename displayed */ - "--no-sub-autodetect-file", /* we don't want automatic subtitles */ - "--no-stats", /* no stats */ - "--no-inhibit", /* we don't want interfaces */ - "--no-disable-screensaver", /* we don't want interfaces */ -// XXX: causes newer vlcs to segv! -// "--codec", "avcodec", -// XXX: disable this just in case -// "--demux", "avformat" - }; - vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); - - memset(&app, 0, sizeof(app)); - if (!eina_init()) - { - EINA_LOG_CRIT("Can't initialize generic vlc player, eina failed."); - return -1; - } - - _em_vlc_log_dom = eina_log_domain_register("emotion_generic_vlc", - EINA_COLOR_CYAN); - if (_em_vlc_log_dom < 0) - { - EINA_LOG_CRIT("Unable to register emotion_generic_vlc log domain."); - goto error; - } - - if (!eina_log_domain_level_check(_em_vlc_log_dom, EINA_LOG_LEVEL_WARN)) - eina_log_domain_level_set("emotion_generic_vlc", EINA_LOG_LEVEL_WARN); - - if (argc < 3) - { - ERR("missing parameters."); - ERR("syntax:\n\t%s ", argv[0]); - goto error; - } - - ecore_init(); - - eina_lock_new(&app.cmd_mutex); - - app.fd_read = ecore_pipe_full_add(_remote_command, &app, - atoi(argv[1]), -1, EINA_FALSE, EINA_FALSE); - app.fd_write = ecore_pipe_full_add(_dummy, NULL, - -1, atoi(argv[2]), EINA_FALSE, EINA_FALSE); - - hld = ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP, exit_func, NULL); - - app.libvlc = libvlc_new(vlc_argc, vlc_argv); - app.mp = NULL; - app.filename = NULL; - app.subtitle_path = NULL; - app.w = 0; - app.h = 0; - app.opening = EINA_FALSE; - app.playing = EINA_FALSE; - app.inited = EINA_FALSE; - app.last_order = EM_CMD_LAST; - - ecore_main_loop_begin(); - - libvlc_release(app.libvlc); - ecore_pipe_del(app.fd_read); - ecore_pipe_del(app.fd_write); - ecore_event_handler_del(hld); - eina_lock_free(&app.cmd_mutex); - - ecore_shutdown(); - eina_shutdown(); - return 0; - - error: - eina_shutdown(); - return -1; -} -#undef SEND_CMD_PARAM diff --git a/legacy/evas_generic_loaders/AUTHORS b/legacy/evas_generic_loaders/AUTHORS deleted file mode 100644 index 6dc53f580d..0000000000 --- a/legacy/evas_generic_loaders/AUTHORS +++ /dev/null @@ -1,15 +0,0 @@ -The Rasterman (Carsten Haitzler) -Christian Kreibich -Vincent Torri -Michael Bouchaud -Fanina "cippp" Cristian -Cedric BAIL -Jérémy Zurcher -Stefan Schmidt -Daniel Juyung Seo -Doug Newgard -Mike Blumenkrantz -Alex-P. Natsios -Jihoon Kim -Samuel F. Baggen -Sebastian Dransfeld diff --git a/legacy/evas_generic_loaders/COPYING b/legacy/evas_generic_loaders/COPYING deleted file mode 100644 index 879517275d..0000000000 --- a/legacy/evas_generic_loaders/COPYING +++ /dev/null @@ -1,356 +0,0 @@ -Copyright notice for Evas generic loaders: - -Copyright (C) 2011-2014 Carsten Haitzler and various contributors (see AUTHORS) - -This library 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; version 2 of the License. - -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 General Public License for more details. - -Below is a copy of the GNU General Public License that is distributed -along with this library. If you do not have a copy below, write to the Free -Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA - - 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. - - - Copyright (C) - - 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. - - , 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. diff --git a/legacy/evas_generic_loaders/src/bin/Makefile.am b/legacy/evas_generic_loaders/src/bin/Makefile.am deleted file mode 100644 index 040ae49f79..0000000000 --- a/legacy/evas_generic_loaders/src/bin/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -SUBDIRS = common \ -xcf - -if HAVE_GST -SUBDIRS += gst -endif - -if HAVE_PDF -SUBDIRS += pdf -endif - -if HAVE_PS -SUBDIRS += ps -endif - -if HAVE_RAW -SUBDIRS += raw -endif - -if HAVE_SVG -SUBDIRS += svg -endif diff --git a/legacy/evas_generic_loaders/src/bin/common/Makefile.am b/legacy/evas_generic_loaders/src/bin/common/Makefile.am deleted file mode 100644 index 59035f0389..0000000000 --- a/legacy/evas_generic_loaders/src/bin/common/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = shmfile.c shmfile.h timeout.c timeout.h diff --git a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am b/legacy/evas_generic_loaders/src/bin/gst/Makefile.am deleted file mode 100644 index 955c623f07..0000000000 --- a/legacy/evas_generic_loaders/src/bin/gst/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src \ --I$(top_srcdir)/src/bin \ --I$(top_srcdir)/src/bin/common \ --I$(top_srcdir)/src/bin/gst \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@GSTREAMER_CFLAGS@ - -bin_PROGRAMS = evas_image_loader.gst -bindir = $(libdir)/evas/utils - -if HAVE_GST1 - -evas_image_loader_gst_SOURCES = \ -main.c \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c - -else - -evas_image_loader_gst_SOURCES = \ -main_0_10.c \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c - -endif - -evas_image_loader_gst_CFLAGS = -evas_image_loader_gst_LDADD = @GSTREAMER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ -evas_image_loader_gst_LDFLAGS = - -## good list of extensions: -## http://www.fileinfo.com/filetypes/video -## should check which ones gst does support and make sure they are here -install-exec-hook: - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.264 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3g2 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gp - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gp2 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gpp - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3gpp2 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.3p2 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.asf - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.avi - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.bdm - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.bdmv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.clpi - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cpi - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.fla - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.flv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m1v - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m2t - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m2v - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.m4v - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mkv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mov - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mp2 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mp2ts - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mp4 - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpe - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpeg - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpg - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpl - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mpls - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mts - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mxf - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nut - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nuv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogg - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogm - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ogv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.qt - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rm - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmj - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmm - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rms - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmx - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rmvb - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rv - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.swf - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ts - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.webm - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.weba - ln -sf evas_image_loader.gst $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.wmv diff --git a/legacy/evas_generic_loaders/src/bin/gst/main.c b/legacy/evas_generic_loaders/src/bin/gst/main.c deleted file mode 100644 index d9e6fa786c..0000000000 --- a/legacy/evas_generic_loaders/src/bin/gst/main.c +++ /dev/null @@ -1,292 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include - -#include - -#include "shmfile.h" -#include "timeout.h" - -#define DATA32 unsigned int - -//#define GST_DBG - -#ifdef GST_DBG -#define D(fmt, args...) fprintf(stderr, fmt, ## args) -#else -#define D(fmt, args...) -#endif - -#ifdef WORDS_BIGENDIAN -# define CAPS "video/x-raw,format=ARGB" -#else -# define CAPS "video/x-raw,format=BGRA" -#endif - -static GstElement *pipeline = NULL; -static GstElement *sink = NULL; -static gint64 duration = -1; - -int width = 0; -int height = 0; -void *data = NULL; - - -static Eina_Bool -_gst_init(const char *filename) -{ - GstPad *pad; - GstCaps *caps; - GstStructure *structure; - gchar *descr; - gchar *uri; - GError *error = NULL; - GstFormat format; - GstStateChangeReturn ret; -// int vidstr = 0; - - if (!filename || !*filename) - return EINA_FALSE; - - if (!gst_init_check(NULL, NULL, &error)) - return EINA_FALSE; - - if ((*filename == '/') || (*filename == '~')) - { - uri = g_filename_to_uri(filename, NULL, NULL); - if (!uri) - { - D("could not create new uri from %s", filename); - goto unref_pipeline; - } - } - else - uri = strdup(filename); - - D("Setting file %s\n", uri); - - descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! videoconvert ! " - " appsink name=sink caps=\"" CAPS "\"", uri); - pipeline = gst_parse_launch(descr, &error); - free(uri); - - if (error != NULL) - { - D("could not construct pipeline: %s\n", error->message); - g_error_free (error); - goto gst_shutdown; - } -/* needs gst 1.0+ - * also only works on playbin objects!!! this is a uridecodebin! - g_object_get(G_OBJECT(pipeline), - "n-video", &vidstr, - NULL); - if (vidstr <= 0) - { - D("no video stream\n"); - goto gst_shutdown; - } -*/ - sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); - - ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); - switch (ret) - { - case GST_STATE_CHANGE_FAILURE: - D("failed to play the file\n"); - goto unref_pipeline; - case GST_STATE_CHANGE_NO_PREROLL: - D("live sources not supported yet\n"); - goto unref_pipeline; - default: - break; - } - - ret = gst_element_get_state((pipeline), NULL, NULL, GST_CLOCK_TIME_NONE); - if (ret == GST_STATE_CHANGE_FAILURE) - { - D("could not complete pause\n"); - goto unref_pipeline; - } - - format = GST_FORMAT_TIME; - gst_element_query_duration (pipeline, format, &duration); - if (duration == -1) - { - fprintf(stderr, "duration fetch err\n"); - D("could not retrieve the duration, set it to 1s\n"); - duration = 1 * GST_SECOND; - } - - pad = gst_element_get_static_pad(sink, "sink"); - if (!pad) - { - D("could not retrieve the sink pad\n"); - goto unref_pipeline; - } - - caps = gst_pad_get_current_caps(pad); - if (!caps) - goto unref_pad; - - structure = gst_caps_get_structure(caps, 0); - - if (!gst_structure_get_int(structure, "width", &width)) - goto unref_caps; - if (!gst_structure_get_int(structure, "height", &height)) - goto unref_caps; - - gst_caps_unref(caps); - gst_object_unref(pad); - - return EINA_TRUE; - - unref_caps: - gst_caps_unref(caps); - unref_pad: - gst_object_unref(pad); - unref_pipeline: - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref(pipeline); - gst_shutdown: - gst_deinit(); - - return EINA_FALSE; -} - -static void -_gst_shutdown() -{ - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref(pipeline); - gst_deinit(); -} - -static void -_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) -{ - GstBuffer *buffer; - GstMapInfo info; - GstSample *sample; - - D("load image\n"); - if (pos >= 0.0) - gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - pos); - else - gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - duration / 2); - g_signal_emit_by_name(sink, "pull-preroll", &sample, NULL); - - shm_alloc(width * height * sizeof(DATA32)); - if (!shm_addr) return; - data = shm_addr; - - buffer = gst_sample_get_buffer (sample); - gst_buffer_map (buffer, &info, GST_MAP_READ); - D("load image: %p %d\n", info.data, info.size); - - memcpy(data, info.data, info.size); - - gst_buffer_unmap(buffer, &info); -} - -int -main(int argc, char **argv) -{ - char *file, *p; - int i, numonly; - int size_w = 0, size_h = 0; - int head_only = 0; - long long pos = -1.0; - - if (argc < 2) return -1; - // file is ALWAYS first arg, other options come after - file = argv[1]; - for (i = 2; i < argc; i++) - { - if (!strcmp(argv[i], "-head")) - // asked to only load header, not body/data - head_only = 1; - else if (!strcmp(argv[i], "-key")) - { - i++; - numonly = 1; - for (p = argv[i]; *p; p++) - { - if ((*p < '0') || (*p > '9')) - { - numonly = 0; - break; - } - } - if (numonly) pos = atoll(argv[i]) * 1000000; - i++; - } - else if (!strcmp(argv[i], "-opt-scale-down-by")) - { // not used by ps loader - i++; - // int scale_down = atoi(argv[i]); - } - else if (!strcmp(argv[i], "-opt-dpi")) - { - i++; - } - else if (!strcmp(argv[i], "-opt-size")) - { // not used by ps loader - i++; - size_w = atoi(argv[i]); - i++; - size_h = atoi(argv[i]); - } - } - - timeout_init(10); - - D("_gst_init_file\n"); - - if (!_gst_init(file)) - return -1; - D("_gst_init done\n"); - - if ((pos >= 0) && (pos > duration)) return -1; - - if (!head_only) - { - _gst_load_image(size_w, size_h, pos); - } - - D("size...: %ix%i\n", width, height); - D("alpha..: 0\n"); - - printf("size %i %i\n", width, height); - printf("alpha 0\n"); - - if (!head_only) - { - if (shm_fd >= 0) - { - printf("shmfile %s\n", shmfile); - } - else - { - // could also to "tmpfile %s\n" like shmfile but just - // a mmaped tmp file on the system - printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); - } - shm_free(); - } - else - printf("done\n"); - - _gst_shutdown(); - fflush(stdout); - return 0; -} diff --git a/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c b/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c deleted file mode 100644 index 3e0c02b823..0000000000 --- a/legacy/evas_generic_loaders/src/bin/gst/main_0_10.c +++ /dev/null @@ -1,278 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include - -#include - -#include "shmfile.h" -#include "timeout.h" - -#define DATA32 unsigned int - -//#define GST_DBG - -#ifdef GST_DBG -#define D(fmt, args...) fprintf(stderr, fmt, ## args) -#else -#define D(fmt, args...) -#endif - -#define CAPS "video/x-raw-rgb,bpp=(int)32,depth=(int)32,endianness=(int)4321,red_mask=(int)0x0000ff00, green_mask=(int)0x00ff0000, blue_mask=(int)0xff000000" - -static GstElement *pipeline = NULL; -static GstElement *sink = NULL; -static gint64 duration = -1; - -int width = 0; -int height = 0; -void *data = NULL; - - -static Eina_Bool -_gst_init(const char *filename) -{ - GstPad *pad; - GstCaps *caps; - GstStructure *structure; - gchar *descr; - gchar *uri; - GError *error = NULL; - GstFormat format; - GstStateChangeReturn ret; -// int vidstr = 0; - - if (!filename || !*filename) - return EINA_FALSE; - - if (!gst_init_check(NULL, NULL, &error)) - return EINA_FALSE; - - if ((*filename == '/') || (*filename == '~')) - { - uri = g_filename_to_uri(filename, NULL, NULL); - if (!uri) - { - D("could not create new uri from %s", filename); - goto unref_pipeline; - } - } - else - uri = strdup(filename); - - D("Setting file %s\n", uri); - - descr = g_strdup_printf("uridecodebin uri=%s ! typefind ! ffmpegcolorspace ! " - " appsink name=sink caps=\"" CAPS "\"", uri); - pipeline = gst_parse_launch(descr, &error); - free(uri); - - if (error != NULL) - { - D("could not construct pipeline: %s\n", error->message); - g_error_free (error); - goto gst_shutdown; - } -/* needs gst 1.0+ - * also only works on playbin objects!!! this is a uridecodebin! - g_object_get(G_OBJECT(pipeline), - "n-video", &vidstr, - NULL); - if (vidstr <= 0) - { - D("no video stream\n"); - goto gst_shutdown; - } -*/ - sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); - - ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); - switch (ret) - { - case GST_STATE_CHANGE_FAILURE: - D("failed to play the file\n"); - goto unref_pipeline; - case GST_STATE_CHANGE_NO_PREROLL: - D("live sources not supported yet\n"); - goto unref_pipeline; - default: - break; - } - - ret = gst_element_get_state((pipeline), NULL, NULL, GST_CLOCK_TIME_NONE); - if (ret == GST_STATE_CHANGE_FAILURE) - { - D("could not complete pause\n"); - goto unref_pipeline; - } - - format = GST_FORMAT_TIME; - gst_element_query_duration (pipeline, &format, &duration); - if (duration == -1) - { - D("could not retrieve the duration, set it to 1s\n"); - duration = 1 * GST_SECOND; - } - - pad = gst_element_get_static_pad(sink, "sink"); - if (!pad) - { - D("could not retrieve the sink pad\n"); - goto unref_pipeline; - } - - caps = gst_pad_get_negotiated_caps(pad); - if (!caps) - goto unref_pad; - - structure = gst_caps_get_structure(caps, 0); - - if (!gst_structure_get_int(structure, "width", &width)) - goto unref_caps; - if (!gst_structure_get_int(structure, "height", &height)) - goto unref_caps; - - gst_caps_unref(caps); - gst_object_unref(pad); - - return EINA_TRUE; - - unref_caps: - gst_caps_unref(caps); - unref_pad: - gst_object_unref(pad); - unref_pipeline: - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref(pipeline); - gst_shutdown: - gst_deinit(); - - return EINA_FALSE; -} - -static void -_gst_shutdown() -{ - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref(pipeline); - gst_deinit(); -} - -static void -_gst_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED, double pos) -{ - GstBuffer *buffer; - - D("load image\n"); - if (pos >= 0.0) - gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - pos * 1000000000.0); - else - gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - duration / 2); - g_signal_emit_by_name(sink, "pull-preroll", &buffer, NULL); - D("load image : %p %d\n", GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); - - shm_alloc(width * height * sizeof(DATA32)); - if (!shm_addr) return; - data = shm_addr; - - memcpy(data, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); -} - -int -main(int argc, char **argv) -{ - char *file, *p; - int i, numonly; - int size_w = 0, size_h = 0; - int head_only = 0; - long long pos = -1.0; - - if (argc < 2) return -1; - // file is ALWAYS first arg, other options come after - file = argv[1]; - for (i = 2; i < argc; i++) - { - if (!strcmp(argv[i], "-head")) - // asked to only load header, not body/data - head_only = 1; - else if (!strcmp(argv[i], "-key")) - { - i++; - numonly = 1; - for (p = argv[i]; *p; p++) - { - if ((!*p < '0') || (*p > 9)) - { - numonly = 0; - break; - } - } - if (numonly) pos = (double)(atoll(argv[i])) / 1000.0; - i++; - } - else if (!strcmp(argv[i], "-opt-scale-down-by")) - { // not used by ps loader - i++; - // int scale_down = atoi(argv[i]); - } - else if (!strcmp(argv[i], "-opt-dpi")) - { - i++; - } - else if (!strcmp(argv[i], "-opt-size")) - { // not used by ps loader - i++; - size_w = atoi(argv[i]); - i++; - size_h = atoi(argv[i]); - } - } - - timeout_init(10); - - D("_gst_init_file\n"); - - if (!_gst_init(file)) - return -1; - D("_gst_init done\n"); - - if (!head_only) - { - _gst_load_image(size_w, size_h, pos); - } - - D("size...: %ix%i\n", width, height); - D("alpha..: 0\n"); - - printf("size %i %i\n", width, height); - printf("alpha 0\n"); - - if (!head_only) - { - if (shm_fd >= 0) - { - printf("shmfile %s\n", shmfile); - } - else - { - // could also to "tmpfile %s\n" like shmfile but just - // a mmaped tmp file on the system - printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); - } - shm_free(); - } - else - printf("done\n"); - - _gst_shutdown(); - fflush(stdout); - return 0; -} diff --git a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am b/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am deleted file mode 100644 index d57c9a0a16..0000000000 --- a/legacy/evas_generic_loaders/src/bin/pdf/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src \ --I$(top_srcdir)/src/bin \ --I$(top_srcdir)/src/bin/common \ --I$(top_srcdir)/src/bin/pdf \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@POPPLER_CFLAGS@ - -EXTRA_DIST = evas_generic_pdf_loader.libreoffice - -bin_SCRIPTS = evas_generic_pdf_loader.libreoffice -bin_PROGRAMS = evas_image_loader.pdf -bindir = $(libdir)/evas/utils - -evas_image_loader_pdf_SOURCES = \ -main.cpp \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c -evas_image_loader_pdf_CFLAGS = -evas_image_loader_pdf_LDADD = @POPPLER_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ -evas_image_loader_pdf_LDFLAGS = - -install-exec-hook: - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ppt - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pptx - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odp - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xls - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xlsx - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ods - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.doc - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.docx - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odt - ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rtf - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ppt - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.pptx - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odp - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.xls - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.xlsx - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ods - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.doc - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.docx - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odt - ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.rtf diff --git a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am b/legacy/evas_generic_loaders/src/bin/ps/Makefile.am deleted file mode 100644 index eb62cc62a4..0000000000 --- a/legacy/evas_generic_loaders/src/bin/ps/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src \ --I$(top_srcdir)/src/bin \ --I$(top_srcdir)/src/bin/common \ --I$(top_srcdir)/src/bin/ps \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@SPECTRE_CFLAGS@ - -bin_PROGRAMS = evas_image_loader.ps -bindir = $(libdir)/evas/utils - -evas_image_loader_ps_SOURCES = \ -main.c \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c -evas_image_loader_ps_CFLAGS = -evas_image_loader_ps_LDADD = @SPECTRE_LIBS@ @EINA_LIBS@ @SHM_OPEN_LIBS@ -evas_image_loader_ps_LDFLAGS = diff --git a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am b/legacy/evas_generic_loaders/src/bin/raw/Makefile.am deleted file mode 100644 index 90d90055b8..0000000000 --- a/legacy/evas_generic_loaders/src/bin/raw/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src \ --I$(top_srcdir)/src/bin \ --I$(top_srcdir)/src/bin/common \ --I$(top_srcdir)/src/bin/raw \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ - -bin_PROGRAMS = evas_image_loader.raw -bindir = $(libdir)/evas/utils - -evas_image_loader_raw_SOURCES = \ -main.c \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c -evas_image_loader_raw_CFLAGS = @LIBRAW_CFLAGS@ -evas_image_loader_raw_LDADD = @SHM_OPEN_LIBS@ @LIBRAW_LIBS@ -lm -evas_image_loader_raw_LDFLAGS = - -install-exec-hook: - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.arw - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cr2 - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.crw - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dcr - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dng - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.k25 - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.kdc - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.erf - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mrw - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nef - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nrf - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nrw - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.orf - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rw2 - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pef - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.raf - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.sr2 - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.srf - ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.x3f diff --git a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am b/legacy/evas_generic_loaders/src/bin/svg/Makefile.am deleted file mode 100644 index e5d85a7de4..0000000000 --- a/legacy/evas_generic_loaders/src/bin/svg/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src \ --I$(top_srcdir)/src/bin \ --I$(top_srcdir)/src/bin/common \ --I$(top_srcdir)/src/bin/svg \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ - -bin_PROGRAMS = evas_image_loader.svg -bindir = $(libdir)/evas/utils - -evas_image_loader_svg_SOURCES = \ -main.c \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c -evas_image_loader_svg_CFLAGS = @SVG_CFLAGS@ -evas_image_loader_svg_LDADD = @SVG_LIBS@ @SHM_OPEN_LIBS@ -lm -evas_image_loader_svg_LDFLAGS = - - -install-exec-hook: - ln -sf evas_image_loader.svg $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.svgz - ln -sf evas_image_loader.svg $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.svg.gz diff --git a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am b/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am deleted file mode 100644 index 041e8b31d2..0000000000 --- a/legacy/evas_generic_loaders/src/bin/xcf/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I$(top_srcdir) \ --I$(top_srcdir)/src \ --I$(top_srcdir)/src/bin \ --I$(top_srcdir)/src/bin/common \ --I$(top_srcdir)/src/bin/xcf \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ - -bin_PROGRAMS = evas_image_loader.xcf -bindir = $(libdir)/evas/utils - -evas_image_loader_xcf_SOURCES = \ -main.c pixelfuncs.c common.h \ -$(top_srcdir)/src/bin/common/shmfile.c \ -$(top_srcdir)/src/bin/common/timeout.c -evas_image_loader_xcf_CFLAGS = @EINA_CFLAGS@ -evas_image_loader_xcf_LDADD = @EINA_LIBS@ -lz -lm @SHM_OPEN_LIBS@ -evas_image_loader_xcf_LDFLAGS = - -install-exec-hook: - ln -sf evas_image_loader.xcf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xcf.gz diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index f1e5332b9d..bb510ad591 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -2377,3 +2377,156 @@ if HAVE_CXX11 evas_eolian_cxx_hh = $(evas_eolian_pub_files:%.eo=%.eo.hh) evas_eolian_cxx_impl = $(evas_eolian_pub_files:%.eo=%.eo.impl.hh) endif + +EXTRA_DIST += \ +generic/evas/common/shmfile.c \ +generic/evas/common/shmfile.h \ +generic/evas/common/timeout.c \ +generic/evas/common/timeout.h + +evasgenericloadersdir = \ +$(libdir)/evas/utils + +evasgenericloaders_PROGRAMS = +evasgenericloaders_SCRIPT = + +### Libreoffice converter to pdf +EXTRA_DIST += generic/evas/pdf/evas_generic_pdf_loader.libreoffice + +if HAVE_POPPLER + +evasgenericloaders_SCRIPT += generic/evas/pdf/evas_generic_pdf_loader.libreoffice +evasgenericloaders_PROGRAMS += generic/evas/pdf/evas_image_loader.pdf + +generic_evas_pdf_evas_image_loader_pdf_SOURCES = \ +generic/evas/pdf/main.cpp \ +generic/evas/common/shmfile.c \ +generic/evas/common/timeout.c +generic_evas_pdf_evas_image_loader_pdf_CFLAGS = \ +-I$(top_srcdir)/src/lib/efl \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/generic/evas/common \ +@POPPLER_CFLAGS@ +generic_evas_pdf_evas_image_loader_pdf_CXXFLAGS = \ +-I$(top_srcdir)/src/lib/efl \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/generic/evas/common \ +@POPPLER_CFLAGS@ +generic_evas_pdf_evas_image_loader_pdf_LDADD = @POPPLER_LIBS@ @USE_EINA_INTERNAL_LIBS@ @SHM_LIBS@ + +EFL_INSTALL_EXEC_HOOK += \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ppt; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pptx; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odp; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xls; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xlsx; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.ods; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.doc; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.docx; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.odt; \ +ln -sf evas_image_loader.pdf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rtf; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ppt; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.pptx; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odp; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.xls; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.xlsx; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.ods; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.doc; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.docx; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.odt; \ +ln -sf evas_generic_pdf_loader.libreoffice $(DESTDIR)$(libdir)/evas/utils/evas_generic_pdf_loader.rtf; + +endif + +if HAVE_SPECTRE + +evasgenericloaders_PROGRAMS += generic/evas/ps/evas_image_loader.ps + +generic_evas_ps_evas_image_loader_ps_SOURCES = \ +generic/evas/ps/main.c \ +generic/evas/common/shmfile.c \ +generic/evas/common/timeout.c +generic_evas_ps_evas_image_loader_ps_LDADD = @SPECTRE_LIBS@ @USE_EINA_INTERNAL_LIBS@ @SHM_LIBS@ +generic_evas_ps_evas_image_loader_ps_CFLAGS = \ +-I$(top_srcdir)/src/lib/efl \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/generic/evas/common + +endif + +if HAVE_LIBRAW + +evasgenericloaders_PROGRAMS += generic/evas/raw/evas_image_loader.raw + +generic_evas_raw_evas_image_loader_raw_SOURCES = \ +generic/evas/raw/main.c \ +generic/evas/common/shmfile.c \ +generic/evas/common/timeout.c +generic_evas_raw_evas_image_loader_raw_LDADD = @SHM_LIBS@ @USE_EINA_INTERNAL_LIBS@ @LIBRAW_LIBS@ -lm +generic_evas_raw_evas_image_loader_raw_CFLAGS = \ +-I$(top_srcdir)/src/lib/efl \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/generic/evas/common \ +@LIBRAW_CFLAGS@ + +EFL_INSTALL_EXEC_HOOK += \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.arw; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.cr2; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.crw; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dcr; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.dng; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.k25; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.kdc; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.erf; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.mrw; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nef; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nrf; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.nrw; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.orf; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.rw2; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.pef; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.raf; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.sr2; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.srf; \ +ln -sf evas_image_loader.raw $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.x3f; + +endif + +if HAVE_RSVG + +evasgenericloaders_PROGRAMS += generic/evas/svg/evas_image_loader.svg + +generic_evas_svg_evas_image_loader_svg_SOURCES = \ +generic/evas/svg/main.c \ +generic/evas/common/shmfile.c \ +generic/evas/common/timeout.c +generic_evas_svg_evas_image_loader_svg_CFLAGS = \ +-I$(top_srcdir)/src/lib/efl \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/generic/evas/common \ +@RSVG_CFLAGS@ +generic_evas_svg_evas_image_loader_svg_LDADD = @RSVG_LIBS@ @USE_EINA_INTERNAL_LIBS@ @SHM_LIBS@ -lm + +EFL_INSTALL_EXEC_HOOK += \ +ln -sf evas_image_loader.svg $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.svgz; \ +ln -sf evas_image_loader.svg $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.svg.gz; + +endif + +EXTRA_DIST += generic/evas/xcf/common.h + +evasgenericloaders_PROGRAMS += generic/evas/xcf/evas_image_loader.xcf + +generic_evas_xcf_evas_image_loader_xcf_SOURCES = \ +generic/evas/xcf/main.c \ +generic/evas/xcf/pixelfuncs.c \ +generic/evas/common/shmfile.c \ +generic/evas/common/timeout.c +generic_evas_xcf_evas_image_loader_xcf_CFLAGS = \ +-I$(top_srcdir)/src/lib/efl \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/generic/evas/common +generic_evas_xcf_evas_image_loader_xcf_LDADD = @USE_EINA_INTERNAL_LIBS@ @SHM_LIBS@ -lm -lz + +EFL_INSTALL_EXEC_HOOK += \ +ln -sf evas_image_loader.xcf $(DESTDIR)$(libdir)/evas/utils/evas_image_loader.xcf.gz; diff --git a/src/generic/.gitignore b/src/generic/.gitignore new file mode 100644 index 0000000000..f901c12b6d --- /dev/null +++ b/src/generic/.gitignore @@ -0,0 +1,5 @@ +/emotion/vlc/vlc +/evas/pdf/evas_image_loader.pdf +/evas/ps/evas_image_loader.ps +/evas/raw/evas_image_loader.raw +/evas/xcf/evas_image_loader.xcf diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.c b/src/generic/evas/common/shmfile.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/common/shmfile.c rename to src/generic/evas/common/shmfile.c diff --git a/legacy/evas_generic_loaders/src/bin/common/shmfile.h b/src/generic/evas/common/shmfile.h similarity index 100% rename from legacy/evas_generic_loaders/src/bin/common/shmfile.h rename to src/generic/evas/common/shmfile.h diff --git a/legacy/evas_generic_loaders/src/bin/common/timeout.c b/src/generic/evas/common/timeout.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/common/timeout.c rename to src/generic/evas/common/timeout.c diff --git a/legacy/evas_generic_loaders/src/bin/common/timeout.h b/src/generic/evas/common/timeout.h similarity index 100% rename from legacy/evas_generic_loaders/src/bin/common/timeout.h rename to src/generic/evas/common/timeout.h diff --git a/legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice b/src/generic/evas/pdf/evas_generic_pdf_loader.libreoffice similarity index 100% rename from legacy/evas_generic_loaders/src/bin/pdf/evas_generic_pdf_loader.libreoffice rename to src/generic/evas/pdf/evas_generic_pdf_loader.libreoffice diff --git a/legacy/evas_generic_loaders/src/bin/pdf/main.cpp b/src/generic/evas/pdf/main.cpp similarity index 100% rename from legacy/evas_generic_loaders/src/bin/pdf/main.cpp rename to src/generic/evas/pdf/main.cpp diff --git a/legacy/evas_generic_loaders/src/bin/ps/main.c b/src/generic/evas/ps/main.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/ps/main.c rename to src/generic/evas/ps/main.c diff --git a/legacy/evas_generic_loaders/src/bin/raw/main.c b/src/generic/evas/raw/main.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/raw/main.c rename to src/generic/evas/raw/main.c diff --git a/legacy/evas_generic_loaders/src/bin/svg/main.c b/src/generic/evas/svg/main.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/svg/main.c rename to src/generic/evas/svg/main.c diff --git a/legacy/evas_generic_loaders/src/bin/xcf/common.h b/src/generic/evas/xcf/common.h similarity index 100% rename from legacy/evas_generic_loaders/src/bin/xcf/common.h rename to src/generic/evas/xcf/common.h diff --git a/legacy/evas_generic_loaders/src/bin/xcf/main.c b/src/generic/evas/xcf/main.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/xcf/main.c rename to src/generic/evas/xcf/main.c diff --git a/legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c b/src/generic/evas/xcf/pixelfuncs.c similarity index 100% rename from legacy/evas_generic_loaders/src/bin/xcf/pixelfuncs.c rename to src/generic/evas/xcf/pixelfuncs.c From c6fba15fc4caab91b46e2614c576754777670737 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 1 Jun 2016 16:59:45 -0700 Subject: [PATCH 346/347] evas: remove legacy file from evas_generic_loaders. --- legacy/evas_generic_loaders/.arcconfig | 4 - legacy/evas_generic_loaders/.gitignore | 43 -- legacy/evas_generic_loaders/ChangeLog | 44 -- legacy/evas_generic_loaders/Makefile.am | 36 -- legacy/evas_generic_loaders/NEWS | 107 ----- legacy/evas_generic_loaders/README | 85 ---- legacy/evas_generic_loaders/TODO | 5 - legacy/evas_generic_loaders/autogen.sh | 39 -- legacy/evas_generic_loaders/configure.ac | 255 ---------- .../evas_generic_loaders/m4/ac_attribute.m4 | 47 -- .../m4/ac_path_generic.m4 | 137 ------ legacy/evas_generic_loaders/m4/efl.m4 | 449 ------------------ .../evas_generic_loaders/pkgbuild/PKGBUILD.in | 36 -- legacy/evas_generic_loaders/src/Makefile.am | 3 - 14 files changed, 1290 deletions(-) delete mode 100644 legacy/evas_generic_loaders/.arcconfig delete mode 100644 legacy/evas_generic_loaders/.gitignore delete mode 100644 legacy/evas_generic_loaders/ChangeLog delete mode 100644 legacy/evas_generic_loaders/Makefile.am delete mode 100644 legacy/evas_generic_loaders/NEWS delete mode 100644 legacy/evas_generic_loaders/README delete mode 100644 legacy/evas_generic_loaders/TODO delete mode 100755 legacy/evas_generic_loaders/autogen.sh delete mode 100644 legacy/evas_generic_loaders/configure.ac delete mode 100644 legacy/evas_generic_loaders/m4/ac_attribute.m4 delete mode 100644 legacy/evas_generic_loaders/m4/ac_path_generic.m4 delete mode 100644 legacy/evas_generic_loaders/m4/efl.m4 delete mode 100644 legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in delete mode 100644 legacy/evas_generic_loaders/src/Makefile.am diff --git a/legacy/evas_generic_loaders/.arcconfig b/legacy/evas_generic_loaders/.arcconfig deleted file mode 100644 index 7d7c8a684c..0000000000 --- a/legacy/evas_generic_loaders/.arcconfig +++ /dev/null @@ -1,4 +0,0 @@ -{ - "project_id" : "evas_generic_loaders", - "conduit_uri" : "https://phab.enlightenment.org/" -} diff --git a/legacy/evas_generic_loaders/.gitignore b/legacy/evas_generic_loaders/.gitignore deleted file mode 100644 index 34b8e2cd89..0000000000 --- a/legacy/evas_generic_loaders/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -*~ -*.o -*.swp -*.swo -ABOUT-NLS -INSTALL -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ -compile -config.cache -config.cache-env -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -depcomp -install-sh -ltmain.sh -m4/libtool.m4 -m4/ltoptions.m4 -m4/ltsugar.m4 -m4/ltversion.m4 -m4/lt~obsolete.m4 -missing -Makefile -Makefile.in -.deps -stamp-h1 -src/bin/gst/evas_image_loader.gst -src/bin/pdf/evas_image_loader.pdf -src/bin/ps/evas_image_loader.ps -src/bin/svg/evas_image_loader.svg -src/bin/xcf/evas_image_loader.xcf -src/bin/raw/evas_image_loader.raw -pkgbuild/PKGBUILD -pkgbuild/pkg -pkgbuild/src -pkgbuild/*.tar.xz diff --git a/legacy/evas_generic_loaders/ChangeLog b/legacy/evas_generic_loaders/ChangeLog deleted file mode 100644 index 9d3b7f13d2..0000000000 --- a/legacy/evas_generic_loaders/ChangeLog +++ /dev/null @@ -1,44 +0,0 @@ -2011-12-02 Carsten Haitzler (The Rasterman) - - 1.1.0 release - -2011-12-02 Carsten Haitzler (The Rasterman) - - * Add symlinks for *.dv, *.qt and *.rv video file formats - -2012-03-18 Carsten Haitzler (The Rasterman) - - * Fix distcheck with highly parallel builds - -2012-04-26 Carsten Haitzler (The Rasterman) - - 1.2.0 release - -2012-05-18 Cedric Bail - - * Make rsvg backend use the generic backend as it is our main - source of crash in e17. - -2012-05-06 Fanina Cristian - - * Add support for Poppler 0.20. - -2012-06-30 Carsten Haitzler (The Rasterman) - - * Add timeout (default 5 seconds) for gstreamer loader in case - gst hangs. - -2012-08-30 Carsten Haitzler (The Rasterman) - - 1.7.0 release - -2012-09-26 Carsten Haitzler (The Rasterman) - - * Add various alarm/signal based timeouts for all generic - loaders in case they get stuck - -OUT OF DATE NOTICE: -------------------- -With the start of the 1.9.x release cycle we now longer update the ChangeLog and rely on git log for -this functionality. We keep however a NEWS files for a high level overview of changes in a new -release which will be filled at the end of the release cycle. diff --git a/legacy/evas_generic_loaders/Makefile.am b/legacy/evas_generic_loaders/Makefile.am deleted file mode 100644 index 96dec582ec..0000000000 --- a/legacy/evas_generic_loaders/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = src - -MAINTAINERCLEANFILES = \ -Makefile.in \ -aclocal.m4 \ -compile \ -config.guess \ -config.h.in \ -config.h.in~ \ -config.sub \ -configure \ -depcomp \ -install-sh \ -ltmain.sh \ -missing \ -$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \ -$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \ -m4/libtool.m4 \ -m4/lt~obsolete.m4 \ -m4/ltoptions.m4 \ -m4/ltsugar.m4 \ -m4/ltversion.m4 - -EXTRA_DIST = \ -AUTHORS \ -COPYING \ -m4/ac_attribute.m4 \ -m4/ac_path_generic.m4 \ -README - -.PHONY: doc - -doc: - @echo "Empty doc target until we have real documentation." diff --git a/legacy/evas_generic_loaders/NEWS b/legacy/evas_generic_loaders/NEWS deleted file mode 100644 index 3928651cf2..0000000000 --- a/legacy/evas_generic_loaders/NEWS +++ /dev/null @@ -1,107 +0,0 @@ -=========================== -Evas Generic Loaders 1.17.0 -=========================== - -Changes since 1.16.0: ---------------------- - -No significant changes in this release. - -Changes since 1.15.0: ---------------------- - -Fixes: - - * generic loaders - fix load if process esits before stdout produced - -Changes since 1.14.0: ---------------------- - -No significant changes in this release. - -Changes since 1.13.0: ---------------------- - -Fixes: - - * pdf: Add support for changes with poppler >= 0.31 (T2184) - -Changes since 1.12.0: ---------------------- - - * No relevant changes. - -Changes since 1.11.0: ---------------------- - -Fixes: - - * Improve LO binary detection - * xcf: Make sure complete calculation is unsigned (CID63748, CID63749) - * raw: Make sure to keep the correct sign (CID63746, CID63747) - -Changes since Evas Generic Loaders 1.10.0: ------------------------------------------- - -Features: - - * Trying to port evas_generic_loaders to gstreamer1.0 - * Add in older gst 0.10 support in evas_generic_loaders - -Fixes: - - * gst1 support fixed now to do argb properly - * Remove autogen.sh from the dist tarball. - * fix gst video loader in generic to have key actually work - -Changes since Evas Generic Loaders 1.9.0: ------------------------------------------ - -Fixes: - - * license: update FSF address. (T1042) - -Changes since Evas Generic Loaders 1.8.0: ------------------------------------------ - -Improvements: - - * gst loader - support key as stream position in 1/1000th of a second - -Fixes: - - * bugfix: add a typefind to gstreamer plugin pipeline - previously, we would load any file and try to force it into video/x-raw-rgb, which was - (obviously) problematic for audio-only files. with a typefind added to the pipeline, only - files which can output to video/x-raw-rgb will be processed - * bugfix: unbreak gstreamer plugin by not using the n-video property which is only available in 1.0+ - -Changes since Evas Generic Loaders 1.7.0: ------------------------------------------ - -Improvements: - - * All generic loader binaries have built-in timeouts in case they - get stuck. - * Libreoffice support for thumbnailing office documents - -Changes since Evas Generic Loaders 1.2.0: ------------------------------------------ - -Additions: - - * Add a librsvg generic loader. - * Add support for poppler 0.20 - -Evas Generic Loaders 1.2.0 - -Changes since Evas Generic Loaders 1.1.0: ------------------------------------------ - -Additions: - - * symlinks for *.dv, *.qt and *.rv video file formats - -Fixes: - - * distcheck for parallel builds diff --git a/legacy/evas_generic_loaders/README b/legacy/evas_generic_loaders/README deleted file mode 100644 index 2e0f816758..0000000000 --- a/legacy/evas_generic_loaders/README +++ /dev/null @@ -1,85 +0,0 @@ -Evas generic loaders 1.11.0 -=========================== - -****************************************************************************** - FOR ANY ISSUES PLEASE EMAIL: - enlightenment-devel@lists.sourceforge.net -****************************************************************************** - -These are additional "generic" loaders for Evas that are stand-alone -executables that evas may run from its generic loader module. This -means that if they crash, the application loading the image does not -crash also. In addition the licensing of these binaries will not -affect the license of any application that uses Evas as this uses a -completely generic execution system that allows anything to be plugged -in as a loader. - - -REQUIREMENTS ------------- - -Required by default: - - * libc - * libm - * zlib - -Highly recommended: - - * gstreamer (1.x or 0.10) (ensure you have all the gstreamer codecs you need/want) - * poppler - * libraw - * libspectre - * librsvg - -Suggested: - - * libreoffice - - -COMPONENTS ----------- - -Generic loaders currently provided: - - * **XCF** (.xcf .xcf.gz) - - * **PDF** (using poppler) - * use -key option to specific what page to get and load options for size - Should we add mupdf ? - - * **PS** (using libspectre) - * use -key option to specific what page to get and load options for size - Should we use directly libgs ? - - * **RAW** (using libraw) - - * **SVG** (using librsvg) - - * **MPG/AVI/OGV/MOV/MKV/WMV** etc. (using gstreamer) - * Should we add libxine and vlc ? - - * **PPT/PPTX/DOC/DOCX/XLS** etc. - * Required PDF loader, and uses libreoffice binaries as slaves to - export PDFs to load - - -COMPILING AND INSTALLING ------------------------- - - ./configure - make - sudo make install - - -COMPILER FLAGS --------------- - -You may want to change the install prefix for EFL with: - - --prefix=/path/to/prefix - -**NOTE:** - -You should put generic loaders in the same prefix as EFL or they will -not be found by EFL at runtime. diff --git a/legacy/evas_generic_loaders/TODO b/legacy/evas_generic_loaders/TODO deleted file mode 100644 index ce7ede1e90..0000000000 --- a/legacy/evas_generic_loaders/TODO +++ /dev/null @@ -1,5 +0,0 @@ -Modules to add: ---------------- - - [ ] DVI - [ ] Djvu diff --git a/legacy/evas_generic_loaders/autogen.sh b/legacy/evas_generic_loaders/autogen.sh deleted file mode 100755 index 00116eaf80..0000000000 --- a/legacy/evas_generic_loaders/autogen.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -rm -rf autom4te.cache -rm -f aclocal.m4 ltmain.sh - -touch README -touch ABOUT-NLS - -echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 -echo "Running autoheader..." ; autoheader || exit 1 -echo "Running autoconf..." ; autoconf || exit 1 -echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 -echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 - -W=0 - -rm -f config.cache-env.tmp -echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp -echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp -echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp -echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp -echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp - -cmp config.cache-env.tmp config.cache-env >> /dev/null -if [ $? -ne 0 ]; then - W=1; -fi - -if [ $W -ne 0 ]; then - echo "Cleaning configure cache..."; - rm -f config.cache config.cache-env - mv config.cache-env.tmp config.cache-env -else - rm -f config.cache-env.tmp -fi - -if [ -z "$NOCONFIGURE" ]; then - ./configure -C "$@" -fi diff --git a/legacy/evas_generic_loaders/configure.ac b/legacy/evas_generic_loaders/configure.ac deleted file mode 100644 index 50e2745e38..0000000000 --- a/legacy/evas_generic_loaders/configure.ac +++ /dev/null @@ -1,255 +0,0 @@ -EFL_VERSION([1], [17], [99], [dev]) -AC_INIT([evas_generic_loaders], [efl_version], [enlightenment-devel@lists.sourceforge.net]) -AC_PREREQ([2.52]) -AC_CONFIG_SRCDIR([configure.ac]) -AC_CONFIG_MACRO_DIR([m4]) - -AC_CONFIG_HEADERS([config.h]) - -AM_INIT_AUTOMAKE([1.6 dist-xz]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -### Needed information - -AC_CANONICAL_BUILD -AC_CANONICAL_HOST - -### Checks for libraries -AC_PROG_CC -AC_PROG_CXX -PKG_PROG_PKG_CONFIG - -### Checks for libraries - -# Eina library -PKG_CHECK_MODULES(EINA, [eina >= 1.6.99]) - -AC_ARG_ENABLE([poppler], - [AC_HELP_STRING([--disable-poppler], [disable poppler support @<:@default==enabled@:>@])], - [want_poppler=$enableval], - [want_poppler="yes"]) - -if test "x${want_poppler}" = "xyes" ; then - PKG_CHECK_EXISTS([poppler >= 0.12 poppler < 0.20], - [ - poppler_pc="poppler >= 0.12 poppler < 0.20" - have_poppler="yes" - ], - [have_poppler="no"]) - - if test "x${have_poppler}" = "xno" ; then - PKG_CHECK_EXISTS([poppler >= 0.20 poppler < 0.31], - [ - poppler_pc="poppler >= 0.20 poppler < 0.31" - AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20]) - have_poppler="yes" - ], - [have_poppler="no"]) - fi - - if test "x${have_poppler}" = "xno" ; then - PKG_CHECK_EXISTS([poppler >= 0.31], - [ - poppler_pc="poppler >= 0.31" - AC_DEFINE(HAVE_POPPLER_031, 1, [Have poppler 0.31]) - have_poppler="yes" - ], - [have_poppler="no"]) - fi - - if test "x${have_poppler}" = "xyes" ; then - PKG_CHECK_MODULES([POPPLER], [${poppler_pc}], - [have_poppler="yes"], - [have_poppler="no"]) - fi - - if test "x${have_poppler}" = "xyes" ; then - AC_LANG(C++) - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="${CPPFLAGS} ${POPPLER_CFLAGS}" - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="${CXXFLAGS} ${POPPLER_CFLAGS}" - AC_CHECK_HEADERS([GlobalParams.h], - [have_poppler="yes"], - [have_poppler="no"]) - CXXFLAGS=$save_CXXFLAGS - CPPFLAGS=$save_CPPFLAGS - AC_LANG(C) - fi -else - have_poppler="no" -fi - -AC_ARG_ENABLE([spectre], - [AC_HELP_STRING([--disable-spectre], [disable spectre support @<:@default==enabled@:>@])], - [want_spectre=$enableval], - [want_spectre="yes"]) - -if test "x$want_spectre" = "xyes" ; then - PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_ps="yes"], [have_ps="no"]) -else - have_ps=no -fi - - -AC_ARG_ENABLE([libraw], - [AC_HELP_STRING([--disable-libraw], [disable libraw support @<:@default==enabled@:>@])], - [want_libraw=$enableval], - [want_libraw="yes"]) - -if test "x$want_libraw" = "xyes" ; then - PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"], [have_raw="no"]) -else - have_raw=no -fi - -AC_ARG_ENABLE([svg], - [AC_HELP_STRING([--disable-svg], [disable svg support @<:@default==enabled@:>@])], - [want_svg=$enableval], - [want_svg="yes"] -) - -have_svg_2_36="no" -if test "x$want_svg" = "xyes" ; then - PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_svg="yes"], [have_svg="no"]) - PKG_CHECK_MODULES( - [SVG_2_36], [librsvg-2.0 >= 2.36.0 cairo >= 1.0.0], - [ - have_svg_2_36="yes" - AC_DEFINE(HAVE_SVG_2_36, 1, [Have librsvg >= 2.36]) - ], - [have_svg_2_36="no"]) -else - have_svg=no -fi - -want_gst1="yes" -AC_ARG_ENABLE([gstreamer1], - [AC_HELP_STRING([--disable-gstreamer1], [disable gstreamer1 support @<:@default==enabled@:>@])], - [want_gst1=$enableval], - [want_gst1="yes"]) - -GST_REQS=1.0 -GSTPLUG_REQS=1.0 -GST_MAJORMINOR=1.0 - -AC_ARG_ENABLE([gstreamer], - [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], - [want_gstreamer=$enableval], - [want_gstreamer="yes"]) - -if test "x$want_gstreamer" = "xyes" ; then - have_gst="no"; - if test "x$want_gst1" = "xyes" ; then - PKG_CHECK_MODULES([GSTREAMER], - [gstreamer-1.0 >= 1.0 - gstreamer-plugins-base-1.0 >= 1.0 - ], - [have_gst="yes"; have_gst1="yes";], - [have_gst="no"; have_gst1="no";]) - fi - if test "x$have_gst" = "xno" ; then - PKG_CHECK_MODULES([GSTREAMER], - [gstreamer-0.10 >= 0.10.13 - gstreamer-plugins-base-0.10 >= 0.10.13 - ], - [have_gst="yes"; have_gst1="no";], - [have_gst="no"; have_gst1="no";]) - fi -else - have_gst=no -fi -AM_CONDITIONAL([HAVE_GST], [test "x${have_gst}" = "xyes"]) -AM_CONDITIONAL([HAVE_GST1], [test "x${have_gst1}" = "xyes"]) -AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) -AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) -AM_CONDITIONAL([HAVE_RAW], [test "x${have_raw}" = "xyes"]) -AM_CONDITIONAL([HAVE_SVG], [test "x${have_svg}" = "xyes"]) - -### Checks for header files - -AC_CHECK_HEADERS(netinet/in.h unistd.h) - -AC_CHECK_HEADER([zlib.h], - [dummy="yes"], - [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")]) - -SHM_OPEN_LIBS="" -AC_MSG_CHECKING([whether shm_open() is present]) -LIBS_save=${LIBS} -LIBS="${LIBS} -lrt" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include -#include - ]], - [[ -int fd; -fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); -shm_unlink("/"); - ]])], - [ - have_shm_open="yes" - AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call]) - SHM_OPEN_LIBS="-lrt" - ], - [have_shm_open="no"]) -LIBS=${LIBS_save} -AC_MSG_RESULT([${have_shm_open}]) -AC_SUBST(SHM_OPEN_LIBS) - -### Checks for compiler characteristics -AM_PROG_CC_C_O -AC_C_INLINE -AC_C_BIGENDIAN -AC_C___ATTRIBUTE__ - -### Checks for library functions - -AC_CONFIG_FILES([ -Makefile -src/Makefile -src/bin/Makefile -src/bin/common/Makefile -src/bin/gst/Makefile -src/bin/pdf/Makefile -src/bin/ps/Makefile -src/bin/raw/Makefile -src/bin/xcf/Makefile -src/bin/svg/Makefile -pkgbuild/PKGBUILD -]) - -AC_OUTPUT - -##################################################################### -## Info - -echo -echo -echo -echo "------------------------------------------------------------------------" -echo "$PACKAGE_NAME $PACKAGE_VERSION" -echo "------------------------------------------------------------------------" -echo -echo -echo "Configuration Options Summary:" -echo -echo "Loaders:" -echo " XCF..................: yes" -echo " Gstreamer............: ${have_gst}" -echo " PDF..................: ${have_poppler}" -echo " PS...................: ${have_ps}" -echo " RAW..................: ${have_raw}" -echo " SVG..................: ${have_svg}" -echo -echo "Compilation............: make (or gmake)" -echo " CPPFLAGS.............: $CPPFLAGS" -echo " CFLAGS...............: $CFLAGS" -echo " LDFLAGS..............: $LDFLAGS" -echo -echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')" -echo " prefix...............: $prefix" -echo diff --git a/legacy/evas_generic_loaders/m4/ac_attribute.m4 b/legacy/evas_generic_loaders/m4/ac_attribute.m4 deleted file mode 100644 index 23479a92ac..0000000000 --- a/legacy/evas_generic_loaders/m4/ac_attribute.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2004-2008 Kim Woelders -dnl Copyright (C) 2008 Vincent Torri -dnl That code is public domain and can be freely used or copied. -dnl Originally snatched from somewhere... - -dnl Macro for checking if the compiler supports __attribute__ - -dnl Usage: AC_C___ATTRIBUTE__ -dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__ -dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is -dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused)) -dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is -dnl defined to nothing. - -AC_DEFUN([AC_C___ATTRIBUTE__], -[ - -AC_MSG_CHECKING([for __attribute__]) - -AC_CACHE_VAL([ac_cv___attribute__], - [AC_TRY_COMPILE( - [ -#include - -int func(int x); -int foo(int x __attribute__ ((unused))) -{ - exit(1); -} - ], - [], - [ac_cv___attribute__="yes"], - [ac_cv___attribute__="no"] - )]) - -AC_MSG_RESULT($ac_cv___attribute__) - -if test "x${ac_cv___attribute__}" = "xyes" ; then - AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__]) - AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused]) - else - AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused]) -fi - -]) - -dnl End of ac_attribute.m4 diff --git a/legacy/evas_generic_loaders/m4/ac_path_generic.m4 b/legacy/evas_generic_loaders/m4/ac_path_generic.m4 deleted file mode 100644 index d42724115f..0000000000 --- a/legacy/evas_generic_loaders/m4/ac_path_generic.m4 +++ /dev/null @@ -1,137 +0,0 @@ -dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl -dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS -dnl -dnl The script must support `--cflags' and `--libs' args. -dnl If MINIMUM-VERSION is specified, the script must also support the -dnl `--version' arg. -dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, -dnl it must also support `--prefix' and `--exec-prefix'. -dnl (In other words, it must be like gtk-config.) -dnl -dnl For example: -dnl -dnl AC_PATH_GENERIC(Foo, 1.0.0) -dnl -dnl would run `foo-config --version' and check that it is at least 1.0.0 -dnl -dnl If so, the following would then be defined: -dnl -dnl FOO_CFLAGS to `foo-config --cflags` -dnl FOO_LIBS to `foo-config --libs` -dnl -dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) -dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) -dnl -dnl @author Angus Lees - -AC_DEFUN([AC_PATH_GENERIC], -[dnl -dnl we're going to need uppercase, lowercase and user-friendly versions of the -dnl string `LIBRARY' -pushdef([UP], translit([$1], [a-z], [A-Z]))dnl -pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl - -dnl -dnl Get the cflags and libraries from the LIBRARY-config script -dnl -AC_ARG_WITH(DOWN-prefix, - [ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)], - DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="") -AC_ARG_WITH(DOWN-exec-prefix, - [ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)], - DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="") - - if test x$DOWN[]_config_exec_prefix != x ; then - DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" - if test x${UP[]_CONFIG+set} != xset ; then - UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config - fi - fi - if test x$DOWN[]_config_prefix != x ; then - DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" - if test x${UP[]_CONFIG+set} != xset ; then - UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config - fi - fi - - AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no) - ifelse([$2], , - AC_MSG_CHECKING(for $1), - AC_MSG_CHECKING(for $1 - version >= $2) - ) - no_[]DOWN="" - if test "$UP[]_CONFIG" = "no" ; then - no_[]DOWN=yes - else - UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`" - UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`" - ifelse([$2], , ,[ - DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \ - --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` - DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \ - --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` - DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \ - --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` - DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])" - DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])" - DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])" - - # Compare wanted version to what config script returned. - # If I knew what library was being run, i'd probably also compile - # a test program at this point (which also extracted and tested - # the version in some library-specific way) - if test "$DOWN[]_config_major_version" -lt \ - "$DOWN[]_wanted_major_version" \ - -o \( "$DOWN[]_config_major_version" -eq \ - "$DOWN[]_wanted_major_version" \ - -a "$DOWN[]_config_minor_version" -lt \ - "$DOWN[]_wanted_minor_version" \) \ - -o \( "$DOWN[]_config_major_version" -eq \ - "$DOWN[]_wanted_major_version" \ - -a "$DOWN[]_config_minor_version" -eq \ - "$DOWN[]_wanted_minor_version" \ - -a "$DOWN[]_config_micro_version" -lt \ - "$DOWN[]_wanted_micro_version" \) ; then - # older version found - no_[]DOWN=yes - echo -n "*** An old version of $1 " - echo -n "($DOWN[]_config_major_version" - echo -n ".$DOWN[]_config_minor_version" - echo ".$DOWN[]_config_micro_version) was found." - echo -n "*** You need a version of $1 newer than " - echo -n "$DOWN[]_wanted_major_version" - echo -n ".$DOWN[]_wanted_minor_version" - echo ".$DOWN[]_wanted_micro_version." - echo "***" - echo "*** If you have already installed a sufficiently new version, this error" - echo "*** probably means that the wrong copy of the DOWN-config shell script is" - echo "*** being found. The easiest way to fix this is to remove the old version" - echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the" - echo "*** correct copy of DOWN-config. (In this case, you will have to" - echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf" - echo "*** so that the correct libraries are found at run-time)" - fi - ]) - fi - if test "x$no_[]DOWN" = x ; then - AC_MSG_RESULT(yes) - ifelse([$3], , :, [$3]) - else - AC_MSG_RESULT(no) - if test "$UP[]_CONFIG" = "no" ; then - echo "*** The DOWN-config script installed by $1 could not be found" - echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the UP[]_CONFIG environment variable to the" - echo "*** full path to DOWN-config." - fi - UP[]_CFLAGS="" - UP[]_LIBS="" - ifelse([$4], , :, [$4]) - fi - AC_SUBST(UP[]_CFLAGS) - AC_SUBST(UP[]_LIBS) - - popdef([UP]) - popdef([DOWN]) -]) diff --git a/legacy/evas_generic_loaders/m4/efl.m4 b/legacy/evas_generic_loaders/m4/efl.m4 deleted file mode 100644 index 3598ce78fe..0000000000 --- a/legacy/evas_generic_loaders/m4/efl.m4 +++ /dev/null @@ -1,449 +0,0 @@ -dnl file to manage modules in efl - -dnl EFL_VERSION(major, minor, micro, release) -dnl This setup EFL version information and should be called BEFORE AC_INIT(). -dnl -dnl release parameter is 'dev' to use from SVN or libtool -release field. -dnl It may be empty if not dev (svn/live build) and no -release is to be used. -dnl -dnl Examples: -dnl EFL_VERSION(1, 7, 99, dev) -dnl EFL_VERSION(1, 7, 99, ver-1234) -dnl This will define couple of m4 symbols: -dnl v_maj = given major number (first parameter) -dnl v_min = given minor number (second parameter) -dnl v_mic = given micro number (third parameter) -dnl v_rev = if release, it's 0, otherwise it's dev_version. -dnl v_rel = if release, it's -release followed by fourth parameter, -dnl otherwise it's empty. (mostly for libtool) -dnl efl_version = if release, it's major.minor.micro, otherwise it's -dnl major.minor.micro.dev_version -dnl dev_version = development version (svn revision). -dnl def_build_profile = dev or release based on 'dev' release parameter. -AC_DEFUN([EFL_VERSION], -[dnl -m4_define([v_maj], [$1])dnl -m4_define([v_min], [$2])dnl -m4_define([v_mic], [$3])dnl -m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl -m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl -m4_define([v_rel], [])dnl -m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl -m4_define([efl_version], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl -dnl m4_define([efl_version], [v_maj.v_min.v_mic])dnl -]) - -dnl EFL_COLOR -dnl will check if terminal supports color and if color is wanted by user. -dnl -dnl Used Variables: -dnl WANT_COLOR: if no, forces no color output. -dnl TERM: used to check if color should be enabled. -dnl -dnl Defined Variables: -dnl COLOR_YES: to be used in positive/yes conditions -dnl COLOR_NO: to be used in negative/no conditions -dnl COLOR_OTHER: to be used to highlight some other condition -dnl COLOR_RESET: to reset color -dnl want_color: yes or no -AC_DEFUN([EFL_COLOR], -[dnl -case "$TERM" in - xterm|xterm-color|xterm-256color|Eterm|aterm|kterm|rxvt*|screen|gnome|interix) - want_color="${WANT_COLOR:-yes}" - ;; - *) - want_color="no" - ;; -esac - -### echo compatibility - -## the BSD echo does not have the -e option (it is the default behaviour) -echo_e= -if test "`echo -e x`" = "x"; then - echo_e=-e -fi -AC_SUBST([ECHO_E], [${echo_e}]) - -if test "${want_color}" = "yes"; then - COLOR_YES=`echo $echo_e "\033@<:@1;32m"` - COLOR_NO=`echo $echo_e "\033@<:@1;31m"` - COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"` - COLOR_RESET=`echo $echo_e "\033@<:@0m"` -else - COLOR_YES="" - COLOR_NO="" - COLOR_OTHER="" - COLOR_RESET="" -fi -]) - -dnl EFL_INIT() -dnl Will AC_DEFINE() the following: -dnl VMAJ = v_maj -dnl VMIN = v_min -dnl VMIC = v_mic -dnl VREV = v_rev -dnl Will AC_SUBST() the following: -dnl VMAJ = v_maj -dnl VMIN = v_min -dnl VMIC = v_mic -dnl EFL_LTLIBRARY_FLAGS="-no-undefined -version-info ..." -dnl EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" -dnl Will define the following m4: -dnl lt_cur = libtool 'current' field of libtool's -version-info -dnl lt_rev = libtool 'revision' field of libtool's -version-info -dnl lt_age = libtool 'age' field of libtool's -version-info -AC_DEFUN([EFL_INIT], -[dnl -AC_REQUIRE([EFL_COLOR])dnl -AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl -AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl -AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl -AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl -VMAJ=v_maj -VMIN=v_min -VMIC=v_mic -AC_SUBST([VMAJ])dnl -AC_SUBST([VMIN])dnl -AC_SUBST([VMIC])dnl -dnl -dnl TODO: warning - lt_cur: -dnl the previous code assumed v_maj + v_min, but this will be a problem when -dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped -dnl we multiply it by 100. -m4_define([lt_cur], m4_if(m4_cmp(v_maj, 1), 0, m4_eval(v_maj + v_min), m4_eval(v_maj * 100 + v_min)))dnl -m4_define([lt_rev], v_mic)dnl -m4_define([lt_age], v_min)dnl -dnl -EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel" -AC_SUBST(EFL_LTLIBRARY_FLAGS)dnl -EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" -AC_SUBST([EFL_LTMODULE_FLAGS])dnl -AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel]) -]) - -dnl EFL_EVAL_PKGS(EFL) -dnl does PKG_CHECK_MODULES() for given EFL -AC_DEFUN([EFL_EVAL_PKGS], -[dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -if test "x${requirements_pc_deps_[]m4_defn([DOWNEFL])}" != "x"; then - PKG_CHECK_MODULES([$1], [${requirements_pc_deps_[]m4_defn([DOWNEFL])}]) -fi -m4_popdef([DOWNEFL])dnl -]) - -dnl EFL_INTERNAL_DEPEND_PKG(EFL, OTHEREFL) -dnl Adds a pkg-config dependency on another EFL. -AC_DEFUN([EFL_INTERNAL_DEPEND_PKG], -[dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl -dnl TODO: we need to fix the package config names for 2.0 -dnl TODO: and make them uniform in scheme. -depname="$2" -libdirname="m4_defn([DOWNOTHER])" -libname="m4_defn([DOWNOTHER])" -case "m4_defn([DOWNOTHER])" in - ethumb_client) - depname="ethumb_client" - ;; -esac -requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" -requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" -requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}" -requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_public_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}" -m4_popdef([DOWNOTHER])dnl -m4_popdef([DOWNEFL])dnl -]) - -dnl EFL_PLATFORM_DEPEND(EFL, PLATFORM) -dnl PLATFORM is one of: all, evil, escape, exotic -AC_DEFUN([EFL_PLATFORM_DEPEND], -[dnl -m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl -case "m4_defn([DOWNOTHER])" in - all) - if test "x${efl_lib_optional_evil}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [evil]) - elif test "x${efl_lib_optional_escape}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [escape]) - elif test "x${efl_lib_optional_exotic}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [exotic]) - fi - ;; - *) - if test "x${efl_lib_optional_[]m4_defn([DOWNOTHER])}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [$2]) - fi - ;; -esac -m4_popdef([DOWNOTHER])dnl -]) - -dnl EFL_CRYPTO_DEPEND(EFL) -dnl the given EFL will use/depend on system crypto settings -AC_DEFUN([EFL_CRYPTO_DEPEND], -[dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_crypto} ${requirements_pc_[][]m4_defn([DOWNEFL])}" -requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_crypto} ${requirements_pc_deps_[][]m4_defn([DOWNEFL])}" -requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_crypto} ${requirements_libs_[][]m4_defn([DOWNEFL])}" -requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_crypto} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" -m4_popdef([DOWNEFL])dnl -]) - -dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME, -dnl and inserts dependencies in proper variables -AC_DEFUN([EFL_DEPEND_PKG], -[dnl -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl - - have_[]m4_defn([DOWNNAME])="no" - - EFL_PKG_CHECK_STRICT([$3], [ - AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.]) - requirements_pc_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_[][]m4_defn([DOWNEFL])}" - requirements_pc_deps_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_deps_[]m4_defn([DOWNEFL])}" - have_[]m4_defn([DOWNNAME])="yes" - - $4 - - ], [$5]) - -m4_popdef([DOWNNAME]) -m4_popdef([UPNAME]) -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - -dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG], -[dnl -m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl - - have_[]m4_defn([DOWN])="no" - if test "x$2" = "xyes"; then - EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6]) - fi -m4_popdef([DOWN])dnl -]) - -dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) -AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG], -[dnl - if test "x$2" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [$3]) - fi -]) - -dnl EFL_ADD_LIBS(PKG, LIBS) -dnl Add libraries that the EFL library will depend on -dnl See EFL_DEPEND_PKG() for pkg-config version. -AC_DEFUN([EFL_ADD_LIBS], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2" -m4_popdef([DOWN])dnl -]) - -dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS) -dnl Add libraries that the EFL library will depend on when used. -dnl -dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG, -dnl this one is used when linking PKG to other libraries or applications. -dnl -dnl For instance if you use some other library in your header that user -dnl inclues. -AC_DEFUN([EFL_ADD_PUBLIC_LIBS], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2" -m4_popdef([DOWN])dnl -]) - -dnl EFL_ADD_CFLAGS(PKG, CFLAGS) -dnl Add CFLAGS that the EFL library will use -dnl See EFL_DEPEND_PKG() for pkg-config version. -AC_DEFUN([EFL_ADD_CFLAGS], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_cflags_[]m4_defn([DOWN])="${requirements_cflags_[]m4_defn([DOWN])} $2" -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_START(PKG) -dnl start the setup of an EFL library, defines variables and prints a notice -dnl -dnl Exports (AC_SUBST) -dnl PKG_CFLAGS: what to use for CFLAGS -dnl -dnl PKG_LDFLAGS: what to use for LDFLAGS -dnl -dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes -dnl everything else. -dnl -dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this -dnl package depend. Used in automake's _DEPENDENCIES. -dnl -dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using -dnl this PKG (PKG_LIBS + libpkg.la) -dnl -dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la -dnl -dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg, -dnl includes internal EFL (used in 'Requires.private' in pkg.pc) -dnl -dnl requirements_libs_pkg: external libraries this package needs when -dnl linking (used in 'Libs.private' in pkg.pc) -dnl -dnl requirements_public_libs_pkg: external libraries other packages need -dnl when using this (used in 'Libs' in pkg.pc) -dnl -dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS). -dnl -dnl Variables: -dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this -dnl pkg (used in EFL_EVAL_PKGS()) -dnl -dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la -dnl that this package depend. -dnl -dnl requirements_internal_deps_libs_pkg: external libraries that are public -dnl dependencies (due internal libs). -dnl -AC_DEFUN([EFL_LIB_START], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -requirements_internal_libs_[]m4_defn([DOWN])="" -requirements_internal_deps_libs_[]m4_defn([DOWN])="" -requirements_libs_[]m4_defn([DOWN])="" -requirements_public_libs_[]m4_defn([DOWN])="" -requirements_cflags_[]m4_defn([DOWN])="" -requirements_pc_[]m4_defn([DOWN])="" -requirements_pc_deps_[]m4_defn([DOWN])="" - -m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" -m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS}" -USE_[]m4_defn([UP])_LIBS="${USE_[]m4_defn([UP])_LIBS}" -USE_[]m4_defn([UP])_INTERNAL_LIBS="${USE_[]m4_defn([UP])_INTERNAL_LIBS}" -m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}" -m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" - -AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl -AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl -AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl -AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl -AC_SUBST(m4_defn([UP])[_LIBS])dnl -AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl -AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl -AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl -AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl -AC_SUBST(m4_defn([UP])[_CFLAGS])dnl -AC_MSG_NOTICE([Start $1 checks])dnl -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_END(PKG) -dnl finishes the setup of an EFL library -AC_DEFUN([EFL_LIB_END], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -libdirname="m4_defn([DOWN])" -libname="m4_defn([DOWN])" - -m4_defn([UP])_LDFLAGS="${EFLALL_COV_LDFLAGS} ${EFLALL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" -m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFLALL_COV_LIBS} ${EFLALL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_eflall} " -m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" -USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" -USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la" -m4_defn([UP])_CFLAGS="${EFLALL_COV_CFLAGS} ${EFLALL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} -I\$(top_srcdir)/src/bindings/${libdirname} -I\$(top_builddir)/src/bindings/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_eflall} -DEFL_[]m4_defn([UP])_BUILD=1" -requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_eflall}" -requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_eflall}" - -AC_MSG_NOTICE([Finished $1 checks])dnl -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_START_OPTIONAL(PKG, TEST) -dnl test if library should be build and then EFL_LIB_START() -dnl must call EFL_LIB_END_OPTIONAL() to close it. -AC_DEFUN([EFL_LIB_START_OPTIONAL], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -if $2; then - efl_lib_optional_[]m4_defn([DOWN])="yes" -else - efl_lib_optional_[]m4_defn([DOWN])="no" - AC_MSG_NOTICE([Skipping $1 checks (disabled)]) -fi - -if test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"; then - EFL_LIB_START([$1]) - AC_DEFINE([HAVE_]m4_defn([UP]), [1], [optional EFL $1 is enabled]) -dnl closed at EFL_LIB_END_OPTIONAL() -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_END_OPTIONAL(PKG) -dnl closes block started by EFL_LIB_START_OPTIONAL() and then -dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG]) -AC_DEFUN([EFL_LIB_END_OPTIONAL], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -dnl close if started at EFL_LIB_START_OPTIONAL() - EFL_LIB_END([$1]) -fi - -AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_ADD_FEATURE(PKG, NAME, [VALUE]) -dnl if VALUE is not specified, will use ${have_name} instead. -dnl -dnl Defined Variables: -dnl features_pkg -AC_DEFUN([EFL_ADD_FEATURE], -[dnl -m4_pushdef([DOWNPKG], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl - -value="m4_if($3, , [${have_]m4_defn([DOWNNAME])[:-${want_]m4_defn([DOWNNAME])[}}], [$3])" -case "${value}" in - yes) - tmp="${COLOR_YES}+$2${COLOR_RESET}" - ;; - no) - tmp="${COLOR_NO}-$2${COLOR_RESET}" - ;; - *) - tmp="${COLOR_OTHER}$2=${value}${COLOR_RESET}" - ;; -esac -if test -z "${features_[]m4_defn([DOWNPKG])}"; then - features_[]m4_defn([DOWNPKG])="${tmp}" -else - features_[]m4_defn([DOWNPKG])="${features_[]m4_defn([DOWNPKG])} ${tmp}" -fi -m4_popdef([DOWNNAME])dnl -m4_popdef([DOWNPKG])dnl -]) diff --git a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in b/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in deleted file mode 100644 index 7aaebf4962..0000000000 --- a/legacy/evas_generic_loaders/pkgbuild/PKGBUILD.in +++ /dev/null @@ -1,36 +0,0 @@ -# Maintainer: Enlightenment Developers -pkgname=evas_generic_loaders -pkgver=@VERSION@ -pkgrel=1 -pkgdesc="Evas external binary executable loaders - GIT development snapshot" -arch=('i686' 'x86_64' 'arm') -url="http://www.enlightenment.org" -license=('GPL2') -depends=('efl' 'poppler' 'libraw' 'libspectre' 'librsvg' 'gstreamer0.10-base-plugins' - 'gstreamer0.10-good-plugins' 'gstreamer0.10-bad-plugins' - 'gstreamer0.10-ugly-plugins' 'gstreamer0.10-ffmpeg') -options=('!libtool' 'debug') -build() { - cd "../.." - export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer" - make clean distclean - ./configure --prefix=/usr - make -} - -#check() { -# cd "../.." -# make -k check -#} - -package() { - cd "../.." - make -j1 DESTDIR="$pkgdir/" install - install -Dm644 README "$pkgdir/usr/share/$pkgname/README" - install -Dm644 NEWS "$pkgdir/usr/share/$pkgname/NEWS" - install -Dm644 ChangeLog "$pkgdir/usr/share/$pkgname/ChangeLog" - install -Dm644 AUTHORS "$pkgdir/usr/share/$pkgname/AUTHORS" - install -d "$pkgdir/usr/share/licenses/$pkgname" - sed -n '1,/PARTICULAR PURPOSE/p' COPYING > "$pkgdir/usr/share/licenses/$pkgname/COPYING" - ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/$pkgname/COPYING" -} diff --git a/legacy/evas_generic_loaders/src/Makefile.am b/legacy/evas_generic_loaders/src/Makefile.am deleted file mode 100644 index 1c5d6ee106..0000000000 --- a/legacy/evas_generic_loaders/src/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -SUBDIRS = bin From 674cb5c16503ca5f6a4f66628b0c98eafff96ed2 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 1 Jun 2016 17:00:18 -0700 Subject: [PATCH 347/347] emotion: remove legacy files from emotion_generic_players. --- legacy/emotion_generic_players/.gitignore | 28 -- legacy/emotion_generic_players/COPYING | 25 - legacy/emotion_generic_players/ChangeLog | 12 - legacy/emotion_generic_players/Makefile.am | 57 --- legacy/emotion_generic_players/NEWS | 70 --- legacy/emotion_generic_players/README | 65 --- legacy/emotion_generic_players/autogen.sh | 10 - legacy/emotion_generic_players/configure.ac | 126 ----- legacy/emotion_generic_players/m4/efl.m4 | 449 ------------------ .../m4/efl_compiler.m4 | 98 ---- .../pkgbuild/PKGBUILD.in | 35 -- 11 files changed, 975 deletions(-) delete mode 100644 legacy/emotion_generic_players/.gitignore delete mode 100644 legacy/emotion_generic_players/COPYING delete mode 100644 legacy/emotion_generic_players/ChangeLog delete mode 100644 legacy/emotion_generic_players/Makefile.am delete mode 100644 legacy/emotion_generic_players/NEWS delete mode 100644 legacy/emotion_generic_players/README delete mode 100755 legacy/emotion_generic_players/autogen.sh delete mode 100644 legacy/emotion_generic_players/configure.ac delete mode 100644 legacy/emotion_generic_players/m4/efl.m4 delete mode 100644 legacy/emotion_generic_players/m4/efl_compiler.m4 delete mode 100644 legacy/emotion_generic_players/pkgbuild/PKGBUILD.in diff --git a/legacy/emotion_generic_players/.gitignore b/legacy/emotion_generic_players/.gitignore deleted file mode 100644 index bd0957f9cc..0000000000 --- a/legacy/emotion_generic_players/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -*~ -INSTALL -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ -compile -config.cache -config.guess -config.h -config.h.in -config.h.in~ -config.log -config.status -config.sub -configure -depcomp -install-sh -missing -src/vlc/.deps/ -src/vlc/.dirstamp -src/vlc/src_vlc_vlc-emotion_generic_vlc.o -src/vlc/vlc -stamp-h1 -pkgbuild/PKGBUILD -pkgbuild/pkg -pkgbuild/src -pkgbuild/*.tar.xz diff --git a/legacy/emotion_generic_players/COPYING b/legacy/emotion_generic_players/COPYING deleted file mode 100644 index 94cdd8072a..0000000000 --- a/legacy/emotion_generic_players/COPYING +++ /dev/null @@ -1,25 +0,0 @@ -Copyright notice for Emotion: - -Copyright (C) 2004-2014 Carsten Haitzler and various contributors (see AUTHORS) - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED "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. diff --git a/legacy/emotion_generic_players/ChangeLog b/legacy/emotion_generic_players/ChangeLog deleted file mode 100644 index b1c5ebd34e..0000000000 --- a/legacy/emotion_generic_players/ChangeLog +++ /dev/null @@ -1,12 +0,0 @@ -2012-01-10 Gustavo Sverzut Barbieri (k-s) - - * Created the project based on previous - emotion/src/generic_players, as it was removed when Emotion was - merged into EFL single-tree. - - -OUT OF DATE NOTICE: -------------------- -With the start of the 1.9.x release cycle we now longer update the ChangeLog and rely on git log for -this functionality. We keep however a NEWS files for a high level overview of changes in a new -release which will be filled at the end of the release cycle. diff --git a/legacy/emotion_generic_players/Makefile.am b/legacy/emotion_generic_players/Makefile.am deleted file mode 100644 index ec4045b682..0000000000 --- a/legacy/emotion_generic_players/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -AUTOMAKE_OPTIONS = subdir-objects -ACLOCAL_AMFLAGS = -I m4 - -AM_MAKEFLAGS = --no-print-directory -AM_CFLAGS = \ -@EFL_CFLAGS@ \ -@EMOTION_CFLAGS@ - -AM_LDFLAGS = \ -@EFL_LDFLAGS@ - -EXTRA_DIST = \ -README \ -AUTHORS \ -COPYING \ -m4/efl_compiler.m4 \ -m4/emotion_generic_players.m4 - -MAINTAINERCLEANFILES = \ -aclocal.m4 \ -compile \ -config.guess \ -config.h.in \ -config.sub \ -configure \ -depcomp \ -install-sh \ -ltmain.sh \ -Makefile.in \ -missing \ -mkinstalldirs \ -m4/libtool.m4 \ -m4/lt~obsolete.m4 \ -m4/ltoptions.m4 \ -m4/ltsugar.m4 \ -m4/ltversion.m4 - - -# this won't pass distcheck :( -#emotiongenericplayersdir = $(EMOTION_GENERIC_PLAYERS_DIR) - -emotiongenericplayersdir = \ -$(libdir)/emotion/generic_players/$(MODULE_ARCH) - -emotiongenericplayers_PROGRAMS = - -if HAVE_VLC -emotiongenericplayers_PROGRAMS += src/vlc/vlc -src_vlc_vlc_SOURCES = src/vlc/emotion_generic_vlc.c -src_vlc_vlc_CPPFLAGS = @VLC_CFLAGS@ -src_vlc_vlc_LDADD = @VLC_LIBS@ -endif - -.PHONY: doc - -doc: - @echo "Empty doc target until we have real documentation." diff --git a/legacy/emotion_generic_players/NEWS b/legacy/emotion_generic_players/NEWS deleted file mode 100644 index 46eaa3e68b..0000000000 --- a/legacy/emotion_generic_players/NEWS +++ /dev/null @@ -1,70 +0,0 @@ -============================== -Emotion Generic Players 1.17.0 -============================== - -Changes since 1.16.0: ---------------------- - -No significant changes in this release. - -Changes since 1.15.0: ---------------------- - -No significant changes in this release. - -Changes since 1.14.0: ---------------------- - -No significant changes in this release. - -Changes since 1.13.0: ---------------------- - -No significant changes in this release. - -Changes since 1.12.0: ---------------------- - -No significant changes in this release. - -Changes since 1.11.0: ---------------------- - -No significant changes in this release. - -Changes since Emotion Generic Players 1.10.0: ---------------------------------------------- - -Fixes: - * emotion generic players - work around vlc bug that segvs (T1530) - -Changes since Emotion Generic Players 1.9.0: --------------------------------------------- - -No changes since version 1.9.0 - -Changes since Emotion Generic Players 1.8.0: --------------------------------------------- - -Improvements: - - * Emotion VLC player: debug++ - * Emotion VLC: cleanup: only changed function order in file. - * Simplify player version dir fallback to match efl 1.9 simplification changes - * Emotion_generic_players - commented out unused func. - * Emotion VLC: no more need to send the size twice. - * Emotion VLC: use Eina_Bool instead of int for bools. - * Emotion VLC: defer the resource free until the video is actually stopped. - -Fixes: - - * Emotion VLC backend: fix pause/stop to work again. - The EM_CMD_STOP command do not have any parameter so it must be - handled in the first call of the pipe. - * Check for libvlc >= 2.0 as a minimum as we use 2.x funcs - * Emotion VLC: remove quite all the old hacks from loading stage which fixes the problem that - audio was audible on start - * Emotion VLC: fix the random-player-stop bug !! - * Emotion VLC: fix send position_change while paused. - * Emotion VLC: recreate the player when end reached. - * Emotion VLC: fix the volume/mute bug. diff --git a/legacy/emotion_generic_players/README b/legacy/emotion_generic_players/README deleted file mode 100644 index 1681ae2b1d..0000000000 --- a/legacy/emotion_generic_players/README +++ /dev/null @@ -1,65 +0,0 @@ -Emotion Generic Players 1.11.0 -============================== - -****************************************************************************** - FOR ANY ISSUES PLEASE EMAIL: - enlightenment-devel@lists.sourceforge.net -****************************************************************************** - -These are binary players for Emotion using the "generic" module. - -Emotion supports multiple modules provided as shared-objects under -PREFIX/lib/emotion/modules, making it extensible. However these -live in the same process as the application, thus problems handling -the media may crash or halt the application. Unfortunately media -handling is very error prone due multiple sources, sinks, decoders et -al, each with their own level of stability. - -To solve this, Emotion ships with a "generic" module that is a -layer to talk to another process, the "player", using pipes and shared -memory (shm). If this external process dies, the main application -remains working (without any media, of course). Thus it is safer and -has some nice side effects such as avoiding bringing in many libraries to -decode media, saving memory in the application process, etc. - -A secondary benefit is that the generic player is a separate process -and does not link with the user application code or EFL, avoiding -license conflicts. Many decoding libraries or elements exist with -conflicting licenses with GPL, LGPL or even proprietary code. - - -REQUIREMENTS ------------- - - * vlc (libvlc >= 2.0) - - -COMPONENTS ----------- - -**VLC Generic Player:** - -//GPL v2 license// - -This is a binary that uses the VLC library (libvlc) to play videos -inot shared memory. - -COMPILING AND INSTALLING ------------------------- - - ./configure - make - sudo make install - - -COMPILER FLAGS --------------- - -You may want to change the install prefix for EFL with: - - --prefix=/path/to/prefix - -**NOTE:** - -You should put generic players in the same prefix as EFL or they will -not be found by EFL at runtime. diff --git a/legacy/emotion_generic_players/autogen.sh b/legacy/emotion_generic_players/autogen.sh deleted file mode 100755 index d265ba52df..0000000000 --- a/legacy/emotion_generic_players/autogen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -rm -rf autom4te.cache -rm -f aclocal.m4 ltmain.sh config.cache - -autoreconf -vif - -if [ -z "$NOCONFIGURE" ]; then - exec ./configure -C "$@" -fi diff --git a/legacy/emotion_generic_players/configure.ac b/legacy/emotion_generic_players/configure.ac deleted file mode 100644 index 5963ddffe5..0000000000 --- a/legacy/emotion_generic_players/configure.ac +++ /dev/null @@ -1,126 +0,0 @@ -EFL_VERSION([1], [17], [99], [dev]) -AC_INIT([emotion_generic_players], [efl_version], [enlightenment-devel@lists.sourceforge.net]) -AC_PREREQ([2.59]) -AC_CONFIG_SRCDIR([configure.ac]) -AC_CONFIG_MACRO_DIR([m4]) - -AC_CONFIG_HEADERS([config.h]) - -AC_USE_SYSTEM_EXTENSIONS -AC_CANONICAL_HOST - -AM_INIT_AUTOMAKE([1.6 dist-xz]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -AC_LANG([C]) -AC_PROG_CC_C99 -AM_PROG_CC_C_O - -PKG_PROG_PKG_CONFIG -if test "x${PKG_CONFIG}" = "x" ; then - AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...]) -fi - -#### Additional options to configure - -AC_ARG_WITH([profile], - [AC_HELP_STRING([--with-profile=PROFILE], - [use the predefined build profile, one of: dev, debug and release. - @<:@default=dev@:>@])], - [build_profile=${withval}], - [build_profile=dev]) - -case "${build_profile}" in - dev|debug|release) - ;; - *) - AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}]) - ;; -esac - -with_max_log_level="" -case "${build_profile}" in - release) - with_max_log_level="3" - ;; -esac - -if test -n "${with_max_log_level}"; then - AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}]) - AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.]) -fi - - -#### Checks for compiler characteristics - -EFL_CHECK_COMPILER_FLAGS([EFL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections]) -EFL_CHECK_LINKER_FLAGS([EFL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed]) -case "${build_profile}" in - dev) - EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow]) - ;; -esac - - -#### Main dependency: emotion - -PKG_CHECK_MODULES([EMOTION], [emotion >= v_maj.v_min]) - -MODULE_ARCH=`pkg-config --variable=module_arch emotion` -if test -z "${MODULE_ARCH}"; then - EMOTION_VERSION=`pkg-config --modversion emotion | cut -d. -f1-2` - case "$host_os" in - mingw32ce*) - MODULE_ARCH="v" - ;; - *) - MODULE_ARCH="v-${EMOTION_VERSION}" - ;; - esac -fi - -EMOTION_GENERIC_PLAYERS_DIR=`pkg-config --variable=generic_players emotion` -if test -z "${EMOTION_GENERIC_PLAYERS_DIR}"; then - EMOTION_GENERIC_PLAYERS_DIR="`pkg-config --variable=libdir emotion`/emotion/generic_players" -fi -EMOTION_GENERIC_PLAYERS_DIR="${EMOTION_GENERIC_PLAYERS_DIR}/${MODULE_ARCH}" - -AC_MSG_CHECKING([where to install generic players]) -AC_MSG_RESULT([${EMOTION_GENERIC_PLAYERS_DIR}]) -AC_SUBST(EMOTION_GENERIC_PLAYERS_DIR) -AC_SUBST(MODULE_ARCH) - -#### Players -EMOTION_GENERIC_PLAYER([VLC], [yes], [libvlc >= 2.0 eina >= 1.1.99 ecore >= 1.7.99]) - - -AC_CONFIG_FILES([ -Makefile -pkgbuild/PKGBUILD -]) - -AC_OUTPUT - -echo -echo -echo -echo "------------------------------------------------------------------------" -echo "$PACKAGE_NAME $PACKAGE_VERSION" -echo "------------------------------------------------------------------------" -echo -echo "Configuration Options Summary:" -echo " Build Profile..........: ${build_profile}" -echo -echo "Players:" -echo " VLC....................: ${with_vlc}" -echo -echo "Compilation..............: make (or gmake)" -echo " CPPFLAGS...............: $CPPFLAGS" -echo " CFLAGS.................: $CFLAGS" -echo " CXXFLAGS...............: $CXXFLAGS" -echo " LDFLAGS................: $LDFLAGS" -echo -echo "Installation.............: make install (as root if needed, with 'su' or 'sudo')" -echo " prefix.................: $prefix" -echo " emotion generic players: ${EMOTION_GENERIC_PLAYERS_DIR}" -echo diff --git a/legacy/emotion_generic_players/m4/efl.m4 b/legacy/emotion_generic_players/m4/efl.m4 deleted file mode 100644 index 3598ce78fe..0000000000 --- a/legacy/emotion_generic_players/m4/efl.m4 +++ /dev/null @@ -1,449 +0,0 @@ -dnl file to manage modules in efl - -dnl EFL_VERSION(major, minor, micro, release) -dnl This setup EFL version information and should be called BEFORE AC_INIT(). -dnl -dnl release parameter is 'dev' to use from SVN or libtool -release field. -dnl It may be empty if not dev (svn/live build) and no -release is to be used. -dnl -dnl Examples: -dnl EFL_VERSION(1, 7, 99, dev) -dnl EFL_VERSION(1, 7, 99, ver-1234) -dnl This will define couple of m4 symbols: -dnl v_maj = given major number (first parameter) -dnl v_min = given minor number (second parameter) -dnl v_mic = given micro number (third parameter) -dnl v_rev = if release, it's 0, otherwise it's dev_version. -dnl v_rel = if release, it's -release followed by fourth parameter, -dnl otherwise it's empty. (mostly for libtool) -dnl efl_version = if release, it's major.minor.micro, otherwise it's -dnl major.minor.micro.dev_version -dnl dev_version = development version (svn revision). -dnl def_build_profile = dev or release based on 'dev' release parameter. -AC_DEFUN([EFL_VERSION], -[dnl -m4_define([v_maj], [$1])dnl -m4_define([v_min], [$2])dnl -m4_define([v_mic], [$3])dnl -m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl -m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl -m4_define([v_rel], [])dnl -m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl -m4_define([efl_version], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl -dnl m4_define([efl_version], [v_maj.v_min.v_mic])dnl -]) - -dnl EFL_COLOR -dnl will check if terminal supports color and if color is wanted by user. -dnl -dnl Used Variables: -dnl WANT_COLOR: if no, forces no color output. -dnl TERM: used to check if color should be enabled. -dnl -dnl Defined Variables: -dnl COLOR_YES: to be used in positive/yes conditions -dnl COLOR_NO: to be used in negative/no conditions -dnl COLOR_OTHER: to be used to highlight some other condition -dnl COLOR_RESET: to reset color -dnl want_color: yes or no -AC_DEFUN([EFL_COLOR], -[dnl -case "$TERM" in - xterm|xterm-color|xterm-256color|Eterm|aterm|kterm|rxvt*|screen|gnome|interix) - want_color="${WANT_COLOR:-yes}" - ;; - *) - want_color="no" - ;; -esac - -### echo compatibility - -## the BSD echo does not have the -e option (it is the default behaviour) -echo_e= -if test "`echo -e x`" = "x"; then - echo_e=-e -fi -AC_SUBST([ECHO_E], [${echo_e}]) - -if test "${want_color}" = "yes"; then - COLOR_YES=`echo $echo_e "\033@<:@1;32m"` - COLOR_NO=`echo $echo_e "\033@<:@1;31m"` - COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"` - COLOR_RESET=`echo $echo_e "\033@<:@0m"` -else - COLOR_YES="" - COLOR_NO="" - COLOR_OTHER="" - COLOR_RESET="" -fi -]) - -dnl EFL_INIT() -dnl Will AC_DEFINE() the following: -dnl VMAJ = v_maj -dnl VMIN = v_min -dnl VMIC = v_mic -dnl VREV = v_rev -dnl Will AC_SUBST() the following: -dnl VMAJ = v_maj -dnl VMIN = v_min -dnl VMIC = v_mic -dnl EFL_LTLIBRARY_FLAGS="-no-undefined -version-info ..." -dnl EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" -dnl Will define the following m4: -dnl lt_cur = libtool 'current' field of libtool's -version-info -dnl lt_rev = libtool 'revision' field of libtool's -version-info -dnl lt_age = libtool 'age' field of libtool's -version-info -AC_DEFUN([EFL_INIT], -[dnl -AC_REQUIRE([EFL_COLOR])dnl -AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl -AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl -AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl -AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl -VMAJ=v_maj -VMIN=v_min -VMIC=v_mic -AC_SUBST([VMAJ])dnl -AC_SUBST([VMIN])dnl -AC_SUBST([VMIC])dnl -dnl -dnl TODO: warning - lt_cur: -dnl the previous code assumed v_maj + v_min, but this will be a problem when -dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped -dnl we multiply it by 100. -m4_define([lt_cur], m4_if(m4_cmp(v_maj, 1), 0, m4_eval(v_maj + v_min), m4_eval(v_maj * 100 + v_min)))dnl -m4_define([lt_rev], v_mic)dnl -m4_define([lt_age], v_min)dnl -dnl -EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel" -AC_SUBST(EFL_LTLIBRARY_FLAGS)dnl -EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" -AC_SUBST([EFL_LTMODULE_FLAGS])dnl -AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel]) -]) - -dnl EFL_EVAL_PKGS(EFL) -dnl does PKG_CHECK_MODULES() for given EFL -AC_DEFUN([EFL_EVAL_PKGS], -[dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -if test "x${requirements_pc_deps_[]m4_defn([DOWNEFL])}" != "x"; then - PKG_CHECK_MODULES([$1], [${requirements_pc_deps_[]m4_defn([DOWNEFL])}]) -fi -m4_popdef([DOWNEFL])dnl -]) - -dnl EFL_INTERNAL_DEPEND_PKG(EFL, OTHEREFL) -dnl Adds a pkg-config dependency on another EFL. -AC_DEFUN([EFL_INTERNAL_DEPEND_PKG], -[dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl -dnl TODO: we need to fix the package config names for 2.0 -dnl TODO: and make them uniform in scheme. -depname="$2" -libdirname="m4_defn([DOWNOTHER])" -libname="m4_defn([DOWNOTHER])" -case "m4_defn([DOWNOTHER])" in - ethumb_client) - depname="ethumb_client" - ;; -esac -requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" -requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" -requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}" -requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_public_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}" -m4_popdef([DOWNOTHER])dnl -m4_popdef([DOWNEFL])dnl -]) - -dnl EFL_PLATFORM_DEPEND(EFL, PLATFORM) -dnl PLATFORM is one of: all, evil, escape, exotic -AC_DEFUN([EFL_PLATFORM_DEPEND], -[dnl -m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl -case "m4_defn([DOWNOTHER])" in - all) - if test "x${efl_lib_optional_evil}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [evil]) - elif test "x${efl_lib_optional_escape}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [escape]) - elif test "x${efl_lib_optional_exotic}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [exotic]) - fi - ;; - *) - if test "x${efl_lib_optional_[]m4_defn([DOWNOTHER])}" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [$2]) - fi - ;; -esac -m4_popdef([DOWNOTHER])dnl -]) - -dnl EFL_CRYPTO_DEPEND(EFL) -dnl the given EFL will use/depend on system crypto settings -AC_DEFUN([EFL_CRYPTO_DEPEND], -[dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_crypto} ${requirements_pc_[][]m4_defn([DOWNEFL])}" -requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_crypto} ${requirements_pc_deps_[][]m4_defn([DOWNEFL])}" -requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_crypto} ${requirements_libs_[][]m4_defn([DOWNEFL])}" -requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_crypto} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" -m4_popdef([DOWNEFL])dnl -]) - -dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME, -dnl and inserts dependencies in proper variables -AC_DEFUN([EFL_DEPEND_PKG], -[dnl -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl - - have_[]m4_defn([DOWNNAME])="no" - - EFL_PKG_CHECK_STRICT([$3], [ - AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.]) - requirements_pc_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_[][]m4_defn([DOWNEFL])}" - requirements_pc_deps_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_deps_[]m4_defn([DOWNEFL])}" - have_[]m4_defn([DOWNNAME])="yes" - - $4 - - ], [$5]) - -m4_popdef([DOWNNAME]) -m4_popdef([UPNAME]) -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - -dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG], -[dnl -m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl - - have_[]m4_defn([DOWN])="no" - if test "x$2" = "xyes"; then - EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6]) - fi -m4_popdef([DOWN])dnl -]) - -dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) -AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG], -[dnl - if test "x$2" = "xyes"; then - EFL_INTERNAL_DEPEND_PKG([$1], [$3]) - fi -]) - -dnl EFL_ADD_LIBS(PKG, LIBS) -dnl Add libraries that the EFL library will depend on -dnl See EFL_DEPEND_PKG() for pkg-config version. -AC_DEFUN([EFL_ADD_LIBS], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2" -m4_popdef([DOWN])dnl -]) - -dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS) -dnl Add libraries that the EFL library will depend on when used. -dnl -dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG, -dnl this one is used when linking PKG to other libraries or applications. -dnl -dnl For instance if you use some other library in your header that user -dnl inclues. -AC_DEFUN([EFL_ADD_PUBLIC_LIBS], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2" -m4_popdef([DOWN])dnl -]) - -dnl EFL_ADD_CFLAGS(PKG, CFLAGS) -dnl Add CFLAGS that the EFL library will use -dnl See EFL_DEPEND_PKG() for pkg-config version. -AC_DEFUN([EFL_ADD_CFLAGS], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -requirements_cflags_[]m4_defn([DOWN])="${requirements_cflags_[]m4_defn([DOWN])} $2" -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_START(PKG) -dnl start the setup of an EFL library, defines variables and prints a notice -dnl -dnl Exports (AC_SUBST) -dnl PKG_CFLAGS: what to use for CFLAGS -dnl -dnl PKG_LDFLAGS: what to use for LDFLAGS -dnl -dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes -dnl everything else. -dnl -dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this -dnl package depend. Used in automake's _DEPENDENCIES. -dnl -dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using -dnl this PKG (PKG_LIBS + libpkg.la) -dnl -dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la -dnl -dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg, -dnl includes internal EFL (used in 'Requires.private' in pkg.pc) -dnl -dnl requirements_libs_pkg: external libraries this package needs when -dnl linking (used in 'Libs.private' in pkg.pc) -dnl -dnl requirements_public_libs_pkg: external libraries other packages need -dnl when using this (used in 'Libs' in pkg.pc) -dnl -dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS). -dnl -dnl Variables: -dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this -dnl pkg (used in EFL_EVAL_PKGS()) -dnl -dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la -dnl that this package depend. -dnl -dnl requirements_internal_deps_libs_pkg: external libraries that are public -dnl dependencies (due internal libs). -dnl -AC_DEFUN([EFL_LIB_START], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -requirements_internal_libs_[]m4_defn([DOWN])="" -requirements_internal_deps_libs_[]m4_defn([DOWN])="" -requirements_libs_[]m4_defn([DOWN])="" -requirements_public_libs_[]m4_defn([DOWN])="" -requirements_cflags_[]m4_defn([DOWN])="" -requirements_pc_[]m4_defn([DOWN])="" -requirements_pc_deps_[]m4_defn([DOWN])="" - -m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" -m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS}" -USE_[]m4_defn([UP])_LIBS="${USE_[]m4_defn([UP])_LIBS}" -USE_[]m4_defn([UP])_INTERNAL_LIBS="${USE_[]m4_defn([UP])_INTERNAL_LIBS}" -m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}" -m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" - -AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl -AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl -AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl -AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl -AC_SUBST(m4_defn([UP])[_LIBS])dnl -AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl -AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl -AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl -AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl -AC_SUBST(m4_defn([UP])[_CFLAGS])dnl -AC_MSG_NOTICE([Start $1 checks])dnl -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_END(PKG) -dnl finishes the setup of an EFL library -AC_DEFUN([EFL_LIB_END], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -libdirname="m4_defn([DOWN])" -libname="m4_defn([DOWN])" - -m4_defn([UP])_LDFLAGS="${EFLALL_COV_LDFLAGS} ${EFLALL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" -m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFLALL_COV_LIBS} ${EFLALL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_eflall} " -m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" -USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" -USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la" -m4_defn([UP])_CFLAGS="${EFLALL_COV_CFLAGS} ${EFLALL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} -I\$(top_srcdir)/src/bindings/${libdirname} -I\$(top_builddir)/src/bindings/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_eflall} -DEFL_[]m4_defn([UP])_BUILD=1" -requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_eflall}" -requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_eflall}" - -AC_MSG_NOTICE([Finished $1 checks])dnl -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_START_OPTIONAL(PKG, TEST) -dnl test if library should be build and then EFL_LIB_START() -dnl must call EFL_LIB_END_OPTIONAL() to close it. -AC_DEFUN([EFL_LIB_START_OPTIONAL], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -if $2; then - efl_lib_optional_[]m4_defn([DOWN])="yes" -else - efl_lib_optional_[]m4_defn([DOWN])="no" - AC_MSG_NOTICE([Skipping $1 checks (disabled)]) -fi - -if test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"; then - EFL_LIB_START([$1]) - AC_DEFINE([HAVE_]m4_defn([UP]), [1], [optional EFL $1 is enabled]) -dnl closed at EFL_LIB_END_OPTIONAL() -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_LIB_END_OPTIONAL(PKG) -dnl closes block started by EFL_LIB_START_OPTIONAL() and then -dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG]) -AC_DEFUN([EFL_LIB_END_OPTIONAL], -[dnl -m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl - -dnl close if started at EFL_LIB_START_OPTIONAL() - EFL_LIB_END([$1]) -fi - -AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl -m4_popdef([UP])dnl -m4_popdef([DOWN])dnl -]) - -dnl EFL_ADD_FEATURE(PKG, NAME, [VALUE]) -dnl if VALUE is not specified, will use ${have_name} instead. -dnl -dnl Defined Variables: -dnl features_pkg -AC_DEFUN([EFL_ADD_FEATURE], -[dnl -m4_pushdef([DOWNPKG], m4_translit([$1], [-A-Z], [_a-z]))dnl -m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl - -value="m4_if($3, , [${have_]m4_defn([DOWNNAME])[:-${want_]m4_defn([DOWNNAME])[}}], [$3])" -case "${value}" in - yes) - tmp="${COLOR_YES}+$2${COLOR_RESET}" - ;; - no) - tmp="${COLOR_NO}-$2${COLOR_RESET}" - ;; - *) - tmp="${COLOR_OTHER}$2=${value}${COLOR_RESET}" - ;; -esac -if test -z "${features_[]m4_defn([DOWNPKG])}"; then - features_[]m4_defn([DOWNPKG])="${tmp}" -else - features_[]m4_defn([DOWNPKG])="${features_[]m4_defn([DOWNPKG])} ${tmp}" -fi -m4_popdef([DOWNNAME])dnl -m4_popdef([DOWNPKG])dnl -]) diff --git a/legacy/emotion_generic_players/m4/efl_compiler.m4 b/legacy/emotion_generic_players/m4/efl_compiler.m4 deleted file mode 100644 index 6b98390e5c..0000000000 --- a/legacy/emotion_generic_players/m4/efl_compiler.m4 +++ /dev/null @@ -1,98 +0,0 @@ -dnl Copyright (C) 2012 Vincent Torri -dnl This code is public domain and can be freely used or copied. - -dnl Macro that check if compiler of linker flags are available - - -dnl Macro that checks for a compiler flag availability -dnl -dnl EFL_CHECK_COMPILER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) -dnl AC_SUBST : EFL_CFLAGS (EFL being replaced by its value) - -AC_DEFUN([EFL_CHECK_COMPILER_FLAG], -[ -m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) -m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z])) - -dnl store in options -Wfoo if -Wno-foo is passed -option=m4_bpatsubst([[$2]], [-Wno-], [-W]) - -CFLAGS_save="${CFLAGS}" -CFLAGS="${CFLAGS} ${option}" - -AC_LANG_PUSH([C]) -AC_MSG_CHECKING([whether the compiler supports $2]) - -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]])], - [have_flag="yes"], - [have_flag="no"]) -AC_MSG_RESULT([${have_flag}]) - -CFLAGS="${CFLAGS_save}" -AC_LANG_POP([C]) - -if test "x${have_flag}" = "xyes" ; then - UPEFL[_CFLAGS]="${UPEFL[_CFLAGS]} [$2]" -fi -AC_ARG_VAR(UPEFL[_CFLAGS], [preprocessor flags for $2]) -AC_SUBST(UPEFL[_CFLAGS]) - -m4_popdef([UP]) -m4_popdef([UPEFL]) -]) - -dnl Macro that iterates over a sequence of white separated flags -dnl and that call EFL_CHECK_COMPILER_FLAG() for each of these flags -dnl -dnl EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS) - -AC_DEFUN([EFL_CHECK_COMPILER_FLAGS], -[ -m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))]) -]) - - -dnl Macro that checks for a linker flag availability -dnl -dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) -dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value) - -AC_DEFUN([EFL_CHECK_LINKER_FLAG], -[ -m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) -m4_pushdef([UP], m4_translit([[$2]], [,-a-z], [__A-Z])) - -LDFLAGS_save="${LDFLAGS}" -LDFLAGS="${LDFLAGS} $2" - -AC_LANG_PUSH([C]) -AC_MSG_CHECKING([whether the linker supports $2]) - -AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[]])], - [have_flag="yes"], - [have_flag="no"]) -AC_MSG_RESULT([${have_flag}]) - -LDFLAGS="${LDFLAGS_save}" -AC_LANG_POP([C]) - -if test "x${have_flag}" = "xyes" ; then - UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]" -fi -AC_SUBST(UPEFL[_LDFLAGS]) - -m4_popdef([UP]) -m4_popdef([UPEFL]) -]) - -dnl Macro that iterates over a sequence of white separated flags -dnl and that call EFL_CHECK_LINKER_FLAG() for each of these flags -dnl -dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS) - -AC_DEFUN([EFL_CHECK_LINKER_FLAGS], -[ -m4_foreach_w([flag], [$2], [EFL_CHECK_LINKER_FLAG([$1], m4_defn([flag]))]) -]) diff --git a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in b/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in deleted file mode 100644 index b7aa2bb4c1..0000000000 --- a/legacy/emotion_generic_players/pkgbuild/PKGBUILD.in +++ /dev/null @@ -1,35 +0,0 @@ -# Maintainer: Enlightenment Developers -pkgname=emotion_generic_players -pkgver=@VERSION@ -pkgrel=1 -pkgdesc="Emotion external binary executable players - GIT development snapshot" -arch=('i686' 'x86_64' 'arm') -url="http://www.enlightenment.org" -license=('BSD') -depends=('efl' 'vlc' 'libdvdcss' 'vcdimager' 'libcdio' - 'ttf-freefont' 'ttf-dejavu' 'libssh2') -options=('debug') -build() { - cd "../.." - export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer" - export CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fomit-frame-pointer" - make clean distclean - ./configure --prefix=/usr - make -} - -#check() { -# cd "../.." -# make -k check -#} - -package() { - cd "../.." - make -j1 DESTDIR="$pkgdir/" install - install -Dm644 README "$pkgdir/usr/share/$pkgname/README" - install -Dm644 NEWS "$pkgdir/usr/share/$pkgname/NEWS" - install -Dm644 ChangeLog "$pkgdir/usr/share/$pkgname/ChangeLog" - install -Dm644 AUTHORS "$pkgdir/usr/share/$pkgname/AUTHORS" - install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" - ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/$pkgname/COPYING" -}