#include "filesystem.h"
#include "formattools.h"
#include "language.h"
+#ifdef HAVE_DV
#include "libdv.h"
+#endif
#include "libmjpeg.h"
#include "maxchannels.h"
#include "mwindow.h"
this->mwindow = mwindow;
this->window = window;
this->asset = asset;
- this->plugindb = mwindow->plugindb;
aparams_button = 0;
vparams_button = 0;
aparams_thread = 0;
vparams_thread = 0;
- channels_tumbler = 0;
audio_switch = 0;
video_switch = 0;
path_textbox = 0;
format_text = 0;
audio_title = 0;
video_title = 0;
- channels_title = 0;
- channels_button = 0;
- multiple_files = 0;
+ labeled_files = 0;
w = window->get_w();
recording = 0;
SET_TRACE
if(vparams_thread) delete vparams_thread;
SET_TRACE
- if(channels_tumbler) delete channels_tumbler;
}
void FormatTools::create_objects(
format_button->create_objects();
x += format_button->get_w() + 5;
window->add_subwindow(ffmpeg_type = new FFMpegType(x, y, 70, 1, asset->fformat));
- FFMPEG::set_asset_format(asset, asset->fformat);
+ FFMPEG::set_asset_format(asset, mwindow->edl, asset->fformat);
x += ffmpeg_type->get_w();
window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y, this));
format_ffmpeg->create_objects();
ylev = y;
y += aparams_button->get_h() + 10;
-// Audio channels only used for recording.
-// if(prompt_audio_channels)
-// {
-// window->add_subwindow(channels_title = new BC_Title(x, y, _("Number of audio channels to record:")));
-// x += 260;
-// window->add_subwindow(channels_button = new FormatChannels(x, y, this));
-// x += channels_button->get_w() + 5;
-// window->add_subwindow(channels_tumbler = new BC_ITumbler(channels_button, 1, MAXCHANNELS, x, y));
-// y += channels_button->get_h() + 20;
-// x = init_x;
-// }
-
//printf("FormatTools::create_objects 6\n");
aparams_thread = new FormatAThread(this);
}
x = init_x;
if( file_per_label ) {
- multiple_files = new FormatMultiple(mwindow, x, y, file_per_label);
- window->add_subwindow(multiple_files);
- y += multiple_files->get_h() + 10;
+ labeled_files = new FormatFilePerLabel(this, x, y, file_per_label);
+ window->add_subwindow(labeled_files);
+ y += labeled_files->get_h() + 10;
}
//printf("FormatTools::create_objects 12\n");
format_text->update(File::formattostr(asset->format));
switch(driver) {
+#ifdef HAVE_DV
case CAPTURE_IEC61883:
case CAPTURE_FIREWIRE:
locked_compressor = (char*)CODEC_TAG_DVSD;
break;
-
+#endif
case VIDEO4LINUX2JPEG:
locked_compressor = (char*)CODEC_TAG_MJPEG;
break;
{
this->asset = asset;
this->file_per_label = file_per_label;
- if( file_per_label ) multiple_files->update(file_per_label);
+ if( file_per_label ) labeled_files->update(file_per_label);
if( path_textbox ) path_textbox->update(asset->path);
format_text->update(File::formattostr(asset->format));
update_format();
x = init_x;
y += aparams_button->get_h() + 10;
- if(prompt_audio_channels)
- {
- channels_title->reposition_window(x, y);
- x += 260;
- channels_button->reposition_window(x, y);
- x += channels_button->get_w() + 5;
- channels_tumbler->reposition_window(x, y);
- y += channels_button->get_h() + 20;
- x = init_x;
- }
}
}
if( file_per_label ) {
- multiple_files->reposition_window(x, y);
- y += multiple_files->get_h() + 10;
+ labeled_files->reposition_window(x, y);
+ y += labeled_files->get_h() + 10;
}
init_y = y;
int FormatAParams::handle_event()
{
format->set_audio_options();
+ format->handle_event();
return 1;
}
int FormatVParams::handle_event()
{
format->set_video_options();
+ format->handle_event();
return 1;
}
int FormatAudio::handle_event()
{
format->asset->audio_data = get_value();
+ format->handle_event();
return 1;
}
int FormatVideo::handle_event()
{
format->asset->video_data = get_value();
+ format->handle_event();
return 1;
}
load_items(File::formattostr(format->asset->format));
format->update_format();
}
+ format->handle_event();
}
return 1;
}
FormatFFMPEG::FormatFFMPEG(int x, int y, FormatTools *format)
- : FFMPEGPopup(format->plugindb, x, y)
+ : FFMPEGPopup(x, y)
{
this->format = format;
}
format->ffmpeg_type->update(text);
format->asset->ff_audio_options[0] = 0;
format->asset->ff_video_options[0] = 0;
- FFMPEG::set_asset_format(format->asset, text);
+ FFMPEG::set_asset_format(format->asset, format->mwindow->edl, text);
format->update_extension();
format->close_format_windows();
format->update_format();
+ format->handle_event();
}
return 1;
}
-
-
-FormatChannels::FormatChannels(int x, int y, FormatTools *format)
- : BC_TextBox(x, y, 100, 1, format->asset->channels)
-{
- this->format = format;
-}
-
-FormatChannels::~FormatChannels()
-{
-}
-
-int FormatChannels::handle_event()
-{
- format->asset->channels = atol(get_text());
- return 1;
-}
-
-
-FormatToTracks::FormatToTracks(int x, int y, int *output)
- : BC_CheckBox(x, y, *output, _("Overwrite project with output"))
-{
- this->output = output;
-}
-
-FormatToTracks::~FormatToTracks()
-{
-}
-
-int FormatToTracks::handle_event()
-{
- *output = get_value();
- return 1;
-}
-
-
-FormatMultiple::FormatMultiple(MWindow *mwindow, int x, int y, int *output)
+FormatFilePerLabel::FormatFilePerLabel(FormatTools *format,
+ int x, int y, int *output)
: BC_CheckBox(x, y, *output, _("Create new file at each label"))
{
+ this->format = format;
this->output = output;
- this->mwindow = mwindow;
}
-FormatMultiple::~FormatMultiple()
+FormatFilePerLabel::~FormatFilePerLabel()
{
}
-int FormatMultiple::handle_event()
+int FormatFilePerLabel::handle_event()
{
*output = get_value();
+ format->handle_event();
return 1;
}
-void FormatMultiple::update(int *output)
+void FormatFilePerLabel::update(int *output)
{
this->output = output;
set_value(*output ? 1 : 0);