FreeRDP-1.1.0-beta+2013071101 build fails when building with optional
ffmpeg support and ffmpeg versions > 0.10.8. Failure is due to use of
deprecated API features that have been removed in later ffmpeg
versions. Current released version of ffmpeg is 2.0.1. Patch attached
that fixes the problem when building against ffmpeg 2.0.1 and earlier
versions.
Build environment:
Mac OS X 10.8.4
MacPorts 2.2.0
Xcode 4.6.3 Build version 4H1503
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
ffmpeg version: 2.0.1 (fails with all ffmpeg versions > 0.10.8)
Failure from build log:
Building C object
channels/tsmf/client/CMakeFiles/tsmf-client.dir/tsmf_codec.c.o
cd
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client
&& /usr/bin/clang -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -arch i386
-mssse3 -DWINPR_EXPORTS -DFREERDP_EXPORTS -mmacosx-version-min=10.5 -O3
-DNDEBUG -arch x86_64 -arch i386 -fPIC -I/opt/local/include
-I/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101
-I/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/include
-I/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/winpr/include
-I/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/..
-o CMakeFiles/tsmf-client.dir/tsmf_codec.c.o -c
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/tsmf_codec.c
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:51:15:
error: field has incomplete type 'enum CodecID'
enum CodecID codec_id;
^
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:51:7:
note: forward declaration of 'enum CodecID'
enum CodecID codec_id;
^
/opt/local/bin/cmake -E cmake_progress_report
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/CMakeFiles
14
/opt/local/bin/cmake -E cmake_progress_report
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/CMakeFiles
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:102:27:
error: no member named 'dsp_mask' in 'struct AVCodecContext'
mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 |
AV_CPU_FLAG_MMX2;
~~~~~~~~~~~~~~~~~~~~~~~ ^
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:354:32:
error: use of undeclared identifier 'AVCODEC_MAX_AUDIO_FRAME_SIZE'
mdecoder->decoded_size_max =
AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
^
[ 64%] [ 64%]
/opt/local/var/macports/build/_opt_macports_trunk_dports_net_FreeRDP/FreeRDP/work/FreeRDP-1.1.0-beta+2013071101/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:366:61:
error: use of undeclared identifier 'AVCODEC_MAX_AUDIO_FRAME_SIZE'
if (mdecoder->decoded_size_max - mdecoder->decoded_size
< AVCODEC_MAX_AUDIO_FRAME_SIZE)
^
4 errors generated.
--- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c.orig 2013-07-10
01:00:21.000000000 -0700
+++ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c 2013-08-12 22:26:28.000000000
-0700
@@ -43,12 +43,20 @@
#define AVMEDIA_TYPE_AUDIO 1
#endif
+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
+#endif
+
typedef struct _TSMFFFmpegDecoder
{
ITSMFDecoder iface;
int media_type;
+#if LIBAVCODEC_VERSION_MAJOR > 54
+ enum AVCodecID codec_id;
+#else
enum CodecID codec_id;
+#endif
AVCodecContext* codec_context;
AVCodec* codec;
AVFrame* frame;
@@ -99,8 +107,12 @@
mdecoder->codec_context->block_align = media_type->BlockAlign;
#ifdef AV_CPU_FLAG_SSE2
+#if LIBAVCODEC_VERSION_MAJOR < 55
mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2;
#else
+ av_set_cpu_flags_mask(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2);
+#endif
+#else
#if LIBAVCODEC_VERSION_MAJOR < 53
mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMXEXT;
#else
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel