示例#1
0
       /// <summary>
       /// 初始化视频编解码器
       /// </summary>
        /// <param name="bitmapInfo">图像头信息</param>
       /// <param name="isEncode">标识完成编码还是解码功能</param>
        public VideoEncoder(BITMAPINFO bitmapInfo, bool isEncode)
        {
            this.IsEncode = isEncode;
            if (isEncode)
            {
                COMPVARS compvars = new COMPVARS();
                compvars.cbSize = Marshal.SizeOf(compvars);
                compvars.dwFlags = 1;
                compvars.fccHandler = FOURCC.MP42;
                compvars.fccType = FOURCC.ICTYPE_VIDEO;
                compvars.lDataRate = 780;// 780;
                compvars.lKey = 15;// 15;
                compvars.lQ = 500;// -1;
                //compvars.lQ = 500;

                this.Compressor = new ICCompressor(compvars, bitmapInfo, FOURCC.MP42);
                this.Compressor.Open();//打开编码器
            }
            else
            {
                bitmapInfo.bmiHeader.biCompression = FOURCC.MP42;
                this.Decompressor = new ICDecompressor(new COMPVARS(), bitmapInfo, FOURCC.MP42);
                this.Decompressor.Open();
            }
        }
示例#2
0
 public ICBase(COMPVARS cp,BITMAPINFO biIn,ICMODE mode,int fourcc)
 {
     this.pp=cp;
     this._in=biIn;
     this.mode=mode;
     this.fourcc=fourcc;
     _out=new BITMAPINFO();
 }
示例#3
0
		static extern int SendMessage(	
			IntPtr hwnd, 
			int wMsg,
			int wParam,
			ref BITMAPINFO lParam
			);	
示例#4
0
 static extern int SendMessage(
     IntPtr hwnd,
     int wMsg,
     int wParam,
     ref BITMAPINFO lParam
     );
示例#5
0
        public static extern bool ICSeqCompressFrameStart(
			COMPVARS pc,        
			ref BITMAPINFO lpbiIn  
			);
示例#6
0
 //ICMODE_DECOMPRESS
 /// <summary>
 /// ��ʼ����Ƶ������
 /// </summary>
 /// <param name="cp">ѹ������</param>
 /// <param name="biIn">ͼ����Ϣ</param>
 /// <param name="fourcc">��������</param>
 public ICDecompressor(COMPVARS cp,BITMAPINFO biIn,int fourcc)
     : base(cp,biIn,ICMODE.ICMODE_DECOMPRESS,fourcc)
 {
 }
示例#7
0
        public static extern int ICCompressGetFormatSize(
			int hic,       
			ref BITMAPINFO lpbiInput  
			);
示例#8
0
 public static extern int ICSendMessage(int hic,int msg,ref BITMAPINFO dw1,ref BITMAPINFO dw2);
示例#9
0
文件: ICM.cs 项目: xingchaoet/ourmsg
 public static extern bool ICSeqCompressFrameStart(
     COMPVARS pc,
     ref BITMAPINFO lpbiIn
     );
示例#10
0
文件: ICM.cs 项目: xingchaoet/ourmsg
 public static extern int ICCompressGetFormatSize(
     int hic,
     ref BITMAPINFO lpbiInput
     );
示例#11
0
文件: ICM.cs 项目: xingchaoet/ourmsg
 /// <summary>
 /// ³õʼ»¯ÊÓƵ½âÂëÆ÷
 /// </summary>
 /// <param name="cp">ѹËõ¶ÔÏñ</param>
 /// <param name="biIn">ͼÏñÐÅÏ¢</param>
 /// <param name="fourcc">±àÂëÀàÐÍ</param>
 public ICDecompressor(COMPVARS cp, BITMAPINFO biIn, int fourcc) : base(cp, biIn, ICMODE.ICMODE_DECOMPRESS, fourcc) //ICMODE_DECOMPRESS
 {
 }
示例#12
0
文件: ICM.cs 项目: xingchaoet/ourmsg
 /// <summary>
 /// ³õʼ»¯ÊÓƵ±àÂëÆ÷
 /// </summary>
 /// <param name="cp">ѹËõ¶ÔÏñ</param>
 /// <param name="biIn">ͼÏñÐÅÏ¢</param>
 /// <param name="fourcc">±àÂëÀàÐÍ</param>
 public ICCompressor(COMPVARS cp, BITMAPINFO biIn, int fourcc) : base(cp, biIn, ICMODE.ICMODE_COMPRESS, fourcc)
 {
 }
示例#13
0
文件: ICM.cs 项目: xingchaoet/ourmsg
 public static extern int ICSendMessage(int hic, int msg, ref BITMAPINFO dw1, ref BITMAPINFO dw2);