Hai Kang wei video surveillance Equipment Web View System (iii) Web article

Source: Internet
Author: User
Tags bool

This is the last of three articles in this series, in the first two articles, introduced the development of Hai Kang Monitoring scheme and the implementation of the relay server, this article describes the web side of the function implementation, after the project development in this article, we have achieved the original project requirements. The official Player SDK is required for the project, please download the corresponding version according to the project needs. First, the author will take you step-by-step to achieve the development of client plug-ins.

Player development:

According to Haikang's official SDK, the player we're going to do is simply introduce the Haikang player into our own project, and then receive data from the staging server, which is then displayed to the customer's Web browser. In fact, the whole is an introduction of the sea-Kang Play Library ActiveX plug-in development. Following the development process step-by-step implementation of the player plug-in development.

New C # class library project

To introduce files from the Player SDK into your project

Add a WinForm user control to a project

New Setup Project

Publish Project

Digital signatures

Publish a Web site

About the C # Development of ActiveX detailed process, the garden has a lot of articles written in very detailed, I am not here, I am not very familiar with friends, I recommend here a more detailed article "asp.net C # ActiveX code in C # to write ActiveX control." This article writes the core function of the player plug-in.

First, look at the contents of the SDK's C # call:

public class Playctrlsdk {#region decoding library [DllImport ("PlayCtrl.dll")] public static Exte  
        RN UINT Playm4_getlasterror (int nport);  
        [DllImport ("PlayCtrl.dll")] public static extern int playm4_getcaps (); <summary>///Get unused channel number///</summary>///<param name= "Nport" ></pa  Ram>///<returns></returns> [DllImport ("PlayCtrl.dll")] public static extern  
        BOOL Playm4_getport (ref int nport); <summary>///Set streaming playback mode///</summary>///<param name= "Port" ></param >///<param name= "mode" ></param>///<returns></returns> [dllimp  
        ORT ("PlayCtrl.dll")] public static extern bool Playm4_setstreamopenmode (int nport, int mode); <summary>///Open stream///</summary>///<pAram Name= "Nport" ></param>///<param name= "pfileheadbuf" ></param>///<param Name= "nsize" ></param>///<param name= "nbufpoolsize" ></param>///<returns> </returns> [DllImport ("PlayCtrl.dll")] public static extern bool Playm4_openstream (int nport, by  
        Te[] Pfileheadbuf, UInt32 nsize, uint nbufpoolsize); <summary>///Sets the maximum buffer frame number of the play buffer///</summary>///<param name= "Nport" >&lt  
        ;/param>///<param name= "Nnum" ></param>///<returns></returns>  
        [DllImport ("PlayCtrl.dll")] public static extern bool Playm4_setdisplaybuf (int nport, uint nbufpoolsize); <summary>///Open play///</summary>///<param name= "Nport" ></pa ram>///<param name= "hWnd" ></param>///<returns></returns> [DllImport ("PlayCtrl.dll")] public static extern bool Playm4_play (int nport, I  
        Ntptr hWnd); <summary>///began to pour///</summary>///<param name= "Nport" &GT;&LT;/PARAM&G  
        T <returns></returns> [DllImport ("PlayCtrl.dll")] public static extern bool Playm4_rever  
        Seplay (int nport); <summary>///input stream data///</summary>///<param name= "Nport" ></param&  
        Gt <param name= "PBuf" ></param>///<param name= "nsize" ></param>///<retur ns></returns> [DllImport ("PlayCtrl.dll")] public static extern bool Playm4_inputdata (int Npor  
        T, byte[] pBuf, uint nsize); <summary>///Turn off playback///</summary>///<param name= "Nport" &GT;&LT;/PARAM&G  
        T <returns></returns> [DllImport ("PlayCtrl.dll")] public static extern bool Playm4_stop (int nport); <summary>///closed stream///</summary>///<param name= "Nport" ></ Param>///<returns></returns> [DllImport ("PlayCtrl.dll")] public static Exte  
        RN bool Playm4_closestream (int nport); <summary>///releases The used channel number///</summary>///<param name= "Nport" ></pa  Ram>///<returns></returns> [DllImport ("PlayCtrl.dll")] public static extern  
      
        BOOL Playm4_freeport (int nport); #endregion}

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.