Xeno-rat
Loading...
Searching...
No Matches
NAudio.MediaFoundation.MediaFoundationInterop Class Reference

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...

Collaboration diagram for NAudio.MediaFoundation.MediaFoundationInterop:

Public Member Functions

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.
 

Static Public Attributes

const int MF_SOURCE_READER_ALL_STREAMS = unchecked((int)0xFFFFFFFE)
 All streams.
 
const int MF_SOURCE_READER_FIRST_AUDIO_STREAM = unchecked((int)0xFFFFFFFD)
 First audio stream.
 
const int MF_SOURCE_READER_FIRST_VIDEO_STREAM = unchecked((int)0xFFFFFFFC)
 First video stream.
 
const int MF_SOURCE_READER_MEDIASOURCE = unchecked((int)0xFFFFFFFF)
 Media source.
 
const int MF_SDK_VERSION = 0x2
 Media Foundation SDK Version.
 
const int MF_API_VERSION = 0x70
 Media Foundation API Version.
 
const int MF_VERSION = (MF_SDK_VERSION << 16) | MF_API_VERSION
 Media Foundation Version.
 

Detailed Description

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.

Member Function Documentation

◆ 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
punkStreamThe input stream object.
ppByteStreamWhen this method returns, contains the created byte stream object.
Exceptions
System.Runtime.InteropServices.COMExceptionThrown when the method fails to create the byte stream object.
Here is the caller graph for this function:

◆ 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
punkStreamThe stream from which to create the byte stream object.
ppByteStreamWhen this method returns, contains the created IMFByteStream object.
Exceptions
System.Runtime.InteropServices.COMExceptionThrown 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
pwszOutputURLThe URL of the output file.
pByteStreamThe byte stream to write to.
pAttributesThe attributes to configure the sink writer.
ppSinkWriterWhen this method returns, contains the pointer to the sink writer interface.
Here is the caller graph for this function:

◆ 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
pByteStreamThe byte stream from which to create the source reader.
pAttributesAdditional attributes for creating the source reader.
ppSourceReaderWhen 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.

Here is the caller graph for this function:

◆ 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
pwszURLThe URL of the media source.
pAttributesA pointer to the IMFAttributes interface. Can be null.
ppSourceReaderReceives a pointer to the IMFSourceReader interface.
Exceptions
System.Runtime.InteropServices.COMExceptionThrown when a call to the underlying native COM method fails.
Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ MFStartup()

static void NAudio.MediaFoundation.MediaFoundationInterop.MFStartup ( int version,
int dwFlags = 0 )

Initializes the Media Foundation platform.

Parameters
versionThe version of the Media Foundation platform to initialize.
dwFlagsOptional flags for initialization. Default is 0.
Exceptions
System.EntryPointNotFoundExceptionThe mfplat.dll library is not found.
Here is the caller graph for this function:

◆ MFTEnumEx()

static void NAudio.MediaFoundation.MediaFoundationInterop.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.

Parameters
guidCategoryThe category of MFTs to enumerate.
flagsFlags that control the enumeration.
pInputTypeA pointer to an MFT_REGISTER_TYPE_INFO structure that specifies the input type to match.
pOutputTypeA pointer to an MFT_REGISTER_TYPE_INFO structure that specifies the output type to match.
pppMFTActivateReceives 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.
pcMFTActivateReceives 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.

Here is the caller graph for this function:

◆ 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
guidSubTypeThe subtype of the media format.
dwMFTFlagsFlags that control the enumeration behavior.
pCodecConfigAn IMFAttributes interface that contains codec-specific configuration data.
ppAvailableTypesWhen this method returns, contains the collection of available output types for transcoding.
Exceptions
System.Runtime.InteropServices.COMExceptionThrown when a COM error occurs during the transcoding type retrieval.
Here is the caller graph for this function:

Member Data Documentation

◆ 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

All streams.

◆ MF_SOURCE_READER_FIRST_AUDIO_STREAM

const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM = unchecked((int)0xFFFFFFFD)
static

First audio stream.

◆ MF_SOURCE_READER_FIRST_VIDEO_STREAM

const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_FIRST_VIDEO_STREAM = unchecked((int)0xFFFFFFFC)
static

First video stream.

◆ MF_SOURCE_READER_MEDIASOURCE

const int NAudio.MediaFoundation.MediaFoundationInterop.MF_SOURCE_READER_MEDIASOURCE = unchecked((int)0xFFFFFFFF)
static

Media source.

◆ MF_VERSION

const int NAudio.MediaFoundation.MediaFoundationInterop.MF_VERSION = (MF_SDK_VERSION << 16) | MF_API_VERSION
static

Media Foundation Version.


The documentation for this class was generated from the following file: