7 #ifndef __vtkPlusV4L2VideoSource_h 8 #define __vtkPlusV4L2VideoSource_h 10 #include "vtkPlusDataCollectionExport.h" 14 #include <linux/videodev2.h> 63 vtkSetStdStringMacro(DeviceName);
64 vtkGetStdStringMacro(DeviceName);
70 PlusStatus ReadFrame(
unsigned int& currentBufferIndex,
unsigned int& bytesUsed);
72 PlusStatus ReadFrameFileDescriptor(
unsigned int& currentBufferIndex,
unsigned int& bytesUsed);
73 PlusStatus ReadFrameMemoryMap(
unsigned int& currentBufferIndex,
unsigned int& bytesUsed);
74 PlusStatus ReadFrameUserPtr(
unsigned int& currentBufferIndex,
unsigned int& bytesUsed);
87 static std::
string IOMethodToString(V4L2_IO_METHOD ioMethod);
88 static V4L2_IO_METHOD StringToIOMethod(const std::
string& method);
90 static std::
string PixelFormatToString(
unsigned int format);
91 static
unsigned int StringToPixelFormat(const std::
string& format);
93 static std::
string FieldOrderToString(v4l2_field field);
94 static v4l2_field StringToFieldOrder(const std::
string& field);
98 std::
string DeviceName;
99 V4L2_IO_METHOD IOMethod;
101 std::shared_ptr<
unsigned int> FormatWidth;
102 std::shared_ptr<
unsigned int> FormatHeight;
103 std::shared_ptr<
unsigned int> PixelFormat;
104 std::shared_ptr<v4l2_field> FieldOrder;
108 FrameBuffer* FrameBuffers;
109 unsigned int BufferCount;
111 igsioFieldMapType FrameFields;
112 std::shared_ptr<struct v4l2_format> DeviceFormat;
115 FrameSizeType ImageSize;
116 uint32_t NumberOfScalarComponents;
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract interface for tracker and video devices.
virtual PlusStatus InternalConnect()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
Class for interfacing an V4L2 device and recording frames into a Plus buffer.
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()
Interface to a 3D positioning tool, video source, or generalized data stream.