Click here to Skip to main content
12,405,543 members (60,814 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Video audio
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 2-Oct-12 22:24pm
Updated 2-Oct-12 22:42pm
DaveAuld187.3K
v2

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100