~ubuntu-branches/ubuntu/jaunty/ekiga/jaunty-updates

« back to all changes in this revision

Viewing changes to src/devices/fakevideoinput.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-12-07 10:30:45 UTC
  • mfrom: (1.2.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20081207103045-iaurrjo4p7d1nngo
Tags: 3.0.1-1ubuntu1
* Merge to Debian experimental, to get Ekiga 3. (LP: #274085) Remaining
  Ubuntu changes:
  - Launchpad Integration: (Ubuntu specific)
    + debian/control.in: Add liblaunchpad-integration-dev build dependency.
    + Add ubuntu_lpi.patch: Call launchpad_integration_add_items() in main() and
      check for the launchpad-integration pkg-config module.
    + Add autoconf.patch: autoconf changes from above patch.
  - Add ubuntu_desktop-file-onlyshowin.patch: Show ekiga in Mobile, too.
    (Ubuntu specific).
  - debian/control.in: Add missing fdupes build dependency for identical
    GNOME help file symlinking. (Debian #505536)
* Drop 42_change_pixmaps.dpatch: Many of the old icons do not exist any
  more, some have been replaced, and keeping the remaining three would make
  them look very inconsistent.
* Convert our dpatches to quilt patches and rewrite them for new upstream
  version.
* Add migrate_2.0_settings.patch: Properly migrate settings from
  2.0. Taken from upstream SVN, thanks to Damien Sandras!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/* Ekiga -- A VoIP and Video-Conferencing application
3
 
 * Copyright (C) 2000-2006 Damien Sandras
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software Foundation,
17
 
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
 
 *
19
 
 *
20
 
 * Ekiga is licensed under the GPL license and as a special exception,
21
 
 * you have permission to link or otherwise combine this program with the
22
 
 * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
23
 
 * without applying the requirements of the GNU GPL to the OPAL, OpenH323
24
 
 * and PWLIB programs, as long as you do follow the requirements of the
25
 
 * GNU GPL for all the rest of the software thus combined.
26
 
 */
27
 
 
28
 
 
29
 
/*
30
 
 *                         vfakeio.h  -  description
31
 
 *                         -------------------------
32
 
 *   begin                : Tue Jul 30 2003
33
 
 *   copyright            : (C) 2000-2006 by Damien Sandras
34
 
 *   description          : This file contains a descendant of a Fake Input 
35
 
 *                          Device that display the GM logo when connected to
36
 
 *                          a remote party without using a camera.
37
 
 *
38
 
 */
39
 
 
40
 
 
41
 
#ifndef _VFAKEIO_H_
42
 
#define _VFAKEIO_H_
43
 
 
44
 
#define P_FORCE_STATIC_PLUGIN
45
 
 
46
 
#include "common.h"
47
 
 
48
 
class PVideoInputDevice_Picture : public PVideoInputDevice 
49
 
{
50
 
  PCLASSINFO(PVideoInputDevice_Picture, PVideoInputDevice);
51
 
 
52
 
  PMutex pixbuf_mutex;      /* To protect the pixbufs that are read and written
53
 
                            from various threads */
54
 
 
55
 
  GdkPixbuf *cached_pix;
56
 
  GdkPixbuf *orig_pix;
57
 
  
58
 
 public:
59
 
  
60
 
  /* DESCRIPTION  :  The constructor.
61
 
   * BEHAVIOR     :  Creates the Fake Input Device.
62
 
   * PRE          :  /
63
 
   */
64
 
  PVideoInputDevice_Picture ();
65
 
 
66
 
 
67
 
  /* DESCRIPTION  :  The destructor
68
 
   * BEHAVIOR     :  /
69
 
   * PRE          :  /
70
 
   */
71
 
  ~PVideoInputDevice_Picture ();
72
 
 
73
 
  
74
 
  BOOL Open (const PString &name,
75
 
             BOOL start_immediate = TRUE);
76
 
 
77
 
  
78
 
  /**Determine of the device is currently open.
79
 
   */
80
 
  BOOL IsOpen() ;
81
 
 
82
 
  
83
 
  /**Close the device.
84
 
   */
85
 
  BOOL Close();
86
 
 
87
 
  
88
 
  /**Start the video device I/O.
89
 
   */
90
 
  BOOL Start();
91
 
 
92
 
  
93
 
  /**Stop the video device I/O capture.
94
 
   */
95
 
  BOOL Stop();
96
 
 
97
 
 
98
 
  /**Determine if the video device I/O capture is in progress.
99
 
   */
100
 
  BOOL IsCapturing();
101
 
 
102
 
  
103
 
  /**Get a list of all of the drivers available.
104
 
   */
105
 
  static PStringList GetInputDeviceNames();
106
 
 
107
 
  
108
 
  BOOL SetFrameSize (unsigned int width,
109
 
                     unsigned int height);
110
 
  
111
 
  
112
 
  /* DESCRIPTION  :  The destructor
113
 
   * BEHAVIOR     :  /
114
 
   * PRE          :  /
115
 
   */
116
 
  BOOL GetFrameData (BYTE *a, PINDEX *i = NULL);
117
 
 
118
 
 
119
 
  /* DESCRIPTION  :  The destructor
120
 
   * BEHAVIOR     :  /
121
 
   * PRE          :  /
122
 
   */
123
 
  BOOL GetFrameDataNoDelay (BYTE *frame, PINDEX *i = NULL);
124
 
 
125
 
  
126
 
  BOOL TestAllFormats ();
127
 
 
128
 
  
129
 
  /**Get the maximum frame size in bytes.
130
 
  */
131
 
  PINDEX GetMaxFrameBytes();
132
 
 
133
 
  
134
 
  /** Given a preset interval of n milliseconds, this function
135
 
      returns n msecs after the previous frame capture was initiated.
136
 
  */
137
 
  void WaitFinishPreviousFrame();
138
 
 
139
 
  
140
 
  /**Set the video format to be used.
141
 
 
142
 
  Default behaviour sets the value of the videoFormat variable and then
143
 
  returns the IsOpen() status.
144
 
  */
145
 
  BOOL SetVideoFormat (VideoFormat newFormat);
146
 
 
147
 
  
148
 
  /**Get the number of video channels available on the device.
149
 
 
150
 
  Default behaviour returns 1.
151
 
  */
152
 
  int GetNumChannels() ;
153
 
 
154
 
  
155
 
  /**Set the video channel to be used on the device.
156
 
 
157
 
  Default behaviour sets the value of the channelNumber variable and then
158
 
  returns the IsOpen() status.
159
 
  */
160
 
  BOOL SetChannel (int newChannel);
161
 
                        
162
 
 
163
 
  /**Set the colour format to be used.
164
 
 
165
 
  Default behaviour sets the value of the colourFormat variable and then
166
 
  returns the IsOpen() status.
167
 
  */
168
 
  BOOL SetColourFormat (const PString &newFormat);
169
 
 
170
 
  
171
 
  /**Set the video frame rate to be used on the device.
172
 
 
173
 
  Default behaviour sets the value of the frameRate variable and then
174
 
  return the IsOpen() status.
175
 
  */
176
 
  BOOL SetFrameRate (unsigned rate);
177
 
 
178
 
  
179
 
  BOOL GetFrameSizeLimits (unsigned &minWidth,
180
 
                           unsigned &minHeight,
181
 
                           unsigned &maxWidth,
182
 
                           unsigned &maxHeight);
183
 
  
184
 
  BOOL GetParameters (int *whiteness,
185
 
                      int *brightness,
186
 
                      int *colour,
187
 
                      int *contrast,
188
 
                      int *hue);
189
 
  
190
 
  PBYTEArray data;
191
 
  bool moving;
192
 
  int rgb_increment;
193
 
  int pos;
194
 
  int increment;
195
 
  PStringList GetDeviceNames() const
196
 
  { return GetInputDeviceNames(); }
197
 
};
198
 
 
199
 
PCREATE_VIDINPUT_PLUGIN (Picture);
200
 
 
201
 
#endif