Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

AAC - audio decoding and audio rendering

bharath322
Beginner
380 Views

Hi,

I have tried to do AAC - audio streaming from the camera using the IPP audio-video codecs.
The following are the steps i have done.
1)
The initialization was done only once.

m_pAudioparams->m_info_in.sample_frequency = 8000;

m_pAudioparams->m_info_in.bitPerSample = 16;

m_pAudioparams->m_info_in.channels = 2;

m_pAudioparams->m_info_in.bitrate = 32000;

m_pAudioparams->m_info_in.stream_type = UMC::AAC_MPEG_STREAM;

m_pAudioparams->m_pData = rtspClient->m_pAudMediaIn;

// where m_pAudioparams is UMC::AudioCodecParams

if (UMC::UMC_OK = (m_pAudioDecoder->Init(m_pAudioparams)))
{
//initialization Sucess
}

2) Then

m_pAudMediaIn->SetBufferPointer((Ipp8u *)szData,len);

// m_pAudMediaIn is UMC::MediaData object ,szData is raw audio buffer from the camera i get everytime as it streams, len is length of the audio buffer.

m_pAudMediaIn->SetDataSize(len);

is set eveytime.

3)

UMC::Status stRes = m_pAudioDecoder->GetFrame(m_pAudMediaIn,m_pAudMediaOut);

if(UMC::UMC_OK == stRes)
{

if(!m_bFirst)

{
// Audio Renderer initialization is done only once

m_pAudioDecoder->GetInfo(m_pAudioparams);

m_bFirst =TRUE;

m_pAudioRenderParams->info = m_pAudioparams->m_info_out;
// At this point I got m_info_out.channels = 0,m_info_out.samplefrequency = 16000,m_info_out.bitrate = 0, m_info_out.bitpersample = 16,m_info_out.stream_type = PCM_AUDIO.

UMC::HWNDModuleContext hmcontext;

hmcontext.m_hWnd = (HWND)m_hWnd;

m_pAudioRenderParams->pModuleContext = &hmcontext;

UMC::Status stRes = m_pAudioRender->Init(m_pAudioRenderParams); //m_pAudioRender is UMC::WinMMAudioRender() HERE initialization is failing.

}

m_pAudioRender->SetVolume(1);

UMC::Status sta = m_pAudioRender->SendFrame(m_pAudMediaOut);

}

}

In this stepthe AACdecoder->getframe returns UMC::UMC_OK whenever it gets the frame.

I am having problem in initailizing the audiorender. It is failing.Could anyone please help me out where I am doing wrong?

Please reply.

0 Kudos
0 Replies
Reply