Expose client rdpsnd get context function

This commit is contained in:
akallabeth 2022-06-23 09:17:10 +02:00 committed by akallabeth
parent f1d3d457fb
commit c698f7e7d9
2 changed files with 40 additions and 33 deletions

View File

@ -29,8 +29,6 @@
#define TAG CHANNELS_TAG("rdpsnd.client") #define TAG CHANNELS_TAG("rdpsnd.client")
FREERDP_API rdpContext* freerdp_rdpsnd_get_context(rdpsndPlugin* rdpsnd);
#if defined(WITH_DEBUG_SND) #if defined(WITH_DEBUG_SND)
#define DEBUG_SND(...) WLog_DBG(TAG, __VA_ARGS__) #define DEBUG_SND(...) WLog_DBG(TAG, __VA_ARGS__)
#else #else

View File

@ -22,27 +22,31 @@
#define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H #define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H
#include <freerdp/channels/rdpsnd.h> #include <freerdp/channels/rdpsnd.h>
#ifdef __cplusplus
extern "C"
{
#endif
/** /**
* Subsystem Interface * Subsystem Interface
*/ */
typedef struct rdpsnd_plugin rdpsndPlugin; typedef struct rdpsnd_plugin rdpsndPlugin;
typedef struct rdpsnd_device_plugin rdpsndDevicePlugin; typedef struct rdpsnd_device_plugin rdpsndDevicePlugin;
typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format); typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format);
typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency); typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency);
typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device); typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device);
typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value); typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value);
typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size); typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size);
typedef void (*pcStart)(rdpsndDevicePlugin* device); typedef void (*pcStart)(rdpsndDevicePlugin* device);
typedef void (*pcClose)(rdpsndDevicePlugin* device); typedef void (*pcClose)(rdpsndDevicePlugin* device);
typedef void (*pcFree)(rdpsndDevicePlugin* device); typedef void (*pcFree)(rdpsndDevicePlugin* device);
typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired, typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired,
AUDIO_FORMAT* defaultFormat); AUDIO_FORMAT* defaultFormat);
struct rdpsnd_device_plugin struct rdpsnd_device_plugin
{ {
rdpsndPlugin* rdpsnd; rdpsndPlugin* rdpsnd;
pcFormatSupported FormatSupported; pcFormatSupported FormatSupported;
@ -54,7 +58,7 @@ struct rdpsnd_device_plugin
pcClose Close; pcClose Close;
pcFree Free; pcFree Free;
pcDefaultFormat DefaultFormat; pcDefaultFormat DefaultFormat;
}; };
#define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry" #define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry"
@ -70,4 +74,9 @@ typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS;
typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints); typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
FREERDP_API rdpContext* freerdp_rdpsnd_get_context(rdpsndPlugin* plugin);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H */ #endif /* FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H */