Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

menuveffects.C

Go to the documentation of this file.
00001 #include "asset.h"
00002 #include "defaults.h"
00003 #include "edl.h"
00004 #include "edlsession.h"
00005 #include "file.h"
00006 #include "mainmenu.h"
00007 #include "mainsession.h"
00008 #include "mwindow.h"
00009 #include "mwindowgui.h"
00010 #include "menuveffects.h"
00011 #include "patchbay.h"
00012 #include "quicktime.h"
00013 #include "tracks.h"
00014 #include "units.h"
00015 #include "vpluginarray.h"
00016 
00017 
00018 MenuVEffects::MenuVEffects(MWindow *mwindow)
00019  : MenuEffects(mwindow)
00020 {
00021         thread = new MenuVEffectThread(mwindow);
00022 }
00023 
00024 MenuVEffects::~MenuVEffects()
00025 {
00026         delete thread;
00027 }
00028 
00029 MenuVEffectThread::MenuVEffectThread(MWindow *mwindow)
00030  : MenuEffectThread(mwindow)
00031 {
00032 }
00033 
00034 MenuVEffectThread::~MenuVEffectThread()
00035 {
00036 }
00037 
00038 int MenuVEffectThread::get_recordable_tracks(Asset *asset)
00039 {
00040         asset->layers = mwindow->edl->tracks->recordable_video_tracks();
00041         return asset->layers;
00042 }
00043 
00044 int MenuVEffectThread::get_derived_attributes(Asset *asset, Defaults *defaults)
00045 {
00046 
00047         asset->load_defaults(defaults, 
00048                 "VEFFECT_",
00049                 1, 
00050                 1,
00051                 1,
00052                 0,
00053                 0);
00054 
00055 
00056 
00057 
00058 // Fix asset for video only
00059         if(!File::supports_video(asset->format)) asset->format = FILE_MOV;
00060         asset->audio_data = 0;
00061         asset->video_data = 1;
00062 
00063 
00064 
00065         return 0;
00066 }
00067 
00068 int MenuVEffectThread::save_derived_attributes(Asset *asset, Defaults *defaults)
00069 {
00070         asset->save_defaults(defaults,
00071                 "VEFFECT_",
00072                 1,
00073                 1,
00074                 1,
00075                 0,
00076                 0);
00077 
00078 
00079         return 0;
00080 }
00081 
00082 PluginArray* MenuVEffectThread::create_plugin_array()
00083 {
00084         return new VPluginArray();
00085 }
00086 
00087 int64_t MenuVEffectThread::to_units(double position, int round)
00088 {
00089         if(round)
00090                 return Units::round(position * mwindow->edl->session->frame_rate);
00091         else
00092                 return (int64_t)(position * mwindow->edl->session->frame_rate);
00093                 
00094         return 0;
00095 }
00096 
00097 int MenuVEffectThread::fix_menu(char *title)
00098 {
00099         mwindow->gui->mainmenu->add_veffect(title); 
00100 }
00101 
00102 MenuVEffectItem::MenuVEffectItem(MenuVEffects *menueffect, char *string)
00103  : MenuEffectItem(menueffect, string)
00104 {
00105 }

Generated on Sun Jan 8 13:38:57 2006 for Cinelerra-svn by  doxygen 1.4.4