X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginserver.C;h=0c72a3582d145d324ce94784001807911ace3bef;hb=6f8a01f30489bde88280931c3ef9ea4edeb44d0f;hp=9667ef7726e4c2e1b74924500e1322dc3083315f;hpb=21c2e6b36d6a96c2f662a89459d607b5a387f4eb;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/pluginserver.C b/cinelerra-5.1/cinelerra/pluginserver.C index 9667ef77..0c72a358 100644 --- a/cinelerra-5.1/cinelerra/pluginserver.C +++ b/cinelerra-5.1/cinelerra/pluginserver.C @@ -150,30 +150,45 @@ int PluginServer::reset_parameters() keyframe = 0; prompt = 0; cleanup_plugin(); - autos = 0; - edl = 0; - preferences = 0; - title = 0; - path = 0; + + lad_index = -1; + lad_descriptor_function = 0; + lad_descriptor = 0; + + plugin_obj = 0; + client = 0; + new_plugin = 0; + lad_index = -1; + lad_descriptor_function = 0; + lad_descriptor = 0; + use_opengl = 0; ff_name = 0; - audio = video = theme = 0; - fileio = 0; - uses_gui = 0; + vdevice = 0; + plugin_type = 0; + start_auto = end_auto = 0; + autos = 0; + reverse = 0; + plugin_open = 0; realtime = multichannel = fileio = 0; synthesis = 0; - start_auto = end_auto = 0; + audio = video = theme = 0; + uses_gui = 0; transition = 0; - new_plugin = 0; - client = 0; - use_opengl = 0; - vdevice = 0; + title = 0; + path = 0; + data_text = 0; + for( int i=sizeof(args)/sizeof(args[0]); --i>=0; ) args[i] = 0; + total_args = 0; + dir_idx = 0; modules = 0; nodes = 0; + attachmentpoint = 0; + edl = 0; + preferences = 0; + prompt = 0; + temp_frame = 0; picon = 0; - lad_index = -1; - lad_descriptor_function = 0; - lad_descriptor = 0; return 0; } @@ -1208,7 +1223,7 @@ int PluginServer::get_theme_png_path(char *png_path, const char *theme_dir) char *bp = strrchr(path, '/'); if( !bp ) bp = path; else ++bp; char *sp = strrchr(bp,'.'); - if( !sp || ( strcmp(sp, ".plugin") && strcmp(sp,".so") ) ) return 0; + if( !sp ) sp = bp + strlen(bp); char *cp = png_path, *dp = bp; cp += sprintf(cp,"%s/%s/", mwindow->preferences->plugin_dir, theme_dir); while( dp < sp ) *cp++ = *dp++; @@ -1243,27 +1258,8 @@ int PluginServer::get_plugin_png_path(char *png_path) VFrame *PluginServer::get_plugin_images() { char png_path[BCTEXTLEN]; - int len = get_plugin_png_path(png_path); - if( !len ) return 0; - int ret = 0, w = 0, h = 0; - unsigned char *bfr = 0; - int fd = ::open(png_path, O_RDONLY); - if( fd < 0 ) ret = 1; - if( !ret ) { - bfr = (unsigned char *) ::mmap (NULL, len, PROT_READ, MAP_SHARED, fd, 0); - if( bfr == MAP_FAILED ) ret = 1; - } - VFrame *vframe = 0; - if( !ret ) { - double scale = BC_WindowBase::get_resources()->icon_scale; - vframe = new VFramePng(bfr, len, scale, scale); - if( (w=vframe->get_w()) <= 0 || (h=vframe->get_h()) <= 0 || - vframe->get_data() == 0 ) ret = 1; - } - if( bfr && bfr != MAP_FAILED ) ::munmap(bfr, len); - if( fd >= 0 ) ::close(fd); - if( ret ) { delete vframe; vframe = 0; } - return vframe; + if( !get_plugin_png_path(png_path) ) return 0; + return VFramePng::vframe_png(png_path,0,0); } VFrame *PluginServer::get_picon()