IMFCaptureSink interface (mfcaptureengine.h)

Controls a capture sink, which is an object that receives one or more streams from a capture device.

Inheritance

The IMFCaptureSink interface inherits from the IUnknown interface. IMFCaptureSink also has these types of members:

Methods

The IMFCaptureSink interface has these methods.

 
IMFCaptureSink::AddStream

Connects a stream from the capture source to this capture sink.
IMFCaptureSink::GetOutputMediaType

Gets the output format for a stream on this capture sink.
IMFCaptureSink::GetService

Queries the underlying Sink Writer object for an interface.
IMFCaptureSink::Prepare

Prepares the capture sink by loading any required pipeline components, such as encoders, video processors, and media sinks.
IMFCaptureSink::RemoveAllStreams

Removes all streams from the capture sink.

Remarks

The capture engine creates the following capture sinks.

  • Photo sink. Encodes still image files.
  • Preview sink. Previews live audio or video.
  • Recording sink. Creates compressed audio/video files or compressed audio/video streams.
To get a pointer to a capture sink, call IMFCaptureEngine::GetSink. Each capture sink implements an interface that derives from IMFCaptureSink. Call QueryInterface to get a pointer to the derived interface.
Sink Interface
Photo sink IMFCapturePhotoSink
Preview sink IMFCapturePreviewSink
Recording sink IMFCaptureRecordSink
 

Applications cannot directly create the capture sinks.

If an image stream native media type is set to JPEG, the photo sink should be configured with a format identical to native source format. JPEG native type is passthrough only.

If an image stream native type is set to JPEG, to add an effect, change the native type on the image stream to an uncompressed video media type (such as NV12 or RGB32) and then add the effect.

If the native type is H.264 for the record stream, the record sink should be configured with the same media type. H.264 native type is passthrough only and cannot be decoded.

Record streams that expose H.264 do not expose any other type. H.264 record streams cannot be used in conjunction with effects. To add effects, instead connect the preview stream to the recordsink using AddStream.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header mfcaptureengine.h

See also

Media Foundation Interfaces