picon dirs, new cinfinity picons, plugin info, rework text drawing, show msg, compres...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / pluginfclient.C
index fdafc29e72f3860076214daab44f3a415c32ec38..373f3d2564766c95a518cd3593293d13b13c03bc 100644 (file)
@@ -68,7 +68,7 @@ void PluginFClientConfig::copy_from(PluginFClientConfig &that)
        }
 }
 
-void PluginFClientConfig::interpolate(PluginFClientConfig &prev, PluginFClientConfig &next, 
+void PluginFClientConfig::interpolate(PluginFClientConfig &prev, PluginFClientConfig &next,
        int64_t prev_frame, int64_t next_frame, int64_t current_frame)
 {
        copy_from(prev);
@@ -272,7 +272,7 @@ void PluginFClientWindow::update(PluginFClient_Opt *opt)
        *(sp=str) = 0;
        if( opt ) opt->ranges(sp);
        range->update(str);
-       while( units->total_items() ) units->remove_item(0);
+       while( units->total_items() ) units->del_item(0);
        ArrayList<const AVOption *> opts;
        int n = !opt ? 0 : opt->units(opts);
        for( int i=0; i<n; ++i )
@@ -398,7 +398,7 @@ int PluginFClient_Opt::units(ArrayList<const AVOption *> &opts)
                        if( strlen(opts[i]->name) < strlen(opt->name) ) opts[i] = opt;
                        break;
                }
-               if( i < 0 ) 
+               if( i < 0 )
                        opts.append(opt);
        }
        return opts.size();
@@ -910,7 +910,7 @@ int PluginFVClient::process_buffer(VFrame **frames, int64_t position, double fra
                color_model_to_pix_fmt(colormodel);
        if( pix_fmt <= AV_PIX_FMT_NONE || pix_fmt >= AV_PIX_FMT_NB )
                pix_fmt = AV_PIX_FMT_RGBA;
-               
+
        AVFrame *frame = 0;
        if( ret >= 0 && !(frame = av_frame_alloc()) ) {
                fprintf(stderr, "PluginFVClient::process_buffer: av_frame_alloc failed\n");
@@ -929,7 +929,7 @@ int PluginFVClient::process_buffer(VFrame **frames, int64_t position, double fra
                frame->pts = local_to_edl(position);
                ret = av_frame_get_buffer(frame, 32);
                if( ret < 0 ) break;
-               ret = transfer_pixfmt(vframe, frame, pix_fmt, width, height);
+               ret = transfer_pixfmt(vframe, frame);
                if( ret < 0 ) break;
                ret = av_buffersrc_add_frame_flags(fsrc, frame, 0);
        }
@@ -938,7 +938,7 @@ int PluginFVClient::process_buffer(VFrame **frames, int64_t position, double fra
 
        if( ret >= 0 ) {
                pix_fmt = (AVPixelFormat) frame->format;
-               ret = transfer_cmodel(vframe, frame, pix_fmt, width, height);
+               ret = transfer_cmodel(vframe, frame);
        }
        if( ret < 0 ) {
                ff_err(ret, "PluginFVClient::process_buffer() %s\n", plugin_title());
@@ -1016,13 +1016,14 @@ static int get_defaults(const char *name, char *args)
        FILE *fp = fopen(defaults_path,"r");
        if( !fp ) return 0;
        char ff_plugin[BCSTRLEN], ff_args[BCTEXTLEN], *ap = 0;
-       while( !ap && fgets(ff_args, sizeof(ff_args), fp) ) {
-               if( *(ap=ff_args) == ';' ) continue;
-               if( *(ap=ff_args) == '#' ) ++ap;
+       while( fgets(ff_args, sizeof(ff_args), fp) ) {
+               char *cp = ff_args;
+               if( *cp == ';' ) continue;
+               if( *cp == '#' ) ++cp;
                char *bp = ff_plugin, *ep = bp + sizeof(ff_plugin)-1;
-               while( bp < ep && *ap && *ap != '\n' && *ap != ' ' ) *bp++ = *ap++;
+               while( bp < ep && *cp && *cp != '\n' && *cp != ' ' ) *bp++ = *cp++;
                *bp = 0;
-               if( strcmp(ff_plugin, name) ) ap = 0;
+               if( !strcmp(ff_plugin, name) ) { ap = cp;  break; }
        }
        fclose(fp);
        if( !ap ) return 0;