X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginfclient.C;h=373f3d2564766c95a518cd3593293d13b13c03bc;hb=b78e8ac7987fbf35a4ba60534c4a3d2b290562b9;hp=fdafc29e72f3860076214daab44f3a415c32ec38;hpb=c76ba7b82b876025995364912d35f300a59ec200;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C index fdafc29e..373f3d25 100644 --- a/cinelerra-5.1/cinelerra/pluginfclient.C +++ b/cinelerra-5.1/cinelerra/pluginfclient.C @@ -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 opts; int n = !opt ? 0 : opt->units(opts); for( int i=0; i &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;