Skip to content

Latest commit

 

History

History
64 lines (35 loc) · 2.81 KB

mf-source-reader-disconnect-mediasource-on-shutdown.md

File metadata and controls

64 lines (35 loc) · 2.81 KB
description ms.assetid title ms.topic ms.date
Specifies whether the Source Reader shuts down the media source.
c85f5994-8005-48c9-8a05-0316f48f4142
MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN attribute (Mfreadwrite.h)
reference
05/31/2018

MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN attribute

Specifies whether the Source Reader shuts down the media source.

Data type

UINT32

Get/set

To get this attribute, call IMFAttributes::GetUINT32.

To set this attribute, call IMFAttributes::SetUINT32.

Remarks

This attribute applies only when the application creates the source reader from an existing media source object, either by calling MFCreateSourceReaderFromMediaSource or by calling IMFReadWriteClassFactory::CreateInstanceFromObject.

By default, when the application releases the source reader, the source reader shuts down the media source by calling IMFMediaSource::Shutdown on the media source. At that point, the application can no longer use the media source.

However, if the MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN attribute is TRUE, the source reader does not shut down the media source. That means the application can still use the media source after the application releases the source reader. It also means the application is responsible for calling IMFMediaSource::Shutdown on the media source.

If the application creates the source reader from a URL or from a byte stream, the source reader always shuts down the media source. The MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN attribute is ignored in this case.

Requirements

Requirement Value
Minimum supported client
Windows 7 [desktop apps | UWP apps]
Minimum supported server
Windows Server 2008 R2 [desktop apps | UWP apps]
Header
Mfreadwrite.h

See also

Alphabetical List of Media Foundation Attributes

Source Reader

Source Reader Attributes