X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Frecord.C;h=96ec0f8236284bd5a88f6fa504dd728d3e6ec89d;hp=3ea53a42ffa4a82da550707c819d252afc8c1ce1;hb=502b6f3b6fd04f6b01c6d70dcb81aa304dd0db1c;hpb=9d832a1fff11b11aaa1108c460690ed05e2bdc05 diff --git a/cinelerra-5.1/cinelerra/record.C b/cinelerra-5.1/cinelerra/record.C index 3ea53a42..96ec0f82 100644 --- a/cinelerra-5.1/cinelerra/record.C +++ b/cinelerra-5.1/cinelerra/record.C @@ -155,19 +155,23 @@ Record::Record(MWindow *mwindow, RecordMenuItem *menu_item) 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; @@ -366,13 +370,17 @@ void Record::run() // 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(); @@ -405,7 +413,7 @@ void Record::run() mwindow->undo->update_undo_before(); // For pasting, clear the active region if(load_mode == LOADMODE_PASTE) - mwindow->clear(0, 1); + mwindow->clear(0); int loadmode = load_mode == LOADMODE_RESOURCESONLY ? LOADMODE_ASSETSONLY : load_mode; mwindow->paste_edls(&new_edls, loadmode, 0, -1, @@ -702,8 +710,7 @@ const char* Record::current_mode() 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 ) { @@ -1463,7 +1470,7 @@ int Record::check_batch_complete() return result; } - +#ifdef HAVE_COMMERCIAL int Record::skimming(void *vp, int track) { return ((Record*)vp)->skimming(track); @@ -1506,6 +1513,14 @@ void Record::update_skimming(int v) 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) { @@ -1767,6 +1782,7 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) 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(); @@ -1786,6 +1802,7 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) 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); @@ -1793,9 +1810,11 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) 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; @@ -1823,7 +1842,7 @@ int Record::remote_process_key(RemoteControl *remote_control, int key) return 1; } - +#ifdef HAVE_COMMERCIAL int Record::start_commercial_capture() { if( deletions != 0 ) return 1; @@ -1861,6 +1880,7 @@ int Record::mark_commercial_capture(int action) deletions->append(new Dele(time, action)); return 0; } +#endif void Record::remote_fill_color(int color) { @@ -1885,6 +1905,7 @@ void Record::set_play_gain(double gain) if( adevice ) adevice->set_play_gain(gain); } +#ifdef HAVE_COMMERCIAL int Record::stop_commercial_capture(int run_job) { if( deletions == 0 ) return 1; @@ -2050,7 +2071,7 @@ run() 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; } @@ -2058,3 +2079,4 @@ run() remote_color(record->status_color); } +#endif