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);
406 {
return deviceName; }
489 virtual int GetNumChannels();
506 virtual int GetChannel()
const;
514 virtual PBoolean SetColourFormatConverter(
535 virtual PBoolean GetFrameSizeLimits(
537 unsigned & minHeight,
548 virtual PBoolean SetFrameSizeConverter(
563 ) {
return SetFrameSizeConverter(width,height,
eScale); }
573 virtual PBoolean SetNearestFrameSize(
606 virtual PINDEX GetMaxFrameBytes() = 0;
616 virtual PBoolean CanCaptureVideo()
const = 0;
620 virtual int GetBrightness();
624 virtual PBoolean SetBrightness(
unsigned newBrightness);
629 virtual int GetWhiteness();
633 virtual PBoolean SetWhiteness(
unsigned newWhiteness);
638 virtual int GetColour();
642 virtual PBoolean SetColour(
unsigned newColour);
647 virtual int GetContrast();
651 virtual PBoolean SetContrast(
unsigned newContrast);
656 virtual int GetHue();
660 virtual PBoolean SetHue(
unsigned newHue);
676 virtual PBoolean SetVideoChannelFormat (
693 PINDEX GetMaxFrameBytesConverted(PINDEX rawFrameBytes)
const;
796 virtual PBoolean CanCaptureVideo()
const;
855 virtual bool SetPosition(
905 virtual PINDEX GetMaxFrameBytes();
920 virtual PBoolean FrameComplete() = 0;
930 #ifdef SHOULD_BE_MOVED_TO_PLUGIN 941 PVideoOutputDevicePPM();
967 unsigned frameNumber;
970 #endif // SHOULD_BE_MOVED_TO_PLUGIN 1054 )
const {
return GetDeviceCapabilities(GetDeviceName(), capabilities); }
1058 static PBoolean GetDeviceCapabilities(
1066 static PBoolean GetDeviceCapabilities(
1090 virtual PBoolean CanCaptureVideo()
const;
1094 virtual PBoolean IsCapturing() = 0;
1103 virtual PBoolean SetNearestFrameSize(
1118 PINDEX * bytesReturned,
1119 unsigned int & flags
1123 PINDEX * bytesReturned = NULL
1128 virtual PBoolean GetFrameDataNoDelay(
1130 PINDEX * bytesReturned,
1131 unsigned int & flags
1133 virtual PBoolean GetFrameDataNoDelay(
1135 PINDEX * bytesReturned = NULL
1140 virtual bool FlowControl(
const void * flowData);
1154 virtual bool SetCaptureMode(
unsigned mode);
1159 virtual int GetCaptureMode()
const;
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) 1239 const char *line[MAX_L_HEIGHT];
1242 static const LetterData * GetLetterData(
char ascii);
1247 #endif // PTLIB_PVIDEOIO_H const PString & GetDeviceName() const
Get the device name of the open device.
Definition: videoio.h:405
VideoFormat videoFormat
Definition: videoio.h:418
ResizeMode resizeMode
Definition: videoio.h:269
long current
Definition: videoio.h:293
PINDEX CalculateFrameBytes() const
Get the number of bytes of an image, given a particular width, height and colour format.
Definition: videoio.h:215
int channelNumber
Definition: videoio.h:419
Definition: videoio.h:412
int channelNumber
Definition: videoio.h:698
int GetLastError() const
Get the last error code.
Definition: videoio.h:611
Definition: videoio.h:281
ResizeMode
Definition: videoio.h:54
virtual PBoolean GetFrameSize(unsigned &width, unsigned &height) const
Get the frame size being used.
virtual unsigned GetFrameHeight() const
Get the height of the frame being used.
int frameContrast
Definition: videoio.h:708
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
Definition: videoio.h:1230
Definition: videoio.h:273
Definition: pluginmgr.h:57
PINDEX bytesPerPixel
Definition: videoio.h:924
long max
Definition: videoio.h:289
PString preferredColourFormat
Definition: videoio.h:700
virtual unsigned GetFrameWidth() const
Get the width of the frame being used.
PString colourFormat
Definition: videoio.h:268
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.
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.
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
virtual const PString & GetColourFormat() const
Get the colour format to be used.
int frameWhiteness
Definition: videoio.h:707
unsigned height
Definition: videoio.h:424
char ascii
Definition: videoio.h:1238
virtual PBoolean SetFrameSar(unsigned width, unsigned height)
Set the sar size to be used.
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
virtual unsigned GetFrameRate() const
Get the video frame rate used on the device.
int frameBrightness
Definition: videoio.h:706
Definition: videoio.h:1237
virtual Comparison Compare(const PObject &obj) const
Compare the two PVideoFrameInfo and return their relative rank.
InputInteractType
Definition: videoio.h:338
virtual PBoolean Start()
Start the video device I/O display.
Definition: videoio.h:788
int hue
Definition: videoio.h:432
InputControlType
Definition: videoio.h:279
VideoFormat
Definition: videoio.h:395
Register remote Navigation commands.
Definition: videoio.h:342
BOOL PBoolean
Definition: object.h:102
PVideoFrameInfo()
Construct video frame information.
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
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
friend ostream & operator<<(ostream &strm, ResizeMode mode)
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
PString deviceName
Definition: videoio.h:417
This class defines a video device.
Definition: videoio.h:380
long flags
Definition: videoio.h:292
PString deviceName
Definition: videoio.h:695
bool Parse(const PString &str)
Parse a descriptor string for the video format.
StandardSizes
Definition: videoio.h:63
PINDEX scanLineWidth
Definition: videoio.h:925
The character string class.
Definition: pstring.h:108
PPluginManager * pluginMgr
Definition: videoio.h:415
static PStringArray GetSizeNames()
Get all "known" image size names.
static PString Empty()
Return an empty string.
Definition: videoio.h:397
ResizeMode GetResizeMode() const
Get the resize mode to be used.
Definition: videoio.h:211
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 PStringArray GetDeviceNames(int) const
Definition: videoio.h:1209
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
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.
virtual PObject * CreateInstance(int) const
Definition: videoio.h:1208
int colour
Definition: videoio.h:431
virtual ~PVideoOutputDevice()
Close the video output device on destruction.
Definition: videoio.h:727
InputInteractType type
Definition: videoio.h:348
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
unsigned rate
Definition: videoio.h:422
unsigned sarHeight
Definition: videoio.h:266
PBYTEArray frameStore
Definition: videoio.h:704
Definition: videoio.h:399
int whiteness
Definition: videoio.h:429
int frameColour
Definition: videoio.h:709
virtual unsigned GetSarHeight() const
Get the height of the sar being used.
int brightness
Definition: videoio.h:428
Register remote Mouse Movement Clicks.
Definition: videoio.h:341
virtual PBoolean GetSarSize(unsigned &width, unsigned &height) const
Get the sar size being used.
Definition: videoio.h:396
bool swappedRedAndBlue
Definition: videoio.h:926
virtual unsigned GetSarWidth() const
Get the width of the sar being used.
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PString colourFormat
Definition: videoio.h:420
PMutex mutex
Definition: videoio.h:923
Definition: videoio.h:339
unsigned frameHeight
Definition: videoio.h:264
long min
Definition: videoio.h:288
unsigned sarWidth
Definition: videoio.h:265