[Common-dev] CR: Changes to make Log System Manager generic across Symbian MMF and Phonon_backend.

[Common-dev] CR: Changes to make Log System Manager generic across Symbian MMF and Phonon_backend.

ext-asheesh.srivastava at nokia.com ext-asheesh.srivastava at nokia.com
Thu Jun 25 07:55:40 PDT 2009


Hi Eric,

> So you use the same CHXSymLogManager for both the MMF (where you log before media platform creation) and Phonon (where you don't)?
Exactly! Symbian MMF and Phonon backend both use the same CHXSymLogSystemManager. 
 - MMF starts logging before media platform creation and 
 - Phonon logs after media platform creation so it lets media platform create and manage lifetime of CHXSymLogSystemManager (as proposed by your SoD)

Thanks for the review, I will go ahead and submit it to HEAD.

Regards,
- Asheesh
-----Original Message-----
From: ext Eric Hyche [mailto:ehyche at real.com] 
Sent: Thursday, June 25, 2009 7:47 AM
To: Srivastava Asheesh (EXT-Infovision-MSW/Dallas); common-dev at helixcommunity.org
Subject: RE: [Common-dev] CR: Changes to make Log System Manager generic across Symbian MMF and Phonon_backend.

Ok - thanks for the explanation. So you use the same CHXSymLogManager for both the MMF (where you log before media platform creation) and Phonon (where you don't)?

If so, I understand why the defines are needed now.
Looks good.

Eric

=======================================
Eric Hyche (ehyche at real.com)
Principal Engineer
RealNetworks, Inc.


>-----Original Message-----
>From: ext-asheesh.srivastava at nokia.com 
>[mailto:ext-asheesh.srivastava at nokia.com]
>Sent: Wednesday, June 24, 2009 4:19 PM
>To: ehyche at real.com; common-dev at helixcommunity.org
>Subject: RE: [Common-dev] CR: Changes to make Log System Manager 
>generic across Symbian MMF and Phonon_backend.
>
>Hi Eric,
>
>Thanks for you comments.
>
>>>a) What does CHXSymLogSystemManager do that CHXLogSystemManager
>   does not do?
>
>The intention behind having CHXSymLogSystemManager is to override 
>IHXLogSystemManager implementation provided by CHXLogSystemManager. By 
>doing this we can have logging in place before media platform creation.
>"Enable log before media platform creation" use case is still valid and 
>required for Symbian MMF builds.
>
>However, for Phonon_Backend, there is nothing much to log before media 
>platform creation, so we let media platform create the (Symbian specific) log system manager and manage its life time.
>
>>>b) Could we simply create a
>>>CHXLogSystemManager::CreateLogSystemManager()
>   static function which hides the fact that we create CHXSymLogSystemManager
>   on Symbian and CHXLogSystemManager otherwise? I think this would make
>   the code cleaner.
>
>I have made the changes as suggested by you. Please see the new diff file.
>
>
>>>c) Why is HXEnableCoreLogging() still needed? Previously, "core 
>>>logging" meant
>   that media platform held a pointer to the IHXTLogSystem
>   and thus components could QI their context (i.e. - the media platform)
>   for IHXTLogSystem instead of having to load log.dll, get the entrypoint, etc.
>   Now, "core logging" is pretty much how it works all the time - the only
>   change being that instead of QI'ing the context for IHXTLogSystem, you
>   QI it for IHXLogSystemManager, and then use IHXLogSystemManager::GetLogSystem()
>   to get the IHXTLogSystem.
>
>To enable logging, all DLLs are required to make a call to 
>HX_ENABLE_LOGGING function however not all DLLs do it.
>On Symbian platform, all logging functions (HXLogX) call 
>HXEnableCoreLogging() to enable logging by populating "g_pLogWriter" 
>based on "g_LogSystem", if the DLL didn't make call to HX_ENABLE_LOGGING before.
>Doing this we won't miss logs from any DLLs.
>So, on Symbian platform, if we don't call HXEnableCoreLogging(), we 
>wont get logs from DLL which has not called HX_ENABLE_LOGGING explicitly.
>
>Thanks,
>- Asheesh
>
>
>-----Original Message-----
>From: ext Eric Hyche [mailto:ehyche at real.com]
>Sent: Wednesday, June 24, 2009 9:22 AM
>To: Srivastava Asheesh (EXT-Infovision-MSW/Dallas); 
>common-dev at helixcommunity.org
>Subject: RE: [Common-dev] CR: Changes to make Log System Manager 
>generic across Symbian MMF and Phonon_backend.
>
>One of my original goals in creating the log system manager was to try 
>to avoid these kind of platform forks. Can you help me understand the following:
>
>a) What does CHXSymLogSystemManager do that CHXLogSystemManager
>   does not do?
>b) Could we simply create a CHXLogSystemManager::CreateLogSystemManager()
>   static function which hides the fact that we create CHXSymLogSystemManager
>   on Symbian and CHXLogSystemManager otherwise? I think this would make
>   the code cleaner.
>c) Why is HXEnableCoreLogging() still needed? Previously, "core logging" meant
>   that media platform held a pointer to the IHXTLogSystem
>   and thus components could QI their context (i.e. - the media platform)
>   for IHXTLogSystem instead of having to load log.dll, get the entrypoint, etc.
>   Now, "core logging" is pretty much how it works all the time - the only
>   change being that instead of QI'ing the context for IHXTLogSystem, you
>   QI it for IHXLogSystemManager, and then use IHXLogSystemManager::GetLogSystem()
>   to get the IHXTLogSystem.
>
>Thanks,
>
>Eric
>
>=======================================
>Eric Hyche (ehyche at real.com)
>Principal Engineer
>RealNetworks, Inc.
>
>
>>-----Original Message-----
>>From: common-dev-bounces at helixcommunity.org
>>[mailto:common-dev-bounces at helixcommunity.org] On Behalf Of 
>>ext-asheesh.srivastava at nokia.com
>>Sent: Tuesday, June 23, 2009 5:02 PM
>>To: common-dev at helixcommunity.org
>>Subject: [Common-dev] CR: Changes to make Log System Manager generic 
>>across Symbian MMF and Phonon_backend.
>>
>>
>>Nokia submits this code under the terms of a commercial contribution 
>>agreement with Real Networks, and I am authorized to contribute this code under said agreement."
>>
>>Modified by: ext-asheesh.srivastava at nokia.com 
>><mailto:ext-asheesh.srivastava at nokia.com>
>>Reviewed by:
>>Date: 06/23/2009
>>Project: SymbianMmf_wm
>>ErrorId: N/A
>>
>>Synopsis: Changes to make Log System Manager generic across Symbian MMF and Phonon_backend.
>>
>>Overview:
>>Few changes are required to make log system manager generic so that it 
>>can be used easily by both - Symbian MMF and Phonon_backend.
>>
>>Solution:
>>1. Unlike Symbian MMF, Phonon_backend doesn't create log system 
>>manager and pass it to media platform, instead it let media platform 
>>create and manage the lifetime of log
>system manager.
>>
>>2. Changes in hxtlogutil.cpp are to re-introduce HXEnableCoreLogging() 
>>function calls in logging functions.
>>
>>
>>Files modified:
>>/cvsroot/common/log/logutil/hxlogsystemmanager.cpp
>>/cvsroot/common/log/logutil/hxtlogutil.cpp
>>/cvsroot/common/log/logutil/platform/symbian/hxsymlogsystemmanager.cpp
>>
>>Files added:
>>None
>>
>>Image Size and Heap Use impact: None.
>>
>>Module Release testing (STIF): Yes
>>
>>Test case(s) Added: No
>>
>>Memory leak check performed: Yes.
>>
>>Platforms and Profiles Build Verified:
>>helix-client-s60-50-mmf-mdf-arm-dsp
>>
>>Platforms and Profiles Functionality verified: armv5, winscw
>>
>>Branch: HEAD
>>
>>Regards,
>>- Asheesh
>>
>>





More information about the Common-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.