[Hdrflow-svn] SF.net SVN: hdrflow: [301] trunk
Status: Pre-Alpha
Brought to you by:
glslang
|
From: <gl...@us...> - 2007-09-14 20:25:11
|
Revision: 301
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=301&view=rev
Author: glslang
Date: 2007-09-14 13:25:06 -0700 (Fri, 14 Sep 2007)
Log Message:
-----------
+ gcc visibility updates, ppm plugin (raw conversion), build updates
Modified Paths:
--------------
trunk/HDRFlowFramework.pmproj
trunk/app/HDRFlow/Viewer.cpp
trunk/app/HDRFlow/Viewer.hpp
trunk/app/HDRFlow/ViewportOpenGLView.mm
trunk/lib/extras/configure.ac
trunk/lib/extras/src/Makefile.am
trunk/lib/extras/src/imf/imf_common.cpp
trunk/lib/extras/src/imf/imf_common.hpp
trunk/lib/extras/src/imf/mfn/mfn.cpp
trunk/lib/extras/src/panoramic/panoramic.cpp
trunk/lib/extras/src/raw/Makefile.am
trunk/lib/extras/src/raw/raw.cpp
trunk/lib/extras/src/raw/raw_plugin.opl
trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
trunk/unity.sh
Added Paths:
-----------
trunk/lib/extras/src/ppm/
trunk/lib/extras/src/ppm/Makefile.am
trunk/lib/extras/src/ppm/ppm_plugin.cpp
trunk/lib/extras/src/ppm/ppm_plugin.opl
Modified: trunk/HDRFlowFramework.pmproj
===================================================================
(Binary files differ)
Modified: trunk/app/HDRFlow/Viewer.cpp
===================================================================
--- trunk/app/HDRFlow/Viewer.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/app/HDRFlow/Viewer.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -9,11 +9,104 @@
namespace hdrflow {
+namespace
+{
+ void paint_image( il::image_type_ptr im, int width, int height )
+ {
+ int phy_w = im->width( );
+ int phy_h = im->height( );
+
+ GLenum target;
+ float tex_w, tex_h;
+ if( !pl::texture_target( phy_w, phy_h, target, tex_w, tex_h ) )
+ return;
+
+ GLint internal_format;
+ GLenum format, type;
+
+ if( !pl::pf_to_gl_format( im->pf( ), internal_format, format, type ) )
+ {
+ im = il::convert( im, L"b8g8r8a8" );
+
+ internal_format = GL_RGBA;
+ format = GL_BGRA_EXT;
+ type = GL_UNSIGNED_BYTE;
+ }
+
+ glPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
+ glEnable( target );
+
+ GLuint id;
+ glGenTextures( 1, &id );
+
+ glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
+ glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
+ glTexImage2D( target, 0, internal_format, phy_w, phy_h, 0, format, type, im->data( ) );
+
+ float off_x = width * 0.5f - phy_w * 0.5f;
+ float off_y = height * 0.5f - phy_h * 0.5f;
+
+ glMatrixMode( GL_PROJECTION );
+ glPushMatrix( );
+ glLoadIdentity( );
+ gluOrtho2D( 0.0f, width, 0.0f, height );
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix( );
+ glLoadIdentity( );
+
+ glTranslatef( off_x, off_y, 0.0f );
+
+ if( !im->is_flipped( ) )
+ {
+ glBegin( GL_QUADS );
+ glTexCoord2f( 0.0f, 0.0f );
+ glVertex2f( 0.0f, 0.0f );
+ glTexCoord2f( tex_w, 0.0f );
+ glVertex2f( phy_w, 0.0f );
+ glTexCoord2f( tex_w, tex_h );
+ glVertex2f( phy_w, phy_h );
+ glTexCoord2f( 0.0f, tex_h );
+ glVertex2f( 0.0f, phy_h );
+ glEnd( );
+ }
+ else
+ {
+ glBegin( GL_QUADS );
+ glTexCoord2f( 0.0f, tex_h );
+ glVertex2f( 0.0f, 0.0f );
+ glTexCoord2f( tex_w, tex_h );
+ glVertex2f( phy_w, 0.0f );
+ glTexCoord2f( tex_w, 0.0f );
+ glVertex2f( phy_w, phy_h );
+ glTexCoord2f( 0.0f, 0.0f );
+ glVertex2f( 0.0f, phy_h );
+ glEnd( );
+ }
+
+ glMatrixMode( GL_MODELVIEW );
+ glPopMatrix( );
+
+ glMatrixMode( GL_PROJECTION );
+ glPopMatrix( );
+
+ glDisable( target );
+ }
+}
+
Viewer::Viewer( const pl::string& uri )
- : default_( new Track( uri ) )
+ : default_( new TrackHolder( TrackPtr( new Track( uri ) ) ) )
{
}
+Viewer::TrackHolder::~TrackHolder( )
+{
+ if( id_ )
+ glDeleteTextures( 1, &id_ );
+}
+
void Viewer::initialise( )
{
glClearColor( 0.0, 0.0, 0.0, 0.0 );
@@ -30,29 +123,7 @@
il::image_type_ptr im = media->get_image( );
if( !im ) return;
- int phy_w = im->width( );
- int phy_h = im->height( );
-
- GLenum target;
- float tex_w, tex_h;
- if( !pl::texture_target( phy_w, phy_h, target, tex_w, tex_h ) )
- return;
-
- GLint internal_format;
- GLenum format, type;
-
- if( !pl::pf_to_gl_format( im->pf( ), internal_format, format, type ) )
- {
- im = il::convert( im, L"b8g8r8a8" );
-
- internal_format = GL_RGBA;
- format = GL_BGRA_EXT;
- }
-
- glPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
- glEnable( target );
-
-
+ paint_image( im, width, height );
}
}
Modified: trunk/app/HDRFlow/Viewer.hpp
===================================================================
--- trunk/app/HDRFlow/Viewer.hpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/app/HDRFlow/Viewer.hpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -14,6 +14,48 @@
class Viewer
{
+private:
+ class TrackHolder
+ {
+ public:
+ explicit TrackHolder( TrackPtr track )
+ : track_( track )
+ , phy_w( 0 )
+ , phy_h( 0 )
+ , id_( 0 )
+ { }
+
+ ~TrackHolder( );
+
+ public:
+ BucketPtr media( int position )
+ { return track_->media( position ); }
+
+ // OpenGL associated member functions.
+ public:
+ GLuint id( ) const
+ { return id_; }
+ void set_id( GLuint id )
+ { id_ = id; }
+
+ GLenum target( ) const
+ { return target_; }
+ void set_target( GLenum target )
+ { target_ = target; }
+
+ private:
+ TrackPtr track_;
+ int phy_w;
+ int phy_h;
+
+ // OpenGL associated member data.
+ private:
+ GLuint id_;
+ GLenum target_;
+ };
+
+ typedef boost::shared_ptr<TrackHolder> TrackHolderPtr;
+
public:
explicit Viewer( const pl::string& uri );
@@ -21,7 +63,7 @@
void display( int width, int height );
private:
- TrackPtr default_;
+ TrackHolderPtr default_;
};
}
Modified: trunk/app/HDRFlow/ViewportOpenGLView.mm
===================================================================
--- trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-14 20:25:06 UTC (rev 301)
@@ -67,6 +67,9 @@
- ( void ) prepareOpenGL
{
+ glewExperimental = GL_TRUE;
+ glewInit( );
+
viewer_->initialise( );
// Sync to vertical retrace
Modified: trunk/lib/extras/configure.ac
===================================================================
--- trunk/lib/extras/configure.ac 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/configure.ac 2007-09-14 20:25:06 UTC (rev 301)
@@ -144,6 +144,24 @@
INCLUDES='-I$(top_srcdir)/src'
AC_SUBST(INCLUDES)
+dnl OpenLibraries common flags
+dnl NOTE: we could use $(var) instead of @var@ if we want late-expansion in the generated makefiles.
+EXTRAS_CXXFLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
+AC_SUBST(EXTRAS_CXXFLAGS)
+
+EXTRAS_LDFLAGS=''
+
+case $host in
+ *-*-linux*)
+ EXTRAS_LDFLAGS='-Wl,-export-dynamic'
+ ;;
+ *-apple-darwin*)
+ EXTRAS_LDFLAGS='-Wl,-headerpad_max_install_names'
+ ;;
+esac
+
+AC_SUBST(EXTRAS_LDFLAGS)
+
dnl Universal Binary Support (OS X only)
AC_CHECK_UNIVERSAL_BINARY_SUPPORT( )
@@ -176,6 +194,7 @@
src/imf/hdr/Makefile
src/imf/mfn/Makefile
src/panoramic/Makefile
+src/ppm/Makefile
src/raw/Makefile
])
AC_OUTPUT
Modified: trunk/lib/extras/src/Makefile.am
===================================================================
--- trunk/lib/extras/src/Makefile.am 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/Makefile.am 2007-09-14 20:25:06 UTC (rev 301)
@@ -3,4 +3,4 @@
#
#
-SUBDIRS = panoramic raw imf
+SUBDIRS = imf panoramic ppm raw
Modified: trunk/lib/extras/src/imf/imf_common.cpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/imf/imf_common.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -3,7 +3,7 @@
// Copyright (c) 2007 Goncalo N. M. de Carvalho
// Released under the GPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// For more information, see http://www.hdrflow.com.
#include <cstdio>
Modified: trunk/lib/extras/src/imf/imf_common.hpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.hpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/imf/imf_common.hpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -3,7 +3,7 @@
// Copyright (c) 2007 Goncalo N. M. de Carvalho
// Released under the GPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// For more information, see http://www.hdrflow.com.
#ifndef IMF_COMMON_INC_
#define IMF_COMMON_INC_
Modified: trunk/lib/extras/src/imf/mfn/mfn.cpp
===================================================================
--- trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -3,7 +3,7 @@
// Copyright (c) 2007 Goncalo N. M. de Carvalho
// Released under the GPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// For more information, see http://www.hdrflow.com.
#ifdef __APPLE__
#include <maya/OpenMayaMac.h>
@@ -135,7 +135,13 @@
#endif
im_ = il::convert( im_, L"r32g32b32a32f" );
- if( !im_ ) return MS::kFailure;
+ if( !im_ )
+ {
+#ifndef NDEBUG
+ MGlobal::displayInfo( "HDRFlow: Internal Error: conversion to floating point format failed. Please report to su...@cr...." );
+#endif
+ return MS::kFailure;
+ }
int width = im_->width( );
int height = im_->height( );
@@ -173,20 +179,22 @@
extern "C" MStatus initializePlugin( MObject obj )
{
-#ifndef NDEBUG
- MGlobal::displayInfo( "HDRFlow: initialising ..." );
-#endif
-
MFnPlugin plugin( obj, "com.cryogenicgraphics", "8.0", "Any" );
MStringArray extensions;
extensions.append( "hdr" );
extensions.append( "exr" );
extensions.append( "tiff" );
extensions.append( "tif" );
+ extensions.append( "cr2" );
+ extensions.append( "raw" );
CHECK_MSTATUS( plugin.registerImageFile( "HDRFlow", hdrflow::extras::mfn::image_reader::creator, extensions ) );
pl::init( );
+#ifndef NDEBUG
+ MGlobal::displayInfo( "HDRFlow: initialised ..." );
+#endif
+
return MS::kSuccess;
}
@@ -194,6 +202,10 @@
{
MFnPlugin plugin( obj );
CHECK_MSTATUS( plugin.deregisterImageFile( "HDRFlow" ) );
+
+#ifndef NDEBUG
+ MGlobal::displayInfo( "HDRFlow: uninitialised ..." );
+#endif
return MS::kSuccess;
}
Modified: trunk/lib/extras/src/panoramic/panoramic.cpp
===================================================================
--- trunk/lib/extras/src/panoramic/panoramic.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/panoramic/panoramic.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -2,8 +2,8 @@
// panoramic - Panoramic transformations plugin.
// Copyright (C) 2007 Goncalo N. M. de Carvalho
-// Released under the LGPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// Released under the GPL.
+// For more information, see http://www.hdrflow.com.
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
Added: trunk/lib/extras/src/ppm/Makefile.am
===================================================================
--- trunk/lib/extras/src/ppm/Makefile.am (rev 0)
+++ trunk/lib/extras/src/ppm/Makefile.am 2007-09-14 20:25:06 UTC (rev 301)
@@ -0,0 +1,28 @@
+
+#
+#
+#
+
+libdir = $(EXTRAS_PLUGINPATH)
+
+lib_LTLIBRARIES = libhdrflow_extras_ppm.la
+
+libhdrflow_extras_ppm_la_SOURCES = \
+ ppm_plugin.cpp
+
+libhdrflow_extras_ppm_la_CXXFLAGS = \
+ $(EXTRAS_CXXFLAGS) \
+ $(BOOST_INCLUDE_PATH) \
+ -I$(top_builddir)/../openlibraries/src
+
+libhdrflow_extras_ppm_la_LIBADD = \
+ $(top_builddir)/../openlibraries/src/openpluginlib/pl/libopenpluginlib_pl.la \
+ $(top_builddir)/../openlibraries/src/openimagelib/il/libopenimagelib_il.la
+
+libhdrflow_extras_ppm_la_LDFLAGS = \
+ $(EXTRAS_LDFLAGS)
+
+libhdrflow_extras_ppm_ladir = $(EXTRAS_PLUGINPATH)
+libhdrflow_extras_ppm_la_DATA = ppm_plugin.opl
+
+nobase_dist_libhdrflow_extras_ppm_la_DATA = ppm_plugin.opl
Property changes on: trunk/lib/extras/src/ppm/Makefile.am
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/ppm/ppm_plugin.cpp
===================================================================
--- trunk/lib/extras/src/ppm/ppm_plugin.cpp (rev 0)
+++ trunk/lib/extras/src/ppm/ppm_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -0,0 +1,110 @@
+
+// ppm - A PPM reader/writer plugin.
+
+// Copyright (C) 2007 Goncalo N. M. de Carvalho
+// Released under the GPL.
+// For more information, see http://www.hdrflow.com.
+
+#ifdef WIN32
+# define PPM_DECLSPEC __declspec( dllexport )
+#else
+# define PPM_DECLSPEC __attribute__( ( visibility( "default" ) ) )
+#endif
+
+#include <openimagelib/il/openimagelib_plugin.hpp>
+
+namespace il = olib::openimagelib::il;
+namespace pl = olib::openpluginlib;
+
+namespace hdrflow {
+
+namespace
+{
+ il::image_type_ptr load_ppm( pl::stream_ptr stream )
+ {
+ char buffer[ 128 ];
+
+ if( !stream->getline( buffer, 128 ) )
+ return il::image_type_ptr( );
+
+ if( buffer[ 0 ] != 'P' && buffer[ 1 ] != '6' )
+ return il::image_type_ptr( );
+
+ if( !stream->getline( buffer, 128 ) )
+ return il::image_type_ptr( );
+
+ int width, height;
+ if( sscanf( buffer, "%d %d", &width, &height ) < 2 )
+ return il::image_type_ptr( );
+
+ if( !stream->getline( buffer, 128 ) )
+ return il::image_type_ptr( );
+
+ il::image_type_ptr im = il::allocate( L"r32g32b32a32f", width, height );
+ if( !im )
+ return il::image_type_ptr( );
+
+ const unsigned short* data = reinterpret_cast<const unsigned short*>( stream->data( ) );
+ il::image_type::pointer texels = im->data( );
+
+ for( int i = 0; i < height; ++i )
+ {
+ for( int j = 0; j < width; ++j )
+ {
+ ( ( float* ) texels )[ 0 ] = *data++;
+ ( ( float* ) texels )[ 1 ] = *data++;
+ ( ( float* ) texels )[ 2 ] = *data++;
+ ( ( float* ) texels )[ 3 ] = 1.0f;
+
+ texels += 4 * sizeof( float );
+ }
+
+ texels += ( im->pitch( ) - im->linesize( ) ) * sizeof( float );
+ }
+
+ return im;
+ }
+}
+
+struct PPM_DECLSPEC ppm_plugin : public il::openimagelib_plugin
+{
+ virtual il::image_type_ptr load( pl::stream_ptr stream )
+ { return load_ppm( stream ); }
+
+ virtual bool store( pl::stream_ptr, il::image_type_ptr )
+ { return false; }
+};
+
+}
+
+extern "C"
+{
+ PPM_DECLSPEC bool openplugin_init( void )
+ {
+ return true;
+ }
+
+ PPM_DECLSPEC bool openplugin_uninit( void )
+ {
+ return true;
+ }
+
+ PPM_DECLSPEC bool openplugin_create_plugin( const char*, pl::openplugin** plug )
+ {
+ *plug = new hdrflow::ppm_plugin;
+ return true;
+ }
+
+ PPM_DECLSPEC void openplugin_destroy_plugin( pl::openplugin* plug )
+ { delete static_cast<hdrflow::ppm_plugin*>( plug ); }
+}
+
+#ifdef WIN32
+extern "C" BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID )
+{
+ if( fdwReason == DLL_PROCESS_ATTACH )
+ DisableThreadLibraryCalls( hInstDLL );
+
+ return TRUE;
+}
+#endif
Property changes on: trunk/lib/extras/src/ppm/ppm_plugin.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/ppm/ppm_plugin.opl
===================================================================
--- trunk/lib/extras/src/ppm/ppm_plugin.opl (rev 0)
+++ trunk/lib/extras/src/ppm/ppm_plugin.opl 2007-09-14 20:25:06 UTC (rev 301)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openlibraries version="1.0">
+ <openimagelib name="oil" version="0.2.0">
+ <plugin name="HDRFlow ppm plugin" type="input" in_filter="*.ppm" extension='".*\.ppm"' merit="0" filename='"libhdrflow_extras_ppm.so", "libhdrflow_extras_ppm.dylib", "hdrflow_extras_ppm-vc80-d-0_1_0.dll", "hdrflow_extras_ppm-vc80-r-0_1_0.dll"'/>
+ </openimagelib>
+</openlibraries>
Modified: trunk/lib/extras/src/raw/Makefile.am
===================================================================
--- trunk/lib/extras/src/raw/Makefile.am 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/raw/Makefile.am 2007-09-14 20:25:06 UTC (rev 301)
@@ -12,6 +12,7 @@
dcraw.c
libhdrflow_extras_raw_la_CXXFLAGS = \
+ $(EXTRAS_CXXFLAGS) \
$(BOOST_INCLUDE_PATH) \
-I$(top_builddir)/../openlibraries/src
@@ -23,6 +24,9 @@
$(top_builddir)/../openlibraries/src/openpluginlib/pl/libopenpluginlib_pl.la \
$(top_builddir)/../openlibraries/src/openimagelib/il/libopenimagelib_il.la
+libhdrflow_extras_raw_la_LDFLAGS = \
+ $(EXTRAS_LDFLAGS)
+
libhdrflow_extras_raw_ladir = $(EXTRAS_PLUGINPATH)
libhdrflow_extras_raw_la_DATA = raw_plugin.opl
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -2,10 +2,16 @@
// raw - A camera raw processing plugin.
// Copyright (C) 2007 Goncalo N. M. de Carvalho
-// Released under the LGPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// Released under the GPL.
+// For more information, see http://www.hdrflow.com.
#ifdef WIN32
+# define RAW_DECLSPEC __declspec( dllexport )
+#else
+# define RAW_DECLSPEC __attribute__( ( visibility( "default" ) ) )
+#endif
+
+#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <windows.h>
@@ -50,14 +56,12 @@
il::image_type_ptr dcraw( pcos::property_container properties ) // TODO: change to ptr when pcos moves to proper copy semantics
{
pl::string linear_output = properties.get_property_with_key( pcos::key::from_string( "linear_output" ) ).value<pl::string>( );
- pl::string tiff = properties.get_property_with_key( pcos::key::from_string( "tiff_output" ) ).value<pl::string>( );
pl::string path = properties.get_property_with_key( pcos::key::from_string( "path" ) ).value<pl::string>( );
pl::string output_path = properties.get_property_with_key( pcos::key::from_string( "output_path" ) ).value<pl::string>( );
std::vector<const char*> args;
args.push_back( "dcraw" );
args.push_back( linear_output.c_str( ) );
- args.push_back( tiff.c_str( ) );
args.push_back( "-Z" );
args.push_back( output_path.c_str( ) );
args.push_back( path.c_str( ) );
@@ -82,7 +86,7 @@
}
}
-class raw_plugin : public il::openimagelib_plugin
+class RAW_DECLSPEC raw_plugin : public il::openimagelib_plugin
{
public:
explicit raw_plugin( )
@@ -156,7 +160,7 @@
tempdir = "/var/tmp/";
#endif
- raw_props_.append( output_path_ = tempdir + pl::string( "hdrflow_extras_raw_.tiff" ) );
+ raw_props_.append( output_path_ = tempdir + pl::string( "hdrflow_extras_raw_.ppm" ) );
}
private:
@@ -187,12 +191,6 @@
} } }
-#ifdef WIN32
-# define RAW_DECLSPEC __declspec( dllexport )
-#else
-# define RAW_DECLSPEC __attribute__( ( visibility( "default" ) ) )
-#endif
-
extern "C"
{
RAW_DECLSPEC bool openplugin_init( void )
@@ -212,7 +210,7 @@
}
RAW_DECLSPEC void openplugin_destroy_plugin( pl::openplugin* plug )
- {
+ {
delete static_cast<hdrflow::extras::raw::raw_plugin*>( plug );
}
}
Modified: trunk/lib/extras/src/raw/raw_plugin.opl
===================================================================
--- trunk/lib/extras/src/raw/raw_plugin.opl 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/raw/raw_plugin.opl 2007-09-14 20:25:06 UTC (rev 301)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<openlibraries version="1.0">
- <!-- plugins go here -->
<openimagelib name="oil" version="0.2.0">
- <plugin name="HDRFlow Raw plugin" type="input" in_filter="*.raw *.cr2" extension='".*\.raw", ".*\.cr2"' merit="0" filename='"libhdrflow_raw.so", "libhdrflow_raw.dylib", "hdrflow_raw-vc80-d-0_1_0.dll", "hdrflow_raw-vc80-r-0_1_0.dll"'/>
+ <plugin name="HDRFlow Raw plugin" type="input" in_filter="*.raw *.cr2" extension='".*\.raw", ".*\.cr2"' merit="0" filename='"libhdrflow_extras_raw.so", "libhdrflow_extras_raw.dylib", "hdrflow_extras_raw-vc80-d-0_1_0.dll", "hdrflow_extras_raw-vc80-r-0_1_0.dll"'/>
</openimagelib>
</openlibraries>
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -84,7 +84,7 @@
*/
}
-class lightmap3D_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC lightmap3D_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -16,7 +16,7 @@
{
}
-struct bmp_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC bmp_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr )
{ return il::image_type_ptr( ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -200,7 +200,7 @@
}
}
-struct dds_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC dds_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_dds( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -834,7 +834,7 @@
}
}
-struct dpx_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC dpx_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_dpx( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -56,7 +56,7 @@
}
}
-struct exr_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC exr_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_exr( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -144,7 +144,7 @@
*/
}
-class gdi_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC gdi_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -275,7 +275,7 @@
}
}
-struct hdr_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC hdr_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_hdr( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -289,7 +289,7 @@
}
}
-class jpg_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC jpg_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -97,7 +97,7 @@
}
}
-struct png_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC png_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_png( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -70,7 +70,7 @@
return il::image_type_ptr( );
}
-class psd_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC psd_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -115,7 +115,7 @@
}
}
-struct qt_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC qt_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_quicktime( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -261,7 +261,7 @@
}
}
-class sgi_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC sgi_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -219,7 +219,7 @@
#undef TGA_TYPE_GRAY_RLE
}
-class tga_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC tga_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -143,7 +143,7 @@
}
}
-class tiff_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC tiff_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/unity.sh
===================================================================
--- trunk/unity.sh 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/unity.sh 2007-09-14 20:25:06 UTC (rev 301)
@@ -56,8 +56,10 @@
output_directory="."
openlibraries_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-pythonversion=2.3 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-glewprefix=/usr/local"
-extras_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking"
+extras_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-mayadir=/Applications/Autodesk/maya8.5"
+extras_image_plugins="ppm raw"
+
while getopts "v:b:efi:o:x:upasm" option
do
case $option in
@@ -87,14 +89,6 @@
done
fi
-strip_library_symbols( )
-{
- if [ "$strip_symbols" -eq 1 ]
- then
- strip -x $1
- fi
-}
-
make_framework_dir( )
{
framework_dir="$output_directory/$1.framework"
@@ -159,8 +153,7 @@
do if [ ! -L $i ]
then ln -sf Versions/Current/$1 $1.framework/$1 &&
cp $i $1.framework/Versions/Current/$1 &&
- install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1 &&
- strip_library_symbols $1.framework/$1
+ install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1
fi
done
}
@@ -173,8 +166,7 @@
for i in $libs
do if [ ! -L $i ]
then cp $i $1.framework/Versions/$framework_version/PlugIns/$1.so &&
- install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1 &&
- strip_library_symbols $1.framework/Versions/$framework_version/PlugIns/$1.so
+ install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1
fi
done
fi
@@ -207,7 +199,7 @@
if [ -d "$2/../plugins" ]
then plugins=`ls $2/../plugins`
for i in $plugins
- do if [ -d $2/../plugins/$i ]
+ do if [ -d $2/../plugins/$i/.libs ]
then cp $2/../plugins/$i/*.opl $1.framework/PlugIns
fi
done
@@ -272,7 +264,6 @@
fi
done
done
- strip_library_symbols $1.framework/Versions/$framework_version/Libraries/*
}
make_framework_plugins( )
@@ -285,7 +276,6 @@
fi
done
fi
- strip_library_symbols $2.framework/PlugIns/*
}
make_framework_interdeps( )
@@ -315,6 +305,38 @@
done
}
+make_extras_plugins( )
+{
+ case $1 in
+ HDRFlowImage )
+ for i in $extras_image_plugins
+ do if [ -d ./lib/extras/src/$i/.libs ]
+ then cp -R ./lib/extras/src/$i/.libs/*.dylib $1.framework/PlugIns
+ fi
+ done
+ ;;
+
+ HDRFlowMedia )
+ ;;
+ esac
+}
+
+make_extras_resources( )
+{
+ case $1 in
+ HDRFlowImage )
+ for i in $extras_image_plugins
+ do if [ -d ./lib/extras/src/$i/.libs ]
+ then cp -R ./lib/extras/src/$i/*.opl $1.framework/PlugIns
+ fi
+ done
+ ;;
+
+ HDRFlowMedia )
+ ;;
+ esac
+}
+
make_framework( )
{
rm -rf $1.framework
@@ -323,11 +345,13 @@
make_framework_libs $1 $2 &&
make_framework_python_libs $1 "$2/../py" &&
make_framework_deps $1 &&
+ make_extras_plugins $1 &&
make_framework_plugins $2 $1 &&
make_framework_interdeps $1 &&
make_framework_plugins_deps $1 &&
make_framework_libs_deps $1 &&
- make_framework_resources $1 $2
+ make_framework_resources $1 $2 &&
+ make_extras_resources $1
}
make_umbrella_framework_deps( )
@@ -474,11 +498,6 @@
check_status $?
}
-make_extras_framework( )
-{
- echo "not implemented"
-}
-
make_app( )
{
cp -R ./app/HDRFlow/build/Release/HDRFlow.app .
@@ -490,6 +509,29 @@
hdiutil create -ov -srcfolder $1.pkg $1.dmg -fs HFS+ -volname "$1"
}
+strip_framework_symbols( )
+{
+ if [ "$strip_symbols" -eq 1 ]
+ then
+ echo -n " Stripping symbols..."
+ strip -x HDRFlow.framework/HDRFlow &&
+ strip -x HDRFlow.framework/Libraries/* &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/HDRFlowPlugin &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/*.so &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/*.dylib &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/HDRFlowImage &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/*.so &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/*.dylib &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/HDRFlowMedia &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/*.so &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/*.dylib
+ check_status $?
+ fi
+}
+
if [ "$build_frameworks" -eq 1 ] && [ "$PLATFORM" = "Darwin" ]
then
echo "Building OS/X Frameworks..."
@@ -506,7 +548,9 @@
then echo " Building Umbrella Framework..."
echo -n " HDRFlow..."
make_umbrella_framework
- check_status $?
+ check_status $?
+
+ strip_framework_symbols
fi
if [ "$build_application" -eq 1 ]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|