X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Frecordmonitor.C;h=c72317fb9be46168807e22250a8706c7d25260b6;hb=61d95f04b83c2f7f1fa6b44ff64ed9c83a7d8abb;hp=aec770a733a14817019e0a7679fd642d325d4120;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/recordmonitor.C b/cinelerra-5.1/cinelerra/recordmonitor.C index aec770a7..c72317fb 100644 --- a/cinelerra-5.1/cinelerra/recordmonitor.C +++ b/cinelerra-5.1/cinelerra/recordmonitor.C @@ -41,6 +41,7 @@ #include "recordscopes.h" #include "recordtransport.h" #include "recordmonitor.h" +#include "signalstatus.h" #include "theme.h" #include "videodevice.inc" #include "vframe.h" @@ -279,12 +280,14 @@ RecordMonitorGUI::RecordMonitorGUI(MWindow *mwindow, RecordMonitorGUI::~RecordMonitorGUI() { lock_window("RecordMonitorGUI::~RecordMonitorGUI"); +#ifdef HAVE_DVB delete signal_status; +#endif delete canvas; if( bitmap ) delete bitmap; if( channel_picker ) delete channel_picker; - if( avc1394transport_thread ) #ifdef HAVE_FIREWIRE + if( avc1394transport_thread ) delete avc1394transport_thread; if( avc ) { delete avc; @@ -303,17 +306,14 @@ void RecordMonitorGUI::create_objects() // y offset for video canvas if we have the transport controls lock_window("RecordMonitorGUI::create_objects"); int driver = mwindow->edl->session->vconfig_in->driver; - int do_channel = (driver == VIDEO4LINUX || - driver == CAPTURE_BUZ || - driver == CAPTURE_DVB || + int do_channel = (driver == CAPTURE_DVB || driver == VIDEO4LINUX2 || driver == VIDEO4LINUX2JPEG || driver == VIDEO4LINUX2MPEG || driver == CAPTURE_JPEG_WEBCAM || driver == CAPTURE_YUYV_WEBCAM); int do_scopes = do_channel || driver == SCREENCAPTURE; - int do_interlace = (driver == CAPTURE_BUZ || - driver == VIDEO4LINUX2JPEG); + int do_interlace = (driver == VIDEO4LINUX2JPEG); int background_done = 0; int do_audio = record->default_asset->audio_data; int do_video = record->default_asset->video_data; @@ -344,7 +344,7 @@ void RecordMonitorGUI::create_objects() add_subwindow(avc1394transport_timecode = new BC_Title(avc1394_transport->x_end, mwindow->theme->rmonitor_tx_y + 10, - _("00:00:00:00"), + "00:00:00:00", MEDIUM_7SEGMENT, BLACK)); @@ -373,12 +373,14 @@ void RecordMonitorGUI::create_objects() canvas->create_objects(0); canvas->use_rwindow(); +#ifdef HAVE_DVB if( driver == CAPTURE_DVB ) { int ssw = SignalStatus::calculate_w(this); signal_status = new SignalStatus(this, get_w()-ssw-3, 0); add_subwindow(signal_status); signal_status->create_objects(); } +#endif int x = mwindow->theme->widget_border; int y = mwindow->theme->widget_border; @@ -390,8 +392,7 @@ void RecordMonitorGUI::create_objects() channel_picker->create_objects(); x += channel_picker->get_w() + mwindow->theme->widget_border; } - if( driver == CAPTURE_BUZ || - driver == VIDEO4LINUX2JPEG ) { + if( driver == VIDEO4LINUX2JPEG ) { add_subwindow(reverse_interlace = new ReverseInterlace(record, mwindow->theme->rmonitor_interlace_x, mwindow->theme->rmonitor_interlace_y)); @@ -528,8 +529,10 @@ int RecordMonitorGUI::keypress_event() default: if(canvas) result = canvas->keypress_event(this); +#ifdef HAVE_FIREWIRE if(!result && avc1394_transport) result = avc1394_transport->keypress_event(get_keypress()); +#endif break; } @@ -548,17 +551,14 @@ int RecordMonitorGUI::translation_event() int RecordMonitorGUI::resize_event(int w, int h) { int driver = mwindow->edl->session->vconfig_in->driver; - int do_channel = (driver == VIDEO4LINUX || - driver == CAPTURE_BUZ || - driver == CAPTURE_DVB || + int do_channel = (driver == CAPTURE_DVB || driver == VIDEO4LINUX2 || driver == VIDEO4LINUX2JPEG || driver == VIDEO4LINUX2MPEG || driver == CAPTURE_JPEG_WEBCAM || driver == CAPTURE_YUYV_WEBCAM); int do_scopes = do_channel || driver == SCREENCAPTURE; - int do_interlace = (driver == CAPTURE_BUZ || - driver == VIDEO4LINUX2JPEG); + int do_interlace = (driver == VIDEO4LINUX2JPEG); int do_avc = 0; #ifdef HAVE_FIREWIRE do_avc = avc1394_transport ? 1 : 0; @@ -667,6 +667,7 @@ int RecordMonitorGUI::create_bitmap() void RecordMonitorGUI::enable_signal_status(int enable) { +#ifdef HAVE_DVB if( !signal_status ) return; signal_status->lock_window("RecordMonitorGUI::enable_signal_status"); if( !enable ) @@ -677,6 +678,7 @@ void RecordMonitorGUI::enable_signal_status(int enable) DeviceDVBInput *dvb_input = record->dvb_device(); if( dvb_input ) dvb_input->set_signal_status(!enable ? 0 : signal_status); +#endif } void RecordMonitorGUI:: @@ -910,7 +912,6 @@ void RecordMonitorThread::init_output_format() output_colormodel = record->vdevice->get_best_colormodel(record->default_asset); break; - case CAPTURE_BUZ: case VIDEO4LINUX2JPEG: jpeg_engine = new RecVideoMJPGThread(record, this, mwindow->edl->session->vconfig_in->v4l2jpeg_in_fields); @@ -937,7 +938,6 @@ void RecordMonitorThread::init_output_format() case CAPTURE_DVB: - case VIDEO4LINUX: case VIDEO4LINUX2: case VIDEO4LINUX2MPEG: output_colormodel = record->vdevice->get_best_colormodel(record->default_asset); @@ -965,7 +965,6 @@ int RecordMonitorThread::stop_playback() //printf("RecordMonitorThread::stop_playback 1\n"); switch(mwindow->edl->session->vconfig_in->driver) { - case CAPTURE_BUZ: case VIDEO4LINUX2JPEG: if( jpeg_engine ) { jpeg_engine->stop_rendering(); @@ -1036,7 +1035,7 @@ int RecordMonitorThread::render_dv() void RecordMonitorThread::render_uncompressed() { - output_frame->copy_from(input_frame); + output_frame->transfer_from(input_frame); } void RecordMonitorThread::show_output_frame() @@ -1060,7 +1059,6 @@ void RecordMonitorThread::lock_input() int RecordMonitorThread::render_frame() { switch(mwindow->edl->session->vconfig_in->driver) { - case CAPTURE_BUZ: case VIDEO4LINUX2JPEG: case CAPTURE_JPEG_WEBCAM: render_jpeg(); @@ -1231,18 +1229,23 @@ RecVideoDVThread::~RecVideoDVThread() int RecVideoDVThread::start_rendering() { +#ifdef HAVE_DV dv = dv_new(); +#endif return 0; } int RecVideoDVThread::stop_rendering() { +#ifdef HAVE_DV if( dv ) { dv_delete(((dv_t*)dv)); dv = 0; } +#endif return 0; } int RecVideoDVThread::render_frame(VFrame *frame, long size) { +#ifdef HAVE_DV unsigned char *yuv_planes[3]; yuv_planes[0] = thread->output_frame->get_y(); yuv_planes[1] = thread->output_frame->get_u(); @@ -1252,7 +1255,7 @@ int RecVideoDVThread::render_frame(VFrame *frame, long size) frame->get_data(), frame->get_compressed_size(), thread->output_frame->get_color_model()); - +#endif return 0; }