Commit 3c229fd0 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix build without vpx.

parent d289c123
...@@ -278,7 +278,9 @@ endif() ...@@ -278,7 +278,9 @@ endif()
# TODO: Handle Theora option # TODO: Handle Theora option
if(ENABLE_VPX) if(ENABLE_VPX)
find_package(VPX) find_package(VPX)
if(NOT VPX_FOUND) if(VPX_FOUND)
set(HAVE_VPX 1)
else()
set(ENABLE_VPX OFF CACHE BOOL "Build mediastreamer2 with VPX codec." FORCE) set(ENABLE_VPX OFF CACHE BOOL "Build mediastreamer2 with VPX codec." FORCE)
endif() endif()
endif() endif()
......
...@@ -764,6 +764,10 @@ AM_CONDITIONAL(BUILD_X11_XV, test "$enable_xv" = "true" ) ...@@ -764,6 +764,10 @@ AM_CONDITIONAL(BUILD_X11_XV, test "$enable_xv" = "true" )
AM_CONDITIONAL(BUILD_X11_GL, test "$enable_glx" = "true" ) AM_CONDITIONAL(BUILD_X11_GL, test "$enable_glx" = "true" )
AM_CONDITIONAL(BUILD_UPNP, test "$build_upnp" = "true" ) AM_CONDITIONAL(BUILD_UPNP, test "$build_upnp" = "true" )
if test "$build_vp8" != "false" ; then
AC_DEFINE(HAVE_VPX, 1, [Tells whether vpx can be used])
fi
dnl ********************************************* dnl *********************************************
dnl Enable/disable oRTP dependency dnl Enable/disable oRTP dependency
dnl ********************************************* dnl *********************************************
......
...@@ -68,3 +68,4 @@ ...@@ -68,3 +68,4 @@
#cmakedefine HAVE_POLARSSL_SSL_H 1 #cmakedefine HAVE_POLARSSL_SSL_H 1
#cmakedefine HAVE_PCAP 1 #cmakedefine HAVE_PCAP 1
#cmakedefine HAVE_MATROSKA 1 #cmakedefine HAVE_MATROSKA 1
#cmakedefine HAVE_VPX 1
...@@ -427,6 +427,9 @@ static const ModuleDesc h264_module_desc = { ...@@ -427,6 +427,9 @@ static const ModuleDesc h264_module_desc = {
/********************************************************************************************* /*********************************************************************************************
* VP8 module * * VP8 module *
*********************************************************************************************/ *********************************************************************************************/
#ifdef HAVE_VPX
typedef struct _Vp8Module { typedef struct _Vp8Module {
Vp8RtpFmtUnpackerCtx unpacker; Vp8RtpFmtUnpackerCtx unpacker;
Vp8RtpFmtPackerCtx packer; Vp8RtpFmtPackerCtx packer;
...@@ -522,6 +525,8 @@ static const ModuleDesc vp8_module_desc = { ...@@ -522,6 +525,8 @@ static const ModuleDesc vp8_module_desc = {
}; };
#endif #endif
#endif /* HAVE_VPX */
/********************************************************************************************* /*********************************************************************************************
* µLaw module * * µLaw module *
*********************************************************************************************/ *********************************************************************************************/
...@@ -722,7 +727,9 @@ typedef enum { ...@@ -722,7 +727,9 @@ typedef enum {
static const ModuleDesc *moduleDescs[] = { static const ModuleDesc *moduleDescs[] = {
&h264_module_desc, &h264_module_desc,
#ifdef HAVE_VPX
&vp8_module_desc, &vp8_module_desc,
#endif /* HAVE_VPX */
&mu_law_module_desc, &mu_law_module_desc,
&opus_module_desc, &opus_module_desc,
NULL NULL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment