write_audio(file);
write_video(file);
// index goes after source
- if(index_state->index_status == INDEX_READY && include_index)
+ if( include_index && index_state &&
+ index_state->index_status == INDEX_READY )
write_index(file);
file->tag.set_title("/ASSET");
int AssetPopupProjectRemove::handle_event()
{
+ popup->gui->unlock_window();
mwindow->remove_assets_from_project(1, 1,
mwindow->session->drag_assets,
mwindow->session->drag_clips);
+ popup->gui->lock_window("AssetPopupProjectRemove::handle_event");
return 1;
}
case VICON_COLOR_MODE_HIGH: vicon_cmodel = BC_RGB888; break;
}
this->vicon_cmodel = vicon_cmodel;
+ this->draw_lock = new Mutex("AssetVIconThread::draw_lock");
}
AssetVIconThread::~AssetVIconThread()
{
+ delete draw_lock;
+}
+
+void AssetVIconThread::drawing_started()
+{
+ draw_lock->lock("AssetVIconThread::drawing_started");
+}
+
+void AssetVIconThread::drawing_stopped()
+{
+ draw_lock->unlock();
}
void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode)
void set_view_popup(AssetVIcon *v, int draw_mode=-1);
ViewPopup *new_view_window();
+ void drawing_started();
+ void drawing_stopped();
AWindowGUI *gui;
int draw_mode;
int vicon_cmodel;
+ Mutex *draw_lock;
};
#include "vframe.h"
#include "vtrack.h"
#include "versioninfo.h"
+#include "vicon.h"
#include "videodevice.inc"
#include "videowindow.h"
#include "vplayback.h"
void MWindow::remove_assets_from_project(int push_undo, int redraw,
ArrayList<Indexable*> *drag_assets, ArrayList<EDL*> *drag_clips)
{
+ awindow->gui->vicon_thread->stop_drawing();
+ awindow->gui->vicon_thread->drawing_started(); // waits for draw lock
+ awindow->gui->vicon_thread->drawing_stopped();
+
for(int i = 0; i < drag_assets->total; i++) {
Indexable *indexable = drag_assets->get(i);
if(indexable->is_asset) remove_asset_from_caches((Asset*)indexable);
int ProxyToggle::handle_event()
{
int disabled = get_value();
+ mwindow->gui->unlock_window();
if( disabled )
mwindow->disable_proxy();
else
mwindow->enable_proxy();
+ mwindow->gui->lock_window("ProxyToggle::handle_event");
set_tooltip(!disabled ? _("Disable proxy") : _("Enable proxy"));
return 1;
}