FreeRDP
audin.c File Reference
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
#include <freerdp/freerdp.h>
#include <freerdp/server/server-common.h>
#include <freerdp/server/audin.h>
#include <freerdp/channels/log.h>

Macros

#define AUDIN_TAG   CHANNELS_TAG("audin.server")
 
#define SNDIN_HEADER_SIZE   1
 

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 UINT audin_server_recv_version (audin_server_context *context, wStream *s, const SNDIN_PDU *header)
 
static UINT audin_server_recv_formats (audin_server_context *context, wStream *s, const SNDIN_PDU *header)
 
static UINT audin_server_recv_open_reply (audin_server_context *context, wStream *s, const SNDIN_PDU *header)
 
static UINT audin_server_recv_data_incoming (audin_server_context *context, wStream *s, const SNDIN_PDU *header)
 
static UINT audin_server_recv_data (audin_server_context *context, wStream *s, const SNDIN_PDU *header)
 
static UINT audin_server_recv_format_change (audin_server_context *context, wStream *s, const SNDIN_PDU *header)
 
static DWORD WINAPI audin_server_thread_func (LPVOID arg)
 
static BOOL audin_server_open (audin_server_context *context)
 
static BOOL audin_server_is_open (audin_server_context *context)
 
static BOOL audin_server_close (audin_server_context *context)
 
static wStreamaudin_server_packet_new (wLog *log, size_t size, BYTE MessageId)
 
static UINT audin_server_packet_send (audin_server_context *context, wStream *s)
 
static UINT audin_server_send_version (audin_server_context *context, const SNDIN_VERSION *version)
 
static UINT audin_server_send_formats (audin_server_context *context, const SNDIN_FORMATS *formats)
 
static UINT audin_server_send_open (audin_server_context *context, const SNDIN_OPEN *open)
 
static UINT audin_server_send_format_change (audin_server_context *context, const SNDIN_FORMATCHANGE *format_change)
 
static UINT audin_server_receive_version_default (audin_server_context *audin_ctx, const SNDIN_VERSION *version)
 
static UINT send_open (audin_server *audin)
 
static UINT audin_server_receive_formats_default (audin_server_context *context, const SNDIN_FORMATS *formats)
 
static UINT audin_server_receive_format_change_default (audin_server_context *context, const SNDIN_FORMATCHANGE *format_change)
 
static UINT audin_server_incoming_data_default (audin_server_context *context, const SNDIN_DATA_INCOMING *data_incoming)
 
static UINT audin_server_open_reply_default (audin_server_context *context, const SNDIN_OPEN_REPLY *open_reply)
 
audin_server_context * audin_server_context_new (HANDLE vcm)
 
void audin_server_context_free (audin_server_context *context)
 
BOOL audin_server_set_formats (audin_server_context *context, SSIZE_T count, const AUDIO_FORMAT *formats)
 sets the supported audio formats for AUDIN server channel context. More...
 
const AUDIO_FORMATaudin_server_get_negotiated_format (const audin_server_context *context)
 

Macro Definition Documentation

◆ AUDIN_TAG

#define AUDIN_TAG   CHANNELS_TAG("audin.server")

FreeRDP: A Remote Desktop Protocol Implementation Server Audio Input Virtual Channel

Copyright 2012 Vic Lee Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com Copyright 2022 Pascal Nowack Pasca.nosp@m.l.No.nosp@m.wack@.nosp@m.gmx..nosp@m.de

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.

◆ SNDIN_HEADER_SIZE

#define SNDIN_HEADER_SIZE   1

Enumeration Type Documentation

◆ MSG_SNDIN

enum MSG_SNDIN
Enumerator
MSG_SNDIN_VERSION 
MSG_SNDIN_FORMATS 
MSG_SNDIN_OPEN 
MSG_SNDIN_OPEN_REPLY 
MSG_SNDIN_DATA_INCOMING 
MSG_SNDIN_DATA 
MSG_SNDIN_FORMATCHANGE 
MSG_SNDIN_VERSION 
MSG_SNDIN_FORMATS 
MSG_SNDIN_OPEN 
MSG_SNDIN_OPEN_REPLY 
MSG_SNDIN_DATA_INCOMING 
MSG_SNDIN_DATA 
MSG_SNDIN_FORMATCHANGE 

Function Documentation

◆ audin_server_close()

static BOOL audin_server_close ( audin_server_context *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_context_free()

void audin_server_context_free ( audin_server_context *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_context_new()

audin_server_context* audin_server_context_new ( HANDLE  vcm)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_get_negotiated_format()

const AUDIO_FORMAT* audin_server_get_negotiated_format ( const audin_server_context *  context)

◆ audin_server_incoming_data_default()

static UINT audin_server_incoming_data_default ( audin_server_context *  context,
const SNDIN_DATA_INCOMING data_incoming 
)
static
Here is the caller graph for this function:

◆ audin_server_is_open()

static BOOL audin_server_is_open ( audin_server_context *  context)
static
Here is the caller graph for this function:

◆ audin_server_open()

static BOOL audin_server_open ( audin_server_context *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_open_reply_default()

static UINT audin_server_open_reply_default ( audin_server_context *  context,
const SNDIN_OPEN_REPLY open_reply 
)
static
Here is the caller graph for this function:

◆ audin_server_packet_new()

static wStream* audin_server_packet_new ( wLog *  log,
size_t  size,
BYTE  MessageId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_packet_send()

static UINT audin_server_packet_send ( audin_server_context *  context,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_receive_format_change_default()

static UINT audin_server_receive_format_change_default ( audin_server_context *  context,
const SNDIN_FORMATCHANGE format_change 
)
static
Here is the caller graph for this function:

◆ audin_server_receive_formats_default()

static UINT audin_server_receive_formats_default ( audin_server_context *  context,
const SNDIN_FORMATS formats 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_receive_version_default()

static UINT audin_server_receive_version_default ( audin_server_context *  audin_ctx,
const SNDIN_VERSION version 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_recv_data()

static UINT audin_server_recv_data ( audin_server_context *  context,
wStream s,
const SNDIN_PDU header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_recv_data_incoming()

static UINT audin_server_recv_data_incoming ( audin_server_context *  context,
wStream s,
const SNDIN_PDU header 
)
static
Here is the caller graph for this function:

◆ audin_server_recv_format_change()

static UINT audin_server_recv_format_change ( audin_server_context *  context,
wStream s,
const SNDIN_PDU header 
)
static
Here is the caller graph for this function:

◆ audin_server_recv_formats()

static UINT audin_server_recv_formats ( audin_server_context *  context,
wStream s,
const SNDIN_PDU header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_recv_open_reply()

static UINT audin_server_recv_open_reply ( audin_server_context *  context,
wStream s,
const SNDIN_PDU header 
)
static
Here is the caller graph for this function:

◆ audin_server_recv_version()

static UINT audin_server_recv_version ( audin_server_context *  context,
wStream s,
const SNDIN_PDU header 
)
static
Here is the caller graph for this function:

◆ audin_server_send_format_change()

static UINT audin_server_send_format_change ( audin_server_context *  context,
const SNDIN_FORMATCHANGE format_change 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_send_formats()

static UINT audin_server_send_formats ( audin_server_context *  context,
const SNDIN_FORMATS formats 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_send_open()

static UINT audin_server_send_open ( audin_server_context *  context,
const SNDIN_OPEN open 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_send_version()

static UINT audin_server_send_version ( audin_server_context *  context,
const SNDIN_VERSION version 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_set_formats()

BOOL audin_server_set_formats ( audin_server_context *  context,
SSIZE_T  count,
const AUDIO_FORMAT formats 
)

sets the supported audio formats for AUDIN server channel context.

Parameters
contextThe context to set the formats for
countThe number of formats found in formats. Use -1 to set to default formats supported by FreeRDP
formatsAn array of count elements
Returns
TRUE if successful and at least one format is supported, FALSE otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audin_server_thread_func()

static DWORD WINAPI audin_server_thread_func ( LPVOID  arg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_open()

static UINT send_open ( audin_server *  audin)
static
Here is the caller graph for this function: