UniMRCP  1.7.0
Data Structures | Typedefs | Enumerations | Functions
mrcp_application.h File Reference

MRCP User Level Application Interface. More...

#include "mrcp_client_types.h"
#include "mpf_rtp_descriptor.h"
#include "mpf_stream.h"
Include dependency graph for mrcp_application.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mrcp_sig_message_t
 
struct  mrcp_app_message_t
 
struct  mrcp_app_message_dispatcher_t
 

Typedefs

typedef typedefAPT_BEGIN_EXTERN_C struct mrcp_app_message_t mrcp_app_message_t
 
typedef struct mrcp_sig_message_t mrcp_sig_message_t
 
typedef struct mrcp_app_message_dispatcher_t mrcp_app_message_dispatcher_t
 
typedef apt_bool_t(* mrcp_app_message_handler_f) (const mrcp_app_message_t *app_message)
 

Enumerations

enum  mrcp_sig_message_type_e { MRCP_SIG_MESSAGE_TYPE_REQUEST, MRCP_SIG_MESSAGE_TYPE_RESPONSE, MRCP_SIG_MESSAGE_TYPE_EVENT }
 
enum  mrcp_sig_status_code_e { MRCP_SIG_STATUS_CODE_SUCCESS, MRCP_SIG_STATUS_CODE_FAILURE, MRCP_SIG_STATUS_CODE_TERMINATE, MRCP_SIG_STATUS_CODE_CANCEL }
 
enum  mrcp_sig_command_e {
  MRCP_SIG_COMMAND_SESSION_UPDATE, MRCP_SIG_COMMAND_SESSION_TERMINATE, MRCP_SIG_COMMAND_CHANNEL_ADD, MRCP_SIG_COMMAND_CHANNEL_REMOVE,
  MRCP_SIG_COMMAND_RESOURCE_DISCOVER
}
 
enum  mrcp_sig_event_e { MRCP_SIG_EVENT_TERMINATE }
 
enum  mrcp_app_message_type_e { MRCP_APP_MESSAGE_TYPE_SIGNALING, MRCP_APP_MESSAGE_TYPE_CONTROL }
 

Functions

mrcp_application_tmrcp_application_create (const mrcp_app_message_handler_f handler, void *obj, apr_pool_t *pool)
 
apt_bool_t mrcp_application_destroy (mrcp_application_t *application)
 
void * mrcp_application_object_get (const mrcp_application_t *application)
 
const apt_dir_layout_tmrcp_application_dir_layout_get (const mrcp_application_t *application)
 
mrcp_session_tmrcp_application_session_create (mrcp_application_t *application, const char *profile, void *obj)
 
mrcp_session_tmrcp_application_session_create_ex (mrcp_application_t *application, const char *profile, void *obj, apt_bool_t take_ownership, apr_pool_t *pool)
 
apr_pool_t * mrcp_application_session_pool_get (const mrcp_session_t *session)
 
const apt_str_tmrcp_application_session_id_get (const mrcp_session_t *session)
 
int mrcp_application_session_response_code_get (const mrcp_session_t *session)
 
void * mrcp_application_session_object_get (const mrcp_session_t *session)
 
void mrcp_application_session_object_set (mrcp_session_t *session, void *obj)
 
void mrcp_application_session_name_set (mrcp_session_t *session, const char *name)
 
void mrcp_application_session_attribs_set (mrcp_session_t *session, mrcp_session_attribs_t *attribs)
 
apt_bool_t mrcp_application_session_update (mrcp_session_t *session)
 
apt_bool_t mrcp_application_session_terminate (mrcp_session_t *session)
 
apt_bool_t mrcp_application_session_destroy (mrcp_session_t *session)
 
mrcp_channel_tmrcp_application_channel_create (mrcp_session_t *session, mrcp_resource_id resource_id, mpf_termination_t *termination, mpf_rtp_termination_descriptor_t *rtp_descriptor, void *obj)
 
void * mrcp_application_channel_object_get (const mrcp_channel_t *channel)
 
mpf_rtp_termination_descriptor_tmrcp_application_rtp_descriptor_get (const mrcp_channel_t *channel)
 
const mpf_codec_descriptor_tmrcp_application_source_descriptor_get (const mrcp_channel_t *channel)
 
const mpf_codec_descriptor_tmrcp_application_sink_descriptor_get (const mrcp_channel_t *channel)
 
const mpf_audio_stream_tmrcp_application_audio_stream_get (const mrcp_channel_t *channel)
 
apt_bool_t mrcp_application_channel_add (mrcp_session_t *session, mrcp_channel_t *channel)
 
mrcp_message_tmrcp_application_message_create (mrcp_session_t *session, mrcp_channel_t *channel, mrcp_method_id method_id)
 
apt_bool_t mrcp_application_message_send (mrcp_session_t *session, mrcp_channel_t *channel, mrcp_message_t *message)
 
apt_bool_t mrcp_application_channel_remove (mrcp_session_t *session, mrcp_channel_t *channel)
 
apt_bool_t mrcp_application_resource_discover (mrcp_session_t *session)
 
apt_bool_t mrcp_application_message_dispatch (const mrcp_app_message_dispatcher_t *dispatcher, const mrcp_app_message_t *app_message)
 
mpf_termination_tmrcp_application_audio_termination_create (mrcp_session_t *session, const mpf_audio_stream_vtable_t *stream_vtable, mpf_stream_capabilities_t *capabilities, void *obj)
 
mpf_termination_tmrcp_application_source_termination_create (mrcp_session_t *session, const mpf_audio_stream_vtable_t *stream_vtable, mpf_codec_descriptor_t *codec_descriptor, void *obj)
 
mpf_termination_tmrcp_application_sink_termination_create (mrcp_session_t *session, const mpf_audio_stream_vtable_t *stream_vtable, mpf_codec_descriptor_t *codec_descriptor, void *obj)
 

Detailed Description

MRCP User Level Application Interface.

Typedef Documentation

◆ mrcp_app_message_dispatcher_t

MRCP application message dispatcher declaration

◆ mrcp_app_message_handler_f

typedef apt_bool_t(* mrcp_app_message_handler_f) (const mrcp_app_message_t *app_message)

MRCP application message handler

◆ mrcp_app_message_t

typedef typedefAPT_BEGIN_EXTERN_C struct mrcp_app_message_t mrcp_app_message_t

MRCP application message declaration

◆ mrcp_sig_message_t

MRCP signaling message declaration

Enumeration Type Documentation

◆ mrcp_app_message_type_e

Enumeration of MRCP application message types

Enumerator
MRCP_APP_MESSAGE_TYPE_SIGNALING 

signaling message type

MRCP_APP_MESSAGE_TYPE_CONTROL 

control message type

◆ mrcp_sig_command_e

Enumeration of MRCP signaling commands (requests/responses)

◆ mrcp_sig_event_e

Enumeration of MRCP signaling events

◆ mrcp_sig_message_type_e

Enumeration of MRCP signaling message types

Enumerator
MRCP_SIG_MESSAGE_TYPE_REQUEST 

request message

MRCP_SIG_MESSAGE_TYPE_RESPONSE 

response message

MRCP_SIG_MESSAGE_TYPE_EVENT 

event message

◆ mrcp_sig_status_code_e

Enumeration of MRCP signaling status codes

Enumerator
MRCP_SIG_STATUS_CODE_SUCCESS 

indicates success

MRCP_SIG_STATUS_CODE_FAILURE 

request failed

MRCP_SIG_STATUS_CODE_TERMINATE 

request failed, session/channel/connection unexpectedly terminated

MRCP_SIG_STATUS_CODE_CANCEL 

request cancelled

Function Documentation

◆ mrcp_application_audio_stream_get()

const mpf_audio_stream_t* mrcp_application_audio_stream_get ( const mrcp_channel_t channel)

Get associated audio stream.

Parameters
channelthe channel to get associated stream from

◆ mrcp_application_audio_termination_create()

mpf_termination_t* mrcp_application_audio_termination_create ( mrcp_session_t session,
const mpf_audio_stream_vtable_t stream_vtable,
mpf_stream_capabilities_t capabilities,
void *  obj 
)

Create audio termination

Parameters
sessionthe session to create termination for
stream_vtablethe virtual table of audio stream
capabilitiesthe capabilities of the stream
objthe external object

◆ mrcp_application_channel_add()

apt_bool_t mrcp_application_channel_add ( mrcp_session_t session,
mrcp_channel_t channel 
)

Send channel add request.

Parameters
sessionthe session to create channel for
channelthe control channel

◆ mrcp_application_channel_create()

mrcp_channel_t* mrcp_application_channel_create ( mrcp_session_t session,
mrcp_resource_id  resource_id,
mpf_termination_t termination,
mpf_rtp_termination_descriptor_t rtp_descriptor,
void *  obj 
)

Create control channel.

Parameters
sessionthe session to create channel for
resource_idthe resource identifier of the channel
terminationthe media termination
rtp_descriptorthe RTP termination descriptor (NULL by default)
objthe external object

◆ mrcp_application_channel_object_get()

void* mrcp_application_channel_object_get ( const mrcp_channel_t channel)

Get external object associated with the channel.

Parameters
channelthe channel to get object from

◆ mrcp_application_channel_remove()

apt_bool_t mrcp_application_channel_remove ( mrcp_session_t session,
mrcp_channel_t channel 
)

Remove channel.

Parameters
sessionthe session to remove channel from
channelthe control channel to remove

◆ mrcp_application_create()

mrcp_application_t* mrcp_application_create ( const mrcp_app_message_handler_f  handler,
void *  obj,
apr_pool_t *  pool 
)

Create application instance.

Parameters
handlerthe event handler
objthe external object
poolthe pool to allocate memory from

◆ mrcp_application_destroy()

apt_bool_t mrcp_application_destroy ( mrcp_application_t application)

Destroy application instance.

Parameters
applicationthe application to destroy

◆ mrcp_application_dir_layout_get()

const apt_dir_layout_t* mrcp_application_dir_layout_get ( const mrcp_application_t application)

Get dir layout structure.

Parameters
applicationthe application to get dir layout from

◆ mrcp_application_message_create()

mrcp_message_t* mrcp_application_message_create ( mrcp_session_t session,
mrcp_channel_t channel,
mrcp_method_id  method_id 
)

Create MRCP message.

Parameters
sessionthe session
channelthe control channel
method_idthe method identifier of MRCP message

◆ mrcp_application_message_dispatch()

apt_bool_t mrcp_application_message_dispatch ( const mrcp_app_message_dispatcher_t dispatcher,
const mrcp_app_message_t app_message 
)

Dispatch application message.

Parameters
dispatcherthe dispatcher inteface
app_messagethe message to dispatch

◆ mrcp_application_message_send()

apt_bool_t mrcp_application_message_send ( mrcp_session_t session,
mrcp_channel_t channel,
mrcp_message_t message 
)

Send MRCP message.

Parameters
sessionthe session
channelthe control channel
messagethe MRCP message to send

◆ mrcp_application_object_get()

void* mrcp_application_object_get ( const mrcp_application_t application)

Get external object associated with the application.

Parameters
applicationthe application to get object from

◆ mrcp_application_resource_discover()

apt_bool_t mrcp_application_resource_discover ( mrcp_session_t session)

Discover resources.

Parameters
sessionthe session to use as communication object

◆ mrcp_application_rtp_descriptor_get()

mpf_rtp_termination_descriptor_t* mrcp_application_rtp_descriptor_get ( const mrcp_channel_t channel)

Get RTP termination descriptor.

Parameters
channelthe channel to get descriptor from

◆ mrcp_application_session_attribs_set()

void mrcp_application_session_attribs_set ( mrcp_session_t session,
mrcp_session_attribs_t attribs 
)

Set session attributes.

Parameters
sessionthe session to set attributes for
attribsthe attributes to set

◆ mrcp_application_session_create()

mrcp_session_t* mrcp_application_session_create ( mrcp_application_t application,
const char *  profile,
void *  obj 
)

Create session.

Parameters
applicationthe application to use
profilethe name of the profile to use
objthe external object
Returns
the created session instance

◆ mrcp_application_session_create_ex()

mrcp_session_t* mrcp_application_session_create_ex ( mrcp_application_t application,
const char *  profile,
void *  obj,
apt_bool_t  take_ownership,
apr_pool_t *  pool 
)

Create session using the provided memory pool.

Parameters
applicationthe application to use
profilethe name of the profile to use
objthe external object
take_ownershipwhether the session takes ownership over the memory pool or not
poolmemory pool to use
Returns
the created session instance

◆ mrcp_application_session_destroy()

apt_bool_t mrcp_application_session_destroy ( mrcp_session_t session)

Destroy client session (session must be terminated prior to destroy).

Parameters
sessionthe session to destroy

◆ mrcp_application_session_id_get()

const apt_str_t* mrcp_application_session_id_get ( const mrcp_session_t session)

Get session identifier.

Parameters
sessionthe session to get identifier of

◆ mrcp_application_session_name_set()

void mrcp_application_session_name_set ( mrcp_session_t session,
const char *  name 
)

Set name of the session (informative only used for debugging).

Parameters
sessionthe session to set name for
namethe name to set

◆ mrcp_application_session_object_get()

void* mrcp_application_session_object_get ( const mrcp_session_t session)

Get external object associated with the session.

Parameters
sessionthe session to get object from

◆ mrcp_application_session_object_set()

void mrcp_application_session_object_set ( mrcp_session_t session,
void *  obj 
)

Set (associate) external object to the session.

Parameters
sessionthe session to set object for
objthe object to set

◆ mrcp_application_session_pool_get()

apr_pool_t* mrcp_application_session_pool_get ( const mrcp_session_t session)

Get memory pool the session object is created out of.

Parameters
sessionthe session to get pool from

◆ mrcp_application_session_response_code_get()

int mrcp_application_session_response_code_get ( const mrcp_session_t session)

Get SIP or RTSP response code.

Parameters
sessionthe session to use

◆ mrcp_application_session_terminate()

apt_bool_t mrcp_application_session_terminate ( mrcp_session_t session)

Send session termination request.

Parameters
sessionthe session to terminate

◆ mrcp_application_session_update()

apt_bool_t mrcp_application_session_update ( mrcp_session_t session)

Send session update request.

Parameters
sessionthe session to update

◆ mrcp_application_sink_descriptor_get()

const mpf_codec_descriptor_t* mrcp_application_sink_descriptor_get ( const mrcp_channel_t channel)

Get codec descriptor of sink stream.

Parameters
channelthe channel to get descriptor from

◆ mrcp_application_sink_termination_create()

mpf_termination_t* mrcp_application_sink_termination_create ( mrcp_session_t session,
const mpf_audio_stream_vtable_t stream_vtable,
mpf_codec_descriptor_t codec_descriptor,
void *  obj 
)

Create sink media termination

Parameters
sessionthe session to create termination for
stream_vtablethe virtual table of audio stream
codec_descriptorthe descriptor of audio stream (NULL by default)
objthe external object
Deprecated:
See also
mrcp_application_audio_termination_create()

◆ mrcp_application_source_descriptor_get()

const mpf_codec_descriptor_t* mrcp_application_source_descriptor_get ( const mrcp_channel_t channel)

Get codec descriptor of source stream.

Parameters
channelthe channel to get descriptor from

◆ mrcp_application_source_termination_create()

mpf_termination_t* mrcp_application_source_termination_create ( mrcp_session_t session,
const mpf_audio_stream_vtable_t stream_vtable,
mpf_codec_descriptor_t codec_descriptor,
void *  obj 
)

Create source media termination

Parameters
sessionthe session to create termination for
stream_vtablethe virtual table of audio stream
codec_descriptorthe descriptor of audio stream (NULL by default)
objthe external object
Deprecated:
See also
mrcp_application_audio_termination_create()