Commit f74b784e authored by cristy's avatar cristy

--no commit message

--no commit message
parent f4b11908
......@@ -1373,15 +1373,17 @@ am__magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la_SOURCES_DIST = \
magick/composite-private.h magick/compress.c magick/compress.h \
magick/configure.c magick/configure.h magick/constitute.c \
magick/constitute.h magick/decorate.c magick/decorate.h \
magick/delegate.c magick/delegate.h magick/delegate-private.h \
magick/deprecate.c magick/deprecate.h magick/display.c \
magick/display.h magick/display-private.h magick/distort.c \
magick/distort.h magick/draw.c magick/draw.h \
magick/draw-private.h magick/effect.c magick/effect.h \
magick/enhance.c magick/enhance.h magick/exception.c \
magick/exception.h magick/exception-private.h magick/feature.c \
magick/feature.h magick/fourier.c magick/fourier.h magick/fx.c \
magick/fx.h magick/fx-private.h magick/gem.c magick/gem.h \
magick/distribute-cache.c magick/distribute-cache.h \
magick/distribute-cache-private.h magick/delegate.c \
magick/delegate.h magick/delegate-private.h magick/deprecate.c \
magick/deprecate.h magick/display.c magick/display.h \
magick/display-private.h magick/distort.c magick/distort.h \
magick/draw.c magick/draw.h magick/draw-private.h \
magick/effect.c magick/effect.h magick/enhance.c \
magick/enhance.h magick/exception.c magick/exception.h \
magick/exception-private.h magick/feature.c magick/feature.h \
magick/fourier.c magick/fourier.h magick/fx.c magick/fx.h \
magick/fx-private.h magick/gem.c magick/gem.h \
magick/geometry.c magick/geometry.h magick/hashmap.c \
magick/hashmap.h magick/histogram.c magick/histogram.h \
magick/identify.c magick/identify.h magick/image.c \
......@@ -1480,6 +1482,7 @@ am__objects_1 = magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-accelerate.lo
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-configure.lo \
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-constitute.lo \
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-decorate.lo \
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo \
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.lo \
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-deprecate.lo \
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-display.lo \
......@@ -4043,6 +4046,9 @@ MAGICK_BASE_SRCS = \
magick/constitute.h \
magick/decorate.c \
magick/decorate.h \
magick/distribute-cache.c \
magick/distribute-cache.h \
magick/distribute-cache-private.h \
magick/delegate.c \
magick/delegate.h \
magick/delegate-private.h \
......@@ -4250,6 +4256,7 @@ MAGICK_INCLUDE_HDRS = \
magick/delegate.h \
magick/deprecate.h \
magick/display.h \
magick/distribute-cache.h \
magick/distort.h \
magick/draw.h \
magick/effect.h \
......@@ -4326,6 +4333,7 @@ MAGICK_NOINST_HDRS = \
magick/composite-private.h \
magick/delegate-private.h \
magick/display-private.h \
magick/distribute-cache-private.h \
magick/draw-private.h \
magick/exception-private.h \
magick/fx-private.h \
......@@ -5742,6 +5750,8 @@ magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-constitute.lo: \
magick/$(am__dirstamp) magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-decorate.lo: \
magick/$(am__dirstamp) magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo: \
magick/$(am__dirstamp) magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.lo: \
magick/$(am__dirstamp) magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-deprecate.lo: \
......@@ -6795,6 +6805,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-deprecate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-display.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distort.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-draw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-effect.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-enhance.Plo@am__quote@
......@@ -7913,6 +7924,13 @@ magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-decorate.lo: magick/decorate.
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-decorate.lo `test -f 'magick/decorate.c' || echo '$(srcdir)/'`magick/decorate.c
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo: magick/distribute-cache.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo -MD -MP -MF magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.Tpo -c -o magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo `test -f 'magick/distribute-cache.c' || echo '$(srcdir)/'`magick/distribute-cache.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.Tpo magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='magick/distribute-cache.c' object='magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-distribute-cache.lo `test -f 'magick/distribute-cache.c' || echo '$(srcdir)/'`magick/distribute-cache.c
magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.lo: magick/delegate.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.lo -MD -MP -MF magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.Tpo -c -o magick/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.lo `test -f 'magick/delegate.c' || echo '$(srcdir)/'`magick/delegate.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.Tpo magick/$(DEPDIR)/magick_libMagickCore_@MAGICK_ABI_SUFFIX@_la-delegate.Plo
......
......@@ -3646,7 +3646,7 @@ MAGICK_LIBRARY_CURRENT_MIN=`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`
MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
MAGICK_SVN_REVISION=10669M
MAGICK_SVN_REVISION=10714:10739M
......@@ -24902,6 +24902,127 @@ fi
LIBS="$MATH_LIBS $LIBS"
#
# Find socket library
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
$as_echo_n "checking for library containing gethostbyname... " >&6; }
if ${ac_cv_search_gethostbyname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
;
return 0;
}
_ACEOF
for ac_lib in '' resolv nsl; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_gethostbyname=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_gethostbyname+:} false; then :
break
fi
done
if ${ac_cv_search_gethostbyname+:} false; then :
else
ac_cv_search_gethostbyname=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
$as_echo "$ac_cv_search_gethostbyname" >&6; }
ac_res=$ac_cv_search_gethostbyname
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
$as_echo_n "checking for library containing socket... " >&6; }
if ${ac_cv_search_socket+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char socket ();
int
main ()
{
return socket ();
;
return 0;
}
_ACEOF
for ac_lib in '' socket; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_socket=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_socket+:} false; then :
break
fi
done
if ${ac_cv_search_socket+:} false; then :
else
ac_cv_search_socket=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
$as_echo "$ac_cv_search_socket" >&6; }
ac_res=$ac_cv_search_socket
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
$as_echo "#define HAVE_SOCKET 1" >>confdefs.h
MAGICK_FEATURES="DPC $MAGICK_FEATURES"
fi
for ac_func in acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale socket sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
......@@ -1116,6 +1116,16 @@ AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
LIBS="$MATH_LIBS $LIBS"
AC_SUBST(MATH_LIBS)
#
# Find socket library
#
AC_SEARCH_LIBS(gethostbyname, resolv nsl)
AC_SEARCH_LIBS(socket, socket,
[
AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.])
MAGICK_FEATURES="DPC $MAGICK_FEATURES"
])
AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale socket sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
#
......
......@@ -86,6 +86,7 @@ extern "C" {
#include "magick/deprecate.h"
#include "magick/display.h"
#include "magick/distort.h"
#include "magick/distribute-cache.h"
#include "magick/draw.h"
#include "magick/effect.h"
#include "magick/enhance.h"
......
......@@ -117,6 +117,9 @@ MAGICK_BASE_SRCS = \
magick/constitute.h \
magick/decorate.c \
magick/decorate.h \
magick/distribute-cache.c \
magick/distribute-cache.h \
magick/distribute-cache-private.h \
magick/delegate.c \
magick/delegate.h \
magick/delegate-private.h \
......@@ -329,6 +332,7 @@ MAGICK_INCLUDE_HDRS = \
magick/delegate.h \
magick/deprecate.h \
magick/display.h \
magick/distribute-cache.h \
magick/distort.h \
magick/draw.h \
magick/effect.h \
......@@ -405,6 +409,7 @@ MAGICK_NOINST_HDRS = \
magick/composite-private.h \
magick/delegate-private.h \
magick/display-private.h \
magick/distribute-cache-private.h \
magick/draw-private.h \
magick/exception-private.h \
magick/fx-private.h \
......
......@@ -24,6 +24,7 @@ extern "C" {
#include <time.h>
#include "magick/cache.h"
#include "magick/distribute-cache.h"
#include "magick/random_.h"
#include "magick/thread-private.h"
#include "magick/semaphore.h"
......@@ -169,6 +170,9 @@ typedef struct _CacheInfo
size_t
number_connections;
void
*server_info;
MagickBooleanType
synchronize,
debug;
......
......@@ -49,6 +49,7 @@
#include "magick/colorspace.h"
#include "magick/colorspace-private.h"
#include "magick/composite-private.h"
#include "magick/distribute-cache-private.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/geometry.h"
......@@ -757,7 +758,7 @@ static MagickBooleanType ClonePixelCacheRepository(CacheInfo *clone_info,
(void) FormatLocaleString(message,MaxTextExtent,"%s => %s",
CommandOptionToMnemonic(MagickCacheOptions,(ssize_t) cache_info->type),
CommandOptionToMnemonic(MagickCacheOptions,(ssize_t) clone_info->type));
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),message);
}
return(status);
}
......@@ -3665,8 +3666,54 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
Create pixel cache on disk.
*/
status=AcquireMagickResource(DiskResource,cache_info->length);
if (status == MagickFalse)
if ((status == MagickFalse) || (cache_info->type == DistributedCache))
{
DistributeCacheInfo
*server_info;
if (cache_info->type == DistributedCache)
RelinquishMagickResource(DiskResource,cache_info->length);
server_info=AcquireDistributeCacheInfo(exception);
if (server_info != (DistributeCacheInfo *) NULL)
{
status=OpenDistributePixelCache(server_info,image);
if (status == MagickFalse)
server_info=DestroyDistributeCacheInfo(server_info);
else
{
/*
Create a distributed pixel cache.
*/
cache_info->type=DistributedCache;
cache_info->server_info=server_info;
(void) FormatLocaleString(cache_info->cache_filename,
MaxTextExtent,"%s:%d",
GetDistributeCacheHostname(cache_info->server_info),
GetDistributeCachePort(cache_info->server_info));
if ((source_info.storage_class != UndefinedClass) &&
(mode != ReadMode))
{
status=ClonePixelCacheRepository(cache_info,&source_info,
exception);
RelinquishPixelCachePixels(&source_info);
}
if (image->debug != MagickFalse)
{
(void) FormatMagickSize(cache_info->length,MagickFalse,
format);
type=CommandOptionToMnemonic(MagickCacheOptions,(ssize_t)
cache_info->type);
(void) FormatLocaleString(message,MaxTextExtent,
"open %s (%s[%d], %s, %.20gx%.20g %s)",cache_info->filename,
cache_info->cache_filename,GetDistributeCacheFile(
cache_info->server_info),type,(double) cache_info->columns,
(double) cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
message);
}
return(status);
}
}
(void) ThrowMagickException(exception,GetMagickModule(),CacheError,
"CacheResourcesExhausted","`%s'",image->filename);
return(MagickFalse);
......@@ -4298,6 +4345,29 @@ static MagickBooleanType ReadPixelCacheIndexes(CacheInfo *cache_info,
}
break;
}
case DistributedCache:
{
RectangleInfo
region;
/*
Read indexes from distributed cache.
*/
LockSemaphoreInfo(cache_info->file_semaphore);
region=nexus_info->region;
region.height=1UL;
for (y=0; y < (ssize_t) rows; y++)
{
count=ReadDistributePixelCachePixels(cache_info->server_info,&region,
length,(unsigned char *) q);
if (count != (MagickOffsetType) length)
break;
q+=nexus_info->region.width;
region.y++;
}
UnlockSemaphoreInfo(cache_info->file_semaphore);
break;
}
default:
break;
}
......@@ -4431,6 +4501,29 @@ static MagickBooleanType ReadPixelCachePixels(CacheInfo *cache_info,
}
break;
}
case DistributedCache:
{
RectangleInfo
region;
/*
Read pixels from distributed cache.
*/
LockSemaphoreInfo(cache_info->file_semaphore);
region=nexus_info->region;
region.height=1UL;
for (y=0; y < (ssize_t) rows; y++)
{
count=ReadDistributePixelCachePixels(cache_info->server_info,&region,
length,(unsigned char *) q);
if (count != (MagickOffsetType) length)
break;
q+=nexus_info->region.width;
region.y++;
}
UnlockSemaphoreInfo(cache_info->file_semaphore);
break;
}
default:
break;
}
......@@ -5181,6 +5274,29 @@ static MagickBooleanType WritePixelCacheIndexes(CacheInfo *cache_info,
}
break;
}
case DistributedCache:
{
RectangleInfo
region;
/*
Write indexes to distributed cache.
*/
LockSemaphoreInfo(cache_info->file_semaphore);
region=nexus_info->region;
region.height=1UL;
for (y=0; y < (ssize_t) rows; y++)
{
count=WriteDistributePixelCachePixels(cache_info->server_info,&region,
length,(const unsigned char *) p);
if (count != (MagickOffsetType) length)
break;
p+=nexus_info->region.width;
region.y++;
}
UnlockSemaphoreInfo(cache_info->file_semaphore);
break;
}
default:
break;
}
......@@ -5314,6 +5430,29 @@ static MagickBooleanType WritePixelCachePixels(CacheInfo *cache_info,
}
break;
}
case DistributedCache:
{
RectangleInfo
region;
/*
Write pixels to distributed cache.
*/
LockSemaphoreInfo(cache_info->file_semaphore);
region=nexus_info->region;
region.height=1UL;
for (y=0; y < (ssize_t) rows; y++)
{
count=WriteDistributePixelCachePixels(cache_info->server_info,&region,
length,(const unsigned char *) p);
if (count != (MagickOffsetType) length)
break;
p+=nexus_info->region.width;
region.y++;
}
UnlockSemaphoreInfo(cache_info->file_semaphore);
break;
}
default:
break;
}
......
......@@ -30,7 +30,8 @@ typedef enum
MemoryCache,
MapCache,
DiskCache,
PingCache
PingCache,
DistributedCache
} CacheType;
extern MagickExport CacheType
......
/*
Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License.
obtain a copy of the License at
http://www.imagemagick.org/script/license.php
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickCore distributed cache private methods.
*/
#ifndef _MAGICKCORE_DISTRIBUTE_CACHE_PRIVATE_H
#define _MAGICKCORE_DISTRIBUTE_CACHE_PRIVATE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#include "magick/geometry.h"
#include "magick/exception.h"
typedef struct _DistributeCacheInfo
{
int
file;
MagickSizeType
session_key;
char
hostname[MaxTextExtent];
int
port;
size_t
signature;
} DistributeCacheInfo;
extern MagickPrivate const char
*GetDistributeCacheHostname(const DistributeCacheInfo *);
extern MagickPrivate DistributeCacheInfo
*AcquireDistributeCacheInfo(ExceptionInfo *),
*DestroyDistributeCacheInfo(DistributeCacheInfo *);
extern MagickPrivate int
GetDistributeCacheFile(const DistributeCacheInfo *),
GetDistributeCachePort(const DistributeCacheInfo *);
extern MagickPrivate MagickBooleanType
OpenDistributePixelCache(DistributeCacheInfo *,Image *),
RelinquishDistributePixelCache(DistributeCacheInfo *);
extern MagickPrivate MagickOffsetType
ReadDistributePixelCacheIndexes(DistributeCacheInfo *,
const RectangleInfo *,const MagickSizeType,unsigned char *),
ReadDistributePixelCachePixels(DistributeCacheInfo *,const RectangleInfo *,
const MagickSizeType,unsigned char *),
WriteDistributePixelCacheIndexes(DistributeCacheInfo *,
const RectangleInfo *,const MagickSizeType,const unsigned char *),
WriteDistributePixelCachePixels(DistributeCacheInfo *,const RectangleInfo *,
const MagickSizeType,const unsigned char *);
#endif
This diff is collapsed.
/*
Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License.
obtain a copy of the License at
http://www.imagemagick.org/script/license.php
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickCore distributed cache methods.
*/
#ifndef _MAGICKCORE_DISTRIBUTE_CACHE_H
#define _MAGICKCORE_DISTRIBUTE_CACHE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#include "magick/exception.h"
extern MagickExport void
DistributePixelCacheServer(const int,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif
......@@ -34,9 +34,9 @@ extern "C" {
#define MagickLibAddendum "-0"
#define MagickLibInterface 7
#define MagickLibMinInterface 7
#define MagickReleaseDate "2013-01-17"
#define MagickChangeDate "20130118"
#define MagickFeatures "OpenMP"
#define MagickReleaseDate "2013-01-23"
#define MagickChangeDate "20130121"
#define MagickFeatures "DPC OpenMP"
#define MagickDelegates "bzlib freetype jp2 jpeg lcms lzma ps tiff x xml zlib"
#define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.8.2/index.html"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
......
......@@ -138,6 +138,8 @@ static MagickBooleanType ConvertUsage(void)
*miscellaneous[]=
{
"-debug events display copious debugging information",
"-distribute-cache port",
" distributed pixel cache spanning one or more servers",
"-help print program options",
"-list type print a list of supported option arguments",
"-log format format of debugging information",
......
......@@ -151,6 +151,11 @@ WandExport MagickBooleanType MagickCommandGenesis(ImageInfo *image_info,
concurrent=MagickTrue;
if (LocaleCompare("debug",option+1) == 0)
(void) SetLogEventMask(argv[++i]);
if (LocaleCompare("distribute-cache",option+1) == 0)
{
DistributePixelCacheServer(StringToInteger(argv[++i]),exception);
exit(0);
}
if (LocaleCompare("duration",option+1) == 0)
duration=StringToDouble(argv[++i],(char **) NULL);
if (LocaleCompare("regard-warnings",option+1) == 0)
......@@ -3258,6 +3263,8 @@ static MagickBooleanType MogrifyUsage(void)
*miscellaneous[]=
{
"-debug events display copious debugging information",
"-distribute-cache port",
" distributed pixel cache spanning one or more servers",
"-help print program options",
"-list type print a list of supported option arguments",
"-log format format of debugging information",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment