summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-09-24 06:58:16 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-09-24 06:58:16 +0000
commit31425448324e10b5fb02557a9f1d5cc86df7bed3 (patch)
tree93edaaebaffa076a067eb38e65358e6a5158b3f6 /pjmedia
parentec7c46ffe515eb8613470c9956158ade6829b941 (diff)
Re #1586: Initial version of SILK wrapper.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4264 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/build/pjmedia_codec.vcproj354
-rw-r--r--pjmedia/include/pjmedia-codec.h3
-rw-r--r--pjmedia/include/pjmedia-codec/config.h32
-rw-r--r--pjmedia/include/pjmedia-codec/silk.h133
-rw-r--r--pjmedia/include/pjmedia-codec/types.h28
-rw-r--r--pjmedia/src/pjmedia-codec/audio_codecs.c7
-rw-r--r--pjmedia/src/pjmedia-codec/silk.c805
7 files changed, 1176 insertions, 186 deletions
diff --git a/pjmedia/build/pjmedia_codec.vcproj b/pjmedia/build/pjmedia_codec.vcproj
index 158d43de..305c2e22 100644
--- a/pjmedia/build/pjmedia_codec.vcproj
+++ b/pjmedia/build/pjmedia_codec.vcproj
@@ -223,12 +223,11 @@
/>
</Configuration>
<Configuration
- Name="Release|Win32"
+ Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-release-defaults.vsprops"
- UseOfMFC="0"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -247,6 +246,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -262,7 +262,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -274,16 +274,24 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCFxCopTool"
+ Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
</Configuration>
<Configuration
- Name="Release|Pocket PC 2003 (ARMV4)"
+ Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -320,7 +328,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -347,9 +355,9 @@
/>
</Configuration>
<Configuration
- Name="Release|Smartphone 2003 (ARMV4)"
+ Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -386,7 +394,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -413,12 +421,11 @@
/>
</Configuration>
<Configuration
- Name="Debug-Static|Win32"
+ Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-common-defaults.vsprops"
- UseOfMFC="0"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -437,6 +444,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -452,7 +460,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -464,18 +472,27 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCFxCopTool"
+ Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
</Configuration>
<Configuration
- Name="Debug-Static|Pocket PC 2003 (ARMV4)"
+ Name="Release|Win32"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-release-defaults.vsprops"
+ UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
@@ -494,7 +511,6 @@
/>
<Tool
Name="VCCLCompilerTool"
- ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -510,7 +526,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -522,24 +538,16 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCCodeSignTool"
+ Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
</Configuration>
<Configuration
- Name="Debug-Static|Smartphone 2003 (ARMV4)"
+ Name="Release|Pocket PC 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -576,7 +584,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -603,12 +611,11 @@
/>
</Configuration>
<Configuration
- Name="Release-Dynamic|Win32"
+ Name="Release|Smartphone 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-release-defaults.vsprops"
- UseOfMFC="0"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -627,6 +634,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -642,7 +650,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -654,16 +662,24 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCFxCopTool"
+ Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
</Configuration>
<Configuration
- Name="Release-Dynamic|Pocket PC 2003 (ARMV4)"
+ Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -700,7 +716,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -727,9 +743,9 @@
/>
</Configuration>
<Configuration
- Name="Release-Dynamic|Smartphone 2003 (ARMV4)"
+ Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -766,7 +782,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -793,12 +809,11 @@
/>
</Configuration>
<Configuration
- Name="Debug-Dynamic|Win32"
+ Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-common-defaults.vsprops"
- UseOfMFC="0"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -817,6 +832,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -832,7 +848,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -844,16 +860,24 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCFxCopTool"
+ Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
</Configuration>
<Configuration
- Name="Debug-Dynamic|Pocket PC 2003 (ARMV4)"
+ Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -890,7 +914,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -917,11 +941,12 @@
/>
</Configuration>
<Configuration
- Name="Debug-Dynamic|Smartphone 2003 (ARMV4)"
+ Name="Debug-Static|Win32"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-common-defaults.vsprops"
+ UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
@@ -940,7 +965,6 @@
/>
<Tool
Name="VCCLCompilerTool"
- ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -956,7 +980,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -968,27 +992,18 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCCodeSignTool"
+ Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
</Configuration>
<Configuration
- Name="Release-Static|Win32"
+ Name="Debug-Static|Pocket PC 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-release-defaults.vsprops"
- UseOfMFC="0"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -1007,6 +1022,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -1022,7 +1038,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1034,16 +1050,24 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCFxCopTool"
+ Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
</Configuration>
<Configuration
- Name="Release-Static|Pocket PC 2003 (ARMV4)"
+ Name="Debug-Static|Smartphone 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1080,7 +1104,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1107,9 +1131,9 @@
/>
</Configuration>
<Configuration
- Name="Release-Static|Smartphone 2003 (ARMV4)"
+ Name="Debug-Static|Windows Mobile 6 Standard SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1146,7 +1170,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1173,7 +1197,7 @@
/>
</Configuration>
<Configuration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
+ Name="Debug-Static|Windows Mobile 6 Professional SDK (ARMV4I)"
ConfigurationType="4"
InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
@@ -1212,7 +1236,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1239,9 +1263,9 @@
/>
</Configuration>
<Configuration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
+ Name="Debug-Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1278,7 +1302,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1305,7 +1329,7 @@
/>
</Configuration>
<Configuration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ Name="Debug-Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
ConfigurationType="4"
InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
@@ -1344,7 +1368,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1371,11 +1395,12 @@
/>
</Configuration>
<Configuration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+ Name="Release-Dynamic|Win32"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-release-defaults.vsprops"
+ UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
@@ -1394,7 +1419,6 @@
/>
<Tool
Name="VCCLCompilerTool"
- ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -1410,7 +1434,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1422,24 +1446,16 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCCodeSignTool"
+ Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
</Configuration>
<Configuration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
+ Name="Release-Dynamic|Pocket PC 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1476,7 +1492,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1503,9 +1519,9 @@
/>
</Configuration>
<Configuration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
+ Name="Release-Dynamic|Smartphone 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1542,7 +1558,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1569,9 +1585,9 @@
/>
</Configuration>
<Configuration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ Name="Release-Dynamic|Windows Mobile 6 Standard SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1608,7 +1624,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1635,9 +1651,9 @@
/>
</Configuration>
<Configuration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+ Name="Release-Dynamic|Windows Mobile 6 Professional SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1674,7 +1690,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1701,9 +1717,9 @@
/>
</Configuration>
<Configuration
- Name="Debug-Static|Windows Mobile 6 Standard SDK (ARMV4I)"
+ Name="Release-Dynamic|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1740,7 +1756,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1767,9 +1783,9 @@
/>
</Configuration>
<Configuration
- Name="Debug-Static|Windows Mobile 6 Professional SDK (ARMV4I)"
+ Name="Release-Dynamic|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1806,7 +1822,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1833,11 +1849,12 @@
/>
</Configuration>
<Configuration
- Name="Debug-Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ Name="Debug-Dynamic|Win32"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-common-defaults.vsprops"
+ UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
@@ -1856,7 +1873,6 @@
/>
<Tool
Name="VCCLCompilerTool"
- ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -1872,7 +1888,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1884,24 +1900,16 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCCodeSignTool"
+ Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
</Configuration>
<Configuration
- Name="Debug-Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+ Name="Debug-Dynamic|Pocket PC 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -1938,7 +1946,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -1965,9 +1973,9 @@
/>
</Configuration>
<Configuration
- Name="Release-Dynamic|Windows Mobile 6 Standard SDK (ARMV4I)"
+ Name="Debug-Dynamic|Smartphone 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2004,7 +2012,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2031,9 +2039,9 @@
/>
</Configuration>
<Configuration
- Name="Release-Dynamic|Windows Mobile 6 Professional SDK (ARMV4I)"
+ Name="Debug-Dynamic|Windows Mobile 6 Standard SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2070,7 +2078,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2097,9 +2105,9 @@
/>
</Configuration>
<Configuration
- Name="Release-Dynamic|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ Name="Debug-Dynamic|Windows Mobile 6 Professional SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2136,7 +2144,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2163,9 +2171,9 @@
/>
</Configuration>
<Configuration
- Name="Release-Dynamic|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+ Name="Debug-Dynamic|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-release-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2202,7 +2210,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2229,9 +2237,9 @@
/>
</Configuration>
<Configuration
- Name="Debug-Dynamic|Windows Mobile 6 Standard SDK (ARMV4I)"
+ Name="Debug-Dynamic|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2268,7 +2276,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6std-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2295,11 +2303,12 @@
/>
</Configuration>
<Configuration
- Name="Debug-Dynamic|Windows Mobile 6 Professional SDK (ARMV4I)"
+ Name="Release-Static|Win32"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm6-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-win32-release-defaults.vsprops"
+ UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
@@ -2318,7 +2327,6 @@
/>
<Tool
Name="VCCLCompilerTool"
- ExecutionBucket="7"
AdditionalIncludeDirectories="../include;../../pjlib/include;../../third_party/speex/include;../../third_party"
PreprocessorDefinitions="_LIB;"
PrecompiledHeaderFile=""
@@ -2334,7 +2342,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm6pro-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2346,24 +2354,16 @@
Name="VCBscMakeTool"
/>
<Tool
- Name="VCCodeSignTool"
+ Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
</Configuration>
<Configuration
- Name="Debug-Dynamic|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ Name="Release-Static|Pocket PC 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2400,7 +2400,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5ppc-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003ppc-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2427,9 +2427,9 @@
/>
</Configuration>
<Configuration
- Name="Debug-Dynamic|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+ Name="Release-Static|Smartphone 2003 (ARMV4)"
ConfigurationType="4"
- InheritedPropertySheets="..\..\build\vs\pjproject-vs8-debug-dynamic-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm5-common-defaults.vsprops"
+ InheritedPropertySheets="..\..\build\vs\pjproject-vs8-release-static-defaults.vsprops;..\..\build\vs\pjproject-vs8-wm2003-release-defaults.vsprops"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
@@ -2466,7 +2466,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm5sp-vc$(VSVer)-$(ConfigurationName).lib"
+ OutputFile="..\lib\pjmedia-codec-$(TargetCPU)-wm2003sp-vc$(VSVer)-$(ConfigurationName).lib"
/>
<Tool
Name="VCALinkTool"
@@ -2983,6 +2983,10 @@
>
</File>
<File
+ RelativePath="..\src\pjmedia-codec\silk.c"
+ >
+ </File>
+ <File
RelativePath="..\src\pjmedia-codec\speex_codec.c"
>
<FileConfiguration
@@ -3134,6 +3138,10 @@
>
</File>
<File
+ RelativePath="..\include\pjmedia-codec\silk.h"
+ >
+ </File>
+ <File
RelativePath="..\include\pjmedia-codec\speex.h"
>
</File>
diff --git a/pjmedia/include/pjmedia-codec.h b/pjmedia/include/pjmedia-codec.h
index 48f7c8db..26389f8b 100644
--- a/pjmedia/include/pjmedia-codec.h
+++ b/pjmedia/include/pjmedia-codec.h
@@ -34,8 +34,9 @@
#include <pjmedia-codec/g722.h>
#include <pjmedia-codec/g7221.h>
#include <pjmedia-codec/ipp_codecs.h>
-#include <pjmedia-codec/passthrough.h>
#include <pjmedia-codec/opencore_amrnb.h>
+#include <pjmedia-codec/passthrough.h>
+#include <pjmedia-codec/silk.h>
#endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */
diff --git a/pjmedia/include/pjmedia-codec/config.h b/pjmedia/include/pjmedia-codec/config.h
index 99b1d910..a6aa2d66 100644
--- a/pjmedia/include/pjmedia-codec/config.h
+++ b/pjmedia/include/pjmedia-codec/config.h
@@ -378,6 +378,38 @@
/**
+ * Enable SILK codec.
+ *
+ * Default: 0
+ */
+#ifndef PJMEDIA_HAS_SILK_CODEC
+# define PJMEDIA_HAS_SILK_CODEC 0
+#endif
+
+
+/**
+ * SILK codec default complexity setting, valid values are 0 (lowest), 1,
+ * and 2.
+ *
+ * Default: 2
+ */
+#ifndef PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY
+# define PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY 2
+#endif
+
+/**
+ * SILK codec default quality setting, valid values are ranging from
+ * 0 (lowest) to 10. Please note that pjsua-lib may override this setting
+ * via its codec quality setting (i.e PJSUA_DEFAULT_CODEC_QUALITY).
+ *
+ * Default: 10
+ */
+#ifndef PJMEDIA_CODEC_SILK_DEFAULT_QUALITY
+# define PJMEDIA_CODEC_SILK_DEFAULT_QUALITY 10
+#endif
+
+
+/**
* Specify if FFMPEG codecs are available.
*
* Default: PJMEDIA_HAS_LIBAVCODEC
diff --git a/pjmedia/include/pjmedia-codec/silk.h b/pjmedia/include/pjmedia-codec/silk.h
new file mode 100644
index 00000000..ebb364e9
--- /dev/null
+++ b/pjmedia/include/pjmedia-codec/silk.h
@@ -0,0 +1,133 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2012-2012 Teluu Inc. (http://www.teluu.com)
+ * Contributed by Regis Montoya (aka r3gis - www.r3gis.fr)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJMEDIA_CODEC_SILK_H__
+#define __PJMEDIA_CODEC_SILK_H__
+
+/**
+ * @file silk.h
+ * @brief SILK codec.
+ */
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_SILK SILK Codec Family
+ * @ingroup PJMEDIA_CODEC_CODECS
+ * @brief Implementation of SILK codecs (narrow/medium/wide/superwide-band).
+ * @{
+ *
+ * This section describes functions to initialize and register SILK codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * The SILK codec uses multiple bit rates, and supports super wideband
+ * (24 kHz sampling rate), wideband (16 kHz sampling rate), medium (12kHz
+ * sampling rate), and narrowband (telephone quality, 8 kHz sampling rate).
+ *
+ * By default, the SILK codec factory registers two SILK codecs:
+ * "SILK/8000" narrowband codec and "SILK/16000" wideband codec. This behavior
+ * can be changed by specifying #pjmedia_codec_silk_options flags during
+ * initialization.
+ *
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * The following settings are applicable for this codec.
+ *
+ * \subsubsection quality_vs_complexity Quality vs Complexity
+ *
+ * The SILK codec quality versus computational complexity and bandwidth
+ * requirement can be adjusted by modifying the quality and complexity
+ * setting, by calling #pjmedia_codec_silk_set_config().
+ *
+ * The default setting of quality is specified in
+ * #PJMEDIA_CODEC_SILK_DEFAULT_QUALITY. And the default setting of
+ * complexity is specified in #PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY.
+ */
+
+PJ_BEGIN_DECL
+
+typedef struct pjmedia_codec_silk_setting
+{
+ pj_bool_t enabled; /**< Enable/disable. */
+ int quality; /**< Encoding quality, or use -1 for default
+ (@see PJMEDIA_CODEC_SILK_DEFAULT_QUALITY). */
+ int complexity; /**< Encoding complexity, or use -1 for default
+ (@see PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY)*/
+} pjmedia_codec_silk_setting;
+
+
+/**
+ * Initialize and register SILK codec factory to pjmedia endpoint. By default,
+ * only narrowband (8kHz sampling rate) and wideband (16kHz sampling rate)
+ * will be enabled. Quality and complexity for those sampling rate modes
+ * will be set to the default values (see #PJMEDIA_CODEC_SILK_DEFAULT_QUALITY
+ * and #PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY), application may modify these
+ * settings via #pjmedia_codec_silk_set_config().
+ *
+ * @param endpt The pjmedia endpoint.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_silk_init(pjmedia_endpt *endpt);
+
+
+/**
+ * Change the configuration setting of the SILK codec for the specified
+ * clock rate.
+ *
+ * @param clock_rate PCM sampling rate, in Hz, valid values are 8000,
+ * 12000, 16000 and 24000.
+ * @param opt The setting to be applied for the specified
+ * clock rate.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_silk_set_config(
+ unsigned clock_rate,
+ const pjmedia_codec_silk_setting *opt);
+
+
+/**
+ * Unregister SILK codec factory from pjmedia endpoint and deinitialize
+ * the SILK codec library.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_silk_deinit(void);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif /* __PJMEDIA_CODEC_SILK_H__ */
+
diff --git a/pjmedia/include/pjmedia-codec/types.h b/pjmedia/include/pjmedia-codec/types.h
index 752a1fcb..d0549f5e 100644
--- a/pjmedia/include/pjmedia-codec/types.h
+++ b/pjmedia/include/pjmedia-codec/types.h
@@ -63,18 +63,10 @@ enum pjmedia_audio_pt
PJMEDIA_RTP_PT_SPEEX_NB, /**< Speex narrowband/8KHz */
PJMEDIA_RTP_PT_SPEEX_WB, /**< Speex wideband/16KHz */
PJMEDIA_RTP_PT_SPEEX_UWB, /**< Speex 32KHz */
- PJMEDIA_RTP_PT_L16_8KHZ_MONO, /**< L16 @ 8KHz, mono */
- PJMEDIA_RTP_PT_L16_8KHZ_STEREO, /**< L16 @ 8KHz, stereo */
- //PJMEDIA_RTP_PT_L16_11KHZ_MONO, /**< L16 @ 11KHz, mono */
- //PJMEDIA_RTP_PT_L16_11KHZ_STEREO, /**< L16 @ 11KHz, stereo */
- PJMEDIA_RTP_PT_L16_16KHZ_MONO, /**< L16 @ 16KHz, mono */
- PJMEDIA_RTP_PT_L16_16KHZ_STEREO, /**< L16 @ 16KHz, stereo */
- //PJMEDIA_RTP_PT_L16_22KHZ_MONO, /**< L16 @ 22KHz, mono */
- //PJMEDIA_RTP_PT_L16_22KHZ_STEREO, /**< L16 @ 22KHz, stereo */
- //PJMEDIA_RTP_PT_L16_32KHZ_MONO, /**< L16 @ 32KHz, mono */
- //PJMEDIA_RTP_PT_L16_32KHZ_STEREO, /**< L16 @ 32KHz, stereo */
- //PJMEDIA_RTP_PT_L16_48KHZ_MONO, /**< L16 @ 48KHz, mono */
- //PJMEDIA_RTP_PT_L16_48KHZ_STEREO, /**< L16 @ 48KHz, stereo */
+ PJMEDIA_RTP_PT_SILK_NB, /**< SILK narrowband/8KHz */
+ PJMEDIA_RTP_PT_SILK_MB, /**< SILK mediumband/12KHz */
+ PJMEDIA_RTP_PT_SILK_WB, /**< SILK wideband/16KHz */
+ PJMEDIA_RTP_PT_SILK_SWB, /**< SILK 24KHz */
PJMEDIA_RTP_PT_ILBC, /**< iLBC (13.3/15.2Kbps) */
PJMEDIA_RTP_PT_AMR, /**< AMR (4.75 - 12.2Kbps) */
PJMEDIA_RTP_PT_AMRWB, /**< AMRWB (6.6 - 23.85Kbps)*/
@@ -91,6 +83,18 @@ enum pjmedia_audio_pt
PJMEDIA_RTP_PT_G7221C_48, /**< G722.1 Annex C (48Kbps)*/
PJMEDIA_RTP_PT_G7221_RSV1, /**< G722.1 reserve */
PJMEDIA_RTP_PT_G7221_RSV2, /**< G722.1 reserve */
+ PJMEDIA_RTP_PT_L16_8KHZ_MONO, /**< L16 @ 8KHz, mono */
+ PJMEDIA_RTP_PT_L16_8KHZ_STEREO, /**< L16 @ 8KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_11KHZ_MONO, /**< L16 @ 11KHz, mono */
+ //PJMEDIA_RTP_PT_L16_11KHZ_STEREO, /**< L16 @ 11KHz, stereo */
+ PJMEDIA_RTP_PT_L16_16KHZ_MONO, /**< L16 @ 16KHz, mono */
+ PJMEDIA_RTP_PT_L16_16KHZ_STEREO, /**< L16 @ 16KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_22KHZ_MONO, /**< L16 @ 22KHz, mono */
+ //PJMEDIA_RTP_PT_L16_22KHZ_STEREO, /**< L16 @ 22KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_32KHZ_MONO, /**< L16 @ 32KHz, mono */
+ //PJMEDIA_RTP_PT_L16_32KHZ_STEREO, /**< L16 @ 32KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_48KHZ_MONO, /**< L16 @ 48KHz, mono */
+ //PJMEDIA_RTP_PT_L16_48KHZ_STEREO, /**< L16 @ 48KHz, stereo */
/* Caution!
* Ensure the value of the last pt above is <= 127.
diff --git a/pjmedia/src/pjmedia-codec/audio_codecs.c b/pjmedia/src/pjmedia-codec/audio_codecs.c
index 1fbd038a..f338db80 100644
--- a/pjmedia/src/pjmedia-codec/audio_codecs.c
+++ b/pjmedia/src/pjmedia-codec/audio_codecs.c
@@ -114,6 +114,13 @@ pjmedia_codec_register_audio_codecs(pjmedia_endpt *endpt,
return status;
#endif
+#if PJMEDIA_HAS_SILK_CODEC
+ /* Register SILK */
+ status = pjmedia_codec_silk_init(endpt);
+ if (status != PJ_SUCCESS)
+ return status;
+#endif
+
return PJ_SUCCESS;
}
diff --git a/pjmedia/src/pjmedia-codec/silk.c b/pjmedia/src/pjmedia-codec/silk.c
new file mode 100644
index 00000000..7b72bd5c
--- /dev/null
+++ b/pjmedia/src/pjmedia-codec/silk.c
@@ -0,0 +1,805 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2012-2012 Teluu Inc. (http://www.teluu.com)
+ * Contributed by Regis Montoya (aka r3gis - www.r3gis.fr)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <pjmedia-codec/silk.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/port.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+
+#if defined(PJMEDIA_HAS_SILK_CODEC) && (PJMEDIA_HAS_SILK_CODEC!=0)
+
+#include "SKP_Silk_SDK_API.h"
+
+#define THIS_FILE "silk.c"
+
+#define FRAME_LENGTH_MS 20
+#define CALC_BITRATE(max_br) \
+ (PJMEDIA_CODEC_SILK_DEFAULT_QUALITY * max_br / 10)
+
+
+/* Prototypes for SILK factory */
+static pj_status_t silk_test_alloc( pjmedia_codec_factory *factory,
+ const pjmedia_codec_info *id );
+static pj_status_t silk_default_attr( pjmedia_codec_factory *factory,
+ const pjmedia_codec_info *id,
+ pjmedia_codec_param *attr );
+static pj_status_t silk_enum_codecs ( pjmedia_codec_factory *factory,
+ unsigned *count,
+ pjmedia_codec_info codecs[]);
+static pj_status_t silk_alloc_codec( pjmedia_codec_factory *factory,
+ const pjmedia_codec_info *id,
+ pjmedia_codec **p_codec);
+static pj_status_t silk_dealloc_codec( pjmedia_codec_factory *factory,
+ pjmedia_codec *codec );
+
+/* Prototypes for SILK implementation. */
+static pj_status_t silk_codec_init( pjmedia_codec *codec,
+ pj_pool_t *pool );
+static pj_status_t silk_codec_open( pjmedia_codec *codec,
+ pjmedia_codec_param *attr );
+static pj_status_t silk_codec_close( pjmedia_codec *codec );
+static pj_status_t silk_codec_modify( pjmedia_codec *codec,
+ const pjmedia_codec_param *attr );
+static pj_status_t silk_codec_parse( pjmedia_codec *codec,
+ void *pkt,
+ pj_size_t pkt_size,
+ const pj_timestamp *timestamp,
+ unsigned *frame_cnt,
+ pjmedia_frame frames[]);
+static pj_status_t silk_codec_encode( pjmedia_codec *codec,
+ const struct pjmedia_frame *input,
+ unsigned output_buf_len,
+ struct pjmedia_frame *output);
+static pj_status_t silk_codec_decode( pjmedia_codec *codec,
+ const struct pjmedia_frame *input,
+ unsigned output_buf_len,
+ struct pjmedia_frame *output);
+static pj_status_t silk_codec_recover( pjmedia_codec *codec,
+ unsigned output_buf_len,
+ struct pjmedia_frame *output);
+
+
+typedef enum
+{
+ PARAM_NB, /* Index for narrowband parameter. */
+ PARAM_MB, /* Index for medium parameter. */
+ PARAM_WB, /* Index for wideband parameter. */
+ PARAM_SWB, /* Index for super-wideband parameter */
+} silk_mode;
+
+
+/* Silk default parameter */
+typedef struct silk_param
+{
+ int enabled; /* Is this mode enabled? */
+ int pt; /* Payload type. */
+ unsigned clock_rate; /* Default sampling rate to be used. */
+ pj_uint16_t ptime; /* packet length (in ms). */
+ pj_uint32_t bitrate; /* Bit rate for current mode. */
+ pj_uint32_t max_bitrate; /* Max bit rate for current mode. */
+ int complexity; /* Complexity mode: 0/lowest to 2. */
+} silk_param;
+
+
+/* Definition for SILK codec operations. */
+static pjmedia_codec_op silk_op =
+{
+ &silk_codec_init,
+ &silk_codec_open,
+ &silk_codec_close,
+ &silk_codec_modify,
+ &silk_codec_parse,
+ &silk_codec_encode,
+ &silk_codec_decode,
+ &silk_codec_recover
+};
+
+/* Definition for SILK codec factory operations. */
+static pjmedia_codec_factory_op silk_factory_op =
+{
+ &silk_test_alloc,
+ &silk_default_attr,
+ &silk_enum_codecs,
+ &silk_alloc_codec,
+ &silk_dealloc_codec,
+ &pjmedia_codec_silk_deinit
+};
+
+
+/* SILK factory private data */
+static struct silk_factory
+{
+ pjmedia_codec_factory base;
+ pjmedia_endpt *endpt;
+ pj_pool_t *pool;
+ pj_mutex_t *mutex;
+ struct silk_param silk_param[4];
+} silk_factory;
+
+
+/* SILK codec private data. */
+typedef struct silk_private
+{
+ silk_mode mode; /**< Silk mode. */
+ pj_pool_t *pool; /**< Pool for each instance. */
+ unsigned samples_per_frame;
+
+ pj_bool_t enc_ready;
+ SKP_SILK_SDK_EncControlStruct enc_ctl;
+ void *enc_st;
+
+ pj_bool_t dec_ready;
+ SKP_SILK_SDK_DecControlStruct dec_ctl;
+ void *dec_st;
+} silk_private;
+
+
+silk_mode silk_get_mode_from_clock_rate(unsigned clock_rate) {
+ if (clock_rate <= silk_factory.silk_param[PARAM_NB].clock_rate) {
+ return PARAM_NB;
+ } else if (clock_rate <= silk_factory.silk_param[PARAM_MB].clock_rate) {
+ return PARAM_MB;
+ } else if (clock_rate <= silk_factory.silk_param[PARAM_WB].clock_rate) {
+ return PARAM_WB;
+ }
+ return PARAM_SWB;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_codec_silk_init(pjmedia_endpt *endpt)
+{
+ pjmedia_codec_mgr *codec_mgr;
+ silk_param *sp;
+ pj_status_t status;
+
+ if (silk_factory.endpt != NULL) {
+ /* Already initialized. */
+ return PJ_SUCCESS;
+ }
+
+ /* Init factory */
+ pj_bzero(&silk_factory, sizeof(silk_factory));
+ silk_factory.base.op = &silk_factory_op;
+ silk_factory.base.factory_data = NULL;
+ silk_factory.endpt = endpt;
+
+ /* Create pool */
+ silk_factory.pool = pjmedia_endpt_create_pool(endpt, "silk", 4000, 4000);
+ if (!silk_factory.pool)
+ return PJ_ENOMEM;
+
+ /* Create mutex. */
+ status = pj_mutex_create_simple(silk_factory.pool, "silk",
+ &silk_factory.mutex);
+ if (status != PJ_SUCCESS)
+ goto on_error;
+
+ /* Initialize default codec params */
+
+ /* From SILK docs:
+ - SILK bitrate tables:
+ +----------------+---------+-----------+
+ | | fs (Hz) | BR (kbps) |
+ +----------------+---------+-----------+
+ | Narrowband | 8000 | 6 - 20 |
+ | Mediumband | 12000 | 7 - 25 |
+ | Wideband | 16000 | 8 - 30 |
+ | Super Wideband | 24000 | 12 - 40 |
+ +----------------+---------+-----------+
+ - The upper limits of the bit rate ranges in this table are
+ recommended values.
+ */
+
+ sp = &silk_factory.silk_param[PARAM_NB];
+ sp->pt = PJMEDIA_RTP_PT_SILK_NB;
+ sp->clock_rate = 8000;
+ sp->max_bitrate = 20000;
+ sp->bitrate = CALC_BITRATE(sp->max_bitrate);
+ sp->ptime = FRAME_LENGTH_MS;
+ sp->complexity = PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY;
+ sp->enabled = 1;
+
+ sp = &silk_factory.silk_param[PARAM_MB];
+ sp->pt = PJMEDIA_RTP_PT_SILK_MB;
+ sp->clock_rate = 12000;
+ sp->max_bitrate = 25000;
+ sp->bitrate = CALC_BITRATE(sp->max_bitrate);
+ sp->ptime = FRAME_LENGTH_MS;
+ sp->complexity = PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY;
+ sp->enabled = 0;
+
+ sp = &silk_factory.silk_param[PARAM_WB];
+ sp->pt = PJMEDIA_RTP_PT_SILK_WB;
+ sp->clock_rate = 16000;
+ sp->max_bitrate = 30000;
+ sp->bitrate = CALC_BITRATE(sp->max_bitrate);
+ sp->ptime = FRAME_LENGTH_MS;
+ sp->complexity = PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY;
+ sp->enabled = 1;
+
+ sp = &silk_factory.silk_param[PARAM_SWB];
+ sp->pt = PJMEDIA_RTP_PT_SILK_SWB;
+ sp->clock_rate = 24000;
+ sp->max_bitrate = 40000;
+ sp->bitrate = CALC_BITRATE(sp->max_bitrate);
+ sp->ptime = FRAME_LENGTH_MS;
+ sp->complexity = PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY;
+ sp->enabled = 0;
+
+
+ /* Get the codec manager. */
+ codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+ if (!codec_mgr) {
+ return PJ_EINVALIDOP;
+ }
+
+ /* Register codec factory to endpoint. */
+ status = pjmedia_codec_mgr_register_factory(codec_mgr,
+ &silk_factory.base);
+ if (status != PJ_SUCCESS)
+ return status;
+
+ PJ_LOG(4,(THIS_FILE, "SILK codec version %s initialized",
+ SKP_Silk_SDK_get_version()));
+ return PJ_SUCCESS;
+
+on_error:
+ if (silk_factory.mutex) {
+ pj_mutex_destroy(silk_factory.mutex);
+ silk_factory.mutex = NULL;
+ }
+ if (silk_factory.pool) {
+ pj_pool_release(silk_factory.pool);
+ silk_factory.pool = NULL;
+ }
+
+ return status;
+}
+
+
+/*
+ * Change the configuration setting of the SILK codec for the specified
+ * clock rate.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_silk_set_config(
+ unsigned clock_rate,
+ const pjmedia_codec_silk_setting *opt)
+{
+ PJ_UNUSED_ARG(clock_rate);
+ PJ_UNUSED_ARG(opt);
+ return PJ_ENOTSUP;
+}
+
+
+/*
+ * Unregister SILK codec factory from pjmedia endpoint and deinitialize
+ * the SILK codec library.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_silk_deinit(void)
+{
+ pjmedia_codec_mgr *codec_mgr;
+ pj_status_t status;
+
+ if (silk_factory.endpt == NULL) {
+ /* Not registered. */
+ return PJ_SUCCESS;
+ }
+
+ /* Lock mutex. */
+ pj_mutex_lock(silk_factory.mutex);
+
+ /* Get the codec manager. */
+ codec_mgr = pjmedia_endpt_get_codec_mgr(silk_factory.endpt);
+ if (!codec_mgr) {
+ silk_factory.endpt = NULL;
+ pj_mutex_unlock(silk_factory.mutex);
+ return PJ_EINVALIDOP;
+ }
+
+ /* Unregister silk codec factory. */
+ status = pjmedia_codec_mgr_unregister_factory(codec_mgr,
+ &silk_factory.base);
+ silk_factory.endpt = NULL;
+
+ /* Destroy mutex. */
+ pj_mutex_destroy(silk_factory.mutex);
+ silk_factory.mutex = NULL;
+
+
+ /* Release pool. */
+ pj_pool_release(silk_factory.pool);
+ silk_factory.pool = NULL;
+
+ return status;
+}
+
+
+/*
+ * Check if factory can allocate the specified codec.
+ */
+static pj_status_t silk_test_alloc(pjmedia_codec_factory *factory,
+ const pjmedia_codec_info *info )
+{
+ const pj_str_t silk_tag = {"SILK", 4};
+ unsigned i;
+
+ PJ_UNUSED_ARG(factory);
+ PJ_ASSERT_RETURN(factory==&silk_factory.base, PJ_EINVAL);
+
+ /* Type MUST be audio. */
+ if (info->type != PJMEDIA_TYPE_AUDIO)
+ return PJMEDIA_CODEC_EUNSUP;
+
+ /* Check encoding name. */
+ if (pj_stricmp(&info->encoding_name, &silk_tag) != 0)
+ return PJMEDIA_CODEC_EUNSUP;
+
+ /* Channel count must be one */
+ if (info->channel_cnt != 1)
+ return PJMEDIA_CODEC_EUNSUP;
+
+ /* Check clock-rate */
+ for (i=0; i<PJ_ARRAY_SIZE(silk_factory.silk_param); ++i) {
+ silk_param *sp = &silk_factory.silk_param[i];
+ if (sp->enabled && info->clock_rate == sp->clock_rate)
+ {
+ return PJ_SUCCESS;
+ }
+ }
+ /* Clock rate not supported */
+ return PJMEDIA_CODEC_EUNSUP;
+}
+
+
+/*
+ * Generate default attribute.
+ */
+static pj_status_t silk_default_attr( pjmedia_codec_factory *factory,
+ const pjmedia_codec_info *id,
+ pjmedia_codec_param *attr )
+{
+ silk_param *sp;
+ int i;
+
+ PJ_ASSERT_RETURN(factory==&silk_factory.base, PJ_EINVAL);
+
+ i = silk_get_mode_from_clock_rate(id->clock_rate);
+ pj_assert(i >= PARAM_NB && i <= PARAM_SWB);
+
+ sp = &silk_factory.silk_param[i];
+
+ pj_bzero(attr, sizeof(pjmedia_codec_param));
+ attr->info.channel_cnt = 1;
+ attr->info.clock_rate = sp->clock_rate;
+ attr->info.avg_bps = sp->bitrate;
+ attr->info.max_bps = sp->max_bitrate;
+ attr->info.frm_ptime = sp->ptime;
+ attr->info.pcm_bits_per_sample = 16;
+ attr->info.pt = (pj_uint8_t) sp->pt;
+ attr->setting.frm_per_pkt = 1;
+ attr->setting.vad = 0; /* DTX is not recommended for quality reason */
+ attr->setting.plc = 1;
+
+ i = 0;
+ attr->setting.dec_fmtp.param[i++].name = pj_str("useinbandfec");
+ attr->setting.dec_fmtp.param[i++].val = pj_str("0");
+ /*
+ attr->setting.dec_fmtp.param[i++].name = pj_str("maxaveragebitrate");
+ attr->setting.dec_fmtp.param[i++].val = pj_str(mode->bitrate_str);
+ */
+ attr->setting.dec_fmtp.cnt = (pj_uint8_t)i;
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Enum codecs supported by this factory.
+ */
+static pj_status_t silk_enum_codecs(pjmedia_codec_factory *factory,
+ unsigned *count,
+ pjmedia_codec_info codecs[])
+{
+ unsigned max;
+ int i;
+
+ PJ_ASSERT_RETURN(factory==&silk_factory.base, PJ_EINVAL);
+ PJ_ASSERT_RETURN(codecs && *count > 0, PJ_EINVAL);
+
+ max = *count;
+ *count = 0;
+
+ for (i = 0; i<PJ_ARRAY_SIZE(silk_factory.silk_param) && *count<max; ++i)
+ {
+ silk_param *sp = &silk_factory.silk_param[i];
+
+ if (!sp->enabled)
+ continue;
+
+ pj_bzero(&codecs[*count], sizeof(pjmedia_codec_info));
+ codecs[*count].encoding_name = pj_str("SILK");
+ codecs[*count].pt = sp->pt;
+ codecs[*count].type = PJMEDIA_TYPE_AUDIO;
+ codecs[*count].clock_rate = sp->clock_rate;
+ codecs[*count].channel_cnt = 1;
+
+ ++*count;
+ }
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Allocate a new SILK codec instance.
+ */
+static pj_status_t silk_alloc_codec(pjmedia_codec_factory *factory,
+ const pjmedia_codec_info *id,
+ pjmedia_codec **p_codec)
+{
+ pj_pool_t *pool;
+ pjmedia_codec *codec;
+ silk_private *silk;
+
+ PJ_ASSERT_RETURN(factory && id && p_codec, PJ_EINVAL);
+ PJ_ASSERT_RETURN(factory == &silk_factory.base, PJ_EINVAL);
+
+ /* Create pool for codec instance */
+ pool = pjmedia_endpt_create_pool(silk_factory.endpt, "silk", 512, 512);
+
+ /* Allocate codec */
+ codec = PJ_POOL_ZALLOC_T(pool, pjmedia_codec);
+ codec->op = &silk_op;
+ codec->factory = factory;
+ codec->codec_data = PJ_POOL_ZALLOC_T(pool, silk_private);
+ silk = (silk_private*) codec->codec_data;
+ silk->pool = pool;
+ silk->enc_ready = PJ_FALSE;
+ silk->dec_ready = PJ_FALSE;
+ silk->mode = silk_get_mode_from_clock_rate(id->clock_rate);
+
+ *p_codec = codec;
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Free codec.
+ */
+static pj_status_t silk_dealloc_codec( pjmedia_codec_factory *factory,
+ pjmedia_codec *codec )
+{
+ silk_private *silk;
+
+ PJ_ASSERT_RETURN(factory && codec, PJ_EINVAL);
+ PJ_ASSERT_RETURN(factory == &silk_factory.base, PJ_EINVAL);
+
+ silk = (silk_private*)codec->codec_data;
+
+ /* Close codec, if it's not closed. */
+ if (silk->enc_ready == PJ_TRUE || silk->dec_ready == PJ_TRUE) {
+ silk_codec_close(codec);
+ }
+
+ pj_pool_release(silk->pool);
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Init codec.
+ */
+static pj_status_t silk_codec_init(pjmedia_codec *codec,
+ pj_pool_t *pool )
+{
+ PJ_UNUSED_ARG(codec);
+ PJ_UNUSED_ARG(pool);
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Open codec.
+ */
+static pj_status_t silk_codec_open(pjmedia_codec *codec,
+ pjmedia_codec_param *attr )
+{
+
+ silk_private *silk;
+ silk_param *sp;
+ SKP_int st_size, err;
+ pj_bool_t enc_use_fec;
+ unsigned enc_bitrate, i;
+
+ PJ_ASSERT_RETURN(codec && attr, PJ_EINVAL);
+
+ silk = (silk_private*)codec->codec_data;
+ sp = &silk_factory.silk_param[silk->mode];
+
+ /* Already opened? */
+ if (silk->enc_ready || silk->dec_ready)
+ return PJ_SUCCESS;
+
+ /* Allocate and initialize encoder */
+ err = SKP_Silk_SDK_Get_Encoder_Size(&st_size);
+ if (err) {
+ PJ_LOG(3,(THIS_FILE, "Failed to get encoder state size (err=%d)",
+ err));
+ return PJMEDIA_CODEC_EFAILED;
+ }
+ silk->enc_st = pj_pool_zalloc(silk->pool, st_size);
+ err = SKP_Silk_SDK_InitEncoder(silk->enc_st, &silk->enc_ctl);
+ if (err) {
+ PJ_LOG(3,(THIS_FILE, "Failed to init encoder (err=%d)", err));
+ return PJMEDIA_CODEC_EFAILED;
+ }
+
+ /* Check fmtp params */
+ enc_use_fec = PJ_FALSE;
+ enc_bitrate = sp->bitrate;
+ for (i = 0; i < attr->setting.enc_fmtp.cnt; ++i) {
+ pjmedia_codec_fmtp *fmtp = &attr->setting.enc_fmtp;
+ const pj_str_t STR_USEINBANDFEC = {"useinbandfec", 12};
+ const pj_str_t STR_MAXAVERAGEBITRATE = {"maxaveragebitrate", 17};
+
+ if (!pj_stricmp(&fmtp->param[i].name, &STR_USEINBANDFEC)) {
+ enc_use_fec = pj_strtoul(&fmtp->param[i].val) != 0;
+ } else if (!pj_stricmp(&fmtp->param[i].name, &STR_MAXAVERAGEBITRATE)) {
+ enc_bitrate = pj_strtoul(&fmtp->param[i].val);
+ if (enc_bitrate > sp->max_bitrate) {
+ enc_bitrate = sp->max_bitrate;
+ }
+ }
+ }
+
+ /* Setup encoder control for encoding process */
+ silk->enc_ready = PJ_TRUE;
+ silk->samples_per_frame = attr->setting.frm_per_pkt * FRAME_LENGTH_MS *
+ attr->info.clock_rate / 1000;
+
+ silk->enc_ctl.API_sampleRate = attr->info.clock_rate;
+ silk->enc_ctl.maxInternalSampleRate = attr->info.clock_rate;
+ silk->enc_ctl.packetSize = silk->samples_per_frame;
+ silk->enc_ctl.packetLossPercentage = 0;
+ silk->enc_ctl.useInBandFEC = enc_use_fec;
+ silk->enc_ctl.useDTX = attr->setting.vad;
+ silk->enc_ctl.complexity = sp->complexity;
+ silk->enc_ctl.bitRate = enc_bitrate;
+
+
+ /* Allocate and initialize decoder */
+ err = SKP_Silk_SDK_Get_Decoder_Size(&st_size);
+ if (err) {
+ PJ_LOG(3,(THIS_FILE, "Failed to get decoder state size (err=%d)",
+ err));
+ return PJMEDIA_CODEC_EFAILED;
+ }
+ silk->dec_st = pj_pool_zalloc(silk->pool, st_size);
+ err = SKP_Silk_SDK_InitDecoder(silk->dec_st);
+ if (err) {
+ PJ_LOG(3,(THIS_FILE, "Failed to init decoder (err=%d)", err));
+ return PJMEDIA_CODEC_EFAILED;
+ }
+
+ /* Setup decoder control for decoding process */
+ silk->dec_ctl.API_sampleRate = attr->info.clock_rate;
+ silk->dec_ctl.framesPerPacket = 1; /* for proper PLC at start */
+ silk->dec_ready = PJ_TRUE;
+
+ /* Increase max_bps (as the bitrate values in the table seems to be
+ * rounded down, and without increasing this, frame size of the jitter
+ * buffer has been found lower than the actual frame size, which in turn
+ * it causes noise as the payloads get trimmed).
+ */
+ attr->info.max_bps *= 2;
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Close codec.
+ */
+static pj_status_t silk_codec_close( pjmedia_codec *codec )
+{
+ silk_private *silk;
+ silk = (silk_private*)codec->codec_data;
+
+ silk->enc_ready = PJ_FALSE;
+ silk->dec_ready = PJ_FALSE;
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Modify codec settings.
+ */
+static pj_status_t silk_codec_modify(pjmedia_codec *codec,
+ const pjmedia_codec_param *attr )
+{
+ PJ_TODO(implement_silk_codec_modify);
+
+ PJ_UNUSED_ARG(codec);
+ PJ_UNUSED_ARG(attr);
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Encode frame.
+ */
+static pj_status_t silk_codec_encode(pjmedia_codec *codec,
+ const struct pjmedia_frame *input,
+ unsigned output_buf_len,
+ struct pjmedia_frame *output)
+{
+ silk_private *silk;
+ SKP_int err;
+ unsigned nsamples;
+ SKP_int16 out_size;
+
+ PJ_ASSERT_RETURN(codec && input && output_buf_len && output, PJ_EINVAL);
+ silk = (silk_private*)codec->codec_data;
+
+ /* Check frame in size */
+ nsamples = input->size >> 1;
+ PJ_ASSERT_RETURN(nsamples == silk->samples_per_frame,
+ PJMEDIA_CODEC_EPCMFRMINLEN);
+
+ /* Encode */
+ output->size = 0;
+ out_size = (SKP_int16)output_buf_len;
+ err = SKP_Silk_SDK_Encode(silk->enc_st, &silk->enc_ctl,
+ (SKP_int16*)input->buf, nsamples,
+ (SKP_uint8*)output->buf, &out_size);
+ if (err) {
+ PJ_LOG(3, (THIS_FILE, "Failed to encode frame (err=%d)", err));
+ output->type = PJMEDIA_FRAME_TYPE_NONE;
+ if (err == SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT)
+ return PJMEDIA_CODEC_EFRMTOOSHORT;
+ return PJMEDIA_CODEC_EFAILED;
+ }
+
+ output->size = out_size;
+ output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+ output->timestamp = input->timestamp;
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Get frames in the packet.
+ */
+static pj_status_t silk_codec_parse( pjmedia_codec *codec,
+ void *pkt,
+ pj_size_t pkt_size,
+ const pj_timestamp *ts,
+ unsigned *frame_cnt,
+ pjmedia_frame frames[])
+{
+ silk_private *silk;
+ unsigned count;
+
+ PJ_ASSERT_RETURN(codec && ts && frames && frame_cnt, PJ_EINVAL);
+ silk = (silk_private*)codec->codec_data;
+
+ PJ_TODO(support_parsing_multiple_frames_per_packet);
+
+ count = 0;
+ frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+ frames[count].buf = pkt;
+ frames[count].size = pkt_size;
+ frames[count].timestamp.u64 = ts->u64;
+ ++count;
+
+ *frame_cnt = count;
+ return PJ_SUCCESS;
+}
+
+
+static pj_status_t silk_codec_decode(pjmedia_codec *codec,
+ const struct pjmedia_frame *input,
+ unsigned output_buf_len,
+ struct pjmedia_frame *output)
+{
+ silk_private *silk;
+ SKP_int16 out_size;
+ SKP_int err;
+
+ PJ_ASSERT_RETURN(codec && input && output_buf_len && output, PJ_EINVAL);
+ silk = (silk_private*)codec->codec_data;
+
+ out_size = (SKP_int16)output_buf_len;
+ err = SKP_Silk_SDK_Decode(silk->dec_st, &silk->dec_ctl,
+ 0, /* Normal frame flag */
+ input->buf,
+ input->size,
+ output->buf,
+ &out_size);
+ if (err) {
+ PJ_LOG(3, (THIS_FILE, "Failed to decode frame (err=%d)", err));
+ output->type = PJMEDIA_FRAME_TYPE_NONE;
+ output->buf = NULL;
+ output->size = 0;
+ return PJMEDIA_CODEC_EFAILED;
+ }
+
+ output->size = out_size;
+ output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+ output->timestamp = input->timestamp;
+
+ return PJ_SUCCESS;
+}
+
+
+/*
+ * Recover lost frame.
+ */
+static pj_status_t silk_codec_recover(pjmedia_codec *codec,
+ unsigned output_buf_len,
+ struct pjmedia_frame *output)
+{
+ silk_private *silk;
+ SKP_int16 out_size;
+ SKP_int err;
+
+ PJ_ASSERT_RETURN(codec && output_buf_len && output, PJ_EINVAL);
+ silk = (silk_private*)codec->codec_data;
+
+ out_size = (SKP_int16)output_buf_len;
+ err = SKP_Silk_SDK_Decode(silk->dec_st, &silk->dec_ctl,
+ 1, /* Lost frame flag */
+ NULL,
+ 0,
+ output->buf,
+ &out_size);
+ if (err) {
+ PJ_LOG(3, (THIS_FILE, "Failed to conceal lost frame (err=%d)", err));
+ output->type = PJMEDIA_FRAME_TYPE_NONE;
+ output->buf = NULL;
+ output->size = 0;
+ return PJMEDIA_CODEC_EFAILED;
+ }
+
+ output->size = out_size;
+ output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+ return PJ_SUCCESS;
+}
+
+#if defined(_MSC_VER)
+# if PJ_DEBUG
+# pragma comment(lib, "SKP_Silk_FLP_Win32_debug.lib")
+# else
+# pragma comment(lib, "SKP_Silk_FLP_Win32_mt.lib")
+# endif
+#endif
+
+
+#endif /* PJMEDIA_HAS_SILK_CODEC */