当前位置:网站首页>Easydss anonymous live channel data volume instability optimization scheme sharing
Easydss anonymous live channel data volume instability optimization scheme sharing
2022-06-24 08:31:00 【Tsingsee green rhino video】
EasyDSS As a streaming media transmission platform supporting video on demand , You can upload video files by yourself , You can also play the uploaded on-demand file as a virtual live broadcast . meanwhile , In terms of video file upload , We also added new features , That is, regularly upload the latest video files to the file server .
In the test EasyDSS During anonymous live broadcast in, the data of the number of online anonymous live broadcast channels is often unstable , For example, always online 20 Data , Sometimes it shows 10 strip , Sometimes it shows 20 strip .
Look at the code , The data information of each anonymous live broadcast update is as follows : Receive the live stream information from the kernel , First, check whether the live broadcast or virtual live broadcast is available in the database , If you don't find , It is considered as anonymous live broadcast .
When the front end queries , Part of the data is due to the speed of database update , Not updated in time , So the problem arises .
The original code is as follows :
// Update stream information gLives.Set(group.StreamName, sessionInfo) gSessChan <- sessionInfo
gSessChan <- sessionInfo This line of code is to send data to the channel , In addition, judge according to the database .
So we modified the code as follows :
if !gLives.Has(group.StreamName) {
// Push into the channel , Process information according to the database
// If this is the first time online , Update type
gSessChan <- sessionInfo
} else {
info, _ := gLives.Get(group.StreamName)
oldSessionInfo := info.(*dto.SessionInfo)
sessionInfo.Name = oldSessionInfo.Name
sessionInfo.Type = oldSessionInfo.Type
}
// Update stream information
gLives.Set(group.StreamName, sessionInfo)If the corresponding type is found in the historical data , Use the original data type directly . After modification, the data is stable and normal .
EasyDSS The use of the scene is very rich , The updated version is also more and more in line with the update of modern technology and the use needs of users , In addition to the online education we mentioned above 、 In addition to the application of video on demand , It can also be extended to the Internet of things 、 Logistics warehousing 、 Mobile monitoring and other aspects , One of the most popular ones is the realization of UAV EasyDSS Video streaming live broadcast , We have also made many plans for live video broadcasting of UAVs , Welcome to know and test .
边栏推荐
- 11--无重复字符的最长子串
- Qopengl display point cloud file
- 51 single chip microcomputer_ External interrupt and timer / Counter interrupt
- ZUCC_ Principles of compiling language and compilation_ Experiment 03 getting started with compiler
- dhcp、tftp基础
- [graduation season] Hello stranger, this is a pink letter
- Search and recommend those things
- Swift 基础 Swift才有的特性
- 2021-03-16 comp9021 class 9 notes
- 【微服务~Nacos】Nacos服务提供者和服务消费者
猜你喜欢

ZUCC_ Principles of compiling language and compilation_ Experiment 05 regular expression, finite automata, lexical analysis

12-- merge two ordered linked lists

Longhorn installation and use

Question 3 - MessageBox pop-up box, modify the default background color

Small sample fault diagnosis - attention mechanism code - Implementation of bigru code parsing

Qt导出PDF文件的两种方法

RCNN、Fast-RCNN、Faster-RCNN介绍

C language_ Love and hate between string and pointer

For a detailed explanation of flex:1, flex:1

longhorn安装与使用
随机推荐
根据网络上的视频的m3u8文件通过ffmpeg进行合成视频
LabVIEW查找n个元素数组中的质数
12--合并两个有序链表
[ACNOI2022]不是构造,胜似构造
How to implement approval function in Tekton
DHCP, TFTP Foundation
Qt导出PDF文件的两种方法
Swift extension chainlayout (UI chain layout) (source code)
OpenCV to realize the basic transformation of image
常用日期格式符与Qt获取当前时间的办法
For a detailed explanation of flex:1, flex:1
Three categories of financial assets under the new standards: AMC, fvoci and FVTPL
2021-06-25: a batch of strings consisting only of lowercase letters (a~z) are put
新准则金融资产三分类:AMC、FVOCI和FVTPL
2022 mobile crane driver special operation certificate examination question bank and online simulation examination
Tool functions – get all files in the project folder
2022年流动式起重机司机特种作业证考试题库及在线模拟考试
2021-03-16 COMP9021第九节课笔记
复习SGI STL二级空间配置器(内存池) | 笔记自用
Several ways you can't move zero (sequel)