+ this->view_dialog = view_dialog;
+ format_options = 0;
+ format_name = asset->fformat;
+ codec_name = 0;
+}
+
+FFMPEGConfigFormat::~FFMPEGConfigFormat()
+{
+ lock_window("FFMPEGConfigFormat::~FFMPEGConfigFormat");
+ delete format_options;
+ unlock_window();
+}
+
+void FFMPEGConfigFormat::read_options()
+{
+ const char *options = format_options->get_text();
+ int options_len = strlen(options);
+ ff_options_dialog->load_options(options, options_len);
+}
+void FFMPEGConfigFormat::save_options()
+{
+ char options[BCTEXTLEN];
+ ff_options_dialog->store_options(options, sizeof(options)-1);
+ format_options->update(options);
+}
+void FFMPEGConfigFormat::save_changes()
+{
+ read_options();
+ char *options = asset->ff_format_options;
+ int options_len = sizeof(asset->ff_format_options)-1;
+ ff_options_dialog->store_options(options, options_len);
+}
+
+void FFMPEGConfigFormat::load_options()
+{
+ Asset *asset = view_dialog->view_format->asset;
+ EDL *edl = view_dialog->view_format->edl;
+ FFMPEG::load_format_options(asset, edl);
+}
+
+void FFMPEGConfigFormat::create_objects()
+{
+ int x = xS(10), y = yS(10);
+ lock_window("FFMPEGConfigFormat::create_objects");
+ Asset *asset = view_dialog->view_format->asset;
+ BC_Title *title;
+ add_subwindow(title = new BC_Title(x, y, _("Format:")));
+ int x1 = x + title->get_w() + 8;
+ add_subwindow(new BC_Title(x1, y, asset->fformat));
+ y += yS(25);
+
+ add_subwindow(title = new BC_Title(x, y, _("Format Options:")));
+
+ ff_options_dialog = new FFOptionsFormatDialog(this);
+ x1 = x + title->get_w() + 8;
+ add_subwindow(new FFOptionsFormatView(this, x1, y, _("view")));
+
+ y += yS(25);
+ format_options = new FFFormatOptions(this, x, y, get_w()-x-xS(20), 8,
+ sizeof(asset->ff_format_options)-1, asset->ff_format_options);
+ format_options->create_objects();
+ add_subwindow(new BC_OKButton(this));
+ add_subwindow(new BC_CancelButton(this));
+ show_window(1);
+ unlock_window();