Presentation is loading. Please wait.

Presentation is loading. Please wait.

Junglae, Lee Dept. Information and Communications DirectShow Overview.

Similar presentations


Presentation on theme: "Junglae, Lee Dept. Information and Communications DirectShow Overview."— Presentation transcript:

1 Junglae, Lee Dept. Information and Communications DirectShow Overview

2 Dept. Information and Communications Agenda What’s DirectShow What’s DirectShow DirectX Architecture and Component DirectX Architecture and Component DirectShow Architecture DirectShow Architecture Filter Filter Filter Graphs Filter Graphs Filter Graph Manager Filter Graph Manager

3 Dept. Information and Communications What is DirectShow API for client-side API for client-side playback, transformation, and capture of a wide variety of data formats.playback, transformation, and capture of a wide variety of data formats. successor to Microsoft Video for Window and Microsoft ActiveMovie.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.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, DVDMPEG1, MPEG2 parsing and multiplexing, MPEG4, AVI, WAV, RIFF, DVD Microsoft DirectX Media SDK 8.0 Microsoft DirectX Media SDK 8.0 provide playback multimedia streams from local files or Internet servers, and capture of mm streams from devicesprovide playback multimedia streams from local files or Internet servers, and capture of mm streams from devices

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

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

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

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

8 Dept. Information and Communications DirectShow Architecture Application ActiveMovie Control COM interface MCI Source filter Transform filter Renderer filter Filter graph manager Media sourceMedia destination

9 Dept. Information and Communications Filter and Pins Filter Filter a COM object that performs a specific taska COM object that performs a specific task it exposes at least one pinit exposes at least one pin A source filterA source filter –which takes the data from some source A transform filterA transform filter –which takes the data, processes it, and them passed it A rendering filterA rendering filter –which renders the data effect filters, parser filters etceffect filters, parser filters etc Source filter Output pinInput pin Transform filter Output pinInput pin Renderer filter

10 Dept. Information and Communications Filters and Pins Pin Pin a COM object created by the filtera COM object created by the filter represents a point of connection for a unidirectional data stream on the filterrepresents a point of connection for a unidirectional data stream on the filter The pin interface supportThe 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 Output pinInput pin Transform filter Output pinInput pin Renderer filter

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

12 Dept. Information and Communications Example – MPEG-compressed video A Source filter : to read the data of the disk. 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 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 transform filter : to decompress the audio and video data A video renderer filter : to display the video data on the screen A video renderer filter : to display the video data on the screen An audio renderer filter : to send the audio to the sound card An audio renderer filter : to send the audio to the sound card MPEG video Decompression Transform filter MPEG audio Decompression filter Video Renderer filter Audio Renderer filter MPEG Splitter filter File or URL Source filter

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

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

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

16 Dept. Information and Communications Video Capture and Preview Filter Combined

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

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

19 Dept. Information and Communications Example Capture Filter Graph –Motion JPEG video capture filter 와 audio capture filter.


Download ppt "Junglae, Lee Dept. Information and Communications DirectShow Overview."

Similar presentations


Ads by Google