资源简介
使用Qt抓屏,然后通过avilib合成视频并保存至本地。
属于demo级,已完成录屏功能,具体性能待优化。
代码片段和文件信息
/*
* avilib.c
*
* Copyright (C) Thomas streich - June 2001
* multiple audio track support Copyright (C) 2002 Thomas streich
*
* Original code:
* Copyright (C) 1999 Rainer Johanni
*
* This file is part of transcode a linux video stream processing tool
*
* transcode is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 or (at your option)
* any later version.
*
* transcode is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Make; see the file COPYING. If not write to
* the Free Software Foundation 675 Mass Ave Cambridge MA 02139 USA.
*
*/
//SLM
#ifdef WIN32
#include
#define ftruncate _chsize
#define strncasecmp _strnicmp
typedef int ssize_t;
#endif
#ifdef __CYGWIN__
#include
#endif
#include “avilib.h“
//#include
#define INFO_LIST
/* The following variable indicates the kind of error */
long AVI_errno = 0;
#define MAX_INFO_STRLEN 64
static char id_str[MAX_INFO_STRLEN];
#define frame_RATE_SCALE 1000000
/*******************************************************************
* *
* Utilities for writing an AVI File *
* *
*******************************************************************/
static size_t avi_read(int fd char *buf size_t len)
{
size_t n = 0;
size_t r = 0;
while (r < len) {
n = read (fd buf + r len - r);
if ((ssize_t)n <= 0)
return r;
r += n;
}
return r;
}
static size_t avi_write (int fd char *buf size_t len)
{
size_t n = 0;
size_t r = 0;
while (r < len) {
n = write (fd buf + r len - r);
if ((ssize_t)n < 0)
return n;
r += n;
}
return r;
}
/* HEADERBYTES: The number of bytes to reserve for the header */
#define HEADERBYTES 2048
/* AVI_MAX_LEN: The maximum length of an AVI file we stay a bit below
the 2GB limit (Remember: 2*10^9 is smaller than 2 GB) */
#define AVI_MAX_LEN (UINT_MAX-(1<<20)*16-HEADERBYTES)
#define PAD_EVEN(x) ( ((x)+1) & ~1 )
/* Copy n into dst as a 4 byte little endian number.
Should also work on big endian machines */
static void long2str(unsigned char *dst int n)
{
dst[0] = (n )&0xff;
dst[1] = (n>> 8)&0xff;
dst[2] = (n>>16)&0xff;
dst[3] = (n>>24)&0xff;
}
/* Convert a string of 4 or 2 bytes to a number
also working on big endi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 50688 2018-11-28 14:41 HmsAvLibScreenRecording\.vs\HmsAvLibScreenRecording\v14\.suo
文件 54896 2016-09-06 13:28 HmsAvLibScreenRecording\HmsAvLibScreenRecording\avilib.c
文件 12027 2016-09-06 13:28 HmsAvLibScreenRecording\HmsAvLibScreenRecording\avilib.h
文件 2918052 2018-11-28 14:36 HmsAvLibScreenRecording\HmsAvLibScreenRecording\avi_20181128143541822.avi
文件 3829216 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\avi_20181128143710955.avi
文件 3281904 2018-11-28 14:24 HmsAvLibScreenRecording\HmsAvLibScreenRecording\avi_test.avi
文件 4648 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\Debug\HmsAvLibScreenRecording.Build.CppClean.log
文件 3 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\Debug\HmsAvLibScreenRecording.log
文件 537 2018-11-28 14:14 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.cpp
文件 495 2018-11-28 14:02 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.h
文件 83 2018-11-28 13:04 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.qrc
文件 1705 2018-11-28 13:43 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.ui
文件 9352 2018-11-28 14:02 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.vcxproj
文件 2443 2018-11-28 14:02 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.vcxproj.filters
文件 641 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\HmsAvLibScreenRecording.vcxproj.user
文件 205 2018-11-28 13:04 HmsAvLibScreenRecording\HmsAvLibScreenRecording\main.cpp
文件 1732 2018-11-28 14:41 HmsAvLibScreenRecording\HmsAvLibScreenRecording\QRecordingModule.cpp
文件 583 2018-11-28 14:19 HmsAvLibScreenRecording\HmsAvLibScreenRecording\QRecordingModule.h
文件 997 2018-11-28 13:04 HmsAvLibScreenRecording\HmsAvLibScreenRecording.sln
文件 45019136 2018-11-28 14:41 HmsAvLibScreenRecording\HmsAvLibScreenRecording.VC.db
目录 0 2018-11-28 13:04 HmsAvLibScreenRecording\.vs\HmsAvLibScreenRecording\v14
目录 0 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\Debug\HmsAvLib.B12702AD.tlog
目录 0 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\GeneratedFiles\Debug
目录 0 2018-11-28 13:04 HmsAvLibScreenRecording\.vs\HmsAvLibScreenRecording
目录 0 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\Debug
目录 0 2018-11-28 14:37 HmsAvLibScreenRecording\HmsAvLibScreenRecording\GeneratedFiles
目录 0 2018-11-28 13:04 HmsAvLibScreenRecording\HmsAvLibScreenRecording\Resources
目录 0 2018-11-28 14:37 HmsAvLibScreenRecording\Win32\Debug
...D.H. 0 2018-11-28 13:04 HmsAvLibScreenRecording\.vs
目录 0 2018-11-28 14:04 HmsAvLibScreenRecording\Debug
............此处省略6个文件信息
相关资源
- 《Qt 5编程入门》书籍配套源码
- mingw编译的opencv库
- 米依公司激光扫描仪上位机例程,Q
- Qt及Qt Quick开发实战精解代码
- 多线程TCP服务器运行程序
- 技小新-MQTT单片机编程小工具.zip
- Qt:实战小程序源代码
- 亚马逊棋Qt源代码和可执行程序
- 基于QT设计的网络音乐播放器
- FFmpeg+qt实现的播放器工程
- QT5.7 + OPENCV3.2 + 动态条形码识别
- 手把手Qt串口调试助手开发源码
- qt温湿度上位机源码
- CodeEditor
- VS+QT+Balser相机开发
- qtcreator-gdb-7.4-MINGW32_NT-6.1-i686.tar QT4 调
- Qt海康威视SDK二次开发登录与预览
- qt3安装必备大礼包
- 基于SeetaFace+VS2017+Qt的人脸识别
- QT图像处理系统三合一
- texstudio-2.12.22-win-qt5.zip
- QT Creator快速入门(第3版 高清PDF)
- Qt Creator for Linux 32位 qt-creator-linux-x8
- qt 局域网图像(json文件打包)传输
-
mediaPla
yer.zip - 北邮计算机网络实验-用开源代码实验
- 基于Qt5.9.1(MSVC) PJSIP网络电话源代码
- arm-none-linux-gnueabi-gcc-4.8.3
- snap7库在qt5下的配置程序存档
- Qt Creator快速入门(第三版)
评论
共有 条评论