1 diff -Nru cinelerra.orig//cinelerra/channelpicker.C cinelerra/cinelerra/channelpicker.C
2 --- cinelerra.orig//cinelerra/channelpicker.C 2010-11-24 18:18:03.000000000 -0500
3 +++ cinelerra/cinelerra/channelpicker.C 2011-02-17 13:31:30.147880002 -0500
6 #include "recordmonitor.h"
8 -#include "vdevicebuz.h"
9 +//#include "vdevicebuz.h"
10 #include "vdeviceprefs.h"
11 #include "videodevice.h"
14 // printf("PrefsChannelPicker::PrefsChannelPicker 1\n");
15 this->mwindow = mwindow;
17 - VDeviceBUZ::get_inputs(&input_sources);
18 +// VDeviceBUZ::get_inputs(&input_sources);
21 PrefsChannelPicker::~PrefsChannelPicker()
22 diff -Nru cinelerra.orig//cinelerra/Makefile.am cinelerra/cinelerra/Makefile.am
23 --- cinelerra.orig//cinelerra/Makefile.am 2010-11-24 18:18:03.000000000 -0500
24 +++ cinelerra/cinelerra/Makefile.am 2011-02-17 13:31:30.147880002 -0500
36 diff -Nru cinelerra.orig//cinelerra/reversemake cinelerra/cinelerra/reversemake
37 --- cinelerra.orig//cinelerra/reversemake 2010-11-24 18:18:03.000000000 -0500
38 +++ cinelerra/cinelerra/reversemake 2011-02-17 13:31:30.151880002 -0500
42 make $OBJDIR/vdevicex11.o
43 -make $OBJDIR/vdevicev4l.o
44 make $OBJDIR/vdeviceprefs.o
45 make $OBJDIR/vdevicelml.o
46 -make $OBJDIR/vdevicebuz.o
47 make $OBJDIR/vdevicebase.o
48 make $OBJDIR/vdevice1394.o
49 make $OBJDIR/vautomation.o
50 diff -Nru cinelerra.orig//cinelerra/vdevicebuz.C cinelerra/cinelerra/vdevicebuz.C
51 --- cinelerra.orig//cinelerra/vdevicebuz.C 2010-11-24 18:18:03.000000000 -0500
52 +++ cinelerra/cinelerra/vdevicebuz.C 1969-12-31 19:00:00.000000000 -0500
57 - * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
59 - * This program is free software; you can redistribute it and/or modify
60 - * it under the terms of the GNU General Public License as published by
61 - * the Free Software Foundation; either version 2 of the License, or
62 - * (at your option) any later version.
64 - * This program is distributed in the hope that it will be useful,
65 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
66 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67 - * GNU General Public License for more details.
69 - * You should have received a copy of the GNU General Public License
70 - * along with this program; if not, write to the Free Software
71 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
75 -// ALPHA C++ can't compile 64 bit headers
76 -#undef _LARGEFILE_SOURCE
77 -#undef _LARGEFILE64_SOURCE
78 -#undef _FILE_OFFSET_BITS
81 -#include "bcsignals.h"
83 -#include "chantables.h"
84 -#include "condition.h"
88 -#include "playbackconfig.h"
89 -#include "preferences.h"
90 -#include "recordconfig.h"
91 -#include "strategies.inc"
92 -#include "vdevicebuz.h"
94 -#include "videoconfig.h"
95 -#include "videodevice.h"
99 -#include <linux/kernel.h>
100 -//#include <linux/videodev2.h>
101 -#include <linux/videodev.h>
103 -#include <sys/ioctl.h>
104 -#include <sys/mman.h>
109 -#define READ_TIMEOUT 5000000
112 -VDeviceBUZInput::VDeviceBUZInput(VDeviceBUZ *device)
115 - this->device = device;
119 - current_inbuffer = 0;
120 - current_outbuffer = 0;
122 - output_lock = new Condition(0, "VDeviceBUZInput::output_lock");
123 - buffer_lock = new Mutex("VDeviceBUZInput::buffer_lock");
126 -VDeviceBUZInput::~VDeviceBUZInput()
128 - if(Thread::running())
137 - for(int i = 0; i < total_buffers; i++)
139 - delete [] buffer[i];
142 - delete [] buffer_size;
144 - delete output_lock;
145 - delete buffer_lock;
148 -void VDeviceBUZInput::start()
151 - total_buffers = device->device->in_config->capture_length;
152 - buffer = new char*[total_buffers];
153 - buffer_size = new int[total_buffers];
154 - bzero(buffer_size, sizeof(int) * total_buffers);
155 - for(int i = 0; i < total_buffers; i++)
157 - buffer[i] = new char[INPUT_BUFFER_SIZE];
163 -void VDeviceBUZInput::run()
165 - struct buz_sync bsync;
170 - Thread::enable_cancel();
171 - if(ioctl(device->jvideo_fd, BUZIOC_SYNC, &bsync) < 0)
173 - perror("VDeviceBUZInput::run BUZIOC_SYNC");
175 - Thread::disable_cancel();
179 - Thread::disable_cancel();
183 - int new_buffer = 0;
184 - buffer_lock->lock("VDeviceBUZInput::run");
185 -// Save only if the current buffer is free.
186 - if(!buffer_size[current_inbuffer])
189 -// Copy to input buffer
190 - memcpy(buffer[current_inbuffer],
191 - device->input_buffer + bsync.frame * device->breq.size,
194 -// Advance input buffer number and decrease semaphore.
195 - buffer_size[current_inbuffer] = bsync.length;
196 - increment_counter(¤t_inbuffer);
199 - buffer_lock->unlock();
201 - if(ioctl(device->jvideo_fd, BUZIOC_QBUF_CAPT, &bsync.frame))
202 - perror("VDeviceBUZInput::run BUZIOC_QBUF_CAPT");
204 - if(new_buffer) output_lock->unlock();
209 -void VDeviceBUZInput::get_buffer(char **ptr, int *size)
211 -// Increase semaphore to wait for buffer.
212 - int result = output_lock->timed_lock(READ_TIMEOUT, "VDeviceBUZInput::get_buffer");
215 -// The driver has its own timeout routine but it doesn't work because
216 -// because the tuner lock is unlocked and relocked with no delay.
218 -// output_lock->lock("VDeviceBUZInput::get_buffer");
222 -// Take over buffer table
223 - buffer_lock->lock("VDeviceBUZInput::get_buffer");
224 - *ptr = buffer[current_outbuffer];
225 - *size = buffer_size[current_outbuffer];
226 - buffer_lock->unlock();
230 -//printf("VDeviceBUZInput::get_buffer 1\n");
231 - output_lock->unlock();
235 -void VDeviceBUZInput::put_buffer()
237 - buffer_lock->lock("VDeviceBUZInput::put_buffer");
238 - buffer_size[current_outbuffer] = 0;
239 - buffer_lock->unlock();
240 - increment_counter(¤t_outbuffer);
243 -void VDeviceBUZInput::increment_counter(int *counter)
246 - if(*counter >= total_buffers) *counter = 0;
249 -void VDeviceBUZInput::decrement_counter(int *counter)
252 - if(*counter < 0) *counter = total_buffers - 1;
269 -VDeviceBUZ::VDeviceBUZ(VideoDevice *device)
270 - : VDeviceBase(device)
272 - reset_parameters();
273 - render_strategies.append(VRENDER_MJPG);
274 - tuner_lock = new Mutex("VDeviceBUZ::tuner_lock");
277 -VDeviceBUZ::~VDeviceBUZ()
283 -int VDeviceBUZ::reset_parameters()
290 - frame_allocated = 0;
299 - brightness = 32768;
306 -int VDeviceBUZ::close_input_core()
310 - delete input_thread;
317 - if(jvideo_fd) close(jvideo_fd);
323 - if(input_buffer > 0)
324 - munmap(input_buffer, breq.count * breq.size);
329 -int VDeviceBUZ::close_output_core()
331 -//printf("VDeviceBUZ::close_output_core 1\n");
335 -// if(ioctl(jvideo_fd, BUZIOC_QBUF_PLAY, &n) < 0)
336 -// perror("VDeviceBUZ::close_output_core BUZIOC_QBUF_PLAY");
337 - if(jvideo_fd) close(jvideo_fd);
342 - if(output_buffer > 0)
343 - munmap(output_buffer, breq.count * breq.size);
353 - mjpeg_delete(mjpeg);
361 -//printf("VDeviceBUZ::close_output_core 2\n");
366 -int VDeviceBUZ::close_all()
368 -//printf("VDeviceBUZ::close_all 1\n");
369 - close_input_core();
370 -//printf("VDeviceBUZ::close_all 1\n");
371 - close_output_core();
372 -//printf("VDeviceBUZ::close_all 1\n");
373 - if(frame_buffer) delete frame_buffer;
374 -//printf("VDeviceBUZ::close_all 1\n");
375 - reset_parameters();
376 -//printf("VDeviceBUZ::close_all 2\n");
380 -#define COMPOSITE_TEXT "Composite"
381 -#define SVIDEO_TEXT "S-Video"
382 -#define BUZ_COMPOSITE 0
383 -#define BUZ_SVIDEO 1
385 -void VDeviceBUZ::get_inputs(ArrayList<Channel*> *input_sources)
387 - Channel *new_source = new Channel;
389 - new_source = new Channel;
390 - strcpy(new_source->device_name, COMPOSITE_TEXT);
391 - input_sources->append(new_source);
393 - new_source = new Channel;
394 - strcpy(new_source->device_name, SVIDEO_TEXT);
395 - input_sources->append(new_source);
398 -int VDeviceBUZ::open_input()
400 - device->channel->use_norm = 1;
401 - device->channel->use_input = 1;
403 - device->picture->use_brightness = 1;
404 - device->picture->use_contrast = 1;
405 - device->picture->use_color = 1;
406 - device->picture->use_hue = 1;
407 - device->picture->use_whiteness = 1;
409 -// Can't open input until after the channel is set
413 -int VDeviceBUZ::open_output()
415 -// Can't open output until after the channel is set
419 -int VDeviceBUZ::set_channel(Channel *channel)
421 - if(!channel) return 0;
423 - tuner_lock->lock("VDeviceBUZ::set_channel");
427 - close_input_core();
428 - open_input_core(channel);
432 - close_output_core();
433 - open_output_core(channel);
436 - tuner_lock->unlock();
442 -void VDeviceBUZ::create_channeldb(ArrayList<Channel*> *channeldb)
447 -int VDeviceBUZ::set_picture(PictureConfig *picture)
449 - this->brightness = (int)((float)picture->brightness / 100 * 32767 + 32768);
450 - this->hue = (int)((float)picture->hue / 100 * 32767 + 32768);
451 - this->color = (int)((float)picture->color / 100 * 32767 + 32768);
452 - this->contrast = (int)((float)picture->contrast / 100 * 32767 + 32768);
453 - this->whiteness = (int)((float)picture->whiteness / 100 * 32767 + 32768);
456 - tuner_lock->lock("VDeviceBUZ::set_picture");
459 - close_input_core();
460 - open_input_core(0);
464 - close_output_core();
465 - open_output_core(0);
467 - tuner_lock->unlock();
470 -// TRACE("VDeviceBUZ::set_picture 1");
471 -// tuner_lock->lock("VDeviceBUZ::set_picture");
472 -// TRACE("VDeviceBUZ::set_picture 2");
476 -// struct video_picture picture_params;
477 -// // This call takes a long time in 2.4.22
478 -// if(ioctl(jvideo_fd, VIDIOCGPICT, &picture_params) < 0)
479 -// perror("VDeviceBUZ::set_picture VIDIOCGPICT");
480 -// picture_params.brightness = brightness;
481 -// picture_params.hue = hue;
482 -// picture_params.colour = color;
483 -// picture_params.contrast = contrast;
484 -// picture_params.whiteness = whiteness;
485 -// // This call takes a long time in 2.4.22
486 -// if(ioctl(jvideo_fd, VIDIOCSPICT, &picture_params) < 0)
487 -// perror("VDeviceBUZ::set_picture VIDIOCSPICT");
488 -// if(ioctl(jvideo_fd, VIDIOCGPICT, &picture_params) < 0)
489 -// perror("VDeviceBUZ::set_picture VIDIOCGPICT");
492 -// TRACE("VDeviceBUZ::set_picture 10");
495 -// tuner_lock->unlock();
500 -int VDeviceBUZ::get_norm(int norm)
504 - case NTSC: return VIDEO_MODE_NTSC; break;
505 - case PAL: return VIDEO_MODE_PAL; break;
506 - case SECAM: return VIDEO_MODE_SECAM; break;
510 -int VDeviceBUZ::read_buffer(VFrame *frame)
512 - tuner_lock->lock("VDeviceBUZ::read_buffer");
513 - if(!jvideo_fd) open_input_core(0);
515 -// Get buffer from thread
517 - int buffer_size = 0;
519 - input_thread->get_buffer(&buffer, &buffer_size);
523 - frame->allocate_compressed_data(buffer_size);
524 - frame->set_compressed_size(buffer_size);
526 -// Transfer fields to frame
527 - if(device->odd_field_first)
529 - long field2_offset = mjpeg_get_field2((unsigned char*)buffer, buffer_size);
530 - long field1_len = field2_offset;
531 - long field2_len = buffer_size - field2_offset;
533 - memcpy(frame->get_data(), buffer + field2_offset, field2_len);
534 - memcpy(frame->get_data() + field2_len, buffer, field1_len);
538 - bcopy(buffer, frame->get_data(), buffer_size);
541 - input_thread->put_buffer();
542 - tuner_lock->unlock();
546 - tuner_lock->unlock();
548 -// Allow other threads to lock the tuner_lock under NPTL.
556 -int VDeviceBUZ::open_input_core(Channel *channel)
558 - jvideo_fd = open(device->in_config->buz_in_device, O_RDONLY);
562 - fprintf(stderr, "VDeviceBUZ::open_input %s: %s\n",
563 - device->in_config->buz_in_device,
569 -// Create input sources
570 - get_inputs(&device->input_sources);
572 -// Set current input source
575 - for(int i = 0; i < 2; i++)
577 - struct video_channel vch;
578 - vch.channel = channel->input;
579 - vch.norm = get_norm(channel->norm);
581 -//printf("VDeviceBUZ::open_input_core 2 %d %d\n", vch.channel, vch.norm);
582 - if(ioctl(jvideo_fd, VIDIOCSCHAN, &vch) < 0)
583 - perror("VDeviceBUZ::open_input_core VIDIOCSCHAN ");
589 -// struct video_capability vc;
590 -// if(ioctl(jvideo_fd, VIDIOCGCAP, &vc) < 0)
591 -// perror("VDeviceBUZ::open_input VIDIOCGCAP");
593 -// API dependant initialization
594 - if(ioctl(jvideo_fd, BUZIOC_G_PARAMS, &bparm) < 0)
595 - perror("VDeviceBUZ::open_input BUZIOC_G_PARAMS");
600 - bparm.field_per_buff = 2;
601 - bparm.img_width = device->in_config->w;
602 - bparm.img_height = device->in_config->h / bparm.field_per_buff;
606 -// bparm.APP_len = 14;
608 - bparm.odd_even = 0;
609 - bparm.decimation = 0;
610 - bparm.quality = device->quality;
611 - bzero(bparm.APP_data, sizeof(bparm.APP_data));
613 - if(ioctl(jvideo_fd, BUZIOC_S_PARAMS, &bparm) < 0)
614 - perror("VDeviceBUZ::open_input BUZIOC_S_PARAMS");
616 -// printf("open_input %d %d %d %d %d %d %d %d %d %d %d %d\n",
620 -// bparm.field_per_buff,
622 -// bparm.img_height,
627 -// bparm.decimation,
630 - breq.count = device->in_config->capture_length;
631 - breq.size = INPUT_BUFFER_SIZE;
632 - if(ioctl(jvideo_fd, BUZIOC_REQBUFS, &breq) < 0)
633 - perror("VDeviceBUZ::open_input BUZIOC_REQBUFS");
635 -//printf("open_input %s %d %d %d %d\n", device->in_config->buz_in_device, breq.count, breq.size, bparm.img_width, bparm.img_height);
636 - if((input_buffer = (char*)mmap(0,
637 - breq.count * breq.size,
642 - perror("VDeviceBUZ::open_input mmap");
645 -// Set picture quality
646 - struct video_picture picture_params;
647 -// This call takes a long time in 2.4.22
648 - if(ioctl(jvideo_fd, VIDIOCGPICT, &picture_params) < 0)
649 - perror("VDeviceBUZ::set_picture VIDIOCGPICT");
650 - picture_params.brightness = brightness;
651 - picture_params.hue = hue;
652 - picture_params.colour = color;
653 - picture_params.contrast = contrast;
654 - picture_params.whiteness = whiteness;
655 -// This call takes a long time in 2.4.22
656 - if(ioctl(jvideo_fd, VIDIOCSPICT, &picture_params) < 0)
657 - perror("VDeviceBUZ::set_picture VIDIOCSPICT");
658 - if(ioctl(jvideo_fd, VIDIOCGPICT, &picture_params) < 0)
659 - perror("VDeviceBUZ::set_picture VIDIOCGPICT");
665 - for(int i = 0; i < breq.count; i++)
667 - if(ioctl(jvideo_fd, BUZIOC_QBUF_CAPT, &i) < 0)
668 - perror("VDeviceBUZ::open_input BUZIOC_QBUF_CAPT");
672 - input_thread = new VDeviceBUZInput(this);
673 - input_thread->start();
674 -//printf("VDeviceBUZ::open_input_core 2\n");
678 -int VDeviceBUZ::open_output_core(Channel *channel)
680 -//printf("VDeviceBUZ::open_output 1\n");
683 - jvideo_fd = open(device->out_config->buz_out_device, O_RDWR);
686 - perror("VDeviceBUZ::open_output");
691 -// Set current input source
694 - struct video_channel vch;
695 - vch.channel = channel->input;
696 - vch.norm = get_norm(channel->norm);
698 - if(ioctl(jvideo_fd, VIDIOCSCHAN, &vch) < 0)
699 - perror("VDeviceBUZ::open_output_core VIDIOCSCHAN ");
703 - breq.size = INPUT_BUFFER_SIZE;
704 - if(ioctl(jvideo_fd, BUZIOC_REQBUFS, &breq) < 0)
705 - perror("VDeviceBUZ::open_output BUZIOC_REQBUFS");
706 - if((output_buffer = (char*)mmap(0,
707 - breq.count * breq.size,
708 - PROT_READ | PROT_WRITE,
712 - perror("VDeviceBUZ::open_output mmap");
714 - if(ioctl(jvideo_fd, BUZIOC_G_PARAMS, &bparm) < 0)
715 - perror("VDeviceBUZ::open_output BUZIOC_G_PARAMS");
717 - bparm.decimation = 1;
719 - bparm.field_per_buff = 2;
722 - bparm.img_width = device->out_w;
723 - bparm.img_height = device->out_h / bparm.field_per_buff;
726 - bparm.odd_even = 0;
728 - if(ioctl(jvideo_fd, BUZIOC_S_PARAMS, &bparm) < 0)
729 - perror("VDeviceBUZ::open_output BUZIOC_S_PARAMS");
730 -//printf("VDeviceBUZ::open_output 2\n");
736 -int VDeviceBUZ::write_buffer(VFrame *frame, EDL *edl)
738 -//printf("VDeviceBUZ::write_buffer 1\n");
739 - tuner_lock->lock("VDeviceBUZ::write_buffer");
741 - if(!jvideo_fd) open_output_core(0);
744 - if(frame->get_color_model() != BC_COMPRESSED)
746 - if(!temp_frame) temp_frame = new VFrame;
749 - mjpeg = mjpeg_new(device->out_w, device->out_h, 2);
750 - mjpeg_set_quality(mjpeg, device->quality);
751 - mjpeg_set_float(mjpeg, 0);
754 - mjpeg_compress(mjpeg,
759 - frame->get_color_model(),
761 - temp_frame->allocate_compressed_data(mjpeg_output_size(mjpeg));
762 - temp_frame->set_compressed_size(mjpeg_output_size(mjpeg));
763 - bcopy(mjpeg_output_buffer(mjpeg), temp_frame->get_data(), mjpeg_output_size(mjpeg));
768 -// Wait for frame to become available
769 -// Caused close_output_core to lock up.
770 -// if(total_loops >= 1)
772 -// if(ioctl(jvideo_fd, BUZIOC_SYNC, &output_number) < 0)
773 -// perror("VDeviceBUZ::write_buffer BUZIOC_SYNC");
776 - if(device->out_config->buz_swap_fields)
778 - long field2_offset = mjpeg_get_field2((unsigned char*)ptr->get_data(),
779 - ptr->get_compressed_size());
780 - long field2_len = ptr->get_compressed_size() - field2_offset;
781 - memcpy(output_buffer + output_number * breq.size,
782 - ptr->get_data() + field2_offset,
784 - memcpy(output_buffer + output_number * breq.size +field2_len,
790 - bcopy(ptr->get_data(),
791 - output_buffer + output_number * breq.size,
792 - ptr->get_compressed_size());
795 - if(ioctl(jvideo_fd, BUZIOC_QBUF_PLAY, &output_number) < 0)
796 - perror("VDeviceBUZ::write_buffer BUZIOC_QBUF_PLAY");
799 - if(output_number >= breq.count)
804 - tuner_lock->unlock();
805 -//printf("VDeviceBUZ::write_buffer 2\n");
810 -void VDeviceBUZ::new_output_buffer(VFrame *output,
813 -//printf("VDeviceBUZ::new_output_buffer 1 %d\n", colormodel);
816 - if(colormodel != user_frame->get_color_model())
827 - case BC_COMPRESSED:
828 - user_frame = new VFrame;
831 - user_frame = new VFrame(0,
839 - user_frame->set_shm_offset(0);
840 - output = user_frame;
841 -//printf("VDeviceBUZ::new_output_buffer 2\n");
845 -ArrayList<int>* VDeviceBUZ::get_render_strategies()
847 - return &render_strategies;
850 diff -Nru cinelerra.orig//cinelerra/vdevicebuz.h cinelerra/cinelerra/vdevicebuz.h
851 --- cinelerra.orig//cinelerra/vdevicebuz.h 2010-11-24 18:18:03.000000000 -0500
852 +++ cinelerra/cinelerra/vdevicebuz.h 1969-12-31 19:00:00.000000000 -0500
857 - * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
859 - * This program is free software; you can redistribute it and/or modify
860 - * it under the terms of the GNU General Public License as published by
861 - * the Free Software Foundation; either version 2 of the License, or
862 - * (at your option) any later version.
864 - * This program is distributed in the hope that it will be useful,
865 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
866 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
867 - * GNU General Public License for more details.
869 - * You should have received a copy of the GNU General Public License
870 - * along with this program; if not, write to the Free Software
871 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
875 -#ifndef VDEVICEBUZ_H
876 -#define VDEVICEBUZ_H
879 -#include "channel.inc"
880 -#include "condition.inc"
881 -#include "guicast.h"
882 -#include "libmjpeg.h"
883 -#include "mutex.inc"
885 -#include "vdevicebase.h"
886 -#include "vdevicebuz.inc"
887 -#include "vframe.inc"
890 -#define INPUT_BUFFER_SIZE 0x40000
892 -// Let's get real. The Buz driver doesn't work. If the buffers overflow
893 -// for enough time it locks up and can't be recovered except by a
894 -// SIGINT and restart. We need to cascade the buffer reading in another
895 -// ring buffer thread, have it read continuously, and cancel it if it
896 -// dies. How about if we do this in SCHED_RR and wait for it to die before
897 -// implementing cancellation?
900 -class VDeviceBUZInput : public Thread
903 - VDeviceBUZInput(VDeviceBUZ *device);
904 - ~VDeviceBUZInput();
907 - void get_buffer(char **ptr, int *size);
909 - void increment_counter(int *counter);
910 - void decrement_counter(int *counter);
911 - VDeviceBUZ *device;
916 - int current_inbuffer;
917 - int current_outbuffer;
918 - Condition *output_lock;
919 - Mutex *buffer_lock;
924 -class VDeviceBUZ : public VDeviceBase
927 - VDeviceBUZ(VideoDevice *device);
930 - friend class VDeviceBUZInput;
935 - int read_buffer(VFrame *frame);
936 - int write_buffer(VFrame *frames, EDL *edl);
937 - int reset_parameters();
938 - ArrayList<int>* get_render_strategies();
939 - int set_channel(Channel *channel);
940 - int get_norm(int norm);
941 - static void get_inputs(ArrayList<Channel*> *input_sources);
942 - int set_picture(PictureConfig *picture);
943 - int get_best_colormodel(int colormodel);
944 - void create_channeldb(ArrayList<Channel*> *channeldb);
945 - void new_output_buffer(VFrame *output, int colormodel);
949 - int open_input_core(Channel *channel);
950 - int close_input_core();
951 - int open_output_core(Channel *channel);
952 - int close_output_core();
955 - char *input_buffer, *frame_buffer, *output_buffer;
956 - long frame_size, frame_allocated;
958 -// quicktime_mjpeg_hdr jpeg_header;
959 - long last_frame_no;
960 - ArrayList<int> render_strategies;
961 -// Temporary frame for compressing output data
962 - VFrame *temp_frame;
963 -// Frame given to user to acquire data
964 - VFrame *user_frame;
967 - VDeviceBUZInput *input_thread;
969 - struct buz_params bparm;
970 - struct buz_requestbuffers breq;
971 -// Can't CSYNC the first loop
973 -// Number of output frame to load
984 diff -Nru cinelerra.orig//cinelerra/vdevicebuz.inc cinelerra/cinelerra/vdevicebuz.inc
985 --- cinelerra.orig//cinelerra/vdevicebuz.inc 2010-11-24 18:18:03.000000000 -0500
986 +++ cinelerra/cinelerra/vdevicebuz.inc 1969-12-31 19:00:00.000000000 -0500
991 - * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
993 - * This program is free software; you can redistribute it and/or modify
994 - * it under the terms of the GNU General Public License as published by
995 - * the Free Software Foundation; either version 2 of the License, or
996 - * (at your option) any later version.
998 - * This program is distributed in the hope that it will be useful,
999 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1000 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1001 - * GNU General Public License for more details.
1003 - * You should have received a copy of the GNU General Public License
1004 - * along with this program; if not, write to the Free Software
1005 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1009 -#ifndef VDEVICEBUZ_INC
1010 -#define VDEVICEBUZ_INC
1013 -class VDeviceBUZInput;
1016 diff -Nru cinelerra.orig//cinelerra/vdevicev4l.C cinelerra/cinelerra/vdevicev4l.C
1017 --- cinelerra.orig//cinelerra/vdevicev4l.C 2010-11-24 18:18:03.000000000 -0500
1018 +++ cinelerra/cinelerra/vdevicev4l.C 1969-12-31 19:00:00.000000000 -0500
1023 - * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
1025 - * This program is free software; you can redistribute it and/or modify
1026 - * it under the terms of the GNU General Public License as published by
1027 - * the Free Software Foundation; either version 2 of the License, or
1028 - * (at your option) any later version.
1030 - * This program is distributed in the hope that it will be useful,
1031 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1032 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1033 - * GNU General Public License for more details.
1035 - * You should have received a copy of the GNU General Public License
1036 - * along with this program; if not, write to the Free Software
1037 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1041 -// V4L2 is incompatible with large file support
1042 -// ALPHA C++ can't compile 64 bit headers
1043 -#undef _FILE_OFFSET_BITS
1044 -#undef _LARGEFILE_SOURCE
1045 -#undef _LARGEFILE64_SOURCE
1048 -#include "assets.h"
1049 -#include "bcsignals.h"
1050 -#include "channel.h"
1051 -#include "chantables.h"
1054 -#include "picture.h"
1055 -#include "preferences.h"
1056 -#include "quicktime.h"
1057 -#include "recordconfig.h"
1058 -#include "vdevicev4l.h"
1059 -#include "vframe.h"
1060 -#include "videodevice.h"
1062 -#include <unistd.h>
1063 -#include <sys/ioctl.h>
1065 -#include <sys/mman.h>
1066 -#include <string.h>
1068 -VDeviceV4L::VDeviceV4L(VideoDevice *device)
1069 - : VDeviceBase(device)
1074 -VDeviceV4L::~VDeviceV4L()
1078 -int VDeviceV4L::initialize()
1080 - capture_buffer = 0;
1081 - capture_frame_number = 0;
1082 - read_frame_number = 0;
1083 - shared_memory = 0;
1084 - initialization_complete = 0;
1088 -int VDeviceV4L::open_input()
1090 - device->channel->use_frequency = 1;
1091 - device->channel->use_fine = 1;
1092 - device->channel->use_norm = 1;
1093 - device->channel->use_input = 1;
1096 - device->picture->use_brightness = 1;
1097 - device->picture->use_contrast = 1;
1098 - device->picture->use_color = 1;
1099 - device->picture->use_hue = 1;
1100 - device->picture->use_whiteness = 1;
1102 - if((input_fd = open(device->in_config->v4l_in_device, O_RDWR)) < 0)
1104 - perror("VDeviceV4L::open_input");
1109 - v4l1_get_inputs();
1115 -int VDeviceV4L::close_all()
1121 -int VDeviceV4L::close_v4l()
1123 - unmap_v4l_shmem();
1124 - if(input_fd != -1) close(input_fd);
1128 -int VDeviceV4L::unmap_v4l_shmem()
1130 - if(capture_buffer)
1133 - munmap(capture_buffer, capture_params.size);
1135 - delete capture_buffer;
1136 - capture_buffer = 0;
1141 -int VDeviceV4L::v4l_init()
1145 - input_fd = open(device->in_config->v4l_in_device, O_RDWR);
1148 - perror("VDeviceV4L::v4l_init");
1151 - set_cloexec_flag(input_fd, 1);
1153 - if(ioctl(input_fd, VIDIOCGWIN, &window_params) < 0)
1154 - perror("VDeviceV4L::v4l_init VIDIOCGWIN");
1155 - window_params.x = 0;
1156 - window_params.y = 0;
1157 - window_params.width = device->in_config->w;
1158 - window_params.height = device->in_config->h;
1159 - window_params.chromakey = 0;
1160 - window_params.flags = 0;
1161 - window_params.clipcount = 0;
1162 - if(ioctl(input_fd, VIDIOCSWIN, &window_params) < 0)
1163 - perror("VDeviceV4L::v4l_init VIDIOCSWIN");
1164 - if(ioctl(input_fd, VIDIOCGWIN, &window_params) < 0)
1165 - perror("VDeviceV4L::v4l_init VIDIOCGWIN");
1167 - device->in_config->w = window_params.width;
1168 - device->in_config->h = window_params.height;
1170 - PictureConfig picture(0);
1171 - set_picture(&picture);
1173 - if(ioctl(input_fd, VIDIOCGMBUF, &capture_params) < 0)
1174 - perror("VDeviceV4L::v4l_init VIDIOCGMBUF");
1176 - capture_buffer = (char*)mmap(0,
1177 - capture_params.size,
1178 - PROT_READ|PROT_WRITE,
1183 - capture_frame_number = 0;
1185 - if(capture_buffer == MAP_FAILED)
1187 -// Use read instead.
1188 - perror("VDeviceV4L::v4l_init mmap");
1189 - shared_memory = 0;
1190 - capture_buffer = new char[capture_params.size];
1194 -// Get all frames capturing
1195 - shared_memory = 1;
1198 - got_first_frame = 0;
1202 -void VDeviceV4L::v4l1_start_capture()
1204 - for(int i = 0; i < MIN(capture_params.frames, device->in_config->capture_length); i++)
1215 -int VDeviceV4L::v4l1_get_inputs()
1217 - struct video_channel channel_struct;
1218 - int i = 0, done = 0;
1221 - while(!done && i < 20)
1223 - channel_struct.channel = i;
1224 - if(ioctl(input_fd, VIDIOCGCHAN, &channel_struct) < 0)
1231 - Channel *channel = new Channel;
1232 - strcpy(channel->device_name, channel_struct.name);
1233 - device->input_sources.append(channel);
1240 -int VDeviceV4L::set_mute(int muted)
1242 -// Open audio, which obviously is controlled by the video driver.
1243 -// and apparently resets the input source.
1244 - v4l1_set_mute(muted);
1247 -int VDeviceV4L::v4l1_set_mute(int muted)
1249 - struct video_audio audio;
1251 - if(ioctl(input_fd, VIDIOCGAUDIO, &audio))
1252 - if(ioctl(input_fd, VIDIOCGAUDIO, &audio) < 0)
1253 - perror("VDeviceV4L::ioctl VIDIOCGAUDIO");
1255 - audio.volume = 65535;
1256 - audio.bass = 65535;
1257 - audio.treble = 65535;
1259 - audio.flags |= VIDEO_AUDIO_MUTE | VIDEO_AUDIO_VOLUME;
1261 - audio.flags &= ~VIDEO_AUDIO_MUTE;
1263 - if(ioctl(input_fd, VIDIOCSAUDIO, &audio) < 0)
1264 - perror("VDeviceV4L::ioctl VIDIOCSAUDIO");
1269 -int VDeviceV4L::set_cloexec_flag(int desc, int value)
1271 - int oldflags = fcntl(desc, F_GETFD, 0);
1272 - if(oldflags < 0) return oldflags;
1274 - oldflags |= FD_CLOEXEC;
1276 - oldflags &= ~FD_CLOEXEC;
1277 - return fcntl(desc, F_SETFD, oldflags);
1284 -int VDeviceV4L::get_best_colormodel(Asset *asset)
1286 - int result = BC_RGB888;
1288 -// Get best colormodel for hardware acceleration
1290 - result = File::get_best_colormodel(asset, device->in_config->driver);
1293 -// Need to get color model before opening device but don't call this
1294 -// unless you want to open the device either.
1295 - if(!initialization_complete)
1297 - device_colormodel = translate_colormodel(result);
1298 - this->colormodel = result;
1300 - initialization_complete = 1;
1302 -// printf("VDeviceV4L::get_best_colormodel %c%c%c%c\n",
1303 -// ((char*)&device_colormodel)[0],
1304 -// ((char*)&device_colormodel)[1],
1305 -// ((char*)&device_colormodel)[2],
1306 -// ((char*)&device_colormodel)[3]);
1310 -unsigned long VDeviceV4L::translate_colormodel(int colormodel)
1312 - unsigned long result = 0;
1313 - switch(colormodel)
1315 - case BC_YUV422: result = VIDEO_PALETTE_YUV422; break;
1316 - case BC_YUV420P: result = VIDEO_PALETTE_YUV420P; break;
1317 - case BC_YUV422P: result = VIDEO_PALETTE_YUV422P; break;
1318 - case BC_YUV411P: result = VIDEO_PALETTE_YUV411P; break;
1319 - case BC_RGB888: result = VIDEO_PALETTE_RGB24; break;
1320 - default: result = VIDEO_PALETTE_RGB24; break;
1322 -//printf("VDeviceV4L::translate_colormodel %d\n", result);
1326 -int VDeviceV4L::set_channel(Channel *channel)
1328 - return v4l1_set_channel(channel);
1331 -int VDeviceV4L::v4l1_set_channel(Channel *channel)
1333 - struct video_channel channel_struct;
1334 - struct video_tuner tuner_struct;
1335 - unsigned long new_freq;
1337 -// Mute changed the input to TV
1340 -//printf("VDeviceV4L::v4l1_set_channel 1 %d\n", channel->input);
1341 -// Read norm/input defaults
1342 - channel_struct.channel = channel->input;
1343 - if(ioctl(input_fd, VIDIOCGCHAN, &channel_struct) < 0)
1344 - perror("VDeviceV4L::v4l1_set_channel VIDIOCGCHAN");
1347 - channel_struct.channel = channel->input;
1348 - channel_struct.norm = v4l1_get_norm(channel->norm);
1349 - if(ioctl(input_fd, VIDIOCSCHAN, &channel_struct) < 0)
1350 - perror("VDeviceV4L::v4l1_set_channel VIDIOCSCHAN");
1352 - if(channel_struct.flags & VIDEO_VC_TUNER)
1354 -// Read tuner defaults
1355 - tuner_struct.tuner = channel->input;
1356 - if(ioctl(input_fd, VIDIOCGTUNER, &tuner_struct) < 0)
1357 - perror("VDeviceV4L::v4l1_set_channel VIDIOCGTUNER");
1360 - tuner_struct.mode = v4l1_get_norm(channel->norm);
1361 - if(ioctl(input_fd, VIDIOCSTUNER, &tuner_struct) < 0)
1362 - perror("VDeviceV4L::v4l1_set_channel VIDIOCSTUNER");
1364 - new_freq = chanlists[channel->freqtable].list[channel->entry].freq;
1365 - new_freq = (int)(new_freq * 0.016);
1366 - new_freq += channel->fine_tune;
1368 - if(ioctl(input_fd, VIDIOCSFREQ, &new_freq) < 0)
1369 - perror("VDeviceV4L::v4l1_set_channel VIDIOCSFREQ");
1375 -int VDeviceV4L::v4l1_get_norm(int norm)
1379 - case NTSC: return VIDEO_MODE_NTSC; break;
1380 - case PAL: return VIDEO_MODE_PAL; break;
1381 - case SECAM: return VIDEO_MODE_SECAM; break;
1386 -int VDeviceV4L::set_picture(PictureConfig *picture)
1388 - v4l1_set_picture(picture);
1392 -int VDeviceV4L::v4l1_set_picture(PictureConfig *picture)
1394 - int brightness = (int)((float)picture->brightness / 100 * 32767 + 32768);
1395 - int hue = (int)((float)picture->hue / 100 * 32767 + 32768);
1396 - int color = (int)((float)picture->color / 100 * 32767 + 32768);
1397 - int contrast = (int)((float)picture->contrast / 100 * 32767 + 32768);
1398 - int whiteness = (int)((float)picture->whiteness / 100 * 32767 + 32768);
1400 - if(ioctl(input_fd, VIDIOCGPICT, &picture_params) < 0)
1401 - perror("VDeviceV4L::v4l1_set_picture VIDIOCGPICT");
1402 - picture_params.brightness = brightness;
1403 - picture_params.hue = hue;
1404 - picture_params.colour = color;
1405 - picture_params.contrast = contrast;
1406 - picture_params.whiteness = whiteness;
1407 -// Bogus. Values are only set in the capture routine.
1408 - picture_params.depth = 3;
1409 - picture_params.palette = device_colormodel;
1410 - if(ioctl(input_fd, VIDIOCSPICT, &picture_params) < 0)
1411 - perror("VDeviceV4L::v4l1_set_picture VIDIOCSPICT");
1412 - if(ioctl(input_fd, VIDIOCGPICT, &picture_params) < 0)
1413 - perror("VDeviceV4L::v4l1_set_picture VIDIOCGPICT");
1418 -int VDeviceV4L::capture_frame(int capture_frame_number)
1420 - struct video_mmap params;
1421 - params.frame = capture_frame_number;
1422 - params.width = device->in_config->w;
1423 - params.height = device->in_config->h;
1424 -// Required to actually set the palette.
1425 - params.format = device_colormodel;
1426 -// Tells the driver the buffer is available for writing
1427 - if(ioctl(input_fd, VIDIOCMCAPTURE, ¶ms) < 0)
1428 - perror("VDeviceV4L::capture_frame VIDIOCMCAPTURE");
1432 -int VDeviceV4L::wait_v4l_frame()
1434 -//printf("VDeviceV4L::wait_v4l_frame 1 %d\n", capture_frame_number);
1435 - if(ioctl(input_fd, VIDIOCSYNC, &capture_frame_number))
1436 - perror("VDeviceV4L::wait_v4l_frame VIDIOCSYNC");
1437 -//printf("VDeviceV4L::wait_v4l_frame 2 %d\n", capture_frame_number);
1441 -int VDeviceV4L::read_v4l_frame(VFrame *frame)
1443 - frame_to_vframe(frame, (unsigned char*)capture_buffer + capture_params.offsets[capture_frame_number]);
1448 -#define MIN(x, y) ((x) < (y) ? (x) : (y))
1451 -int VDeviceV4L::frame_to_vframe(VFrame *frame, unsigned char *input)
1453 - int inwidth, inheight;
1454 - int width, height;
1456 - inwidth = window_params.width;
1457 - inheight = window_params.height;
1459 - width = MIN(inwidth, frame->get_w());
1460 - height = MIN(inheight, frame->get_h());
1461 -//printf("VDeviceV4L::frame_to_vframe %d %d\n", colormodel, frame->get_color_model());
1463 - if(frame->get_color_model() == colormodel)
1465 - switch(frame->get_color_model())
1469 - unsigned char *row_in;
1470 - unsigned char *row_out_start, *row_out_end;
1471 - int bytes_per_inrow = inwidth * 3;
1472 - int bytes_per_outrow = frame->get_bytes_per_line();
1473 - unsigned char **rows_out = frame->get_rows();
1475 - for(int i = 0; i < frame->get_h(); i++)
1477 - row_in = input + bytes_per_inrow * i;
1478 - row_out_start = rows_out[i];
1479 - row_out_end = row_out_start +
1480 - MIN(bytes_per_outrow, bytes_per_inrow);
1482 - while(row_out_start < row_out_end)
1484 - *row_out_start++ = row_in[2];
1485 - *row_out_start++ = row_in[1];
1486 - *row_out_start++ = row_in[0];
1495 - memcpy(frame->get_y(), input, width * height);
1496 - memcpy(frame->get_u(), input + width * height, width * height / 4);
1497 - memcpy(frame->get_v(), input + width * height + width * height / 4, width * height / 4);
1501 - memcpy(frame->get_y(), input, width * height);
1502 - memcpy(frame->get_u(), input + width * height, width * height / 2);
1503 - memcpy(frame->get_v(), input + width * height + width * height / 2, width * height / 2);
1507 - memcpy(frame->get_data(),
1509 - VFrame::calculate_data_size(width,
1512 - frame->get_color_model()));
1518 - VFrame *in_frame = new VFrame(input,
1523 - cmodel_transfer(frame->get_rows(),
1524 - in_frame->get_rows(),
1528 - in_frame->get_y(),
1529 - in_frame->get_u(),
1530 - in_frame->get_v(),
1540 - frame->get_color_model(),
1550 -int VDeviceV4L::next_frame(int previous_frame)
1552 - int result = previous_frame + 1;
1554 - if(result >= MIN(capture_params.frames, device->in_config->capture_length)) result = 0;
1558 -int VDeviceV4L::read_buffer(VFrame *frame)
1565 -// Read the current frame
1566 - if(!got_first_frame) v4l1_start_capture();
1568 - read_v4l_frame(frame);
1569 -// Free this frame up for capturing
1570 - capture_frame(capture_frame_number);
1571 -// Advance the frame to capture.
1572 - capture_frame_number = next_frame(capture_frame_number);
1576 - read(input_fd, capture_buffer, capture_params.size);
1578 - got_first_frame = 1;
1594 diff -Nru cinelerra.orig//cinelerra/vdevicev4l.h cinelerra/cinelerra/vdevicev4l.h
1595 --- cinelerra.orig//cinelerra/vdevicev4l.h 2010-11-24 18:18:03.000000000 -0500
1596 +++ cinelerra/cinelerra/vdevicev4l.h 1969-12-31 19:00:00.000000000 -0500
1601 - * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
1603 - * This program is free software; you can redistribute it and/or modify
1604 - * it under the terms of the GNU General Public License as published by
1605 - * the Free Software Foundation; either version 2 of the License, or
1606 - * (at your option) any later version.
1608 - * This program is distributed in the hope that it will be useful,
1609 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1610 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1611 - * GNU General Public License for more details.
1613 - * You should have received a copy of the GNU General Public License
1614 - * along with this program; if not, write to the Free Software
1615 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1619 -#ifndef VDEVICEV4L_H
1620 -#define VDEVICEV4L_H
1622 -#include "vdevicebase.h"
1623 -#include <linux/videodev.h>
1624 -#include "videodevice.inc"
1626 -class VDeviceV4L : public VDeviceBase
1629 - VDeviceV4L(VideoDevice *device);
1635 - int read_buffer(VFrame *frame);
1636 - int get_best_colormodel(Asset *asset);
1637 - int set_channel(Channel *channel);
1638 - int set_picture(PictureConfig *picture);
1641 - int set_cloexec_flag(int desc, int value);
1642 - int set_mute(int muted);
1643 - int v4l1_get_inputs();
1644 - int v4l1_set_mute(int muted);
1645 - unsigned long translate_colormodel(int colormodel);
1646 - int v4l1_set_channel(Channel *channel);
1647 - int v4l1_get_norm(int norm);
1648 - int v4l1_set_picture(PictureConfig *picture);
1649 - void v4l1_start_capture();
1650 - int capture_frame(int capture_frame_number);
1651 - int wait_v4l_frame();
1652 - int read_v4l_frame(VFrame *frame);
1653 - int frame_to_vframe(VFrame *frame, unsigned char *input);
1654 - int next_frame(int previous_frame);
1656 - int unmap_v4l_shmem();
1659 - int input_fd, output_fd;
1660 -// FourCC Colormodel for device
1661 - unsigned long device_colormodel;
1662 -// BC colormodel for device
1666 - struct video_capability cap1;
1667 - struct video_window window_params;
1668 - struct video_picture picture_params;
1669 - struct video_mbuf capture_params; // Capture for Video4Linux
1672 - char *capture_buffer; // sequentual capture buffers for v4l1 or read buffer for v4l2
1673 - int capture_frame_number; // number of frame to capture into
1674 - int read_frame_number; // number of the captured frame to read
1675 - int shared_memory; // Capturing directly to memory
1676 - int initialization_complete;
1677 - int got_first_frame;
1681 diff -Nru cinelerra.orig//cinelerra/vdevicev4l.inc cinelerra/cinelerra/vdevicev4l.inc
1682 --- cinelerra.orig//cinelerra/vdevicev4l.inc 2010-11-24 18:18:03.000000000 -0500
1683 +++ cinelerra/cinelerra/vdevicev4l.inc 1969-12-31 19:00:00.000000000 -0500
1688 - * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
1690 - * This program is free software; you can redistribute it and/or modify
1691 - * it under the terms of the GNU General Public License as published by
1692 - * the Free Software Foundation; either version 2 of the License, or
1693 - * (at your option) any later version.
1695 - * This program is distributed in the hope that it will be useful,
1696 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1697 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1698 - * GNU General Public License for more details.
1700 - * You should have received a copy of the GNU General Public License
1701 - * along with this program; if not, write to the Free Software
1702 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1706 -#ifndef VDEVICEV4L_INC
1707 -#define VDEVICEV4L_INC
1712 diff -Nru cinelerra.orig//cinelerra/videodevice.C cinelerra/cinelerra/videodevice.C
1713 --- cinelerra.orig//cinelerra/videodevice.C 2010-11-24 18:18:03.000000000 -0500
1714 +++ cinelerra/cinelerra/videodevice.C 2011-02-17 13:41:53.239880001 -0500
1716 #ifdef HAVE_FIREWIRE
1717 #include "vdevice1394.h"
1719 -#include "vdevicebuz.h"
1720 +//#include "vdevicebuz.h"
1721 #include "vdevicedvb.h"
1722 -#include "vdevicev4l.h"
1723 +//#include "vdevicev4l.h"
1724 #include "vdevicev4l2.h"
1725 #include "vdevicev4l2jpeg.h"
1726 #include "vdevicex11.h"
1728 result = input_base->open_input();
1732 #ifdef HAVE_VIDEO4LINUX2
1737 switch(in_config->driver)
1740 - return input_base = new VDeviceV4L(this);
1741 + //case VIDEO4LINUX:
1742 + // return input_base = new VDeviceV4L(this);
1744 #ifdef HAVE_VIDEO4LINUX2
1748 return input_base = new VDeviceX11(this, 0);
1751 - return input_base = new VDeviceBUZ(this);
1752 + //case CAPTURE_BUZ:
1753 + // return input_base = new VDeviceBUZ(this);
1755 #ifdef HAVE_FIREWIRE
1756 case CAPTURE_FIREWIRE:
1758 //printf("VideoDevice::open_output 1 %d\n", out_config->driver);
1759 switch(out_config->driver)
1761 - case PLAYBACK_BUZ:
1762 - output_base = new VDeviceBUZ(this);
1764 + //case PLAYBACK_BUZ:
1765 + // output_base = new VDeviceBUZ(this);
1768 case PLAYBACK_X11_XV:
1769 case PLAYBACK_X11_GL:
1770 diff -Nru cinelerra.orig//cinelerra/videodevice.h cinelerra/cinelerra/videodevice.h
1771 --- cinelerra.orig//cinelerra/videodevice.h 2010-11-24 18:18:03.000000000 -0500
1772 +++ cinelerra/cinelerra/videodevice.h 2011-02-17 13:31:30.167880002 -0500
1775 #include "picture.inc"
1776 #include "vdevicebase.inc"
1777 -#include "vdevicebuz.inc"
1778 +//#include "vdevicebuz.inc"
1779 #include "vdevicelml.inc"
1780 -#include "vdevicev4l.inc"
1781 +//#include "vdevicev4l.inc"
1782 #include "vdevicex11.inc"
1783 #include "videoconfig.inc"
1784 #include "videowindow.inc"
1785 --- cinelerra-cv/cinelerra/Makefile.am~ 2011-04-06 20:33:34.474397085 +0200
1786 +++ cinelerra-cv/cinelerra/Makefile.am 2011-04-06 20:36:44.323074826 +0200
1795 --- cinelerra-cv/cinelerra/Makefile.am~ 2011-04-06 20:37:25.104939175 +0200
1796 +++ cinelerra-cv/cinelerra/Makefile.am 2011-04-06 20:40:03.768860034 +0200