~ubuntu-branches/debian/sid/v4l-utils/sid

« back to all changes in this revision

Viewing changes to .pc/force_tinyjpeg_quirk.diff/lib/libv4lconvert/control/libv4lcontrol.h

  • Committer: Bazaar Package Importer
  • Author(s): Gregor Jasny
  • Date: 2011-08-05 17:51:03 UTC
  • Revision ID: james.westby@ubuntu.com-20110805175103-fwynovuvv6o3z9wf
Tags: 0.8.5-2
Add tinyjpeg quirk from upstream and add some more cameras

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
#             (C) 2008-2009 Elmar Kleijn <elmar_kleijn@hotmail.com>
 
3
#             (C) 2008-2009 Sjoerd Piepenbrink <need4weed@gmail.com>
 
4
#             (C) 2008-2009 Radjnies Bhansingh <radjnies@gmail.com>
 
5
#             (C) 2008-2009 Hans de Goede <hdegoede@redhat.com>
 
6
 
 
7
# This program is free software; you can redistribute it and/or modify
 
8
# it under the terms of the GNU Lesser General Public License as published by
 
9
# the Free Software Foundation; either version 2.1 of the License, or
 
10
# (at your option) any later version.
 
11
#
 
12
# This program is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
# GNU Lesser General Public License for more details.
 
16
#
 
17
# You should have received a copy of the GNU Lesser General Public License
 
18
# along with this program; if not, write to the Free Software
 
19
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335  USA
 
20
 */
 
21
 
 
22
#ifndef __LIBV4LCONTROL_H
 
23
#define __LIBV4LCONTROL_H
 
24
 
 
25
/* Flags */
 
26
#define V4LCONTROL_HFLIPPED              0x01
 
27
#define V4LCONTROL_VFLIPPED              0x02
 
28
#define V4LCONTROL_ROTATED_90_JPEG       0x04
 
29
#define V4LCONTROL_WANTS_WB              0x08
 
30
#define V4LCONTROL_WANTS_AUTOGAIN        0x10
 
31
 
 
32
/* Masks */
 
33
#define V4LCONTROL_WANTS_WB_AUTOGAIN     (V4LCONTROL_WANTS_WB | V4LCONTROL_WANTS_AUTOGAIN)
 
34
 
 
35
/* Controls */
 
36
enum {
 
37
        V4LCONTROL_WHITEBALANCE,
 
38
        V4LCONTROL_HFLIP,
 
39
        V4LCONTROL_VFLIP,
 
40
        V4LCONTROL_GAMMA,
 
41
        /* All fake controls above here are auto enabled when not present in hw */
 
42
        V4LCONTROL_AUTO_ENABLE_COUNT,
 
43
        V4LCONTROL_AUTOGAIN,
 
44
        V4LCONTROL_AUTOGAIN_TARGET,
 
45
        V4LCONTROL_COUNT
 
46
};
 
47
 
 
48
struct v4lcontrol_data;
 
49
 
 
50
struct v4lcontrol_data *v4lcontrol_create(int fd, int always_needs_conversion);
 
51
void v4lcontrol_destroy(struct v4lcontrol_data *data);
 
52
 
 
53
int v4lcontrol_get_bandwidth(struct v4lcontrol_data *data);
 
54
 
 
55
/* Functions used by v4lprocessing to get the control state */
 
56
int v4lcontrol_get_flags(struct v4lcontrol_data *data);
 
57
int v4lcontrol_get_ctrl(struct v4lcontrol_data *data, int ctrl);
 
58
/* Check if the controls have changed since the last time this function
 
59
   was called */
 
60
int v4lcontrol_controls_changed(struct v4lcontrol_data *data);
 
61
/* Check if we must go through the conversion path (and thus alloc conversion
 
62
   buffers, etc. in libv4l2). Note this always return 1 if we *may* need
 
63
   rotate90 / flipping / processing, as if we actually need this may change
 
64
   on the fly while the stream is active. */
 
65
int v4lcontrol_needs_conversion(struct v4lcontrol_data *data);
 
66
 
 
67
/* Functions used by v4lconvert to pass vidioc calls from libv4l2 */
 
68
int v4lcontrol_vidioc_queryctrl(struct v4lcontrol_data *data, void *arg);
 
69
int v4lcontrol_vidioc_g_ctrl(struct v4lcontrol_data *data, void *arg);
 
70
int v4lcontrol_vidioc_s_ctrl(struct v4lcontrol_data *data, void *arg);
 
71
 
 
72
#endif