videoio.h
Go to the documentation of this file.
/*
* videoio.h
*
* Classes to support streaming video input (grabbing) and output.
*
* Portable Windows Library
*
* Copyright (c) 1993-2000 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): Mark Cooke (mpc@star.sr.bham.ac.uk)
*
* $Revision: 29328 $
* $Author: rjongbloed $
* $Date: 2013-03-26 18:23:37 -0500 (Tue, 26 Mar 2013) $
*/
#ifndef PTLIB_PVIDEOIO_H
#define PTLIB_PVIDEOIO_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <ptbuildopts.h>
#if P_VIDEO
#include <ptlib/plugin.h>
#include <ptlib/pluginmgr.h>
#include <list>
class PColourConverter;
class PVideoFrameInfo : public PObject
{
PCLASSINFO(PVideoFrameInfo, PObject);
public:
enum ResizeMode
{
eScale,
eCropCentre,
eCropTopLeft,
eMaxResizeMode
};
friend ostream & operator<<(ostream & strm, ResizeMode mode);
enum StandardSizes {
SQCIFWidth = 128, SQCIFHeight = 96,
QCIFWidth = 176, QCIFHeight = 144,
CIFWidth = 352, CIFHeight = 288,
CIF4Width = 704, CIF4Height = 576,
CIF16Width = 1408, CIF16Height = 1152,
HD480Width = 704, HD480Height = 480,
i480Width = 704, i480Height = 480,
HD720Width = 1280, HD720Height = 720,
p720Width = 1280, p720Height = 720,
HD1080Width= 1920, HD1080Height= 1080,
i1080Width = 1920, i1080Height = 1080,
HDTVWidth = 1920, HDTVHeight = 1080,
MaxWidth = 1920, MaxHeight = 1200
};
PVideoFrameInfo();
PVideoFrameInfo(
unsigned frameWidth,
unsigned frameHeight,
const PString & colourFormat = "YUV420P",
unsigned frameRate = 15,
ResizeMode resizeMode = eScale
);
virtual Comparison Compare(
const PObject & obj // Object to compare against.
) const;
virtual void PrintOn(
ostream & strm // Stream to print the object into.
) const;
virtual PBoolean SetFrameSize(
unsigned width,
unsigned height
);
virtual PBoolean GetFrameSize(
unsigned & width,
unsigned & height
) const;
virtual unsigned GetFrameWidth() const;
virtual unsigned GetFrameHeight() const;
virtual PBoolean SetFrameSar(unsigned width, unsigned height);
virtual PBoolean GetSarSize(
unsigned & width,
unsigned & height
) const;
virtual unsigned GetSarWidth() const;
virtual unsigned GetSarHeight() const;
virtual PBoolean SetFrameRate(
unsigned rate
);
virtual unsigned GetFrameRate() const;
virtual PBoolean SetColourFormat(
const PString & colourFormat // New colour format for device.
);
virtual const PString & GetColourFormat() const;
void SetResizeMode(
ResizeMode mode
) { if (resizeMode < eMaxResizeMode) resizeMode = mode; }
ResizeMode GetResizeMode() const { return resizeMode; }
PINDEX CalculateFrameBytes() const { return CalculateFrameBytes(frameWidth, frameHeight, colourFormat); }
static PINDEX CalculateFrameBytes(
unsigned width,
unsigned height,
const PString & colourFormat
);
bool Parse(
const PString & str
);
static bool ParseSize(
const PString & str,
unsigned & width,
unsigned & height
);
static PString AsString(
unsigned width,
unsigned height
);
static PStringArray GetSizeNames();
protected:
unsigned frameWidth;
unsigned frameHeight;
unsigned sarWidth;
unsigned sarHeight;
unsigned frameRate;
PString colourFormat;
ResizeMode resizeMode;
};
class PVideoControlInfo : public PObject
{
PCLASSINFO(PVideoControlInfo, PObject);
public:
typedef enum {
ControlPan,
ControlTilt,
ControlZoom
} InputControlType;
static PString AsString(const InputControlType & type);
InputControlType type;
long min;
long max;
long step;
long def;
long flags;
long current;
};
class PVideoInputControl : public PVideoControlInfo
{
PCLASSINFO(PVideoInputControl, PVideoControlInfo);
public:
~PVideoInputControl();
virtual PBoolean Pan(long value, bool absolute = false );
virtual PBoolean Tilt(long value, bool absolute = false);
virtual PBoolean Zoom(long value, bool absolute = false);
long GetPan();
long GetTilt();
long GetZoom();
void Reset();
void SetCurrentPosition(const InputControlType ctype, long current);
typedef std::list<PVideoControlInfo> InputDeviceControls;
protected:
PBoolean GetVideoControlInfo(const InputControlType ctype, PVideoControlInfo & control);
PBoolean GetDefaultPosition(const InputControlType ctype, long & def);
PBoolean GetCurrentPosition(const InputControlType ctype, long & current);
std::list<PVideoControlInfo> m_info;
PMutex ccmutex;
};
class PVideoInteractionInfo : public PObject
{
PCLASSINFO(PVideoInteractionInfo, PObject);
public:
typedef enum {
InteractKey,
InteractMouse,
InteractNavigate,
InteractRTSP,
InteractOther
} InputInteractType;
static PString AsString(const InputInteractType & type);
InputInteractType type;
};
class PVideoDevice : public PVideoFrameInfo
{
PCLASSINFO(PVideoDevice, PVideoFrameInfo);
protected:
PVideoDevice();
public:
virtual ~PVideoDevice();
enum VideoFormat {
PAL,
NTSC,
SECAM,
Auto,
NumVideoFormats
};
const PString & GetDeviceName() const
{ return deviceName; }
virtual PStringArray GetDeviceNames() const = 0;
struct OpenArgs {
OpenArgs();
PPluginManager * pluginMgr;
PString driverName;
PString deviceName;
VideoFormat videoFormat;
int channelNumber;
PString colourFormat;
bool convertFormat;
unsigned rate;
unsigned width;
unsigned height;
bool convertSize;
ResizeMode resizeMode;
bool flip;
int brightness;
int whiteness;
int contrast;
int colour;
int hue;
};
virtual PBoolean OpenFull(
const OpenArgs & args,
PBoolean startImmediate = true
);
virtual PBoolean Open(
const PString & deviceName,
PBoolean startImmediate = true
) = 0;
virtual PBoolean IsOpen() = 0;
virtual PBoolean Close() = 0;
virtual PBoolean Start() = 0;
virtual PBoolean Stop() = 0;
#if PTRACING
friend ostream & operator<<(ostream &, VideoFormat);
#endif
virtual PBoolean SetVideoFormat(
VideoFormat videoFormat
);
virtual VideoFormat GetVideoFormat() const;
virtual int GetNumChannels();
virtual PBoolean SetChannel(
int channelNumber
);
virtual int GetChannel() const;
virtual PBoolean SetColourFormatConverter(
const PString & colourFormat // New colour format for device.
);
virtual PBoolean GetVFlipState();
virtual PBoolean SetVFlipState(
PBoolean newVFlipState
);
virtual PBoolean GetFrameSizeLimits(
unsigned & minWidth,
unsigned & minHeight,
unsigned & maxWidth,
unsigned & maxHeight
) ;
virtual PBoolean SetFrameSizeConverter(
unsigned width,
unsigned height,
ResizeMode resizeMode = eMaxResizeMode
);
virtual PBoolean SetFrameSizeConverter(
unsigned width,
unsigned height,
PBoolean /*bScaleNotCrop*/
) { return SetFrameSizeConverter(width,height,eScale); }
virtual PBoolean SetNearestFrameSize(
unsigned width,
unsigned height
);
virtual PBoolean SetFrameSize(
unsigned width,
unsigned height
);
virtual PBoolean GetFrameSize(
unsigned & width,
unsigned & height
) const;
virtual PINDEX GetMaxFrameBytes() = 0;
int GetLastError() const { return lastError; }
virtual PBoolean CanCaptureVideo() const = 0;
virtual int GetBrightness();
virtual PBoolean SetBrightness(unsigned newBrightness);
virtual int GetWhiteness();
virtual PBoolean SetWhiteness(unsigned newWhiteness);
virtual int GetColour();
virtual PBoolean SetColour(unsigned newColour);
virtual int GetContrast();
virtual PBoolean SetContrast(unsigned newContrast);
virtual int GetHue();
virtual PBoolean SetHue(unsigned newHue);
virtual PBoolean GetParameters(
int *whiteness,
int *brightness,
int *colour,
int *contrast,
int *hue
);
virtual PBoolean SetVideoChannelFormat (
int channelNumber,
VideoFormat videoFormat
);
void SetPreferredColourFormat(const PString & colourFmt) { preferredColourFormat = colourFmt; }
const PString & GetPreferredColourFormat() { return preferredColourFormat; }
protected:
PINDEX GetMaxFrameBytesConverted(PINDEX rawFrameBytes) const;
PString deviceName;
int lastError;
VideoFormat videoFormat;
int channelNumber;
// Preferred native colour format from video input device, empty == no preference
PString preferredColourFormat;
PBoolean nativeVerticalFlip;
PColourConverter * converter;
PBYTEArray frameStore;
int frameBrightness; // 16 bit entity, -1 is no value
int frameWhiteness;
int frameContrast;
int frameColour;
int frameHue;
};
class PVideoOutputDevice : public PVideoDevice
{
PCLASSINFO(PVideoOutputDevice, PVideoDevice);
public:
PVideoOutputDevice();
virtual ~PVideoOutputDevice() { Close(); };
static PStringArray GetDriverNames(
PPluginManager * pluginMgr = NULL
);
static PStringArray GetDriversDeviceNames(
const PString & driverName,
PPluginManager * pluginMgr = NULL
);
static PVideoOutputDevice * CreateDevice(
const PString & driverName,
PPluginManager * pluginMgr = NULL
);
/* Create the matching video output device that corresponds to the device name.
This is typically used with the return values from GetDriversDeviceNames().
*/
static PVideoOutputDevice *CreateDeviceByName(
const PString & deviceName,
const PString & driverName = PString::Empty(),
PPluginManager * pluginMgr = NULL
);
static PVideoOutputDevice *CreateOpenedDevice(
const PString & driverName,
const PString & deviceName,
PBoolean startImmediate = true,
PPluginManager * pluginMgr = NULL
);
static PVideoOutputDevice *CreateOpenedDevice(
const OpenArgs & args,
PBoolean startImmediate = true
);
virtual PBoolean Close() { return true; }
virtual PBoolean Start() { return true; }
virtual PBoolean Stop() { return true; }
virtual PBoolean CanCaptureVideo() const;
virtual PBoolean SetFrameData(
unsigned x,
unsigned y,
unsigned width,
unsigned height,
const BYTE * data,
PBoolean endFrame = true
) = 0;
virtual PBoolean SetFrameData(
unsigned x,
unsigned y,
unsigned width,
unsigned height,
const BYTE * data,
PBoolean endFrame,
unsigned flags
);
virtual PBoolean SetFrameData(
unsigned x,
unsigned y,
unsigned width,
unsigned height,
unsigned sarwidth,
unsigned sarheight,
const BYTE * data,
PBoolean endFrame,
unsigned flags,
const void * mark
);
virtual PBoolean DisableDecode();
virtual PBoolean GetPosition(
int & x, // X position of device surface
int & y // Y position of device surface
) const;
virtual bool SetPosition(
int x, // X position of device surface
int y // Y position of device surface
);
};
class PVideoOutputDeviceRGB : public PVideoOutputDevice
{
PCLASSINFO(PVideoOutputDeviceRGB, PVideoOutputDevice);
public:
PVideoOutputDeviceRGB();
virtual PBoolean SetColourFormat(
const PString & colourFormat // New colour format for device.
);
virtual PBoolean SetFrameSize(
unsigned width,
unsigned height
);
virtual PINDEX GetMaxFrameBytes();
virtual PBoolean SetFrameData(
unsigned x,
unsigned y,
unsigned width,
unsigned height,
const BYTE * data,
PBoolean endFrame = true
);
virtual PBoolean FrameComplete() = 0;
protected:
PMutex mutex;
PINDEX bytesPerPixel;
PINDEX scanLineWidth;
bool swappedRedAndBlue;
};
#ifdef SHOULD_BE_MOVED_TO_PLUGIN
class PVideoOutputDevicePPM : public PVideoOutputDeviceRGB
{
PCLASSINFO(PVideoOutputDevicePPM, PVideoOutputDeviceRGB);
public:
PVideoOutputDevicePPM();
virtual PBoolean Open(
const PString & deviceName,
PBoolean startImmediate = true
);
virtual PBoolean IsOpen();
virtual PBoolean Close();
virtual PStringArray GetDeviceNames() const;
virtual PBoolean EndFrame();
protected:
unsigned frameNumber;
};
#endif // SHOULD_BE_MOVED_TO_PLUGIN
class PVideoInputDevice : public PVideoDevice
{
PCLASSINFO(PVideoInputDevice, PVideoDevice);
public:
//PVideoInputDevice();
~PVideoInputDevice() { Close(); }
static PStringArray GetDriverNames(
PPluginManager * pluginMgr = NULL
);
static PStringArray GetDriversDeviceNames(
const PString & driverName,
PPluginManager * pluginMgr = NULL
);
static PVideoInputDevice *CreateDevice(
const PString & driverName,
PPluginManager * pluginMgr = NULL
);
/* Create the matching video input device that corresponds to the device name.
So, for "fake" return a device that will generate fake video.
For "Phillips 680 webcam" (eg) will return appropriate grabber.
Note that Phillips will return the appropriate grabber also.
This is typically used with the return values from GetDriversDeviceNames().
*/
static PVideoInputDevice *CreateDeviceByName(
const PString & deviceName,
const PString & driverName = PString::Empty(),
PPluginManager * pluginMgr = NULL
);
static PVideoInputDevice *CreateOpenedDevice(
const PString & driverName,
const PString & deviceName,
PBoolean startImmediate = true,
PPluginManager * pluginMgr = NULL
);
static PVideoInputDevice *CreateOpenedDevice(
const OpenArgs & args,
PBoolean startImmediate = true
);
typedef struct {
std::list<PVideoFrameInfo> framesizes;
std::list<PVideoControlInfo> controls;
std::list<PVideoInteractionInfo> interactions;
} Capabilities;
virtual bool GetDeviceCapabilities(
Capabilities * capabilities
) const { return GetDeviceCapabilities(GetDeviceName(), capabilities); }
static PBoolean GetDeviceCapabilities(
const PString & deviceName,
Capabilities * capabilities,
PPluginManager * pluginMgr = NULL
);
static PBoolean GetDeviceCapabilities(
const PString & deviceName,
const PString & driverName,
Capabilities * caps,
PPluginManager * pluginMgr = NULL
);
virtual PVideoInputControl * GetVideoInputControls();
virtual PBoolean Open(
const PString & deviceName,
PBoolean startImmediate = true
) = 0;
virtual PBoolean Close(
) { return true; }
virtual PBoolean CanCaptureVideo() const;
virtual PBoolean IsCapturing() = 0;
virtual PBoolean SetNearestFrameSize(
unsigned width,
unsigned height
);
virtual PBoolean GetFrame(
PBYTEArray & frame
);
virtual PBoolean GetFrameData(
BYTE * buffer,
PINDEX * bytesReturned,
unsigned int & flags
);
virtual PBoolean GetFrameData(
BYTE * buffer,
PINDEX * bytesReturned = NULL
) = 0;
virtual PBoolean GetFrameDataNoDelay(
BYTE * buffer,
PINDEX * bytesReturned,
unsigned int & flags
);
virtual PBoolean GetFrameDataNoDelay(
BYTE * buffer,
PINDEX * bytesReturned = NULL
) = 0;
virtual bool FlowControl(const void * flowData);
virtual bool SetCaptureMode(unsigned mode);
virtual int GetCaptureMode() const;
};
//
// declare macros and structures needed for video input plugins
//
template <class className> class PVideoInputPluginServiceDescriptor : public PDevicePluginServiceDescriptor
{
public:
virtual PObject * CreateInstance(int /*userData*/) const { return new className; }
virtual PStringArray GetDeviceNames(int /*userData*/) const { return className::GetInputDeviceNames(); }
virtual bool GetDeviceCapabilities(const PString & deviceName, void * caps) const
{ return className::GetDeviceCapabilities(deviceName, (PVideoInputDevice::Capabilities *)caps); }
};
#define PCREATE_VIDINPUT_PLUGIN(name) \
static PVideoInputPluginServiceDescriptor<PVideoInputDevice_##name> PVideoInputDevice_##name##_descriptor; \
PCREATE_PLUGIN(name, PVideoInputDevice, &PVideoInputDevice_##name##_descriptor)
PPLUGIN_STATIC_LOAD(FakeVideo, PVideoInputDevice);
#ifdef P_APPSHARE
PPLUGIN_STATIC_LOAD(Application, PVideoInputDevice);
#endif
#if P_FFVDEV
PPLUGIN_STATIC_LOAD(FFMPEG, PVideoInputDevice);
#endif
#if P_VIDFILE
PPLUGIN_STATIC_LOAD(YUVFile, PVideoInputDevice);
#endif
#ifdef P_DIRECTSHOW
PPLUGIN_STATIC_LOAD(DirectShow, PVideoInputDevice);
#endif
//
// declare macros and structures needed for video output plugins
//
template <class className> class PVideoOutputPluginServiceDescriptor : public PDevicePluginServiceDescriptor
{
public:
virtual PObject * CreateInstance(int /*userData*/) const { return new className; }
virtual PStringArray GetDeviceNames(int /*userData*/) const { return className::GetOutputDeviceNames(); }
};
#define PCREATE_VIDOUTPUT_PLUGIN(name) \
static PVideoOutputPluginServiceDescriptor<PVideoOutputDevice_##name> PVideoOutputDevice_##name##_descriptor; \
PCREATE_PLUGIN(name, PVideoOutputDevice, &PVideoOutputDevice_##name##_descriptor)
#if _WIN32
PPLUGIN_STATIC_LOAD(Window, PVideoOutputDevice);
#endif
#if P_SDL
PPLUGIN_STATIC_LOAD(SDL, PVideoOutputDevice);
#endif
//
// declare classes needed for access to simple video font
//
class PVideoFont : public PObject
{
PCLASSINFO(PVideoFont, PObject);
public:
enum {
MAX_L_HEIGHT = 11
};
struct LetterData {
char ascii;
const char *line[MAX_L_HEIGHT];
};
static const LetterData * GetLetterData(char ascii);
};
#endif // P_VIDEO
#endif // PTLIB_PVIDEOIO_H
// End Of File ///////////////////////////////////////////////////////////////
PVideoDevice::GetDeviceName
const PString & GetDeviceName() const
Get the device name of the open device.
Definition: videoio.h:405
PVideoFrameInfo::SQCIFWidth
Definition: videoio.h:64
PVideoDevice::OpenArgs::videoFormat
VideoFormat videoFormat
Definition: videoio.h:418
PVideoFrameInfo::resizeMode
ResizeMode resizeMode
Definition: videoio.h:269
PVideoControlInfo::current
long current
Definition: videoio.h:293
PVideoFrameInfo::CalculateFrameBytes
PINDEX CalculateFrameBytes() const
Get the number of bytes of an image, given a particular width, height and colour format.
Definition: videoio.h:215
PVideoInputPluginServiceDescriptor::GetDeviceNames
virtual PStringArray GetDeviceNames(int) const
Definition: videoio.h:1172
PVideoDevice::OpenArgs::channelNumber
int channelNumber
Definition: videoio.h:419
PVideoDevice::OpenArgs
Definition: videoio.h:412
PVideoDevice::channelNumber
int channelNumber
Definition: videoio.h:698
PVideoDevice::GetLastError
int GetLastError() const
Get the last error code.
Definition: videoio.h:611
PVideoControlInfo::ControlTilt
Definition: videoio.h:281
PVideoInputPluginServiceDescriptor::CreateInstance
virtual PObject * CreateInstance(int) const
Definition: videoio.h:1171
PVideoFrameInfo::i480Width
Definition: videoio.h:70
PVideoFrameInfo::ResizeMode
ResizeMode
Definition: videoio.h:54
PVideoFrameInfo::GetFrameSize
virtual PBoolean GetFrameSize(unsigned &width, unsigned &height) const
Get the frame size being used.
PVideoFrameInfo::HD480Width
Definition: videoio.h:69
PVideoFrameInfo::GetFrameHeight
virtual unsigned GetFrameHeight() const
Get the height of the frame being used.
PVideoDevice::frameContrast
int frameContrast
Definition: videoio.h:708
PVideoFrameInfo::frameWidth
unsigned frameWidth
Definition: videoio.h:263
PVideoFrameInfo::QCIFWidth
Definition: videoio.h:65
PVideoFrameInfo::HD480Height
Definition: videoio.h:69
pluginmgr.h
PCLASSINFO
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
PVideoDevice::frameHue
int frameHue
Definition: videoio.h:710
PVideoDevice::OpenArgs::width
unsigned width
Definition: videoio.h:423
PVideoDevice::OpenArgs::driverName
PString driverName
Definition: videoio.h:416
PVideoDevice::OpenArgs::convertSize
bool convertSize
Definition: videoio.h:425
PVideoFrameInfo::p720Height
Definition: videoio.h:72
PVideoFrameInfo::MaxHeight
Definition: videoio.h:76
PVideoControlInfo::def
long def
Definition: videoio.h:291
PVideoFrameInfo::CIF16Height
Definition: videoio.h:68
PDevicePluginServiceDescriptor
Definition: plugin.h:109
PVideoFont
Definition: videoio.h:1230
PVideoFrameInfo::i1080Width
Definition: videoio.h:74
PVideoInputControl::m_info
std::list< PVideoControlInfo > m_info
Definition: videoio.h:325
PVideoControlInfo
Definition: videoio.h:273
PPluginManager
Definition: pluginmgr.h:57
PVideoFrameInfo::HDTVHeight
Definition: videoio.h:75
PVideoOutputDeviceRGB::bytesPerPixel
PINDEX bytesPerPixel
Definition: videoio.h:924
PVideoInputDevice::Capabilities::interactions
std::list< PVideoInteractionInfo > interactions
Definition: videoio.h:1047
PVideoFrameInfo::MaxWidth
Definition: videoio.h:76
PVideoControlInfo::max
long max
Definition: videoio.h:289
PVideoDevice::preferredColourFormat
PString preferredColourFormat
Definition: videoio.h:700
plugin.h
PVideoFrameInfo::GetFrameWidth
virtual unsigned GetFrameWidth() const
Get the width of the frame being used.
PVideoFrameInfo::colourFormat
PString colourFormat
Definition: videoio.h:268
PVideoControlInfo::type
InputControlType type
Definition: videoio.h:287
PVideoFrameInfo::ParseSize
static bool ParseSize(const PString &str, unsigned &width, unsigned &height)
Parse the standard size string names.
PVideoFrameInfo::SetFrameRate
virtual PBoolean SetFrameRate(unsigned rate)
Set the video frame rate to be used on the device.
PVideoFrameInfo::CIFHeight
Definition: videoio.h:66
PObject::Comparison
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PVideoInteractionInfo::InteractMouse
Register remote KeyPresses.
Definition: videoio.h:340
PVideoFrameInfo::SetFrameSize
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
PVideoInputDevice::GetDeviceCapabilities
virtual bool GetDeviceCapabilities(Capabilities *capabilities) const
Retrieve a list of Device Capabilities.
Definition: videoio.h:1052
PVideoFrameInfo::PrintOn
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
PVideoFrameInfo::GetColourFormat
virtual const PString & GetColourFormat() const
Get the colour format to be used.
PVideoDevice::frameWhiteness
int frameWhiteness
Definition: videoio.h:707
PVideoDevice::OpenArgs::height
unsigned height
Definition: videoio.h:424
PVideoFont::LetterData::ascii
char ascii
Definition: videoio.h:1238
PVideoFrameInfo::SetFrameSar
virtual PBoolean SetFrameSar(unsigned width, unsigned height)
Set the sar size to be used.
PVideoFrameInfo::i480Height
Definition: videoio.h:70
PStringArray
This is an array collection class of PString objects.
Definition: pstring.h:2024
PVideoFrameInfo::eMaxResizeMode
Definition: videoio.h:59
PVideoFrameInfo::SetResizeMode
void SetResizeMode(ResizeMode mode)
Set the resize mode to be used.
Definition: videoio.h:205
PVideoFrameInfo::HDTVWidth
Definition: videoio.h:75
PVideoControlInfo::ControlPan
Definition: videoio.h:280
PVideoFrameInfo::GetFrameRate
virtual unsigned GetFrameRate() const
Get the video frame rate used on the device.
PVideoDevice::frameBrightness
int frameBrightness
Definition: videoio.h:706
PVideoFont::LetterData
Definition: videoio.h:1237
PVideoInputDevice::Capabilities::framesizes
std::list< PVideoFrameInfo > framesizes
Definition: videoio.h:1045
PVideoFrameInfo::Compare
virtual Comparison Compare(const PObject &obj) const
Compare the two PVideoFrameInfo and return their relative rank.
PVideoInteractionInfo::InputInteractType
InputInteractType
Definition: videoio.h:338
PVideoInputPluginServiceDescriptor::GetDeviceCapabilities
virtual bool GetDeviceCapabilities(const PString &deviceName, void *caps) const
Definition: videoio.h:1173
PVideoOutputDevice::Start
virtual PBoolean Start()
Start the video device I/O display.
Definition: videoio.h:788
PVideoFrameInfo::CIF4Width
Definition: videoio.h:67
PVideoDevice::OpenArgs::hue
int hue
Definition: videoio.h:432
PVideoControlInfo::InputControlType
InputControlType
Definition: videoio.h:279
PVideoDevice::VideoFormat
VideoFormat
Definition: videoio.h:395
PVideoInteractionInfo::InteractRTSP
Register remote Navigation commands.
Definition: videoio.h:342
PBoolean
BOOL PBoolean
Definition: object.h:102
PVideoFrameInfo::PVideoFrameInfo
PVideoFrameInfo()
Construct video frame information.
PVideoFrameInfo
Definition: videoio.h:49
PBYTEArray
Array of unsigned characters.
Definition: array.h:670
PVideoInteractionInfo
This class defines a video Input device Interactions (Remote Inputs/Controls)
Definition: videoio.h:332
PVideoFrameInfo::HD720Height
Definition: videoio.h:71
PVideoInputDevice::Close
virtual PBoolean Close()
Close the device.
Definition: videoio.h:1085
PVideoInputDevice::Capabilities
Definition: videoio.h:1044
PVideoDevice::SECAM
Definition: videoio.h:398
PVideoFrameInfo::AsString
static PString AsString(unsigned width, unsigned height)
Get a width/height as a standard size string name.
PVideoFrameInfo::CIF16Width
Definition: videoio.h:68
PVideoFrameInfo::SQCIFHeight
Definition: videoio.h:64
PVideoOutputDevice::Stop
virtual PBoolean Stop()
Stop the video device I/O display.
Definition: videoio.h:792
PVideoInputControl::ccmutex
PMutex ccmutex
Definition: videoio.h:326
PVideoFrameInfo::operator<<
friend ostream & operator<<(ostream &strm, ResizeMode mode)
PVideoDevice::OpenArgs::resizeMode
ResizeMode resizeMode
Definition: videoio.h:426
PPLUGIN_STATIC_LOAD
PPLUGIN_STATIC_LOAD(FakeVideo, PVideoInputDevice)
PVideoOutputPluginServiceDescriptor
Definition: videoio.h:1205
PVideoDevice::OpenArgs::contrast
int contrast
Definition: videoio.h:430
PVideoFrameInfo::frameRate
unsigned frameRate
Definition: videoio.h:267
PVideoDevice::OpenArgs::deviceName
PString deviceName
Definition: videoio.h:417
PVideoFrameInfo::HD720Width
Definition: videoio.h:71
PVideoDevice
This class defines a video device.
Definition: videoio.h:380
PVideoControlInfo::flags
long flags
Definition: videoio.h:292
PVideoDevice::deviceName
PString deviceName
Definition: videoio.h:695
PVideoFrameInfo::Parse
bool Parse(const PString &str)
Parse a descriptor string for the video format.
PVideoFrameInfo::StandardSizes
StandardSizes
Definition: videoio.h:63
PVideoFrameInfo::CIF4Height
Definition: videoio.h:67
PVideoOutputDeviceRGB::scanLineWidth
PINDEX scanLineWidth
Definition: videoio.h:925
PString
The character string class.
Definition: pstring.h:108
PVideoInputDevice::Capabilities::controls
std::list< PVideoControlInfo > controls
Definition: videoio.h:1046
PVideoDevice::OpenArgs::pluginMgr
PPluginManager * pluginMgr
Definition: videoio.h:415
PVideoFrameInfo::QCIFHeight
Definition: videoio.h:65
PVideoFrameInfo::GetSizeNames
static PStringArray GetSizeNames()
Get all "known" image size names.
PString::Empty
static PString Empty()
Return an empty string.
PVideoDevice::NTSC
Definition: videoio.h:397
PVideoFrameInfo::GetResizeMode
ResizeMode GetResizeMode() const
Get the resize mode to be used.
Definition: videoio.h:211
PVideoDevice::GetPreferredColourFormat
const PString & GetPreferredColourFormat()
Get preferred native colour format from video capture device.
Definition: videoio.h:690
PVideoFrameInfo::p720Width
Definition: videoio.h:72
PVideoDevice::nativeVerticalFlip
PBoolean nativeVerticalFlip
Definition: videoio.h:701
PVideoDevice::converter
PColourConverter * converter
Definition: videoio.h:703
PVideoDevice::videoFormat
VideoFormat videoFormat
Definition: videoio.h:697
PVideoDevice::OpenArgs::convertFormat
bool convertFormat
Definition: videoio.h:421
PVideoInputDevice
This class defines a video input device.
Definition: videoio.h:975
PVideoDevice::OpenArgs::flip
bool flip
Definition: videoio.h:427
PVideoFrameInfo::eCropCentre
Definition: videoio.h:57
PVideoOutputPluginServiceDescriptor::GetDeviceNames
virtual PStringArray GetDeviceNames(int) const
Definition: videoio.h:1209
PVideoInputDevice::~PVideoInputDevice
~PVideoInputDevice()
Create a new video input device.
Definition: videoio.h:986
PVideoDevice::lastError
int lastError
Definition: videoio.h:696
PVideoFrameInfo::i1080Height
Definition: videoio.h:74
PVideoDevice::SetPreferredColourFormat
void SetPreferredColourFormat(const PString &colourFmt)
Set preferred native colour format from video capture device.
Definition: videoio.h:685
PVideoOutputDeviceRGB
This class defines a video output device for RGB in a frame store.
Definition: videoio.h:864
PColourConverter
This class defines a means to convert an image from one colour format to another. ...
Definition: vconvert.h:80
PVideoDevice::SetFrameSizeConverter
virtual PBoolean SetFrameSizeConverter(unsigned width, unsigned height, PBoolean)
Set the frame size to be used, trying converters if available.
Definition: videoio.h:559
PVideoFrameInfo::SetColourFormat
virtual PBoolean SetColourFormat(const PString &colourFormat)
Set the colour format to be used.
PVideoOutputPluginServiceDescriptor::CreateInstance
virtual PObject * CreateInstance(int) const
Definition: videoio.h:1208
PVideoDevice::OpenArgs::colour
int colour
Definition: videoio.h:431
PVideoOutputDevice::~PVideoOutputDevice
virtual ~PVideoOutputDevice()
Close the video output device on destruction.
Definition: videoio.h:727
PVideoInputPluginServiceDescriptor
Definition: videoio.h:1168
PVideoInteractionInfo::type
InputInteractType type
Definition: videoio.h:348
PVideoOutputDevice::Close
virtual PBoolean Close()
Close the device.
Definition: videoio.h:784
PVideoFrameInfo::eScale
Definition: videoio.h:56
PVideoControlInfo::step
long step
Definition: videoio.h:290
PVideoOutputDevice
This class defines a video output device.
Definition: videoio.h:716
PVideoDevice::OpenArgs::rate
unsigned rate
Definition: videoio.h:422
PMutex
Synonym for PTimedMutex.
PVideoFrameInfo::eCropTopLeft
Definition: videoio.h:58
PVideoFrameInfo::HD1080Width
Definition: videoio.h:73
PVideoFrameInfo::sarHeight
unsigned sarHeight
Definition: videoio.h:266
PVideoFrameInfo::CIFWidth
Definition: videoio.h:66
PVideoDevice::frameStore
PBYTEArray frameStore
Definition: videoio.h:704
PVideoDevice::Auto
Definition: videoio.h:399
PVideoDevice::OpenArgs::whiteness
int whiteness
Definition: videoio.h:429
PVideoDevice::frameColour
int frameColour
Definition: videoio.h:709
PVideoFrameInfo::GetSarHeight
virtual unsigned GetSarHeight() const
Get the height of the sar being used.
PVideoDevice::OpenArgs::brightness
int brightness
Definition: videoio.h:428
PVideoInteractionInfo::InteractNavigate
Register remote Mouse Movement Clicks.
Definition: videoio.h:341
PVideoFrameInfo::GetSarSize
virtual PBoolean GetSarSize(unsigned &width, unsigned &height) const
Get the sar size being used.
PVideoDevice::PAL
Definition: videoio.h:396
PVideoOutputDeviceRGB::swappedRedAndBlue
bool swappedRedAndBlue
Definition: videoio.h:926
PVideoFrameInfo::GetSarWidth
virtual unsigned GetSarWidth() const
Get the width of the sar being used.
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PVideoInputControl::InputDeviceControls
std::list< PVideoControlInfo > InputDeviceControls
Definition: videoio.h:318
PVideoDevice::OpenArgs::colourFormat
PString colourFormat
Definition: videoio.h:420
PVideoOutputDeviceRGB::mutex
PMutex mutex
Definition: videoio.h:923
PVideoInputControl
This class defines a video Input device control (Camera controls PTZ)
Definition: videoio.h:300
PVideoInteractionInfo::InteractKey
Definition: videoio.h:339
PVideoFrameInfo::frameHeight
unsigned frameHeight
Definition: videoio.h:264
PVideoControlInfo::min
long min
Definition: videoio.h:288
PVideoFrameInfo::sarWidth
unsigned sarWidth
Definition: videoio.h:265
PVideoFrameInfo::HD1080Height
Definition: videoio.h:73