2013-10-19 20:38:31 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
* Audio Output Virtual Channel
|
|
|
|
*
|
|
|
|
* Copyright 2010-2011 Vic Lee
|
|
|
|
* Copyright 2012-2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#ifndef FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H
|
|
|
|
#define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H
|
2013-10-19 20:38:31 +04:00
|
|
|
|
|
|
|
#include <freerdp/channels/rdpsnd.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Subsystem Interface
|
|
|
|
*/
|
|
|
|
typedef struct rdpsnd_plugin rdpsndPlugin;
|
|
|
|
|
|
|
|
typedef struct rdpsnd_device_plugin rdpsndDevicePlugin;
|
|
|
|
|
2018-02-20 14:15:30 +03:00
|
|
|
typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format);
|
|
|
|
typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency);
|
2018-04-03 12:18:22 +03:00
|
|
|
typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device);
|
2018-02-20 14:15:30 +03:00
|
|
|
typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value);
|
|
|
|
typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size);
|
|
|
|
typedef void (*pcStart)(rdpsndDevicePlugin* device);
|
|
|
|
typedef void (*pcClose)(rdpsndDevicePlugin* device);
|
|
|
|
typedef void (*pcFree)(rdpsndDevicePlugin* device);
|
2020-01-08 13:27:49 +03:00
|
|
|
typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired,
|
|
|
|
AUDIO_FORMAT* defaultFormat);
|
2013-10-19 20:38:31 +04:00
|
|
|
|
|
|
|
struct rdpsnd_device_plugin
|
|
|
|
{
|
|
|
|
rdpsndPlugin* rdpsnd;
|
|
|
|
|
|
|
|
pcFormatSupported FormatSupported;
|
|
|
|
pcOpen Open;
|
|
|
|
pcGetVolume GetVolume;
|
|
|
|
pcSetVolume SetVolume;
|
|
|
|
pcPlay Play;
|
2020-01-08 13:27:49 +03:00
|
|
|
pcStart Start; /* Deprecated, unused. */
|
2013-10-19 20:38:31 +04:00
|
|
|
pcClose Close;
|
|
|
|
pcFree Free;
|
2020-01-08 13:27:49 +03:00
|
|
|
pcDefaultFormat DefaultFormat;
|
2013-10-19 20:38:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry"
|
|
|
|
|
|
|
|
typedef void (*PREGISTERRDPSNDDEVICE)(rdpsndPlugin* rdpsnd, rdpsndDevicePlugin* device);
|
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2013-10-19 20:38:31 +04:00
|
|
|
{
|
|
|
|
rdpsndPlugin* rdpsnd;
|
|
|
|
PREGISTERRDPSNDDEVICE pRegisterRdpsndDevice;
|
2020-11-18 09:51:45 +03:00
|
|
|
const ADDIN_ARGV* args;
|
2022-02-14 16:59:22 +03:00
|
|
|
} FREERDP_RDPSND_DEVICE_ENTRY_POINTS;
|
2013-10-19 20:38:31 +04:00
|
|
|
typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS;
|
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
|
2013-10-19 20:38:31 +04:00
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#endif /* FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H */
|