UniMRCP
1.3.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
libs
mpf
include
mpf_termination.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008-2014 Arsen Chaloyan
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
* $Id: mpf_termination.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17
*/
18
19
#ifndef MPF_TERMINATION_H
20
#define MPF_TERMINATION_H
21
22
/**
23
* @file mpf_termination.h
24
* @brief MPF Termination
25
*/
26
27
#include "
mpf_types.h
"
28
#include "
apt_timer_queue.h
"
29
30
APT_BEGIN_EXTERN_C
31
32
/** Prototype of termination event handler */
33
typedef
apt_bool_t
(*
mpf_termination_event_handler_f
)(
mpf_termination_t
*termination,
int
event_id,
void
*descriptor);
34
35
/** Termination vtable declaration */
36
typedef
struct
mpf_termination_vtable_t
mpf_termination_vtable_t
;
37
38
/** Table of termination virtual methods */
39
struct
mpf_termination_vtable_t
{
40
/** Virtual termination destroy method */
41
apt_bool_t
(*
destroy
)(
mpf_termination_t
*termination);
42
43
/** Virtual termination add method */
44
apt_bool_t
(*
add
)(
mpf_termination_t
*termination,
void
*descriptor);
45
/** Virtual termination modify method */
46
apt_bool_t
(*
modify
)(
mpf_termination_t
*termination,
void
*descriptor);
47
/** Virtual termination subtract method */
48
apt_bool_t
(*
subtract
)(
mpf_termination_t
*termination);
49
};
50
51
52
/** MPF Termination */
53
struct
mpf_termination_t
{
54
/** Pool to allocate memory from */
55
apr_pool_t *
pool
;
56
/** Informative name used for debugging */
57
const
char
*
name
;
58
/** External object */
59
void
*
obj
;
60
/** Media engine to send events to */
61
void
*
media_engine
;
62
/** Event handler */
63
mpf_termination_event_handler_f
event_handler
;
64
/** Codec manager */
65
const
mpf_codec_manager_t
*
codec_manager
;
66
/** Timer queue */
67
apt_timer_queue_t
*
timer_queue
;
68
/** Termination factory entire termination created by */
69
mpf_termination_factory_t
*
termination_factory
;
70
/** Table of virtual methods */
71
const
mpf_termination_vtable_t
*
vtable
;
72
/** Slot in context */
73
apr_size_t
slot
;
74
75
/** Audio stream */
76
mpf_audio_stream_t
*
audio_stream
;
77
/** Video stream */
78
mpf_video_stream_t
*
video_stream
;
79
};
80
81
/**
82
* Create MPF termination base.
83
* @param termination_factory the termination factory
84
* @param obj the external object associated with termination
85
* @param vtable the table of virtual functions of termination
86
* @param audio_stream the audio stream
87
* @param video_stream the video stream
88
* @param pool the pool to allocate memory from
89
*/
90
MPF_DECLARE
(
mpf_termination_t
*)
mpf_termination_base_create
(
91
mpf_termination_factory_t
*termination_factory,
92
void
*obj,
93
const
mpf_termination_vtable_t
*vtable,
94
mpf_audio_stream_t
*audio_stream,
95
mpf_video_stream_t
*video_stream,
96
apr_pool_t *pool);
97
98
/**
99
* Add MPF termination.
100
* @param termination the termination to add
101
* @param descriptor the termination specific descriptor
102
*/
103
MPF_DECLARE
(
apt_bool_t
)
mpf_termination_add
(
mpf_termination_t
*termination,
void
*descriptor);
104
105
/**
106
* Modify MPF termination.
107
* @param termination the termination to modify
108
* @param descriptor the termination specific descriptor
109
*/
110
MPF_DECLARE
(
apt_bool_t
)
mpf_termination_modify
(
mpf_termination_t
*termination,
void
*descriptor);
111
112
/**
113
* Subtract MPF termination.
114
* @param termination the termination to subtract
115
*/
116
MPF_DECLARE
(
apt_bool_t
)
mpf_termination_subtract
(
mpf_termination_t
*termination);
117
118
119
APT_END_EXTERN_C
120
121
#endif
/* MPF_TERMINATION_H */
Generated on Mon Feb 2 2015 19:41:38 for UniMRCP by
1.8.3.1