当前位置:网站首页>Main business objects of pupanvr record (5)

Main business objects of pupanvr record (5)

2022-06-12 04:56:00 hi_ LeTian

         In the product , according to NVR Habits in the configuration of video cameras , There's the concept of access , When configuring video recording , Define the access camera as an access channel , The camera is bound to a channel , So draw the image of a channel (TVideoChannel), At the same time, the connected device may be a camera , Or maybe it's just a video stream , Or a channel for playing back video , Then the source is a video file . So here's another one TVideoSource Object of , Using polymorphism to realize video source has : Camera source 、MP4 Source, etc . For channels in the system , If configured , Generally, it will be in the state of open operation , The life cycle is generally maintained , Such as video operation , For video playback preview, there is a decoder concept in both hardware and software , We define the object concept of a player , The player is not necessarily bound to the channel or opened for a long time , The performance of general hardware codec is limited , In this way, the object of the player should consider multi-channel reuse or dynamic binding , Real time creation , At the same time, the life cycle of its existence is generally not like that of a channel, which is always running as long as it is configured . The object of the player is also an isolated image of the software and hardware decoder .

According to the idea above , You need the following objects to appear in the system :

Video channel -TVideoChannel

It is mainly used to operate video, which is called video channel , In fact, the pictures in the product should also be displayed with this decoding .

Video source -TVideoSource

The source can be a video , Or a camera device 、 One MP4 Documents, etc. ;

player -TPlayView

Realize the playback of channel video objects , Realize decoding 、 Show 、 Control function , The object of the player is also an isolated image of the software and hardware decoder ;

Based on the above objects , about NVR Come on , We will implement a unified management class :TRecordManage, He manages the life cycle of the channel , Each channel aggregates and binds its own video source , And bind your own player .

The relationship is like the following :

 

Of course, many small object classes are used by the aggregation of these large objects , Such as cache management 、 Video file solution 、 Packet 、 The object of network flow 、 Display in different modes during preview , We need to implement a video display splitter management TPlayView Display, etc , Then slowly decompose and extract the real image !

原网站

版权声明
本文为[hi_ LeTian]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010623364963.html

随机推荐