代码拉取完成,页面将自动刷新
同步操作将从 icedbeer/LinuxMediaCapture 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef CDEVICECTRL_H
#define CDEVICECTRL_H
#include <QObject>
#include <pthread.h>
#include "global.h"
#include "log.h"
#include "libv4l2.h"
#include "libv4lconvert.h"
struct VideoBuffer {
void *start;
size_t length;
};
class CDeviceCtrl : public QObject
{
Q_OBJECT
public:
explicit CDeviceCtrl(QObject *parent = 0);
~CDeviceCtrl();
int OpenDevice();
int ReadAndDisplay();
int CloseDevice();
int GetDeviceHandle() {return fd;}
PSDLMODULE GetSdlModule(){return pSdlModule;}
PTAVSDLYUVSURFACE GetSurface(){return pSurface;}
struct VideoBuffer *GetVideoBuffer(){return video_buffers;}
bool GetCapFlag() {return devam;}
CDebugLog* GetDebugLog(){ return pLog;}
protected:
int ReadConfigure(const char *filename);
private:
QObject* parent;
CDebugLog* pLog;
pthread_t hThreadDisplayHandle; //渲染线程句柄
pthread_t hThreadRecordHandle; //录制线程句柄
bool devam;
int fd;
unsigned int buffer_count;
char out_name[256];
PSDLMODULE pSdlModule; //SDL资源
PTAVSDLYUVSURFACE pSurface; //SDL资源
struct VideoBuffer* video_buffers;
public:
uint32_t inputIndex;
uint32_t videoFrameRate;
uint32_t captureWidth,
uint32_t captureHeight;
uint32_t volume;
uint32_t audioFrequency;
uint32_t channel;
uint32_t pingTimes;
uint32_t pingInterval;
uint32_t masterEncoderPort;
uint32_t backupEncoderPort;
uint32_t pingPort;
QString defaultPlayFile;
QString masterMuticastIp;
QString backupMuticastIp;
QString masterEncoderIp;
QString backupEncoderIp;
QString masterIp;
QString backupIp;
bool isFullScreen;
bool isMaster;
};
#endif // CDEVICECTRL_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。