Source Resolver Flags
Defines the behavior of the source resolver. These flags are also used by scheme handlers and byte stream handlers.
Constant/value | Description |
---|---|
|
Attempt to create a media source. |
|
Attempt to create a byte stream. |
|
If source resolution fails using the byte-stream handler that is registered for the MIME type or file name extension, the source resolver enumerates through all of the registered byte-stream handlers. Byte-stream handlers are registered by file name extension or MIME type. Initially, the source resolver attempts to use a handler that matches the file name extension or the MIME type. If that fails, then by default the entire source resolution fails and the source resolver returns an error code to the application. If this flag is specified, however, the source resolver continues to enumerates through all of the registered byte-stream handlers. Possibly a mis-matched handler can successfully create the media source. This flag cannot be combined with the MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL flag. See Remarks for more information. |
|
If the source resolution fails, the source resolver does not close the byte stream. By default, the source resolver closes the byte stream on failure. If this flag is used and the source resolution fails, the caller should call the method again and set the MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE flag. This flag cannot be combined with the MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE flag. See Remarks for more information. |
|
Requests read access to the source. |
|
Requests write access to the source. |
|
The source resolver will not use locally registered scheme or bytestream handler plugins. Requires Windows 8. |
The application sets these flags when it uses the IMFSourceResolver interface. The source resolver passes the same flags to the IMFByteStreamHandler::BeginCreateObject and IMFSchemeHandler::BeginCreateObject methods.
You must specify one of the MF_RESOLUTION_MEDIASOURCE or MF_RESOLUTION_BYTESTREAM flags. The remaining flags are all optional.
The MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL flag is defined for the following scenario:
The application attempts to open a source over the network. The application sets the MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL flag.
The source's URL contains the wrong file name extension. Because the file name extension is wrong, the default byte-stream handler cannot create the media source. Because the application set the MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL flag, the source resolver caches the byte stream.
The source resolver returns an error code to the application.
The client opens the source again, this time setting the MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE flag. This flag causes the source resolver to try all of the registered handlers instead of just the default handler. Because the byte stream was cached, the source resolver does not have to open the byte stream again.
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|