当前位置:网站首页>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 .
边栏推荐
- ZUCC_ Principles of compiling language and compilation_ Big job
- C language_ Love and hate between string and pointer
- [acnoi2022] not a structure, more like a structure
- How to configure networkpolicy for nodeport in kubernetes
- Detailed explanation of etcd backup and recovery principle and actual record of stepping on the pit
- 2021-06-25: a batch of strings consisting only of lowercase letters (a~z) are put
- 【毕业季】你好陌生人,这是一封粉色信笺
- ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar
- 你还只知道测试金字塔?
- 自动化测试的未来趋势
猜你喜欢
随机推荐
Opencv get (propid) common values
ZUCC_编译语言原理与编译_实验03 编译器入门
How to use the virtual clock of FPGA?
WCF TCP protocol transmission
13 -- remove invalid parentheses
Utilisation de la fermeture / bloc de base SWIFT (source)
Blue Bridge Cup_ Queen n problem
Robot acceleration level task priority inverse kinematics
All you know is the test pyramid?
一文带你了解Windows操作系统安全,保护自己的电脑不受侵害
Paper notes: multi label learning dm2l
Swift extension chainlayout (UI chain layout) (source code)
OpenCV get(propId) 常用的值
JS scroll div scroll bar to bottom
ZUCC_ Principles of compiling language and compilation_ Experiment 08 parsing LR parsing
ZUCC_编译语言原理与编译_实验05 正则表达式、有限自动机、词法分析
C language_ Love and hate between string and pointer
[real estate opening online house selection, WiFi coverage temporary network] 500 people are connected to WiFi at the same time
Take my brother to do the project. It's cold
App Startup








