linux-old/drivers/usb/pwc-uncompress.h
<<
>>
Prefs
   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#ifdef __cplusplus
  32extern "C" {
  33#endif
  34
  35/* The decompressor structure. 
  36   Every type of decompressor registers itself with the main module. 
  37   When a device is opened, it looks up the correct compressor, and
  38   uses that when a compressed video mode is requested.
  39 */
  40struct pwc_decompressor
  41{
  42        int  type;              /* type of camera (645, 680, etc) */
  43        int  table_size;        /* memory needed */
  44
  45        void (* init)(int release, void *buffer, void *table);  /* Initialization routine; should be called after each set_video_mode */
  46        void (* exit)(void);    /* Cleanup routine */
  47        void (* decompress)(struct pwc_coord *image, struct pwc_coord *view, struct pwc_coord *offset,
  48                            void *src, void *dst, int planar,
  49                            void *table, int bandlength);
  50        void (* lock)(void);    /* make sure module cannot be unloaded */
  51        void (* unlock)(void);  /* release lock on module */
  52
  53        struct list_head pwcd_list;
  54};
  55
  56
  57/* Our structure version number. Is set to the version number major */
  58extern const int pwc_decompressor_version;
  59
  60/* Adds decompressor to list, based on its 'type' field (which matches the 'type' field in pwc_device; ignores any double requests */
  61extern void pwc_register_decompressor(struct pwc_decompressor *pwcd);
  62/* Removes decompressor, based on the type number */
  63extern void pwc_unregister_decompressor(int type);
  64/* Returns pointer to decompressor struct, or NULL if it doesn't exist */
  65extern struct pwc_decompressor *pwc_find_decompressor(int type);
  66
  67#ifdef CONFIG_USB_PWCX
  68/* If the decompressor is compiled in, we must call these manually */
  69extern int usb_pwcx_init(void);
  70extern void usb_pwcx_exit(void);
  71#endif
  72
  73#ifdef __cplusplus
  74}
  75#endif
  76
  77#endif
  78
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.