Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
07-31-2007, 12:39 PM
#1
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
Openlibraries compilation problem.
Has anyone been successful in having the latest version of Openlibraries compiled ?
I've been trying hard to get things working. There always seem to be one or the other error. I've managed to get past these problems but, stuck on one which, I've no idea about. I guess, C++ gurus can probably help me with this one.
I've attached the file ofx_plugin.cpp.
Can anyone help me with this lil' problem, pleeeeeeeeez ?
Thanks.
07-31-2007, 12:43 PM
#2
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Original Poster
Rep:
Damn ! Cannot attach files to posts !!?
Well, here's the relevant part from ofx_plugin.cpp:
Quote:
class ML_PLUGIN_DECLSPEC ofx_filter : public filter_type, public OfxHost
{
public:
explicit ofx_filter( OfxPlugin* plug, ofx_context context )
: plug_( plug )
, context_( context )
, host_prop_type_( pcos::key::from_string( kOfxPropType ) )
, host_prop_name_( pcos::key::from_string( kOfxPropName ) )
, host_prop_label_( pcos::key::from_string( kOfxPropLabel ) )
, host_prop_is_background_( pcos::key::from_string( kOfxImageEffectHostPropIsBackground ) )
, host_prop_supports_overlays_( pcos::key::from_string( kOfxImageEffectPropSupportsOverlays ) )
, host_prop_supported_pixel_depths_( pcos::key::from_string( kOfxImageEffectPropSupportedPixelDepths ) )
, host_prop_supports_multiresolution_( pcos::key::from_string( kOfxImageEffectPropSupportsMultiResolution ) )
, host_prop_supports_tiles_( pcos::key::from_string( kOfxImageEffectPropSupportsTiles ) )
, host_prop_temporal_clip_access_( pcos::key::from_string( kOfxImageEffectPropTemporalClipAccess ) )
, host_prop_supported_components_( pcos::key::from_string( kOfxImageEffectPropSupportedComponents ) )
, host_prop_supported_contexts_( pcos::key::from_string( kOfxImageEffectPropSupportedContexts ) )
, host_prop_supports_multiple_clip_depths_( pcos::key::from_string( kOfxImageEffectPropSupportsMultipleClipDepths ) )
, host_prop_supports_multiple_clip_pars_( pcos::key::from_string( kOfxImageEffectPropSupportsMultipleClipPARs ) )
, host_prop_setable_frame_rate_( pcos::key::from_string( kOfxImageEffectPropSetableFrameRate ) )
, host_prop_setable_fielding_( pcos::key::from_string( kOfxImageEffectPropSetableFielding ) )
, host_prop_supports_custom_interact_( pcos::key::from_string( kOfxParamHostPropSupportsCustomInteract ) )
, host_prop_supports_string_animation_( pcos::key::from_string( kOfxParamHostPropSupportsStringAnimation ) )
, host_prop_supports_choice_animation_( pcos::key::from_string( kOfxParamHostPropSupportsChoiceAnimation ) )
, host_prop_supports_boolean_animation_( pcos::key::from_string( kOfxParamHostPropSupportsBooleanAnimation ) )
, host_prop_supports_custom_animation_( pcos::key::from_string( kOfxParamHostPropSupportsCustomAnimation ) )
, host_prop_max_parameters_( pcos::key::from_string( kOfxParamHostPropMaxParameters ) )
, host_prop_max_pages_( pcos::key::from_string( kOfxParamHostPropMaxPages ) )
, host_prop_page_row_column_count_( pcos::key::from_string( kOfxParamHostPropPageRowColumnCount ) )
, host_prop_this_pointer_( pcos::key::from_string( "this_pointer" ) )
, interact_main_( 0 )
, render_prop_name_( pcos::key::from_string( kOfxPropName ) )
, render_prop_time_( pcos::key::from_string( kOfxPropTime ) )
, render_prop_field_to_render_( pcos::key::from_string( kOfxImageEffectPropFieldToRender ) )
, render_prop_render_window_( pcos::key::from_string( kOfxImageEffectPropRenderWindow ) )
, render_prop_render_scale_( pcos::key::from_string( kOfxImageEffectPropRenderScale ) )
, sequence_prop_frame_range_( pcos::key::from_string( kOfxImageEffectPropFrameRange ) )
, sequence_prop_frame_step_( pcos::key::from_string( kOfxImageEffectPropFrameStep ) )
, sequence_prop_is_interactive_( pcos::key::from_string( kOfxPropIsInteractive ) )
, sequence_prop_render_scale_( pcos::key::from_string( kOfxImageEffectPropRenderScale ) )
, clip_preferences_prop_components_source_( pcos::key::from_string( "OfxImageClipPropComponents_Source" ) )
, clip_preferences_prop_components_output_( pcos::key::from_string( "OfxImageClipPropComponents_Output" ) )
, clip_preferences_prop_depth_source_( pcos::key::from_string( "OfxImageClipPropDepth_Source" ) )
, clip_preferences_prop_depth_output_( pcos::key::from_string( "OfxImageClipPropDepth_Output" ) )
, clip_preferences_prop_par_source_( pcos::key::from_string( "OfxImageClipPropPAR_Source" ) )
, clip_preferences_prop_par_output_( pcos::key::from_string( "OfxImageClipPropPAR_Output" ) )
, clip_preferences_prop_frame_rate_( pcos::key::from_string( kOfxImageEffectPropFrameRate ) )
, clip_preferences_prop_field_order_( pcos::key::from_string( kOfxImageClipPropFieldOrder ) )
, clip_preferences_prop_premultiplication_( pcos::key::from_string( kOfxImageEffectPropPreMultiplication ) )
, clip_preferences_prop_continuous_samples_( pcos::key::from_string( kOfxImageClipPropContinuousSamples ) )
, clip_preferences_prop_frame_varying_( pcos::key::from_string( kOfxImageEffectFrameVarying ) )
, apply_clip_prefs_( false )
{
// set host properties and suite functions.
set_host( );
set_suites( );
set_host_parameters( );
// load and describe the plugin.
plug_->mainEntry( kOfxActionLoad, 0, 0, 0 );
plug_->mainEntry( kOfxActionDescribe, &image_effect_descriptor_, 0, 0 );
describe_in_context( );
// create instance from descriptor.
image_effect_instance_.init( image_effect_descriptor_ );
// create any overlay instances...
if( ( interact_main_ = image_effect_descriptor_.overlay_interact( ) ) != 0 )
{
interact_main_( kOfxActionDescribe, &overlay_interact_descriptor_, 0, 0 );
overlay_interact_instance_.init( overlay_interact_descriptor_, image_effect_instance_ );
}
plug_->mainEntry( kOfxActionCreateInstance, &image_effect_instance_, 0, 0 );
if( interact_main_ )
interact_main_( kOfxActionCreateInstance, &overlay_interact_instance_, 0, 0 );
// get plugin preferences.
set_clip_prefs_ctx( );
if( plug_->mainEntry( kOfxImageEffectActionGetClipPreferences, &image_effect_instance_, 0, ( OfxPropertySetHandle ) &clip_preferences_props_filter_ ) == kOfxStatOK )
apply_clip_prefs_ = true;
}
virtual ~ofx_filter( )
{
if( interact_main_ )
interact_main_( kOfxActionDestroyInstance, &overlay_interact_instance_, 0, 0 );
plug_->mainEntry( kOfxActionDestroyInstance, &image_effect_instance_, 0, 0 );
plug_->mainEntry( kOfxActionUnload, 0, 0, 0 );
}
virtual const opl::wstring get_uri( ) const
{ return pl::to_wstring( plug_->pluginIdentifier ); }
virtual frame_type_ptr fetch( )
{
acquire_values( );
frame_type_ptr result = fetch_from_slot( );
if( result && result->get_image( ) )
{
il::image_type_ptr src = result->get_image( );
il::image_type_ptr dst;
if( context_ == FILTER )
convert_to_filter_ctx( src, dst );
pcos: roperty_container render_in_args;
pcos: roperty_container render_out_args;
pcos::int_vec render_win( 4, 0 );
render_win[ 2 ] = src->width( );
render_win[ 3 ] = src->height( );
render_in_args.append( render_prop_time_ = 0.0 );
render_in_args.append( render_prop_field_to_render_ = pl::string( kOfxImageFieldNone ) );
render_in_args.append( render_prop_render_window_ = render_win );
render_in_args.append( render_prop_render_scale_ = pcos::int_vec( 2, 1 ) );
render_out_args.append( render_prop_name_ );
render_out_args.append( render_prop_time_ = 0.0 );
image_effect_instance_.set_source( src );
image_effect_instance_.set_output( dst );
OfxStatus is_identity = plug_->mainEntry( kOfxImageEffectActionIsIdentity, &image_effect_instance_,
( OfxPropertySetHandle ) &render_in_args, ( OfxPropertySetHandle ) &render_out_args );
if( is_identity == kOfxStatReplyDefault )
{
pcos: roperty_container sequence_in_args;
sequence_in_args.append( sequence_prop_frame_range_ = pcos::double_vec( 2, 1.0 ) );
sequence_in_args.append( sequence_prop_frame_step_ = 1.0 );
sequence_in_args.append( sequence_prop_is_interactive_ = 0 );
sequence_in_args.append( sequence_prop_render_scale_ = pcos::double_vec( 2, 1.0 ) );
plug_->mainEntry( kOfxImageEffectActionBeginSequenceRender, &image_effect_instance_, ( OfxPropertySetHandle ) &sequence_in_args, 0 );
plug_->mainEntry( kOfxImageEffectActionRender, &image_effect_instance_, ( OfxPropertySetHandle ) &render_in_args, 0 );
plug_->mainEntry( kOfxImageEffectActionEndSequenceRender, &image_effect_instance_, ( OfxPropertySetHandle ) &sequence_in_args, 0 );
result->set_image( dst );
}
else if( is_identity == kOfxStatOK )
{
// select the appropriate clip from the out_args.
pl::string out_clip = render_out_args.get_property_with_key( pcos::key::from_string( kOfxPropName ) ).value<pl::string>( );
if( !out_clip.empty( ) )
{
clip_instance* out_instance = image_effect_instance_.clip_get_handle( out_clip );
if( out_instance )
result->set_image( out_instance->get_image( ) );
}
}
}
return result;
}
private:
// Host Fetch Suite.
friend void* fetch_suite( OfxPropertySetHandle host, const char* suite_name, int suite_version )
{
property_container_ptr host_props_ptr = ( property_container_ptr ) host;
if( host_props_ptr && suite_version == 1 )
{
ofx_filter* const plug = ( ofx_filter* const ) host_props_ptr->get_property_with_key( pcos::key::from_string( "this_pointer" ) ).value<void*>( );
if( !strcmp( suite_name, kOfxImageEffectSuite ) )
return ( void* ) &plug->image_effect_suite_;
else if( !strcmp( suite_name, kOfxPropertySuite ) )
return ( void* ) &plug->property_suite_;
else if( !strcmp( suite_name, kOfxParameterSuite ) )
return ( void* ) &plug->parameter_suite_;
else if( !strcmp( suite_name, kOfxMemorySuite ) )
return ( void* ) &plug->memory_suite_;
else if( !strcmp( suite_name, kOfxMultiThreadSuite ) )
return ( void* ) &plug->multithread_suite_;
else if( !strcmp( suite_name, kOfxMessageSuite ) )
return ( void* ) &plug->message_suite_;
else if( !strcmp( suite_name, kOfxInteractSuite ) )
return ( void* ) &plug->interact_suite_;
}
return 0;
}
void set_host( )
{
OfxHost::host = ( OfxPropertySetHandle ) &host_props_;
OfxHost::fetchSuite = fetch_suite;
plug_->setHost( this );
}
void set_host_parameters( )
{
pl::string_vec pixel_depths( 3 );
pixel_depths[ 0 ] = pl::string( kOfxBitDepthByte );
pixel_depths[ 1 ] = pl::string( kOfxBitDepthShort );
pixel_depths[ 2 ] = pl::string( kOfxBitDepthFloat );
pl::string_vec supported_components( 2 );
supported_components[ 0 ] = kOfxImageComponentRGBA;
supported_components[ 1 ] = kOfxImageComponentAlpha;
pl::string_vec supported_contexts( 4 );
supported_contexts[ 0 ] = kOfxImageEffectContextFilter;
supported_contexts[ 1 ] = kOfxImageEffectContextTransition;
supported_contexts[ 2 ] = kOfxImageEffectContextGenerator;
supported_contexts[ 3 ] = kOfxImageEffectContextGeneral;
host_props_.append( host_prop_type_ = pl::string( kOfxTypeImageEffectHost ) );
host_props_.append( host_prop_name_ = pl::string( "org.openlibraries.ofx_host" ) );
host_props_.append( host_prop_label_ = pl::string( "OpenLibraries OFX host" ) );
host_props_.append( host_prop_is_background_ = 0 );
host_props_.append( host_prop_supports_overlays_ = 1 );
host_props_.append( host_prop_supported_pixel_depths_ = pixel_depths );
host_props_.append( host_prop_supports_multiresolution_ = 1 );
host_props_.append( host_prop_supports_tiles_ = 0 );
host_props_.append( host_prop_temporal_clip_access_ = 0 );
host_props_.append( host_prop_supported_components_ = supported_components );
host_props_.append( host_prop_supported_contexts_ = supported_contexts );
host_props_.append( host_prop_supports_multiple_clip_depths_ = 1 );
host_props_.append( host_prop_supports_multiple_clip_pars_ = 1 );
host_props_.append( host_prop_setable_frame_rate_ = 1 );
host_props_.append( host_prop_setable_fielding_ = 1 );
host_props_.append( host_prop_supports_custom_interact_ = 1 );
host_props_.append( host_prop_supports_string_animation_ = 0 );
host_props_.append( host_prop_supports_choice_animation_ = 0 );
host_props_.append( host_prop_supports_boolean_animation_ = 0 );
host_props_.append( host_prop_supports_custom_animation_ = 0 );
host_props_.append( host_prop_max_parameters_ = -1 );
host_props_.append( host_prop_max_pages_ = 0 );
host_props_.append( host_prop_page_row_column_count_ = 0 );
host_props_.append( host_prop_this_pointer_ = ( void* ) this );
}
void set_suites( )
{
set_property_suite( property_suite_ );
set_image_effect_suite( image_effect_suite_ );
set_parameter_suite( parameter_suite_ );
set_memory_suite( memory_suite_ );
set_multithread_suite( multithread_suite_ );
set_interact_suite( interact_suite_ );
set_message_suite( message_suite_ );
}
08-02-2007, 07:00 PM
#3
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Original Poster
Rep:
So, no one has stumbled upon this error, eh ?
Damned openlibraries forum. Seems to be having very few members and I don't think my thread has been read by anyone at all !
All times are GMT -5. The time now is 02:08 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News