-
- struct dv1394_init init =
- {
- api_version: DV1394_API_VERSION,
- channel: (unsigned int)channel,
- n_frames: (unsigned int)length,
- format: is_pal ? DV1394_PAL: DV1394_NTSC,
- cip_n: 0,
- cip_d: 0,
- syt_offset: 0
- };
- if(ioctl(fd, DV1394_IOC_INIT, &init) < 0)
- {
- printf("Device1394Input::open DV1394_IOC_INIT: %s\n", strerror(errno));
- }
-
- input_buffer = (unsigned char*)mmap(0,
- length * buffer_size,
- PROT_READ | PROT_WRITE,
- MAP_SHARED,
- fd,
- 0);
-
- if(ioctl(fd, DV1394_IOC_START_RECEIVE, 0) < 0)
- {
- perror("Device1394Input::open DV1394_START_RECEIVE");
- }
+ struct dv1394_init init = {
+ api_version: DV1394_API_VERSION,
+ channel: (unsigned int)channel,
+ n_frames: (unsigned int)length,
+ format: is_pal ? DV1394_PAL: DV1394_NTSC,
+ cip_n: 0,
+ cip_d: 0,
+ syt_offset: 0
+ };
+ if(ioctl(fd, DV1394_IOC_INIT, &init) < 0) {
+ printf("Device1394Input::open DV1394_IOC_INIT: %s\n", strerror(errno));
+ result = 1;