projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Credit Andrew - updating patches for FFmpeg 7.0 as needed since 6.1, now at 7.0,...
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
plugins
/
livevideo
/
livevideo.C
diff --git
a/cinelerra-5.1/plugins/livevideo/livevideo.C
b/cinelerra-5.1/plugins/livevideo/livevideo.C
index f08a7371cc812ccd23abbcd8a16ae250afdfa233..888164a1a4ae52e6e519c4022a6f064bd65236bd 100644
(file)
--- a/
cinelerra-5.1/plugins/livevideo/livevideo.C
+++ b/
cinelerra-5.1/plugins/livevideo/livevideo.C
@@
-31,7
+31,9
@@
#include "filexml.h"
#include "guicast.h"
#include "language.h"
#include "filexml.h"
#include "guicast.h"
#include "language.h"
+#ifdef HAVE_DV
#include "libdv.h"
#include "libdv.h"
+#endif
#include "libmjpeg.h"
#include "mwindow.h"
#include "picture.h"
#include "libmjpeg.h"
#include "mwindow.h"
#include "picture.h"
@@
-150,7
+152,9
@@
public:
int prev_channel;
int w, h;
// Decompressors for different video drivers
int prev_channel;
int w, h;
// Decompressors for different video drivers
+#ifdef HAVE_DV
dv_t *dv;
dv_t *dv;
+#endif
mjpeg_t *mjpeg;
};
mjpeg_t *mjpeg;
};
@@
-197,8
+201,8
@@
LiveVideoWindow::LiveVideoWindow(LiveVideo *plugin)
: PluginClientWindow(plugin,
plugin->w,
plugin->h,
: PluginClientWindow(plugin,
plugin->w,
plugin->h,
-
100
,
-
100
,
+
xS(100)
,
+
yS(100)
,
1)
{
this->plugin = plugin;
1)
{
this->plugin = plugin;
@@
-211,7
+215,9
@@
LiveVideoWindow::~LiveVideoWindow()
void LiveVideoWindow::create_objects()
{
void LiveVideoWindow::create_objects()
{
- int x = 10, y = 10;
+ int xs10 = xS(10);
+ int ys5 = yS(5), ys10 = yS(10);
+ int x = xs10, y = ys10;
EDLSession *session = plugin->get_edl()->session;
if(session)
EDLSession *session = plugin->get_edl()->session;
if(session)
@@
-225,14
+231,14
@@
void LiveVideoWindow::create_objects()
}
add_subwindow(title = new BC_Title(x, y, _("Channels:")));
}
add_subwindow(title = new BC_Title(x, y, _("Channels:")));
- y += title->get_h() + 5;
+ y += title->get_h() +
ys
5;
add_subwindow(list = new LiveChannelList(plugin,
this,
x,
y,
add_subwindow(list = new LiveChannelList(plugin,
this,
x,
y,
- get_w() - x - 10,
- get_h() - y - BC_OKButton::calculate_h() -
10 -
10));
- y += list->get_h() + 10;
+ get_w() - x -
xs
10,
+ get_h() - y - BC_OKButton::calculate_h() -
ys10 - ys
10));
+ y += list->get_h() +
ys
10;
add_subwindow(select = new LiveChannelSelect(plugin,
this,
x,
add_subwindow(select = new LiveChannelSelect(plugin,
this,
x,
@@
-345,10
+351,12
@@
LiveVideo::LiveVideo(PluginServer *server)
vdevice = 0;
temp = 0;
channeldb = new ChannelDB;
vdevice = 0;
temp = 0;
channeldb = new ChannelDB;
- w =
320
;
- h =
640
;
+ w =
xS(320)
;
+ h =
yS(640)
;
prev_channel = 0;
prev_channel = 0;
+#ifdef HAVE_DV
dv = 0;
dv = 0;
+#endif
mjpeg = 0;
picture = 0;
this->server = server;
mjpeg = 0;
picture = 0;
this->server = server;
@@
-368,7
+376,9
@@
LiveVideo::~LiveVideo()
delete channeldb;
delete temp;
delete channeldb;
delete temp;
+#ifdef HAVE_DV
if(dv) dv_delete(dv);
if(dv) dv_delete(dv);
+#endif
if(mjpeg) mjpeg_delete(mjpeg);
delete picture;
}
if(mjpeg) mjpeg_delete(mjpeg);
delete picture;
}
@@
-497,6
+507,7
@@
int LiveVideo::process_buffer(VFrame *frame,
{
switch(session->vconfig_in->driver)
{
{
switch(session->vconfig_in->driver)
{
+#ifdef HAVE_DV
case CAPTURE_FIREWIRE:
case CAPTURE_IEC61883:
// Decompress a DV frame from the driver
case CAPTURE_FIREWIRE:
case CAPTURE_IEC61883:
// Decompress a DV frame from the driver
@@
-509,7
+520,7
@@
int LiveVideo::process_buffer(VFrame *frame,
frame->get_color_model());
frame->set_opengl_state(VFrame::RAM);
break;
frame->get_color_model());
frame->set_opengl_state(VFrame::RAM);
break;
-
+#endif
case VIDEO4LINUX2JPEG:
if(!mjpeg)
mjpeg = mjpeg_new(frame->get_w(),
case VIDEO4LINUX2JPEG:
if(!mjpeg)
mjpeg = mjpeg_new(frame->get_w(),
@@
-637,8
+648,3
@@
void LiveVideo::update_gui()
}
}
}
}
}
}
-
-
-
-
-