#include "localsession.h"
#include "libdv.h"
#include "libmjpeg.h"
+#include "libzmpeg3.h"
#include "mainmenu.h"
#include "mainundo.h"
#include "mwindow.h"
}
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;
display_vframe(cut_icon, x, y, 200, 1.0, scale);
}
+#ifdef HAVE_DVB
DeviceDVBInput *Record::
dvb_device()
{
(DeviceDVBInput *)adevice->mpeg_device();
return dvb_dev;
}
+#endif
#if 0
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();
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();
display_video_text(20, 20, text,
BIGFONT, WHITE, BLACK, 0, 3., 1.);
return 0;
+#else
+ return 1;
+#endif
}
void Record::clear_keybfr()
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;