Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C++
CreateMediaSource( lpctszInput_i, &pSource );
AUDIO_ATTRIBUTES_t stAudioParam;
SubTypeGUID = MFAudioFormat_MP3;
ContainerTypeGUID = MFTranscodeContainerType_MP3;

hrStatus = MFCreateTranscodeProfile( &pProfile );
hrStatus = MFCreateAttributes( &pAudioAttributes, 7 );
hrStatus = pAudioAttributes->SetGUID( MF_MT_SUBTYPE, SubTypeGUID );
hrStatus = pAudioAttributes->SetUINT32( MF_MT_AUDIO_BITS_PER_SAMPLE, uBitsPerSample );
hrStatus = pAudioAttributes->SetUINT32( MF_MT_AUDIO_SAMPLES_PER_SECOND, uSamplesPerSec );
hrStatus = pAudioAttributes->SetUINT32( MF_MT_AUDIO_NUM_CHANNELS, uNumChannels );
hrStatus = pAudioAttributes->SetUINT32( MF_MT_AUDIO_AVG_BYTES_PER_SECOND, uBytesPerSec );
hrStatus = pAudioAttributes->SetUINT32( MF_MT_AUDIO_BLOCK_ALIGNMENT, uAudioBlockAllign );
hrStatus = pAudioAttributes->SetUINT32( MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION, uProfile );
hrStatus = pProfile->SetAudioAttributes( pAudioAttributes );
hrStatus = MFCreateAttributes( &pContainer, 1 );
hrStatus = pContainer->SetGUID( MF_TRANSCODE_CONTAINERTYPE, ContainerTypeGUID );
hrStatus = pProfile->SetContainerAttributes( pContainer );
hrStatus = MFCreateTranscodeTopology( pSource, lpctszOutput_i, pProfile, &pTopology );


But MFCreateTranscodeTopology return MF_E_NOT_FOUND error. Whether I need to set any other parameters? Why this error occurred?
Thanks in Advance...
Posted
Updated 2-Oct-12 22:42pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900