2011-08-15 11:08:23 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-08-15 11:08:23 +04:00
|
|
|
* Audio Output Virtual Channel
|
|
|
|
*
|
|
|
|
* Copyright 2010-2011 Vic Lee
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RDPSND_MAIN_H
|
|
|
|
#define __RDPSND_MAIN_H
|
|
|
|
|
2012-05-24 10:03:21 +04:00
|
|
|
#include <freerdp/channels/rdpsnd.h>
|
2011-08-15 11:08:23 +04:00
|
|
|
|
2013-02-26 06:46:48 +04:00
|
|
|
struct _RDPSND_WAVE
|
|
|
|
{
|
|
|
|
BYTE* data;
|
|
|
|
int length;
|
|
|
|
|
|
|
|
BYTE cBlockNo;
|
|
|
|
UINT16 wFormatNo;
|
|
|
|
UINT16 wTimeStampA;
|
|
|
|
UINT16 wTimeStampB;
|
|
|
|
|
|
|
|
UINT16 wLatency;
|
|
|
|
UINT16 wAudioLength;
|
|
|
|
UINT16 wPlaybackDelay;
|
|
|
|
|
|
|
|
UINT32 wLocalTimeA;
|
|
|
|
UINT32 wLocalTimeB;
|
|
|
|
};
|
|
|
|
typedef struct _RDPSND_WAVE RDPSND_WAVE;
|
|
|
|
|
2012-05-24 10:03:21 +04:00
|
|
|
typedef struct rdpsnd_plugin rdpsndPlugin;
|
2011-08-15 11:08:23 +04:00
|
|
|
|
|
|
|
typedef struct rdpsnd_device_plugin rdpsndDevicePlugin;
|
|
|
|
|
2013-02-26 06:46:48 +04:00
|
|
|
typedef BOOL (*pcFormatSupported) (rdpsndDevicePlugin* device, AUDIO_FORMAT* format);
|
|
|
|
typedef void (*pcOpen) (rdpsndDevicePlugin* device, AUDIO_FORMAT* format, int latency);
|
|
|
|
typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, AUDIO_FORMAT* format, int latency);
|
2013-02-28 01:57:18 +04:00
|
|
|
typedef UINT32 (*pcGetVolume) (rdpsndDevicePlugin* device);
|
2012-10-09 11:26:39 +04:00
|
|
|
typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, UINT32 value);
|
2012-10-09 11:01:37 +04:00
|
|
|
typedef void (*pcPlay) (rdpsndDevicePlugin* device, BYTE* data, int size);
|
2011-08-15 12:58:07 +04:00
|
|
|
typedef void (*pcStart) (rdpsndDevicePlugin* device);
|
2011-08-15 12:28:52 +04:00
|
|
|
typedef void (*pcClose) (rdpsndDevicePlugin* device);
|
|
|
|
typedef void (*pcFree) (rdpsndDevicePlugin* device);
|
2011-08-15 11:08:23 +04:00
|
|
|
|
2013-02-26 06:46:48 +04:00
|
|
|
typedef void (*pcWaveDecode) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
|
|
|
|
typedef void (*pcWavePlay) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
|
|
|
|
typedef void (*pcWaveConfirm) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
|
2013-02-21 22:25:43 +04:00
|
|
|
|
2011-08-15 11:08:23 +04:00
|
|
|
struct rdpsnd_device_plugin
|
|
|
|
{
|
2013-02-21 22:25:43 +04:00
|
|
|
rdpsndPlugin* rdpsnd;
|
|
|
|
|
2011-08-15 11:08:23 +04:00
|
|
|
pcFormatSupported FormatSupported;
|
|
|
|
pcOpen Open;
|
|
|
|
pcSetFormat SetFormat;
|
2013-02-28 01:57:18 +04:00
|
|
|
pcGetVolume GetVolume;
|
2011-08-15 11:08:23 +04:00
|
|
|
pcSetVolume SetVolume;
|
|
|
|
pcPlay Play;
|
2011-08-15 12:58:07 +04:00
|
|
|
pcStart Start;
|
2011-08-15 11:08:23 +04:00
|
|
|
pcClose Close;
|
|
|
|
pcFree Free;
|
2013-02-21 22:25:43 +04:00
|
|
|
|
2013-02-26 06:46:48 +04:00
|
|
|
pcWaveDecode WaveDecode;
|
2013-02-21 22:25:43 +04:00
|
|
|
pcWavePlay WavePlay;
|
|
|
|
pcWaveConfirm WaveConfirm;
|
2011-08-15 11:08:23 +04:00
|
|
|
};
|
|
|
|
|
2012-11-06 04:55:15 +04:00
|
|
|
#define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry"
|
2011-08-15 11:08:23 +04:00
|
|
|
|
|
|
|
typedef void (*PREGISTERRDPSNDDEVICE)(rdpsndPlugin* rdpsnd, rdpsndDevicePlugin* device);
|
|
|
|
|
|
|
|
struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS
|
|
|
|
{
|
|
|
|
rdpsndPlugin* rdpsnd;
|
|
|
|
PREGISTERRDPSNDDEVICE pRegisterRdpsndDevice;
|
2012-11-19 02:32:18 +04:00
|
|
|
ADDIN_ARGV* args;
|
2011-08-15 11:08:23 +04:00
|
|
|
};
|
|
|
|
typedef struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS FREERDP_RDPSND_DEVICE_ENTRY_POINTS;
|
|
|
|
typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS;
|
|
|
|
|
|
|
|
typedef int (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
|
|
|
|
|
|
|
|
#endif /* __RDPSND_MAIN_H */
|