C # Prepare for developing DirectShow technology

Source: Internet
Author: User

The DirectShow component is in the Quartz. in the dll dynamic library, to make C # code reference COM objects and interfaces, you must convert the COM-type library.. NET Framework metadata to effectively create a managed packaging that can be called from any hosting language. During the conversion process, you must use the TlbImp command tool that comes with the FrameWork SDK. The command tool is under the "D: Program FilesMicrosoft Visual Studio 8SDKv2.0BinTlbImp.exe" Directory (depending on the installation path of Visual Studio 2005 ). The command is used as follows:

TlbImp C: WINDOWSsystem32quartz. dll out: C: WINDOWSsystem32quartzDriectShow. dll: the conversion is successful under the doscommand. After the conversion, you must reference quartzDriectShow in the application and reference quartzDriectShow. the dll component procedure is as follows: (1) in the Visual Studio 2005 development environment, select the "project"/"add reference" command to bring up the "add reference" dialog box. (2) Select the zdriectshow. dll tab and click quartzDriectShow. dll to reference quartzDriectShow. dll. (3) Introduce using quartzDriectShow to develop related multimedia programs. Developers can also compile their own filters to expand DirectShow multimedia support. The following is the DirectShow Component Interface. IFilterGraph: Filter channel interface. IFilterGraph2: enhanced IfilterGraph. IGraphBuilder: The most reusable COM interface, which is used to manually or automatically construct the Filter Graph Manager channel. IMediaControl: used to control the playing control interface of streaming media (such as stream Start and Stop pause. IMediaEvent: playback event interface. This interface is used to create event flag information when a FilterGraph event occurs and send it to the application. IMediaEventEx: extends the playback event window. IMediaPosition: the playback position and speed control interface (you can only set the time control mode to control playback placement ). IMediaSeeking: Another playback position and playback speed control interface. It has strong functions in Position Selection and sets the playback format. Commonly used control Playback modes include: TIME_FORMAT_MEDIA_TIME, in the unit of 100 nanoseconds; TIME_FORMAT_FRAME, and frame-based playback. IBasicAudio: sound control interface. IBasic Video: Image Control Interface (baud rate, width, length, and other information ). IVideoWindow: display window control interface (all control over the playback window, including caption display and window position control ). ISampleGrabber: Image Capture interface (for image capture control ). IVideoFrameStep: the interface for controlling single-frame playback. Note: There are three steps to program using the DirectShow interface: Initialize the interface → use the control function in the interface to use the control operation → finally release the interface.

Related Article

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.