// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. namespace SharpDX.MediaFoundation { public partial class SourceResolver { /// /// Initializes a new instance of the class which is used to create a media source from a /// URL or byte stream. /// /// ms697433 /// HRESULT MFCreateSourceResolver([Out] IMFSourceResolver** ppISourceResolver) /// MFCreateSourceResolver public SourceResolver() { MediaFactory.CreateSourceResolver(this); } /// ///

Applies to: desktop apps | Metro style apps

Creates a media source or a byte stream from a URL. This method is synchronous.

///
///

Null-terminated string that contains the URL to resolve.

///

Bitwise OR of one or more flags. See Source Resolver Flags.

/// A reference to the object's interface. The caller must release the interface. /// ///

The dwFlags parameter must contain either the flag or the flag, but should not contain both.

For local files, you can pass the file name in the pwszURL parameter; the file: scheme is not required.

Note??This method cannot be called remotely.

///
/// ms702279 /// HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject) /// IMFSourceResolver::CreateObjectFromURL public SharpDX.IUnknown CreateObjectFromURL(string url, SourceResolverFlags flags) { SharpDX.MediaFoundation.ObjectType objectType; return CreateObjectFromURL(url, flags, null, out objectType); } /// ///

Applies to: desktop apps | Metro style apps

Creates a media source or a byte stream from a URL. This method is synchronous.

///
///

Null-terminated string that contains the URL to resolve.

///

Bitwise OR of one or more flags. See Source Resolver Flags.

///

Receives a member of the enumeration, specifying the type of object that was created.

/// A reference to the object's interface. The caller must release the interface. /// ///

The dwFlags parameter must contain either the flag or the flag, but should not contain both.

For local files, you can pass the file name in the pwszURL parameter; the file: scheme is not required.

Note??This method cannot be called remotely.

///
/// ms702279 /// HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject) /// IMFSourceResolver::CreateObjectFromURL public SharpDX.IUnknown CreateObjectFromURL(string url, SourceResolverFlags flags, out SharpDX.MediaFoundation.ObjectType objectType ) { return CreateObjectFromURL(url, flags, null, out objectType); } /// ///

Applies to: desktop apps | Metro style apps

Creates a media source or a byte stream from a URL. This method is synchronous.

///
///

Null-terminated string that contains the URL to resolve.

///

Bitwise OR of one or more flags. See Source Resolver Flags.

///

Pointer to the interface of a property store. The method passes the property store to the scheme handler or byte-stream handler that creates the object. The handler can use the property store to configure the object. This parameter can be null. For more information, see Configuring a Media Source.

///

Receives a member of the enumeration, specifying the type of object that was created.

/// A reference to the object's interface. The caller must release the interface. /// ///

The dwFlags parameter must contain either the flag or the flag, but should not contain both.

For local files, you can pass the file name in the pwszURL parameter; the file: scheme is not required.

Note??This method cannot be called remotely.

///
/// ms702279 /// HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject) /// IMFSourceResolver::CreateObjectFromURL public SharpDX.IUnknown CreateObjectFromURL(string url, SourceResolverFlags flags, SharpDX.ComObject propertyStore, out SharpDX.MediaFoundation.ObjectType objectType ) { IUnknown result; CreateObjectFromURL(url, (int)(flags | SourceResolverFlags.MediaSource), propertyStore, out objectType, out result); return result; } /// ///

Applies to: desktop apps | Metro style apps

Creates a media source from a byte stream. This method is synchronous.

///
///

Pointer to the byte stream's interface.

///

Null-terminated string that contains the URL of the byte stream. The URL is optional and can be null. See Remarks for more information.

///

Bitwise OR of flags. See Source Resolver Flags.

/// a reference to the media source's interface. The caller must release the interface. /// ///

The dwFlags parameter must contain the flag and should not contain the flag.

The source resolver attempts to find one or more byte-stream handlers for the byte stream, based on the file name extension of the URL, or the MIME type of the byte stream (or both). The URL is specified in the optional pwszURL parameter, and the MIME type may be specified in the attribute on the byte stream. Byte-stream handlers are registered by file name extension or MIME type, or both, as described in Scheme Handlers and Byte-Stream Handlers. The caller should specify at least one of these values (both if possible):

Note??This method cannot be called remotely.

///
/// ms704671 /// HRESULT IMFSourceResolver::CreateObjectFromByteStream([In] IMFByteStream* pByteStream,[In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject) /// IMFSourceResolver::CreateObjectFromByteStream public SharpDX.IUnknown CreateObjectFromStream(ByteStream stream, string url, SourceResolverFlags flags) { ObjectType objectType; return CreateObjectFromStream(stream, url, flags, null, out objectType); } /// ///

Applies to: desktop apps | Metro style apps

Creates a media source from a byte stream. This method is synchronous.

///
///

Pointer to the byte stream's interface.

///

Null-terminated string that contains the URL of the byte stream. The URL is optional and can be null. See Remarks for more information.

///

Bitwise OR of flags. See Source Resolver Flags.

///

Receives a member of the enumeration, specifying the type of object that was created.

/// a reference to the media source's interface. The caller must release the interface. /// ///

The dwFlags parameter must contain the flag and should not contain the flag.

The source resolver attempts to find one or more byte-stream handlers for the byte stream, based on the file name extension of the URL, or the MIME type of the byte stream (or both). The URL is specified in the optional pwszURL parameter, and the MIME type may be specified in the attribute on the byte stream. Byte-stream handlers are registered by file name extension or MIME type, or both, as described in Scheme Handlers and Byte-Stream Handlers. The caller should specify at least one of these values (both if possible):

Note??This method cannot be called remotely.

///
/// ms704671 /// HRESULT IMFSourceResolver::CreateObjectFromByteStream([In] IMFByteStream* pByteStream,[In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject) /// IMFSourceResolver::CreateObjectFromByteStream public SharpDX.IUnknown CreateObjectFromStream(ByteStream stream, string url, SourceResolverFlags flags, out SharpDX.MediaFoundation.ObjectType objectType) { return CreateObjectFromStream(stream, url, flags, null, out objectType); } /// ///

Applies to: desktop apps | Metro style apps

Creates a media source from a byte stream. This method is synchronous.

///
///

Pointer to the byte stream's interface.

///

Null-terminated string that contains the URL of the byte stream. The URL is optional and can be null. See Remarks for more information.

///

Bitwise OR of flags. See Source Resolver Flags.

///

Pointer to the interface of a property store. The method passes the property store to the byte-stream handler. The byte-stream handler can use the property store to configure the media source. This parameter can be null. For more information, see Configuring a Media Source.

///

Receives a member of the enumeration, specifying the type of object that was created.

/// a reference to the media source's interface. The caller must release the interface. /// ///

The dwFlags parameter must contain the flag and should not contain the flag.

The source resolver attempts to find one or more byte-stream handlers for the byte stream, based on the file name extension of the URL, or the MIME type of the byte stream (or both). The URL is specified in the optional pwszURL parameter, and the MIME type may be specified in the attribute on the byte stream. Byte-stream handlers are registered by file name extension or MIME type, or both, as described in Scheme Handlers and Byte-Stream Handlers. The caller should specify at least one of these values (both if possible):

Note??This method cannot be called remotely.

///
/// ms704671 /// HRESULT IMFSourceResolver::CreateObjectFromByteStream([In] IMFByteStream* pByteStream,[In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject) /// IMFSourceResolver::CreateObjectFromByteStream public SharpDX.IUnknown CreateObjectFromStream(ByteStream stream, string url, SourceResolverFlags flags, ComObject propertyStore, out SharpDX.MediaFoundation.ObjectType objectType) { IUnknown result; CreateObjectFromByteStream(stream, url, (int)(flags | SourceResolverFlags.MediaSource), propertyStore, out objectType, out result); return result; } } }