32 #ifndef PTLIB_PVIDEOIO_H
33 #define PTLIB_PVIDEOIO_H
38 #include <ptbuildopts.h>
307 virtual PBoolean Pan(
long value,
bool absolute =
false );
308 virtual PBoolean Tilt(
long value,
bool absolute =
false);
309 virtual PBoolean Zoom(
long value,
bool absolute =
false);
537 unsigned & minHeight,
778 const OpenArgs & args,
930 #ifdef SHOULD_BE_MOVED_TO_PLUGIN
941 PVideoOutputDevicePPM();
967 unsigned frameNumber;
970 #endif // SHOULD_BE_MOVED_TO_PLUGIN
1040 const OpenArgs & args,
1060 Capabilities * capabilities,
1069 Capabilities * caps,
1118 PINDEX * bytesReturned,
1119 unsigned int & flags
1123 PINDEX * bytesReturned = NULL
1130 PINDEX * bytesReturned,
1131 unsigned int & flags
1135 PINDEX * bytesReturned = NULL
1177 #define PCREATE_VIDINPUT_PLUGIN(name) \
1178 static PVideoInputPluginServiceDescriptor<PVideoInputDevice_##name> PVideoInputDevice_##name##_descriptor; \
1179 PCREATE_PLUGIN(name, PVideoInputDevice, &PVideoInputDevice_##name##_descriptor)
1212 #define PCREATE_VIDOUTPUT_PLUGIN(name) \
1213 static PVideoOutputPluginServiceDescriptor<PVideoOutputDevice_##name> PVideoOutputDevice_##name##_descriptor; \
1214 PCREATE_PLUGIN(name, PVideoOutputDevice, &PVideoOutputDevice_##name##_descriptor)
1247 #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:418
virtual PBoolean SetColour(unsigned newColour)
Set colour of the image.
ResizeMode resizeMode
Definition: videoio.h:269
long current
Definition: videoio.h:293
PVideoOutputDeviceRGB()
Create a new video output device.
int channelNumber
Definition: videoio.h:419
Definition: videoio.h:412
virtual Comparison Compare(const PObject &obj) const
Compare the two PVideoFrameInfo and return their relative rank.
int channelNumber
Definition: videoio.h:698
Definition: videoio.h:281
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:708
virtual PBoolean GetFrameSize(unsigned &width, unsigned &height) const
Get the frame size being used.
unsigned frameWidth
Definition: videoio.h:263
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
int frameHue
Definition: videoio.h:710
unsigned width
Definition: videoio.h:423
PString driverName
Definition: videoio.h:416
bool convertSize
Definition: videoio.h:425
long def
Definition: videoio.h:291
virtual PBoolean FrameComplete()=0
Indicate frame may be displayed.
Definition: videoio.h:1230
Definition: videoio.h:273
Definition: pluginmgr.h:57
PINDEX bytesPerPixel
Definition: videoio.h:924
virtual PBoolean SetVFlipState(PBoolean newVFlipState)
Set the video conversion vertical flip state.
long max
Definition: videoio.h:289
PString preferredColourFormat
Definition: videoio.h:700
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:268
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:287
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.
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
Register remote KeyPresses.
Definition: videoio.h:340
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
int frameWhiteness
Definition: videoio.h:707
static const LetterData * GetLetterData(char ascii)
virtual PObject * CreateInstance(int) const
Definition: videoio.h:1208
unsigned height
Definition: videoio.h:424
char ascii
Definition: videoio.h:1238
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:282
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:205
Definition: videoio.h:280
int frameBrightness
Definition: videoio.h:706
Definition: videoio.h:1237
InputInteractType
Definition: videoio.h:338
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:788
const char * line[MAX_L_HEIGHT]
Definition: videoio.h:1239
virtual PBoolean Stop()=0
Stop the video device I/O capture.
int hue
Definition: videoio.h:432
InputControlType
Definition: videoio.h:279
Definition: videoio.h:1235
VideoFormat
Definition: videoio.h:395
Register remote Navigation commands.
Definition: videoio.h:342
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:332
Definition: videoio.h:398
Register remote RTSP (Real Time Streaming Protocol) Inputs.
Definition: videoio.h:343
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:792
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:426
PPLUGIN_STATIC_LOAD(FakeVideo, PVideoInputDevice)
Definition: videoio.h:1205
int contrast
Definition: videoio.h:430
unsigned frameRate
Definition: videoio.h:267
virtual PBoolean Start()=0
Start the video device I/O capture.
static PString AsString(const InputInteractType &type)
PString deviceName
Definition: videoio.h:417
This class defines a video device.
Definition: videoio.h:380
virtual int GetChannel() const
Get the video channel to be used on the device.
long flags
Definition: videoio.h:292
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:695
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:925
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:415
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:397
virtual int GetContrast()
Get the contrast of the image.
int GetLastError() const
Get the last error code.
Definition: videoio.h:611
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:690
PBoolean nativeVerticalFlip
Definition: videoio.h:701
PColourConverter * converter
Definition: videoio.h:703
VideoFormat videoFormat
Definition: videoio.h:697
bool convertFormat
Definition: videoio.h:421
bool flip
Definition: videoio.h:427
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
int lastError
Definition: videoio.h:696
void SetPreferredColourFormat(const PString &colourFmt)
Set preferred native colour format from video capture device.
Definition: videoio.h:685
This class defines a video output device for RGB in a frame store.
Definition: videoio.h:864
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:559
virtual PBoolean SetColourFormat(const PString &colourFormat)
Set the colour format to be used.
int colour
Definition: videoio.h:431
virtual ~PVideoOutputDevice()
Close the video output device on destruction.
Definition: videoio.h:727
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:348
virtual unsigned GetFrameWidth() const
Get the width of the frame being used.
virtual PBoolean Close()
Close the device.
Definition: videoio.h:784
long step
Definition: videoio.h:290
This class defines a video output device.
Definition: videoio.h:716
virtual PBoolean SetChannel(int channelNumber)
Set the video channel to be used on the device.
unsigned rate
Definition: videoio.h:422
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:215
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:400
const PString & GetDeviceName() const
Get the device name of the open device.
Definition: videoio.h:405
unsigned sarHeight
Definition: videoio.h:266
ResizeMode GetResizeMode() const
Get the resize mode to be used.
Definition: videoio.h:211
PBYTEArray frameStore
Definition: videoio.h:704
Definition: videoio.h:399
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:429
int frameColour
Definition: videoio.h:709
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:428
virtual PINDEX GetMaxFrameBytes()
Get the maximum frame size in bytes.
Register remote Mouse Movement Clicks.
Definition: videoio.h:341
virtual unsigned GetSarWidth() const
Get the width of the sar being used.
Definition: videoio.h:396
virtual PStringArray GetDeviceNames(int) const
Definition: videoio.h:1209
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:926
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:420
PMutex mutex
Definition: videoio.h:923
static PStringArray GetDriverNames(PPluginManager *pluginMgr=NULL)
Get the list of available video output drivers (plug-ins)
Definition: videoio.h:339
unsigned frameHeight
Definition: videoio.h:264
long min
Definition: videoio.h:288
unsigned sarWidth
Definition: videoio.h:265