#include <stdlib.h>
#include <limits.h>
-#define FREI0R_PLUGIN_PATH "/usr/lib/frei0r-1:/usr/local/lib/frei0r-1:/opt/local/lib/frei0r-1"
+#define FREI0R_PLUGIN_PATH "/usr/lib/frei0r-1:/usr/local/lib/frei0r-1:/usr/lib64/frei0r-1:/opt/local/lib/frei0r-1"
extern mlt_filter filter_frei0r_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_frame filter_process( mlt_filter this, mlt_frame frame );
extern void filter_close( mlt_filter this );
+extern int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int index );
+extern void producer_close( mlt_producer this );
extern void transition_close( mlt_transition this );
extern mlt_frame transition_process( mlt_transition transition, mlt_frame a_frame, mlt_frame b_frame );
struct stat stat_buff;
switch ( type ) {
+ case producer_type:
+ strcpy ( servicetype , "producer" );
+ break;
case filter_type:
strcpy ( servicetype , "filter" );
break;
mlt_properties_set ( metadata, "description" , info.explanation );
mlt_properties_set ( metadata, "creator" , info.author );
switch (type){
+ case producer_type:
+ mlt_properties_set ( metadata, "type" , "producer" );
+ break;
case filter_type:
mlt_properties_set ( metadata, "type" , "filter" );
break;
void* ret=NULL;
mlt_properties properties=NULL;
- if (type == filter_type && info.plugin_type == F0R_PLUGIN_TYPE_FILTER ){
+ if (type == producer_type && info.plugin_type == F0R_PLUGIN_TYPE_SOURCE ){
+ mlt_producer this = mlt_producer_new( );
+ if ( this != NULL )
+ {
+ this->get_frame = producer_get_frame;
+ this->close = ( mlt_destructor )producer_close;
+ f0r_init();
+ properties=MLT_PRODUCER_PROPERTIES ( this );
+
+ for (i=0;i<info.num_params;i++){
+ f0r_param_info_t pinfo;
+ f0r_get_param_info(&pinfo,i);
+
+ }
+
+ ret=this;
+ }
+ } else if (type == filter_type && info.plugin_type == F0R_PLUGIN_TYPE_FILTER ){
mlt_filter this = mlt_filter_new( );
if ( this != NULL )
{
if (plginfo){
f0r_plugin_info_t info;
plginfo(&info);
-
- if (firstname && info.plugin_type==F0R_PLUGIN_TYPE_FILTER){
+ if (firstname && info.plugin_type==F0R_PLUGIN_TYPE_SOURCE){
+ MLT_REGISTER( producer_type, pluginname, create_frei0r_item );
+ MLT_REGISTER_METADATA( producer_type, pluginname, fill_param_info, strdup(name) );
+ }
+ else if (firstname && info.plugin_type==F0R_PLUGIN_TYPE_FILTER){
MLT_REGISTER( filter_type, pluginname, create_frei0r_item );
MLT_REGISTER_METADATA( filter_type, pluginname, fill_param_info, strdup(name) );
}