edit->startproject, edit->length,
PLUGIN_STANDALONE, 0, &keyframe, 0);
}
+ vtrk->optimize();
}
}
edit->startproject, edit->length,
PLUGIN_STANDALONE, 0, default_keyframe, 0);
}
+ vtrk->optimize();
}
return 0;
}
BC_TumbleTextBox::create_objects();
}
-int FFMpegConfigNum::update_text(const char *text)
+int FFMpegConfigNum::update_param(const char *param, const char *opts)
{
- BC_TumbleTextBox::update(text);
- return handle_event();
+ char value[BCTEXTLEN];
+ if( !FileFFMPEG::get_ff_option(param, opts, value) ) {
+ if( (*output = atol(value)) < 0 ) {
+ disable(1);
+ return 0;
+ }
+ BC_TumbleTextBox::update(value);
+ }
+ enable();
+ return 1;
}
int FFMpegConfigNum::handle_event()
add_subwindow(new BC_OKButton(this));
add_subwindow(new BC_CancelButton(this));
- char value[BCTEXTLEN];
- if( !FileFFMPEG::get_ff_option("cin_bitrate", asset->ff_audio_options, value) )
- bitrate->update_text(value);
+ bitrate->update_param("cin_bitrate", asset->ff_audio_options);
show_window(1);
bitrate->handle_event();
popup->audio_options->update(asset->ff_audio_options);
popup->audio_options->set_text_row(0);
- char value[BCTEXTLEN];
- if( !FileFFMPEG::get_ff_option("cin_bitrate", asset->ff_audio_options, value) )
- popup->bitrate->update_text(value);
+ popup->bitrate->update_param("cin_bitrate", asset->ff_audio_options);
return 1;
}
add_subwindow(new BC_OKButton(this));
add_subwindow(new BC_CancelButton(this));
- char value[BCTEXTLEN];
- if( !FileFFMPEG::get_ff_option("cin_quality", asset->ff_video_options, value) )
- quality->update_text(value);
- if( !FileFFMPEG::get_ff_option("cin_bitrate", asset->ff_video_options, value) )
- bitrate->update_text(value);
+ bitrate->update_param("cin_bitrate", asset->ff_video_options);
+ quality->update_param("cin_quality", asset->ff_video_options);
show_window(1);
if( asset->ff_video_bitrate )
popup->video_options->update(asset->ff_video_options);
popup->video_options->set_text_row(0);
- char value[BCTEXTLEN];
- if( !FileFFMPEG::get_ff_option("cin_quality", asset->ff_video_options, value) ) {
- popup->quality->update_text(value);
- }
- if( !FileFFMPEG::get_ff_option("cin_bitrate", asset->ff_video_options, value) )
- popup->bitrate->update_text(value);
+ popup->bitrate->update_param("cin_bitrate", asset->ff_video_options);
+ popup->quality->update_param("cin_quality", asset->ff_video_options);
return 1;
}
~FFMpegConfigNum();
void create_objects();
- int update_text(const char *text);
+ int update_param(const char *param, const char *opts);
int handle_event();
int *output;
BC_Window *window;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
MainTransport::MainTransport(MWindow *mwindow, MButtons *mbuttons, int x, int y)
: PlayTransport(mwindow, mbuttons, x, y)
{
}
MainEditing::MainEditing(MWindow *mwindow, MButtons *mbuttons, int x, int y)
- : EditPanel(mwindow,
- mbuttons,
- x,
- y,
- mwindow->edl->session->editing_mode,
- 1,
- 1,
- 0,
- 0,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1, // locklabels
- 1,
- 1,
- 0,
- 1,
- 1,
- mwindow->has_commercials())
+ : EditPanel(mwindow, mbuttons, x, y, mwindow->edl->session->editing_mode,
+ 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, // locklabels
+ 1, 1, 0, 1, 1, mwindow->has_commercials())
{
this->mwindow = mwindow;
this->mbuttons = mbuttons;
int x = w - MainShBtns::calculate_w(0);
mainmenu->resize_event(x, mainmenu->get_h());
mainshbtns->reposition_window(x, -1);
+ ffmpeg_toggle->reposition_window(menu_w(), menu_h()+2);
mwindow->theme->get_mwindow_sizes(this, w, h);
mwindow->theme->draw_mwindow_bg(this);
mbuttons->resize_event();
- ffmpeg_toggle->reposition_window(menu_w(), menu_h()+2);
statusbar->resize_event();
zoombar->resize_event();
mwindow->theme->mzoom_y + 1 - mwindow->theme->get_image_set("pane")[0]->get_h());
resource_thread->start_draw();
+ flash(1);
return 0;
}
{
reposition_window(mwindow->theme->mzoom_x, mwindow->theme->mzoom_y,
mwindow->theme->mzoom_w, mwindow->theme->mzoom_h);
+ draw_top_background(get_parent(), 0, 0, get_w(), get_h());
}
void ZoomBar::redraw_time_dependancies()
color_trc=bt2020_12bit
pixel_format=yuv422p12
x265-params=output-depth=12
-
+cin_quality=-1
mp4 libx265
crf=5
+cin_quality=-1
mp4 libx265
# lossy but faster
crf=25
+cin_quality=-1
mp4 libx265
# visually lossless
crf=18
+cin_quality=-1
mp4 libx265
+cin_quality=-1
{
if( active ) {
active = 0;
+ text_selected = word_selected = line_selected = 0;
top_level->set_active_subwindow(0);
top_level->unset_repeat(top_level->get_resources()->blink_rate);
}
return textbox->get_h();
}
-void BC_TumbleTextBox::disable()
+void BC_TumbleTextBox::disable(int hide_text)
{
+ if( hide_text && !textbox->is_hidden() )
+ textbox->hide_window(0);
+ if( !tumbler->is_hidden() )
+ tumbler->hide_window(0);
if( !get_enabled() ) return;
- tumbler->hide_window(0);
return textbox->disable();
}
void BC_TumbleTextBox::enable()
{
+ if( textbox->is_hidden() )
+ textbox->show_window(0);
+ if( tumbler->is_hidden() )
+ tumbler->show_window(0);
if( get_enabled() ) return;
- tumbler->show_window(0);
return textbox->enable();
}
int get_y();
int get_w();
int get_h();
- void disable();
+ void disable(int hide_text=0);
void enable();
int get_enabled();
void reposition_window(int x, int y);
last_lock_title = title;
last_lock_location = loc;
lock_item *it;
- if( lock_table.size >= TOTAL_LOCKS ) {
+ if( (it=(lock_item*)lock_free.first) != 0 )
+ lock_free.remove_pointer(it);
+ else if( lock_table.size >= TOTAL_LOCKS ) {
it = (lock_item*)lock_table.first;
lock_table.remove_pointer(it);
}
- else if( (it=(lock_item*)lock_free.first) != 0 )
- lock_free.remove_pointer(it);
else
it = new lock_item();
it->set(info, title, loc);
new BC_Title(x1=x2, y1=y, _("Frame number:")));
add_subwindow(track_frame_number =
new TrackFrameNumber(plugin, this, x1 += title->get_w(), y1));
+ if( plugin->config.mode3 != MotionCVConfig::TRACK_SINGLE )
+ track_frame_number->disable();
+
add_subwindow(addtrackedframeoffset =
new AddTrackedFrameOffset(plugin, this, x1=x2, y1+=track_frame_number->get_h()));
int pef = client->server->mwindow->edl->session->video_every_frame;
{
this->plugin = plugin;
this->gui = gui;
- if( plugin->config.mode3 != MotionCVConfig::TRACK_SINGLE )
- disable();
}
int TrackFrameNumber::handle_event()
this,
x + track_single->get_w() + title->get_w() + 20,
y));
+ if(plugin->config.tracking_object != MotionHVScan::TRACK_SINGLE)
+ track_frame_number->disable();
y += 20;
add_subwindow(track_previous = new TrackPreviousFrame(plugin,
{
this->plugin = plugin;
this->gui = gui;
- if(plugin->config.tracking_object != MotionHVScan::TRACK_SINGLE) disable();
}
int TrackFrameNumber::handle_event()
new BC_Title(x1=x2, y1, _("Frame number:")));
add_subwindow(track_frame_number =
new TrackFrameNumber(plugin, this, x1 += title->get_w(), y1));
+ if(plugin->config.tracking_object != MotionScan::TRACK_SINGLE)
+ track_frame_number->disable();
+
add_subwindow(addtrackedframeoffset =
new AddTrackedFrameOffset(plugin, this, x1=x2, y1+=track_frame_number->get_h()));
int pef = client->server->mwindow->edl->session->video_every_frame;
{
this->plugin = plugin;
this->gui = gui;
- if(plugin->config.tracking_object != MotionScan::TRACK_SINGLE) disable();
}
int TrackFrameNumber::handle_event()
this,
x + track_single->get_w() + title->get_w() + 20,
y));
+ if(plugin->config.tracking_object != MotionScan::TRACK_SINGLE)
+ track_frame_number->disable();
y += 20;
add_subwindow(track_previous = new TrackPreviousFrame(plugin,
{
this->plugin = plugin;
this->gui = gui;
- if(plugin->config.tracking_object != MotionScan::TRACK_SINGLE) disable();
}
int TrackFrameNumber::handle_event()