• 大小: 250KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-01
  • 语言: C#
  • 标签: WPF  录像机  

资源简介

WPF视频播放控件,可用于海康、大华等录像机的上位机开发。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;


namespace AVI
{
    public class AviCapture
    {
        #region Consts

        //消息常量(向窗口发送消息的指令)
        public const int WM_START = 0x400;    //此并非摄像头消息0x400表示的就是1024
        public const int WS_CHILD = 0x40000000;
        public const int WS_VISIBLE = 0x10000000;
        public const int SWP_NOMOVE = 0x2;
        public const int SWP_NOZORDER = 0x4;
        public const int WM_CAP_GET_CAPSTREAMPTR = WM_START + 1;
        public const int WM_CAP_SET_CALLBACK_ERROR = WM_START + 2;//设置收回错误
        public const int WM_CAP_SET_CALLBACK_STATUS = WM_START + 3;//设置收回状态
        public const int WM_CAP_SET_CALLBACK_YIELD = WM_START + 4;//设置收回出产
        public const int WM_CAP_SET_CALLBACK_frame = WM_START + 5;//设置收回结构
        public const int WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_START + 6;//设置收回视频流
        public const int WM_CAP_SET_CALLBACK_WAVESTREAM = WM_START + 7;//设置收回视频波流
        public const int WM_CAP_GET_USER_DATA = WM_START + 8;//获得使用者数据
        public const int WM_CAP_SET_USER_DATA = WM_START + 9;//设置使用者数据
        public const int WM_CAP_DRIVER_CONNECT = WM_START + 10;//驱动程序连接
        public const int WM_CAP_DRIVER_DISCONNECT = WM_START + 11;//断开启动程序连接
        public const int WM_CAP_DRIVER_GET_NAME = WM_START + 12;//获得驱动程序名字
        public const int WM_CAP_DRIVER_GET_VERSION = WM_START + 13;//获得驱动程序版本
        public const int WM_CAP_DRIVER_GET_CAPS = WM_START + 14;//获得驱动程序帽子
        public const int WM_CAP_FILE_SET_CAPTURE_FILE = WM_START + 20;//设置捕获文件
        public const int WM_CAP_FILE_GET_CAPTURE_FILE = WM_START + 21;//获得捕获文件
        public const int WM_CAP_FILE_ALLOCATE = WM_START + 22;//分派文件
        public const int WM_CAP_FILE_SAVEAS = WM_START + 23;//另存文件为
        public const int WM_CAP_FILE_SET_INFOCHUNK = WM_START + 24;//设置开始文件
        public const int WM_CAP_FILE_SAVEDIB = WM_START + 25;//保存文件
        public const int WM_CAP_EDIT_COPY = WM_START + 30;//编辑复制
        public const int WM_CAP_SET_AUDIOFORMAT = WM_START + 35;//设置音频格式
        public const int WM_CAP_GET_AUDIOFORMAT = WM_START + 36;//捕获音频格式
        public const int WM_CAP_DLG_VIDEOFORMAT = WM_START + 41;//1065 打开视频格式设置对话框
        public const int WM_CAP_DLG_VIDEOSOURCE = WM_START + 42;//1066 打开属性设置对话框,设置对比度亮度等
        public const int WM_CAP_DLG_VIDEODISPLAY = WM_START + 43;//1067 打开视频显示
        public const int WM_CAP_GET_VIDEOFORMAT = WM_START + 44;//1068 获得视频格式
        public const int WM_CAP_SET_VIDEOFORMAT = WM_START + 45;//1069 设置视频格式
        public const int WM_CAP_DLG_VIDEOCOMPRESSION = WM_START + 46;//1070 打开压缩设置对话框
        public const int WM_CAP_SET_PREVIEW = WM_START + 50;//设置预览
        public const int WM_CAP_SET_OVERLAY = WM_START + 51;//设置覆盖
        public const int WM_CAP_SET_PREVIEWRATE = WM_START + 52;//设置预览比例
        pub

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-08-26 15:55  VideoPlayerDemo\
     目录           0  2017-08-25 00:22  VideoPlayerDemo\.vs\
     目录           0  2017-08-25 00:22  VideoPlayerDemo\.vs\VideoPlayerDemo\
     目录           0  2017-08-25 00:22  VideoPlayerDemo\.vs\VideoPlayerDemo\v15\
     文件      129536  2017-08-27 15:28  VideoPlayerDemo\.vs\VideoPlayerDemo\v15\.suo
     目录           0  2017-08-26 16:23  VideoPlayerDemo\AviCapture\
     文件        2484  2017-08-26 16:23  VideoPlayerDemo\AviCapture\AviCap.csproj
     文件        8965  2017-08-26 16:23  VideoPlayerDemo\AviCapture\AviCapture.cs
     文件         429  2017-08-26 16:12  VideoPlayerDemo\AviCapture\BitmapInfo.cs
     文件         734  2017-08-26 16:10  VideoPlayerDemo\AviCapture\BitmapInfoHeader.cs
     文件        2002  2017-08-26 16:16  VideoPlayerDemo\AviCapture\CapDriverCaps.cs
     文件        2503  2017-08-26 16:09  VideoPlayerDemo\AviCapture\CapStatus.cs
     文件        3456  2017-08-26 16:14  VideoPlayerDemo\AviCapture\CaptureParams.cs
     目录           0  2017-08-26 15:55  VideoPlayerDemo\AviCapture\Properties\
     文件        1309  2017-08-26 15:55  VideoPlayerDemo\AviCapture\Properties\AssemblyInfo.cs
     文件        1126  2017-08-26 16:07  VideoPlayerDemo\AviCapture\VideoHeader.cs
     目录           0  2017-08-26 15:56  VideoPlayerDemo\AviCapture\bin\
     目录           0  2017-08-26 16:32  VideoPlayerDemo\AviCapture\bin\Debug\
     文件       10240  2017-08-26 16:32  VideoPlayerDemo\AviCapture\bin\Debug\AVI.dll
     文件       11776  2017-08-26 16:32  VideoPlayerDemo\AviCapture\bin\Debug\AVI.pdb
     目录           0  2017-08-27 15:34  VideoPlayerDemo\AviCapture\bin\Release\
     目录           0  2017-08-26 15:55  VideoPlayerDemo\AviCapture\obj\
     目录           0  2017-08-27 13:24  VideoPlayerDemo\AviCapture\obj\Debug\
     文件       10240  2017-08-26 16:32  VideoPlayerDemo\AviCapture\obj\Debug\AVI.dll
     文件       11776  2017-08-26 16:32  VideoPlayerDemo\AviCapture\obj\Debug\AVI.pdb
     文件         536  2017-08-26 16:32  VideoPlayerDemo\AviCapture\obj\Debug\AviCap.csproj.FileListAbsolute.txt
     文件        2073  2017-08-26 16:32  VideoPlayerDemo\AviCapture\obj\Debug\AviCap.csprojResolveAssemblyReference.cache
     文件          42  2017-08-26 16:21  VideoPlayerDemo\AviCapture\obj\Debug\CoreCompileInputs.cache
     文件         713  2017-08-27 13:24  VideoPlayerDemo\AviCapture\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6882  2017-08-26 16:21  VideoPlayerDemo\AviCapture\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     目录           0  2017-08-27 15:34  VideoPlayerDemo\AviCapture\obj\Debug\TempPE\
............此处省略146个文件信息

评论

共有 条评论