O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing Microsoft® Media Foundation Applications

Book Description

Create powerful and professional media applications and components with Microsoft® Media Foundation—and deliver the next generation of high-definition multimedia. Led by an expert who has developed Microsoft media technologies over the past decade, you’ll learn how to build applications that can capture different types of video and audio files, process media information, and stream media over the Internet.

Table of Contents

  1. Developing Microsoft® Media Foundation Applications
  2. Dedication
  3. A Note Regarding Supplemental Files
  4. Introduction
    1. Who Should Read This Book
      1. Assumptions
    2. Who Should Not Read This Book
    3. Organization of This Book
      1. Finding Your Best Starting Point in This Book
    4. Conventions and Features in This Book
      1. Standard Coding Practices
    5. System Requirements
    6. Code Samples
      1. Installing the Code Samples
      2. Using the Code Samples
    7. Acknowledgments
    8. Errata & Book Support
    9. We Want to Hear from You
    10. Stay in Touch
  5. 1. Core Media Foundation Concepts
    1. Media Foundation Audio/Video Pipelines
    2. Media Foundation Components
      1. Data Flow Through a Media Foundation Pipeline
    3. Media Foundation Topologies
    4. Conclusion
  6. 2. TopoEdit
    1. Manual Topology Construction in TopoEdit
    2. Capturing Data from External Sources
    3. Conclusion
  7. 3. Media Playback
    1. Basic File Rendering with Media Sessions
      1. Creating the Player
      2. Initializing the Media Session
      3. Media Session Asynchronous Events
      4. Event Processing and Player Behavior
    2. Building the Media Pipeline
      1. Creating the Media Foundation Source
      2. Building the Partial Topology
      3. Resolving the Partial Topology
    3. Conclusion
      1. Class Listings
  8. 4. Transcoding
    1. The Transcode API
      1. Creating a Transcode Profile
        1. Configuring Target Audio Settings
        2. Configuring Target Video Settings
        3. Configuring the Target Container
        4. Determining the Target Transcode Format
      2. The Transcoding Session
    2. Transcoding with the Source Reader
      1. Creating a Source Reader and a Sink Writer
      2. Mapping Sink Writer Streams
      3. Intermediate Format Negotiation
      4. The Target Transcode Media Type
      5. The Source-Reader-to-Sink-Writer Loop
    3. Conclusion
      1. Class Listings
  9. 5. Media Foundation Transforms
    1. MFT Architecture Overview
    2. Writing a Simple MFT
      1. Stream Configuration Functions
      2. Media Type Selection Functions
      3. MFT Data Processing
      4. Status Query and Event Functions
      5. MFT Registration
    3. Injecting Images into Video Frames
      1. Uncompressed Video Formats
      2. RGB to YUV Image Conversion
      3. Frame Format Detection
      4. UYVY Image Injection
      5. NV12 Image Injection
    4. Conclusion
      1. Class Listings
  10. 6. Media Foundation Sources
    1. Overview
    2. The Asynchronous Call Pattern
    3. Instantiating a Media Source
      1. The AVF Byte Stream Handler
    4. Media Foundation Events
    5. The Media Foundation Source
      1. Initializing the Source
        1. Creating a Presentation Descriptor
        2. Creating Media Stream Objects
      2. Asynchronous Source Command Functions
      3. Starting Playback
      4. Source Media Event Functions
      5. Sample Streaming in AVFSource
    6. Media Stream Objects
    7. Windows Property Handlers
    8. Conclusion
      1. Class Listings
  11. 7. Media Foundation Sinks
    1. The Sample AVI File Sink
    2. The AVI Media Sink
      1. Media Stream Sink Control Functions
      2. Media Sink Clock Functions
      3. The Sink Data Loop
    3. The AVI Media Stream
      1. Stream Playback Control Functions
      2. Stream Sample Functions
      3. Stream Markers
    4. Conclusion
      1. Class Listings
  12. 8. Custom Media Sessions
    1. The Custom MP3 Media Session
    2. Building an MP3 Topology
      1. Negotiating Media Type
    3. The Custom Session Data Pipeline
      1. Synchronous and Asynchronous MFTs
      2. Synchronous Media Foundation Pipeline Events
      3. MP3 Session Data Flow
    4. The Session Clock
    5. Conclusion
      1. Class Listings
  13. 9. Advanced Media Foundation Topics
    1. Rendering a Player UI with the EVR Mixer
    2. Streaming a Network Player
      1. Building the Network Topology
      2. The HTTP Byte Stream Activator
      3. The HTTP Output Byte Stream
    3. Conclusion
      1. Class Listings
  14. A. Debugging Media Foundation Code
    1. Media Foundation Error Lookup
    2. The MFTrace Tool
      1. An MFTrace Example
        1. MP3 Source Instantiation Traces
  15. B. COM Concepts
    1. The IUnknown Interface
    2. COM Object Registration
  16. C. Active Template Library Objects
    1. ATL Smart Pointers
    2. CComCritSecLock and CComAutoCriticalSection Thread Synchronization Helpers
  17. Index
  18. About the Author
  19. Copyright