[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-client-cvs
Subject: [Client-cvs] core srcinfo.cpp,1.93,1.94
From: anugrahk () helixcommunity ! org
Date: 2010-03-30 9:17:54
Message-ID: 201003300918.o2U9I8ZN019686 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/client/core
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv8396
Modified Files:
srcinfo.cpp
Log Message:
"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)
Sheldon Fu [sfu@real.com]
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. 4. Added \
code in mkv file format to return unknown mime-type for unsupported streams.
Files modified & changes 210Cays , Brizo420 and Head :
/cvsroot/client/core/srcinfo.cpp
/cvsroot/datatype/mp4/payload/mp3draft.cpp
/cvsroot/datatype/mkv/fileformat/mkv_file_format.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 :
Index: srcinfo.cpp
===================================================================
RCS file: /cvsroot/client/core/srcinfo.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- srcinfo.cpp 11 Dec 2008 01:11:08 -0000 1.93
+++ srcinfo.cpp 30 Mar 2010 09:17:50 -0000 1.94
@@ -2183,7 +2183,7 @@
HX_ASSERT(pMimeTypeBuffer && pMimeTypeBuffer->GetBuffer());
if (!pMimeTypeBuffer || !pMimeTypeBuffer->GetBuffer())
{
- GOTOEXITONERROR(theErr = HXR_NOT_INITIALIZED, exit);
+ GOTOEXITONERROR(theErr = HXR_NO_RENDERER, nextrend);
}
/*
@@ -2405,6 +2405,8 @@
{
// Partial playback is enabled.
// check valid renderer count against min value required.
+ if(usNumberOfAudioStreams > 0 || usNumberOfVideoStreams > 0 )
+ {
if((theFinalErr || theErr) && (ulNumNULLRenderer > 0))
{
UINT32 ulValidRenderers = m_pSource->GetNumStreams() - \
ulNumNULLRenderer; @@ -2419,6 +2421,12 @@
m_bIsPartialPlayback = TRUE;
}
} // End of if(theFinalErr || theErr)
+ }
+ else if(theErr != HXR_OUTOFMEMORY && theFinalErr != HXR_OUTOFMEMORY)
+ {
+ 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
_______________________________________________
Client-cvs mailing list
Client-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/client-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic