- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
m=video 0 RTP/AVP 98
b=AS:0
a=rtpmap:98 H264/90000
a=fmtp:98 packetization-mode=1; profile-level-id=4d001f; sprop-parameter-sets=J00AH9oFB+Q=,KO48gA==
I believe to understand packetization-modeand sprop-parameter-sets. I don't understand how to use profile-level-id in conjuction with H264VideoDecoder? Below is a code snippet "m_pvidDecoder->GetInfo (¶ms)" always returns VM_NOT_INITIALIZED?
Can someone direct me on why this does not work?
I am using IPP 6.1.1.035 compiled using Microsoft Visual Studio 2005 C++ on windows xp.
//////////////////////////////////////////
//Code Snippet
/////////////////////////////////////////
//-------------------------------------------------------------
bool Init (BYTE *pData, unsigned long nSize)
{
bool bRetVal = false;
UMC::Status nStatus;
m_pvidDecoder = new UMC::H264VideoDecoder();
if (m_pvidDecoder)
{
m_inVid.SetBufferPointer (pData, nSize);
m_inVid.SetDataSize (nSize);
m_VidDecodeParams.pPostProcessing = NULL;
m_VidDecodeParams.info.stream_type = UMC::H264_VIDEO;
m_VidDecodeParams.numThreads = m_nThreadCount;
m_VidDecodeParams.lFlags = 0;
m_VidDecodeParams.m_pData = &m_inVid;
nStatus = m_pvidDecoder->Init(&m_VidDecodeParams);
if(nStatus == UMC::UMC_OK)
{
UMC::H264VideoDecoderParams params;
nStatus = m_pvidDecoder->GetInfo (¶ms);
if(nStatus == UMC::UMC_OK)
{
nStatus = m_outVid.Init (params.info.clip_info.width, params.info.clip_info.height, UMC::RGB24, 8);
if(nStatus == UMC::UMC_OK)
{
nStatus = m_outVid.Alloc ();
if(nStatus == UMC::UMC_OK)
{
bRetVal = true;
}
}
}
}
}
return (bRetVal);
}
//----------------------------------------------------------------------------------
void SetParameters ()
{
int nSPSSize = vlc_b64_decode_binary (&pSPS, strSPS);
int nPPSSize = vlc_b64_decode_binary (&pPPS, strPPS);
m_pBuffer[m_nSize + 0] = 0;
m_pBuffer[m_nSize + 1] = 0;
m_pBuffer[m_nSize + 2] = 0;
m_pBuffer[m_nSize + 3] = 1;
m_nSize += 4;
memcpy_s(&(m_pBuffer[m_nSize]), (m_nBufSize - m_nSize), pSPS, nSPSSize);
m_nSize += nSPSSize;
m_pBuffer[m_nSize + 0] = 0;
m_pBuffer[m_nSize + 1] = 0;
m_pBuffer[m_nSize + 2] = 0;
m_pBuffer[m_nSize + 3] = 1;
m_nCurrentSize += 4;
memcpy_s(&(m_pBuffer[m_nSize]), (m_nBufSize - m_nSize), pPPS, nPPSSize);
m_nSize += nPPSSize;
Init (m_pBuffer, m_nSize);
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was mistaken that the 2 elements of sprop-parameter-sets were the same as SPS and PPS!? (A little confused by this?)
Now the decoder's GetFrame call is returning VM_NOT_ENOUGH_DATA. I have seen several threads on this topic so will be researching that.
Though Any and All comments are welcome.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was mistaken that the 2 elements of sprop-parameter-sets were the same as SPS and PPS!? (A little confused by this?)
Now the decoder's GetFrame call is returning VM_NOT_ENOUGH_DATA. I have seen several threads on this topic so will be researching that.
Though Any and All comments are welcome.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page