source: eviacam/trunk/fuentes/creavision/defs.h @ 29

Last change on this file since 29 was 29, checked in by mabarracus, 4 years ago

added eviacam content

  • Property svn:executable set to *
File size: 4.4 KB
Line 
1/*******************************************************************************#
2#           guvcview              http://guvcview.berlios.de                    #
3#                                                                               #
4#           Paulo Assis <pj.assis@gmail.com>                                    #
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#ifndef DEFS_H
23#define DEFS_H
24#include <inttypes.h>
25#include <sys/types.h>
26
27#define CLEAR_LINE "\x1B[K"
28
29#ifdef WORDS_BIGENDIAN
30  #define BIGENDIAN 1
31#else
32  #define BIGENDIAN 0
33#endif
34
35#define IO_MMAP 1
36#define IO_READ 2
37
38#define ODD(x) ((x%2)?TRUE:FALSE)
39
40/*next index of ring buffer with size elements*/
41#define NEXT_IND(ind,size) ind++;if(ind>=size) ind=0
42/*previous index of ring buffer with size elements*/
43//#define PREV_IND(ind,size) ind--;if(ind<0) ind=size-1
44
45#define VIDBUFF_SIZE 45    //number of video frames in the ring buffer
46#define AUDBUFF_SIZE 100   //number of audio mpeg frames in the ring buffer
47#define MPG_NUM_SAMP 1152  //number of samples in a audio MPEG frame
48//#define MPG_NUM_FRAMES 2   //number of MPEG frames in a audio frame
49
50typedef uint64_t QWORD;
51typedef uint32_t DWORD;
52typedef uint16_t WORD;
53typedef uint8_t  BYTE;
54typedef unsigned int LONG;
55typedef unsigned int UINT;
56
57typedef unsigned long long ULLONG;
58typedef unsigned long      ULONG;
59
60typedef char* pchar;
61
62typedef int8_t     INT8;
63typedef uint8_t    UINT8;
64typedef int16_t    INT16;
65typedef uint16_t   UINT16;
66typedef int32_t    INT32;
67typedef uint32_t   UINT32;
68typedef int64_t    INT64;
69typedef uint64_t   UINT64;
70
71typedef float SAMPLE;
72
73/* 0 is device default*/
74static const int stdSampleRates[] = 
75{ 
76        0, 8000,  9600, 11025, 12000,
77        16000, 22050, 24000,
78        32000, 44100, 48000,
79        88200, 96000,
80        -1   /* Negative terminated list. */
81};
82
83/*----------- guvcview version ----------------*/
84//#define VERSION ("") /*defined in config.h*/
85//#define DEBUG (0)
86/*---------- Thread Stack Size (bytes) --------*/
87#define TSTACK (128*64*1024) /* Debian Default 128 pages of 64k = 8388608 bytes*/
88
89/*----------- AVI max file size ---------------*/
90#define AVI_MAX_SIZE (1900*1024*1024)
91/* extra size beyond MAX SIZE at wich we can still write data*/ 
92#define AVI_EXTRA_SIZE (20*1024*1024)
93
94#define INCPANTILT 64 // 1°
95
96#define WINSIZEX 480
97#define WINSIZEY 700
98
99#define AUTO_EXP 8
100#define MAN_EXP 1
101
102#define DHT_SIZE 432
103
104#define DEFAULT_WIDTH 640
105#define DEFAULT_HEIGHT 480
106
107#define DEFAULT_IMAGE_FNAME     "Image.jpg"
108#define DEFAULT_AVI_FNAME       "capture.avi"
109#define DEFAULT_FPS     25
110#define DEFAULT_FPS_NUM 1
111#define SDL_WAIT_TIME 30 /*SDL - Thread loop sleep time */
112
113/*clip value between 0 and 255*/
114#define CLIP(value) (BYTE)(((value)>0xFF)?0xff:(((value)<0)?0:(value)))
115
116/*MAX macro - gets the bigger value*/
117#ifndef MAX
118#define MAX(a,b) (((a) < (b)) ? (b) : (a))
119#endif
120
121/*FILTER FLAGS*/
122#define YUV_NOFILT (0)
123#define YUV_MIRROR (1<<0)
124#define YUV_UPTURN (1<<1)
125#define YUV_NEGATE (1<<2)
126#define YUV_MONOCR (1<<3)
127#define YUV_PIECES (1<<4)
128#define YUV_PARTICLES (1<<5)
129
130/*Audio Effects*/
131#define SND_NOEF   (0)
132#define SND_ECHO   (1<<0)
133#define SND_FUZZ   (1<<1)
134#define SND_REVERB (1<<2)
135#define SND_WAHWAH (1<<3)
136#define SND_DUCKY  (1<<4)
137
138#endif
139
Note: See TracBrowser for help on using the repository browser.