4 #include "edlsession.h"
7 #include "mainsession.h"
9 #include "mwindowgui.h"
10 #include "menuveffects.h"
12 #include "quicktime.h"
15 #include "vpluginarray.h"
18 MenuVEffects::MenuVEffects(MWindow *mwindow)
19 : MenuEffects(mwindow)
21 thread = new MenuVEffectThread(mwindow);
24 MenuVEffects::~MenuVEffects()
29 MenuVEffectThread::MenuVEffectThread(MWindow *mwindow)
30 : MenuEffectThread(mwindow)
34 MenuVEffectThread::~MenuVEffectThread()
38 int MenuVEffectThread::get_recordable_tracks(Asset *asset)
40 asset->layers = mwindow->edl->tracks->recordable_video_tracks();
44 int MenuVEffectThread::get_derived_attributes(Asset *asset, Defaults *defaults)
48 defaults->get("VEFFECTPATH", asset->path);
49 sprintf(string, MOV_NAME);
50 defaults->get("VEFFECTFORMAT", string);
51 if(!file.supports_video(mwindow->plugindb, string)) sprintf(string, MOV_NAME);
52 asset->format = file.strtoformat(mwindow->plugindb, string);
53 sprintf(asset->vcodec, QUICKTIME_YUV2);
54 asset->video_data = 1;
58 asset->load_defaults(defaults);
59 defaults->get("EFFECT_VIDEO_CODEC", asset->vcodec);
63 int MenuVEffectThread::save_derived_attributes(Asset *asset, Defaults *defaults)
66 defaults->update("VEFFECTPATH", asset->path);
67 defaults->update("VEFFECTFORMAT", file.formattostr(mwindow->plugindb, asset->format));
68 defaults->update("VEFFECTCOMPRESSION", asset->vcodec);
71 asset->save_defaults(defaults);
72 defaults->update("EFFECT_VIDEO_CODEC", asset->vcodec);
76 PluginArray* MenuVEffectThread::create_plugin_array()
78 return new VPluginArray();
81 int64_t MenuVEffectThread::to_units(double position, int round)
84 return Units::round(position * mwindow->edl->session->frame_rate);
86 return (int64_t)(position * mwindow->edl->session->frame_rate);
91 int MenuVEffectThread::fix_menu(char *title)
93 mwindow->gui->mainmenu->add_veffect(title);
96 MenuVEffectItem::MenuVEffectItem(MenuVEffects *menueffect, char *string)
97 : MenuEffectItem(menueffect, string)