mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 1752|reply: 6
打印 prevThread nextThread

优视平台远程录像,文件命名时间错误

[copyURL]

1

主题

580

帖子

2001

积分

vipMem

Rank: 6Rank: 6

积分
2001
owner
poston 2019-4-25 11:59 | 显示全部楼层
您好,设备端本地录像文件名中的时间是如何生成的呢?能否贴下
reply agree Against

使用道具 report

1

主题

580

帖子

2001

积分

vipMem

Rank: 6Rank: 6

积分
2001
sofa
poston 2019-4-25 15:29 | 显示全部楼层
LGL-UM post on2019-4-25 15:21
本地文件生成:
    struct tm *t = HI_NULL;
    struct  timeval    tv;

那就奇怪了,跟我们这边生成文件名是一样的过程,tim就是设备码流中的时间戳。
不过服务器是转换成服务器的本地时间。

time_t nowTime = tim/SAV_TIME_BASE;
    tm  nt;
    localtime_s(&nt,&nowTime);
    // past error video pack
    if ((nt.tm_year + 1900) < 2000)
    {
        nowTime = time(NULL);
        if (nowTime - openTime < 30) // 30 s
            return NULL;
        localtime_s(&nt, &openTime);
        // create file name
        sprintf_s(dst, len, "%s%s_%02d_%4d%02d%02d_%02d%02d%02d_(local).mkv", path, devID, channel, nt.tm_year + 1900, nt.tm_mon + 1, nt.tm_mday, nt.tm_hour, nt.tm_min, nt.tm_sec);
    }
    else
        sprintf_s(dst,len,"%s%s_%02d_%4d%02d%02d_%02d%02d%02d.mkv",path,devID,channel,nt.tm_year + 1900,nt.tm_mon + 1,nt.tm_mday,nt.tm_hour,nt.tm_min,nt.tm_sec);
    memset(dst + strlen(dst), 0, len - strlen(dst));
reply agree Against

使用道具 report

1

主题

580

帖子

2001

积分

vipMem

Rank: 6Rank: 6

积分
2001
bench
poston 2019-4-25 15:36 | 显示全部楼层
LGL-UM post on2019-4-25 15:21
本地文件生成:
    struct tm *t = HI_NULL;
    struct  timeval    tv;

我用客户端登陆上去看看。
reply agree Against

使用道具 report

1

主题

580

帖子

2001

积分

vipMem

Rank: 6Rank: 6

积分
2001
ground
poston 2019-4-25 15:43 | 显示全部楼层
LGL-UM post on2019-4-25 15:21
本地文件生成:
    struct tm *t = HI_NULL;
    struct  timeval    tv;

我这边用客户端登陆拉流查看,码流时间戳是多了8个小时,希望您那边BVCSP_Dialog_Write时将时间戳打印出来,验证下。
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-5-2 15:19 , Processed in 0.057620 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList