FloatAuto *previous = 0, *next = 0;
double unit_position = mwindow->edl->local_session->get_selectionstart(1);
unit_position = mwindow->edl->align_to_frame(unit_position, 0);
- unit_position = atrack->to_units(unit_position, 0);
+ int64_t unit_pos = atrack->to_units(unit_position, 0);
FloatAutos *ptr = (FloatAutos*)atrack->automation->autos[AUTOMATION_FADE];
- float value = ptr->get_value((long)unit_position, PLAY_FORWARD, previous, next);
+ float value = ptr->get_value(unit_pos, PLAY_FORWARD, previous, next);
fade->update(fade->get_w(), value,
mwindow->edl->local_session->automation_mins[AUTOGROUPTYPE_AUDIO_FADE],
mwindow->edl->local_session->automation_maxs[AUTOGROUPTYPE_AUDIO_FADE]);
vicon_frame = 0;
in_use = 1;
comments_time = 0;
+ comments_rate = -1;
+ comments_ffmt = ' ';
+ comments_type = "";
id = 0;
persistent = 0;
}
}
struct stat st;
comments_time = !stat(asset->path, &st) ? st.st_mtime : 0;
+ comments_rate = asset->get_frame_rate();
+ comments_ffmt = asset->format == FILE_FFMPEG ? '=' : '-';
+ comments_type = asset->format == FILE_FFMPEG ?
+ asset->vcodec : File::formattostr(asset->format);
}
else
if( indexable && !indexable->is_asset ) {
continue;
}
if( picon->indexable && picon->indexable->is_asset ) {
+ Asset *asset = (Asset *)picon->indexable;
struct stat st;
- picon->comments_time = !stat(picon->indexable->path, &st) ?
- st.st_mtime : 0;
+ picon->comments_time = !stat(asset->path, &st) ? st.st_mtime : 0;
+ picon->comments_rate = asset->get_frame_rate();
+ picon->comments_ffmt = asset->format == FILE_FFMPEG ? '=' : '-';
+ picon->comments_type = asset->format == FILE_FFMPEG ?
+ asset->vcodec : File::formattostr(asset->format);
}
}
}
else if( picon->comments_time ) {
char date_time[BCSTRLEN];
struct tm stm; localtime_r(&picon->comments_time, &stm);
- sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d",
+ sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d @%0.2f %c%s",
stm.tm_year+1900, stm.tm_mon+1, stm.tm_mday,
- stm.tm_hour, stm.tm_min, stm.tm_sec);
+ stm.tm_hour, stm.tm_min, stm.tm_sec,
+ picon->comments_rate, picon->comments_ffmt,
+ picon->comments_type);
dst[1].append(item2 = new BC_ListBoxItem(date_time));
}
else
int in_use;
int persistent;
time_t comments_time;
+ int comments_ffmt;
+ double comments_rate;
+ const char *comments_type;
double sort_key;
PluginServer *plugin;
Label *label;
{
ColorWindow *gui = (ColorWindow *)get_gui();
if( !gui ) return;
- gui->lock_window();
+ gui->lock_window("ColorPicker::update_gui");
this->output = output;
this->alpha = alpha;
gui->change_values();
void CWindowMaskGUI::update_preview()
{
+ unlock_window();
CWindowGUI *cgui = mwindow->cwindow->gui;
cgui->lock_window("CWindowMaskGUI::update_preview");
cgui->sync_parameters(CHANGE_PARAMS, 0, 1);
cgui->unlock_window();
+ lock_window("CWindowMaskGUI::update_preview");
}
int edit_labels, int edit_autos, int edit_plugins, Edits *trim_edits)
{
int64_t cut_length = newposition - oldposition;
+ int rest_moved = edit_mode == MOVE_RIPPLE || edit_mode == MOVE_EDGE ? 1 : 0;
if( cut_length > length )
cut_length = length;
else if( cut_length < -length )
int64_t start = startproject, end = start + length;
Edit *prev = this->previous, *next = this->next;
- int edits_moved = 0, rest_moved = 0;
+ int edits_moved = 0;
switch( edit_mode ) {
case MOVE_RIPPLE:
- edits_moved = rest_moved = 1;
+ edits_moved = 1;
startsource += cut_length;
cut_length = -cut_length;
length += cut_length;
}
break;
case MOVE_EDGE:
- edits_moved = rest_moved = 1;
+ edits_moved = 1;
startsource -= cut_length;
length += cut_length;
for( Edit *edit=next; edit; edit=edit->next )
int edit_labels, int edit_autos, int edit_plugins, Edits *trim_edits)
{
int64_t cut_length = newposition - oldposition;
- if( cut_length > length )
- cut_length = length;
+ int rest_moved = edit_mode == MOVE_RIPPLE || edit_mode == MOVE_EDGE ? 1 : 0;
+ if( cut_length > length ) {
+ if( !rest_moved ) cut_length = length;
+ }
else if( cut_length < -length )
cut_length = -length;
int64_t start = startproject, end = start + length;
Edit *prev = this->previous, *next = this->next;
- int edits_moved = 0, rest_moved = 0;
+ int edits_moved = 0;
switch( edit_mode ) {
case MOVE_RIPPLE:
case MOVE_EDGE:
- rest_moved = 1;
length += cut_length;
for( Edit *edit=next; edit; edit=edit->next )
edit->startproject += cut_length;
: BC_DialogThread()
{
this->mwindow = mwindow;
- plugin = 0;
+ this->plugin = 0;
+ this->plugin_type = PLUGIN_NONE;
}
PluginDialogThread::~PluginDialogThread()
mwindow->session->plugindialog_w / 2;
int y = mwindow->gui->get_abs_cursor_y(0) -
mwindow->session->plugindialog_h / 2;
- plugin_type = 0;
+ plugin_type = PLUGIN_NONE;
PluginDialog *window = new PluginDialog(mwindow,
this,
window_title,
}
+void PluginDialog::clear_selection()
+{
+ standalone_list->set_all_selected(&standalone_data, 0);
+ standalone_list->draw_items(1);
+ shared_list->set_all_selected(&shared_data, 0);
+ shared_list->draw_items(1);
+ module_list->set_all_selected(&module_data, 0);
+ module_list->draw_items(1);
+ selected_available = -1;
+ selected_shared = -1;
+ selected_modules = -1;
+ thread->plugin = 0;
+ thread->plugin_type = PLUGIN_NONE;
+}
+
void PluginDialog::apply()
{
if( selected_available >= 0 ) {
int PluginDialogApply::handle_event()
{
dialog->apply();
+ dialog->clear_selection();
return 1;
}
void save_settings();
int resize_event(int w, int h);
void load_plugin_list(int redraw);
+ void clear_selection();
void apply();
BC_Title *standalone_title;
delete fade; fade = 0;
}
else {
- fade->update(fade->get_w(), mwindow->get_float_auto(this, AUTOMATION_FADE)->get_value(),
+ FloatAuto *previous = 0, *next = 0;
+ double unit_position = mwindow->edl->local_session->get_selectionstart(1);
+ int64_t unit_pos = vtrack->to_units(unit_position, 0);
+ FloatAutos *ptr = (FloatAutos*)track->automation->autos[AUTOMATION_FADE];
+ float value = ptr->get_value(unit_pos, PLAY_FORWARD, previous, next);
+ fade->update(fade->get_w(), value,
mwindow->edl->local_session->automation_mins[AUTOGROUPTYPE_VIDEO_FADE],
mwindow->edl->local_session->automation_maxs[AUTOGROUPTYPE_VIDEO_FADE]);
}
wnext()
{
int v = 0, n = 0, ch = next();
- if( ch == '\\' ) {
- switch( (ch=next()) ) {
- case 'n': return '\n';
- case 't': return '\t';
- case 'r': return '\r';
- case 'b': return '\b';
- case 'f': return '\f';
- case 'v': return '\v';
- case 'a': return '\a';
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- v = ch - '0';
- for( int i=3; --i>0; v=v*8+ch, next() )
- if( (ch=cur()-'0') < 0 || ch >= 8 ) break;
- return v;
- case 'x': n = 2; break;
- case 'u': n = 4; break;
- case 'U': n = 8; break;
- default: return ch;
- }
- for( int i=n; --i>=0; v=v*16+ch, next() ) {
- if( (ch=cur()-'0')>=0 && ch<10 ) continue;
- if( (ch-='A'-'0'-10)>=10 && ch<16 ) continue;
- if( (ch-='a'-'A')<10 || ch>=16 ) break;
- }
- }
- else if( ch >= 0x80 ) {
+ if( ch >= 0x80 ) {
static const unsigned char byts[] = {
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5,
};
if( cpus > smps ) cpus = smps;
engine = new HistogramEngine(this, cpus, cpus);
}
-// Always plot to set the curves if automatic
- if(config.plot || config.automatic) send_render_gui(frame);
+// if to plot histogram
+ if(config.plot) send_render_gui(frame);
// Generate tables here. The same table is used by many packages to render
// each horizontal stripe. Need to cover the entire output range in each
int ich;
while( (ich=wnext()) >= 0 ) {
if( ich == '\\' ) {
- if( (ich=wnext()) == '\n' ) continue;
+ if( (ich=wnext()) < 0 ) break;
+ if( !ich || ich == '\n' ) continue;
wch = ich;
return 0;
}
{
if( result ) {
handle_new_color(orig_color, orig_alpha);
+ window->lock_window("TitleColorButton::handle_done_event");
update_gui(orig_color);
+ window->unlock_window();
}
}