资源简介
直接从IP摄像头获取数据(H265数据需稍微改动),然后作为服务器转发,支持多个摄像头同时连接。摄像头的地址和用户名密码在代码中更改即可。下载后可留言交流。
代码片段和文件信息
/*
Copyright (c) 2009 Dave Gamble
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* cJSON */
/* JSON parser in C. */
#include
#include
#include
#include
#include
#include
#include
#include “cJSON.h“
static const char *ep;
const char *cJSON_GetErrorPtr(void) {return ep;}
static int cJSON_strcasecmp(const char *s1const char *s2)
{
if (!s1) return (s1==s2)?0:1;if (!s2) return 1;
for(; tolower(*s1) == tolower(*s2); ++s1 ++s2) if(*s1 == 0) return 0;
return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);
}
static void *(*cJSON_malloc)(size_t sz) = malloc;
static void (*cJSON_free)(void *ptr) = free;
static char* cJSON_strdup(const char* str)
{
size_t len;
char* copy;
len = strlen(str) + 1;
if (!(copy = (char*)cJSON_malloc(len))) return 0;
memcpy(copystrlen);
return copy;
}
void cJSON_InitHooks(cJSON_Hooks* hooks)
{
if (!hooks) { /* Reset hooks */
cJSON_malloc = malloc;
cJSON_free = free;
return;
}
cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc;
cJSON_free = (hooks->free_fn)?hooks->free_fn:free;
}
/* Internal constructor. */
static cJSON *cJSON_New_Item(void)
{
cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON));
if (node) memset(node0sizeof(cJSON));
return node;
}
/* Delete a cJSON structure. */
void cJSON_Delete(cJSON *c)
{
cJSON *next;
while (c)
{
next=c->next;
if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child);
if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
if (!(c->type&cJSON_StringIsConst) && c->string) cJSON_free(c->string);
cJSON_free(c);
c=next;
}
}
/* Parse the input text to generate a number and populate the result into item. */
static const char *parse_number(cJSON *itemconst char *num)
{
double n=0sign=1scale=0;int subscale=0signsubscale=1;
if (*num==‘-‘) sign=-1num++; /* H
相关资源
- QT地图的高德地图插件(Map Plugin)
- 基于qt的视频播放器104396
- QT录音
- 997783QTableWidget表头添加复选框.zip
- qt_multicast.tar.gz
- QT5 雷达扫描效果代码
- QQLogin.ui
- Qt使用QGraphicsView实现滑动窗体效果
- opencv与qt结合使用的(亲测可用)
- QT实现的五子棋
- Qt 之 实现简单截图功能二
- Qt 之 实现简单截图功能一
- Qt 之 HTTP 请求支持断点续传
- PyQt5 tutorial PyQt5教程英文版
- qtsoap-2.7_1
- linux Qt局域网聊天
- Qt 多线程及简单 demo
- Qt实现的FlatUI样式
- Qt编写视频监控画面分割界面
- QT5线程QThread使用
- 基于Qt的声波图形界面动态绘制
- Qt单机斗地主
- 智能小车QT远程客户端
- 视频小车QT客户端
- qt实现n皇后问题带界面
- QRGenerator.zip
- WidgetTimeline.zip
- linux下的设计QT计算器
- Qt自定义QLabel滚动显示文本文字,la
- 用Qt编写的具有人机对战的五子棋
评论
共有 条评论