X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginclient.C;h=467fa2aa8346bb3909698f9135dc8bde924b9799;hp=d5a9b0c88a1e5b7b376dfccc65c710dd6e3be80a;hb=HEAD;hpb=12d4e343f31707c899e6e4daa10c68b172433cff diff --git a/cinelerra-5.1/cinelerra/pluginclient.C b/cinelerra-5.1/cinelerra/pluginclient.C index d5a9b0c8..d31b4b00 100644 --- a/cinelerra-5.1/cinelerra/pluginclient.C +++ b/cinelerra-5.1/cinelerra/pluginclient.C @@ -133,7 +133,27 @@ PluginClientWindow::PluginClientWindow(PluginClient *client, client->window_x /* - w / 2 */, client->window_y /* - h / 2 */, w, h, min_w, min_h, allow_resize, 0, 1) { + char title[BCTEXTLEN]; + this->client = client; + +// *** CONTEXT_HELP *** + if(client) { + strcpy(title, client->plugin_title()); + if(! strcmp(title, "Overlay")) { + // "Overlay" plugin title is ambiguous + if(client->is_audio()) strcat(title, " \\(Audio\\)"); + if(client->is_video()) strcat(title, " \\(Video\\)"); + } + if(client->server->is_ffmpeg()) { + // FFmpeg plugins can be audio or video + if(client->is_audio()) + strcpy(title, "FFmpeg Audio Plugins"); + if(client->is_video()) + strcpy(title, "FFmpeg Video Plugins"); + } + context_help_set_keyword(title); + } } PluginClientWindow::PluginClientWindow(const char *title, @@ -141,6 +161,8 @@ PluginClientWindow::PluginClientWindow(const char *title, : BC_Window(title, x, y, w, h, min_w, min_h, allow_resize, 0, 1) { this->client = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword(title); } PluginClientWindow::~PluginClientWindow() @@ -939,8 +961,7 @@ double PluginClient::get_project_framerate() const char *PluginClient::get_source_path() { - EDL *edl = get_edl(); - Plugin *plugin = edl->tracks->plugin_exists(server->plugin_id); + Plugin *plugin = server->edl->tracks->plugin_exists(server->plugin_id); int64_t source_position = plugin->startproject; Edit *edit = plugin->track->edits->editof(source_position,PLAY_FORWARD,0); Indexable *indexable = edit ? edit->get_source() : 0; @@ -1044,6 +1065,11 @@ int PluginClient::get_use_opengl() return server->get_use_opengl(); } +int PluginClient::to_ram(VFrame *vframe) +{ + return server->to_ram(vframe); +} + int PluginClient::get_total_buffers() { return total_in_buffers; @@ -1078,9 +1104,12 @@ int PluginClient::send_configure_change() if(server->mwindow) server->mwindow->undo->update_undo_before(_("tweek"), this); #ifdef USE_KEYFRAME_SPANNING - KeyFrame keyframe; + EDL *edl = server->edl; + Plugin *plugin = edl->tracks->plugin_exists(server->plugin_id); + KeyFrames *keyframes = plugin ? plugin->keyframes : 0; + KeyFrame keyframe(edl, keyframes); save_data(&keyframe); - server->apply_keyframe(&keyframe); + server->apply_keyframe(plugin, &keyframe); #else KeyFrame* keyframe = server->get_keyframe(); // Call save routine in plugin @@ -1092,6 +1121,14 @@ int PluginClient::send_configure_change() return 0; } +// virtual default spanning keyframe update. If a range is selected, +// then changed parameters are copied to (prev + selected) keyframes. +// redefine per client for custom keyframe updates, see tracer, sketcher, crikey +void PluginClient::span_keyframes(KeyFrame *src, int64_t start, int64_t end) +{ + src->span_keyframes(start, end); +} + KeyFrame* PluginClient::get_prev_keyframe(int64_t position, int is_local) { @@ -1159,3 +1196,4 @@ int PluginClient::gui_open() return server->gui_open(); } +