Ejemplo n.º 1
0
        //
        /// <summary>
        /// 获得对方视频图像头信息事件
        /// </summary>
        /// <param name="data"></param>
        private void OnGetBITMAPINFOHEADER(byte[] data)
        {
            BITMAPINFOHEADER bim = new BITMAPINFOHEADER();

            IMLibrary.Class.BitmapInfoHeader bit = new IMLibrary.Class.BitmapInfoHeader(data);
            bim.biBitCount = bit.biBitCount;
            bim.biClrImportant = bit.biClrImportant;
            bim.biClrUsed = bit.biClrUsed;
            bim.biCompression = bit.biCompression;
            bim.biHeight = bit.biHeight;
            bim.biPlanes = bit.biPlanes;
            bim.biSize = bit.biSize;
            bim.biSizeImage = bit.biSizeImage;
            bim.biWidth = bit.biWidth;
            bim.biXPelsPerMeter = bit.biXPelsPerMeter;
            bim.biYPelsPerMeter = bit.biYPelsPerMeter;

            if (this.GetBITMAPINFOHEADER != null)
                this.GetBITMAPINFOHEADER(this, new AVEventArgs(bim));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化
 /// </summary>
 /// <param name="BITMAPINFOHEADER"></param>
 public AVEventArgs(BITMAPINFOHEADER BITMAPINFOHEADER)
 {
     this.BITMAPINFOHEADER = BITMAPINFOHEADER;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 发送视频图像头信息到对方
        /// </summary>
        /// <param name="BITMAPINFOHEADER">视频图像头信息</param>
        public void SendBITMAPINFOHEADER(BITMAPINFOHEADER BITMAPINFOHEADER)
        {
            IMLibrary.Class.BitmapInfoHeader bitmapInfoHeader = new IMLibrary.Class.BitmapInfoHeader();
            bitmapInfoHeader.biBitCount = BITMAPINFOHEADER.biBitCount;
            bitmapInfoHeader.biClrImportant = BITMAPINFOHEADER.biClrImportant;
            bitmapInfoHeader.biClrUsed = BITMAPINFOHEADER.biClrUsed;
            bitmapInfoHeader.biCompression = BITMAPINFOHEADER.biCompression;
            bitmapInfoHeader.biHeight = BITMAPINFOHEADER.biHeight;
            bitmapInfoHeader.biPlanes = BITMAPINFOHEADER.biPlanes;
            bitmapInfoHeader.biSize = BITMAPINFOHEADER.biSize;
            bitmapInfoHeader.biSizeImage = BITMAPINFOHEADER.biSizeImage;
            bitmapInfoHeader.biWidth = BITMAPINFOHEADER.biWidth;
            bitmapInfoHeader.biXPelsPerMeter = BITMAPINFOHEADER.biXPelsPerMeter;
            bitmapInfoHeader.biYPelsPerMeter = BITMAPINFOHEADER.biYPelsPerMeter;

            IMLibrary.Class.msgAV msg = new IMLibrary.Class.msgAV();
            msg.InfoClass = (byte)IMLibrary.Class.ProtocolAVTransmit.GetBITMAPINFOHEADER;
            msg.DataBlock = bitmapInfoHeader.getBytes();
            this.sendData(msg);
        }