From 649433cf1f78c27c1d52ddc1699c152d7156581d Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 26 Apr 2011 06:28:29 +0000 Subject: [PATCH 001/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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/202] 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 9384fe7712d7656210005feaadaed3fac1fadb8e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 3 Sep 2011 03:49:00 +0000 Subject: [PATCH 039/202] 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 99c1eed59e35abfdacaf0fd4aaba892bb137c0e9 Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 14 Sep 2011 16:31:25 +0000 Subject: [PATCH 040/202] 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 b428676d44cfeb5141cd7faabf89a71e41f49498 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 15 Nov 2011 09:41:20 +0000 Subject: [PATCH 041/202] 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 042/202] 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 043/202] 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 044/202] 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 045/202] 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 046/202] 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 047/202] 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 048/202] 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 049/202] 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 8991bdf573d1a5a5310a9a6fa4b6362b5a57127c Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 17 Mar 2012 04:17:29 +0000 Subject: [PATCH 050/202] 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 051/202] 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 052/202] 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 9a6f2b66b1d2808a96ce28cffc695405da058906 Mon Sep 17 00:00:00 2001 From: "Samuel F. Baggen" Date: Fri, 13 Apr 2012 09:44:09 +0000 Subject: [PATCH 053/202] 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 054/202] 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 055/202] 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 056/202] 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 057/202] 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 058/202] 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 059/202] 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 060/202] 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 061/202] 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 062/202] 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 063/202] 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 7cd502180a18d9470663d36bc4ada2225846361c Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Fri, 15 Jun 2012 07:58:01 +0000 Subject: [PATCH 064/202] 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 198bfa025d2c0d6050f1cfd5e7192d1ae1c8f011 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 30 Jun 2012 05:32:04 +0000 Subject: [PATCH 065/202] 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 066/202] 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 067/202] 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 068/202] 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 069/202] 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 070/202] 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 071/202] 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 7ed7b191c773096e2ca440eb79ed893cf5840d5e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 27 Aug 2012 10:24:41 +0000 Subject: [PATCH 072/202] 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 943b5ca9591cf12d58d6ee2acedc83e4435cc573 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 30 Aug 2012 10:34:01 +0000 Subject: [PATCH 073/202] 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 074/202] 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 075/202] 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 076/202] 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 077/202] 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 078/202] 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 079/202] 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 080/202] 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 fd401156a69d82eb4278d9725199dae58b2f774b Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Fri, 8 Feb 2013 15:47:11 +0000 Subject: [PATCH 081/202] 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 082/202] 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 083/202] 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 2a92f697a22466e4312603810f2e335e993ec1f5 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 10 Mar 2013 22:08:49 +0900 Subject: [PATCH 084/202] 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 085/202] 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 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 086/202] 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 087/202] 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 088/202] 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 089/202] 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 090/202] 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 cc78603594213750a377dcf2eb3aa45c203a706c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 19:09:44 +0900 Subject: [PATCH 091/202] 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 655e2831d8181376a1c79cc44a19459e9db6225d Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 7 Jun 2013 20:07:50 +0900 Subject: [PATCH 092/202] 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 156ae026cb793d6823570543a60abd584c822373 Mon Sep 17 00:00:00 2001 From: Doug Newgard Date: Sun, 9 Jun 2013 22:13:11 +0900 Subject: [PATCH 093/202] 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 92ff2927f10faa10ea12d9dca40b3a3e03dc3570 Mon Sep 17 00:00:00 2001 From: Doug Newgard Date: Sat, 22 Jun 2013 12:33:52 +0900 Subject: [PATCH 094/202] 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 e09401f3692afbbe694bce96f44ae8e125a8e82d Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Thu, 31 Oct 2013 18:29:28 +0900 Subject: [PATCH 095/202] 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 096/202] 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 95fb6a948613c6fe1b2f25bf1516ac1c17b72f9b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 4 Nov 2013 18:33:00 +0900 Subject: [PATCH 097/202] 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 2b721e8f902f23b1a1dbf0915231ffa81f853a9b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 7 Nov 2013 17:26:09 +0900 Subject: [PATCH 098/202] 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 350e6e07a430e108860efa7e9f123207fc063a74 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 19 Nov 2013 17:22:00 +0900 Subject: [PATCH 099/202] 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 100/202] 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 e84ed727b0f5875dfc99d428651f9f2aba5dd4c6 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 27 Nov 2013 00:12:18 +0900 Subject: [PATCH 101/202] 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 64938785b44e44ba854f80432b15fd659103b3b6 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 29 Nov 2013 19:08:26 +0900 Subject: [PATCH 102/202] 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 8a7c8b6bd880a9c40606ef2bdbd218226b2c76e3 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 29 Nov 2013 19:37:09 +0900 Subject: [PATCH 103/202] 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 733d64c9b9bc3b79c26c6b97134aae518ba50cf3 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 14:53:49 +0900 Subject: [PATCH 104/202] 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 45a6458c88b9dca6086ba0c92154eb67db41a7ec Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 1 Dec 2013 16:08:27 +0900 Subject: [PATCH 105/202] 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 106/202] 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 58d6c943aacbae5201f0bc18067865d9d4315593 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 Dec 2013 12:27:23 -0500 Subject: [PATCH 107/202] 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 108/202] 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 109/202] 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 110/202] 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 111/202] 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 20c029e1b9e60e9e9adf6bfc69380621d594fb34 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 19 Dec 2013 15:43:55 +0900 Subject: [PATCH 112/202] 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 2092f311707017bfc4dfe18587f02cbd15807e0c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 13 Jan 2014 05:11:49 +0900 Subject: [PATCH 113/202] 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 b77f794f661f5b7f8ec5b5265a1783a76cc85c61 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 11 Feb 2014 16:18:35 -0500 Subject: [PATCH 114/202] 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 c0a86cbb35c2aa748a5d3aac94562fab3e384d4c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 12 Feb 2014 16:03:09 +0900 Subject: [PATCH 115/202] 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 d9fc3ba4094e602f66fbd0fa635b3804b06f00f4 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 18 Feb 2014 15:39:40 +0100 Subject: [PATCH 116/202] 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 117/202] 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 a30d3e2f418f621c8f0faab94baf385233a546f0 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 20 Feb 2014 12:08:19 +0100 Subject: [PATCH 118/202] 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 52777310e7502721c26d76fa9a54993a1e4bfcd0 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 21 Feb 2014 14:37:49 +0100 Subject: [PATCH 119/202] 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 7c77281b8fc9cfb8750c68579ba8b23fd4d36684 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 24 Feb 2014 16:57:52 +0100 Subject: [PATCH 120/202] 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 4347c174bd3259ef76935d94c60d3606bd47897f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 26 Feb 2014 09:32:44 +0100 Subject: [PATCH 121/202] 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 3e9bfb7924d14883097dee073632a0cc863295c3 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 7 Mar 2014 16:11:32 +0900 Subject: [PATCH 122/202] 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 123/202] 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 e3cdac19f50c0c7dc48735a9c55b3b3a48e25cae Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 28 Apr 2014 13:24:46 +0200 Subject: [PATCH 124/202] 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 125/202] 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 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 126/202] 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 53434c863d0f7f977f92017706144703867de48e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 May 2014 14:57:46 +0200 Subject: [PATCH 127/202] 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 94123a1690fd1f0a5de5f268d04567918271063a Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Sat, 17 May 2014 02:10:44 +0900 Subject: [PATCH 128/202] 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 129/202] 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 48551cc1da17d662383ae0b02c9ea2cd1526ebcc Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 May 2014 10:15:31 +0200 Subject: [PATCH 130/202] 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 131/202] 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 132/202] 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 1b1bcd75da1f3cb439cbc5e6d502bcaa1c3b682e Mon Sep 17 00:00:00 2001 From: Luca Galli Date: Tue, 27 May 2014 17:48:22 +0900 Subject: [PATCH 133/202] 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 134/202] 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 135/202] 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 502336f9074c153e5cc270ece8bfe74c29eef582 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 28 May 2014 21:48:52 +0200 Subject: [PATCH 136/202] 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 997c518eba55213540980fcf880e9f72b83bfa75 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 5 Jun 2014 17:31:20 +0100 Subject: [PATCH 137/202] 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 138/202] 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 139/202] 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 140/202] 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 df37ec259415a32bdca8129ee55e56247ff70b75 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 1 Aug 2014 10:59:39 +0200 Subject: [PATCH 141/202] 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 d1ac39f0b0b13c738ec3a82bf3fee2bdbd095981 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 3 Aug 2014 21:12:07 +0900 Subject: [PATCH 142/202] 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 143/202] 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 144/202] 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 08559a9ba6e8b3da3730fe0571d40d4abcd46854 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Aug 2014 12:52:26 +0200 Subject: [PATCH 145/202] 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 3964cac585b752dc1bad4b4aaa4052f815999b95 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 15 Aug 2014 11:49:26 +0200 Subject: [PATCH 146/202] 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 147/202] 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 78f61621c535162d056996d97edd10c88654e8c8 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 20 Aug 2014 18:01:53 +0200 Subject: [PATCH 148/202] 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 149/202] 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 150/202] 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 2a054514b66a1c57bed156bf253b412a8bd616ac Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 27 Oct 2014 13:19:00 +0100 Subject: [PATCH 151/202] 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 6e53af8509b2eae6c91d9fbfe60fa10f83aad331 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 28 Oct 2014 09:55:40 +0100 Subject: [PATCH 152/202] 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 153/202] 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 154/202] 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 155/202] 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 156/202] 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 157/202] 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 8ddcd79c4eec5ea666130aba9bd22058c0e29945 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 10 Nov 2014 12:27:15 +0100 Subject: [PATCH 158/202] 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 5df1132495aa6ba99f5a29ceb93af357356008aa Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 10 Nov 2014 14:02:51 +0100 Subject: [PATCH 159/202] 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 eaf9d839922fd27b53dbbcfdfbfc1959862d17ad Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 11 Nov 2014 10:22:39 +0100 Subject: [PATCH 160/202] 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 5cfc341f8c624e8e638154f066251a7e6243fe47 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Jan 2015 14:09:20 +0100 Subject: [PATCH 161/202] 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 c731a6929a4d3aaf8e77ab280a2444e03bab2d98 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 Jan 2015 15:09:26 +0100 Subject: [PATCH 162/202] 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 163/202] 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 d9eee6a0a84fd4e29023edcfee09d71f94e93904 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 3 Feb 2015 10:14:21 +0100 Subject: [PATCH 164/202] 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 bbaf4865537b50003cb74919428f130c06443e58 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Feb 2015 13:34:01 +0100 Subject: [PATCH 165/202] 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 fee0c2a3af5bf83ab45908624c90f35c72d18385 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Feb 2015 14:10:12 +0100 Subject: [PATCH 166/202] 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 7e544dccf46c2bbf67bbb4930f843c3f059c8e4d Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 6 Mar 2015 10:44:50 +0100 Subject: [PATCH 167/202] 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 168/202] 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 82c6e479b1b453d50f70f531240314d1daa9e64c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 13 Apr 2015 16:10:58 +0200 Subject: [PATCH 169/202] 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 8047d9ba605d628d923902a125bd1d9d86b57aec Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 20 Apr 2015 12:36:41 +0200 Subject: [PATCH 170/202] 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 81c36d771bb806b081931ee1c2e7468bc612d543 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 27 Apr 2015 14:47:21 +0200 Subject: [PATCH 171/202] 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 0b61e3254fd1c769a08419d60ea19f0bfd80b462 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 6 May 2015 15:28:20 +0200 Subject: [PATCH 172/202] 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 f89e8a93480c1f9f6e9b785ca0816318ae0d5318 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 6 May 2015 16:01:05 +0200 Subject: [PATCH 173/202] 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 85c8c5000dcd610e4ef943638dbae1a8057f8dd8 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Thu, 9 Jul 2015 04:29:59 +0900 Subject: [PATCH 174/202] 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 175/202] 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 20bbe267280171d4ea2e9823f07a80d4ca5fc534 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 21 Jul 2015 08:35:13 +0900 Subject: [PATCH 176/202] 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 19cc89f2bae62cdcef38b67d9f5e2268de669275 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 28 Jul 2015 01:42:05 +0900 Subject: [PATCH 177/202] 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 83253a84e732738ed799c7743a61ae0373a8976c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 4 Aug 2015 11:18:27 +0200 Subject: [PATCH 178/202] 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 df47798bba6ca9de3d6017f32822fbe026c7bfbd Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 4 Aug 2015 11:45:46 +0200 Subject: [PATCH 179/202] 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 180/202] 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 181/202] 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 182/202] 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 183/202] 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 c8bf8aab056858bfb70e911db013e24a521f1326 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 12 Oct 2015 12:04:18 +0200 Subject: [PATCH 184/202] 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 e09fe7b1e1c05179d013f95ad4d83efd3c53e861 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 19 Oct 2015 13:53:52 +0200 Subject: [PATCH 185/202] 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 b085e8066a696ec10b9e10b26957a486479845ca Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 26 Oct 2015 03:57:23 +0100 Subject: [PATCH 186/202] 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 99c39efef4686c5099c3c7321176b7fa3021aa7d Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 11:06:45 +0100 Subject: [PATCH 187/202] 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 9834f8b073ea4cfa70a14c6e84e64fd65faf0cfe Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 9 Nov 2015 11:47:42 +0100 Subject: [PATCH 188/202] 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 189/202] 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 de6120c8350fa6ecde82c6c128352057d58bc82f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 10 Nov 2015 15:48:09 +0100 Subject: [PATCH 190/202] 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 191/202] 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 192/202] 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 193/202] 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 194/202] 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 195/202] 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 196/202] 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 197/202] 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 5089bd6072fe2407b7e9ae5fef17bb08c74ef617 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Jan 2016 12:56:01 +0100 Subject: [PATCH 198/202] 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 d6501919a6f8365bf3c255059abf501f390372c9 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 18 Jan 2016 14:08:33 +0100 Subject: [PATCH 199/202] 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 0c0f8a4197e463236023ab253b79313f93f1d6f5 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 25 Jan 2016 17:57:54 +0100 Subject: [PATCH 200/202] 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 39eb30eb23d3802537d1e47dc85df35da00a5487 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 2 Feb 2016 10:46:01 +0100 Subject: [PATCH 201/202] 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 a4705af6b9e6733e8609c32afcc8c20f29fda59a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 2 Feb 2016 11:20:41 +0100 Subject: [PATCH 202/202] 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])