Subversion Repositories shark

Rev

Rev 846 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
846 giacomo 1
/* (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl)
2
 
3
   This program is free software; you can redistribute it and/or modify
4
   it under the terms of the GNU General Public License as published by
5
   the Free Software Foundation; either version 2 of the License, or
6
   (at your option) any later version.
7
 
8
   This program is distributed in the hope that it will be useful,
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
   GNU General Public License for more details.
12
 
13
   You should have received a copy of the GNU General Public License
14
   along with this program; if not, write to the Free Software
15
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
*/
17
 
18
/* This file is the bridge between the kernel module and the plugin; it
19
   describes the structures and datatypes used in both modules. Any
20
   significant change should be reflected by increasing the
21
   pwc_decompressor_version major number.
22
 */
23
#ifndef PWC_UNCOMPRESS_H
24
#define PWC_UNCOMPRESS_H
25
 
26
#include <linux/config.h>
27
#include <linux/list.h>
28
 
29
#include "pwc.h"
30
 
31
/* from pwc-dec.h */
32
#define PWCX_FLAG_PLANAR        0x0001
33
/* */
34
 
35
 
36
#ifdef __cplusplus
37
extern "C" {
38
#endif
39
 
40
/* The decompressor structure.
41
   Every type of decompressor registers itself with the main module.
42
   When a device is opened, it looks up the correct compressor, and
43
   uses that when a compressed video mode is requested.
44
 */
45
struct pwc_decompressor
46
{
47
        int  type;              /* type of camera (645, 680, etc) */
48
        int  table_size;        /* memory needed */
49
 
50
        void (* init)(int type, int release, void *buffer, void *table);        /* Initialization routine; should be called after each set_video_mode */
51
        void (* exit)(void);    /* Cleanup routine */
52
        void (* decompress)(struct pwc_coord *image, struct pwc_coord *view, struct pwc_coord *offset,
53
                            void *src, void *dst, int flags,
54
                            void *table, int bandlength);
55
        void (* lock)(void);    /* make sure module cannot be unloaded */
56
        void (* unlock)(void);  /* release lock on module */
57
 
58
        struct list_head pwcd_list;
59
};
60
 
61
 
62
/* Our structure version number. Is set to the version number major */
63
extern const int pwc_decompressor_version;
64
 
65
/* Adds decompressor to list, based on its 'type' field (which matches the 'type' field in pwc_device; ignores any double requests */
66
extern void pwc_register_decompressor(struct pwc_decompressor *pwcd);
67
/* Removes decompressor, based on the type number */
68
extern void pwc_unregister_decompressor(int type);
69
/* Returns pointer to decompressor struct, or NULL if it doesn't exist */
70
extern struct pwc_decompressor *pwc_find_decompressor(int type);
71
 
72
#ifdef CONFIG_USB_PWCX
73
/* If the decompressor is compiled in, we must call these manually */
74
extern int usb_pwcx_init(void);
75
extern void usb_pwcx_exit(void);
76
#endif
77
 
78
#ifdef __cplusplus
79
}
80
#endif
81
 
82
#endif