In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the Qt Haikang sdk decoding method". In the daily operation, I believe that many people have doubts about the Qt Haikang sdk decoding method. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "what is the Qt Haikang sdk decoding method?" Next, please follow the editor to study!
I. Preface
In the video surveillance industry, Haikang deserves to be the boss and has been in the first place for many years. Recently, we need to change the video surveillance system to adopt the kernel of Haikang sdk, so I specially consulted the user manual of sdk. Sdk-related documents and files can be downloaded directly to the official website, and are often updated. At present, it provides windows and linux, but the sdk on win is relatively fast and complete. But on linux, we have to complain, very old version, don't look at the package file is very new, in fact, the content is very old, I do not know why the authorities do not synchronously update the sdk on linux, maybe there is not a lot of demand on linux now, but with the vigorous promotion of localization, it is estimated that the linux will gradually improve in the near future, maybe the official has already had such a plan There is also a personal guess is that the development package on linux estimates that the official internal use of the new, may intend to do their own various clients on linux.
The official sdk manual is still very detailed, and it also gives the demo code of VC/JAVA/C# and other languages, which is definitely worth praising. A product continues to sell well, there must be his deep-seated reasons. In addition to the excellent quality of the product itself, the surrounding services must also keep up with it. Because I am used to using Qt to do development, I directly compiled VC's demo and ran in one step, and the interface is relatively simple and ugly, but most of the functions I want are still there, and maybe many buttons are not arranged neatly, anyway, what we need is the function, demonstrate how to use the corresponding method function, etc., as for the interface beautification, give it to the professional UI girl as far as possible If there is no UI girl, then make some qss stylesheets to make do with it. The beautification core of the interface is mainly two points: layout + color matching.
Officials have encapsulated the sdk of their commonly used large categories of devices together, a header file boss, HCNetSDK.h this header file alone is 47451 lines, my dear, probably for the convenience of users, all put in a header file, in fact, these sdk not only support cameras, NVR/CVR and other devices are also supported, compatibility is better than price, you can use the same sdk Officially, it is only unified for a large category, and there are still some differences in sdk between different categories of hardware products, such as face recognition, infrared temperature measurement, and so on, which are newly added hardware and functions, but the overall interface and use process are basically the same.
Decoding process:
Call NET_DVR_Init to initialize sdk, which only needs to be initialized once in a project.
Call NET_DVR_SetConnectTime and NET_DVR_SetReconnect to set the connection time and reconnection time.
Populate the NET_DVR_PREVIEWINFO structure data for login.
Call NET_DVR_Login_V30 to log in to the device.
Call NET_DVR_RealPlay_V40 to play the video.
Call NET_DVR_StopRealPlay to stop playback.
Call NET_DVR_Logout to log out the device.
II. Functional features
Support for playback of video streams and local MP4 files.
Both handle and callback modes are supported.
Multi-thread display image, do not card the main interface.
Automatically reconnect the webcam.
The border size can be set, that is, the offset and the border color.
You can set whether to draw OSD tags, that is, label text or pictures and label locations.
There are two OSD locations and styles that can be set.
You can set whether to save to a file and the file name.
You can drag the file directly to the haikangwidget control to play.
H364/h365 video streaming is supported.
Playback can be paused and resumed.
Support for storing individual video files and storing video files at regular intervals.
Customize the top suspension bar and send click signal notification, which can be set whether it is enabled or not.
Can set screen stretch fill or proportional fill.
Programmable decoding is speed priority, quality priority and balanced processing.
You can take screenshots (original pictures) and screenshots (video forms) of the video.
The video file is stored as a MP4 file.
Support focal length control, head control.
Customizable function.
Third, effect picture
4. Core code bool HaiKangThread::playRtsp () {bool ok = false; QString ip, userName, userPwd; int port, streamType; getInfo (ip, port, streamType, userName, userPwd); / / login device NET_DVR_DEVICEINFO_V30 deviceInfo; long userid = NET_DVR_Login_V30 (ip.toUtf8 (). Data (), port, userName.toUtf8 (). Data (), userPwd.toUtf8 (). Data (), & deviceInfo) If (userid > = 0) {qDebug ()
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.