Skip to content

Commit

Permalink
Introduce XRDP_H264 macro to indicate any H264 encoder enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
metalefty committed Aug 27, 2024
1 parent 07e4e23 commit 7238f8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions xrdp/xrdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
#include "xrdp_client_info.h"
#include "log.h"

#if defined(XRDP_X264) || defined(XRDP_OPENH264) || defined(XRDP_NVENC)
#if !defined(XRDP_H264)
#define XRDP_H264 1
#endif
#else
#undef XRDP_H264
#endif

/* xrdp.c */
long
g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1,
Expand Down
2 changes: 1 addition & 1 deletion xrdp/xrdp_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ xrdp_mm_egfx_caps_advertise(void *user, int caps_count,
/* prefer h264, todo use setting in xrdp.ini for this */
if (best_h264_index >= 0)
{
#if defined(XRDP_X264) || defined(XRDP_NVENC)
#if defined(XRDP_H264)
best_index = best_h264_index;
self->egfx_flags = XRDP_EGFX_H264;
#endif
Expand Down

0 comments on commit 7238f8f

Please sign in to comment.