1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
/*
* 1394-Based Digital Camera Control Library
*
* Linux specific type definitions
*
* Written by
* Damien Douxchamps <ddouxchamps@users.sf.net>
* David Moore <dcm@acm.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __DC1394_LINUX_H__
#define __DC1394_LINUX_H__
#include <libraw1394/raw1394.h>
#include <libraw1394/csr.h>
//#include "linux/raw1394support.h"
#include <dc1394/dc1394.h>
#include "internal.h"
struct _platform_t {
int dummy;
};
typedef struct __dc1394_capture
{
unsigned char *capture_buffer;
/* components needed for the DMA based video capture */
const unsigned char *dma_ring_buffer;
char *dma_device_file;
unsigned int dma_buffer_size;
unsigned int dma_frame_size;
unsigned int num_dma_buffers;
unsigned int dma_last_buffer;
int dma_fd;
raw1394handle_t handle;
uint32_t flags;
dc1394video_frame_t *frames;
} dc1394capture_t;
struct _platform_camera_t {
raw1394handle_t handle;
int node, port;
uint32_t generation;
dc1394camera_t * camera;
dc1394capture_t capture;
int capture_is_set;
int allocated_channel;
unsigned int allocated_bandwidth;
int iso_auto_started;
unsigned int iso_channel;
// for broadcast:
int backup_node_id;
dc1394bool_t broadcast_is_set;
};
dc1394error_t
dc1394_linux_capture_setup(platform_camera_t *craw, uint32_t num_dma_buffers,
uint32_t flags);
dc1394error_t
dc1394_linux_capture_stop(platform_camera_t *craw);
dc1394error_t
dc1394_linux_capture_dequeue (platform_camera_t * craw,
dc1394capture_policy_t policy, dc1394video_frame_t **frame_return);
dc1394error_t
dc1394_linux_capture_enqueue (platform_camera_t * craw,
dc1394video_frame_t * frame);
int
dc1394_linux_capture_get_fileno (platform_camera_t * craw);
#endif
|