summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia/mediamgr.h
blob: 148038ecdb2fb2767b536f7249061b4698be1354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* $Id$ */
/* 
 * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */
#ifndef __PJMEDIA_MEDIAMGR_H__
#define __PJMEDIA_MEDIAMGR_H__


/**
 * @file mediamgr.h
 * @brief Media Manager.
 */
/**
 * @defgroup PJMED_MGR Media Manager
 * @ingroup PJMEDIA
 * @{
 *
 * The media manager acts as placeholder for endpoint capabilities. Each 
 * media manager will have a codec manager to manage list of codecs installed
 * in the endpoint and a sound device factory.
 *
 * A reference to media manager instance is required when application wants
 * to create a media session (#pj_media_session_create or 
 * #pj_media_session_create_from_sdp).
 */

#include <pjmedia/sound.h>
#include <pjmedia/codec.h>


PJ_BEGIN_DECL


/** Opague declaration of media manager. */
typedef struct pj_med_mgr_t pj_med_mgr_t;

/**
 * Create an instance of media manager.
 *
 * @param pf		Pool factory.
 * @param conn_addr	Connection address to be used by this media manager.
 *
 * @return A new instance of media manager, or NULL if failed.
 */
PJ_DECL(pj_med_mgr_t*) pj_med_mgr_create (pj_pool_factory *pf);

/**
 * Destroy media manager instance.
 *
 * @param mgr		Media manager instance.
 *
 * @return zero on success.
 */
PJ_DECL(pj_status_t) pj_med_mgr_destroy (pj_med_mgr_t *mgr);

/**
 * Get pool factory of the media manager as specified when the media
 * manager was created.
 *
 * @param mgr		The media manager instance.
 *
 * @return Pool factory instance of the media manager.
 */
PJ_DECL(pj_pool_factory*) pj_med_mgr_get_pool_factory (pj_med_mgr_t *mgr);

/**
 * Get the codec manager instance.
 *
 * @param mgr		The media manager instance.
 *
 * @return The instance of codec manager.
 */
PJ_DECL(pj_codec_mgr*) pj_med_mgr_get_codec_mgr (pj_med_mgr_t *mgr);



PJ_END_DECL


/**
 * @}
 */



#endif	/* __PJMEDIA_MEDIAMGR_H__ */