UniMRCP  1.7.0
mpf_termination_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 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 
17 #ifndef MPF_TERMINATION_FACTORY_H
18 #define MPF_TERMINATION_FACTORY_H
19 
20 /**
21  * @file mpf_termination_factory.h
22  * @brief MPF Termination Factory
23  */
24 
25 #include "mpf_types.h"
26 
28 
29 /** MPF termination factory */
31  /** Virtual create */
32  mpf_termination_t* (*create_termination)(mpf_termination_factory_t *factory, void *obj, apr_pool_t *pool);
33  /** Virtual assign engine */
35 };
36 
37 /**
38  * Assign media engine to termination factory.
39  * @param termination_factory the termination factory to assign media engine to
40  * @param media_engine the media engine to assign
41  */
43  mpf_termination_factory_t *termination_factory,
44  mpf_engine_t *media_engine);
45 
46 /**
47  * Create MPF termination from termination factory.
48  * @param termination_factory the termination factory to create termination from
49  * @param obj the external object associated with termination
50  * @param pool the pool to allocate memory from
51  */
53  mpf_termination_factory_t *termination_factory,
54  void *obj,
55  apr_pool_t *pool);
56 
57 /**
58  * Create raw MPF termination.
59  * @param obj the external object associated with termination
60  * @param audio_stream the audio stream of the termination
61  * @param video_stream the video stream of the termination
62  * @param pool the pool to allocate memory from
63  */
65  void *obj,
66  mpf_audio_stream_t *audio_stream,
67  mpf_video_stream_t *video_stream,
68  apr_pool_t *pool);
69 
70 /**
71  * Destroy MPF termination.
72  * @param termination the termination to destroy
73  */
75 
76 /**
77  * Get termination name.
78  * @param termination the termination to get name of
79  */
80 MPF_DECLARE(const char*) mpf_termination_name_get(const mpf_termination_t *termination);
81 
82 /**
83  * Get associated object.
84  * @param termination the termination to get object from
85  */
87 
88 /**
89  * Get audio stream.
90  * @param termination the termination to get audio stream from
91  */
93 
94 /**
95  * Get video stream.
96  * @param termination the termination to get video stream from
97  */
99 
100 
102 
103 #endif /* MPF_TERMINATION_FACTORY_H */
Definition: mpf_stream.h:37
apt_bool_t(* assign_engine)(mpf_termination_factory_t *factory, mpf_engine_t *media_engine)
Definition: mpf_termination_factory.h:34
Definition: mpf_termination.h:51
apt_bool_t mpf_termination_factory_engine_assign(mpf_termination_factory_t *termination_factory, mpf_engine_t *media_engine)
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
typedefAPT_BEGIN_EXTERN_C struct mpf_engine_t mpf_engine_t
Definition: mpf_types.h:30
#define MPF_DECLARE(type)
Definition: mpf.h:40
void * mpf_termination_object_get(const mpf_termination_t *termination)
Definition: mpf_stream.h:61
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
Definition: mpf_termination_factory.h:30
MPF Types Declarations.
mpf_termination_t * mpf_termination_create(mpf_termination_factory_t *termination_factory, void *obj, apr_pool_t *pool)
mpf_video_stream_t * mpf_termination_video_stream_get(const mpf_termination_t *termination)
mpf_termination_t * mpf_raw_termination_create(void *obj, mpf_audio_stream_t *audio_stream, mpf_video_stream_t *video_stream, apr_pool_t *pool)
const char * mpf_termination_name_get(const mpf_termination_t *termination)
apt_bool_t mpf_termination_destroy(mpf_termination_t *termination)
mpf_audio_stream_t * mpf_termination_audio_stream_get(const mpf_termination_t *termination)