Пример #1
0
 /// <summary>	
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source or a byte stream from a URL. This method is synchronous. </p>	
 /// </summary>	
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL to resolve. </p> </dd></param>	
 /// <param name="flags"><dd> <p> Bitwise OR of one or more flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>	
 /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>	
 /// <returns>A reference to the object's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>	
 /// <remarks>	
 /// <p>The <em>dwFlags</em> parameter must contain either the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag or the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag, but should not contain both.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><p><strong>Note</strong>??This method cannot be called remotely.</p>	
 /// </remarks>	
 /// <msdn-id>ms702279</msdn-id>	
 /// <unmanaged>HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject)</unmanaged>	
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromURL</unmanaged-short>	
 public SharpDX.ComObject CreateObjectFromURL(string url,
     SourceResolverFlags flags,
     out SharpDX.MediaFoundation.ObjectType objectType
     )
 {
     return CreateObjectFromURL(url, flags, null, out objectType);
 }
Пример #2
0
 /// <summary>
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source or a byte stream from a URL. This method is synchronous. </p>
 /// </summary>
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL to resolve. </p> </dd></param>
 /// <param name="flags"><dd> <p> Bitwise OR of one or more flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>
 /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>
 /// <returns>A reference to the object's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>
 /// <remarks>
 /// <p>The <em>dwFlags</em> parameter must contain either the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag or the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag, but should not contain both.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><p><strong>Note</strong>??This method cannot be called remotely.</p>
 /// </remarks>
 /// <msdn-id>ms702279</msdn-id>
 /// <unmanaged>HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject)</unmanaged>
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromURL</unmanaged-short>
 public SharpDX.ComObject CreateObjectFromURL(string url,
                                              SourceResolverFlags flags,
                                              out SharpDX.MediaFoundation.ObjectType objectType
                                              )
 {
     return(CreateObjectFromURL(url, flags, null, out objectType));
 }
Пример #3
0
 /// <summary>
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source from a byte stream. This method is synchronous. </p>
 /// </summary>
 /// <param name="stream"><dd> <p> Pointer to the byte stream's <strong><see cref="SharpDX.MediaFoundation.IByteStream"/></strong> interface. </p> </dd></param>
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL of the byte stream. The URL is optional and can be <strong><c>null</c></strong>. See Remarks for more information. </p> </dd></param>
 /// <param name="flags"><dd> <p> Bitwise <strong>OR</strong> of flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>
 /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>
 /// <returns>a reference to the media source's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>
 /// <remarks>
 /// <p>The <em>dwFlags</em> parameter must contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag and should not contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag.</p><p>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 <em>pwszURL</em> parameter, and the MIME type may be specified in the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> 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):</p><ul> <li> Specify the URL in the <em>pwszURL</em> parameter. </li> <li> Specify the MIME type by setting the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> attribute on the byte stream. (This attribute might be set already when you create the byte stream, depending on how the byte stream was created.) </li> </ul><p><strong>Note</strong>??This method cannot be called remotely.</p>
 /// </remarks>
 /// <msdn-id>ms704671</msdn-id>
 /// <unmanaged>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)</unmanaged>
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromByteStream</unmanaged-short>
 public SharpDX.IUnknown CreateObjectFromStream(ByteStream stream,
                                                string url,
                                                SourceResolverFlags flags,
                                                out SharpDX.MediaFoundation.ObjectType objectType)
 {
     return(CreateObjectFromStream(stream, url, flags, null, out objectType));
 }
 public IUnknown CreateObjectFromStream(
     ByteStream stream,
     string url,
     SourceResolverFlags flags,
     out ObjectType objectType)
 {
     return(CreateObjectFromStream(stream, url, flags, null, out objectType));
 }
Пример #5
0
        /// <summary>
        /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source from a byte stream. This method is synchronous. </p>
        /// </summary>
        /// <param name="stream"><dd> <p> Pointer to the byte stream's <strong><see cref="SharpDX.MediaFoundation.IByteStream"/></strong> interface. </p> </dd></param>
        /// <param name="url"><dd> <p> Null-terminated string that contains the URL of the byte stream. The URL is optional and can be <strong><c>null</c></strong>. See Remarks for more information. </p> </dd></param>
        /// <param name="flags"><dd> <p> Bitwise <strong>OR</strong> of flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>
        /// <returns>a reference to the media source's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>
        /// <remarks>
        /// <p>The <em>dwFlags</em> parameter must contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag and should not contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag.</p><p>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 <em>pwszURL</em> parameter, and the MIME type may be specified in the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> 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):</p><ul> <li> Specify the URL in the <em>pwszURL</em> parameter. </li> <li> Specify the MIME type by setting the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> attribute on the byte stream. (This attribute might be set already when you create the byte stream, depending on how the byte stream was created.) </li> </ul><p><strong>Note</strong>??This method cannot be called remotely.</p>
        /// </remarks>
        /// <msdn-id>ms704671</msdn-id>
        /// <unmanaged>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)</unmanaged>
        /// <unmanaged-short>IMFSourceResolver::CreateObjectFromByteStream</unmanaged-short>
        public SharpDX.ComObject CreateObjectFromStream(ByteStream stream,
                                                        string url,
                                                        SourceResolverFlags flags)
        {
            ObjectType objectType;

            return(CreateObjectFromStream(stream, url, flags, null, out objectType));
        }
 public IUnknown CreateObjectFromUrl(
     string url,
     SourceResolverFlags flags,
     ComObject?propertyStore,
     out ObjectType objectType)
 {
     CreateObjectFromURL(url, (int)flags, propertyStore, out objectType, out IUnknown result);
     return(result);
 }
    public IMFMediaSource CreateObjectFromURL(string url, SourceResolverFlags flags = SourceResolverFlags.None, IPropertyStore?propertyStore = null)
    {
        CreateObjectFromURL(url, (int)(flags | SourceResolverFlags.MediaSource), propertyStore, out ObjectType objectType, out IntPtr nativePtr).CheckError();
        if (objectType != ObjectType.MediaSource)
        {
            throw new InvalidOperationException("Object type is not MediaSource");
        }

        return(new IMFMediaSource(nativePtr));
    }
    public MFByteStream CreateObjectFromURLAsByteStream(string url, SourceResolverFlags flags = SourceResolverFlags.None, IPropertyStore?propertyStore = null)
    {
        CreateObjectFromURL(url, (int)(flags | SourceResolverFlags.ByteStream), propertyStore, out ObjectType objectType, out IntPtr nativePtr).CheckError();
        if (objectType != ObjectType.ByteStream)
        {
            throw new InvalidOperationException("Object type is not ByteStream");
        }

        return(new MFByteStream(nativePtr));
    }
Пример #9
0
        /// <summary>
        /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source or a byte stream from a URL. This method is synchronous. </p>
        /// </summary>
        /// <param name="url"><dd> <p> Null-terminated string that contains the URL to resolve. </p> </dd></param>
        /// <param name="flags"><dd> <p> Bitwise OR of one or more flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>
        /// <param name="propertyStore"><dd> <p> Pointer to the <strong><see cref="SharpDX.ComObject"/></strong> 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 <strong><c>null</c></strong>. For more information, see Configuring a Media Source. </p> </dd></param>
        /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>
        /// <returns>A reference to the object's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>
        /// <remarks>
        /// <p>The <em>dwFlags</em> parameter must contain either the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag or the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag, but should not contain both.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><p><strong>Note</strong>??This method cannot be called remotely.</p>
        /// </remarks>
        /// <msdn-id>ms702279</msdn-id>
        /// <unmanaged>HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject)</unmanaged>
        /// <unmanaged-short>IMFSourceResolver::CreateObjectFromURL</unmanaged-short>
        public SharpDX.ComObject CreateObjectFromURL(string url,
                                                     SourceResolverFlags flags,
                                                     SharpDX.ComObject propertyStore,
                                                     out SharpDX.MediaFoundation.ObjectType objectType
                                                     )
        {
            ComObject result;

            CreateObjectFromURL(url, (int)(flags | SourceResolverFlags.MediaSource), propertyStore, out objectType, out result);
            return(result);
        }
Пример #10
0
        /// <summary>
        /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source from a byte stream. This method is synchronous. </p>
        /// </summary>
        /// <param name="stream"><dd> <p> Pointer to the byte stream's <strong><see cref="SharpDX.MediaFoundation.IByteStream"/></strong> interface. </p> </dd></param>
        /// <param name="url"><dd> <p> Null-terminated string that contains the URL of the byte stream. The URL is optional and can be <strong><c>null</c></strong>. See Remarks for more information. </p> </dd></param>
        /// <param name="flags"><dd> <p> Bitwise <strong>OR</strong> of flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>
        /// <param name="propertyStore"><dd> <p> Pointer to the <strong><see cref="SharpDX.ComObject"/></strong> 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 <strong><c>null</c></strong>. For more information, see Configuring a Media Source. </p> </dd></param>
        /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>
        /// <returns>a reference to the media source's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>
        /// <remarks>
        /// <p>The <em>dwFlags</em> parameter must contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag and should not contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag.</p><p>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 <em>pwszURL</em> parameter, and the MIME type may be specified in the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> 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):</p><ul> <li> Specify the URL in the <em>pwszURL</em> parameter. </li> <li> Specify the MIME type by setting the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> attribute on the byte stream. (This attribute might be set already when you create the byte stream, depending on how the byte stream was created.) </li> </ul><p><strong>Note</strong>??This method cannot be called remotely.</p>
        /// </remarks>
        /// <msdn-id>ms704671</msdn-id>
        /// <unmanaged>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)</unmanaged>
        /// <unmanaged-short>IMFSourceResolver::CreateObjectFromByteStream</unmanaged-short>
        public SharpDX.ComObject CreateObjectFromStream(ByteStream stream,
                                                        string url,
                                                        SourceResolverFlags flags,
                                                        ComObject propertyStore,
                                                        out SharpDX.MediaFoundation.ObjectType objectType)
        {
            ComObject result;

            CreateObjectFromByteStream_(stream.NativePointer,
                                        url,
                                        (int)(flags | SourceResolverFlags.MediaSource),
                                        propertyStore,
                                        out objectType,
                                        out result);
            return(result);
        }
 public IUnknown CreateObjectFromUrl(string url, SourceResolverFlags flags, out ObjectType objectType)
 {
     return(CreateObjectFromUrl(url, flags, null, out objectType));
 }
Пример #12
0
 /// <summary>	
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source or a byte stream from a URL. This method is synchronous. </p>	
 /// </summary>	
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL to resolve. </p> </dd></param>	
 /// <param name="flags"><dd> <p> Bitwise OR of one or more flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>	
 /// <param name="propertyStore"><dd> <p> Pointer to the <strong><see cref="SharpDX.ComObject"/></strong> 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 <strong><c>null</c></strong>. For more information, see Configuring a Media Source. </p> </dd></param>	
 /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>	
 /// <returns>A reference to the object's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>	
 /// <remarks>	
 /// <p>The <em>dwFlags</em> parameter must contain either the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag or the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag, but should not contain both.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><p><strong>Note</strong>??This method cannot be called remotely.</p>	
 /// </remarks>	
 /// <msdn-id>ms702279</msdn-id>	
 /// <unmanaged>HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject)</unmanaged>	
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromURL</unmanaged-short>	
 public SharpDX.ComObject CreateObjectFromURL(string url,
     SourceResolverFlags flags,
     SharpDX.ComObject propertyStore,
     out SharpDX.MediaFoundation.ObjectType objectType
     )
 {
     ComObject result;
     CreateObjectFromURL(url, (int)(flags | SourceResolverFlags.MediaSource), propertyStore, out objectType, out result);
     return result;
 }
Пример #13
0
 /// <summary>	
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source from a byte stream. This method is synchronous. </p>	
 /// </summary>	
 /// <param name="stream"><dd> <p> Pointer to the byte stream's <strong><see cref="SharpDX.MediaFoundation.IByteStream"/></strong> interface. </p> </dd></param>	
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL of the byte stream. The URL is optional and can be <strong><c>null</c></strong>. See Remarks for more information. </p> </dd></param>	
 /// <param name="flags"><dd> <p> Bitwise <strong>OR</strong> of flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>	
 /// <param name="propertyStore"><dd> <p> Pointer to the <strong><see cref="SharpDX.ComObject"/></strong> 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 <strong><c>null</c></strong>. For more information, see Configuring a Media Source. </p> </dd></param>	
 /// <param name="objectType"><dd> <p> Receives a member of the <strong><see cref="SharpDX.MediaFoundation.ObjectType"/></strong> enumeration, specifying the type of object that was created. </p> </dd></param>	
 /// <returns>a reference to the media source's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>	
 /// <remarks>	
 /// <p>The <em>dwFlags</em> parameter must contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag and should not contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag.</p><p>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 <em>pwszURL</em> parameter, and the MIME type may be specified in the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> 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):</p><ul> <li> Specify the URL in the <em>pwszURL</em> parameter. </li> <li> Specify the MIME type by setting the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> attribute on the byte stream. (This attribute might be set already when you create the byte stream, depending on how the byte stream was created.) </li> </ul><p><strong>Note</strong>??This method cannot be called remotely.</p>	
 /// </remarks>	
 /// <msdn-id>ms704671</msdn-id>	
 /// <unmanaged>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)</unmanaged>	
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromByteStream</unmanaged-short>	
 public SharpDX.ComObject CreateObjectFromStream(ByteStream stream,
     string url,
     SourceResolverFlags flags,
     ComObject propertyStore,
     out SharpDX.MediaFoundation.ObjectType objectType)
 {
     ComObject result;
     CreateObjectFromByteStream_(stream.NativePointer,
         url,
         (int)(flags | SourceResolverFlags.MediaSource),
         propertyStore,
         out objectType,
         out result);
     return result;
 }
Пример #14
0
 /// <summary>	
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source from a byte stream. This method is synchronous. </p>	
 /// </summary>	
 /// <param name="stream"><dd> <p> Pointer to the byte stream's <strong><see cref="SharpDX.MediaFoundation.IByteStream"/></strong> interface. </p> </dd></param>	
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL of the byte stream. The URL is optional and can be <strong><c>null</c></strong>. See Remarks for more information. </p> </dd></param>	
 /// <param name="flags"><dd> <p> Bitwise <strong>OR</strong> of flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>	
 /// <returns>a reference to the media source's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>	
 /// <remarks>	
 /// <p>The <em>dwFlags</em> parameter must contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag and should not contain the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag.</p><p>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 <em>pwszURL</em> parameter, and the MIME type may be specified in the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> 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):</p><ul> <li> Specify the URL in the <em>pwszURL</em> parameter. </li> <li> Specify the MIME type by setting the <strong><see cref="SharpDX.MediaFoundation.ByteStreamAttributeKeys.ContentType"/></strong> attribute on the byte stream. (This attribute might be set already when you create the byte stream, depending on how the byte stream was created.) </li> </ul><p><strong>Note</strong>??This method cannot be called remotely.</p>	
 /// </remarks>	
 /// <msdn-id>ms704671</msdn-id>	
 /// <unmanaged>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)</unmanaged>	
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromByteStream</unmanaged-short>	
 public SharpDX.ComObject CreateObjectFromStream(ByteStream stream,
     string url,
     SourceResolverFlags flags)
 {
     ObjectType objectType;
     return CreateObjectFromStream(stream, url, flags, null, out objectType);
 }
Пример #15
0
 /// <summary>
 /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> Creates a media source or a byte stream from a URL. This method is synchronous. </p>
 /// </summary>
 /// <param name="url"><dd> <p> Null-terminated string that contains the URL to resolve. </p> </dd></param>
 /// <param name="flags"><dd> <p> Bitwise OR of one or more flags. See <strong>Source Resolver Flags</strong>. </p> </dd></param>
 /// <returns>A reference to the object's <strong><see cref="SharpDX.ComObject"/></strong> interface. The caller must release the interface.</returns>
 /// <remarks>
 /// <p>The <em>dwFlags</em> parameter must contain either the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.MediaSource"/></strong> flag or the <strong><see cref="SharpDX.MediaFoundation.SourceResolverFlags.ByteStream"/></strong> flag, but should not contain both.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><p><strong>Note</strong>??This method cannot be called remotely.</p>
 /// </remarks>
 /// <msdn-id>ms702279</msdn-id>
 /// <unmanaged>HRESULT IMFSourceResolver::CreateObjectFromURL([In] const wchar_t* pwszURL,[In] unsigned int dwFlags,[In] IPropertyStore* pProps,[Out] MF_OBJECT_TYPE* pObjectType,[Out] IUnknown** ppObject)</unmanaged>
 /// <unmanaged-short>IMFSourceResolver::CreateObjectFromURL</unmanaged-short>
 public SharpDX.IUnknown CreateObjectFromURL(string url,
                                             SourceResolverFlags flags)
 {
     SharpDX.MediaFoundation.ObjectType objectType;
     return(CreateObjectFromURL(url, flags, null, out objectType));
 }