}
}
+void BatchRenderThread::reset()
+{
+ current_job = 0;
+ rendering_job = -1;
+ delete default_job; default_job = 0;
+ jobs.remove_all_objects();
+ if(file_entries) {
+ file_entries->remove_all_objects();
+ delete file_entries; file_entries = 0;
+ }
+}
+
void BatchRenderThread::handle_close_event(int result)
{
// Save settings
path[0] = 0;
save_jobs(path);
save_defaults(mwindow->defaults);
- delete default_job;
- default_job = 0;
- jobs.remove_all_objects();
- if(file_entries)
- {
- file_entries->remove_all_objects();
- delete file_entries;
- file_entries = 0;
- }
+ reset();
}
BC_Window* BatchRenderThread::new_gui()
int x = mwindow->theme->batchrender_x1;
int y = 5;
- int x1 = mwindow->theme->batchrender_x1;
- int x2 = mwindow->theme->batchrender_x2;
- //int x3 = mwindow->theme->batchrender_x3;
- int y1 = y;
- int y2;
+ int x1 = x, x2 = get_w()/2 + 10; // mwindow->theme->batchrender_x2;
+ int y1 = 5, y2 = 5;
// output file
- add_subwindow(output_path_title = new BC_Title(x1, y, _("Output path:")));
- y += 20;
- format_tools = new BatchFormat(mwindow,
- this,
- thread->get_current_asset());
+ add_subwindow(output_path_title = new BC_Title(x1, y1, _("Output path:")));
+ y1 += output_path_title->get_h() + mwindow->theme->widget_border;
+
+ format_tools = new BatchFormat(mwindow, this, thread->get_current_asset());
format_tools->set_w(get_w() / 2);
- format_tools->create_objects(x,
- y,
- 1,
- 1,
- 1,
- 1,
- 0,
- 1,
- 0,
- 0,
- &thread->get_current_job()->strategy,
- 0);
-
- x2 = x;
- y2 = y + 10;
- x += format_tools->get_w();
- y = y1;
- x1 = x;
- //x3 = x + 80;
+ format_tools->create_objects(x1, y1, 1, 1, 1, 1, 0, 1, 0, 0,
+ &thread->get_current_job()->strategy, 0);
// input EDL
- x = x1;
- add_subwindow(edl_path_title = new BC_Title(x, y, _("EDL Path:")));
- y += 20;
- add_subwindow(edl_path_text = new BatchRenderEDLPath(
- thread,
- x,
- y,
- get_w() - x - 40,
- thread->get_current_edl()));
-
- x += edl_path_text->get_w();
+ add_subwindow(edl_path_title = new BC_Title(x2, y2, _("EDL Path:")));
+ y2 += edl_path_title->get_h() + mwindow->theme->widget_border;
+
+ x = x2; y = y2;
+ add_subwindow(edl_path_text = new BatchRenderEDLPath( thread,
+ x, y, get_w()-x - 40, thread->get_current_edl()));
+ x = x2 + edl_path_text->get_w();
add_subwindow(edl_path_browse = new BrowseButton(
mwindow, this, edl_path_text, x, y, thread->get_current_edl(),
_("Input EDL"), _("Select an EDL to load:"), 0));
+ y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;
- x = x1;
- y += 64;
- update_selected_edl = new BatchRenderUpdateEDL(thread, x, y);
- add_subwindow(update_selected_edl);
+ x = x2; y = y2;
+ add_subwindow(update_selected_edl = new BatchRenderUpdateEDL(thread, x, y));
y += update_selected_edl->get_h() + mwindow->theme->widget_border;
-
- add_subwindow(new_batch = new BatchRenderNew(thread,
- x,
- y));
- x += new_batch->get_w() + 10;
-
- add_subwindow(delete_batch = new BatchRenderDelete(thread,
- x,
- y));
- x = new_batch->get_x();
- y += new_batch->get_h() + mwindow->theme->widget_border;
- use_current_edl = new BatchRenderCurrentEDL(thread, x, y);
- add_subwindow(use_current_edl);
+ add_subwindow(use_current_edl = new BatchRenderCurrentEDL(thread, x, y));
+ y += use_current_edl->get_h() + mwindow->theme->widget_border;
if( !mwindow->edl || !mwindow->edl->path[0] ) use_current_edl->disable();
+ add_subwindow(new_batch = new BatchRenderNew(thread, x, y));
+ x += new_batch->get_w() + mwindow->theme->widget_border;
+ add_subwindow(delete_batch = new BatchRenderDelete(thread, x, y));
+ x = x2; y += delete_batch->get_h() + mwindow->theme->widget_border;
+ add_subwindow(savelist_batch = new BatchRenderSaveList(thread, x, y));
+ x += savelist_batch->get_w() + mwindow->theme->widget_border;
+ add_subwindow(loadlist_batch = new BatchRenderLoadList(thread, x, y));
+ y2 = y + loadlist_batch->get_h() + mwindow->theme->widget_border;
+ if( y2 > y1 ) y1 = y2;
+ x = mwindow->theme->batchrender_x1, y = y1;
- savelist_batch = new BatchRenderSaveList(thread, x, y);
- add_subwindow(savelist_batch);
- x += savelist_batch->get_w() + 10;
-
- loadlist_batch = new BatchRenderLoadList(thread, x, y);
- add_subwindow(loadlist_batch);
- x += loadlist_batch->get_w() + 10;
-
- x = x2;
- y = y2;
add_subwindow(list_title = new BC_Title(x, y, _("Batches to render:")));
- y += 20;
- add_subwindow(batch_list = new BatchRenderList(thread,
- x,
- y,
- get_w() - x - 10,
- get_h() - y - BC_GenericButton::calculate_h() - 15));
-
- y += batch_list->get_h() + 10;
- add_subwindow(start_button = new BatchRenderStart(thread,
- x,
- y));
- x = get_w() / 2 -
- BC_GenericButton::calculate_w(this, _("Stop")) / 2;
- add_subwindow(stop_button = new BatchRenderStop(thread,
- x,
- y));
- x = get_w() -
- BC_GenericButton::calculate_w(this, _("Close")) -
- 10;
- add_subwindow(cancel_button = new BatchRenderCancel(thread,
- x,
- y));
+ y += list_title->get_h() + mwindow->theme->widget_border;
+ y1 = get_h();
+ y1 -= 15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;
+ add_subwindow(batch_list = new BatchRenderList(thread, x, y,
+ get_w() - x - 10, y1 - y));
+ y += batch_list->get_h() + mwindow->theme->widget_border;
+
+ add_subwindow(start_button = new BatchRenderStart(thread, x, y));
+ x = get_w() / 2 - BC_GenericButton::calculate_w(this, _("Stop")) / 2;
+ add_subwindow(stop_button = new BatchRenderStop(thread, x, y));
+ x = get_w() - BC_GenericButton::calculate_w(this, _("Close")) - 10;
+ add_subwindow(cancel_button = new BatchRenderCancel(thread, x, y));
show_window(1);
unlock_window();
int x = mwindow->theme->batchrender_x1;
int y = 5;
- int x1 = mwindow->theme->batchrender_x1;
- int x2 = mwindow->theme->batchrender_x2;
- //int x3 = mwindow->theme->batchrender_x3;
- int y1 = y;
- int y2;
-
- output_path_title->reposition_window(x1, y);
- y += 20;
- format_tools->reposition_window(x, y);
- x2 = x;
- y2 = y + 10;
- y = y1;
- x += format_tools->get_w();
- x1 = x;
- //x3 = x + 80;
-
- x = x1;
+ int x1 = x, x2 = get_w()/2 + 10; // mwindow->theme->batchrender_x2;
+ int y1 = 5, y2 = 5;
+
+// output file
+ output_path_title->reposition_window(x1, y1);
+ y1 += output_path_title->get_h() + mwindow->theme->widget_border;
+ format_tools->reposition_window(x1, y1);
+
+// input EDL
+ x = x2, y = y2;
edl_path_title->reposition_window(x, y);
- y += 20;
+ y += edl_path_title->get_h() + mwindow->theme->widget_border;
edl_path_text->reposition_window(x, y, w - x - 40);
x += edl_path_text->get_w();
edl_path_browse->reposition_window(x, y);
+ y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;
- x = x1;
-// y += 30;
-// status_title->reposition_window(x, y);
-// x = x3;
-// status_text->reposition_window(x, y);
-// x = x1;
-// y += 30;
-// progress_bar->reposition_window(x, y, w - x - 10);
-
- y += 30;
+ x = x2; y = y2;
update_selected_edl->reposition_window(x, y);
y += update_selected_edl->get_h() + mwindow->theme->widget_border;
+ use_current_edl->reposition_window(x, y);
+ y += use_current_edl->get_h() + mwindow->theme->widget_border;
new_batch->reposition_window(x, y);
- x += new_batch->get_w() + 10;
+ x += new_batch->get_w() + mwindow->theme->widget_border;
delete_batch->reposition_window(x, y);
- x = new_batch->get_x();
- y += new_batch->get_h() + mwindow->theme->widget_border;
- use_current_edl->reposition_window(x, y);
- x = x2;
- y = y2;
- int y_margin = get_h() - batch_list->get_h();
+ x = x2; y += delete_batch->get_h() + mwindow->theme->widget_border;
+ savelist_batch->reposition_window(x, y);
+ x += savelist_batch->get_w() + mwindow->theme->widget_border;
+ loadlist_batch->reposition_window(x, y);
+ y += loadlist_batch->get_h() + mwindow->theme->widget_border;
+
+ y1 = 15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;
+ y2 = get_h() - y1 - batch_list->get_h();
+ y2 -= list_title->get_h() + mwindow->theme->widget_border;
+
+ x = mwindow->theme->batchrender_x1; y = y2;
list_title->reposition_window(x, y);
- y += 20;
- batch_list->reposition_window(x, y, w - x - 10, h - y_margin);
+ y += list_title->get_h() + mwindow->theme->widget_border;
+ batch_list->reposition_window(x, y, w - x - 10, h - y - y1);
+ y += batch_list->get_h() + mwindow->theme->widget_border;
- y += batch_list->get_h() + 10;
start_button->reposition_window(x, y);
- x = w / 2 -
- stop_button->get_w() / 2;
+ x = w / 2 - stop_button->get_w() / 2;
stop_button->reposition_window(x, y);
- x = w -
- cancel_button->get_w() -
- 10;
+ x = w - cancel_button->get_w() - 10;
cancel_button->reposition_window(x, y);
return 1;
}
int test_edl_files();
void calculate_dest_paths(ArrayList<char*> *paths,
Preferences *preferences);
-
+ void reset();
// Load batch rendering jobs
void load_jobs(char *path, Preferences *preferences);
// Not applicable to western civilizations
insert_video_plugin("Inverse Telecine", &keyframe);
}
if( use_scale ) {
- sprintf(data,"<PHOTOSCALE WIDTH=%d HEIGHT=%d USE_FILE=1>", BD_WIDTH, BD_HEIGHT);
+ sprintf(data,"<SCALE TYPE=1 X_FACTOR=1 Y_FACTOR=1 "
+ " WIDTH=%d HEIGHT=%d CONSTRAIN=0>", BD_WIDTH, BD_HEIGHT);
keyframe.set_data(data);
- insert_video_plugin("Auto Scale", &keyframe);
+ insert_video_plugin("Scale", &keyframe);
}
if( use_resize_tracks )
resize_tracks();
keyframe.set_data(data);
insert_video_plugin("Histogram", &keyframe);
}
+ mwindow->batch_render->reset();
create_bd_jobs(&mwindow->batch_render->jobs, tmp_path, asset_title);
mwindow->save_backup();
mwindow->undo->update_undo_after(_("create bd"), LOAD_ALL);
vtrk->plugin_set.append(plugin_set);
Edits *edits = vtrk->edits;
for( Edit *edit=edits->first; edit; edit=edit->next ) {
- plugin_set->insert_plugin(title,
+ plugin_set->insert_plugin(_(title),
edit->startproject, edit->length,
PLUGIN_STANDALONE, 0, default_keyframe, 0);
}
resize_tracks()
{
Tracks *tracks = mwindow->edl->tracks;
-#if 0
int max_w = 0, max_h = 0;
for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
if( vtrk->data_type != TRACK_VIDEO ) continue;
if( h > max_h ) max_h = h;
}
}
-#endif
+
for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
if( vtrk->data_type != TRACK_VIDEO ) continue;
if( !vtrk->record ) continue;
- vtrk->track_w = BD_WIDTH; // max_w;
- vtrk->track_h = BD_HEIGHT; // max_h;
+ vtrk->track_w = max_w;
+ vtrk->track_h = max_h;
}
return 0;
}
switch( trk->data_type ) {
case TRACK_VIDEO:
for( Edit *edit=edits->first; edit; edit=edit->next ) {
+ if( edit->silence() ) continue;
Indexable *indexable = edit->get_source();
int w = indexable->get_w();
if( w > max_w ) max_w = w;
for(Plugin *plugin = (Plugin*)trk->plugin_set[i]->first;
plugin;
plugin = (Plugin*)plugin->next) {
- if( !strcmp(plugin->title, "Deinterlace") )
+ if( !strcmp(plugin->title, _("Deinterlace")) )
has_deinterlace = 1;
- if( !strcmp(plugin->title, "Auto Scale") ||
- !strcmp(plugin->title, "Scale") )
+ if( !strcmp(plugin->title, _("Auto Scale")) ||
+ !strcmp(plugin->title, _("Scale")) )
has_scale = 1;
}
}
insert_video_plugin("Inverse Telecine", &keyframe);
}
if( use_scale ) {
- sprintf(data,"<PHOTOSCALE WIDTH=%d HEIGHT=%d USE_FILE=1>", DVD_WIDTH, DVD_HEIGHT);
+ sprintf(data,"<SCALE TYPE=1 X_FACTOR=1 Y_FACTOR=1 "
+ "WIDTH=%d HEIGHT=%d CONSTRAIN=0>", DVD_WIDTH, DVD_HEIGHT);
keyframe.set_data(data);
- insert_video_plugin("Auto Scale", &keyframe);
+ insert_video_plugin("Scale", &keyframe);
}
if( use_resize_tracks )
resize_tracks();
keyframe.set_data(data);
insert_video_plugin("Histogram", &keyframe);
}
+ mwindow->batch_render->reset();
create_dvd_jobs(&mwindow->batch_render->jobs, tmp_path, asset_title);
mwindow->save_backup();
mwindow->undo->update_undo_after(_("create dvd"), LOAD_ALL);
vtrk->plugin_set.append(plugin_set);
Edits *edits = vtrk->edits;
for( Edit *edit=edits->first; edit; edit=edit->next ) {
- plugin_set->insert_plugin(title,
+ plugin_set->insert_plugin(_(title),
edit->startproject, edit->length,
PLUGIN_STANDALONE, 0, default_keyframe, 0);
}
resize_tracks()
{
Tracks *tracks = mwindow->edl->tracks;
-#if 0
int max_w = 0, max_h = 0;
for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
if( vtrk->data_type != TRACK_VIDEO ) continue;
if( h > max_h ) max_h = h;
}
}
-#endif
+
for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
if( vtrk->data_type != TRACK_VIDEO ) continue;
if( !vtrk->record ) continue;
- vtrk->track_w = DVD_WIDTH; // max_w;
- vtrk->track_h = DVD_HEIGHT; // max_h;
+ vtrk->track_w = max_w;
+ vtrk->track_h = max_h;
}
return 0;
}
switch( trk->data_type ) {
case TRACK_VIDEO:
for( Edit *edit=edits->first; edit; edit=edit->next ) {
+ if( edit->silence() ) continue;
Indexable *indexable = edit->get_source();
int w = indexable->get_w();
if( w > max_w ) max_w = w;
for(Plugin *plugin = (Plugin*)trk->plugin_set[i]->first;
plugin;
plugin = (Plugin*)plugin->next) {
- if( !strcmp(plugin->title, "Deinterlace") )
+ if( !strcmp(plugin->title, _("Deinterlace")) )
has_deinterlace = 1;
- if( !strcmp(plugin->title, "Auto Scale") ||
- !strcmp(plugin->title, "Scale") )
+ if( !strcmp(plugin->title, _("Auto Scale")) ||
+ !strcmp(plugin->title, _("Scale")) )
has_scale = 1;
}
}
current = current->next;
}
- if(last && last->silence()) {
+ if(last && last->silence() && !last->transition ) {
delete last;
result = 1;
}
if(!recording)
{
- window->add_subwindow(path_textbox = new FormatPathText(x, y, this));
- x += path_textbox->get_w() + 5;
+ int px = x;
+ window->add_subwindow(path_textbox = new FormatPathText(px, y, this));
+ px += path_textbox->get_w() + 5;
path_recent = new BC_RecentList("PATH", mwindow->defaults,
- path_textbox, 10, x, y, 300, 100);
+ path_textbox, 10, px, y, 300, 100);
window->add_subwindow(path_recent);
path_recent->load_items(File::formattostr(asset->format));
- x += path_recent->get_w() + 8;
+ px += path_recent->get_w() + 8;
window->add_subwindow(path_button = new BrowseButton(
- mwindow, window, path_textbox, x, y, asset->path,
+ mwindow, window, path_textbox, px, y, asset->path,
_("Output to file"), _("Select a file to write to:"), 0));
// Set w for user.
w = MAX(w, 305);
-// w = x + path_button->get_w() + 5;
- x -= path_textbox->get_w() + 5;
y += path_textbox->get_h() + 10;
}
else
window->add_subwindow(format_button = new FormatFormat(x, y, this));
format_button->create_objects();
x += format_button->get_w() + 5;
- window->add_subwindow(ffmpeg_type = new FFMpegType(x, y, 50, 1, asset->fformat));
+ window->add_subwindow(ffmpeg_type = new FFMpegType(x, y+5, 50, 1, asset->fformat));
FFMPEG::set_asset_format(asset, asset->fformat);
x += ffmpeg_type->get_w();
- window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y, this));
+ window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y+5, this));
format_ffmpeg->create_objects();
x = init_x;
y += format_button->get_h() + 10;
int FormatTools::get_w()
{
- return w;
+ return asset->format != FILE_FFMPEG ? w :
+ format_ffmpeg->get_x() + format_ffmpeg->get_w();
}
void FormatTools::set_w(int w)
if(path_textbox)
{
- path_textbox->reposition_window(x, y);
- x += path_textbox->get_w() + 5;
- path_button->reposition_window(x, y);
- x -= path_textbox->get_w() + 5;
- y += 35;
+ int px = x;
+ path_textbox->reposition_window(px, y);
+ px += path_textbox->get_w() + 5;
+ path_recent->reposition_window(px, y);
+ px += path_recent->get_w() + 8;
+ path_button->reposition_window(px, y);
+ y += path_textbox->get_h() + 10;
}
format_title->reposition_window(x, y);
if(prompt_audio) audio_switch->reposition_window(x, y);
x = init_x;
- y += aparams_button->get_h() + 20;
+ y += aparams_button->get_h() + 10;
if(prompt_audio_channels)
{
channels_title->reposition_window(x, y);
MEDIUMFONT,
resources->text_default));
sprintf(string, "%jd", pwindow->thread->preferences->index_size);
- x1 = x + 230;
add_subwindow(isize = new IndexSize(x + 230, y, pwindow, string));
add_subwindow(new ScanCommercials(pwindow, 350,y));
y += 30;
add_subwindow(new BC_Title(x, y, _("Editing"), LARGEFONT, resources->text_default));
+ int y1 = y + 5;
y += 35;
-
- add_subwindow(thumbnails = new ViewThumbnails(x, y, pwindow));
+ add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:")));
+ x1 = x + title->get_w() + 10;
+ keyframe_reticle = new KeyframeReticle(x1, y, &pwindow->thread->preferences->keyframe_reticle);
+ add_subwindow(keyframe_reticle);
+ keyframe_reticle->create_objects();
int x2 = x + 400, y2 = y;
+ add_subwindow(thumbnails = new ViewThumbnails(x2, y1, pwindow));
AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y2);
add_subwindow(android_remote);
y2 += android_remote->get_h() + 10;
return 1;
}
+
+HairlineItem::HairlineItem(KeyframeReticle *popup, int hairline)
+ : BC_MenuItem(popup->hairline_to_string(hairline))
+{
+ this->popup = popup;
+ this->hairline = hairline;
+}
+
+HairlineItem::~HairlineItem()
+{
+}
+
+int HairlineItem::handle_event()
+{
+ popup->set_text(get_text());
+ *(popup->output) = hairline;
+ return 1;
+}
+
+
+KeyframeReticle::KeyframeReticle(int x, int y, int *output)
+ : BC_PopupMenu(x, y, 175, hairline_to_string(*output))
+{
+ this->output = output;
+}
+
+KeyframeReticle::~KeyframeReticle()
+{
+}
+
+const char *KeyframeReticle::hairline_to_string(int type)
+{
+ switch( type ) {
+ case HAIRLINE_NEVER: return _("Never");
+ case HAIRLINE_DRAGGING: return _("Dragging");
+ case HAIRLINE_ALWAYS: return _("Always");
+ }
+ return _("Unknown");
+}
+
+void KeyframeReticle::create_objects()
+{
+ add_item(new HairlineItem(this, HAIRLINE_NEVER));
+ add_item(new HairlineItem(this, HAIRLINE_DRAGGING));
+ add_item(new HairlineItem(this, HAIRLINE_ALWAYS));
+}
+
class UseTipWindow;
class StillImageUseDuration;
class StillImageDuration;
+class KeyframeReticle;
#include "browsebutton.h"
#include "deleteallindexes.inc"
ViewBehaviourText *button1, *button2, *button3;
ViewThumbnails *thumbnails;
ShBtnEditDialog *shbtn_dialog;
+ KeyframeReticle *keyframe_reticle;
};
PreferencesWindow *pwindow;
};
+class KeyframeReticle : public BC_PopupMenu
+{
+public:
+ KeyframeReticle(int x, int y, int *output);
+ ~KeyframeReticle();
+
+ const char* hairline_to_string(int type);
+ void create_objects();
+ int *output;
+};
+
+class HairlineItem : public BC_MenuItem
+{
+public:
+ HairlineItem(KeyframeReticle *popup, int hairline);
+ ~HairlineItem();
+
+ KeyframeReticle *popup;
+ int handle_event();
+ int hairline;
+};
#endif
}
ClearDefaultKeyframe::ClearDefaultKeyframe(MWindow *mwindow)
- : BC_MenuItem(_("Clear default keyframe"), _("Alt-Del"), BACKSPACE)
+ : BC_MenuItem(_("Clear default keyframe"), _("Alt-Del"), DELETE)
{
set_alt();
this->mwindow = mwindow;
}
Clear::Clear(MWindow *mwindow)
- : BC_MenuItem(_("Clear"), _("Del"), BACKSPACE)
+ : BC_MenuItem(_("Clear"), _("Del"), DELETE)
{
this->mwindow = mwindow;
}
swindow_w = 600;
swindow_h = 400;
- batchrender_w = 540;
- batchrender_h = 340;
+ batchrender_w = 750;
+ batchrender_h = 400;
batchrender_x = root_w / 2 - batchrender_w / 2;
batchrender_y = root_h / 2 - batchrender_h / 2;
}
}
// if just opening one new resource in replace mode
- if( load_mode == LOADMODE_REPLACE && new_edls.size() == 1 &&
- ftype != FILE_IS_XML )
- {
+ if( ftype != FILE_IS_XML &&
+ ( load_mode == LOADMODE_REPLACE ||
+ load_mode == LOADMODE_REPLACE_CONCATENATE ) ) {
select_asset(0, 0);
edl->local_session->preview_start = 0;
edl->local_session->preview_end = edl->tracks->total_playable_length();
// Index of vwindow that always exists
#define DEFAULT_VWINDOW 0
+// keyframe reticle
+#define HAIRLINE_NEVER 0
+#define HAIRLINE_DRAGGING 1
+#define HAIRLINE_ALWAYS 2
+
class MWindow;
#if 0
if(pane[i]) result |= pane[i]->canvas->drag_stop(
&redraw);
}
-
+ mwindow->edl->optimize();
// since we don't have subwindows we have to terminate any drag operation
if(result)
index_size = 0x400000;
index_count = 500;
use_thumbnails = 1;
+ keyframe_reticle = HAIRLINE_DRAGGING;
trap_sigsegv = 1;
trap_sigintr = 1;
theme[0] = 0;
index_size = that->index_size;
index_count = that->index_count;
use_thumbnails = that->use_thumbnails;
+ keyframe_reticle = that->keyframe_reticle;
strcpy(theme, that->theme);
use_tipwindow = that->use_tipwindow;
index_size = defaults->get("INDEX_SIZE", index_size);
index_count = defaults->get("INDEX_COUNT", index_count);
use_thumbnails = defaults->get("USE_THUMBNAILS", use_thumbnails);
+ keyframe_reticle = defaults->get("KEYFRAME_RETICLE", keyframe_reticle);
trap_sigsegv = defaults->get("TRAP_SIGSEGV", trap_sigsegv);
trap_sigintr = defaults->get("TRAP_SIGINTR", trap_sigintr);
defaults->update("INDEX_SIZE", index_size);
defaults->update("INDEX_COUNT", index_count);
defaults->update("USE_THUMBNAILS", use_thumbnails);
+ defaults->update("KEYFRAME_RETICLE", keyframe_reticle);
defaults->update("TRAP_SIGSEGV", trap_sigsegv);
defaults->update("TRAP_SIGINTR", trap_sigintr);
// defaults->update("GLOBAL_PLUGIN_DIR", global_plugin_dir);
int index_count;
// Use thumbnails in AWindow assets.
int use_thumbnails;
+ int keyframe_reticle;
int trap_sigsegv;
int trap_sigintr;
// Title of theme
int64_t edit_x, edit_y, edit_w, edit_h;
edit_dimensions(edit, edit_x, edit_y, edit_w, edit_h);
- if(cursor_x >= edit_x &&
- cursor_y >= edit_y &&
- cursor_x < edit_x + edit_w &&
- cursor_y < edit_y + edit_h)
- {
+ if( cursor_x >= edit_x && cursor_x < edit_x + edit_w &&
+ cursor_y >= edit_y && cursor_y < edit_y + edit_h ) {
*over_edit = edit;
break;
}
+ if( edit != track->edits->last ) continue;
+ if( edit->silence() ) continue;
+ if( mwindow->session->current_operation != DRAG_ATRANSITION &&
+ mwindow->session->current_operation != DRAG_VTRANSITION ) continue;
+ if( cursor_x >= edit_x + edit_w &&
+ cursor_y >= edit_y && cursor_y < edit_y + edit_h ) {
+ // add silence to allow drag transition past last edit
+ // will be deleted by Edits::optimize if not used
+ double length = mwindow->edl->session->default_transition_length;
+ int64_t start = edit->startproject+edit->length;
+ int64_t units = track->to_units(length, 1);
+ track->edits->create_silence(start, start+units);
+ }
}
for(int i = 0; i < track->plugin_set.total; i++)
return result;
}
+void TrackCanvas::draw_keyframe_reticle()
+{
+ int keyframe_hairline = mwindow->preferences->keyframe_reticle;
+ if( keyframe_hairline == HAIRLINE_NEVER ) return;
+
+ int current_op = mwindow->session->current_operation, dragging = 0;
+ for( int i=0; !dragging && i<AUTOMATION_TOTAL; ++i )
+ if( current_op == auto_operations[i] ) dragging = 1;
+
+ if( keyframe_hairline == HAIRLINE_DRAGGING && dragging ) {
+ if( mwindow->session->drag_auto && get_buttonpress() == 1 ) {
+ draw_hairline(mwindow->session->drag_auto, RED);
+ return;
+ }
+ }
+
+ if( keyframe_hairline == HAIRLINE_ALWAYS || ( get_buttonpress() == 2 &&
+ keyframe_hairline == HAIRLINE_DRAGGING && dragging ) ) {
+ for( Track *track = mwindow->edl->tracks->first; track;
+ track=track->next ) {
+ Automation *automation = track->automation;
+ for( int i=0; i<AUTOMATION_TOTAL; ++i ) {
+ if( !mwindow->edl->session->auto_conf->autos[i] ) continue;
+ // automation visible
+ Autos *autos = automation->autos[i];
+ if( !autos ) continue;
+ for( Auto *auto_keyframe=autos->first; auto_keyframe;
+ auto_keyframe = auto_keyframe->next ) {
+ draw_hairline(auto_keyframe, GREEN);
+ }
+ }
+
+ if( dragging && mwindow->session->drag_auto ) {
+ draw_hairline(mwindow->session->drag_auto, RED);
+ }
+ }
+ }
+}
+
void TrackCanvas::draw_auto(Auto *current,
int x,
int y,
return result;
}
+int TrackCanvas::draw_hairline(Auto *auto_keyframe, int color)
+{
+ Track *track = auto_keyframe->autos->track;
+ int autogrouptype = auto_keyframe->autos->get_type();
+
+ int center_pixel;
+ double view_start, unit_start;
+ double view_end, unit_end, yscale;
+ double zoom_sample, zoom_units;
+
+ calculate_viewport(track, view_start, unit_start, view_end, unit_end,
+ yscale, center_pixel, zoom_sample, zoom_units);
+
+ double ax = 0, ay = 0;
+ calculate_auto_position(&ax, &ay, 0, 0, 0, 0,
+ auto_keyframe, unit_start, zoom_units, yscale, autogrouptype);
+
+ set_color(color);
+ draw_line(ax, 0, ax, get_h());
+ return 0;
+}
+
void TrackCanvas::draw_overlays()
{
int new_cursor, update_cursor, rerender;
// Playback cursor
draw_playback_cursor();
+ draw_keyframe_reticle();
+
show_window(0);
}
void draw_highlight_insertion(int x, int y, int w, int h);
void draw_playback_cursor();
void draw_highlighting();
+ void draw_keyframe_reticle();
+ int draw_hairline(Auto *auto_keyframe, int color);
+
// User can either call draw or draw_overlays to copy a fresh
// canvas and just draw the overlays over it
void draw_overlays();
return 0;
}
-#define COMPOSITE_TEXT "Composite"
-#define SVIDEO_TEXT "S-Video"
+#define COMPOSITE_TEXT _("Composite")
+#define SVIDEO_TEXT _("S-Video")
#define BUZ_COMPOSITE 0
#define BUZ_SVIDEO 1
endif
ifeq ($(HAVE_ESOUND), y)
-ESOUND_DIR := $(THIRDPARTY)/esound
-AUDIOFILE_DIR := $(THIRDPARTY)/audiofile
-ESOUNDCFLAGS = -DHAVE_ESOUND -I$(ESOUND_DIR) -I$(AUDIOFILE_DIR)
-ESOUNDLIBS = $(ESOUND_DIR)/$(OBJDIR)/libesound.a
+CFLAGS += -DHAVE_ESOUND
endif
#CFLAGS += -g
inc_a52dec="include"
add_library a52dec \
liba52/.libs/liba52.a
-inc_audiofile="."
+inc_audiofile="libaudiofile"
add_library audiofile \
libaudiofile/.libs/libaudiofile.a \
libaudiofile/modules/.libs/libmodules.a \