Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
ortp
Commits
eea06f69
Commit
eea06f69
authored
Jul 23, 2010
by
Simon Morlat
Browse files
vs files updated
parent
410d76ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
72 deletions
+82
-72
build/win32native/oRTP.vcproj
build/win32native/oRTP.vcproj
+11
-10
build/win32native/ortp.def
build/win32native/ortp.def
+10
-2
src/rtpsession.c
src/rtpsession.c
+23
-23
src/rtpsession_inet.c
src/rtpsession_inet.c
+38
-37
No files found.
build/win32native/oRTP.vcproj
View file @
eea06f69
...
...
@@ -62,12 +62,12 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Winmm.lib qwave.lib"
AdditionalDependencies=
"Ws2_32.lib
delayimp.lib
Winmm.lib qwave.lib"
LinkIncremental=
"1"
AdditionalLibraryDirectories=
""..\..\..\win32-bin\lib""
IgnoreAllDefaultLibraries=
"false"
ModuleDefinitionFile=
"oRTP.def"
DelayLoadDLLs=
"
q
wave.
lib
"
DelayLoadDLLs=
"
Q
wave.
dll
"
GenerateDebugInformation=
"true"
ProgramDatabaseFile=
"$(OutDir)/oRTP.pdb"
SubSystem=
"2"
...
...
@@ -122,8 +122,9 @@
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"2"
AdditionalIncludeDirectories=
""..\..\..\win32-bin\include";"..\..\include";"..\..\include\ortp";"..\..\src";"..\..\build\win32native\include""
PreprocessorDefinitions=
"
HAVE_OPENSSL_HMAC_H;HAVE_OPENSSL_MD5_H;
_CRT_SECURE_NO_DEPRECATE;ORTP_INET6;WIN32;NDEBUG;_WINDOWS;_USRDLL;ORTP_EXPORTS;WINDOW_NATIVE
;_CRT_SECURE_NO_DEPRECATE
"
PreprocessorDefinitions=
"_CRT_SECURE_NO_DEPRECATE;ORTP_INET6;WIN32;NDEBUG;_WINDOWS;_USRDLL;ORTP_EXPORTS;WINDOW_NATIVE"
RuntimeLibrary=
"0"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
...
...
@@ -142,10 +143,10 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Qwave.lib delayimp.lib
libeay32.lib Ws2_32.lib libsrtp.lib Winmm.lib libcmt.lib
"
AdditionalDependencies=
"Qwave.lib delayimp.lib
Ws2_32.lib Winmm.lib
"
LinkIncremental=
"1"
AdditionalLibraryDirectories=
"
"..\..\..\win32-bin\lib"
"
IgnoreAllDefaultLibraries=
"
tru
e"
AdditionalLibraryDirectories=
""
IgnoreAllDefaultLibraries=
"
fals
e"
ModuleDefinitionFile=
"oRTP.def"
DelayLoadDLLs=
"Qwave.dll"
AssemblyLinkResource=
""
...
...
@@ -212,10 +213,6 @@
RelativePath=
"..\..\src\ortp.c"
>
</File>
<File
RelativePath=
".\ortp.def"
>
</File>
<File
RelativePath=
"..\..\src\payloadtype.c"
>
...
...
@@ -384,6 +381,10 @@
Filter=
"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier=
"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=
".\ortp.def"
>
</File>
</Filter>
</Files>
<Globals>
...
...
build/win32native/ortp.def
View file @
eea06f69
...
...
@@ -107,6 +107,8 @@ EXPORTS
dupb
concatb
esballoc
copyb
copymsg
WIN_thread_create
WIN_thread_join
...
...
@@ -176,7 +178,6 @@ EXPORTS
rtp_session_set_remote_addr_and_port
rtp_session_set_time_jump_limit
copymsg
rtp_session_enable_jitter_buffer
rtp_session_set_rtp_socket_recv_buffer_size
...
...
@@ -194,5 +195,12 @@ EXPORTS
rtp_session_get_local_port
rtp_session_get_jitter_buffer_params
copyb
turnAllocateSocketPair
ortp_shm_open
ortp_shm_close
ortp_pipe_read
ortp_pipe_write
ortp_client_pipe_connect
ortp_client_pipe_close
ortp_file_exist
src/rtpsession.c
View file @
eea06f69
...
...
@@ -1341,8 +1341,8 @@ void rtp_session_uninit (RtpSession * session)
msgb_allocator_uninit
(
&
session
->
allocator
);
#if (_WIN32_WINNT >= 0x0600)
if
(
session
->
rtp
.
QoSFlowID
!=
0
)
{
if
(
session
->
rtp
.
QoSFlowID
!=
0
)
{
OSVERSIONINFOEX
ovi
;
memset
(
&
ovi
,
0
,
sizeof
(
ovi
));
ovi
.
dwOSVersionInfoSize
=
sizeof
(
ovi
);
...
...
@@ -1352,30 +1352,30 @@ void rtp_session_uninit (RtpSession * session)
ovi
.
dwMajorVersion
,
ovi
.
dwMinorVersion
,
ovi
.
dwBuildNumber
);
if
(
ovi
.
dwMajorVersion
>
5
)
{
if
(
FAILED
(
__HrLoadAllImportsForDll
(
"qwave.dll"
)))
{
ortp_warning
(
"Failed to load qwave.dll: no QoS available
\n
"
);
if
(
FAILED
(
__HrLoadAllImportsForDll
(
"qwave.dll"
)))
{
ortp_warning
(
"Failed to load qwave.dll: no QoS available
\n
"
);
}
else
{
BOOL
QoSResult
;
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
());
}
session
->
rtp
.
QoSFlowID
=
0
;
}
}
}
if
(
session
->
rtp
.
QoSHandle
!=
NULL
)
{
QOSCloseHandle
(
session
->
rtp
.
QoSHandle
);
session
->
rtp
.
QoSHandle
=
NULL
;
BOOL
QoSResult
;
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
());
}
session
->
rtp
.
QoSFlowID
=
0
;
}
}
}
if
(
session
->
rtp
.
QoSHandle
!=
NULL
)
{
QOSCloseHandle
(
session
->
rtp
.
QoSHandle
);
session
->
rtp
.
QoSHandle
=
NULL
;
}
#endif
}
...
...
src/rtpsession_inet.c
View file @
eea06f69
...
...
@@ -287,6 +287,7 @@ rtp_session_set_local_addr (RtpSession * session, const char * addr, int port)
return
0
;
}
ortp_error
(
"Could not bind RTP socket on port to %s port %i"
,
addr
,
port
);
return
-
1
;
}
...
...
@@ -468,51 +469,51 @@ int rtp_session_set_dscp(RtpSession *session, int dscp){
ovi
.
dwMajorVersion
,
ovi
.
dwMinorVersion
,
ovi
.
dwBuildNumber
);
if
(
ovi
.
dwMajorVersion
>
5
)
{
if
(
FAILED
(
__HrLoadAllImportsForDll
(
"qwave.dll"
)))
{
ortp_warning
(
"Failed to load qwave.dll: no QoS available
\n
"
);
if
(
FAILED
(
__HrLoadAllImportsForDll
(
"qwave.dll"
)))
{
ortp_warning
(
"Failed to load qwave.dll: no QoS available
\n
"
);
}
else
{
if
(
session
->
dscp
==
0
)
tos
=
QOSTrafficTypeBestEffort
;
else
if
(
session
->
dscp
==
0x8
)
tos
=
QOSTrafficTypeBackground
;
else
if
(
session
->
dscp
==
0x28
)
tos
=
QOSTrafficTypeAudioVideo
;
else
if
(
session
->
dscp
==
0x38
)
tos
=
QOSTrafficTypeVoice
;
else
tos
=
QOSTrafficTypeExcellentEffort
;
/* 0x28 */
tos
=
QOSTrafficTypeBestEffort
;
else
if
(
session
->
dscp
==
0x8
)
tos
=
QOSTrafficTypeBackground
;
else
if
(
session
->
dscp
==
0x28
)
tos
=
QOSTrafficTypeAudioVideo
;
else
if
(
session
->
dscp
==
0x38
)
tos
=
QOSTrafficTypeVoice
;
else
tos
=
QOSTrafficTypeExcellentEffort
;
/* 0x28 */
if
(
session
->
rtp
.
QoSHandle
==
NULL
)
{
QOS_VERSION
version
;
BOOL
QoSResult
;
version
.
MajorVersion
=
1
;
version
.
MinorVersion
=
0
;
QoSResult
=
QOSCreateHandle
(
&
version
,
&
session
->
rtp
.
QoSHandle
);
if
(
QoSResult
!=
TRUE
){
ortp_error
(
"QOSCreateHandle failed to create handle with error %d
\n
"
,
GetLastError
());
retval
=-
1
;
QOS_VERSION
version
;
BOOL
QoSResult
;
version
.
MajorVersion
=
1
;
version
.
MinorVersion
=
0
;
QoSResult
=
QOSCreateHandle
(
&
version
,
&
session
->
rtp
.
QoSHandle
);
if
(
QoSResult
!=
TRUE
){
ortp_error
(
"QOSCreateHandle failed to create handle with error %d
\n
"
,
GetLastError
());
retval
=-
1
;
}
}
}
if
(
session
->
rtp
.
QoSHandle
!=
NULL
)
{
BOOL
QoSResult
;
QoSResult
=
QOSAddSocketToFlow
(
session
->
rtp
.
QoSHandle
,
session
->
rtp
.
socket
,
(
struct
sockaddr
*
)
&
session
->
rtp
.
rem_addr
,
tos
,
QOS_NON_ADAPTIVE_FLOW
,
&
session
->
rtp
.
QoSFlowID
);
if
(
QoSResult
!=
TRUE
){
ortp_error
(
"QOSAddSocketToFlow failed to add a flow with error %d
\n
"
,
GetLastError
());
retval
=-
1
;
BOOL
QoSResult
;
QoSResult
=
QOSAddSocketToFlow
(
session
->
rtp
.
QoSHandle
,
session
->
rtp
.
socket
,
(
struct
sockaddr
*
)
&
session
->
rtp
.
rem_addr
,
tos
,
QOS_NON_ADAPTIVE_FLOW
,
&
session
->
rtp
.
QoSFlowID
);
if
(
QoSResult
!=
TRUE
){
ortp_error
(
"QOSAddSocketToFlow failed to add a flow with error %d
\n
"
,
GetLastError
());
retval
=-
1
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment