FreeRDP
audin_mac.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/debug.h>
#include <winpr/cmdline.h>
#include <CoreAudio/CoreAudioTypes.h>
#include <CoreAudio/CoreAudio.h>
#include <AudioToolbox/AudioToolbox.h>
#include <AudioToolbox/AudioQueue.h>
#include <freerdp/addin.h>
#include <freerdp/channels/rdpsnd.h>
#include "audin_main.h"

Macros

#define __COREFOUNDATION_CFPLUGINCOM__   1
 
#define IUNKNOWN_C_GUTS   void *_reserved; void* QueryInterface; void* AddRef; void* Release
 
#define MAC_AUDIO_QUEUE_NUM_BUFFERS   100
 
#define freerdp_audin_client_subsystem_entry   FREERDP_API freerdp_audin_client_subsystem_entry
 

Typedefs

typedef UInt32 AudioFormatID
 
typedef UInt32 AudioFormatFlags
 

Functions

static AudioFormatID audin_mac_get_format (const AUDIO_FORMAT *format)
 
static AudioFormatFlags audin_mac_get_flags_for_format (const AUDIO_FORMAT *format)
 
static BOOL audin_mac_format_supported (IAudinDevice *device, const AUDIO_FORMAT *format)
 
static UINT audin_mac_set_format (IAudinDevice *device, const AUDIO_FORMAT *format, UINT32 FramesPerPacket)
 
static void mac_audio_queue_input_cb (void *aqData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, const AudioTimeStamp *inStartTime, UInt32 inNumPackets, const AudioStreamPacketDescription *inPacketDesc)
 
static UINT audin_mac_close (IAudinDevice *device)
 
static UINT audin_mac_open (IAudinDevice *device, AudinReceive receive, void *user_data)
 
static UINT audin_mac_free (IAudinDevice *device)
 
static UINT audin_mac_parse_addin_args (AudinMacDevice *device, ADDIN_ARGV *args)
 
UINT freerdp_audin_client_subsystem_entry (PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
 

Variables

static COMMAND_LINE_ARGUMENT_A audin_mac_args []
 

Macro Definition Documentation

#define __COREFOUNDATION_CFPLUGINCOM__   1

FreeRDP: A Remote Desktop Protocol Implementation Audio Input Redirection Virtual Channel - Mac OS X implementation

Copyright (c) 2015 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2015 Thincast Technologies GmbH

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.

#define freerdp_audin_client_subsystem_entry   FREERDP_API freerdp_audin_client_subsystem_entry
#define IUNKNOWN_C_GUTS   void *_reserved; void* QueryInterface; void* AddRef; void* Release
#define MAC_AUDIO_QUEUE_NUM_BUFFERS   100

Typedef Documentation

typedef UInt32 AudioFormatFlags
typedef UInt32 AudioFormatID

Function Documentation

static UINT audin_mac_close ( IAudinDevice *  device)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL audin_mac_format_supported ( IAudinDevice *  device,
const AUDIO_FORMAT format 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT audin_mac_free ( IAudinDevice *  device)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static AudioFormatFlags audin_mac_get_flags_for_format ( const AUDIO_FORMAT format)
static

Here is the caller graph for this function:

static AudioFormatID audin_mac_get_format ( const AUDIO_FORMAT format)
static

Here is the caller graph for this function:

static UINT audin_mac_open ( IAudinDevice *  device,
AudinReceive  receive,
void user_data 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT audin_mac_parse_addin_args ( AudinMacDevice *  device,
ADDIN_ARGV *  args 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT audin_mac_set_format ( IAudinDevice *  device,
const AUDIO_FORMAT format,
UINT32  FramesPerPacket 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

UINT freerdp_audin_client_subsystem_entry ( PFREERDP_AUDIN_DEVICE_ENTRY_POINTS  pEntryPoints)

Here is the call graph for this function:

static void mac_audio_queue_input_cb ( void aqData,
AudioQueueRef  inAQ,
AudioQueueBufferRef  inBuffer,
const AudioTimeStamp *  inStartTime,
UInt32  inNumPackets,
const AudioStreamPacketDescription *  inPacketDesc 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

COMMAND_LINE_ARGUMENT_A audin_mac_args[]
static
Initial value:
=
{
{ "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>", NULL, NULL, -1, NULL, "audio device name" },
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
}
#define COMMAND_LINE_VALUE_REQUIRED
Definition: winpr/include/winpr/cmdline.h:34
if availableBytes return NULL
Definition: TPCircularBuffer.h:104