1 / 19

DirectShow Overview

DirectShow Overview. Junglae, Lee Dept. Information and Communications. Agenda. What’s DirectShow DirectX Architecture and Component DirectShow Architecture Filter Filter Graphs Filter Graph Manager. What is DirectShow. API for client-side

bijan
Download Presentation

DirectShow Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DirectShow Overview Junglae, Lee Dept. Information and Communications

  2. Agenda • What’s DirectShow • DirectX Architecture and Component • DirectShow Architecture • Filter • Filter Graphs • Filter Graph Manager

  3. What is DirectShow • API for client-side • playback, transformation, and capture of a wide variety of data formats. • successor to Microsoft Video for Window and Microsoft ActiveMovie. • to make easy new and custom data formats or create custom effects and transforms on standard formats. • MPEG1, MPEG2 parsing and multiplexing, MPEG4, AVI, WAV, RIFF, DVD • Microsoft DirectX Media SDK 8.0 • provide playback multimedia streams from local files or Internet servers, and capture of mm streams from devices

  4. What is DirectShow • Developers can use • DirectX • Component Object Model(COM) • Media control interface • Microsoft Visual C++ • used to create and control filter graphs, and create filters • Microsoft Visual Basic • used to create and control filter graphs • Dynamic-link-libraries(DDLs) • Compressor, Decompressors (codecs)

  5. DirectX 6.0 Hierarchy NetMeeting Component Layer VRML 2.0 Window Media Player DirectShow DirectShow DirectX Media Layer DirectAnimation Direct Transform DirectDraw Direct3D DirectX Foundation Layer DirectInput DirectSound DirectMusic Network Hardware DirectPlay DirectSound3D

  6. DirectShow Layer Application DirectShow Graphics Device Interface (GDI) DirectDraw HEL HAL Display Driver Interface (DDI) Display System(Hardware)

  7. Main Component • Filter • define how to control and process MM data. • input pins, output pins • Filter graph • connected to each other in a configuration • Filter graph manager • to assemble the filter graph and move data through it. • automatically handles data flow • a set of Component Object Model(COM) interfaces • can access DirectShow through • COM interface • Windows Media Player control • Media control interface(MCI)

  8. DirectShow Architecture Application ActiveMovie Control COM interface MCI Filter graph manager Source filter Transform filter Renderer filter Media source Media destination

  9. Filter and Pins • Filter • a COM object that performs a specific task • it exposes at least one pin • A source filter • which takes the data from some source • A transform filter • which takes the data, processes it, and them passed it • A rendering filter • which renders the data • effect filters, parser filters etc Source filter Transform filter Renderer filter Output pin Input pin Output pin Input pin

  10. Filters and Pins • Pin • a COM object created by the filter • represents a point of connection for a unidirectional data stream on the filter • The pin interface support • The transfer of time-stamped data using shared memory or other resource. • Negotiation of data formats at each pin-to-pin connection • Buffer management and buffer allocation negotiation designed to minimize data copying and maximize throughput Source filter Transform filter Renderer filter Output pin Input pin Output pin Input pin

  11. Filter Graph Manager • Filter graphs • is composed of a collection of filters • Filter graph manager • COM object • Filter graph상에서 filter와 데이터 스트림의 적절한 순서로 시작 , 정지 되게 application으로 하여금 filter graph 에 접근 가능한 COM interface 제공. • Playing back files over the internet • Real-time playback capability • File Source(URL) filter : internet server로 부터 읽어지는source filter.built-in filter로 제공.

  12. Example – MPEG-compressed video • A Source filter : to read the data of the disk. • An MPEG filter : to parse the stream and split the MPEG audio and video data streams • A transform filter : to decompress the audio and video data • A video renderer filter : to display the video data on the screen • An audio renderer filter : to send the audio to the sound card MPEG video Decompression Transform filter Video Renderer filter File or URL Source filter MPEG Splitter filter MPEG audio Decompression filter Audio Renderer filter

  13. Stream Control Architecture • Application이 Filter graph manager와 communication할 수 있음 • Filter Graph manager는 정확한 순서속에 methods 호출을 책임. • IMediaControl : media control interface stream을 run, pause, stop 하는 명령을 application에게 허용. • IMediaSeeking : 어떤 stream의 section이 play 되는지 특정화함. • 각 filter들은 IBaseFilter interface를 노출 :filter graph manager가 control commands의 run, pause, stop 표시 • Poisitioning information을 IMediaSeeking interface를 통해서 보냄. • Positioning은 실제적으로 필터상의 output pin에 의해 처리되어 특정한 position을 찾는 것을 허용

  14. Capture Introduction • Video and Audio Capture • 외부 소스(VCR or camera)로 부터 멀티미디어 데이터를 취해 보고 듣고 저장하는 것을 가능하게 함 • Capture hardware를 갖추어야 한다. • Audio capture : microphone, line-in jack을 구비한 sound card가 필요 • Video Capture : video card • Windows-style drivers를 위한 기존의 video를 사용가능. • Video and Audio Capture Filter Graphs • Video capture, audio capture, multiplexer(MUX),filter writer, video renderer filter를 포함해야 한다. • Subset이 필요하다면 더 간단하고 더 적은 filter를 포함할 것임.

  15. Video Capture • Video Preview Filter Graphs • VCR, camera 또는 다른 비디오 소스로 부터 play하는 것 처럼 컴퓨터 상에 display. • Video capture filter, video renderer. • Video Capture filter • 비디오 데이터를 제공. Preview라는 Pin을 노출. • 어떤 video renderer에 연결 되었는지 알려줌.

  16. Video Capture and Preview Filter Combined

  17. Adding Audio Capture • Audio capture filter : video capture filter와 유사. • Capture card 가 audio , video를 둘 다 지원시 하나의 capture filter만 가짐(반대의 경우는 audio, video각각의 capture filter가 필요) • Audio capture filter : multiplexer filter에 연결된 capture pin을 노출. • Multiplexer filter : audio, video 각각의 input pin이 존재.

  18. Capture Filter Input Pins • Capture filter 가 input pin을 노출한다. • 여러가지 성격의 데이터를 제어하기 위해. • Audio capture filter 는 IAMAudioInputMixer interface를 지원. • 각 input pin은 microphone, CD audio, MIDI 와 같은 input line으로 표현됨.

  19. Example Capture Filter Graph • Motion JPEG video capture filter 와 audio capture filter.

More Related