Skip to content

Latest commit

 

History

History
186 lines (145 loc) · 5.61 KB

nf-mfidl-mfcreatetranscodetopology.md

File metadata and controls

186 lines (145 loc) · 5.61 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mfidl.MFCreateTranscodeTopology
MFCreateTranscodeTopology function (mfidl.h)
Creates a partial transcode topology.
MFCreateTranscodeTopology
MFCreateTranscodeTopology function [Media Foundation]
mf.mfcreatetranscodetopology
mfidl/MFCreateTranscodeTopology
mf\mfcreatetranscodetopology.htm
mf
ef3f19bf-1db9-459d-9617-d6cca9d6aba7
12/05/2018
MFCreateTranscodeTopology, MFCreateTranscodeTopology function [Media Foundation], mf.mfcreatetranscodetopology, mfidl/MFCreateTranscodeTopology
mfidl.h
Windows
Windows 7 [desktop apps only]
Windows Server 2008 R2 [desktop apps only]
Mf.lib
Mf.dll
Windows
19H1
MFCreateTranscodeTopology
mfidl/MFCreateTranscodeTopology
c++
APIRef
kbSyntax
DllExport
mf.dll
MFCreateTranscodeTopology

MFCreateTranscodeTopology function

-description

Creates a partial transcode topology.

The underlying topology builder creates a partial topology by connecting the required pipeline objects: source, encoder, and sink. The encoder and the sink are configured according to the settings specified by the caller in the transcode profile.

To create the transcode profile object, call the MFCreateTranscodeProfile function and set the required attributes by calling the appropriate the IMFTranscodeProfile methods.

The configured transcode profile is passed to the MFCreateTranscodeTopology function, which creates the transcode topology with the appropriate settings. The caller can then set this topology on the Media Session and start the session to begin the encoding process. When the Media Session ends, the transcoded file is generated.

-parameters

-param pSrc [in]

A pointer to a media source that encapsulates the source file to be transcoded. The media source object exposes the IMFMediaSource interface and can be created by using the source resolver. For more information, see Using the Source Resolver.

-param pwszOutputFilePath [in]

A pointer to a null-terminated string that contains the name and path of the output file to be generated.

-param pProfile [in]

A pointer to the transcode profile that contains the configuration settings for the audio stream, the video stream, and the container to which the file is written. The transcode profile object exposes the IMFTranscodeProfile interface and must be created by calling the MFCreateTranscodeProfile function. After the object has been created the caller must provide the configuration settings by calling appropriate the IMFTranscodeProfile methods.

-param ppTranscodeTopo [out]

Receives a pointer to the IMFTopology interface of the transcode topology object. The caller must release the interface.

-returns

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The function call succeeded, and ppTranscodeTopo receives a pointer to the transcode topology.
E_INVALIDARG
pwszOutputFilePath contains invalid characters.
MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED
No streams are selected in the media source.
MF_E_TRANSCODE_NO_CONTAINERTYPE
The profile does not contain the MF_TRANSCODE_CONTAINERTYPE attribute.
MF_E_TRANSCODE_NO_MATCHING_ENCODER
For one or more streams, cannot find an encoder that accepts the media type given in the profile.
MF_E_TRANSCODE_PROFILE_NO_MATCHING_STREAMS
The profile does not specify a media type for any of the selected streams on the media source.

-remarks

For example code that uses this function, see the following topics:

-see-also

IMFTopology

Media Foundation Functions

Topologies

Transcode API