2
/* Ekiga -- A VoIP and Video-Conferencing application
3
* Copyright (C) 2000-2006 Damien Sandras
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.
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.
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.
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.
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.
44
#define P_FORCE_STATIC_PLUGIN
48
class PVideoInputDevice_Picture : public PVideoInputDevice
50
PCLASSINFO(PVideoInputDevice_Picture, PVideoInputDevice);
52
PMutex pixbuf_mutex; /* To protect the pixbufs that are read and written
53
from various threads */
55
GdkPixbuf *cached_pix;
60
/* DESCRIPTION : The constructor.
61
* BEHAVIOR : Creates the Fake Input Device.
64
PVideoInputDevice_Picture ();
67
/* DESCRIPTION : The destructor
71
~PVideoInputDevice_Picture ();
74
BOOL Open (const PString &name,
75
BOOL start_immediate = TRUE);
78
/**Determine of the device is currently open.
88
/**Start the video device I/O.
93
/**Stop the video device I/O capture.
98
/**Determine if the video device I/O capture is in progress.
103
/**Get a list of all of the drivers available.
105
static PStringList GetInputDeviceNames();
108
BOOL SetFrameSize (unsigned int width,
109
unsigned int height);
112
/* DESCRIPTION : The destructor
116
BOOL GetFrameData (BYTE *a, PINDEX *i = NULL);
119
/* DESCRIPTION : The destructor
123
BOOL GetFrameDataNoDelay (BYTE *frame, PINDEX *i = NULL);
126
BOOL TestAllFormats ();
129
/**Get the maximum frame size in bytes.
131
PINDEX GetMaxFrameBytes();
134
/** Given a preset interval of n milliseconds, this function
135
returns n msecs after the previous frame capture was initiated.
137
void WaitFinishPreviousFrame();
140
/**Set the video format to be used.
142
Default behaviour sets the value of the videoFormat variable and then
143
returns the IsOpen() status.
145
BOOL SetVideoFormat (VideoFormat newFormat);
148
/**Get the number of video channels available on the device.
150
Default behaviour returns 1.
152
int GetNumChannels() ;
155
/**Set the video channel to be used on the device.
157
Default behaviour sets the value of the channelNumber variable and then
158
returns the IsOpen() status.
160
BOOL SetChannel (int newChannel);
163
/**Set the colour format to be used.
165
Default behaviour sets the value of the colourFormat variable and then
166
returns the IsOpen() status.
168
BOOL SetColourFormat (const PString &newFormat);
171
/**Set the video frame rate to be used on the device.
173
Default behaviour sets the value of the frameRate variable and then
174
return the IsOpen() status.
176
BOOL SetFrameRate (unsigned rate);
179
BOOL GetFrameSizeLimits (unsigned &minWidth,
182
unsigned &maxHeight);
184
BOOL GetParameters (int *whiteness,
195
PStringList GetDeviceNames() const
196
{ return GetInputDeviceNames(); }
199
PCREATE_VIDINPUT_PLUGIN (Picture);