rdpsnd.h (2725B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Audio Output Virtual Channel 4 * 5 * Copyright 2010-2011 Vic Lee 6 * Copyright 2012-2013 Marc-Andre Moreau <marcandre.moreau@gmail.com> 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21#ifndef FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H 22#define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H 23 24#include <freerdp/channels/rdpsnd.h> 25 26#define RDPSND_DVC_CHANNEL_NAME "AUDIO_PLAYBACK_DVC" 27 28/** 29 * Subsystem Interface 30 */ 31typedef struct rdpsnd_plugin rdpsndPlugin; 32 33typedef struct rdpsnd_device_plugin rdpsndDevicePlugin; 34 35typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format); 36typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency); 37typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device); 38typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value); 39typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size); 40typedef void (*pcStart)(rdpsndDevicePlugin* device); 41typedef void (*pcClose)(rdpsndDevicePlugin* device); 42typedef void (*pcFree)(rdpsndDevicePlugin* device); 43typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired, 44 AUDIO_FORMAT* defaultFormat); 45 46struct rdpsnd_device_plugin 47{ 48 rdpsndPlugin* rdpsnd; 49 50 pcFormatSupported FormatSupported; 51 pcOpen Open; 52 pcGetVolume GetVolume; 53 pcSetVolume SetVolume; 54 pcPlay Play; 55#if !defined(DEFINE_NO_DEPRECATED) 56 pcStart Start; /* Deprecated, unused. */ 57#endif 58 pcClose Close; 59 pcFree Free; 60 pcDefaultFormat DefaultFormat; 61}; 62 63#define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry" 64 65typedef void (*PREGISTERRDPSNDDEVICE)(rdpsndPlugin* rdpsnd, rdpsndDevicePlugin* device); 66 67struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS 68{ 69 rdpsndPlugin* rdpsnd; 70 PREGISTERRDPSNDDEVICE pRegisterRdpsndDevice; 71 ADDIN_ARGV* args; 72}; 73typedef struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS FREERDP_RDPSND_DEVICE_ENTRY_POINTS; 74typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS; 75 76typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints); 77 78#endif /* FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H */