Junglae, Lee - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Junglae, Lee

Description:

DirectShow Overview Junglae, Lee Dept. Information and Communications Agenda What s DirectShow DirectX Architecture and Component DirectShow Architecture Filter ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 20
Provided by: J10272
Category:
Tags: junglae | lee

less

Transcript and Presenter's Notes

Title: Junglae, Lee


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

2
Agenda
  • Whats 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
MPEG Splitter filter
File or URL Source 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),fil
    ter 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.
Write a Comment
User Comments (0)
About PowerShow.com