1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

net/freerdp: fix build with ffmpeg

- Fix build with ffmpeg

Reported by:	dinoex
Approved by:	portmgr (bapt, implicit)
This commit is contained in:
William Grzybowski 2013-10-25 10:58:53 +00:00
parent 076e98ab69
commit 5fa326532d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=331566
3 changed files with 38 additions and 35 deletions

View File

@ -61,15 +61,8 @@ CMAKE_ARGS+= -DWITH_ALSA=OFF
.endif
.if ${PORT_OPTIONS:MFFMPEG}
# the newer ffmpeg is prefered
LIB_DEPENDS+= avcodec-devel:${PORTSDIR}/multimedia/ffmpeg-devel \
avutil-devel:${PORTSDIR}/multimedia/ffmpeg-devel
AVCODEC_INCLUDE_DIR= ${LOCALBASE}/include/ffmpeg-devel
AVCODEC_LIBRARY= ${LOCALBASE}/lib/ffmpeg-devel
AVUTIL_INCLUDE_DIR= ${AVCODEC_INCLUDE_DIR}
AVUTIL_LIBRARY= ${AVCODEC_LIBRARY}
CFLAGS+= -I${AVCODEC_INCLUDE_DIR}
LDFLAGS+= -I${AVCODEC_LIBRARY}
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \
libavutil.so:${PORTSDIR}/multimedia/ffmpeg
PLIST_SUB+= FFMPEG=""
.else
CMAKE_ARGS+= -DWITH_FFMPEG=OFF

View File

@ -0,0 +1,36 @@
--- channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c.orig 2013-10-25 08:48:35.385869420 -0200
+++ channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c 2013-10-25 08:54:54.476872888 -0200
@@ -34,12 +34,16 @@
#define AVMEDIA_TYPE_AUDIO 1
#endif
+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+#endif
+
typedef struct _TSMFFFmpegDecoder
{
ITSMFDecoder iface;
int media_type;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
AVCodecContext* codec_context;
AVCodec* codec;
AVFrame* frame;
@@ -89,13 +93,9 @@
mdecoder->codec_context->block_align = media_type->BlockAlign;
#ifdef AV_CPU_FLAG_SSE2
- mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2;
+ av_set_cpu_flags_mask(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2);
#else
-#if LIBAVCODEC_VERSION_MAJOR < 53
- mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMXEXT;
-#else
- mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2;
-#endif
+ av_set_cpu_flags_mask(FF_MM_SSE2 | FF_MM_MMX2);
#endif
return true;

View File

@ -1,26 +0,0 @@
--- cmake/FindFFmpeg.cmake.orig 2013-03-07 10:38:36.747254870 +0000
+++ cmake/FindFFmpeg.cmake 2013-03-07 10:42:07.891253483 +0000
@@ -8,19 +8,19 @@
include(FindPkgConfig)
if (PKG_CONFIG_FOUND)
- pkg_check_modules(AVCODEC libavcodec)
- pkg_check_modules(AVUTIL libavutil)
+ pkg_check_modules(AVCODEC libavcodec-devel)
+ pkg_check_modules(AVUTIL libavutil-devel)
endif ( PKG_CONFIG_FOUND )
# avcodec
find_path(AVCODEC_INCLUDE_DIR avcodec.h PATHS ${AVCODEC_INCLUDE_DIRS}
PATH_SUFFIXES libavcodec )
-find_library(AVCODEC_LIBRARY avcodec PATHS ${AVCODEC_LIBRARY_DIRS})
+find_library(AVCODEC_LIBRARY avcodec-devel PATHS ${AVCODEC_LIBRARY_DIRS})
# avutil
find_path(AVUTIL_INCLUDE_DIR avutil.h PATHS ${AVUTIL_INCLUDE_DIRS}
PATH_SUFFIXES libavutil )
-find_library(AVUTIL_LIBRARY avutil PATHS ${AVUTIL_LIBRARY_DIRS})
+find_library(AVUTIL_LIBRARY avutil-devel PATHS ${AVUTIL_LIBRARY_DIRS})
if(AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY)
set(AVCODEC_FOUND TRUE)