如何获取mci的驱动程序名以及它所支持的多媒体文件格式

zwh100 2000-01-03 04:22:00
...全文
134 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
tide 2000-01-03
  • 打赏
  • 举报
回复

following from msdn. maybe can give you some help .good luck.


sysinfo


The sysinfo command retrieves MCI system information. The sysinfo command is an MCI system command; it is interpreted directly by MCI.

wsprintf(lpstrCommand, "sysinfo %s %s %s", lpszDeviceID, lpszRequest,
lpszFlags);

Parameters
lpszDeviceID
Identifier of an MCI device or device type. If a device type is specified, it must be a standard MCI device-type name, as listed in the reference material for the capability command. You can specify "all" when the flag specified in lpszRequest allows that possibility.
lpszRequest
One of the following flags: installname Returns the name listed in the registry or the SYSTEM.INI file used to install the open device with the specified device identifier.
quantity Returns the number of MCI devices listed in the registry or the SYSTEM.INI file of the type specified in the lpszDeviceID parameter. This device identifier must be a standard MCI device-type name. Any digits after the device type are ignored. Specifying "all" for lpszDeviceID returns the total number of MCI devices in the system.
quantity open Returns the number of open MCI devices of the type specified in lpszDeviceID. This device identifier must be a standard MCI device-type name. Specifying "all" for lpszDeviceID returns the total number of open MCI devices in the system.
name index Returns the name of an MCI device. The device identifier must be a standard MCI device-type name. The index ranges from 1 to the number of devices of that type. If "all" is specified for lpszDeviceID, index ranges from 1 to the total number of devices in the system.
name index open Returns the name of an open MCI device. The device identifier must be a standard MCI device-type name. The index ranges from 1 to the number of open devices of that device type. If "all" is specified for lpszDeviceID, index ranges from 1 to the total number of open devices in the system.


lpszFlags
Can be "wait", "notify", or both. For digital-video and VCR devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.
Return Values
Returns zero if successful or an error otherwise.

Remarks
The following command returns the number of open waveform-audio devices:

sysinfo waveaudio quantity open

The following command returns the name (device alias) of the first open waveform-audio device:

sysinfo waveaudio name 1 open

JAVA基于局域网的聊天室系统(源代码+论文) 摘 要 视频聊天系统作为一种新型的通信和交流工具,突破了地域的限制,可以提供更为便捷、灵活、全面的音、视频信息的传递和服务,具有极其广泛的发展前景。 本文介绍了采用JAVA编程开发视频聊天系统的一套比较常用的解决方案。文字聊天采用TCP模式;语音视频聊天采用UDP模式,在客户端之间点对点的进行。在该方案中,通过函数库VFW来实现视频捕获、影像压缩以及影像播放。微软公司提供的专门用于视频捕获开发的工具包VFW,为在Windows操作系统中实现视频捕获提供了标准的接口,从而大大降低了程序的开发难度。在视频传输方面,则通过组建视频帧,将位图形式的视频帧压缩成帧格式的Mpeg4流,传输到客户端后,解压并显示影像。同时,在本方案中,采用了线程来实现语音录制和语音回放,最终实现了通过服务器中转的文字聊天、点对点的语音视频聊天。 关键词:文字聊天;VFW;视频捕获;视频传输;语音录制;语音回放 VFW是Microsoft 1992年推出的关于数字视频的一个软件包,它能使应用程序数字化并播放从传统模拟视频源得到的视频剪辑。VFW的一个关键思想是播放时不需要专用硬件,为了解决数字视频数据量大的问题,需要对数据进行压缩。它引进了一种叫AVI的文件标准,该标准未规定如何对视频进行捕获、压缩及播放,仅规定视频和音频该如何存储在硬盘上,以及在AVI文件中交替存储视频帧和与之相匹配的音频数据。VFW给程序员提供VBX和AVICap窗口类的高级编程工具,使程序员能通过发送消息或设置属性来捕获、播放和编辑视频剪辑。用户不必专门安装VFW,在安装Windows时,安装程序会自动地安装配置视频所需的组件,如设备驱动程序、视频压缩程序等。 VFW主要由以下六个模块组成: (1) AVICAP.DLL:包含了执行视频捕获的函数,它给AVI文件、I/O和视频音频设备驱动程序提供一个高级接口; (2) MSVIDEO.DLL:用一套特殊的DrawDib函数来处理屏幕上的视频操作; (3) MCIAVI.DRV:此驱动程序包括对VFW的MCI命令的解释器; (4) AVIFILE.DLL:支持由标准多媒体I/O(mmio)函数提供的更高的命令来访问AVI文件; (5) 压缩管理器(ICM):管理用于视频压缩/解压缩的编解码器(CODEC); (6) 音频压缩管理器ACM:提供与ICM相似的服务,不同的是它适于波形音频。 Visual C++在支持VFW方面提供有vfw32.lib、msacm32.lib、winmm.lib等库。特别是它提供了功能强大、简单易行、类似于MCIWnd的窗口类AVICap。AVICap为应用程序提供了一个简单的、基于消息的接口,使之能访问视频和波形音频硬件,并能在将视频流捕获到硬盘上的过程中进行控制。 AVICap支持实时的视频流捕获和单帧捕获,并提供对视频源的控制。虽然MCI也提供数字视频服务,比如,它为显示AVI文件的视频提供了AVIVideo命令集,为视频叠加提供了overlay命令集,但这些命令主要是基于文件的操作,不能满足实时地直接从视频缓存中获取数据的要求。对于使用没有视频叠加能力的捕获卡的PC机来说,用MCI提供的命令集是无法捕获视频流的。而AVICap在捕获视频方面具有一定的优势,它能直接访问视频缓冲区,不需要生成中间文件,实时性很强,效率很高。同时,它也可将数字视频捕获到文件。 在视频捕获之前需要创建一个捕获窗,所有的捕获操作及其设置都以它为基础。用AVICap窗口类创建的窗口(通过capCreateCaptureWindow函数创建)被称为“捕获窗”,其窗口风格一般为WS_CHILD和WS_VISIBLE。实际上,捕获窗类似于标准控制(如按钮、列表框等)。捕获窗具有下列功能: (1) 将视频流和音频流捕获到一个AVI文件中; (2) 动态地同视频和音频输入器件连接或断开; (3) 以Overlay或Preview模式对输入的视频流进行实时显示; (4) 在捕获时可指定所用的文件并能将捕获文件的内容拷贝到另一个文件; (5) 设置捕获速率; (6) 显示控制视频源、视频格式、视频压缩的对话框; (7) 创建、保存或载入调色板; (8) 将图像和相关的调色板拷贝到剪贴板; (9) 将捕获的一个单帧图像保存为DIB格式的文件。 AVICap在显示视频时提供的两种模式: (A)预览(Preview)模式:该模式使用CPU资源,视频帧先从捕获硬件传到系统内存,接着采用GDI函数在捕获窗中显示。在物理上,这种模式需要通过VGA卡在监视器上显示。 (B)叠加(Overlay)模式:该模式使用硬件叠加进行视频显示,叠加视频的显示不经过VGA卡,叠加视频的硬件将VGA的输出信号与其自

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧