1 / 19

Microsoft DirectX 8.0

Microsoft DirectX 8.0. Project Introduction Microsoft COM DirectShow Instruction: Hsiao Kung Wu Students: 賴建利、林廷駿、楊惟仁. Split AVI. Disk. COMBINE. Project Introduction I. Multicast. Network. RTP. JRTP. RTP. Disk. Player. Receiver. search. COMBINE. Project Introduction II.

mahina
Télécharger la présentation

Microsoft DirectX 8.0

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. Microsoft DirectX 8.0 Project Introduction Microsoft COM DirectShow Instruction: Hsiao Kung Wu Students: 賴建利、林廷駿、楊惟仁

  2. Split AVI Disk COMBINE Project Introduction I Multicast Network RTP JRTP RTP Disk Player Receiver search

  3. COMBINE Project Introduction II Multicast Network Sender RTP Capture JRTP RTP Disk Disk Player Receiver search COMBINE

  4. COMBINE Project Introduction III Multicast Network Sender RTP RTCP Capture RTCP JRTP RTP MEM MEM Player Receiver search COMBINE

  5. Small mini program Small mini program A-B A-C B-C Small mini program Microsoft COM( Component Object Model) Single Program A B C

  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. PIN 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.

  11. DirectShow Initial COM Library Create Filter Graph Manager Control Media Stream Handle Events Configure Filter Graph

  12. STEP 1 STEP 2 STEP 3 #include <dshow.h> 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(); }

  13. Our Program DirectShow

  14. Optional Video Compressor Filter Video Capture Filter AVI MUX Filter Video Render Filter File Writer Filter Network Receiver Sender File Source Filter AVI Splitter Filter Audio Render Filter Video Render Filter DirectShow In Our Project

  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.畫面抓不下來

More Related