FreeRDP
|
#include <freerdp/config.h>
#include <errno.h>
#include <winpr/assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/cmdline.h>
#include <winpr/wlog.h>
#include <freerdp/addin.h>
#include <winpr/stream.h>
#include <freerdp/freerdp.h>
#include <freerdp/codec/dsp.h>
#include <freerdp/client/channels.h>
#include <freerdp/channels/audin.h>
#include "audin_main.h"
Macros | |
#define | SNDIN_VERSION 0x02 |
Enumerations | |
enum | MSG_SNDIN { MSG_SNDIN_VERSION = 0x01 , MSG_SNDIN_FORMATS = 0x02 , MSG_SNDIN_OPEN = 0x03 , MSG_SNDIN_OPEN_REPLY = 0x04 , MSG_SNDIN_DATA_INCOMING = 0x05 , MSG_SNDIN_DATA = 0x06 , MSG_SNDIN_FORMATCHANGE = 0x07 , MSG_SNDIN_VERSION = 0x01 , MSG_SNDIN_FORMATS = 0x02 , MSG_SNDIN_OPEN = 0x03 , MSG_SNDIN_OPEN_REPLY = 0x04 , MSG_SNDIN_DATA_INCOMING = 0x05 , MSG_SNDIN_DATA = 0x06 , MSG_SNDIN_FORMATCHANGE = 0x07 } |
Functions | |
static BOOL | audin_process_addin_args (AUDIN_PLUGIN *audin, const ADDIN_ARGV *args) |
static UINT | audin_channel_write_and_free (AUDIN_CHANNEL_CALLBACK *callback, wStream *out, BOOL freeStream) |
static UINT | audin_process_version (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback, wStream *s) |
static UINT | audin_send_incoming_data_pdu (AUDIN_CHANNEL_CALLBACK *callback) |
static UINT | audin_process_formats (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback, wStream *s) |
static UINT | audin_send_format_change_pdu (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback, UINT32 NewFormat) |
static UINT | audin_send_open_reply_pdu (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback, UINT32 Result) |
static UINT | audin_receive_wave_data (const AUDIO_FORMAT *format, const BYTE *data, size_t size, void *user_data) |
static BOOL | audin_open_device (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback) |
static UINT | audin_process_open (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback, wStream *s) |
static UINT | audin_process_format_change (AUDIN_PLUGIN *audin, AUDIN_CHANNEL_CALLBACK *callback, wStream *s) |
static UINT | audin_on_data_received (IWTSVirtualChannelCallback *pChannelCallback, wStream *data) |
static UINT | audin_on_close (IWTSVirtualChannelCallback *pChannelCallback) |
static UINT | audin_on_new_channel_connection (IWTSListenerCallback *pListenerCallback, IWTSVirtualChannel *pChannel, BYTE *Data, BOOL *pbAccept, IWTSVirtualChannelCallback **ppCallback) |
static UINT | audin_plugin_initialize (IWTSPlugin *pPlugin, IWTSVirtualChannelManager *pChannelMgr) |
static UINT | audin_plugin_terminated (IWTSPlugin *pPlugin) |
static UINT | audin_plugin_attached (IWTSPlugin *pPlugin) |
static UINT | audin_plugin_detached (IWTSPlugin *pPlugin) |
static UINT | audin_register_device_plugin (IWTSPlugin *pPlugin, IAudinDevice *device) |
static UINT | audin_load_device_plugin (AUDIN_PLUGIN *audin, const char *name, const ADDIN_ARGV *args) |
static UINT | audin_set_subsystem (AUDIN_PLUGIN *audin, const char *subsystem) |
static UINT | audin_set_device_name (AUDIN_PLUGIN *audin, const char *device_name) |
WINPR_ASSERT (pEntryPoints) | |
WINPR_ASSERT (pEntryPoints->GetPlugin) | |
if (audin !=NULL) | |
if (!audin->fixed_format) goto out | |
if (args) | |
if (audin->subsystem) | |
Variables | |
UINT | error = CHANNEL_RC_INITIALIZATION_ERROR |
struct SubsystemEntry | entries [] |
struct SubsystemEntry * | entry = &entries[0] |
AUDIN_PLUGIN * | audin = (AUDIN_PLUGIN*)pEntryPoints->GetPlugin(pEntryPoints, AUDIN_CHANNEL_NAME) |
audin | log = WLog_Get(TAG) |
audin | data = Stream_New(NULL, 4096) |
audin | fixed_format = audio_format_new() |
audin | dsp_context = freerdp_dsp_context_new(TRUE) |
audin | attached = TRUE |
audin iface | Initialize = audin_plugin_initialize |
audin iface | Connected = NULL |
audin iface | Disconnected = NULL |
audin iface | Terminated = audin_plugin_terminated |
audin iface | Attached = audin_plugin_attached |
audin iface | Detached = audin_plugin_detached |
const ADDIN_ARGV * | args = pEntryPoints->GetPluginData(pEntryPoints) |
audin | rdpcontext = pEntryPoints->GetRdpContext(pEntryPoints) |
else | |
#define SNDIN_VERSION 0x02 |
FreeRDP: A Remote Desktop Protocol Implementation Audio Input Redirection Virtual Channel
Copyright 2010-2011 Vic Lee Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti Copyright 2015 Armin Novak n.ha imber ger@ thinc ast. comarmin .nov ak@th inca st.co m
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.
enum MSG_SNDIN |
|
static |
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
|
static |
|
static |
|
static |
Function description
|
static |
Function description
|
static |
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
if | ( | !audin-> | fixed_format | ) |
if | ( | args | ) |
if | ( | audin-> | subsystem | ) |
WINPR_ASSERT | ( | pEntryPoints | ) |
WINPR_ASSERT | ( | pEntryPoints-> | GetPlugin | ) |
const ADDIN_ARGV* args = pEntryPoints->GetPluginData(pEntryPoints) |
audin attached = TRUE |
audin iface Attached = audin_plugin_attached |
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*)pEntryPoints->GetPlugin(pEntryPoints, AUDIN_CHANNEL_NAME) |
audin data = Stream_New(NULL, 4096) |
audin iface Detached = audin_plugin_detached |
audin dsp_context = freerdp_dsp_context_new(TRUE) |
else |
struct SubsystemEntry entries[] |
struct SubsystemEntry* entry = &entries[0] |
Function description
audin fixed_format = audio_format_new() |
audin iface Initialize = audin_plugin_initialize |
audin rdpcontext = pEntryPoints->GetRdpContext(pEntryPoints) |
audin iface Terminated = audin_plugin_terminated |