adevice_lock = new Mutex("Record::adevice_lock");
vdevice_lock = new Mutex("Record::vdevice_lock");
batch_lock = new Mutex("Record::batch_lock");
+#ifdef HAVE_COMMERCIAL
skim_thread = new SkimDbThread();
cutads_status = new RecordCutAdsStatus(this);
blink_status = new RecordBlinkStatus(this);
+#endif
}
Record::~Record()
{
mwindow->gui->record = 0;
stop();
+#ifdef HAVE_COMMERCIAL
delete blink_status;
delete cutads_status;
stop_skimming();
delete skim_thread;
+#endif
delete deletions;
delete picture;
delete channeldb;
video_zoom = defaults->get("RECORD_VIDEO_Z", (float)1);
picture->load_defaults();
reverse_interlace = defaults->get("REVERSE_INTERLACE", 0);
+ do_cursor = defaults->get("RECORD_CURSOR", 0);
+ do_big_cursor = defaults->get("RECORD_BIG_CURSOR", 0);
for( int i=0; i<MAXCHANNELS; ++i ) {
sprintf(string, "RECORD_DCOFFSET_%d", i);
dc_offset[i] = defaults->get(string, 0);
defaults->update("RECORD_VIDEO_Z", video_zoom);
picture->save_defaults();
defaults->update("REVERSE_INTERLACE", reverse_interlace);
+ defaults->update("RECORD_CURSOR", do_cursor);
+ defaults->update("RECORD_BIG_CURSOR", do_big_cursor);
for( int i=0; i<MAXCHANNELS; ++i ) {
sprintf(string, "RECORD_DCOFFSET_%d", i);
defaults->update(string, dc_offset[i]);
// Need to stop everything this time
- stop_commercial_capture(0);
int video_stream = -1;
+#ifdef HAVE_COMMERCIAL
+ stop_commercial_capture(0);
+#endif
+#ifdef HAVE_LIBZMPEG
if( default_asset->format == FILE_MPEG ) {
Channel *channel = get_current_channel();
if( channel )
video_stream = channel->video_stream;
}
+#endif
stop(0);
edl->Garbage::remove_user();
// For pasting, clear the active region
if(load_mode == LOADMODE_PASTE)
mwindow->clear(0);
-
- mwindow->paste_edls(&new_edls, load_mode, 0, -1,
+ int loadmode = load_mode == LOADMODE_RESOURCESONLY ?
+ LOADMODE_ASSETSONLY : load_mode;
+ mwindow->paste_edls(&new_edls, loadmode, 0, -1,
SESSION->labels_follow_edits,
SESSION->plugins_follow_edits,
SESSION->autos_follow_edits,
void Record::stop(int wait)
{
stop_operation();
- if( wait && running() )
+ if( record_gui )
record_gui->set_done(1);
- join();
+ if( wait )
+ join();
window_lock->lock("Record::stop");
delete record_thread; record_thread = 0;
delete record_monitor; record_monitor = 0;
double Record::current_display_position()
{
-//printf("Record::current_display_position "
-// _LD " " _LD "\n", total_samples, total_frames)
+//printf("Record::current_display_position "%jd %jd\n", total_samples, total_frames);
double result = -1.;
Asset *asset = default_asset;
if( writing_file ) {
master_channel->copy_usage(vdevice->channel);
picture->copy_usage(vdevice->picture);
vdevice->set_field_order(reverse_interlace);
+ vdevice->set_do_cursor(do_cursor, do_big_cursor);
vdevice->set_adevice(adevice);
if( adevice ) adevice->set_vdevice(vdevice);
set_dev_channel(get_current_channel());
if( !writing_file ) {
written_frames = 0;
written_samples = 0;
- do_video = File::supports_video(default_asset->format);
- do_audio = File::supports_audio(default_asset->format);
+ do_video = File::renders_video(default_asset);
+ do_audio = File::renders_audio(default_asset);
if( single_frame ) do_audio = 0;
if( !do_video && single_frame )
single_frame = 0;
record_gui->power_off->update(value);
}
-int Record::set_video_picture()
+void Record::set_video_picture()
{
if( default_asset->video_data && vdevice )
vdevice->set_picture(picture);
- return 0;
+}
+
+void Record::set_do_cursor()
+{
+ vdevice->set_do_cursor(do_cursor, do_big_cursor);
}
void Record::set_translation(int x, int y)
return result;
}
-
+#ifdef HAVE_COMMERCIAL
int Record::skimming(void *vp, int track)
{
return ((Record*)vp)->skimming(track);
stop_skimming();
}
+#else
+int Record::skimming(void *vp, int track) { return 1; }
+int Record::skimming(int track) { return 1; }
+void Record::start_skimming() {}
+void Record::stop_skimming() {}
+void Record::update_skimming(int v) {}
+#endif
+
RecordRemoteHandler::RecordRemoteHandler(RemoteControl *remote_control)
: RemoteHandler(remote_control->gui, GREEN)
{
break;
//case UP: case DOWN: case LEFT: case RIGHT:
//case KPPLAY: case KPBACK: case KPFORW:
+#ifdef HAVE_COMMERCIAL
case KPRECD: case 'c': // start capture, mark endpoint
if( !deletions ) {
start_commercial_capture();
case KPAUSE: case 'x': // ignore current commercial
mark_commercial_capture(DEL_SKIP);
break;
+#endif
case KPBACK: case 'a': // toggle mute audio
if( !monitor_audio ) { set_mute_gain(1); set_play_gain(1); }
set_audio_monitoring(monitor_audio ? 0 : 1);
case 'm': // toggle metering audio
set_audio_metering(metering_audio ? 0 : 1);
break;
+#ifdef HAVE_COMMERCIAL
case KPPLAY: case 's': // ignore previous endpoint
mark_commercial_capture(DEL_OOPS);
break;
+#endif
case KPFWRD: case KPSLASH:
display_channel_info();
break;
return 1;
}
-
+#ifdef HAVE_COMMERCIAL
int Record::start_commercial_capture()
{
if( deletions != 0 ) return 1;
deletions->append(new Dele(time, action));
return 0;
}
+#endif
void Record::remote_fill_color(int color)
{
if( adevice ) adevice->set_play_gain(gain);
}
+#ifdef HAVE_COMMERCIAL
int Record::stop_commercial_capture(int run_job)
{
if( deletions == 0 ) return 1;
usleep(500000);
disable_cancel();
color ^= YELLOW ^ BLUE;
- if( timer.get_difference() > 10*60*1000 ) { // 10 minites
+ if( timer.get_difference() > 10*60*1000 ) { // 10 minutes
record->stop_commercial_capture(0);
done = 1;
}
remote_color(record->status_color);
}
+#endif