1 Star 0 Fork 1

星旋/LinuxMediaCapture

forked from icedbeer/LinuxMediaCapture 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cdevicectrl.h 2.27 KB
一键复制 编辑 原始数据 按行查看 历史
icedbeer 提交于 2016-12-02 17:18 . 更新 cdevicectrl.h
#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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/star-spinning/LinuxMediaCapture.git
git@gitee.com:star-spinning/LinuxMediaCapture.git
star-spinning
LinuxMediaCapture
LinuxMediaCapture
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385