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
mediastreamer2
Commits
7451aeb8
Commit
7451aeb8
authored
Jan 06, 2014
by
Ghislain MARY
Browse files
Activate compilation of opus filter on windows with cmake.
parent
cd4838bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
CMakeLists.txt
CMakeLists.txt
+6
-0
src/CMakeLists.txt
src/CMakeLists.txt
+7
-0
src/audiofilters/msopus.c
src/audiofilters/msopus.c
+2
-2
No files found.
CMakeLists.txt
View file @
7451aeb8
cmake_minimum_required
(
VERSION 2.6
)
project
(
MEDIASTREAMER2 C
)
option
(
MS2_ENABLE_OPUS
"Build mediastreamer2 with the OPUS codec."
ON
)
if
(
NOT ORTP_ROOT_DIR
)
set
(
ORTP_ROOT_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/../oRTP
)
endif
()
...
...
@@ -22,6 +24,10 @@ include_directories(
if
(
USE_INSTALLED_COMPONENTS
)
include_directories
(
${
CMAKE_INSTALL_PREFIX
}
/include
)
if
(
MS2_ENABLE_OPUS
)
include_directories
(
${
CMAKE_INSTALL_PREFIX
}
/include/opus
)
find_library
(
LIBOPUS libopus.lib PATHS
${
CMAKE_INSTALL_PREFIX
}
/lib
)
endif
(
MS2_ENABLE_OPUS
)
else
()
include_directories
(
${
ORTP_INCLUDE_DIR
}
...
...
src/CMakeLists.txt
View file @
7451aeb8
...
...
@@ -122,6 +122,10 @@ set(VOIP_SOURCE_FILES
voip/rfc3984.c
)
if
(
MS2_ENABLE_OPUS
)
set
(
VOIP_SOURCE_FILES
${
VOIP_SOURCE_FILES
}
audiofilters/msopus.c
)
endif
(
MS2_ENABLE_OPUS
)
set
(
VOIP_GENERATED_SOURCE_FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/voipdescs.h
)
...
...
@@ -151,6 +155,9 @@ if(WIN32)
set
(
VOIP_LIBS ws2_32 ole32 oleaut32 winmm uuid
)
endif
(
WIN32
)
set
(
VOIP_LIBS
${
VOIP_LIBS
}
libortp libmediastreamer_base libspeex libspeexdsp
)
if
(
MS2_ENABLE_OPUS
)
set
(
VOIP_LIBS
${
VOIP_LIBS
}
${
LIBOPUS
}
)
endif
(
MS2_ENABLE_OPUS
)
add_library
(
libmediastreamer_voip SHARED
${
VOIP_SOURCE_FILES
}
${
VOIP_GENERATED_SOURCE_FILES
}
)
set_target_properties
(
libmediastreamer_voip PROPERTIES VERSION 2.9.2 SOVERSION 3
)
...
...
src/audiofilters/msopus.c
View file @
7451aeb8
...
...
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/msticker.h"
#include "ortp/rtp.h"
#include <stdint.h>
#include <opus.h>
#define SIGNAL_SAMPLE_SIZE 2 // 2 bytes per sample
...
...
@@ -679,8 +679,8 @@ static void ms_opus_dec_process(MSFilter *f) {
/* Concealment if needed */
if
(
ms_concealer_context_is_concealement_required
(
d
->
concealer
,
f
->
ticker
->
time
))
{
int
imLength
=
0
;
im
=
NULL
;
uint8_t
*
payload
=
NULL
;
im
=
NULL
;
// try fec : info are stored in the next packet, do we have it?
if
(
d
->
rtp_picker_context
.
picker
)
{
...
...
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