Commit 8ff42eec authored by Erwan Croze's avatar Erwan Croze 👋🏻

Merge remote-tracking branch 'origin' into dev_screensharing

parents ae2c289e 96f89c62
......@@ -131,7 +131,11 @@ add_definitions(-DHAVE_CONFIG_H)
set(STRICT_OPTIONS_CPP )
set(STRICT_OPTIONS_C )
if(NOT MSVC)
if(MSVC)
if(ENABLE_STRICT)
list(APPEND STRICT_OPTIONS_CPP "/WX")
endif()
else()
list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized")
list(APPEND STRICT_OPTIONS_C "-Wdeclaration-after-statement" "-Wstrict-prototypes" "-Wno-error=strict-prototypes")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
......
SUBDIRS= win32native wince winmob
EXTRA_DIST=android/Android.mk android/ortp_AndroidConfig.h wp8/oRTP/oRTP.sln wp8/oRTP/inttypes.h wp8/oRTP/oRTP.vcxproj wp8/oRTP/stdint.h
EXTRA_DIST=oRTP.vcxproj oRTP.sln

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oRTP", "oRTP.vcxproj", "{4A07BB2B-F56E-4F1B-A719-D28B782AC128}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4A07BB2B-F56E-4F1B-A719-D28B782AC128}.Debug|Win32.ActiveCfg = Debug|Win32
{4A07BB2B-F56E-4F1B-A719-D28B782AC128}.Debug|Win32.Build.0 = Debug|Win32
{4A07BB2B-F56E-4F1B-A719-D28B782AC128}.Release|Win32.ActiveCfg = Release|Win32
{4A07BB2B-F56E-4F1B-A719-D28B782AC128}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4A07BB2B-F56E-4F1B-A719-D28B782AC128}</ProjectGuid>
<RootNamespace>oRTP</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\win32-bin\include;..\..\include;..\..\include\ortp;..\..\src;..\..\build\win32native\include;..\..\build\vsx\ortp\ortp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;ORTP_INET6;WIN32;_DEBUG;_WINDOWS;_USRDLL;ORTP_EXPORTS;WINDOW_NATIVE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>Ws2_32.lib;delayimp.lib;Winmm.lib;qwave.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(IntDir)ortp.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\..\win32-bin\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<DelayLoadDLLs>Qwave.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)oRTP.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\..\win32-bin\include;..\..\include;..\..\include\ortp;..\..\src;..\..\build\win32native\include;..\..\build\vsx\ortp\ortp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;ORTP_INET6;WIN32;NDEBUG;_WINDOWS;_USRDLL;ORTP_EXPORTS;WINDOW_NATIVE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>
</DebugInformationFormat>
<CallingConvention>Cdecl</CallingConvention>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>Ws2_32.lib;delayimp.lib;Winmm.lib;qwave.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(IntDir)ortp.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\..\win32-bin\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<DelayLoadDLLs>Qwave.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<AssemblyLinkResource>%(AssemblyLinkResource)</AssemblyLinkResource>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\avprofile.c" />
<ClCompile Include="..\..\src\b64.c" />
<ClCompile Include="..\..\src\dll_entry.c" />
<ClCompile Include="..\..\src\event.c" />
<ClCompile Include="..\..\src\jitterctl.c" />
<ClCompile Include="..\..\src\logging.c" />
<ClCompile Include="..\..\src\netsim.c" />
<ClCompile Include="..\..\src\ortp.c" />
<ClCompile Include="..\..\src\ortp_srtp.c" />
<ClCompile Include="..\..\src\payloadtype.c" />
<ClCompile Include="..\..\src\port.c" />
<ClCompile Include="..\..\src\posixtimer.c" />
<ClCompile Include="..\..\src\rtcp.c" />
<ClCompile Include="..\..\src\rtcp_fb.c" />
<ClCompile Include="..\..\src\rtcp_xr.c" />
<ClCompile Include="..\..\src\rtcpparse.c" />
<ClCompile Include="..\..\src\rtpparse.c" />
<ClCompile Include="..\..\src\rtpprofile.c" />
<ClCompile Include="..\..\src\rtpsession.c" />
<ClCompile Include="..\..\src\rtpsession_inet.c" />
<ClCompile Include="..\..\src\rtpsignaltable.c" />
<ClCompile Include="..\..\src\rtptimer.c" />
<ClCompile Include="..\..\src\scheduler.c" />
<ClCompile Include="..\..\src\sessionset.c" />
<ClCompile Include="..\..\src\str_utils.c" />
<ClCompile Include="..\..\src\stun.c" />
<ClCompile Include="..\..\src\stun_udp.c" />
<ClCompile Include="..\..\src\telephonyevents.c" />
<ClCompile Include="..\..\src\utils.c" />
<ClCompile Include="..\..\src\zrtp.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\ortp\b64.h" />
<ClInclude Include="..\..\include\ortp\event.h" />
<ClInclude Include="..\..\src\jitterctl.h" />
<ClInclude Include="..\..\include\ortp\logging.h" />
<ClInclude Include="ortp-config.h" />
<ClInclude Include="..\..\include\ortp\ortp.h" />
<ClInclude Include="..\..\include\ortp\ortp_srtp.h" />
<ClInclude Include="..\..\include\ortp\payloadtype.h" />
<ClInclude Include="..\..\include\ortp\port.h" />
<ClInclude Include="..\..\include\ortp\rtcp.h" />
<ClInclude Include="..\..\include\ortp\rtp.h" />
<ClInclude Include="..\..\src\rtpmod.h" />
<ClInclude Include="..\..\include\ortp\rtpprofile.h" />
<ClInclude Include="..\..\include\ortp\rtpsession.h" />
<ClInclude Include="..\..\src\rtpsession_priv.h" />
<ClInclude Include="..\..\include\ortp\rtpsignaltable.h" />
<ClInclude Include="..\..\src\rtptimer.h" />
<ClInclude Include="..\..\src\scheduler.h" />
<ClInclude Include="..\..\include\ortp\sessionset.h" />
<ClInclude Include="..\..\include\ortp\str_utils.h" />
<ClInclude Include="..\..\include\ortp\stun.h" />
<ClInclude Include="..\..\include\ortp\stun_udp.h" />
<ClInclude Include="..\..\include\ortp\telephonyevents.h" />
<ClInclude Include="..\..\src\utils.h" />
<ClInclude Include="..\..\include\ortp\zrtp.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
/*
The oRTP library is an RTP (Realtime Transport Protocol - rfc1889) stack.
Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ortp-config-win32.h. Generated manually... */
#define ORTP_VERSION "0.8.2"
#define ORTP_MAJOR_VERSION 0
#define ORTP_MINOR_VERSION 8
#define ORTP_MICRO_VERSION 2
#define ORTP_EXTRA_VERSION
/* define the debug mode */
#define RTP_DEBUG 1
/* enables SO_REUSEADDR socket option in the rtp_session_set_local_addr() function */
#define SO_REUSE_ADDR 1
EXTRA_DIST=oRTP.vcproj
This diff is collapsed.
EXTRA_DIST=oRTP.vcproj oRTP.sln

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oRTP", "oRTP.vcproj", "{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I)
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)
{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
......@@ -405,9 +405,6 @@ AC_OUTPUT(
src/tests/win_receiver/Makefile
src/tests/win_sender/Makefile
build/Makefile
build/win32native/Makefile
build/wince/Makefile
build/winmob/Makefile
ortp.pc
ortp.spec
ortp.doxygen
......
......@@ -154,8 +154,6 @@ unsigned long __ortp_thread_self(void);
#define _WINSOCKAPI_
#endif
#define strtok_r strtok_s
typedef unsigned __int64 uint64_t;
typedef __int64 int64_t;
typedef unsigned short uint16_t;
......@@ -256,10 +254,6 @@ ORTP_PUBLIC const char *getWinSocketError(int error);
#define getSocketError() getWinSocketError(WSAGetLastError())
#endif
#define snprintf _snprintf
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#ifndef F_OK
#define F_OK 00 /* Visual Studio does not define F_OK */
#endif
......
......@@ -526,12 +526,12 @@ typedef struct OrtpLossRateEstimator{
* Total number of outgoing duplicate packets on last
* ortp_loss_rate_estimator_process_report_block iteration.
**/
int32_t last_dup_packet_sent_count;
int64_t last_dup_packet_sent_count;
/**
* Total number of outgoing unique packets on last
* ortp_loss_rate_estimator_process_report_block iteration.
**/
int32_t last_packet_sent_count;
int64_t last_packet_sent_count;
}OrtpLossRateEstimator;
......
......@@ -73,8 +73,8 @@ typedef struct _JitterControl
int adapt_jitt_comp_ts;
int64_t slide;
int64_t prev_slide;
int64_t olddiff;
float jitter;
int olddiff;
float inter_jitter; /* interarrival jitter as defined in the RFC */
int corrective_step;
int corrective_slide;
......@@ -397,7 +397,7 @@ struct _RtpSession
mblk_t *minimal_sdes;
mblk_t *full_sdes;
queue_t contributing_sources;
int64_t lost_packets_test_vector;
int lost_packets_test_vector;
unsigned int interarrival_jitter_test_vector;
unsigned int delay_test_vector;
float rtt;/*last round trip delay calculated*/
......@@ -633,7 +633,7 @@ ORTP_PUBLIC float rtp_session_get_round_trip_propagation(RtpSession *session);
ORTP_PUBLIC void rtp_session_enable_network_simulation(RtpSession *session, const OrtpNetworkSimulatorParams *params);
ORTP_PUBLIC void rtp_session_rtcp_set_lost_packet_value( RtpSession *session, const int64_t value );
ORTP_PUBLIC void rtp_session_rtcp_set_lost_packet_value( RtpSession *session, const int value );
ORTP_PUBLIC void rtp_session_rtcp_set_jitter_value(RtpSession *session, const unsigned int value );
ORTP_PUBLIC void rtp_session_rtcp_set_delay_value(RtpSession *session, const unsigned int value );
ORTP_PUBLIC mblk_t * rtp_session_pick_with_cseq (RtpSession * session, const uint16_t sequence_number);
......
......@@ -103,7 +103,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}
%{_includedir}/*
%changelog
* Tue Oct 25 2005 Francois-Xavier Kowalski <fix@hp.com>
......
......@@ -104,10 +104,10 @@ if(ENABLE_SHARED)
target_compile_options(ortp PRIVATE "/DELAYLOAD:Qwave.dll")
endif()
target_compile_definitions(ortp PRIVATE "ORTP_EXPORTS")
target_link_libraries(ortp ${LIBS})
target_link_libraries(ortp PRIVATE ${LIBS})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/ortp.pdb
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/ortp.pdb
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
......
......@@ -78,7 +78,7 @@ void jitter_control_dump_stats(JitterControl *ctl){
to recv timestamp to make them reflect the instant they are delivered by the jitter buffer. */
void jitter_control_update_corrective_slide(JitterControl *ctl){
int tmp;
tmp=(int)(ctl->slide)-ctl->prev_slide;
tmp=(int)(ctl->slide-ctl->prev_slide);
if (tmp>ctl->corrective_step) {
ctl->corrective_slide+=ctl->corrective_step;
ctl->prev_slide=ctl->slide+ctl->corrective_step;
......@@ -114,7 +114,8 @@ void jitter_control_new_packet(JitterControl *ctl, uint32_t packet_ts, uint32_t
int d;
//printf("diff=%g\n",diff);
if (ctl->count==0){
slide=ctl->slide=ctl->prev_slide=diff;
ctl->slide=ctl->prev_slide=diff;
slide=(double)diff;
ctl->olddiff=diff;
ctl->jitter=0;
}else{
......@@ -123,7 +124,7 @@ void jitter_control_new_packet(JitterControl *ctl, uint32_t packet_ts, uint32_t
gap=(double)diff - slide;
gap=gap<0 ? -gap : 0; /*compute only for late packets*/
ctl->jitter=(float) ((ctl->jitter*(1-JC_GAMMA)) + (gap*JC_GAMMA));
d=diff-ctl->olddiff;
d=(int)(diff-ctl->olddiff);
ctl->inter_jitter=(float) (ctl->inter_jitter+ (( (float)abs(d) - ctl->inter_jitter)*(1/16.0)));
ctl->olddiff=diff;
ctl->count++;
......@@ -133,7 +134,7 @@ void jitter_control_new_packet(JitterControl *ctl, uint32_t packet_ts, uint32_t
//jitter_control_dump_stats(ctl);
}
ctl->slide=slide;
ctl->slide=(int64_t)slide;
}else {
/*ctl->slide and jitter size are not updated*/
}
......@@ -145,7 +146,7 @@ float jitter_control_compute_mean_size(JitterControl *ctl){
double tmp=((double)ctl->cum_jitter_buffer_size)/(double)ctl->cum_jitter_buffer_count;
ctl->cum_jitter_buffer_size=0;
ctl->cum_jitter_buffer_count=0;
return 1000.0*(float)tmp/(float)ctl->clock_rate;
return 1000.0f*(float)tmp/(float)ctl->clock_rate;
}
return 0;
}
......
......@@ -22,6 +22,7 @@
#include "utils.h"
#include "ortp/rtpsession.h"
#include "rtpsession_priv.h"
#include <bctoolbox/port.h>
static void rtp_session_schedule_outbound_network_simulator(RtpSession *session, ortpTimeSpec *sleep_until);
......@@ -153,7 +154,7 @@ void rtp_session_enable_network_simulation(RtpSession *session, const OrtpNetwor
sim->params.max_bandwidth);
}
if (sim->params.max_bandwidth && sim->params.max_buffer_size==0) {
sim->params.max_buffer_size=sim->params.max_bandwidth;
sim->params.max_buffer_size=(int)sim->params.max_bandwidth;
ortp_message("Network simulation: Max buffer size not set for RTP session [%p], using [%i]",session,sim->params.max_buffer_size);
}
session->net_sim_ctx=sim;
......@@ -233,13 +234,13 @@ static int simulate_jitter_by_bit_budget_reduction(OrtpNetworkSimulatorCtx *sim,
threshold=100;
score=(float)r;
}else{
score=1000.0*(float)r*(now-sim->last_jitter_event)*sim->params.jitter_burst_density*1e-6;
score=1000.0f*(float)r*(now-sim->last_jitter_event)*sim->params.jitter_burst_density*1e-6f;
threshold=500;
}
if (score>(int)threshold){
int64_t strength_rand=sim->params.jitter_strength * (float)(ortp_random()%1000);
int64_t strength_rand=(int64_t)(sim->params.jitter_strength * (float)(ortp_random()%1000));
sim->in_jitter_event=TRUE;
budget_adjust=-((int64_t)budget_increase*strength_rand/1000LL);
budget_adjust=(int)-((int64_t)budget_increase*strength_rand/1000LL);
/*ortp_message("jitter in progress... bit_budget_adjustement=%i, bit_budget=%i",budget_adjust,sim->bit_budget);*/
}else if (sim->in_jitter_event){
/*ortp_message("jitter ended.");*/
......@@ -266,7 +267,7 @@ static mblk_t *simulate_bandwidth_limit_and_jitter(RtpSession *session, mblk_t *
}
/*update the budget */
elapsed=elapsed_us(&sim->last_check,&current);
budget_increase=(elapsed*(int64_t)sim->params.max_bandwidth)/1000000LL;
budget_increase=(int)((elapsed*(int64_t)sim->params.max_bandwidth)/1000000LL);
sim->bit_budget+=budget_increase;
sim->bit_budget+=simulate_jitter_by_bit_budget_reduction(sim,budget_increase);
sim->last_check=current;
......@@ -308,11 +309,11 @@ static mblk_t *simulate_bandwidth_limit_and_jitter(RtpSession *session, mblk_t *
static mblk_t *simulate_loss_rate(OrtpNetworkSimulatorCtx *net_sim_ctx, mblk_t *input){
int rrate;
float loss_rate=net_sim_ctx->params.loss_rate*10.0;
float loss_rate=net_sim_ctx->params.loss_rate*10.0f;
/*in order to simulate bursts of dropped packets, take into account a different probability after a loss occured*/
if (net_sim_ctx->consecutive_drops>0){
loss_rate=net_sim_ctx->params.consecutive_loss_probability*1000.0;
loss_rate=net_sim_ctx->params.consecutive_loss_probability*1000.0f;
}
rrate = ortp_random() % 1000;
......@@ -320,7 +321,7 @@ static mblk_t *simulate_loss_rate(OrtpNetworkSimulatorCtx *net_sim_ctx, mblk_t *
if (rrate >= loss_rate) {
if (net_sim_ctx->consecutive_drops){
/*after a burst of lost packets*/
net_sim_ctx->drops_to_ignore=net_sim_ctx->consecutive_drops - ((net_sim_ctx->consecutive_drops*net_sim_ctx->params.loss_rate)/100);
net_sim_ctx->drops_to_ignore=net_sim_ctx->consecutive_drops - (int)(((float)net_sim_ctx->consecutive_drops*net_sim_ctx->params.loss_rate)/100.0f);
net_sim_ctx->consecutive_drops=0;
}
return input;
......
......@@ -24,6 +24,7 @@
#include "ortp/logging.h"
#include "ortp/payloadtype.h"
#include "ortp/str_utils.h"
#include <bctoolbox/port.h>
char *payload_type_get_rtpmap(PayloadType *pt)
......
......@@ -26,6 +26,7 @@
#include "ortp/port.h"
#include "ortp/str_utils.h"
#include "utils.h"
#include <bctoolbox/port.h>
#if defined(_WIN32) && !defined(_WIN32_WCE)
#include <process.h>
......
......@@ -223,7 +223,7 @@ static void sender_info_init(sender_info_t *info, RtpSession *session){
info->rtp_timestamp=htonl(session->rtp.snd_last_ts);
info->senders_packet_count=(uint32_t) htonl((u_long) session->stats.packet_sent);
info->senders_octet_count=(uint32_t) htonl((u_long) session->rtp.sent_payload_bytes);
session->rtp.last_rtcp_packet_count=session->stats.packet_sent;
session->rtp.last_rtcp_packet_count=(uint32_t)session->stats.packet_sent;
}
static void report_block_init(report_block_t *b, RtpSession *session){
......@@ -234,7 +234,7 @@ static void report_block_init(report_block_t *b, RtpSession *session){
/* compute the statistics */
if (stream->hwrcv_since_last_SR!=0){
int expected_packets=stream->hwrcv_extseq - stream->hwrcv_seq_at_last_SR;
int expected_packets=(int)((int64_t)stream->hwrcv_extseq - (int64_t)stream->hwrcv_seq_at_last_SR);
if ( session->flags & RTCP_OVERRIDE_LOST_PACKETS ) {
/* If the test mode is enabled, replace the lost packet field with
......@@ -245,7 +245,7 @@ static void report_block_init(report_block_t *b, RtpSession *session){
session->stats.cum_packet_loss = packet_loss;
}else {
/* Normal mode */
packet_loss = expected_packets - stream->hwrcv_since_last_SR;
packet_loss = (int)((int64_t)expected_packets - (int64_t)stream->hwrcv_since_last_SR);
session->stats.cum_packet_loss += packet_loss;
}
if (expected_packets>0){/*prevent division by zero and negative loss fraction*/
......@@ -261,13 +261,13 @@ static void report_block_init(report_block_t *b, RtpSession *session){
"\texpected_packets=%d=%u-%u\n"
"\thwrcv_since_last_SR=%u\n"
"\tpacket_loss=%d\n"
"\tcum_packet_loss=%ld\n"
"\tcum_packet_loss=%lld\n"
"\tloss_fraction=%f%%\n"
, session
, stream->hwrcv_extseq - stream->hwrcv_seq_at_last_SR, stream->hwrcv_extseq, stream->hwrcv_seq_at_last_SR
, stream->hwrcv_since_last_SR
, packet_loss
, (long)session->stats.cum_packet_loss
, (long long)session->stats.cum_packet_loss
, loss_fraction/2.56
);
......@@ -321,7 +321,7 @@ static void report_block_init(report_block_t *b, RtpSession *session){
static void extended_statistics( RtpSession *session, report_block_t * rb ) {
/* the jitter raw value is kept in stream clock units */
uint32_t jitter = session->rtp.jittctl.inter_jitter;
uint32_t jitter = (uint32_t)session->rtp.jittctl.inter_jitter;
session->stats.sent_rtcp_packets ++;
session->rtp.jitter_stats.sum_jitter += jitter;
session->rtp.jitter_stats.jitter=jitter;
......@@ -449,7 +449,7 @@ static void rtp_session_create_and_send_rtcp_packet(RtpSession *session, bool_t
if (session->rtp.last_rtcp_packet_count < session->stats.packet_sent) {
m = make_sr(session);
session->rtp.last_rtcp_packet_count = session->stats.packet_sent;
session->rtp.last_rtcp_packet_count = (uint32_t)session->stats.packet_sent;
is_sr = TRUE;
} else if (session->stats.packet_recv > 0) {
/* Don't send RR when no packet are received yet */
......@@ -687,8 +687,8 @@ void ortp_loss_rate_estimator_init(OrtpLossRateEstimator *obj, int min_packet_co
bool_t ortp_loss_rate_estimator_process_report_block(OrtpLossRateEstimator *obj, const RtpSession *session, const report_block_t *rb){
int32_t cum_loss=report_block_get_cum_packet_lost(rb);
int32_t extseq=report_block_get_high_ext_seq(rb);
int32_t diff_unique_outgoing=session->stats.packet_sent-obj->last_packet_sent_count;
int32_t diff_total_outgoing=diff_unique_outgoing+session->stats.packet_dup_sent-obj->last_dup_packet_sent_count;
int32_t diff_unique_outgoing=(int32_t)(session->stats.packet_sent-obj->last_packet_sent_count);
int32_t diff_total_outgoing=diff_unique_outgoing+(int32_t)(session->stats.packet_dup_sent-obj->last_dup_packet_sent_count);
int32_t diff;
uint64_t curtime;
bool_t got_value=FALSE;
......
......@@ -18,6 +18,7 @@
*/
#include "ortp/ortp.h"
#include <bctoolbox/port.h>
int rtp_profile_get_payload_number_from_mime(RtpProfile *profile, const char *mime)
......
......@@ -35,6 +35,7 @@
#undef ExternC /* avoid redefinition... */
#ifdef ORTP_WINDOWS_DESKTOP
#include <QOS2.h>
#include <VersionHelpers.h>
#endif
#endif
......@@ -521,6 +522,7 @@ void rtp_session_set_recv_buf_size(RtpSession *session, int bufsize){
**/
void rtp_session_set_rtp_socket_send_buffer_size(RtpSession * session, unsigned int size){
session->rtp.snd_socket_size=size;
_rtp_session_apply_socket_sizes(session);
}
/**
......@@ -529,6 +531,7 @@ void rtp_session_set_rtp_socket_send_buffer_size(RtpSession * session, unsigned
**/
void rtp_session_set_rtp_socket_recv_buffer_size(RtpSession * session, unsigned int size){
session->rtp.rcv_socket_size=size;
_rtp_session_apply_socket_sizes(session);
}
/**
......@@ -1541,25 +1544,14 @@ void rtp_session_uninit (RtpSession * session)
#if (_WIN32_WINNT >= 0x0600) && defined(ORTP_WINDOWS_DESKTOP)
if (session->rtp.QoSFlowID != 0)
{
OSVERSIONINFOEX ovi;
memset(&ovi, 0, sizeof(ovi));
ovi.dwOSVersionInfoSize = sizeof(ovi);
GetVersionEx((LPOSVERSIONINFO) & ovi);
ortp_message("check OS support for qwave.lib: %i %i %i\n",
ovi.dwMajorVersion, ovi.dwMinorVersion, ovi.dwBuildNumber);
if (ovi.dwMajorVersion > 5) {
ortp_message("check OS support for qwave.lib");
if (IsWindowsVistaOrGreater()) {
BOOL QoSResult;
QoSResult = QOSRemoveSocketFromFlow(session->rtp.QoSHandle,
0,
session->rtp.QoSFlowID,
0);
QoSResult = QOSRemoveSocketFromFlow(session->rtp.QoSHandle, 0, session->rtp.QoSFlowID, 0);
if (QoSResult != TRUE){
ortp_error("QOSRemoveSocketFromFlow failed to end a flow with error %d\n",
GetLastError());
ortp_error("QOSRemoveSocketFromFlow failed to end a flow with error %d", GetLastError());
}
session->rtp.QoSFlowID=0;
session->rtp.QoSFlowID = 0;
}
}
......@@ -1656,7 +1648,7 @@ const jitter_stats_t * rtp_session_get_jitter_stats( const RtpSession *session )
* @param s : the rtp session.
* @param value : the lost packets test vector value.
**/
void rtp_session_rtcp_set_lost_packet_value( struct _RtpSession *s, const int64_t value ) {
void rtp_session_rtcp_set_lost_packet_value( struct _RtpSession *s, const int value ) {
s->lost_packets_test_vector = value;
s->flags|=RTCP_OVERRIDE_LOST_PACKETS;
}
......
......@@ -36,6 +36,7 @@
#undef ExternC
#ifdef ORTP_WINDOWS_DESKTOP
#include <QOS2.h>
#include <VersionHelpers.h>
#endif
#endif
......@@ -281,14 +282,20 @@ static ortp_socket_t create_and_bind(const char *addr, int *port, int *sock_fami
return sock;
}
static void set_socket_sizes(ortp_socket_t sock, unsigned int sndbufsz, unsigned int rcvbufsz){
void _rtp_session_apply_socket_sizes(RtpSession * session){
int err;
bool_t done=FALSE;
ortp_socket_t sock = session->rtp.gs.socket;
unsigned int sndbufsz = session->rtp.snd_socket_size;
unsigned int rcvbufsz = session->rtp.rcv_socket_size;
if (sock == (ortp_socket_t)-1) return;
if (sndbufsz>0){
#ifdef SO_SNDBUFFORCE
err = setsockopt(sock, SOL_SOCKET, SO_SNDBUFFORCE, (void *)&sndbufsz, sizeof(sndbufsz));
if (err == -1) {
ortp_error("Fail to increase socket's send buffer size with SO_SNDBUFFORCE: %s.", getSocketError());
ortp_warning("Fail to increase socket's send buffer size with SO_SNDBUFFORCE: %s.", getSocketError());
}else done=TRUE;
#endif
if (!done){
......@@ -303,7 +310,7 @@ static void set_socket_sizes(ortp_socket_t sock, unsigned int sndbufsz, unsigned
#ifdef SO_RCVBUFFORCE
err = setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, (void *)&rcvbufsz, sizeof(rcvbufsz));
if (err == -1) {
ortp_error("Fail to increase socket's recv buffer size with SO_RCVBUFFORCE: %s.", getSocketError());
ortp_warning("Fail to increase socket's recv buffer size with SO_RCVBUFFORCE: %s.", getSocketError());
}
#endif
if (!done){
......@@ -345,10 +352,10 @@ rtp_session_set_local_addr (RtpSession * session, const char * addr, int rtp_por
sock=create_and_bind(addr,&rtp_port,&sockfamily,session->reuseaddr,&session->rtp.gs.loc_addr,&session->rtp.gs.loc_addrlen);
if (sock!=-1){
set_socket_sizes(sock,session->rtp.snd_socket_size,session->rtp.rcv_socket_size);