[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-dev
Subject: [datatype-dev] CR: EKWM-83NJQ8 : Video FUSION: Player -
From: <ext-anugrah.2.kashari () nokia ! com>
Date: 2010-03-26 13:09:20
Message-ID: F5530C438DC47349A7BFA40DC96D95EA2AA7E4E260 () NOK-EUMSG-02 ! mgdnok ! nokia ! com
[Download RAW message or body]
"Nokia submits this code under the terms of a commercial contribution agreement with \
RealNetworks, and I am authorized to contribute this code under said agreement"
Modified By: ext-anugrah.2.kashari@nokia.com
Review By: Liu Junhong (Nokia-D/Dallas)
TSW-ID: EKWM-83NJQ8
Date : 20/03/2010
Project: SymbianMmf_wm
Synopsis: Video FUSION: Player - MMFControllerProxyServer panic happens when \
starting playback for a certain DIVX3 + MKV video file
Overview: There are two aspects of this issue. One is crash and second is \
codecspecfic data for audio.
1. Crash issue: During SourceInfo::InitializeRenderers(), audio renderer fails to \
initialize because CAudioSpecificConfig::Read() fails. It does not recognizes \
bitstream (mediainfo shows it is AAC LC v2). So a dummy renderer is initialized for \
audio (ulNumNULLRenderer count incremented to 1). Next video MimeType is returned as \
NULL (pMimeTypeBuffer is NULL because MKV FF does not find any equivalent mime-type \
for helix for DIV3) so it goes to exit subroutine. In exit it check for if partial \
playback is enabled and it tries to find out if any renderer is valid. If any render \
is valid then it will set partial playback flag. The catch is it check against \
number of streams ( here 2) and dummy render (is 1). So interprets wrongly that one \
render is valid. But this render is NULL. So when trying to SetupRendererSites() it \
crashes (pRenderer->GetDisplayType() ). If any render is successfully initialized \
then for audio and video, ulNumberOfAudioStreams and ulNumberOfVideoStreams will be \
greater than zero respectively. So this should be checked before resetting all the \
error codes and partial playback flag.
2. CodecSpecfic data : In this case audio is AAC LC v2 and no codec specific info is \
available. So MP4APayloadFormat::SetAssemblerAACGenericHeader() fails as no \
"OpaqueData" is found ( Actually not set by MKV FF format as ). However this error is \
propagated to PayloadFormatFactory::BuildFormat() and it keeps looking through other \
payload format (IMP4APayloadFormat) to find a suitable format. When it is checking \
with MP3, in CMP3DraftPayloadFormat::SetStreamHeader() , it successfully gets the \
mime-type and retval is set to HXR_OK. Now even if mime type does not match, as \
retval was still HXR_OK so it creates a MP3 bit-stream header for AAC! And since \
return code is HXR_OK CMP3DraftPayloadFormat is initialized instead of \
MP4APayloadFormat. However, finally CAudioSpecificConfig::Read() fails (after \
creating audio render, decoder etc) and renderer fails to initialize.
Fix: 1. If mimetype is not set, instead of going to exit routine we can try to \
initialize NULL renderer and see if partial playback is possible. This will attempt \
to do a partial playback if mimetype for either first or second stream is known. 2. \
To avoid crash changes has been made in srcinfo.cpp to ensure that partial playback \
is enable only if at-least one valid render is initialized. And in case none is \
initialized remap final error to HXR_NOT_SUPPORTED from HXR_FAILED, otherwise UI will \
show "General error". 3. If mime-type does not matches return HXR_FAIL for \
CMP3DraftPayloadFormat to avoid initialization of wrong payload format.
Files modified & changes 210Cays , Brizo420 and Head :
/cvsroot/client/core/srcinfo.cpp
/cvsroot/datatype/mp4/payload/mp3draft.cpp
Image Size and Heap Use impact: No major impact
Module Release testing (STIF) : PASSED
Test case(s) Added : No
Memory leak check performed : Passed, No additional leaks introduced.
Platforms and Profiles Build Verified: helix-client-s60-52-mmf-mdf-dsp
Platforms and Profiles Functionality verified: armv5
Branch : 210Cays, Brizo420 & Head :
CVS diff: Attached for 210Cays
1. Srcinfo_cpp.txt for srcinfo.cpp
2. Mp3draft_cpp.txt or mp3draft.cpp
["srcinfo_cpp.txt" (text/plain)]
Index: srcinfo.cpp
===================================================================
RCS file: /cvsroot/client/core/srcinfo.cpp,v
retrieving revision 1.54.2.7
diff -u -w -r1.54.2.7 srcinfo.cpp
--- srcinfo.cpp 10 May 2007 17:46:25 -0000 1.54.2.7
+++ srcinfo.cpp 24 Mar 2010 05:31:12 -0000
@@ -2012,7 +2012,7 @@
HX_ASSERT(pMimeTypeBuffer && pMimeTypeBuffer->GetBuffer());
if (!pMimeTypeBuffer || !pMimeTypeBuffer->GetBuffer())
{
- GOTOEXITONERROR(theErr = HXR_NOT_INITIALIZED, exit);
+ GOTOEXITONERROR(theErr = HXR_NO_RENDERER, nextrend);
}
/*
@@ -2232,6 +2232,8 @@
{
// Partial playback is enabled.
// check valid renderer count against min value required.
+ if(ulNumberOfAudioStreams > 0 || ulNumberOfVideoStreams > 0 )
+ {
if((theFinalErr || theErr) && (ulNumNULLRenderer > 0))
{
UINT32 ulValidRenderers = m_pSource->GetNumStreams() - \
ulNumNULLRenderer; @@ -2246,6 +2248,12 @@
m_bIsPartialPlayback = TRUE;
}
} // End of if(theFinalErr || theErr)
+ }
+ else
+ {
+ theFinalErr = HXR_NOT_SUPPORTED; // As no valid render is intialized. We \
can not do partial playback so remapp error message. + \
bSourceInitialized = FALSE; + }
} // if(bPartialPlaybackEnabled)
#endif
["mp3draft_cpp.txt" (text/plain)]
Index: mp3draft.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/payload/mp3draft.cpp,v
retrieving revision 1.7
diff -u -w -r1.7 mp3draft.cpp
--- mp3draft.cpp 14 Mar 2005 19:17:44 -0000 1.7
+++ mp3draft.cpp 20 Mar 2010 10:39:59 -0000
@@ -140,6 +140,7 @@
retVal = pHeader->GetPropertyCString("MimeType", pBuffer);
if (SUCCEEDED(retVal))
{
+ retVal = HXR_FAIL;
const char* pszMimeType = (const char*) pBuffer->GetBuffer();
if (pszMimeType)
{
_______________________________________________
Datatype-dev mailing list
Datatype-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic