Download presentation
Presentation is loading. Please wait.
Published byNeil Merritt Modified over 9 years ago
1
Microsoft DirectX 8.0 Project Introduction Microsoft COM DirectShow Instruction: Hsiao Kung Wu Students: 賴建利、林廷駿、楊惟仁
2
Project Introduction I Disk RTP ReceiverPlayer Split AVI Disk JRTP Multicast search Network COMBINE
3
Project Introduction II Disk RTP ReceiverPlayer Sender Disk JRTP Multicast search Network COMBINE Capture COMBINE
4
Project Introduction III MEM RTP ReceiverPlayer Sender MEM JRTP Multicast search Network COMBINE Capture COMBINE RTCP
5
Microsoft COM( Component Object Model) Single Program A B C A-B A-C B-C Small mini program
6
Microsoft COM( Component Object Model) COM is a spec, it defines methods of dynamic changing components and standards of cooperation between components and client programs. COM is not… A programming language DLLs 、 MFC Must be implemented by C++
7
Microsoft COM( Component Object Model) COM Components is an executing code in the form of WIN32 DLL or EXE, and it must satisfy COM spec.
8
DirectShow Filter The basic building block of DirectShow is a software component called a filter. DirectShow separates the processing of multimedia data into discrete steps, and a filter represents one (or sometimes more than one) processing step. All DirectShow filters fall into one of these three categories: source filters, transform filters, and renderer filters.
9
DirectShow Source Filter Source filters present the raw multimedia data for processing. Transform Filter Transform filters accept either raw or partially-processed data and process it further before passing it on. Render Filter Renderer filters generally accept fully-processed data and play it on the system's monitor or through the speakers or possibly through some external device.
10
DirectShow Filter Graph Whenever a media file or stream is played, recorded, captured, broadcast, or processed in any way, it is done by means of connecting one or more filters together in a configuration called a filter graph. PIN
11
DirectShow Initial COM Library Create Filter Graph Manager Configure Filter Graph Control Media Stream Handle Events
12
#include void main(void) { IGraphBuilder *pGraph; IMediaControl *pMediaControl; IMediaEvent *pEvent; CoInitialize(NULL); // Create the filter graph manager and query for interfaces. CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pGraph); pGraph->QueryInterface(IID_IMediaControl, (void **)&pMediaControl); pGraph->QueryInterface(IID_IMediaEvent, (void **)&pEvent); // Build the graph. IMPORTANT: Change string to a file on your system. pGraph->RenderFile(L"C:\\Hello_World.avi", NULL); // Run the graph. pMediaControl->Run(); // Wait for completion. long evCode; pEvent->WaitForCompletion(INFINITE, &evCode); // Clean up. pMediaControl->Release(); pEvent->Release(); pGraph->Release(); CoUninitialize(); } STEP 1 STEP 2 STEP 3
13
DirectShow Our Program
14
DirectShow In Our Project Video Capture Filter Video Compressor Filter File Writer Filter Video Render Filter AVI MUX Filter Optional Receiver Sender Network File Source Filter AVI Splitter Filter Audio Render Filter Video Render Filter
15
Problems Performance of Play Because I/O overhead when render files. Solution: Write a source filter for network stream. Delay of Real Time Compression, network transporting data and rendering multiple files cause the delay.
16
Summary Using DirectShow is easy. If we want to make it flexible, we must learn how to create filter. The real time problem must depend on RTP control.
17
Reference Inside COM--Microsoft Microsoft DirectX8.0 SDK Document Online MSDN
18
Appendix Sender 圖片
19
Appendix Receiver 圖片 PS. 畫面抓不下來
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.