[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] mkv/fileformat mkv_file_format.cpp, 1.1.1.1.2.1.2.5,
From: anugrahk () helixcommunity ! org
Date: 2010-03-30 9:22:20
Message-ID: 201003300922.o2U9Me35019928 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/datatype/mkv/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9881
Modified Files:
Tag: hxclient_4_2_0_brizo
mkv_file_format.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: mkv_file_format.cpp
===================================================================
RCS file: /cvsroot/datatype/mkv/fileformat/mkv_file_format.cpp,v
retrieving revision 1.1.1.1.2.1.2.5
retrieving revision 1.1.1.1.2.1.2.6
diff -u -d -r1.1.1.1.2.1.2.5 -r1.1.1.1.2.1.2.6
--- mkv_file_format.cpp 24 Mar 2010 15:47:55 -0000 1.1.1.1.2.1.2.5
+++ mkv_file_format.cpp 30 Mar 2010 09:22:17 -0000 1.1.1.1.2.1.2.6
@@ -75,6 +75,17 @@
#define MKV_AAC_MIMETYPE "A_AAC"
#define HELIX_AAC_MIMETYPE "audio/X-HX-AAC-GENERIC"
+#define HELIX_UNKNOWN_AUDIO_MIMETYPE "audio/X-HX-UNKNOWN"
+#define HELIX_UNKNOWN_VIDEO_MIMETYPE "video/X-HX-UNKNOWN"
+#define HELIX_UNKNOWN_MIMETYPE "application/X-HX-UNKNOWN"
+
+const char* MkvUnknownMimeType[] =
+{
+ {HELIX_UNKNOWN_AUDIO_MIMETYPE},
+ {HELIX_UNKNOWN_VIDEO_MIMETYPE},
+ {HELIX_UNKNOWN_MIMETYPE},
+};
+
//MimeType Mapping
const char* MkvToHelixMimeTypeMap[][2] =
{
@@ -362,7 +373,14 @@
pHdr->SetPropertyULONG32("AvgBitRate", fBytesPerSecond);
// Set the mime type
- SetCStringPropertyCCF(pHdr, "MimeType", GetMimeType(trk->pszCodec, \
trk->pExtraData), m_pContext); + const char* pszMimeType = NULL;
+ pszMimeType = GetMimeType(trk->pszCodec, trk->pExtraData);
+ if(pszMimeType == NULL)
+ {
+ pszMimeType = MkvUnknownMimeType[trk->type];
+ }
+
+ SetCStringPropertyCCF(pHdr, "MimeType", pszMimeType , m_pContext);
SetTypeSpecificProperties(pHdr, trk);
_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic