32 #ifndef PTLIB_PVIDEOIO_H
33 #define PTLIB_PVIDEOIO_H
38 #include <ptbuildopts.h>
294 virtual PBoolean Pan(
long value,
bool absolute =
false );
295 virtual PBoolean Tilt(
long value,
bool absolute =
false);
296 virtual PBoolean Zoom(
long value,
bool absolute =
false);
524 unsigned & minHeight,
765 const OpenArgs & args,
917 #ifdef SHOULD_BE_MOVED_TO_PLUGIN
928 PVideoOutputDevicePPM();
954 unsigned frameNumber;
957 #endif // SHOULD_BE_MOVED_TO_PLUGIN
1027 const OpenArgs & args,
1047 Capabilities * capabilities,
1056 Capabilities * caps,
1105 PINDEX * bytesReturned,
1106 unsigned int & flags
1110 PINDEX * bytesReturned = NULL
1117 PINDEX * bytesReturned,
1118 unsigned int & flags
1122 PINDEX * bytesReturned = NULL
1164 #define PCREATE_VIDINPUT_PLUGIN(name) \
1165 static PVideoInputPluginServiceDescriptor<PVideoInputDevice_##name> PVideoInputDevice_##name##_descriptor; \
1166 PCREATE_PLUGIN(name, PVideoInputDevice, &PVideoInputDevice_##name##_descriptor)
1199 #define PCREATE_VIDOUTPUT_PLUGIN(name) \
1200 static PVideoOutputPluginServiceDescriptor<PVideoOutputDevice_##name> PVideoOutputDevice_##name##_descriptor; \
1201 PCREATE_PLUGIN(name, PVideoOutputDevice, &PVideoOutputDevice_##name##_descriptor)
1234 #endif // PTLIB_PVIDEOIO_H
static PVideoOutputDevice * CreateDevice(const PString &driverName, PPluginManager *pluginMgr=NULL)
Create the video output device that corresponds to the specified driver name.
virtual int GetColour()
Get the colour of the image.
VideoFormat videoFormat
Definition: videoio.h:405
virtual PBoolean SetColour(unsigned newColour)
Set colour of the image.
ResizeMode resizeMode
Definition: videoio.h:256
long current
Definition: videoio.h:280
PVideoOutputDeviceRGB()
Create a new video output device.
int channelNumber
Definition: videoio.h:406
Definition: videoio.h:399
int channelNumber
Definition: videoio.h:685
Definition: videoio.h:268
virtual PBoolean SetContrast(unsigned newContrast)
Set contrast of the image.
PINDEX GetMaxFrameBytesConverted(PINDEX rawFrameBytes) const
ResizeMode
Definition: videoio.h:54
static PStringArray GetDriversDeviceNames(const PString &driverName, PPluginManager *pluginMgr=NULL)
Get video output devices that correspond to the specified driver name.
int frameContrast
Definition: videoio.h:695
virtual PBoolean GetFrameSize(unsigned &width, unsigned &height) const
Get the frame size being used.
unsigned frameWidth
Definition: videoio.h:250
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
int frameHue
Definition: videoio.h:697
unsigned width
Definition: videoio.h:410
PString driverName
Definition: videoio.h:403
bool convertSize
Definition: videoio.h:412
long def
Definition: videoio.h:278
virtual PBoolean FrameComplete()=0
Indicate frame may be displayed.
Definition: videoio.h:1217
Definition: videoio.h:260
Definition: pluginmgr.h:57
PINDEX bytesPerPixel
Definition: videoio.h:911
virtual PBoolean SetVFlipState(PBoolean newVFlipState)
Set the video conversion vertical flip state.
long max
Definition: videoio.h:276
PString preferredColourFormat
Definition: videoio.h:687
virtual PBoolean Open(const PString &deviceName, PBoolean startImmediate=true)=0
Open the device given the device name.
virtual unsigned GetFrameRate() const
Get the video frame rate used on the device.
virtual unsigned GetFrameHeight() const
Get the height of the frame being used.
PString colourFormat
Definition: videoio.h:255
virtual PBoolean GetVFlipState()
Get the video conversion vertical flip state.
virtual PBoolean SetVideoChannelFormat(int channelNumber, VideoFormat videoFormat)
Set VideoFormat and VideoChannel in one ioctl.
InputControlType type
Definition: videoio.h:274
static bool ParseSize(const PString &str, unsigned &width, unsigned &height)
Parse the standard size string names.
virtual PBoolean SetFrameRate(unsigned rate)
Set the video frame rate to be used on the device.
virtual int GetHue()
Get the hue of the image.
Register remote KeyPresses.
Definition: videoio.h:327
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
int frameWhiteness
Definition: videoio.h:694
static const LetterData * GetLetterData(char ascii)
virtual PObject * CreateInstance(int) const
Definition: videoio.h:1195
unsigned height
Definition: videoio.h:411
char ascii
Definition: videoio.h:1225
virtual VideoFormat GetVideoFormat() const
Get the video format being used.
virtual PBoolean SetColourFormat(const PString &colourFormat)
Set the colour format to be used.
virtual const PString & GetColourFormat() const
Get the colour format to be used.
virtual PBoolean SetFrameSar(unsigned width, unsigned height)
Set the sar size to be used.
Definition: videoio.h:269
virtual PINDEX GetMaxFrameBytes()=0
Get the maximum frame size in bytes.
This is an array collection class of PString objects.
Definition: pstring.h:2024
void SetResizeMode(ResizeMode mode)
Set the resize mode to be used.
Definition: videoio.h:192
Definition: videoio.h:267
int frameBrightness
Definition: videoio.h:693
Definition: videoio.h:1224
InputInteractType
Definition: videoio.h:325
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
virtual PBoolean Start()
Start the video device I/O display.
Definition: videoio.h:775
const char * line[MAX_L_HEIGHT]
Definition: videoio.h:1226
virtual PBoolean Stop()=0
Stop the video device I/O capture.
int hue
Definition: videoio.h:419
InputControlType
Definition: videoio.h:266
Definition: videoio.h:1222
VideoFormat
Definition: videoio.h:382
Register remote Navigation commands.
Definition: videoio.h:329
BOOL PBoolean
Definition: object.h:102
static PVideoOutputDevice * CreateDeviceByName(const PString &deviceName, const PString &driverName=PString::Empty(), PPluginManager *pluginMgr=NULL)
PVideoFrameInfo()
Construct video frame information.
virtual PBoolean GetFrameSize(unsigned &width, unsigned &height) const
Get the frame size being used.
virtual PBoolean SetWhiteness(unsigned newWhiteness)
Set whiteness of the image.
Array of unsigned characters.
Definition: array.h:670
This class defines a video Input device Interactions (Remote Inputs/Controls)
Definition: videoio.h:319
Definition: videoio.h:385
Register remote RTSP (Real Time Streaming Protocol) Inputs.
Definition: videoio.h:330
static PString AsString(unsigned width, unsigned height)
Get a width/height as a standard size string name.
virtual PBoolean Stop()
Stop the video device I/O display.
Definition: videoio.h:779
virtual PBoolean IsOpen()=0
Determine if the device is currently open.
virtual PBoolean SetBrightness(unsigned newBrightness)
Set brightness of the image.
friend ostream & operator<<(ostream &strm, ResizeMode mode)
virtual int GetNumChannels()
Get the number of video channels available on the device.
ResizeMode resizeMode
Definition: videoio.h:413
PPLUGIN_STATIC_LOAD(FakeVideo, PVideoInputDevice)
Definition: videoio.h:1192
int contrast
Definition: videoio.h:417
unsigned frameRate
Definition: videoio.h:254
virtual PBoolean Start()=0
Start the video device I/O capture.
static PString AsString(const InputInteractType &type)
PString deviceName
Definition: videoio.h:404
This class defines a video device.
Definition: videoio.h:367
virtual int GetChannel() const
Get the video channel to be used on the device.
long flags
Definition: videoio.h:279
virtual PBoolean CanCaptureVideo() const =0
Is the device a camera, and obtain video.
virtual PBoolean SetNearestFrameSize(unsigned width, unsigned height)
Set the nearest available frame size to be used.
PString deviceName
Definition: videoio.h:682
virtual PBoolean DisableDecode()
Allow the outputdevice decide whether the decoder should ignore decode hence not render any output...
bool Parse(const PString &str)
Parse a descriptor string for the video format.
StandardSizes
Definition: videoio.h:63
virtual PBoolean OpenFull(const OpenArgs &args, PBoolean startImmediate=true)
Open the device given the device name.
virtual PBoolean SetHue(unsigned newHue)
Set hue of the image.
virtual PBoolean GetPosition(int &x, int &y) const
Get the position of the output device, where relevant.
PINDEX scanLineWidth
Definition: videoio.h:912
The character string class.
Definition: pstring.h:108
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
PPluginManager * pluginMgr
Definition: videoio.h:402
virtual PStringArray GetDeviceNames() const =0
Get a list of all of the drivers available.
virtual PBoolean SetFrameData(unsigned x, unsigned y, unsigned width, unsigned height, const BYTE *data, PBoolean endFrame=true)
Set a section of the output frame buffer.
static PStringArray GetSizeNames()
Get all "known" image size names.
static PString Empty()
Return an empty string.
Definition: videoio.h:384
virtual int GetContrast()
Get the contrast of the image.
int GetLastError() const
Get the last error code.
Definition: videoio.h:598
virtual PBoolean GetSarSize(unsigned &width, unsigned &height) const
Get the sar size being used.
virtual ~PVideoDevice()
Delete structures created by PVideoDevice();.
const PString & GetPreferredColourFormat()
Get preferred native colour format from video capture device.
Definition: videoio.h:677
PBoolean nativeVerticalFlip
Definition: videoio.h:688
PColourConverter * converter
Definition: videoio.h:690
VideoFormat videoFormat
Definition: videoio.h:684
bool convertFormat
Definition: videoio.h:408
bool flip
Definition: videoio.h:414
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
int lastError
Definition: videoio.h:683
void SetPreferredColourFormat(const PString &colourFmt)
Set preferred native colour format from video capture device.
Definition: videoio.h:672
This class defines a video output device for RGB in a frame store.
Definition: videoio.h:851
virtual PBoolean Close()=0
Close the device.
This class defines a means to convert an image from one colour format to another. ...
Definition: vconvert.h:80
virtual PBoolean SetFrameSizeConverter(unsigned width, unsigned height, PBoolean)
Set the frame size to be used, trying converters if available.
Definition: videoio.h:546
virtual PBoolean SetColourFormat(const PString &colourFormat)
Set the colour format to be used.
int colour
Definition: videoio.h:418
virtual ~PVideoOutputDevice()
Close the video output device on destruction.
Definition: videoio.h:714
virtual int GetWhiteness()
Get the whiteness of the image.
virtual bool SetPosition(int x, int y)
Set the position of the output device, where relevant.
InputInteractType type
Definition: videoio.h:335
virtual unsigned GetFrameWidth() const
Get the width of the frame being used.
virtual PBoolean Close()
Close the device.
Definition: videoio.h:771
long step
Definition: videoio.h:277
This class defines a video output device.
Definition: videoio.h:703
virtual PBoolean SetChannel(int channelNumber)
Set the video channel to be used on the device.
unsigned rate
Definition: videoio.h:409
virtual PBoolean SetFrameData(unsigned x, unsigned y, unsigned width, unsigned height, const BYTE *data, PBoolean endFrame=true)=0
Set a section of the output frame buffer.
PINDEX CalculateFrameBytes() const
Get the number of bytes of an image, given a particular width, height and colour format.
Definition: videoio.h:202
PVideoOutputDevice()
Create a new video output device.
static PString AsString(const InputControlType &type)
virtual PBoolean SetColourFormatConverter(const PString &colourFormat)
Set the colour format to be used, trying converters if available.
Definition: videoio.h:387
const PString & GetDeviceName() const
Get the device name of the open device.
Definition: videoio.h:392
unsigned sarHeight
Definition: videoio.h:253
ResizeMode GetResizeMode() const
Get the resize mode to be used.
Definition: videoio.h:198
PBYTEArray frameStore
Definition: videoio.h:691
Definition: videoio.h:386
virtual PBoolean SetFrameSizeConverter(unsigned width, unsigned height, ResizeMode resizeMode=eMaxResizeMode)
Set the frame size to be used, trying converters if available.
int whiteness
Definition: videoio.h:416
int frameColour
Definition: videoio.h:696
static PVideoOutputDevice * CreateOpenedDevice(const PString &driverName, const PString &deviceName, PBoolean startImmediate=true, PPluginManager *pluginMgr=NULL)
Create an opened video output device that corresponds to the specified names.
virtual PBoolean GetFrameSizeLimits(unsigned &minWidth, unsigned &minHeight, unsigned &maxWidth, unsigned &maxHeight)
Get the minimum & maximum size of a frame on the device.
int brightness
Definition: videoio.h:415
virtual PINDEX GetMaxFrameBytes()
Get the maximum frame size in bytes.
Register remote Mouse Movement Clicks.
Definition: videoio.h:328
virtual unsigned GetSarWidth() const
Get the width of the sar being used.
Definition: videoio.h:383
virtual PStringArray GetDeviceNames(int) const
Definition: videoio.h:1196
virtual unsigned GetSarHeight() const
Get the height of the sar being used.
virtual int GetBrightness()
Get the brightness of the image.
virtual PBoolean SetVideoFormat(VideoFormat videoFormat)
Set the video format to be used.
PVideoDevice()
Create a new video device (input or output).
bool swappedRedAndBlue
Definition: videoio.h:913
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
virtual PBoolean CanCaptureVideo() const
Is the device a camera, and obtain video.
virtual PBoolean GetParameters(int *whiteness, int *brightness, int *colour, int *contrast, int *hue)
Return whiteness, brightness, colour, contrast and hue in one call.
PString colourFormat
Definition: videoio.h:407
PMutex mutex
Definition: videoio.h:910
static PStringArray GetDriverNames(PPluginManager *pluginMgr=NULL)
Get the list of available video output drivers (plug-ins)
Definition: videoio.h:326
unsigned frameHeight
Definition: videoio.h:251
long min
Definition: videoio.h:275
unsigned sarWidth
Definition: videoio.h:252