List Info

Thread: WMA Audio Controller for WindowsMedia




WMA Audio Controller for WindowsMedia
user name
2007-04-10 14:11:51
 "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:  anshuman.tewarinokia.com
 
 Reviewed by: 
 
 Date: 4/5/2007
 
 Project: SymbianMmf
 
 ErrorId:  101-36568
 
 Synopsis: WMA Controller for WindowsMedia  

Common Code changes: 
 
 
1)  Changes in asf_file_format_dll.cpp. Add HXEXPORT macro
to function
declaration
    Needed for Symbian MMP Build System. 
 
2) Adding a Windows Media Audio Controller. 
   The WMVController directory now contains both the audio
and video MMF
controller. 
   A single sisx file is now generated to include both the
controllers. 
   The 10283350.rss file enables support for Windows Media
Audio files.
   
   Changes to symbianMmf/wmvextcontroller/WmvExtMmfSis
      *) Generate dll_names_wm.txt / audio_dll_names.txt /
hxmetadata_dlls_wm.txt in the config dir
      *) pkg file created will install both the
controllers.

3) Changes for the Metadata Engine
   KHXMDDLLNamePath contains \resource\hxmetadata_dlls*.
So WM
upgrades can be done using 
   hxmetadata_dlls_wm.txt. [which includes asfff.dll]. 

The library is loaded using the relative path
\sys\bin\hxmetadataeng.dll 
   
 
    
Root Cause of the problem:  New Requirement
 

Files Modified:

 datatype/wm/fileformat/asf_file_format_dll.cpp
 
 clientapps/symbianMmf/Umakefil
 clientapps/symbianMmf/audiocontroller/hxmmfaudioctrl.cpp
 clientapps/symbianMmf/audiocontroller/hxmmfaudiodefines.
 clientapps/symbianMmf/videocontroller/MmfSis

 clientapps/symbianMmf/wmvextcontroller/Umakefil
 clientapps/symbianMmf/wmvextcontroller/WmvExtMmfSis
 clientapps/symbianMmf/wmvextcontroller/installMMF.pcf
 
 datatype/tools/metadataeng/engine/platform/symbian/hxmddefi
nes.h,v
 
datatype/tools/metadataeng/engine/platform/symbian/symbian_m
etadataeng.c
pp,v
 
datatype/tools/metadataeng/utility/platform/symbian/hxmetada
tautil.cpp,v


Files Added: 
 
 clientapps/symbianMmf/wmvextcontroller/10283350.rss
 clientapps/symbianMmf/wmvextcontroller/wmaextcontrollerprox
y.cpp
 clientapps/symbianMmf/wmvextcontroller/wmaextctrldll
 
 
Image Size and Heap Use impact: 89K New controller
  
Module Release testing (STIF) :  No. Basic Integration
Testing with the
Music Player done. 

Test case(s) Added  :  N/A - Will be added once the WM
support is
enabled.
  
Memory leak check performed : NA [pending verification]
  
Platforms and Profiles Build Verified:
helix-client-s60-32-mmf-mdf-arm
  
Platforms and Profiles Functionality verified: armv5, winscw

  
Branch: Head & 210CayS



Index: asf_file_format_dll.cpp
============================================================
=======
RCS file:
/cvsroot/datatype/wm/fileformat/asf_file_format_dll.cpp,v
retrieving revision 1.2
diff -w -u -b -r1.2 asf_file_format_dll.cpp
--- asf_file_format_dll.cpp	2 Jun 2006 20:25:03 -0000	1.2
+++ asf_file_format_dll.cpp	9 Apr 2007 17:15:09 -0000
 -51,7
+51,7 
 static const char HX_THIS_FILE[] = __FILE__;
 #endif
 
-STDAPI ENTRYPOINT(HXCREATEINSTANCE)(IUnknown** ppIUnknown)
+STDAPI HXEXPORT ENTRYPOINT(HXCREATEINSTANCE)(IUnknown**
ppIUnknown)
 {
 #if defined(_WINDOWS)
 
 -66,7
+66,7 
 #endif /* #if defined(_WINDOWS) */
 }
 
-STDAPI ENTRYPOINT(CanUnload2)(void)
+STDAPI HXEXPORT ENTRYPOINT(CanUnload2)(void)
 {
     return (CHXBaseCountingObject::ObjectsActive() > 0 ?
HXR_FAIL :
HXR_OK);
 }
     
     
Index: Umakefil
============================================================
=======
RCS file: /cvsroot/clientapps/symbianMmf/Umakefil,v
retrieving revision 1.1.1.1.2.1
diff -w -u -b -r1.1.1.1.2.1 Umakefil
--- Umakefil	11 Sep 2006 21:22:14 -0000	1.1.1.1.2.1
+++ Umakefil	9 Apr 2007 17:52:05 -0000
 -38,4
+38,5 
 UmakefileVersion(2,1)
 
 MultiTargetMake('MmfCtrlLib', 'common/Umakefil',
-	'audiocontroller/Umakefil', 'videocontroller/Umakefil' )
+	'audiocontroller/Umakefil', 'videocontroller/Umakefil',
+	'wmvextcontroller/Umakefil')

Index: audiocontroller/hxmmfaudioctrl.cpp
============================================================
=======
RCS file:
/cvsroot/clientapps/symbianMmf/audiocontroller/hxmmfaudioctr
l.cpp,v
retrieving revision 1.1.2.6
diff -w -u -b -r1.1.2.6 hxmmfaudioctrl.cpp
--- audiocontroller/hxmmfaudioctrl.cpp	3 Apr 2007 18:41:55
-0000
1.1.2.6
+++ audiocontroller/hxmmfaudioctrl.cpp	9 Apr 2007 17:52:05
-0000
 -688,36
+688,18 
             break;
         case EShadowFilePath:
             pValue = ((TDesC &)
KHXMMFShadowFilePath).AllocLC();
-            err = GetInstallDrive(strDrive);
-            bAddDriveLetter = ETrue;
             break;
         case EDLLNamePath:
             pValue = ((TDesC &)
KHXMMFDLLNamePath).AllocLC();
-            err = GetInstallDrive(strDrive);
-            bAddDriveLetter = ETrue;
             break;
         case EDefaultMMFCtrlDrive:
             pValue = ((TDesC &)
KHXDefaultMMFCtrlDrive).AllocLC();
-            if ( (err = GetInstallDrive(strDrive)) ==
KErrNone)
-            {
-                TPtr ptr = pValue->Des();
-                CHXSymbianString::StringToDes(strDrive,
ptr);
-            }
-            else
-            {
-                User::Leave(err);
-                return;
-            }
             break;
         case EMMFDllDir:
             pValue = ((TDesC &)
KHXMMFDllDir).AllocLC();
-            err = GetInstallDrive(strDrive);
-            bAddDriveLetter = ETrue;
             break;
         case EMMFClientCoreLib:
             pValue = ((TDesC &)
KHXMMFClientCoreLib).AllocLC();
-            err = GetInstallDrive(strDrive);
-            bAddDriveLetter = ETrue;
             break;
         default:
             User::Leave(KErrNotFound);
Index: audiocontroller/hxmmfaudiodefines.h
============================================================
=======
RCS file:
/cvsroot/clientapps/symbianMmf/audiocontroller/hxmmfaudiodef
ines.h,v
retrieving revision 1.1.2.1
diff -w -u -b -r1.1.2.1 hxmmfaudiodefines.h
--- audiocontroller/hxmmfaudiodefines.h	8 Sep 2006 19:06:47
-0000
1.1.2.1
+++ audiocontroller/hxmmfaudiodefines.h	9 Apr 2007 17:52:05
-0000
 -53,7
+53,7 
 _LIT(KProductName, "HX_AudioController");
 
 // Relative path - DLL Listing.
-_LIT(KHXMMFDLLNamePath,      
"resource\audio_dll_names.txt");
+_LIT(KHXMMFDLLNamePath,      
"\resource\audio_dll_names*");
 
 // Absolute path where pluginarcchive is created
 _LIT(KHXMMFPluginArchiveName,
"c:\data\audio_plugin_archive.txt");
 -62,8
+62,8 
 #ifdef HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY
   // Path that identifies the MMF controller installation
drive
   _LIT(KHXMMFCtrlPath,
"\resource\plugins\HxMmfAudioCtrl.RSC");
-  _LIT(KHXMMFDllDir,            "sys\bin");
-  _LIT(KHXMMFClientCoreLib,    
"sys\bin\clntcore.dll");
+  _LIT(KHXMMFDllDir,            "\sys\bin");
+  _LIT(KHXMMFClientCoreLib,    
"\sys\bin\clntcore.dll");
 #else
   // Path that identifies the MMF controller installation
drive
   _LIT(KHXMMFCtrlPath,
"\system\libs\plugins\10207B64.RSC");

Index: videocontroller/MmfSis
============================================================
=======
RCS file:
/cvsroot/clientapps/symbianMmf/videocontroller/MmfSis,v
retrieving revision 1.2.2.4
diff -w -u -b -r1.2.2.4 MmfSis
--- videocontroller/MmfSis	11 Sep 2006 21:07:29
-0000	1.2.2.4
+++ videocontroller/MmfSis	9 Apr 2007 17:52:05 -0000
 -201,7
+201,6 
 pkg.Generate()
 pkg.CreateMakefile()
 
-if project.IsDefined('HELIX_CONFIG_SYMBIAN_MMF_ROM_ONLY'):
     ##
     ##  Copy file not needed for MMP builds
     ##
cvs diff: Diffing wmvextcontroller
Index: wmvextcontroller/Umakefil
============================================================
=======
RCS file:
/cvsroot/clientapps/symbianMmf/wmvextcontroller/Umakefil,v
retrieving revision 1.1
diff -w -u -b -r1.1 Umakefil
--- wmvextcontroller/Umakefil	7 Apr 2007 22:43:38 -0000	1.1
+++ wmvextcontroller/Umakefil	9 Apr 2007 17:52:05 -0000
 -51,4
+51,4 
 
 UmakefileVersion(2,1)
 
-MultiTargetMake('WmvExtCtrlDll', 'WmvExtMmfSis')
+MultiTargetMake('WmvExtCtrlDll', 'WmaExtCtrlDll',
'WmvExtMmfSis')
Index: wmvextcontroller/WmvExtMmfSis
============================================================
=======
RCS file:
/cvsroot/clientapps/symbianMmf/wmvextcontroller/WmvExtMmfSis
,v
retrieving revision 1.1
diff -w -u -b -r1.1 WmvExtMmfSis
--- wmvextcontroller/WmvExtMmfSis	7 Apr 2007 22:43:38 -0000
1.1
+++ wmvextcontroller/WmvExtMmfSis	9 Apr 2007 17:52:05 -0000
 -143,6
+143,25 
 
 file.close()    
 
+#generate audio_dll_names_wm.txt 
+
+
+file = open(audio_dll_names_file, 'w')
+for dll in lib_files_copy:
+    file.write('%sn' % os.path.basename(dll))
+file.close()
+
+#generate hxmetadata_dlls_wm.txt
+
+file = open(metadata_dll_names_file, 'w')
+for dll in metadata_lib_files_copy:
+    file.write('%sn' % os.path.basename(dll))
+file.close()
+
+
+
+
+
 pkgBaseName = GetInstallName('hx_s60')
 pkg = SymbianPkg(pkgBaseName, "Helix_WM",
["en"])
 
 -155,6
+174,9 
        
project.symbianMmpUtils.AddMmpCfgExport(os.path.abspath(file
))
 
 pkg.AddFile(dll_names_file, '!:\resource\%s' %
os.path.basename(dll_names_file))
+pkg.AddFile(audio_dll_names_file, '!:\resource\%s' %
os.path.basename(audio_dll_names_file))
+pkg.AddFile(metadata_dll_names_file, '!:\resource\%s' %
os.path.basename(metadata_dll_names_file))
+
 
 if project.IsDefined('HELIX_CONFIG_SYMBIAN_GENERATE_MMP'):
 
project.symbianMmpUtils.AddMmpCfgExport(os.path.abspath(dll_
names_file))
 -165,7
+187,7 
         pkg.AddFile(file, '!:\Sys\bin\%s' %
os.path.basename(file))
 
     for file in rsc_files_copy:
-        pkg.AddFile(file, '!:\Resource\Plugins\%s' %
"wmvextctrldll.rsc" )
+        pkg.AddFile(file, '!:\Resource\Plugins\%s' %
os.path.basename(file))
 
     for file in lib_files_copy:
         pkg.AddFile(file, '!:\Sys\bin\%s' %
os.path.basename(file))
Index: wmvextcontroller/installMMF.pcf
============================================================
=======
RCS file:
/cvsroot/clientapps/symbianMmf/wmvextcontroller/installMMF.p
cf,v
retrieving revision 1.1
diff -w -u -b -r1.1 installMMF.pcf
--- wmvextcontroller/installMMF.pcf	7 Apr 2007 22:43:38
-0000
1.1
+++ wmvextcontroller/installMMF.pcf	9 Apr 2007 17:52:05
-0000
 -86,17
+86,16 
 #
 # app_files
 #
-app_file_names = [ 'wmvextctrldll.dll' ]
+app_file_names = [ 'wmvextctrldll.dll',
+                   'wmaextctrldll.dll' ]
 
 app_files_copy = AddPrefixForEach(mmfDllDir,
app_file_names)
 
 #
 # rsc_files
 #
-if
(project.IsDefined('HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY')
):
-    rsc_file_names = [ 'wmvextctrldll.rsc' ]
-else:
-    rsc_file_names = [ '10283349.RSC' ]
+rsc_file_names = [ 'wmvextctrldll.rsc' ,
+                   'wmaextctrldll.rsc' ]
 
 rsc_files_copy = AddPrefixForEach(rscDir, rsc_file_names)
 
 -113,11
+112,17 
 dll_name = 'dll_names_wm.txt'
 dll_names_file = "%s%s" % (configDir , dll_name
)
 
+audio_dll_name = 'audio_dll_names_wm.txt'
+audio_dll_names_file = "%s%s" % (configDir ,
audio_dll_name ) 
+
+metadata_dll_name = 'hxmetadata_dlls_wm.txt'
+metadata_dll_names_file = "%s%s" % ( configDir ,
metadata_dll_name )
 
 #
 # lib_files
 #
 lib_names = []
+metadata_lib_names = []
 
 # some dlls like vidplin aggregate functionality offered
individually
with
 # other dlls; this list tracks those dlls that can be
removed from the
list
 -125,10
+130,18 
 lib_names_remove = []
 
 # maps lib short name to where it is output when
built/distributed
+
 name_map = {
+     'asfff'           :
'datatype/wm/fileformat/[target]/asfff.dll',
+     'wma9'            :
'datatype/mdf/audio/arm/wma/[target]/wma9.dll',
+     'wmarender'       :
'datatype/wm/audio/renderer/[target]/wmarender.dll'
+}
+
+metadata_name_map = {
      'asfff'           :
'datatype/wm/fileformat/[target]/asfff.dll'
 }
 
+
 #
 # some helpers to reduce clutter...
 #
 -138,6
+151,7 
     for f in files:
         lib_names.append(f)
 
+
 def Remove(*files):
     ''' add files to list of files remove from install list
'''
     global lib_names_remove
 -157,8
+171,20 
             newList.append(item)
     return newList
 
+def AddMetaDataEntry(*files):
+    ''' add files to the list of the metadata engine
entries '''
+    global metadata_lib_names
+    for f in files:
+        metadata_lib_names.append(f) 
+        
 # always add asf file format
+
 Add('asfff')
+Add('wma9')
+Add('wmarender')
+
+# add ASF file format for metadata engine entry 
+AddMetaDataEntry('asfff') 
 
 # remove duplicates that fall under multiple features; sort
so we can
find more easily
 lib_names = StripDupes(lib_names)
 -177,6
+203,17 
     path = os.path.normpath(path)
     lib_files_copy.append(path)
 
+
+metadata_lib_files_copy = []
+for f in metadata_lib_names:
+    path = os.path.join(playerDllDir, f)
+    path += ".dll"
+    path = os.path.normpath(path)
+    metadata_lib_files_copy.append(path)
+
+
+
+
 #
 # payld_dll_files, payld_rsc_files
 #
     


Index: engine/platform/symbian/hxmddefines.h
============================================================
=======
RCS file:
/cvsroot/datatype/tools/metadataeng/engine/platform/symbian/
hxmddefines.
h,v
retrieving revision 1.1.2.1
diff -u -w -b -r1.1.2.1 hxmddefines.h
--- engine/platform/symbian/hxmddefines.h	19 Sep 2006
21:40:10
-0000	1.1.2.1
+++ engine/platform/symbian/hxmddefines.h	9 Apr 2007
22:49:49
-0000
 -66,7
+66,7 
 _LIT(KHXMDShadowFilePath,    "resource");
 
 // Relative path - DLL Listing.
-_LIT(KHXMDDLLNamePath,      
"resource\hxmetadata_dlls.txt");
+_LIT(KHXMDDLLNamePath,      
"\resource\hxmetadata_dlls*");
 
 // Same irrespective of ROM or SIS build
 // Absolute path - Initial config file created.
 -84,7
+84,7 
 
 
 // Relative path - DLL load path.
-_LIT(KHXMDDllDir,            "sys\bin");
+_LIT(KHXMDDllDir,            "\sys\bin");
 
 #endif HX_MD_DEFINES_H_
 
Index: engine/platform/symbian/symbian_metadataeng.cpp
============================================================
=======
RCS file:
/cvsroot/datatype/tools/metadataeng/engine/platform/symbian/
symbian_meta
dataeng.cpp,v
retrieving revision 1.1.2.1
diff -u -w -b -r1.1.2.1 symbian_metadataeng.cpp
--- engine/platform/symbian/symbian_metadataeng.cpp	19 Sep
2006
21:40:10 -0000	1.1.2.1
+++ engine/platform/symbian/symbian_metadataeng.cpp	9 Apr
2007
22:49:49 -0000
 -390,7
+390,7 
     
     // enable Helix DNA access paths at global scope.
 
-    CHXString strDllPath = m_strInstallDrive +
DESTOSTR(KHXMDDllDir);
+    CHXString strDllPath = DESTOSTR(KHXMDDllDir);
 
     GetDLLAccessPath()->SetPath(DLLTYPE_PLUGIN,
strDllPath);
     GetDLLAccessPath()->SetPath(DLLTYPE_CODEC,
strDllPath);
 -438,8
+438,7 
     CreatePrefIfNoExist("PluginArchiveFileName",
strPluginArchiveFileName);
 
     // set the dll name file path. Plugin Manager needs it
to load the
dlls.
-    CHXString strPluginDLLFileName = m_strInstallDrive + 
-                            DESTOSTR(KHXMDDLLNamePath);
+    CHXString strPluginDLLFileName =
DESTOSTR(KHXMDDLLNamePath);
 
     CreatePrefIfNoExist("PluginDLLFileName",
strPluginDLLFileName);
 

Index: utility/platform/symbian/hxmetadatautil.cpp
============================================================
=======
RCS file:
/cvsroot/datatype/tools/metadataeng/utility/platform/symbian
/hxmetadatau
til.cpp,v
retrieving revision 1.1.2.1
diff -u -w -b -r1.1.2.1 hxmetadatautil.cpp
--- utility/platform/symbian/hxmetadatautil.cpp	19 Sep 2006
21:44:27
-0000	1.1.2.1
+++ utility/platform/symbian/hxmetadatautil.cpp	9 Apr 2007
22:49:49
-0000
 -67,7
+67,7 
 
 _LIT(KFileScheme, "file://");
 
-_LIT(KMetaDataEngineDllPath ,
"z:\sys\bin\hxmetadataeng.dll");
+_LIT(KMetaDataEngineDllPath ,
"\sys\bin\hxmetadataeng.dll");
 
 #define DISABLE_UTILITY_LOGGING 1
 
 -142,17
+142,6 
     TPtrC ptrDllPath(KMetaDataEngineDllPath);
 
     TInt err = m_rlib.Load(ptrDllPath);
-
-#ifndef HELIX_CONFIG_SYMBIAN_MMF_ROM_ONLY
-    if (err != KErrNone)
-    {
-    FLOG("CHXMetaDataUtility::ConstructL Loading from
other drivesn");
-    // engine can't be loaded from ROM. Try to load it from
other
drives.
-    TPtrC relativeDllPath = ptrDllPath.Mid(2);
-    err = m_rlib.Load(relativeDllPath);
-    }
-#endif
-
     User::LeaveIfError(err);
 
     m_bLibLoaded = ETrue;



     



_______________________________________________
Datatype-dev mailing list
Datatype-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/da
tatype-dev

  
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )