#include #include #include #include "PTZBinding.nsmap" #include "av_demux/av_demux.h" int main(int argc, char **argv) { int ret; char parse_buf[MAX_BUF_SIZE] = { 0x00 }; playback_key data_set = {"192.168.1.101", "2022-7-3", "21-52-16"}; AVDevs *handle = NULL; ret = proto_AVInit(); if (ret < 0) { printf("AV stream initialization failure!\n"); return 0; } printf("start the av stream:\n"); handle = proto_AVGethandle(); proto_AVStart(handle); sleep(5 * 60 * 2); printf("stop the av stream now:\n"); proto_AVStop(handle, NORMAL); sleep(3); printf("re-start the AV now:\n"); proto_AVStart(handle); sleep(120); printf("pause the av stream now:\n"); proto_AVStop(handle, PAUSE); sleep(20); printf("resume the av:\n"); proto_AVStart(handle); sleep(200); printf("stop the av"); proto_AVStop(handle, NORMAL); sleep(3); ret = playback_get_key(data_set, parse_buf, sizeof(parse_buf)); if (ret > 0) { printf("found the playback file: %s\n", parse_buf); } else { printf("the playback file is not existed!\n"); } sleep(3000); printf("now exit the process:\n"); proto_AVClose(); return 0; }