33 lines
652 B
C++
33 lines
652 B
C++
#ifndef FRAMEOBSERVER_H
|
|
#define FRAMEOBSERVER_H
|
|
|
|
#include <linux/videodev2.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
#include <VimbaCPP/Include/VimbaCPP.h>
|
|
#include <mutex>
|
|
|
|
namespace AVT {
|
|
namespace VmbAPI {
|
|
namespace Examples {
|
|
|
|
class FrameObserver : public IFrameObserver
|
|
{
|
|
public:
|
|
FrameObserver(const CameraPtr& pCamera);
|
|
virtual ~FrameObserver();
|
|
|
|
void FrameReceived(const FramePtr pFrame) override;
|
|
|
|
private:
|
|
bool SetupVideoDevice();
|
|
void CloseVideoDevice();
|
|
|
|
int m_videoFd;
|
|
struct v4l2_format m_vfmt;
|
|
std::mutex m_deviceMutex;
|
|
};
|
|
|
|
}}} // namespace AVT::VmbAPI::Examples
|
|
|
|
#endif |