00001 #ifdef HAVE_FIREWIRE
00002
00003
00004
00005 #include "audiodevice.h"
00006 #include "condition.h"
00007 #include "device1394output.h"
00008 #include "mutex.h"
00009 #include "playbackconfig.h"
00010 #include "bctimer.h"
00011 #include "vframe.h"
00012 #include "videodevice.h"
00013
00014 #include <errno.h>
00015 #include <fcntl.h>
00016 #include <string.h>
00017 #include <sys/ioctl.h>
00018 #include <sys/mman.h>
00019 #include <unistd.h>
00020 #include <sys/utsname.h>
00021
00022
00023
00024
00025
00026
00027 #define CIP_N_NTSC 2436
00028 #define CIP_D_NTSC 38400
00029 #define CIP_N_PAL 1
00030 #define CIP_D_PAL 16
00031 #define OUTPUT_SAMPLES 262144
00032 #define BUFFER_TIMEOUT 500000
00033
00034
00035 Device1394Output::Device1394Output(AudioDevice *adevice)
00036 : Thread(1, 0, 0)
00037 {
00038 reset();
00039 this->adevice = adevice;
00040
00041 set_ioctls();
00042 }
00043
00044 Device1394Output::Device1394Output(VideoDevice *vdevice)
00045 : Thread(1, 0, 0)
00046 {
00047 reset();
00048 this->vdevice = vdevice;
00049
00050 set_ioctls();
00051 }
00052
00053 Device1394Output::~Device1394Output()
00054 {
00055 if(Thread::running())
00056 {
00057 done = 1;
00058 start_lock->unlock();
00059 Thread::cancel();
00060 Thread::join();
00061 }
00062
00063 if(buffer)
00064 {
00065 for(int i = 0; i < total_buffers; i++)
00066 {
00067 if(buffer[i]) delete [] buffer[i];
00068 }
00069 delete [] buffer;
00070 delete [] buffer_size;
00071 delete [] buffer_valid;
00072 }
00073
00074 if(audio_lock) delete audio_lock;
00075 if(video_lock) delete video_lock;
00076 if(start_lock) delete start_lock;
00077 if(audio_buffer) delete [] audio_buffer;
00078
00079 if(output_fd >= 0)
00080 {
00081 output_queue.buffer = (output_mmap.nb_buffers + output_queue.buffer - 1) % output_mmap.nb_buffers;
00082
00083 if(get_dv1394())
00084 {
00085 if(ioctl(output_fd, DV1394_IOC_WAIT_FRAMES, status.init.n_frames - 1) < 0)
00086 {
00087 fprintf(stderr,
00088 "Device1394Output::close_all: DV1394_WAIT_FRAMES %i: %s",
00089 output_mmap.nb_buffers,
00090 strerror(errno));
00091 }
00092 munmap(output_buffer, status.init.n_frames *
00093 (is_pal ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE));
00094 if(ioctl(output_fd, DV1394_IOC_SHUTDOWN, NULL) < 0)
00095 {
00096 perror("Device1394Output::close_all: DV1394_SHUTDOWN");
00097 }
00098 }
00099 else
00100 {
00101 if(ioctl(output_fd, video1394_talk_wait_buffer, &output_queue) < 0)
00102 {
00103 fprintf(stderr,
00104 "Device1394::close_all: VIDEO1394_TALK_WAIT_BUFFER %s: %s",
00105 output_queue,
00106 strerror(errno));
00107 }
00108 munmap(output_buffer, output_mmap.nb_buffers * output_mmap.buf_size);
00109
00110 if(ioctl(output_fd, video1394_untalk_channel, &output_mmap.channel) < 0)
00111 {
00112 perror("Device1394::close_all: VIDEO1394_UNTALK_CHANNEL");
00113 }
00114 }
00115
00116 close(output_fd);
00117
00118
00119
00120 }
00121
00122 if(temp_frame) delete temp_frame;
00123 if(temp_frame2) delete temp_frame2;
00124 if(video_encoder) dv_delete(video_encoder);
00125 if(position_presented) delete [] position_presented;
00126 if(audio_encoder) dv_delete(audio_encoder);
00127 if(buffer_lock) delete buffer_lock;
00128 if(position_lock) delete position_lock;
00129 }
00130
00131
00132 void Device1394Output::reset()
00133 {
00134 buffer = 0;
00135 buffer_size = 0;
00136 total_buffers = 0;
00137 current_inbuffer = 0;
00138 current_outbuffer = 0;
00139 done = 0;
00140 audio_lock = 0;
00141 video_lock = 0;
00142 start_lock = 0;
00143 buffer_lock = 0;
00144 position_lock = 0;
00145 video_encoder = 0;
00146 audio_encoder = 0;
00147 audio_buffer = 0;
00148 audio_samples = 0;
00149 output_fd = -1;
00150
00151 temp_frame = 0;
00152 temp_frame2 = 0;
00153 audio_position = 0;
00154 interrupted = 0;
00155 position_presented = 0;
00156 have_video = 0;
00157 adevice = 0;
00158 vdevice = 0;
00159 is_pal = 0;
00160 }
00161
00162 int Device1394Output::get_dv1394()
00163 {
00164 if(adevice) return adevice->out_config->driver == AUDIO_DV1394;
00165 if(vdevice) return vdevice->out_config->driver == PLAYBACK_DV1394;
00166 }
00167
00168 int Device1394Output::open(char *path,
00169 int port,
00170 int channel,
00171 int length,
00172 int channels,
00173 int bits,
00174 int samplerate,
00175 int syt)
00176 {
00177 this->channels = channels;
00178 this->bits = bits;
00179 this->samplerate = samplerate;
00180 this->total_buffers = length;
00181 if (get_dv1394())
00182 {
00183
00184
00185 if (syt < 2 || syt > 3)
00186 syt = 3;
00187 }
00188 this->syt = syt;
00189
00190
00191 if(vdevice) is_pal = (vdevice->out_h == 576);
00192
00193 struct dv1394_init setup =
00194 {
00195 api_version: DV1394_API_VERSION,
00196 channel: channel,
00197 n_frames: length,
00198 format: is_pal ? DV1394_PAL : DV1394_NTSC,
00199 cip_n: 0,
00200 cip_d: 0,
00201 syt_offset: syt
00202 };
00203
00204
00205
00206
00207 if(output_fd < 0)
00208 {
00209 output_fd = ::open(path, O_RDWR);
00210
00211 if(output_fd <= 0)
00212 {
00213 fprintf(stderr,
00214 "Device1394Output::open path=%s: %s\n",
00215 path,
00216 strerror(errno));
00217 return 1;
00218 }
00219 else
00220 {
00221 output_mmap.channel = channel;
00222 output_queue.channel = channel;
00223 output_mmap.sync_tag = 0;
00224 output_mmap.nb_buffers = total_buffers;
00225 output_mmap.buf_size = 320 * 512;
00226 output_mmap.packet_size = 512;
00227
00228
00229
00230 output_mmap.syt_offset = syt;
00231 output_mmap.flags = VIDEO1394_VARIABLE_PACKET_SIZE;
00232
00233
00234
00235 if(get_dv1394())
00236 {
00237 if(ioctl(output_fd, DV1394_IOC_INIT, &setup) < 0)
00238 {
00239 perror("Device1394Output::open DV1394_INIT");
00240 }
00241
00242 if(ioctl(output_fd, DV1394_IOC_GET_STATUS, &status) < 0)
00243 {
00244 perror("Device1394Output::open DV1394_GET_STATUS");
00245 }
00246
00247 output_buffer = (unsigned char*)mmap(0,
00248 output_mmap.nb_buffers * (is_pal ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE),
00249 PROT_READ | PROT_WRITE,
00250 MAP_SHARED,
00251 output_fd,
00252 0);
00253
00254 if(position_presented) delete [] position_presented;
00255 position_presented = new long[length];
00256 for (int i = 0; i < length; i++)
00257 position_presented[i] = 0;
00258 }
00259 else
00260 {
00261 if(ioctl(output_fd, video1394_talk_channel, &output_mmap) < 0)
00262 {
00263 perror("Device1394Output::open VIDEO1394_TALK_CHANNEL:");
00264 }
00265
00266 output_buffer = (unsigned char*)mmap(0,
00267 output_mmap.nb_buffers * output_mmap.buf_size,
00268 PROT_READ | PROT_WRITE,
00269 MAP_SHARED,
00270 output_fd,
00271 0);
00272 }
00273
00274 if(output_buffer <= 0)
00275 {
00276 perror("Device1394Output::open mmap");
00277 }
00278
00279 unused_buffers = output_mmap.nb_buffers;
00280 output_queue.buffer = 0;
00281 output_queue.packet_sizes = packet_sizes;
00282 continuity_counter = 0;
00283 cip_counter = 0;
00284
00285
00286 buffer = new char*[total_buffers];
00287 for(int i = 0; i < length; i++)
00288 buffer[i] = new char[get_dv1394() ?
00289 (is_pal ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE) :
00290 DV_PAL_SIZE];
00291 buffer_size = new int[total_buffers];
00292 buffer_valid = new int[total_buffers];
00293 bzero(buffer_size, sizeof(int) * total_buffers);
00294 bzero(buffer_valid, sizeof(int) * total_buffers);
00295 bzero(buffer, sizeof(char*) * total_buffers);
00296 video_lock = new Condition(0, "Device1394Output::video_lock");
00297 audio_lock = new Condition(0, "Device1394Output::audio_lock");
00298 start_lock = new Condition(0, "Device1394Output::start_lock");
00299 buffer_lock = new Mutex("Device1394Output::buffer_lock");
00300 position_lock = new Mutex("Device1394Output::position_lock");
00301 encoder = dv_new();
00302 audio_buffer = new char[OUTPUT_SAMPLES * channels * bits / 8];
00303 Thread::start();
00304 }
00305 }
00306 return 0;
00307 }
00308
00309 void Device1394Output::run()
00310 {
00311 unsigned char *output;
00312 char *out_buffer;
00313 int out_size;
00314
00315 Thread::enable_cancel();
00316 start_lock->lock("Device1394Output::run");
00317 Thread::disable_cancel();
00318
00319
00320
00321 while(!done)
00322 {
00323
00324 if(done) return;
00325
00326 buffer_lock->lock("Device1394Output::run 1");
00327
00328 out_buffer = buffer[current_outbuffer];
00329 out_size = buffer_size[current_outbuffer];
00330
00331
00332
00333
00334
00335
00336 if(!have_video)
00337 {
00338 #include "data/fake_ntsc_dv.h"
00339 out_size = sizeof(fake_ntsc_dv) - 4;
00340 out_buffer = (char*)fake_ntsc_dv + 4;
00341 }
00342
00343
00344
00345
00346 if(get_dv1394())
00347 {
00348 output = output_buffer +
00349 out_size *
00350 status.first_clear_frame;
00351 }
00352 else
00353 {
00354 output = output_buffer +
00355 output_queue.buffer *
00356 output_mmap.buf_size;
00357 }
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367 if(out_buffer && out_size)
00368 {
00369
00370
00371 int samples_per_frame = 2048;
00372
00373
00374 if(audio_samples > samples_per_frame)
00375 {
00376
00377 int samples_written = dv_write_audio(encoder,
00378 (unsigned char*)out_buffer,
00379 (unsigned char*)audio_buffer,
00380 samples_per_frame,
00381 channels,
00382 bits,
00383 samplerate,
00384 is_pal ? DV_PAL : DV_NTSC);
00385 memcpy(audio_buffer,
00386 audio_buffer + samples_written * bits * channels / 8,
00387 (audio_samples - samples_written) * bits * channels / 8);
00388 audio_samples -= samples_written;
00389 position_lock->lock("Device1394Output::run");
00390
00391 if (get_dv1394())
00392 {
00393
00394
00395
00396 position_presented[status.first_clear_frame] =
00397 audio_position - syt * samples_per_frame;
00398 if (position_presented[status.first_clear_frame] < 0)
00399 position_presented[status.first_clear_frame] = 0;
00400 }
00401
00402 audio_position += samples_written;
00403 position_lock->unlock();
00404
00405
00406 audio_lock->unlock();
00407 }
00408
00409
00410 if(get_dv1394())
00411 {
00412 memcpy(output, out_buffer, out_size);
00413 }
00414 else
00415 {
00416 encrypt((unsigned char*)output,
00417 (unsigned char*)out_buffer,
00418 out_size);
00419 }
00420 buffer_valid[current_outbuffer] = 0;
00421 }
00422
00423
00424 increment_counter(¤t_outbuffer);
00425
00426
00427 if(!buffer_valid[current_outbuffer])
00428 {
00429 decrement_counter(¤t_outbuffer);
00430 }
00431 else
00432
00433 {
00434 video_lock->unlock();
00435 }
00436
00437
00438 buffer_lock->unlock();
00439
00440
00441
00442
00443 if(out_size > 0)
00444 {
00445
00446
00447 Thread::enable_cancel();
00448 unused_buffers--;
00449
00450
00451 if(get_dv1394())
00452 {
00453 if(ioctl(output_fd, DV1394_IOC_SUBMIT_FRAMES, 1) < 0)
00454 {
00455 perror("Device1394Output::run DV1394_SUBMIT_FRAMES");
00456 }
00457 if(ioctl(output_fd, DV1394_IOC_WAIT_FRAMES, 1) < 0)
00458 {
00459 perror("Device1394Output::run DV1394_WAIT_FRAMES");
00460 }
00461 if(ioctl(output_fd, DV1394_IOC_GET_STATUS, &status) < 0)
00462 {
00463 perror("Device1394Output::run DV1394_GET_STATUS");
00464 }
00465 }
00466 else
00467 {
00468 if(ioctl(output_fd, video1394_talk_queue_buffer, &output_queue) < 0)
00469 {
00470 perror("Device1394Output::run VIDEO1394_TALK_QUEUE_BUFFER");
00471 }
00472 }
00473
00474 output_queue.buffer++;
00475 if(output_queue.buffer >= output_mmap.nb_buffers)
00476 output_queue.buffer = 0;
00477
00478 if(unused_buffers <= 0)
00479 {
00480 if(!get_dv1394())
00481 {
00482 if(ioctl(output_fd, video1394_talk_wait_buffer, &output_queue) < 0)
00483 {
00484 perror("Device1394::run VIDEO1394_TALK_WAIT_BUFFER");
00485 }
00486 }
00487 unused_buffers++;
00488 }
00489
00490
00491 Thread::disable_cancel();
00492 }
00493 else
00494 {
00495
00496
00497
00498 }
00499
00500
00501 }
00502 }
00503
00504
00505
00506 void Device1394Output::encrypt(unsigned char *output,
00507 unsigned char *data,
00508 int data_size)
00509 {
00510
00511 int output_size = 320;
00512 int packets_per_frame = (is_pal ? 300 : 250);
00513 int min_packet_size = output_mmap.packet_size;
00514 unsigned long frame_size = packets_per_frame * 480;
00515 unsigned long vdata = 0;
00516 unsigned int *packet_sizes = this->packet_sizes;
00517
00518 if(cip_counter == 0)
00519 {
00520 if(!is_pal)
00521 {
00522 cip_n = CIP_N_NTSC;
00523 cip_d = CIP_D_NTSC;
00524 f50_60 = 0x00;
00525 }
00526 else
00527 {
00528 cip_n = CIP_N_PAL;
00529 cip_d = CIP_D_PAL;
00530 f50_60 = 0x80;
00531 }
00532 cip_counter = cip_n;
00533 }
00534
00535
00536
00537
00538 for(int i = 0; i < output_size && vdata < frame_size; i++)
00539 {
00540 unsigned char *p = output;
00541 int want_sync = (cip_counter > cip_d);
00542
00543
00544 *p++ = 0x01;
00545
00546 *p++ = 0x78;
00547 *p++ = 0x00;
00548 *p++ = continuity_counter;
00549
00550
00551 *p++ = 0x80;
00552
00553 *p++ = f50_60;
00554
00555
00556 *p++ = 0xff;
00557
00558 *p++ = 0xff;
00559
00560
00561 if(!want_sync)
00562 {
00563 continuity_counter++;
00564 cip_counter += cip_n;
00565
00566 memcpy(p, data + vdata, 480);
00567 p += 480;
00568 vdata += 480;
00569 }
00570 else
00571 cip_counter -= cip_d;
00572
00573 *packet_sizes++ = p - output;
00574 output += min_packet_size;
00575 }
00576 *packet_sizes++ = 0;
00577 }
00578
00579
00580
00581
00582 void Device1394Output::write_frame(VFrame *input)
00583 {
00584 VFrame *ptr = 0;
00585 int result = 0;
00586
00587
00588
00589 if(output_fd <= 0) return;
00590 if(interrupted) return;
00591
00592
00593 if(input->get_color_model() != BC_COMPRESSED)
00594 {
00595 if(!temp_frame) temp_frame = new VFrame;
00596 if(!encoder) encoder = dv_new();
00597 ptr = temp_frame;
00598
00599
00600 if(input->get_color_model() == BC_YUV422 &&
00601 input->get_w() == 720 &&
00602 (input->get_h() == 480 ||
00603 input->get_h() == 576))
00604 {
00605 int norm = is_pal ? DV_PAL : DV_NTSC;
00606 int data_size = is_pal ? DV_PAL_SIZE : DV_NTSC_SIZE;
00607 temp_frame->allocate_compressed_data(data_size);
00608 temp_frame->set_compressed_size(data_size);
00609
00610 dv_write_video(encoder,
00611 temp_frame->get_data(),
00612 input->get_rows(),
00613 BC_YUV422,
00614 norm);
00615 ptr = temp_frame;
00616 }
00617 else
00618
00619 {
00620 if(!temp_frame2)
00621 {
00622 int h = input->get_h();
00623
00624 if(h != 480 && h != 576) h = 480;
00625
00626 temp_frame2 = new VFrame(0,
00627 720,
00628 h,
00629 BC_YUV422);
00630
00631 }
00632
00633 int norm = is_pal ? DV_PAL : DV_NTSC;
00634 int data_size = is_pal ? DV_PAL_SIZE : DV_NTSC_SIZE;
00635 temp_frame->allocate_compressed_data(data_size);
00636 temp_frame->set_compressed_size(data_size);
00637
00638
00639 cmodel_transfer(temp_frame2->get_rows(),
00640 input->get_rows(),
00641 temp_frame2->get_y(),
00642 temp_frame2->get_u(),
00643 temp_frame2->get_v(),
00644 input->get_y(),
00645 input->get_u(),
00646 input->get_v(),
00647 0,
00648 0,
00649 MIN(temp_frame2->get_w(), input->get_w()),
00650 MIN(temp_frame2->get_h(), input->get_h()),
00651 0,
00652 0,
00653 MIN(temp_frame2->get_w(), input->get_w()),
00654 MIN(temp_frame2->get_h(), input->get_h()),
00655 input->get_color_model(),
00656 BC_YUV422,
00657 0,
00658 input->get_bytes_per_line(),
00659 temp_frame2->get_bytes_per_line());
00660
00661 dv_write_video(encoder,
00662 temp_frame->get_data(),
00663 temp_frame2->get_rows(),
00664 BC_YUV422,
00665 norm);
00666
00667
00668
00669 ptr = temp_frame;
00670 }
00671 }
00672 else
00673 ptr = input;
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686 buffer_lock->lock("Device1394Output::write_frame 1");
00687 have_video = 1;
00688
00689 while(buffer_valid[current_inbuffer] && !result && !interrupted)
00690 {
00691 buffer_lock->unlock();
00692 result = video_lock->timed_lock(BUFFER_TIMEOUT);
00693 buffer_lock->lock("Device1394Output::write_frame 2");
00694 }
00695
00696
00697
00698
00699 if(!buffer_valid[current_inbuffer])
00700 {
00701 if(!buffer[current_inbuffer])
00702 {
00703 buffer[current_inbuffer] = new char[ptr->get_compressed_size()];
00704 buffer_size[current_inbuffer] = ptr->get_compressed_size();
00705 }
00706 memcpy(buffer[current_inbuffer], ptr->get_data(), ptr->get_compressed_size());
00707 buffer_valid[current_inbuffer] = 1;
00708 increment_counter(¤t_inbuffer);
00709 }
00710 else
00711
00712 {
00713 ;
00714 }
00715
00716 buffer_lock->unlock();
00717 start_lock->unlock();
00718
00719 }
00720
00721 void Device1394Output::write_samples(char *data, int samples)
00722 {
00723
00724 int result = 0;
00725 int timeout = (int64_t)samples *
00726 (int64_t)1000000 *
00727 (int64_t)2 /
00728 (int64_t)samplerate;
00729 if(interrupted) return;
00730
00731
00732
00733
00734 if(samples > OUTPUT_SAMPLES)
00735 {
00736 printf("Device1394Output::write_samples samples=%d > OUTPUT_SAMPLES=%d\n",
00737 samples,
00738 OUTPUT_SAMPLES);
00739 return;
00740 }
00741
00742
00743
00744 buffer_lock->lock("Device1394Output::write_samples 1");
00745
00746 while(audio_samples > OUTPUT_SAMPLES - samples && !result && !interrupted)
00747 {
00748 buffer_lock->unlock();
00749 result = audio_lock->timed_lock(BUFFER_TIMEOUT);
00750 buffer_lock->lock("Device1394Output::write_samples 2");
00751 }
00752
00753 if(!interrupted && audio_samples <= OUTPUT_SAMPLES - samples)
00754 {
00755
00756 memcpy(audio_buffer + audio_samples * channels * bits / 8,
00757 data,
00758 samples * channels * bits / 8);
00759 audio_samples += samples;
00760 }
00761 buffer_lock->unlock();
00762 start_lock->unlock();
00763
00764 }
00765
00766 long Device1394Output::get_audio_position()
00767 {
00768 position_lock->lock("Device1394Output::get_audio_position");
00769 long result = audio_position;
00770 if (get_dv1394())
00771 {
00772
00773
00774 result = position_presented[status.active_frame];
00775 }
00776 position_lock->unlock();
00777 return result;
00778 }
00779
00780 void Device1394Output::interrupt()
00781 {
00782 interrupted = 1;
00783
00784 video_lock->unlock();
00785 audio_lock->unlock();
00786
00787 }
00788
00789 void Device1394Output::flush()
00790 {
00791
00792 }
00793
00794 void Device1394Output::increment_counter(int *counter)
00795 {
00796 (*counter)++;
00797 if(*counter >= total_buffers) *counter = 0;
00798 }
00799
00800 void Device1394Output::decrement_counter(int *counter)
00801 {
00802 (*counter)--;
00803 if(*counter < 0) *counter = total_buffers - 1;
00804 }
00805
00806 void Device1394Output::set_ioctls()
00807 {
00808
00809
00810
00811
00812
00813 struct utsname buf;
00814
00815
00816 uname(&buf);
00817
00818 char *ptr = strchr(buf.release, '.');
00819 int major = 2;
00820 int minor = 6;
00821 int point = 7;
00822 if(ptr)
00823 {
00824 *ptr++ = 0;
00825 major = atoi(buf.release);
00826 char *ptr2 = strchr(ptr, '.');
00827 if(ptr2)
00828 {
00829 *ptr2++ = 0;
00830 minor = atoi(ptr);
00831 point = atoi(ptr2);
00832 }
00833 }
00834
00835 if(major >= 2 && minor >= 6 && point >= 0 ||
00836 major >= 2 && minor >= 4 && point >= 23)
00837 {
00838
00839 video1394_listen_channel = VIDEO1394_IOC_LISTEN_CHANNEL;
00840 video1394_unlisten_channel = VIDEO1394_IOC_UNLISTEN_CHANNEL;
00841 video1394_listen_queue_buffer = VIDEO1394_IOC_LISTEN_QUEUE_BUFFER;
00842 video1394_listen_wait_buffer = VIDEO1394_IOC_LISTEN_WAIT_BUFFER;
00843 video1394_talk_channel = VIDEO1394_IOC_TALK_CHANNEL;
00844 video1394_untalk_channel = VIDEO1394_IOC_UNTALK_CHANNEL;
00845 video1394_talk_queue_buffer = VIDEO1394_IOC_TALK_QUEUE_BUFFER;
00846 video1394_talk_wait_buffer = VIDEO1394_IOC_TALK_WAIT_BUFFER;
00847 video1394_listen_poll_buffer = VIDEO1394_IOC_LISTEN_POLL_BUFFER;
00848
00849
00850
00851 }
00852 else
00853 {
00854
00855 video1394_listen_channel = VIDEO1394_LISTEN_CHANNEL;
00856 video1394_unlisten_channel = VIDEO1394_UNLISTEN_CHANNEL;
00857 video1394_listen_queue_buffer = VIDEO1394_LISTEN_QUEUE_BUFFER;
00858 video1394_listen_wait_buffer = VIDEO1394_LISTEN_WAIT_BUFFER;
00859 video1394_talk_channel = VIDEO1394_TALK_CHANNEL;
00860 video1394_untalk_channel = VIDEO1394_UNTALK_CHANNEL;
00861 video1394_talk_queue_buffer = VIDEO1394_TALK_QUEUE_BUFFER;
00862 video1394_talk_wait_buffer = VIDEO1394_TALK_WAIT_BUFFER;
00863 video1394_listen_poll_buffer = VIDEO1394_LISTEN_POLL_BUFFER;
00864 }
00865 }
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878 #endif // HAVE_FIREWIRE
00879
00880
00881
00882
00883
00884