kumquat-buildroot/package/vlc/0009-Add-support-for-freerdp2.patch

151 lines
5.3 KiB
Diff
Raw Normal View History

package/vlc: bump version to 3.0.3 vlc depends on gcc-4.9+: https://mailman.videolan.org/pipermail/vlc-devel/2016-September/109452.html Added fix for stack-protector detection. Disabled all new optional dependencies for now, subsequent patches will enable dependencies with buildroot packages present. Removed gles1 configure option after http://git.videolan.org/?p=vlc.git;a=commitdiff;h=6c4bb081844c51a9a1b1cdb44fc5f42e5a879327 Renamed mmal configure options after http://git.videolan.org/?p=vlc.git;a=commitdiff;h=bdb1d86acfb0d0068e57281b6fbfc52345960d29 http://git.videolan.org/?p=vlc.git;a=commitdiff;h=1d2b56c68bbc3287e17f6140bdf8c8c3efe08fdc Renamed avahi configure option after http://git.videolan.org/?p=vlc.git;a=commitdiff;h=55280fa62cb68b71767778c56250352b4840b69a Removed directfb support after being dropped upstream: http://git.videolan.org/?p=vlc.git;a=commitdiff;h=8e1a0e876615da31321203090daa7c8699b6406d Renamed matroska configure option after http://git.videolan.org/?p=vlc.git;a=commitdiff;h=156ceb73e2f46618a6cffb081e71e368a315ec3e Replaced qt4 support with qt5: http://git.videolan.org/?p=vlc.git;a=commitdiff;h=1c221a77d92935866e897254c07e1d12a4b95ae0 Removed sdl support: http://git.videolan.org/?p=vlc.git;a=commitdiff;h=4b8a2755fe8c0e3e1e9c52483b22c26e24fd5527 Removed --enable-xcb in BR2_PACKAGE_XCB_UTIL_KEYSYMS block, it is already present in the BR2_PACKAGE_LIBXCB block. Rebased patches - 0001-Disable-building-of-statically-linked-vlc-binary.patch - 0007-Don-t-assume-strerror_l-is-available.patch - 0009-x264-drop-148-build-support-and-fix-10bit-support.patch also renamed from 0013 Removed patches - 0002-configure.ac-add-check-for-libgcrypt-config-program.patch not needed anymore after upstream commit http://git.videolan.org/?p=vlc.git;a=commitdiff;h=f94ac7241f33b6896a8e12ae4e3e43d9fd7fb6cc - 0004-Drop-error-implicit-function-declaration-compile-fla.patch - 0006-Don-t-assume-X11-is-available-when-Qt5-is-used.patch removed, qt4 is not supported anymore - 0008-fix-fallback-code-and-add-required-realtime-library-.patch - 0009-Changes-for-ffmpeg-3.0.patch - 0010-Fix-build-when-using-C99-and-C-11.patch - 0011-compat-fix-static_assert.patch - 0012-Fix-build-with-libupnp-above-1.6.23.patch New patches - 0002-lua-Define-LUA_COMPAT_APIINTCASTS-for-Lua-5.3.0-comp.patch to fix lua-5.3 support - 0004-qt-fix-build-against-Qt-5.11.patch - 0006-Fix-build-error-using-uClibc-by-adding-sys-types.h.patch - 0008-posix-remove-ancient-run-time-fallback-to-real-time-.patch - 0010-Add-support-for-freerdp2.patch fixes support for freerdp >= 2.0 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> [Thomas: use Git formatted patches.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-12 22:29:25 +02:00
From 3780bbb20bf35aa8f21ac672da3f0c5f408468e9 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Thu, 16 Aug 2018 12:27:40 +0200
Subject: [PATCH] Add support for freerdp2
Downloaded from
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/vlc/files/vlc-2.2.8-freerdp-2.patch
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
configure.ac | 2 +-
modules/access/rdp.c | 51 ++++++++++++++-------------------------------------
2 files changed, 15 insertions(+), 38 deletions(-)
diff --git a/configure.ac b/configure.ac
index bfe43512a2..4808b8becf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1992,7 +1992,7 @@ PKG_ENABLE_MODULES_VLC([VNC], [vnc], [libvncclient >= 0.9.9], (VNC/rfb client su
dnl RDP/Remote Desktop access module
dnl
-PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) )
+PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp2 >= 1.0.1], (RDP/Remote Desktop client support) )
dnl
dnl Real RTSP plugin
diff --git a/modules/access/rdp.c b/modules/access/rdp.c
index 2992090219..49986f5da9 100644
--- a/modules/access/rdp.c
+++ b/modules/access/rdp.c
@@ -45,18 +45,6 @@
# include <freerdp/version.h>
#endif
-#if !defined(FREERDP_VERSION_MAJOR) || \
- (defined(FREERDP_VERSION_MAJOR) && !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1)))
-# define SoftwareGdi sw_gdi
-# define Fullscreen fullscreen
-# define ServerHostname hostname
-# define Username username
-# define Password password
-# define ServerPort port
-# define EncryptionMethods encryption
-# define ContextSize context_size
-#endif
-
#include <errno.h>
#ifdef HAVE_POLL
# include <poll.h>
@@ -144,6 +132,7 @@ static void desktopResizeHandler( rdpContext *p_context )
vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_context;
demux_sys_t *p_sys = p_vlccontext->p_demux->p_sys;
rdpGdi *p_gdi = p_context->gdi;
+ unsigned bytesPerPixel;
if ( p_sys->es )
{
@@ -153,17 +142,21 @@ static void desktopResizeHandler( rdpContext *p_context )
/* Now init and fill es format */
vlc_fourcc_t i_chroma;
- switch( p_gdi->bytesPerPixel )
+ switch( p_gdi->dstFormat )
{
default:
- case 16:
+ msg_Dbg( p_vlccontext->p_demux, "unhandled dstFormat %x bpp", p_gdi->dstFormat);
+ case PIXEL_FORMAT_BGR16:
i_chroma = VLC_CODEC_RGB16;
+ bytesPerPixel = 16;
break;
- case 24:
+ case PIXEL_FORMAT_BGR24:
i_chroma = VLC_CODEC_RGB24;
+ bytesPerPixel = 24;
break;
- case 32:
+ case PIXEL_FORMAT_BGRA32:
i_chroma = VLC_CODEC_RGB32;
+ bytesPerPixel = 32;
break;
}
es_format_t fmt;
@@ -176,7 +169,7 @@ static void desktopResizeHandler( rdpContext *p_context )
fmt.video.i_height = p_gdi->height;
fmt.video.i_frame_rate_base = 1000;
fmt.video.i_frame_rate = 1000 * p_sys->f_fps;
- p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * p_gdi->bytesPerPixel;
+ p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * bytesPerPixel;
if ( p_sys->p_block )
p_sys->p_block = block_Realloc( p_sys->p_block, 0, p_sys->i_framebuffersize );
@@ -237,28 +230,19 @@ static bool postConnectHandler( freerdp *p_instance )
vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_instance->context;
msg_Dbg( p_vlccontext->p_demux, "connected to desktop %dx%d (%d bpp)",
-#if defined(FREERDP_VERSION_MAJOR) && (FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1))
p_instance->settings->DesktopWidth,
p_instance->settings->DesktopHeight,
p_instance->settings->ColorDepth
-#else
- p_instance->settings->width,
- p_instance->settings->height,
- p_instance->settings->color_depth
-#endif
);
p_instance->update->DesktopResize = desktopResizeHandler;
p_instance->update->BeginPaint = beginPaintHandler;
p_instance->update->EndPaint = endPaintHandler;
- gdi_init( p_instance,
- CLRBUF_16BPP |
-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \
- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2))
- CLRBUF_24BPP |
-#endif
- CLRBUF_32BPP, NULL );
+ if ( p_instance->settings->ColorDepth > 16 )
+ gdi_init( p_instance, PIXEL_FORMAT_XRGB32);
+ else
+ gdi_init( p_instance, PIXEL_FORMAT_RGB16);
desktopResizeHandler( p_instance->context );
return true;
@@ -432,10 +416,6 @@ static int Open( vlc_object_t *p_this )
if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0;
p_sys->i_frame_interval = 1000000 / p_sys->f_fps;
-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2
- freerdp_channels_global_init();
-#endif
-
p_sys->p_instance = freerdp_new();
if ( !p_sys->p_instance )
{
@@ -508,9 +488,6 @@ static void Close( vlc_object_t *p_this )
freerdp_disconnect( p_sys->p_instance );
freerdp_free( p_sys->p_instance );
-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2
- freerdp_channels_global_uninit();
-#endif
if ( p_sys->p_block )
block_Release( p_sys->p_block );
--
2.14.4