Class MFFactory
Namespace: JeremyAnsel.DirectX.MediaFoundation
Assembly: JeremyAnsel.DirectX.MediaFoundation.dll
[SecurityCritical]
public sealed class MFFactory : IDisposable
Constructors
|
Edit this page
View Source
Initializes the platform object.
Must be called before using Media Foundation.
A matching MFShutdown call must be made when the application is done using
Media Foundation.
The "Version" parameter should be set to MF_API_VERSION.
Application should not call MFStartup / MFShutdown from workqueue threads.
Declaration
Methods
|
Edit this page
View Source
Declaration
public MFAttributes CreateAttributes()
Returns
|
Edit this page
View Source
Declaration
public MFAttributes CreateAttributes(uint cInitialSize)
Parameters
| Type |
Name |
Description |
| uint |
cInitialSize |
|
Returns
|
Edit this page
View Source
Declaration
public MFDXGIDeviceManager CreateDXGIDeviceManager(out uint resetToken)
Parameters
| Type |
Name |
Description |
| uint |
resetToken |
|
Returns
|
Edit this page
View Source
Creates a MFMediaBuffer for a D3D11Texture2D or a D3D12Resource.
Declaration
public MFMediaBuffer CreateDXGISurfaceBuffer(Guid riid, nint punkSurface, uint uSubresourceIndex, bool fBottomUpWhenLinear)
Parameters
| Type |
Name |
Description |
| Guid |
riid |
|
| nint |
punkSurface |
|
| uint |
uSubresourceIndex |
|
| bool |
fBottomUpWhenLinear |
|
Returns
|
Edit this page
View Source
Creates a MFMediaBuffer wrapper at the given offset and length
within an existing MFMediaBuffer
Declaration
public MFMediaBuffer CreateMediaBufferWrapper(nint pBuffer, uint cbOffset, uint dwLength)
Parameters
| Type |
Name |
Description |
| nint |
pBuffer |
|
| uint |
cbOffset |
|
| uint |
dwLength |
|
Returns
|
Edit this page
View Source
Declaration
public MFMediaType CreateMediaType()
Returns
|
Edit this page
View Source
Creates a MFMediaBuffer in memory.
Declaration
public MFMediaBuffer CreateMemoryBuffer(uint cbMaxLength)
Parameters
| Type |
Name |
Description |
| uint |
cbMaxLength |
|
Returns
|
Edit this page
View Source
Declaration
public MFSample CreateSample()
Returns
|
Edit this page
View Source
Declaration
public MFSinkWriter CreateSinkWriterFromURL(string pwszOutputURL, MFAttributes pAttributes)
Parameters
Returns
|
Edit this page
View Source
This function is used to instantiate an MF Source Reader object for
the specified URL.
Declaration
public MFSourceReader CreateSourceReaderFromURL(string pwszURL, MFAttributes pAttributes)
Parameters
| Type |
Name |
Description |
| string |
pwszURL |
URL that specifies the location of the media content to open.
|
| MFAttributes |
pAttributes |
Optional parameter specifying additional Source Reader configuration.
See: section below on MF Source Reader Attributes
|
Returns
|
Edit this page
View Source
Shuts down the platform object.
Releases all resources including threads.
Application should call MFShutdown the same number of times as MFStartup.
Application should not call MFStartup / MFShutdown from workqueue threads.
Declaration
Implements