[gnome-remote-desktop] session-rdp: Add API to notify whether the graphics pipeline is ready
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] session-rdp: Add API to notify whether the graphics pipeline is ready
- Date: Fri, 3 Sep 2021 09:34:42 +0000 (UTC)
commit 5dbed5589c7391c59643e42bf8a554b3f426ed75
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Sat Mar 20 18:07:54 2021 +0100
session-rdp: Add API to notify whether the graphics pipeline is ready
The graphics pipeline will use this API, when the capability exchange
or protocol reset is done.
This will later (re)start the encoding process.
src/grd-session-rdp.c | 13 +++++++++++++
src/grd-session-rdp.h | 2 ++
2 files changed, 15 insertions(+)
---
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index e0916c2..44bedb5 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -210,6 +210,19 @@ unset_rdp_peer_flag (RdpPeerContext *rdp_peer_context,
g_mutex_unlock (&rdp_peer_context->flags_mutex);
}
+void
+grd_session_rdp_notify_graphics_pipeline_ready (GrdSessionRdp *session_rdp)
+{
+ freerdp_peer *peer = session_rdp->peer;
+ RdpPeerContext *rdp_peer_context = (RdpPeerContext *) peer->context;
+
+ set_rdp_peer_flag (rdp_peer_context, RDP_PEER_ALL_SURFACES_INVALID);
+ set_rdp_peer_flag (rdp_peer_context, RDP_PEER_PENDING_GFX_GRAPHICS_RESET);
+ unset_rdp_peer_flag (rdp_peer_context, RDP_PEER_PENDING_GFX_INIT);
+
+ g_source_set_ready_time (session_rdp->pending_encode_source, 0);
+}
+
void
grd_session_rdp_resize_framebuffer (GrdSessionRdp *session_rdp,
uint32_t width,
diff --git a/src/grd-session-rdp.h b/src/grd-session-rdp.h
index 2781d8c..465bccf 100644
--- a/src/grd-session-rdp.h
+++ b/src/grd-session-rdp.h
@@ -38,6 +38,8 @@ GrdSessionRdp *grd_session_rdp_new (GrdRdpServer *rdp_server,
void grd_session_rdp_notify_error (GrdSessionRdp *session_rdp,
uint32_t error_info);
+void grd_session_rdp_notify_graphics_pipeline_ready (GrdSessionRdp *session_rdp);
+
int grd_session_rdp_get_stride_for_width (GrdSessionRdp *session_rdp,
int width);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]