[packages/freerdp] - up to 2.0 devel version (git snapshot) due to problems with compatibility with modern RDP servers

adwol adwol at pld-linux.org
Thu May 19 17:42:22 CEST 2016


commit e2f5e56915b3412fe15b23b52f8a9cfd31a9a6d8
Author: Adam Osuchowski <adwol at pld-linux.org>
Date:   Thu May 19 17:33:55 2016 +0200

    - up to 2.0 devel version (git snapshot) due to problems with compatibility with modern RDP servers on stable version
    - wayland support
    - x11 bcond
    - disabled directfb bcond by default (compilation issues)
    - removed plugins (no plugins in upstream)
    - forced cmake options depends on bconds

 ffmpeg3.patch                  |  96 -----------------
 freerdp-DirectFB-include.patch |  10 ++
 freerdp-ffmpeg.patch           |  72 -------------
 freerdp.spec                   | 228 +++++++++++++----------------------------
 4 files changed, 82 insertions(+), 324 deletions(-)
---
diff --git a/freerdp.spec b/freerdp.spec
index 5360851..cda8648 100644
--- a/freerdp.spec
+++ b/freerdp.spec
@@ -1,28 +1,34 @@
+# TODO:
+# - fix DirectFB client build
+# - consider coexisting freerdp 1.x and 2.0 (some apps require 1.x version, e.g. vlc)
 #
 # Conditional build:
 %bcond_without	alsa		# ALSA sound support
 %bcond_without	cups		# CUPS printing support
-%bcond_without	directfb	# DirectFB client
+%bcond_with	directfb	# DirectFB client
 %bcond_without	ffmpeg		# FFmpeg audio/video decoding support
 %bcond_without	pcsc		# SmartCard support via PCSC-lite library
 %bcond_without	pulseaudio	# Pulseaudio sound support
+%bcond_without	wayland		# Wayland client
 %bcond_without	x11		# X11 client
 %bcond_with	sse2		# SSE2 instructions
 
 %ifarch %{x8664} pentium4
 %define	with_sse2	1
 %endif
+%define	rel	1
+%define	snap	20160519
 Summary:	Remote Desktop Protocol client
 Summary(pl.UTF-8):	Klient protokołu RDP
 Name:		freerdp
-Version:	1.0.2
-Release:	6
+Version:	2.0.0
+Release:	0.%{snap}.%{rel}
 License:	Apache v2.0
 Group:		Applications/Communications
-Source0:	http://pub.freerdp.com/releases/%{name}-%{version}.tar.gz
-# Source0-md5:	08f0e07d8d77e142f7dc39e4033a458d
-Patch0:		%{name}-ffmpeg.patch
-Patch1:		ffmpeg3.patch
+# https://github.com/FreeRDP/FreeRDP/archive/master.tar.gz
+Source0:	%{name}-%{version}-%{snap}.tar.gz
+# Source0-md5:	ba0d58f19e6a2bd3ca1ac88593c7ed80
+Patch0:		freerdp-DirectFB-include.patch
 URL:		http://www.freerdp.com/
 %{?with_directfb:BuildRequires:	DirectFB-devel}
 %{?with_alsa:BuildRequires:	alsa-lib-devel}
@@ -34,6 +40,8 @@ BuildRequires:	openssl-devel
 %{?with_pcsc:BuildRequires:	pcsc-lite-devel}
 BuildRequires:	pkgconfig
 %{?with_pulseaudio:BuildRequires:	pulseaudio-devel}
+%{?with_wayland:BuildRequires:	wayland-devel}
+%if %{with x11}
 BuildRequires:	xmlto
 BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xorg-lib-libXcursor-devel
@@ -44,11 +52,12 @@ BuildRequires:	xorg-lib-libXinerama-devel
 BuildRequires:	xorg-lib-libXtst-devel
 BuildRequires:	xorg-lib-libXv-devel
 BuildRequires:	xorg-lib-libxkbfile
+%endif
 BuildRequires:	zlib-devel
 Requires:	%{name}-libs = %{version}-%{release}
-Requires:	%{name}-plugins = %{version}-%{release}
 Requires:	hicolor-icon-theme
 Provides:	xfreerdp = %{version}-%{release}
+Conflicts:	xfreerdp < 2.0.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -70,7 +79,6 @@ Summary:	DirectFB based Remote Desktop Protocol klient
 Summary(pl.UTF-8):	Klient protokołu RDP oparty na DirectFB
 Group:		Applications/Communications
 Requires:	%{name}-libs = %{version}-%{release}
-Requires:	%{name}-plugins = %{version}-%{release}
 
 %description dfb
 DirectFB based Remote Desktop Protocol klient.
@@ -120,75 +128,9 @@ that use FreeRDP libraries.
 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
 wykorzystujących biblioteki FreeRDP.
 
-%package plugins
-Summary:	Plugins for handling the standard RDP channels
-Summary(pl.UTF-8):	Wtyczki do obsługi standardowych kanałów RDP
-Group:		Applications/Communications
-Requires:	%{name}-libs = %{version}-%{release}
-
-%description plugins
-A set of plugins to the channel manager implementing the standard
-virtual channels extending RDP core functionality. For instance,
-sounds, clipboard sync, disk/printer redirection, etc.
-
-%description plugins -l pl.UTF-8
-Zestaw wtyczek zarządcy kanałów, implementujących standardowe
-kanały wirtualne rozszerzające podstawową funkcjonalność RDP -
-na przykład dźwięk, synchronizację schowka, przekierowanie
-dysku/drukarki.
-
-%package plugins-alsa
-Summary:	ALSA plugins for handling RDP audio
-Summary(pl.UTF-8):	Wtyczki ALSA do obsługi dźwięku RDP
-Group:		Libraries
-Requires:	%{name}-plugins = %{version}-%{release}
-
-%description plugins-alsa
-ALSA plugins for handling RDP audio.
-
-%description plugins-alsa -l pl.UTF-8
-Wtyczki ALSA do obsługi dźwięku RDP.
-
-%package plugins-ffmpeg
-Summary:	FFmpeg plugin for decoding RDP audio/video
-Summary(pl.UTF-8):	Wtyczka FFmpeg do dekodowania dźwięku/obrazu RDP
-Group:		Libraries
-Requires:	%{name}-plugins = %{version}-%{release}
-
-%description plugins-ffmpeg
-FFmpeg plugin for decoding RDP audio/video.
-
-%description plugins-ffmpeg -l pl.UTF-8
-Wtyczka FFmpeg do dekodowania dźwięku/obrazu RDP.
-
-%package plugins-pcsc
-Summary:	PC/SC plugin for RDP smartcard support
-Summary(pl.UTF-8):	Wtyczka PC/SC do obsługi kart procesorowych w RDP
-Group:		Libraries
-Requires:	%{name}-plugins = %{version}-%{release}
-
-%description plugins-pcsc
-PC/SC plugin for RDP smartcard support.
-
-%description plugins-pcsc -l pl.UTF-8
-Wtyczka PC/SC do obsługi kart procesorowych w RDP.
-
-%package plugins-pulse
-Summary:	PulseAudio plugins for handling RDP audio
-Summary(pl.UTF-8):	Wtyczki PulseAudio do obsługi dźwięku RDP
-Group:		Libraries
-Requires:	%{name}-plugins = %{version}-%{release}
-
-%description plugins-pulse
-PulseAudio plugins for handling RDP audio.
-
-%description plugins-pulse -l pl.UTF-8
-Wtyczki PulseAudio do obsługi dźwięku RDP.
-
 %prep
-%setup -q
+%setup -q -n FreeRDP-master
 %patch0 -p1
-%patch1 -p1
 
 cat << EOF > xfreerdp.desktop
 [Desktop Entry]
@@ -208,16 +150,17 @@ install -d build
 cd build
 %cmake .. \
 	-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
-	%{!?with_alsa:-DWITH_ALSA=OFF} \
+	%{?with_alsa:-DWITH_ALSA=ON}%{!?with_alsa:-DWITH_ALSA=OFF} \
 	-DWITH_CUNIT=OFF \
-	%{!?with_cups:-DWITH_CUPS=OFF} \
-	%{?with_directfb:-DWITH_DIRECTFB=ON} \
-	%{!?with_ffmpeg:-DWITH_FFMPEG=OFF} \
-	%{?with_pcsc:-DWITH_PCSC=ON} \
-	%{?with_pulseaudio:-DWITH_PULSEAUDIO=ON} \
+	%{?with_cups:-DWITH_CUPS=ON}%{!?with_cups:-DWITH_CUPS=OFF} \
+	%{?with_directfb:-DWITH_DIRECTFB=ON}%{!?with_directfb:-DWITH_DIRECTFB=OFF} \
+	%{?with_ffmpeg:-DWITH_FFMPEG=ON}%{!?with_ffmpeg:-DWITH_FFMPEG=OFF} \
+	%{?with_pcsc:-DWITH_PCSC=ON}%{!?with_pcsc:-DWITH_PCSC=OFF} \
+	%{?with_pulseaudio:-DWITH_PULSE=ON}%{!?with_pulseaudio:-DWITH_PULSE=OFF} \
 	-DWITH_SERVER=ON \
-	%{!?with_sse2:-DWITH_SSE2=OFF} \
-	-DWITH_X11=ON \
+	%{?with_sse2:-DWITH_SSE2=ON}%{!?with_sse2:-DWITH_SSE2=OFF} \
+	%{?with_wayland:-DWITH_X11=ON}%{!?with_wayland:-DWITH_X11=OFF} \
+	%{?with_x11:-DWITH_X11=ON}%{!?with_x11:-DWITH_X11=OFF} \
 	-DWITH_XCURSOR=ON \
 	-DWITH_XEXT=ON \
 	-DWITH_XINERAMA=ON \
@@ -232,8 +175,7 @@ rm -rf $RPM_BUILD_ROOT
 	INSTALL="install -p" \
 	DESTDIR=$RPM_BUILD_ROOT
 
-# No need for keymap files when using xkbfile
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/freerdp
+%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake
 
 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} xfreerdp.desktop
 install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
@@ -252,88 +194,62 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/freerdp-shadow-cli
+%if %{with wayland}
+%attr(755,root,root) %{_bindir}/wlfreerdp
+%endif
+%if %{with x11}
 %attr(755,root,root) %{_bindir}/xfreerdp
+%endif
+%attr(755,root,root) %{_bindir}/winpr-hash
+%attr(755,root,root) %{_bindir}/winpr-makecert
 %{_mandir}/man1/xfreerdp.1*
 %{_desktopdir}/xfreerdp.desktop
 %{_iconsdir}/hicolor/256x256/apps/freerdp.png
 
+%if %{with directfb}
 %files dfb
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/dfreerdp
+%endif
 
 %files libs
 %defattr(644,root,root,755)
 %doc ChangeLog README
-%attr(755,root,root) %{_libdir}/libfreerdp-cache.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-cache.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-channels.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-channels.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-codec.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-codec.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-core.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-core.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-gdi.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-gdi.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-kbd.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-kbd.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-rail.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-rail.so.1.0
-%attr(755,root,root) %{_libdir}/libfreerdp-utils.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfreerdp-utils.so.1.0
-%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/libfreerdp-client.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreerdp-client.so.2
+%attr(755,root,root) %{_libdir}/libfreerdp-server.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreerdp-server.so.2
+%attr(755,root,root) %{_libdir}/libfreerdp-shadow.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreerdp-shadow.so.2
+%attr(755,root,root) %{_libdir}/libfreerdp-shadow-subsystem.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreerdp-shadow-subsystem.so.2
+%attr(755,root,root) %{_libdir}/libfreerdp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreerdp.so.2
+%attr(755,root,root) %{_libdir}/libuwac.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libuwac.so.0
+%attr(755,root,root) %{_libdir}/libwinpr.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libwinpr.so.2
+%attr(755,root,root) %{_libdir}/libwinpr-tools.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libwinpr-tools.so.2
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libfreerdp-cache.so
-%attr(755,root,root) %{_libdir}/libfreerdp-channels.so
-%attr(755,root,root) %{_libdir}/libfreerdp-codec.so
-%attr(755,root,root) %{_libdir}/libfreerdp-core.so
-%attr(755,root,root) %{_libdir}/libfreerdp-gdi.so
-%attr(755,root,root) %{_libdir}/libfreerdp-kbd.so
-%attr(755,root,root) %{_libdir}/libfreerdp-rail.so
-%attr(755,root,root) %{_libdir}/libfreerdp-utils.so
-%{_includedir}/freerdp
-%{_pkgconfigdir}/freerdp.pc
-
-%files plugins
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/audin.so
-%attr(755,root,root) %{_libdir}/%{name}/cliprdr.so
-%attr(755,root,root) %{_libdir}/%{name}/disk.so
-%attr(755,root,root) %{_libdir}/%{name}/drdynvc.so
-%attr(755,root,root) %{_libdir}/%{name}/parallel.so
-%attr(755,root,root) %{_libdir}/%{name}/printer.so
-%attr(755,root,root) %{_libdir}/%{name}/rail.so
-%attr(755,root,root) %{_libdir}/%{name}/rdpdbg.so
-%attr(755,root,root) %{_libdir}/%{name}/rdpdr.so
-%attr(755,root,root) %{_libdir}/%{name}/rdpsnd.so
-%attr(755,root,root) %{_libdir}/%{name}/serial.so
-%attr(755,root,root) %{_libdir}/%{name}/tsmf.so
-
-%if %{with alsa}
-%files plugins-alsa
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/audin_alsa.so
-%attr(755,root,root) %{_libdir}/%{name}/rdpsnd_alsa.so
-%attr(755,root,root) %{_libdir}/%{name}/tsmf_alsa.so
-%endif
-
-%if %{with ffmpeg}
-%files plugins-ffmpeg
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/tsmf_ffmpeg.so
-%endif
-
-%if %{with pcsc}
-%files plugins-pcsc
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/scard.so
-%endif
-
-%if %{with pulseaudio}
-%files plugins-pulse
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/audin_pulse.so
-%attr(755,root,root) %{_libdir}/%{name}/rdpsnd_pulse.so
-%attr(755,root,root) %{_libdir}/%{name}/tsmf_pulse.so
-%endif
+%attr(755,root,root) %{_libdir}/libfreerdp-client.so
+%attr(755,root,root) %{_libdir}/libfreerdp-server.so
+%attr(755,root,root) %{_libdir}/libfreerdp-shadow.so
+%attr(755,root,root) %{_libdir}/libfreerdp-shadow-subsystem.so
+%attr(755,root,root) %{_libdir}/libfreerdp.so
+%attr(755,root,root) %{_libdir}/libuwac.so
+%attr(755,root,root) %{_libdir}/libwinpr.so
+%attr(755,root,root) %{_libdir}/libwinpr-tools.so
+%{_includedir}/freerdp2
+%{_includedir}/uwac0
+%{_includedir}/winpr2
+%{_pkgconfigdir}/freerdp-client2.pc
+%{_pkgconfigdir}/freerdp-server2.pc
+%{_pkgconfigdir}/freerdp-shadow2.pc
+%{_pkgconfigdir}/freerdp2.pc
+%{_pkgconfigdir}/uwac0.pc
+%{_pkgconfigdir}/winpr-tools2.pc
+%{_pkgconfigdir}/winpr2.pc
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
deleted file mode 100644
index c084c21..0000000
--- a/ffmpeg3.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -ur freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c freerdp-1.0.2.ffmpeg/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c
---- freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c	2016-04-04 21:17:22.515023232 +0900
-+++ freerdp-1.0.2.ffmpeg/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c	2016-04-04 21:16:59.521188035 +0900
-@@ -193,28 +193,28 @@
- 	switch (media_type->SubType)
- 	{
- 		case TSMF_SUB_TYPE_WVC1:
--			mdecoder->codec_id = CODEC_ID_VC1;
-+			mdecoder->codec_id = AV_CODEC_ID_VC1;
- 			break;
- 		case TSMF_SUB_TYPE_WMA2:
--			mdecoder->codec_id = CODEC_ID_WMAV2;
-+			mdecoder->codec_id = AV_CODEC_ID_WMAV2;
- 			break;
- 		case TSMF_SUB_TYPE_WMA9:
--			mdecoder->codec_id = CODEC_ID_WMAPRO;
-+			mdecoder->codec_id = AV_CODEC_ID_WMAPRO;
- 			break;
- 		case TSMF_SUB_TYPE_MP3:
--			mdecoder->codec_id = CODEC_ID_MP3;
-+			mdecoder->codec_id = AV_CODEC_ID_MP3;
- 			break;
- 		case TSMF_SUB_TYPE_MP2A:
--			mdecoder->codec_id = CODEC_ID_MP2;
-+			mdecoder->codec_id = AV_CODEC_ID_MP2;
- 			break;
- 		case TSMF_SUB_TYPE_MP2V:
--			mdecoder->codec_id = CODEC_ID_MPEG2VIDEO;
-+			mdecoder->codec_id = AV_CODEC_ID_MPEG2VIDEO;
- 			break;
- 		case TSMF_SUB_TYPE_WMV3:
--			mdecoder->codec_id = CODEC_ID_WMV3;
-+			mdecoder->codec_id = AV_CODEC_ID_WMV3;
- 			break;
- 		case TSMF_SUB_TYPE_AAC:
--			mdecoder->codec_id = CODEC_ID_AAC;
-+			mdecoder->codec_id = AV_CODEC_ID_AAC;
- 			/* For AAC the pFormat is a HEAACWAVEINFO struct, and the codec data
- 			   is at the end of it. See
- 			   http://msdn.microsoft.com/en-us/library/dd757806.aspx */
-@@ -226,10 +226,10 @@
- 			break;
- 		case TSMF_SUB_TYPE_H264:
- 		case TSMF_SUB_TYPE_AVC1:
--			mdecoder->codec_id = CODEC_ID_H264;
-+			mdecoder->codec_id = AV_CODEC_ID_H264;
- 			break;
- 		case TSMF_SUB_TYPE_AC3:
--			mdecoder->codec_id = CODEC_ID_AC3;
-+			mdecoder->codec_id = AV_CODEC_ID_AC3;
- 			break;
- 		default:
- 			return false;
-@@ -351,19 +351,29 @@
- 			}
- 			dst += mdecoder->decoded_size;
- 		}
-+		
- 		frame_size = mdecoder->decoded_size_max - mdecoder->decoded_size;
- #if LIBAVCODEC_VERSION_MAJOR < 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR <= 20)
- 		len = avcodec_decode_audio2(mdecoder->codec_context,
--			(int16_t*) dst, &frame_size,
--			src, src_size);
-+			(int16_t*) dst, &frame_size, src, src_size);
- #else
- 		{
-+            AVFrame* decoded_frame = avcodec_alloc_frame();
-+			int got_frame = 0;
- 			AVPacket pkt;
- 			av_init_packet(&pkt);
- 			pkt.data = (uint8*) src;
- 			pkt.size = src_size;
--			len = avcodec_decode_audio3(mdecoder->codec_context,
--				(int16_t*) dst, &frame_size, &pkt);
-+			len = avcodec_decode_audio4(mdecoder->codec_context, decoded_frame, &got_frame, &pkt);
-+			
-+			if (len >= 0 && got_frame)
-+			{
-+	            frame_size = av_samples_get_buffer_size(NULL, mdecoder->codec_context->channels,
-+					decoded_frame->nb_samples, mdecoder->codec_context->sample_fmt, 1);
-+				memcpy(dst, decoded_frame->data[0], frame_size);
-+			}
-+			
-+			av_free(decoded_frame);
- 		}
- #endif
- 		if (len <= 0 || frame_size <= 0)
-@@ -435,7 +445,7 @@
- 
- 	switch (mdecoder->codec_context->pix_fmt)
- 	{
--		case PIX_FMT_YUV420P:
-+		case AV_PIX_FMT_YUV420P:
- 			return RDP_PIXFMT_I420;
- 
- 		default:
diff --git a/freerdp-DirectFB-include.patch b/freerdp-DirectFB-include.patch
new file mode 100644
index 0000000..088e284
--- /dev/null
+++ b/freerdp-DirectFB-include.patch
@@ -0,0 +1,10 @@
+--- FreeRDP-master/client/DirectFB/dfreerdp.c.orig	2016-05-18 17:30:25.000000000 +0200
++++ FreeRDP-master/client/DirectFB/dfreerdp.c	2016-05-19 14:33:25.427474854 +0200
+@@ -23,7 +23,6 @@
+ 
+ #include <freerdp/freerdp.h>
+ #include <freerdp/constants.h>
+-#include <freerdp/utils/event.h>
+ 
+ #include <freerdp/client/file.h>
+ #include <freerdp/client/cmdline.h>
diff --git a/freerdp-ffmpeg.patch b/freerdp-ffmpeg.patch
deleted file mode 100644
index ebf0c2d..0000000
--- a/freerdp-ffmpeg.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c.orig	2013-01-02 22:46:59.000000000 +0100
-+++ freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c	2013-09-26 18:29:52.693695785 +0200
-@@ -39,7 +39,7 @@
- 	ITSMFDecoder iface;
- 
- 	int media_type;
--	enum CodecID codec_id;
-+	enum AVCodecID codec_id;
- 	AVCodecContext* codec_context;
- 	AVCodec* codec;
- 	AVFrame* frame;
-@@ -54,7 +54,7 @@
- {
- 	TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
- 
--	mdecoder->codec_context = avcodec_alloc_context();
-+	mdecoder->codec_context = avcodec_alloc_context3(NULL);
- 	if (!mdecoder->codec_context)
- 	{
- 		DEBUG_WARN("avcodec_alloc_context failed.");
-@@ -88,16 +88,6 @@
- 	mdecoder->codec_context->channels = media_type->Channels;
- 	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;
--#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
--#endif
--
- 	return true;
- }
- 
-@@ -174,7 +164,7 @@
- {
- 	TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
- 
--	if (avcodec_open(mdecoder->codec_context, mdecoder->codec) < 0)
-+	if (avcodec_open2(mdecoder->codec_context, mdecoder->codec, NULL) < 0)
- 	{
- 		DEBUG_WARN("avcodec_open failed.");
- 		return false;
-@@ -337,7 +327,7 @@
- #endif
- 
- 	if (mdecoder->decoded_size_max == 0)
--		mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
-+		mdecoder->decoded_size_max = 192000 /* AVCODEC_MAX_AUDIO_FRAME_SIZE */ + 16;
- 	mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max);
- 	/* align the memory for SSE2 needs */
- 	dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
-@@ -348,7 +338,7 @@
- 	while (src_size > 0)
- 	{
- 		/* Ensure enough space for decoding */
--		if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE)
-+		if (mdecoder->decoded_size_max - mdecoder->decoded_size < 192000 /* AVCODEC_MAX_AUDIO_FRAME_SIZE */)
- 		{
- 			mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16;
- 			mdecoder->decoded_data = xrealloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
-@@ -499,7 +489,6 @@
- 
- 	if (!initialized)
- 	{
--		avcodec_init();
- 		avcodec_register_all();
- 		initialized = true;
- 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/freerdp.git/commitdiff/e2f5e56915b3412fe15b23b52f8a9cfd31a9a6d8



More information about the pld-cvs-commit mailing list