Interop definitions for MediaFoundation thanks to Lucian Wischik for the initial work on many of these definitions (also various interfaces) n.b. the goal is to make as much of this internal as possible, and provide better .NET APIs using the MediaFoundationApi class instead.
More...
|
static void | MFStartup (int version, int dwFlags=0) |
| Initializes the Media Foundation platform.
|
|
static void | MFShutdown () |
| Shuts down the Media Foundation platform.
|
|
static void | MFCreateSourceReaderFromURL ([In, MarshalAs(UnmanagedType.LPWStr)] string pwszURL, [In] IMFAttributes pAttributes, [Out, MarshalAs(UnmanagedType.Interface)] out IMFSourceReader ppSourceReader) |
| Creates a source reader from the specified URL.
|
|
static void | MFCreateSourceReaderFromByteStream ([In] IMFByteStream pByteStream, [In] IMFAttributes pAttributes, [Out, MarshalAs(UnmanagedType.Interface)] out IMFSourceReader ppSourceReader) |
| Creates a source reader from a byte stream.
|
|
static void | MFCreateSinkWriterFromURL ([In, MarshalAs(UnmanagedType.LPWStr)] string pwszOutputURL, [In] IMFByteStream pByteStream, [In] IMFAttributes pAttributes, [Out] out IMFSinkWriter ppSinkWriter) |
| Creates a sink writer for a specified output URL.
|
|
static void | MFCreateMFByteStreamOnStreamEx ([MarshalAs(UnmanagedType.IUnknown)] object punkStream, out IMFByteStream ppByteStream) |
| Creates a byte stream object from the specified stream.
|
|
static void | MFCreateMFByteStreamOnStream ([In] IStream punkStream, out IMFByteStream ppByteStream) |
| Creates a byte stream object based on the provided stream object.
|
|
static void | MFTEnumEx ([In] Guid guidCategory, [In] _MFT_ENUM_FLAG flags, [In] MFT_REGISTER_TYPE_INFO pInputType, [In] MFT_REGISTER_TYPE_INFO pOutputType, [Out] out IntPtr pppMFTActivate, [Out] out int pcMFTActivate) |
| Enumerates Media Foundation transforms (MFTs) that match the specified search criteria.
|
|
static void | MFTranscodeGetAudioOutputAvailableTypes ([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidSubType, [In] _MFT_ENUM_FLAG dwMFTFlags, [In] IMFAttributes pCodecConfig, [Out, MarshalAs(UnmanagedType.Interface)] out IMFCollection ppAvailableTypes) |
| Retrieves the available audio output types for transcoding using the specified subtype and configuration.
|
|
Interop definitions for MediaFoundation thanks to Lucian Wischik for the initial work on many of these definitions (also various interfaces) n.b. the goal is to make as much of this internal as possible, and provide better .NET APIs using the MediaFoundationApi class instead.
◆ MFCreateMFByteStreamOnStream()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFCreateMFByteStreamOnStream |
( |
[In] IStream | punkStream, |
|
|
out IMFByteStream | ppByteStream ) |
Creates a byte stream object based on the provided stream object.
- Parameters
-
punkStream | The input stream object. |
ppByteStream | When this method returns, contains the created byte stream object. |
- Exceptions
-
System.Runtime.InteropServices.COMException | Thrown when the method fails to create the byte stream object. |
◆ MFCreateMFByteStreamOnStreamEx()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFCreateMFByteStreamOnStreamEx |
( |
[MarshalAs(UnmanagedType.IUnknown)] object | punkStream, |
|
|
out IMFByteStream | ppByteStream ) |
Creates a byte stream object from the specified stream.
- Parameters
-
punkStream | The stream from which to create the byte stream object. |
ppByteStream | When this method returns, contains the created IMFByteStream object. |
- Exceptions
-
System.Runtime.InteropServices.COMException | Thrown when a COM error occurs during the creation of the IMFByteStream object. |
◆ MFCreateSinkWriterFromURL()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFCreateSinkWriterFromURL |
( |
[In, MarshalAs(UnmanagedType.LPWStr)] string | pwszOutputURL, |
|
|
[In] IMFByteStream | pByteStream, |
|
|
[In] IMFAttributes | pAttributes, |
|
|
[Out] out IMFSinkWriter | ppSinkWriter ) |
Creates a sink writer for a specified output URL.
- Parameters
-
pwszOutputURL | The URL of the output file. |
pByteStream | The byte stream to write to. |
pAttributes | The attributes to configure the sink writer. |
ppSinkWriter | When this method returns, contains the pointer to the sink writer interface. |
◆ MFCreateSourceReaderFromByteStream()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFCreateSourceReaderFromByteStream |
( |
[In] IMFByteStream | pByteStream, |
|
|
[In] IMFAttributes | pAttributes, |
|
|
[Out, MarshalAs(UnmanagedType.Interface)] out IMFSourceReader | ppSourceReader ) |
Creates a source reader from a byte stream.
- Parameters
-
pByteStream | The byte stream from which to create the source reader. |
pAttributes | Additional attributes for creating the source reader. |
ppSourceReader | When this method returns, contains the created source reader. |
This method creates a source reader from the specified byte stream and additional attributes. The source reader is used to read media data from a media source.
◆ MFCreateSourceReaderFromURL()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFCreateSourceReaderFromURL |
( |
[In, MarshalAs(UnmanagedType.LPWStr)] string | pwszURL, |
|
|
[In] IMFAttributes | pAttributes, |
|
|
[Out, MarshalAs(UnmanagedType.Interface)] out IMFSourceReader | ppSourceReader ) |
Creates a source reader from the specified URL.
- Parameters
-
pwszURL | The URL of the media source. |
pAttributes | A pointer to the IMFAttributes interface. Can be null. |
ppSourceReader | Receives a pointer to the IMFSourceReader interface. |
- Exceptions
-
System.Runtime.InteropServices.COMException | Thrown when a call to the underlying native COM method fails. |
◆ MFShutdown()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFShutdown |
( |
| ) |
|
Shuts down the Media Foundation platform.
This method shuts down the Media Foundation platform. It is used to release all resources held by the platform and should be called when the platform is no longer needed.
◆ MFStartup()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFStartup |
( |
int | version, |
|
|
int | dwFlags = 0 ) |
Initializes the Media Foundation platform.
- Parameters
-
version | The version of the Media Foundation platform to initialize. |
dwFlags | Optional flags for initialization. Default is 0. |
- Exceptions
-
System.EntryPointNotFoundException | The mfplat.dll library is not found. |
◆ MFTEnumEx()
Enumerates Media Foundation transforms (MFTs) that match the specified search criteria.
- Parameters
-
guidCategory | The category of MFTs to enumerate. |
flags | Flags that control the enumeration. |
pInputType | A pointer to an MFT_REGISTER_TYPE_INFO structure that specifies the input type to match. |
pOutputType | A pointer to an MFT_REGISTER_TYPE_INFO structure that specifies the output type to match. |
pppMFTActivate | Receives a pointer to an array of pointers to IMFActivate objects. The caller must release the objects when they are no longer needed by calling the IMFActivate::Release method. |
pcMFTActivate | Receives the number of elements in the array pointed to by pppMFTActivate. |
This method enumerates MFTs that match the specified search criteria. The search criteria are specified by the guidCategory, flags, pInputType, and pOutputType parameters. The pppMFTActivate parameter receives a pointer to an array of pointers to IMFActivate objects. The caller must release the objects when they are no longer needed by calling the IMFActivate::Release method. The pcMFTActivate parameter receives the number of elements in the array pointed to by pppMFTActivate.
◆ MFTranscodeGetAudioOutputAvailableTypes()
static void NAudio.MediaFoundation.MediaFoundationInterop.MFTranscodeGetAudioOutputAvailableTypes |
( |
[In, MarshalAs(UnmanagedType.LPStruct)] Guid | guidSubType, |
|
|
[In] _MFT_ENUM_FLAG | dwMFTFlags, |
|
|
[In] IMFAttributes | pCodecConfig, |
|
|
[Out, MarshalAs(UnmanagedType.Interface)] out IMFCollection | ppAvailableTypes ) |
Retrieves the available audio output types for transcoding using the specified subtype and configuration.
- Parameters
-
guidSubType | The subtype of the media format. |
dwMFTFlags | Flags that control the enumeration behavior. |
pCodecConfig | An IMFAttributes interface that contains codec-specific configuration data. |
ppAvailableTypes | When this method returns, contains the collection of available output types for transcoding. |
- Exceptions
-
System.Runtime.InteropServices.COMException | Thrown when a COM error occurs during the transcoding type retrieval. |
◆ MF_API_VERSION
const int NAudio.MediaFoundation.MediaFoundationInterop.MF_API_VERSION = 0x70 |
|
static |
Media Foundation API Version.
◆ MF_SDK_VERSION
const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SDK_VERSION = 0x2 |
|
static |
Media Foundation SDK Version.
◆ MF_SOURCE_READER_ALL_STREAMS
const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_ALL_STREAMS = unchecked((int)0xFFFFFFFE) |
|
static |
◆ MF_SOURCE_READER_FIRST_AUDIO_STREAM
const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM = unchecked((int)0xFFFFFFFD) |
|
static |
◆ MF_SOURCE_READER_FIRST_VIDEO_STREAM
const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_FIRST_VIDEO_STREAM = unchecked((int)0xFFFFFFFC) |
|
static |
◆ MF_SOURCE_READER_MEDIASOURCE
const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_MEDIASOURCE = unchecked((int)0xFFFFFFFF) |
|
static |
◆ MF_VERSION
Media Foundation Version.
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Wasapi/MediaFoundation/MediaFoundationInterop.cs