Bug 94520 - lastest freerdp changes rfx/nsc_context_reset signature
Summary: lastest freerdp changes rfx/nsc_context_reset signature
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-12 23:40 UTC by comicfans44
Modified: 2016-05-23 22:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description comicfans44 2016-03-12 23:40:02 UTC
lastest freerdp changes 
rfx/nsc_context_reset(NSC_CONTEXT* context);
to
rfx/nsc_context_reset(NSC_CONTEXT* context, UINT32 width, UINT32 height);

compositor-rdp.c needs update with this.

following patch makes it compile but I'm not sure this is logical correct.

diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index e603b76..9edbdfc 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -867,9 +867,9 @@ xf_peer_activate(freerdp_peer* client)
                }
        }
 
-       rfx_context_reset(peerCtx->rfx_context);
+       rfx_context_reset(peerCtx->rfx_context,settings->DesktopWidth,settings->DesktopHeight);
 #ifdef HAVE_NSC_RESET
-       nsc_context_reset(peerCtx->nsc_context);
+       nsc_context_reset(peerCtx->nsc_context,settings->DesktopWidth,settings->DesktopHeight);
 #endif
 
        if (peersItem->flags & RDP_PEER_ACTIVATED)
Comment 1 comicfans44 2016-03-18 00:30:15 UTC
lastest freerdp also changed pkg-config file name to freerdp2.pc instead of freerdp.pc so weston can't find it
Comment 2 Adam Williamson 2016-04-23 00:56:18 UTC
I saw this too, and came up with something similar:

diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 773b6b5..e47bb79 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -867,9 +867,9 @@ xf_peer_activate(freerdp_peer* client)
                }
        }
 
-       rfx_context_reset(peerCtx->rfx_context);
+       rfx_context_reset(peerCtx->rfx_context, output->base.width, output->base.height);
 #ifdef HAVE_NSC_RESET
-       nsc_context_reset(peerCtx->nsc_context);
+       nsc_context_reset(peerCtx->nsc_context, output->base.width, output->base.height);
 #endif
 
        if (peersItem->flags & RDP_PEER_ACTIVATED)


Dunno whether it's better to use output or settings. Although, going by the rest of the code, aren't the settings values strings or something, since the code keeps running them through int() ?

I also have a patch for the pkgconfig module name change, which is obviously trivial:

diff --git a/configure.ac b/configure.ac
index 670200c..6dafb7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,7 +242,7 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
                [test x$enable_rdp_compositor = xyes])
 if test x$enable_rdp_compositor = xyes; then
   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
-  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 1.1.0])
 
   SAVED_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
Comment 3 Adam Williamson 2016-04-23 00:57:18 UTC
Note that upstream freerdp changed ABI too, so Fedora Rawhide weston is now broken and this will hit other distros soon too, most likely.
Comment 4 Bryce Harrington 2016-05-23 22:20:42 UTC
commit 58b63ab7f1eec70c421b42a509f13dbc08a558ad
Author:     FORT David <rdp.effort@gmail.com>
AuthorDate: Sun May 1 23:32:07 2016 +0200
Commit:     Bryce Harrington <bryce@osg.samsung.com>
CommitDate: Thu May 19 14:48:17 2016 -0700

    rdp: allow to compile against FreeRDP 2.0
    
    FreeRDP 2.0 is about to be released, this allows to compile against this version.
    The detection is adjusted to prefer FreeRDP 2 against version 1.x.
    
    Signed-off-by: David Fort <contact@hardening-consulting.com>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

[I think the above patch covered everything mentioned here; if not feel free to reopen with a suggested patch.]


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.