X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Frecord.C;h=d2247d57bd7d9e14a932eb704bff1b3da36fc4cb;hb=c9de74551f43dad1b898603c0827985773c0cf9d;hp=9a24b98129f0ee654160581366394f2473b7a85f;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/record.C b/cinelerra-5.1/cinelerra/record.C index 9a24b981..d2247d57 100644 --- a/cinelerra-5.1/cinelerra/record.C +++ b/cinelerra-5.1/cinelerra/record.C @@ -48,6 +48,7 @@ #include "localsession.h" #include "libdv.h" #include "libmjpeg.h" +#include "libzmpeg3.h" #include "mainmenu.h" #include "mainundo.h" #include "mwindow.h" @@ -864,7 +865,7 @@ void Record::resync() } else if( diff > 0. ) { int64_t delay = (int64_t)(1000.0 * diff); - dbmsg(" delay " _LDv(8), delay); + dbmsg(" delay %8jd", delay); if( delay > 500 ) { video_time = audio_time = -1.; delay = 500; @@ -1524,6 +1525,7 @@ display_cut_icon(int x, int y) display_vframe(cut_icon, x, y, 200, 1.0, scale); } +#ifdef HAVE_DVB DeviceDVBInput *Record:: dvb_device() { @@ -1533,6 +1535,7 @@ dvb_device() (DeviceDVBInput *)adevice->mpeg_device(); return dvb_dev; } +#endif #if 0 @@ -1596,6 +1599,7 @@ undisplay_vframe() int Record:: display_channel_info() { +#ifdef HAVE_DVB if( !channel ) return 1; if( !vdevice || vdevice->in_config->driver != CAPTURE_DVB ) return 1; DeviceDVBInput *dvb_input = dvb_device(); @@ -1648,11 +1652,15 @@ display_channel_info() display_video_text(20, 20, text, BIGFONT, WHITE, BLACK, 0, 3., 1.); return result; +#else + return 1; +#endif } int Record:: display_channel_schedule() { +#ifdef HAVE_DVB if( !channel ) return 1; if( !vdevice || vdevice->in_config->driver != CAPTURE_DVB ) return 1; DeviceDVBInput *dvb_input = dvb_device(); @@ -1702,6 +1710,9 @@ display_channel_schedule() display_video_text(20, 20, text, BIGFONT, WHITE, BLACK, 0, 3., 1.); return 0; +#else + return 1; +#endif } void Record::clear_keybfr() @@ -1901,11 +1912,12 @@ int Record::stop_commercial_capture(int run_job) int Record:: spawn(const char *fmt, ...) { - char exe_path[BCTEXTLEN], cmd[BCTEXTLEN]; - get_exe_path(exe_path); + const char *exec_path = File::get_cinlib_path(); + char cmd[BCTEXTLEN], *cp = cmd, *ep = cp+sizeof(cmd)-1; va_list ap; va_start(ap, fmt); - int n = snprintf(cmd, sizeof(cmd), "exec %s/", exe_path); - vsnprintf(cmd+n, sizeof(cmd)-n, fmt, ap); va_end(ap); + cp += snprintf(cp, ep-cp, "exec %s/", exec_path); + cp += vsnprintf(cp, ep-cp, fmt, ap); va_end(ap); + *cp = 0; pid_t pid = vfork(); if( pid < 0 ) return -1; if( pid > 0 ) return pid;