MSDN:
Pointer to an array of MFT_REGISTER_TYPE_INFO structures. Each member of the array specifies an input format that the MFT supports. This parameter can be NULL.
I would use the IMFPresentationDescriptor interface for that purpose.
An example how to determine, get and set an active stream is given in MfPlayer III. It requires a small piece of code and works fine. see:
// Returns the active(current) stream of a media typefunctionTMfPlayer.GetActiveStreamType(stType:TMediaTypes;outiStreamIndex:DWord):HRESULT;and// Select and deselect streams.functionTMfPlayer.SetActiveStreamType(stType:TMediaTypes;iStreamIndex:DWord):HRESULT;// Set the volumes for the channels (IMFAudioStreamVolume)procedureTMfPlayer.SetVolume(Value:TFloatArray);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
MSDN:
Pointer to an array of MFT_REGISTER_TYPE_INFO structures. Each member of the array specifies an input format that the MFT supports. This parameter can be NULL.
so function much like:
no const flag is right ,otherwise addr access error!
What version of MfApi you are using? In the latest version (2.5.0) this function looks like this:
It seems this bug has been repaired a while ago.
There should be no const declaration at all.
Fix MFTRegister:
and uses it:
Thank you, could you translate this to a sample function?
By the way; Why not using the the MFTEnumEx function?
i need to write a custom Media foudation Transform to Switch audio stream volume;
so uses this method do Registered a com & MFT component.
Last edit: TopPlay 2019-02-21
I would use the IMFPresentationDescriptor interface for that purpose.
An example how to determine, get and set an active stream is given in MfPlayer III. It requires a small piece of code and works fine. see: