fullscreen segv fix, popup for 4opts preview, renderfarm print fix, pan widget upgrad...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / video1394.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 /*
23  * video1394.h - driver for OHCI 1394 boards
24  * Copyright (C)1999,2000 Sebastien Rougeaux <sebastien.rougeaux@anu.edu.au>
25  *                        Peter Schlaile <udbz@rz.uni-karlsruhe.de>
26  *
27  * This program is free software; you can redistribute it and/or modify
28  * it under the terms of the GNU General Public License as published by
29  * the Free Software Foundation; either version 2 of the License, or
30  * (at your option) any later version.
31  *
32  * This program is distributed in the hope that it will be useful,
33  * but WITHOUT ANY WARRANTY; without even the implied warranty of
34  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
35  * GNU General Public License for more details.
36  *
37  * You should have received a copy of the GNU General Public License
38  * along with this program; if not, write to the Free Software Foundation,
39  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40  */
41
42 #ifndef _VIDEO_1394_H
43 #define _VIDEO_1394_H
44
45 #define VIDEO1394_DRIVER_NAME "video1394"
46
47 #define VIDEO1394_MAX_SIZE 0x4000000
48
49 enum {
50         VIDEO1394_BUFFER_FREE = 0,
51         VIDEO1394_BUFFER_QUEUED,
52         VIDEO1394_BUFFER_READY
53 };
54
55 enum {
56         VIDEO1394_LISTEN_CHANNEL = 0,
57         VIDEO1394_UNLISTEN_CHANNEL,
58         VIDEO1394_LISTEN_QUEUE_BUFFER,
59         VIDEO1394_LISTEN_WAIT_BUFFER,  // wait until buffer is ready
60         VIDEO1394_TALK_CHANNEL,
61         VIDEO1394_UNTALK_CHANNEL,
62         VIDEO1394_TALK_QUEUE_BUFFER,
63         VIDEO1394_TALK_WAIT_BUFFER,
64         VIDEO1394_LISTEN_POLL_BUFFER   // return immediately with -EINTR if not ready
65 };
66
67 #define VIDEO1394_SYNC_FRAMES          0x00000001
68 #define VIDEO1394_INCLUDE_ISO_HEADERS  0x00000002
69 #define VIDEO1394_VARIABLE_PACKET_SIZE 0x00000004
70
71 struct video1394_mmap {
72         int channel;                    /* -1 to find an open channel in LISTEN/TALK */
73         unsigned int sync_tag;
74         unsigned int nb_buffers;
75         unsigned int buf_size;
76         unsigned int packet_size; /* For VARIABLE_PACKET_SIZE:
77                                      Maximum packet size */
78         unsigned int fps;
79         unsigned int syt_offset;
80         unsigned int flags;
81 };
82
83 /* For TALK_QUEUE_BUFFER with VIDEO1394_VARIABLE_PACKET_SIZE use */
84 struct video1394_queue_variable {
85         unsigned int channel;
86         unsigned int buffer;
87         unsigned int* packet_sizes; /* Buffer of size:
88                                        buf_size / packet_size  */
89 };
90
91 struct video1394_wait {
92         unsigned int channel;
93         unsigned int buffer;
94         struct timeval filltime;        /* time of buffer full */
95 };
96
97
98 #endif