FreeRDP
client/rdpgfx_main.c File Reference
#include <freerdp/config.h>
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/wlog.h>
#include <winpr/print.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
#include <winpr/sysinfo.h>
#include <winpr/cmdline.h>
#include <winpr/collections.h>
#include <freerdp/addin.h>
#include <freerdp/channels/log.h>
#include "rdpgfx_common.h"
#include "rdpgfx_codec.h"
#include "rdpgfx_main.h"

Macros

#define TAG   CHANNELS_TAG("rdpgfx.client")
 

Functions

static BOOL delete_surface (const void *key, void *value, void *arg)
 
static void free_surfaces (RdpgfxClientContext *context, wHashTable *SurfaceTable)
 
static void evict_cache_slots (RdpgfxClientContext *context, UINT16 MaxCacheSlots, void **CacheSlots)
 
static UINT rdpgfx_send_caps_advertise_pdu (RdpgfxClientContext *context, const RDPGFX_CAPS_ADVERTISE_PDU *pdu)
 
static BOOL rdpgfx_is_capability_filtered (RDPGFX_PLUGIN *gfx, UINT32 caps)
 
static UINT rdpgfx_send_supported_caps (GENERIC_CHANNEL_CALLBACK *callback)
 
static UINT rdpgfx_recv_caps_confirm_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_send_frame_acknowledge_pdu (RdpgfxClientContext *context, const RDPGFX_FRAME_ACKNOWLEDGE_PDU *pdu)
 
static UINT rdpgfx_send_qoe_frame_acknowledge_pdu (RdpgfxClientContext *context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU *pdu)
 
static UINT rdpgfx_recv_reset_graphics_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_evict_cache_entry_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_load_cache_import_offer (RDPGFX_PLUGIN *gfx, RDPGFX_CACHE_IMPORT_OFFER_PDU *offer)
 
static UINT rdpgfx_save_persistent_cache (RDPGFX_PLUGIN *gfx)
 
static UINT rdpgfx_send_cache_import_offer_pdu (RdpgfxClientContext *context, const RDPGFX_CACHE_IMPORT_OFFER_PDU *pdu)
 
static UINT rdpgfx_send_cache_offer (RDPGFX_PLUGIN *gfx)
 
static UINT rdpgfx_load_cache_import_reply (RDPGFX_PLUGIN *gfx, const RDPGFX_CACHE_IMPORT_REPLY_PDU *reply)
 
static UINT rdpgfx_recv_cache_import_reply_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_create_surface_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_delete_surface_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_start_frame_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_end_frame_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_wire_to_surface_1_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_wire_to_surface_2_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_delete_encoding_context_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_solid_fill_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_surface_to_surface_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_surface_to_cache_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_cache_to_surface_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_map_surface_to_output_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_map_surface_to_scaled_output_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_map_surface_to_window_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_map_surface_to_scaled_window_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_recv_pdu (GENERIC_CHANNEL_CALLBACK *callback, wStream *s)
 
static UINT rdpgfx_on_data_received (IWTSVirtualChannelCallback *pChannelCallback, wStream *data)
 
static UINT rdpgfx_on_open (IWTSVirtualChannelCallback *pChannelCallback)
 
static UINT rdpgfx_on_close (IWTSVirtualChannelCallback *pChannelCallback)
 
static void terminate_plugin_cb (GENERIC_DYNVC_PLUGIN *base)
 
static UINT rdpgfx_set_surface_data (RdpgfxClientContext *context, UINT16 surfaceId, void *pData)
 
static UINT rdpgfx_get_surface_ids (RdpgfxClientContext *context, UINT16 **ppSurfaceIds, UINT16 *count_out)
 
static void * rdpgfx_get_surface_data (RdpgfxClientContext *context, UINT16 surfaceId)
 
static UINT rdpgfx_set_cache_slot_data (RdpgfxClientContext *context, UINT16 cacheSlot, void *pData)
 
static void * rdpgfx_get_cache_slot_data (RdpgfxClientContext *context, UINT16 cacheSlot)
 
static UINT init_plugin_cb (GENERIC_DYNVC_PLUGIN *base, rdpContext *rcontext, rdpSettings *settings)
 
void rdpgfx_client_context_free (RdpgfxClientContext *context)
 

Variables

static const IWTSVirtualChannelCallback rdpgfx_callbacks
 

Macro Definition Documentation

◆ TAG

#define TAG   CHANNELS_TAG("rdpgfx.client")

FreeRDP: A Remote Desktop Protocol Implementation Graphics Pipeline Extension

Copyright 2013-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com Copyright 2016 Thincast Technologies GmbH Copyright 2016 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ delete_surface()

static BOOL delete_surface ( const void *  key,
void *  value,
void *  arg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evict_cache_slots()

static void evict_cache_slots ( RdpgfxClientContext *  context,
UINT16  MaxCacheSlots,
void **  CacheSlots 
)
static
Here is the caller graph for this function:

◆ free_surfaces()

static void free_surfaces ( RdpgfxClientContext *  context,
wHashTable *  SurfaceTable 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_plugin_cb()

static UINT init_plugin_cb ( GENERIC_DYNVC_PLUGIN base,
rdpContext *  rcontext,
rdpSettings *  settings 
)
static
Here is the call graph for this function:

◆ rdpgfx_client_context_free()

void rdpgfx_client_context_free ( RdpgfxClientContext *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_get_cache_slot_data()

static void* rdpgfx_get_cache_slot_data ( RdpgfxClientContext *  context,
UINT16  cacheSlot 
)
static
Here is the caller graph for this function:

◆ rdpgfx_get_surface_data()

static void* rdpgfx_get_surface_data ( RdpgfxClientContext *  context,
UINT16  surfaceId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_get_surface_ids()

static UINT rdpgfx_get_surface_ids ( RdpgfxClientContext *  context,
UINT16 **  ppSurfaceIds,
UINT16 count_out 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_is_capability_filtered()

static BOOL rdpgfx_is_capability_filtered ( RDPGFX_PLUGIN gfx,
UINT32  caps 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_load_cache_import_offer()

static UINT rdpgfx_load_cache_import_offer ( RDPGFX_PLUGIN gfx,
RDPGFX_CACHE_IMPORT_OFFER_PDU offer 
)
static

Load cache import offer from file (offline replay)

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:

◆ rdpgfx_load_cache_import_reply()

static UINT rdpgfx_load_cache_import_reply ( RDPGFX_PLUGIN gfx,
const RDPGFX_CACHE_IMPORT_REPLY_PDU reply 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_on_close()

static UINT rdpgfx_on_close ( IWTSVirtualChannelCallback *  pChannelCallback)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:

◆ rdpgfx_on_data_received()

static UINT rdpgfx_on_data_received ( IWTSVirtualChannelCallback *  pChannelCallback,
wStream data 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:

◆ rdpgfx_on_open()

static UINT rdpgfx_on_open ( IWTSVirtualChannelCallback *  pChannelCallback)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:

◆ rdpgfx_recv_cache_import_reply_pdu()

static UINT rdpgfx_recv_cache_import_reply_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_cache_to_surface_pdu()

static UINT rdpgfx_recv_cache_to_surface_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_caps_confirm_pdu()

static UINT rdpgfx_recv_caps_confirm_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_create_surface_pdu()

static UINT rdpgfx_recv_create_surface_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_delete_encoding_context_pdu()

static UINT rdpgfx_recv_delete_encoding_context_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_delete_surface_pdu()

static UINT rdpgfx_recv_delete_surface_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_end_frame_pdu()

static UINT rdpgfx_recv_end_frame_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_evict_cache_entry_pdu()

static UINT rdpgfx_recv_evict_cache_entry_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_map_surface_to_output_pdu()

static UINT rdpgfx_recv_map_surface_to_output_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_map_surface_to_scaled_output_pdu()

static UINT rdpgfx_recv_map_surface_to_scaled_output_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_map_surface_to_scaled_window_pdu()

static UINT rdpgfx_recv_map_surface_to_scaled_window_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_map_surface_to_window_pdu()

static UINT rdpgfx_recv_map_surface_to_window_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_pdu()

static UINT rdpgfx_recv_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_reset_graphics_pdu()

static UINT rdpgfx_recv_reset_graphics_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_solid_fill_pdu()

static UINT rdpgfx_recv_solid_fill_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_start_frame_pdu()

static UINT rdpgfx_recv_start_frame_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_surface_to_cache_pdu()

static UINT rdpgfx_recv_surface_to_cache_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_surface_to_surface_pdu()

static UINT rdpgfx_recv_surface_to_surface_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_wire_to_surface_1_pdu()

static UINT rdpgfx_recv_wire_to_surface_1_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_recv_wire_to_surface_2_pdu()

static UINT rdpgfx_recv_wire_to_surface_2_pdu ( GENERIC_CHANNEL_CALLBACK callback,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_save_persistent_cache()

static UINT rdpgfx_save_persistent_cache ( RDPGFX_PLUGIN gfx)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_send_cache_import_offer_pdu()

static UINT rdpgfx_send_cache_import_offer_pdu ( RdpgfxClientContext *  context,
const RDPGFX_CACHE_IMPORT_OFFER_PDU pdu 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_send_cache_offer()

static UINT rdpgfx_send_cache_offer ( RDPGFX_PLUGIN gfx)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_send_caps_advertise_pdu()

static UINT rdpgfx_send_caps_advertise_pdu ( RdpgfxClientContext *  context,
const RDPGFX_CAPS_ADVERTISE_PDU pdu 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_send_frame_acknowledge_pdu()

static UINT rdpgfx_send_frame_acknowledge_pdu ( RdpgfxClientContext *  context,
const RDPGFX_FRAME_ACKNOWLEDGE_PDU pdu 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_send_qoe_frame_acknowledge_pdu()

static UINT rdpgfx_send_qoe_frame_acknowledge_pdu ( RdpgfxClientContext *  context,
const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU pdu 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_send_supported_caps()

static UINT rdpgfx_send_supported_caps ( GENERIC_CHANNEL_CALLBACK callback)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpgfx_set_cache_slot_data()

static UINT rdpgfx_set_cache_slot_data ( RdpgfxClientContext *  context,
UINT16  cacheSlot,
void *  pData 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the caller graph for this function:

◆ rdpgfx_set_surface_data()

static UINT rdpgfx_set_surface_data ( RdpgfxClientContext *  context,
UINT16  surfaceId,
void *  pData 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ terminate_plugin_cb()

static void terminate_plugin_cb ( GENERIC_DYNVC_PLUGIN base)
static
Here is the call graph for this function:

Variable Documentation

◆ rdpgfx_callbacks

const IWTSVirtualChannelCallback rdpgfx_callbacks
static
Initial value:
NULL }
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
static UINT rdpgfx_on_close(IWTSVirtualChannelCallback *pChannelCallback)
Definition: client/rdpgfx_main.c:2175
static UINT rdpgfx_on_open(IWTSVirtualChannelCallback *pChannelCallback)
Definition: client/rdpgfx_main.c:2144
static UINT rdpgfx_on_data_received(IWTSVirtualChannelCallback *pChannelCallback, wStream *data)
Definition: client/rdpgfx_main.c:2094