diff --git a/Bcg729Config.cmake b/Bcg729Config.cmake index 89cd8e1..a7b414f 100644 --- a/Bcg729Config.cmake +++ b/Bcg729Config.cmake @@ -31,5 +31,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/Bcg729Targets.cmake") get_filename_component(BCG729_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) set(BCG729_INCLUDE_DIRS "${BCG729_CMAKE_DIR}/../../../include") -set(BCG729_LIBRARIES BelledonneCommunications::bcg729) +set(BCG729_LIBRARIES bcg729) set(BCG729_FOUND 1) diff --git a/CMakeLists.txt b/CMakeLists.txt index 829997c..9f9ee2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,12 +21,12 @@ ############################################################################ cmake_minimum_required(VERSION 3.0) -project(BCG729 C) +project(bcg729 VERSION 1.0.1 LANGUAGES C) -set(PACKAGE "bcg729") -set(PACKAGE_NAME "${PACKAGE}") -set(PACKAGE_VERSION "0.1") +set(PACKAGE "${PROJECT_NAME}") +set(PACKAGE_NAME "${PROJECT_NAME}") +set(PACKAGE_VERSION "${PROJECT_VERSION}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "support@belledonne-communications.com") set(PACKAGE_TARNAME "bcg729") @@ -34,12 +34,19 @@ set(PACKAGE_URL "") set(VERSION "${PACKAGE_VERSION}") -option(ENABLE_TESTS "Enable compilation of the tests." No) -option(ENABLE_MSPLUGIN "Enable compilation of the mediastreamer2 plugin." Yes) +option(ENABLE_SHARED "Build shared library." YES) +option(ENABLE_STATIC "Build static library." YES) +option(ENABLE_TESTS "Enable compilation of the tests." NO) +option(ENABLE_MSPLUGIN "Enable compilation of the mediastreamer2 plugin." YES) +include(GNUInstallDirs) if(ENABLE_MSPLUGIN) - find_package(Mediastreamer2) + if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) + include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake") + else() + find_package(Mediastreamer2) + endif() if(NOT MEDIASTREAMER2_FOUND) message(WARNING "Could not find the mediastreamer2 libraries!") @@ -66,7 +73,10 @@ add_definitions(-DHAVE_CONFIG_H) if(MSVC) add_definitions("/W3") else() - add_definitions("-Wall" "-Werror") + add_definitions("-Wall") + if (NOT IOS) + add_definitions("-Werror") + endif() endif() add_subdirectory(src) @@ -74,7 +84,7 @@ if(ENABLE_MSPLUGIN) add_subdirectory(msbcg729) endif() if(ENABLE_TESTS) - add_subdirectory(test) + #add_subdirectory(test) endif() @@ -86,21 +96,19 @@ write_basic_package_version_file( ) export(EXPORT Bcg729Targets FILE "${CMAKE_CURRENT_BINARY_DIR}/Bcg729Targets.cmake" - NAMESPACE BelledonneCommunications:: ) configure_file(Bcg729Config.cmake "${CMAKE_CURRENT_BINARY_DIR}/Bcg729Config.cmake" COPYONLY ) -set(ConfigPackageLocation lib/cmake/Bcg729) +set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/Bcg729/cmake") install(EXPORT Bcg729Targets FILE Bcg729Targets.cmake - NAMESPACE BelledonneCommunications:: - DESTINATION ${ConfigPackageLocation} + DESTINATION ${CONFIG_PACKAGE_LOCATION} ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Bcg729Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/Bcg729ConfigVersion.cmake" - DESTINATION ${ConfigPackageLocation} + DESTINATION ${CONFIG_PACKAGE_LOCATION} ) diff --git a/Makefile.am b/Makefile.am index 288139e..84b77b9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = bcg729.spec +EXTRA_DIST = bcg729.spec Bcg729Config.cmake CMakeLists.txt config.h.cmake msbcg729/CMakeLists.txt src/CMakeLists.txt SUBDIRS = include src if BUILD_MSBCG729 diff --git a/build/windows10/libmsbcg729/libmsbcg729.sln b/build/windows10/libmsbcg729/libmsbcg729.sln new file mode 100644 index 0000000..611f9c6 --- /dev/null +++ b/build/windows10/libmsbcg729/libmsbcg729.sln @@ -0,0 +1,174 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmsbcg729", "libmsbcg729.vcxproj", "{ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediastreamer2", "..\..\..\..\linphone\mediastreamer2\build\windows10\mediastreamer2\mediastreamer2.vcxproj", "{88E3C241-EB6F-4C84-80DC-89B8961DAF80}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ortp", "..\..\..\..\linphone\oRTP\build\windows10\ortp\ortp.vcxproj", "{2E56B851-9D8D-40E5-84BB-E4EE63B71D25}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srtp", "..\..\..\..\srtp\build\windows10\srtp\srtp.vcxproj", "{59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml2", "..\..\..\..\build\xml2\windows10\xml2\xml2.vcxproj", "{2B04DE79-4D33-4405-AC01-C89E0593A71D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polarssl", "..\..\..\..\polarssl\build\windows10\polarssl\polarssl.vcxproj", "{88768DD9-5110-4AC8-8B0E-41CD7713E1A2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "speex", "..\..\..\..\speex\build\windows10\speex\speex.vcxproj", "{971DD379-1C2D-44D2-9285-FDA556C48176}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "speexdsp", "..\..\..\..\speex\build\windows10\speexdsp\speexdsp.vcxproj", "{104BF91B-8314-4328-A996-90B8DF6052AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus", "..\..\..\..\opus\build\windows10\opus\opus.vcxproj", "{81AF1025-E0EE-4AD6-988D-2EF162778693}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzrtp", "..\..\..\..\bzrtp\build\windows10\bzrtp\bzrtp.vcxproj", "{45C7723D-3107-4906-9633-F43ABE8A7147}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsm", "..\..\..\..\gsm\build\windows10\gsm\gsm.vcxproj", "{EF1103C7-8AAC-464B-BA31-86B87246FA72}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Debug|ARM.ActiveCfg = Debug|ARM + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Debug|ARM.Build.0 = Debug|ARM + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Debug|x64.ActiveCfg = Debug|x64 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Debug|x64.Build.0 = Debug|x64 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Debug|x86.ActiveCfg = Debug|Win32 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Debug|x86.Build.0 = Debug|Win32 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Release|ARM.ActiveCfg = Release|ARM + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Release|ARM.Build.0 = Release|ARM + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Release|x64.ActiveCfg = Release|x64 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Release|x64.Build.0 = Release|x64 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Release|x86.ActiveCfg = Release|Win32 + {ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}.Release|x86.Build.0 = Release|Win32 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Debug|ARM.ActiveCfg = Debug|ARM + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Debug|ARM.Build.0 = Debug|ARM + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Debug|x64.ActiveCfg = Debug|x64 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Debug|x64.Build.0 = Debug|x64 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Debug|x86.ActiveCfg = Debug|Win32 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Debug|x86.Build.0 = Debug|Win32 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Release|ARM.ActiveCfg = Release|ARM + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Release|ARM.Build.0 = Release|ARM + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Release|x64.ActiveCfg = Release|x64 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Release|x64.Build.0 = Release|x64 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Release|x86.ActiveCfg = Release|Win32 + {88E3C241-EB6F-4C84-80DC-89B8961DAF80}.Release|x86.Build.0 = Release|Win32 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Debug|ARM.ActiveCfg = Debug|ARM + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Debug|ARM.Build.0 = Debug|ARM + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Debug|x64.ActiveCfg = Debug|x64 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Debug|x64.Build.0 = Debug|x64 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Debug|x86.ActiveCfg = Debug|Win32 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Debug|x86.Build.0 = Debug|Win32 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Release|ARM.ActiveCfg = Release|ARM + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Release|ARM.Build.0 = Release|ARM + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Release|x64.ActiveCfg = Release|x64 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Release|x64.Build.0 = Release|x64 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Release|x86.ActiveCfg = Release|Win32 + {2E56B851-9D8D-40E5-84BB-E4EE63B71D25}.Release|x86.Build.0 = Release|Win32 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Debug|ARM.ActiveCfg = Debug|ARM + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Debug|ARM.Build.0 = Debug|ARM + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Debug|x64.ActiveCfg = Debug|x64 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Debug|x64.Build.0 = Debug|x64 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Debug|x86.ActiveCfg = Debug|Win32 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Debug|x86.Build.0 = Debug|Win32 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Release|ARM.ActiveCfg = Release|ARM + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Release|ARM.Build.0 = Release|ARM + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Release|x64.ActiveCfg = Release|x64 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Release|x64.Build.0 = Release|x64 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Release|x86.ActiveCfg = Release|Win32 + {59104E4F-A087-442E-ABD4-BCD2A1F0B0FE}.Release|x86.Build.0 = Release|Win32 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Debug|ARM.ActiveCfg = Debug|ARM + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Debug|ARM.Build.0 = Debug|ARM + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Debug|x64.ActiveCfg = Debug|x64 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Debug|x64.Build.0 = Debug|x64 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Debug|x86.ActiveCfg = Debug|Win32 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Debug|x86.Build.0 = Debug|Win32 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Release|ARM.ActiveCfg = Release|ARM + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Release|ARM.Build.0 = Release|ARM + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Release|x64.ActiveCfg = Release|x64 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Release|x64.Build.0 = Release|x64 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Release|x86.ActiveCfg = Release|Win32 + {2B04DE79-4D33-4405-AC01-C89E0593A71D}.Release|x86.Build.0 = Release|Win32 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Debug|ARM.ActiveCfg = Debug|ARM + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Debug|ARM.Build.0 = Debug|ARM + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Debug|x64.ActiveCfg = Debug|x64 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Debug|x64.Build.0 = Debug|x64 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Debug|x86.ActiveCfg = Debug|Win32 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Debug|x86.Build.0 = Debug|Win32 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Release|ARM.ActiveCfg = Release|ARM + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Release|ARM.Build.0 = Release|ARM + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Release|x64.ActiveCfg = Release|x64 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Release|x64.Build.0 = Release|x64 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Release|x86.ActiveCfg = Release|Win32 + {88768DD9-5110-4AC8-8B0E-41CD7713E1A2}.Release|x86.Build.0 = Release|Win32 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Debug|ARM.ActiveCfg = Debug|ARM + {971DD379-1C2D-44D2-9285-FDA556C48176}.Debug|ARM.Build.0 = Debug|ARM + {971DD379-1C2D-44D2-9285-FDA556C48176}.Debug|x64.ActiveCfg = Debug|x64 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Debug|x64.Build.0 = Debug|x64 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Debug|x86.ActiveCfg = Debug|Win32 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Debug|x86.Build.0 = Debug|Win32 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Release|ARM.ActiveCfg = Release|ARM + {971DD379-1C2D-44D2-9285-FDA556C48176}.Release|ARM.Build.0 = Release|ARM + {971DD379-1C2D-44D2-9285-FDA556C48176}.Release|x64.ActiveCfg = Release|x64 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Release|x64.Build.0 = Release|x64 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Release|x86.ActiveCfg = Release|Win32 + {971DD379-1C2D-44D2-9285-FDA556C48176}.Release|x86.Build.0 = Release|Win32 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Debug|ARM.ActiveCfg = Debug|ARM + {104BF91B-8314-4328-A996-90B8DF6052AF}.Debug|ARM.Build.0 = Debug|ARM + {104BF91B-8314-4328-A996-90B8DF6052AF}.Debug|x64.ActiveCfg = Debug|x64 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Debug|x64.Build.0 = Debug|x64 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Debug|x86.ActiveCfg = Debug|Win32 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Debug|x86.Build.0 = Debug|Win32 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Release|ARM.ActiveCfg = Release|ARM + {104BF91B-8314-4328-A996-90B8DF6052AF}.Release|ARM.Build.0 = Release|ARM + {104BF91B-8314-4328-A996-90B8DF6052AF}.Release|x64.ActiveCfg = Release|x64 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Release|x64.Build.0 = Release|x64 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Release|x86.ActiveCfg = Release|Win32 + {104BF91B-8314-4328-A996-90B8DF6052AF}.Release|x86.Build.0 = Release|Win32 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Debug|ARM.ActiveCfg = Debug|ARM + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Debug|ARM.Build.0 = Debug|ARM + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Debug|x64.ActiveCfg = Debug|x64 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Debug|x64.Build.0 = Debug|x64 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Debug|x86.ActiveCfg = Debug|Win32 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Debug|x86.Build.0 = Debug|Win32 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Release|ARM.ActiveCfg = Release|ARM + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Release|ARM.Build.0 = Release|ARM + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Release|x64.ActiveCfg = Release|x64 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Release|x64.Build.0 = Release|x64 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Release|x86.ActiveCfg = Release|Win32 + {81AF1025-E0EE-4AD6-988D-2EF162778693}.Release|x86.Build.0 = Release|Win32 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Debug|ARM.ActiveCfg = Debug|ARM + {45C7723D-3107-4906-9633-F43ABE8A7147}.Debug|ARM.Build.0 = Debug|ARM + {45C7723D-3107-4906-9633-F43ABE8A7147}.Debug|x64.ActiveCfg = Debug|x64 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Debug|x64.Build.0 = Debug|x64 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Debug|x86.ActiveCfg = Debug|Win32 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Debug|x86.Build.0 = Debug|Win32 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Release|ARM.ActiveCfg = Release|ARM + {45C7723D-3107-4906-9633-F43ABE8A7147}.Release|ARM.Build.0 = Release|ARM + {45C7723D-3107-4906-9633-F43ABE8A7147}.Release|x64.ActiveCfg = Release|x64 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Release|x64.Build.0 = Release|x64 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Release|x86.ActiveCfg = Release|Win32 + {45C7723D-3107-4906-9633-F43ABE8A7147}.Release|x86.Build.0 = Release|Win32 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Debug|ARM.ActiveCfg = Debug|ARM + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Debug|ARM.Build.0 = Debug|ARM + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Debug|x64.ActiveCfg = Debug|x64 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Debug|x64.Build.0 = Debug|x64 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Debug|x86.ActiveCfg = Debug|Win32 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Debug|x86.Build.0 = Debug|Win32 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Release|ARM.ActiveCfg = Release|ARM + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Release|ARM.Build.0 = Release|ARM + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Release|x64.ActiveCfg = Release|x64 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Release|x64.Build.0 = Release|x64 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Release|x86.ActiveCfg = Release|Win32 + {EF1103C7-8AAC-464B-BA31-86B87246FA72}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/build/windows10/libmsbcg729/libmsbcg729.vcxproj b/build/windows10/libmsbcg729/libmsbcg729.vcxproj new file mode 100644 index 0000000..30a481c --- /dev/null +++ b/build/windows10/libmsbcg729/libmsbcg729.vcxproj @@ -0,0 +1,122 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {88e3c241-eb6f-4c84-80dc-89b8961daf80} + + + {2e56b851-9d8d-40e5-84bb-e4ee63b71d25} + + + + {acf5ea95-d647-4d0c-8f97-2cd9aae8a2e0} + DynamicLibrary + libmsbcg729 + libmsbcg729 + en-US + 14.0 + true + Windows Store + 10 + 10.0.10240.0 + 10.0.10069.0 + + + + DynamicLibrary + true + v140 + + + DynamicLibrary + false + true + v140 + + + + + + + + + + + + false + false + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + NotUsing + false + $(ProjectDir)..\..\..\include;$(ProjectDir)..\..\..\..\linphone\mediastreamer2\include;$(ProjectDir)..\..\..\..\linphone\oRTP\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + + + + \ No newline at end of file diff --git a/configure.ac b/configure.ac index 4fade14..789b40d 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ -AC_INIT([bcg729],[1.0]) +AC_INIT([bcg729],[1.0.1]) AC_CANONICAL_SYSTEM AC_PREREQ(2.63) AC_CONFIG_SRCDIR([src/encoder.c]) diff --git a/include/Makefile.am b/include/Makefile.am index f404f61..90a391b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1,31 @@ SUBDIRS = bcg729 + +private_headers= adaptativeCodebookSearch.h \ + basicOperationsMacros.h \ + codebooks.h \ + codecParameters.h \ + computeAdaptativeCodebookGain.h \ + computeLP.h \ + computeWeightedSpeech.h \ + decodeAdaptativeCodeVector.h \ + decodeFixedCodeVector.h \ + decodeGains.h \ + decodeLSP.h \ + findOpenLoopPitchDelay.h \ + fixedCodebookSearch.h \ + fixedPointMacros.h \ + floatingPointMacros.h \ + g729FixedPointMath.h \ + gainQuantization.h \ + interpolateqLSP.h \ + LP2LSPConversion.h \ + LPSynthesisFilter.h \ + LSPQuantization.h \ + postFilter.h \ + postProcessing.h \ + preProcessing.h \ + qLSP2LP.h \ + typedef.h \ + utils.h + +EXTRA_DIST=$(private_headers) diff --git a/include/bcg729/Makefile.am b/include/bcg729/Makefile.am index ab7d238..4013392 100644 --- a/include/bcg729/Makefile.am +++ b/include/bcg729/Makefile.am @@ -1,6 +1,10 @@ bcg729_includedir=$(includedir)/bcg729 +public_headers=encoder.h decoder.h + bcg729_include_HEADERS= -bcg729_include_HEADERS+=encoder.h decoder.h +if !BUILD_MSBCG729 +bcg729_include_HEADERS+=$(public_headers) +endif -EXTRA_DIST=$(bcg729_include_HEADERS) +EXTRA_DIST=$(public_headers) diff --git a/include/bcg729/decoder.h b/include/bcg729/decoder.h index 935a45d..5d3dd8a 100644 --- a/include/bcg729/decoder.h +++ b/include/bcg729/decoder.h @@ -23,7 +23,7 @@ typedef struct bcg729DecoderChannelContextStruct_struct bcg729DecoderChannelContextStruct; #include -#ifdef WIN32 +#ifdef _WIN32 #define BCG729_VISIBILITY #else #define BCG729_VISIBILITY __attribute__ ((visibility ("default"))) diff --git a/include/bcg729/encoder.h b/include/bcg729/encoder.h index e661fbf..464faab 100644 --- a/include/bcg729/encoder.h +++ b/include/bcg729/encoder.h @@ -23,7 +23,7 @@ #include typedef struct bcg729EncoderChannelContextStruct_struct bcg729EncoderChannelContextStruct; -#ifdef WIN32 +#ifdef _WIN32 #define BCG729_VISIBILITY #else #define BCG729_VISIBILITY __attribute__ ((visibility ("default"))) diff --git a/msbcg729/CMakeLists.txt b/msbcg729/CMakeLists.txt index 253998f..cd47bfa 100644 --- a/msbcg729/CMakeLists.txt +++ b/msbcg729/CMakeLists.txt @@ -27,22 +27,32 @@ set(SOURCE_FILES include_directories(${MEDIASTREAMER2_INCLUDE_DIRS}) -add_library(msbcg729 SHARED ${BCG729_SOURCE_FILES} ${SOURCE_FILES}) -set_target_properties(msbcg729 PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION 0) -if(MSVC) - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libmsbcg729.pdb - DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) +if(ENABLE_STATIC) + add_library(msbcg729-static STATIC ${BCG729_SOURCE_FILES} ${SOURCE_FILES}) + set_target_properties(msbcg729-static PROPERTIES OUTPUT_NAME msbcg729) + target_link_libraries(msbcg729-static ${MEDIASTREAMER2_LIBRARIES}) + install(TARGETS msbcg729-static + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) +endif() +if(ENABLE_SHARED) + add_library(msbcg729 MODULE ${BCG729_SOURCE_FILES} ${SOURCE_FILES}) + set_target_properties(msbcg729 PROPERTIES SOVERSION 0) + target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES}) + if(MSVC) + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libmsbcg729.pdb + DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + endif() + set_target_properties(msbcg729 PROPERTIES PREFIX "lib") endif() - set_target_properties(msbcg729 PROPERTIES PREFIX "lib") + install(TARGETS msbcg729 + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) endif() -target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES}) - -install(TARGETS msbcg729 - RUNTIME DESTINATION lib/mediastreamer/plugins - LIBRARY DESTINATION lib/mediastreamer/plugins - ARCHIVE DESTINATION lib/mediastreamer/plugins - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) diff --git a/msbcg729/bcg729_enc.c b/msbcg729/bcg729_enc.c index 1578571..93e24f3 100644 --- a/msbcg729/bcg729_enc.c +++ b/msbcg729/bcg729_enc.c @@ -209,8 +209,8 @@ extern MSFilterDesc ms_bcg729_dec_desc; #define VERSION "debug" #endif -MS_PLUGIN_DECLARE(void) libmsbcg729_init(void){ - ms_filter_register(&ms_bcg729_enc_desc); - ms_filter_register(&ms_bcg729_dec_desc); +MS_PLUGIN_DECLARE(void) libmsbcg729_init(MSFactory * factory){ + ms_factory_register_filter(factory, &ms_bcg729_enc_desc); + ms_factory_register_filter(factory, &ms_bcg729_dec_desc); ms_message(" libmsbcg729 " VERSION " plugin loaded"); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa2bacf..f2bc57c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,25 +49,37 @@ set(BCG729_SOURCE_FILES vad.c ) -add_library(bcg729 SHARED ${BCG729_SOURCE_FILES}) -set_target_properties(bcg729 PROPERTIES VERSION 0) -if(MSVC) - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libbcg729.pdb - DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) +add_library(bcg729-objects OBJECT ${BCG729_SOURCE_FILES}) +set_target_properties(bcg729-objects PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + +if(ENABLE_STATIC) + add_library(bcg729-static STATIC ${BCG729_SOURCE_FILES}) + set_target_properties(bcg729-static PROPERTIES OUTPUT_NAME bcg729) + install(TARGETS bcg729-static EXPORT Bcg729Targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) +endif() +if(ENABLE_SHARED) + add_library(bcg729 SHARED ${BCG729_SOURCE_FILES}) + set_target_properties(bcg729 PROPERTIES VERSION 0) + if(MSVC) + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libbcg729.pdb + DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + endif() + set_target_properties(bcg729 PROPERTIES PREFIX "lib") endif() - set_target_properties(bcg729 PROPERTIES PREFIX "lib") + install(TARGETS bcg729 EXPORT Bcg729Targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) endif() -install(TARGETS bcg729 EXPORT Bcg729Targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) - set(ABS_BCG729_SOURCE_FILES ) foreach(elem ${BCG729_SOURCE_FILES}) list(APPEND ABS_BCG729_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${elem}") diff --git a/test/Makefile.am b/test/Makefile.am index 6ae5df0..cbb490a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,3 +1,15 @@ SUBDIRS = bin -TESTS = testCampaignAll +testCampaignAll-exec: $(srcdir)/testCampaignAll $(srcdir)/testCampaign + cp -f $(srcdir)/testCampaignAll testCampaignAll-exec + cp -f $(srcdir)/testCampaign testCampaign-exec + + +TESTS = testCampaignAll-exec + +EXTRA_DIST=testCampaignAll testCampaign + +CLEANFILES=testCampaignAll-exec testCampaign-exec + +clean-local: + rm -rf patterns diff --git a/test/bin/Makefile.am b/test/bin/Makefile.am index 9e2af7d..009e98b 100644 --- a/test/bin/Makefile.am +++ b/test/bin/Makefile.am @@ -1,7 +1,9 @@ check_PROGRAMS=adaptativeCodebookSearchTest computeAdaptativeCodebookGainTest computeLPTest computeWeightedSpeechTest decodeAdaptativeCodeVectorTest decodeFixedCodeVectorTest decodeGainsTest decodeLSPTest \ decoderTest encoderTest decoderMultiChannelTest encoderMultiChannelTest findOpenLoopPitchDelayTest fixedCodebookSearchTest g729FixedPointMathTest gainQuantizationTest interpolateqLSPAndConvert2LPTest \ LP2LSPConversionTest LPSynthesisFilterTest LSPQuantizationTest postFilterTest postProcessingTest preProcessingTest computeNoiseExcitationTest CNGdecoderTest CNGRFC3389decoderTest encoderVADTest -util_src=$(top_srcdir)/test/src/testUtils.c +util_src= \ + $(top_srcdir)/test/src/testUtils.c \ + $(top_srcdir)/test/src/testUtils.h adaptativeCodebookSearchTest_SOURCES=$(top_srcdir)/test/src/adaptativeCodebookSearchTest.c $(util_src) computeAdaptativeCodebookGainTest_SOURCES=$(top_srcdir)/test/src/computeAdaptativeCodebookGainTest.c $(util_src) diff --git a/test/testCampaignAll b/test/testCampaignAll index dc9473b..e72eab7 100755 --- a/test/testCampaignAll +++ b/test/testCampaignAll @@ -29,4 +29,4 @@ if [ ! -d "patterns" ]; then fi # run all the tests -./testCampaign all +./testCampaign-exec all