EasyCVR video protocol fusion platform not only supports the access of conventional protocols, we also expand haikang SDK, DAhua SDK, Ehome and other private protocols. If the front-end device protocol is different and the number is large, it can be integrated and unified management of all video channels through EasyCVR platform, and EasyCVR also supports cascade with other platforms that support GB28181 protocol.

In recent development, we have also optimized the EasyCVR’s functions by adding a traffic statistics function, which requires statistics of each channel and the traffic received and sent by the device.

Add the following code, when requesting the playback interface, get the current playing information from the streaming media, filter out the receiving traffic and sending traffic, and then save it to the database. The front end click query, on time by day by month back to the front end.

select { case <-ticker.C: module := utils.Conf().Section("base_config") trafficSumDay := module.Key("traffic_sum_day").MustInt(1) err := cvrservice.GetDeviceService().DeleteStreamLog(time.Now().Add(time.Hour * 24 * -time.Duration(trafficSumDay))) if err ! = nil { log.Println("err,", err.Error()) time.Sleep(time.Second * 3) continue } groups, err := mediaserver.GetLiveSessions() if err ! = nil { log.Println("err,", err.Error()) time.Sleep(time.Second * 3) continue }Copy the code

After adding, the front end click Play to display the following effect, can correctly return to the stream address:

At the same time, we can also intuitively see the change of flow.