27 #include <wx/rawbmp.h>
30 #ifndef P_WXWINDOWS_IMPLEMENTATION_ONLY
32 #define P_WXWINDOWS_DRIVER_NAME "wxWindows"
33 #define P_WXWINDOWS_DEVICE_NAME "wxWindows"
34 #define P_WXWINDOWS_DEVICE_CLASS PVideoOutputDevice_##wxWindows
119 #endif // P_WXWINDOWS_IMPLEMENTATION_ONLY
121 #ifndef P_WXWINDOWS_DECLARATION_ONLY
131 virtual
bool ValidateDeviceName(const
PString & deviceName,
P_INT_PTR )
const
141 , m_bitmap(m_frameWidth, m_frameHeight, 24)
143 , m_bitmap(m_frameWidth, m_frameHeight, 32)
173 if (wxThread::IsMain())
205 if (wxThread::IsMain())
220 wxFrame::Close(
true);
292 wxNativePixelData::Iterator it = bmdata.GetPixels();
298 if (bmdata.GetRowStride() < 0)
312 wxSize sz = GetClientSize();
313 if (sz.GetWidth() !=
m_bitmap.GetWidth() || sz.GetHeight() !=
m_bitmap.GetHeight()) {
339 #endif // P_WXWINDOWS_DECLARATION_ONLY
static PStringArray GetOutputDeviceNames()
Definition: wxWinVidDev.h:163
unsigned m_frameWidth
Definition: videoio.h:266
This class defines a class to bridge WX Widgets strings to PTLib strings.
Definition: wxstring.h:34
This class waits for the semaphore on construction and automatically signals the semaphore on destruc...
Definition: psync.h:115
wxDECLARE_DYNAMIC_CLASS(P_WXWINDOWS_DEVICE_CLASS)
Definition: object.h:2253
void OnClose(wxCloseEvent &)
Definition: wxWinVidDev.h:224
Definition: wxWinVidDev.h:112
virtual PStringArray GetDeviceNames() const
Get a list of all of the devices available.
Definition: wxWinVidDev.h:157
#define P_WXWINDOWS_DEVICE_NAME
Definition: wxWinVidDev.h:33
int ParseDeviceNameTokenInt(const char *token, int defaultValue)
virtual unsigned GetFrameHeight() const
Get the height of the frame being used.
virtual PBoolean FrameComplete()
Set a section of the output frame buffer.
Definition: wxWinVidDev.h:284
void InternalOpen()
Definition: wxWinVidDev.h:184
~P_WXWINDOWS_DEVICE_CLASS()
Destroy the device, make sure it is closed.
Definition: wxWinVidDev.h:151
PString ParseDeviceNameTokenString(const char *token, const char *defaultValue)
virtual PBoolean SetColourFormat(const PString &colourFormat)
Set the colour format to be used.
This is an array collection class of PString objects.
Definition: pstring.h:2365
void InternalFrameComplete()
Definition: wxWinVidDev.h:307
virtual PBoolean IsOpen()
Indicate if this video rendering class is open.
Definition: wxWinVidDev.h:247
PCaselessString m_deviceName
Definition: videoio.h:684
#define PTRACE(...)
Output trace.
Definition: object.h:1039
unsigned m_frameHeight
Definition: videoio.h:267
virtual PBoolean Close()
Synonymous with the destructor.
Definition: wxWinVidDev.h:199
Display data to the wxWindows window.
Definition: wxWinVidDev.h:39
void InternalClose()
Definition: wxWinVidDev.h:216
Definition: wxWinVidDev.h:112
virtual PINDEX GetSize() const
Get the current size of the container.
bool PBoolean
Definition: object.h:174
virtual PBoolean Open(const PString &deviceName, PBoolean=true)
Open the device given the device name.
Definition: wxWinVidDev.h:169
intptr_t P_INT_PTR
Definition: object.h:2646
The character string class.
Definition: pstring.h:108
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
T * GetPointer(PINDEX minSize=0)
Get a pointer to the internal array and assure that it is of at least the specified size...
Definition: array.h:366
virtual PBoolean SetFrameSize(unsigned width, unsigned height)
Set the frame size to be used.
Definition: wxWinVidDev.h:261
virtual PBoolean Stop()
Stop the video device I/O display.
Definition: wxWinVidDev.h:241
This class defines a video output device for RGB in a frame store.
Definition: videoio.h:879
virtual PBoolean SetColourFormat(const PString &colourFormat)
Set the colour format to be used.
Definition: wxWinVidDev.h:253
PCREATE_VIDOUTPUT_PLUGIN_EX(wxWindows, virtual bool ValidateDeviceName(const PString &deviceName, P_INT_PTR) const {return deviceName.NumCompare(GetServiceName())==PObject::EqualTo;})
Definition: wxWinVidDev.h:112
bool m_nativeVerticalFlip
Definition: videoio.h:689
PBYTEArray m_frameStore
Definition: videoio.h:692
virtual unsigned GetFrameWidth() const
Get the width of the frame being used.
wxBitmap m_bitmap
Definition: wxWinVidDev.h:113
#define PAssert(b, msg)
This macro is used to assert that a condition must be true.
Definition: object.h:400
P_WXWINDOWS_DEVICE_CLASS()
Constructor.
Definition: wxWinVidDev.h:138
wxIMPLEMENT_DYNAMIC_CLASS(P_WXWINDOWS_DEVICE_CLASS, wxFrame)
void OnPaint(wxPaintEvent &)
Definition: wxWinVidDev.h:323
PString psprintf(const char *fmt,...)
The same as the standard C snprintf(fmt, 1000, ...), but returns a PString instead of a const char *...
enum P_WXWINDOWS_DEVICE_CLASS::@43 m_state
A logic error occurred.
Definition: object.h:370
Definition: wxWinVidDev.h:112