UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
pdb.h
Go to the documentation of this file.
1/*
2 * FILE: pdb.h - Participant database
3 * AUTHOR: Colin Perkins <csp@csperkins.org>
4 * Martin Benes <martinbenesh@gmail.com>
5 * Lukas Hejtmanek <xhejtman@ics.muni.cz>
6 * Petr Holub <hopet@ics.muni.cz>
7 * Milos Liska <xliska@fi.muni.cz>
8 * Jiri Matela <matela@ics.muni.cz>
9 * Dalibor Matura <255899@mail.muni.cz>
10 * Ian Wesley-Smith <iwsmith@cct.lsu.edu>
11 *
12 * Copyright (c) 2002 University of Southern California
13 * Copyright (c) 2005-2010 CESNET z.s.p.o.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, is permitted provided that the following conditions
17 * are met:
18 *
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 *
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * 3. All advertising materials mentioning features or use of this software
27 * must display the following acknowledgement:
28 *
29 * This product includes software developed by the University of Southern
30 * California Information Sciences Institute. This product also includes
31 * software developed by CESNET z.s.p.o.
32 *
33 * 4. Neither the name of the University, Institute, CESNET nor the names of
34 * its contributors may be used to endorse or promote products derived from
35 * this software without specific prior written permission.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
38 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
39 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
41 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
42 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
43 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
44 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
45 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
47 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
48 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 *
50 * $Revision: 1.2 $
51 * $Date: 2009/12/11 15:29:39 $
52 *
53 */
54
55#include "tv.h"
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/*
62 * A participant database entry. This holds (pointers to) all the
63 * information about a particular participant in a teleconference.
64 *
65 */
66
70typedef void (*decoder_state_deleter_t)(void *);
71
72struct pdb_e {
73 uint32_t ssrc;
75 char *sdes_name;
78 char *sdes_loc;
79 char *sdes_tool;
80 char *sdes_note;
83 uint8_t pt; /* Last seen RTP payload type for this participant */
86 time_ns_t creation_time; /* Time this entry was created */
87};
88
89struct pdb; /* The participant database */
90
95struct pdb *pdb_init(volatile int *delay_ms);
96void pdb_destroy(struct pdb **db);
97int pdb_add(struct pdb *db, uint32_t ssrc);
98struct pdb_e *pdb_get(struct pdb *db, uint32_t ssrc);
99
100/* Remove the entry indexed by "ssrc" from the database, returning a
101 * pointer to it in "item". Returns zero if the entry was present.
102 */
103int pdb_remove(struct pdb *db, uint32_t ssrc, struct pdb_e **item);
104void pdb_destroy_item(struct pdb_e *item);
105
106typedef void *pdb_iter_t;
107/*
108 * Iterator for the database.
109 */
110struct pdb_e *pdb_iter_init(struct pdb *db, pdb_iter_t *it);
111struct pdb_e *pdb_iter_next(pdb_iter_t *it);
112void pdb_iter_done(pdb_iter_t *it);
113
114#ifdef __cplusplus
115}
116#endif
117
void pdb_iter_done(pdb_iter_t *it)
Definition pdb.c:412
struct pdb_e * pdb_iter_next(pdb_iter_t *it)
Definition pdb.c:402
struct pdb_e * pdb_iter_init(struct pdb *db, pdb_iter_t *it)
Definition pdb.c:393
void pdb_destroy(struct pdb **db)
Definition pdb.c:256
void * pdb_iter_t
Definition pdb.h:106
struct pdb * pdb_init(volatile int *delay_ms)
Definition pdb.c:244
int pdb_add(struct pdb *db, uint32_t ssrc)
Definition pdb.c:299
void pdb_destroy_item(struct pdb_e *item)
Definition pdb.c:370
void(* decoder_state_deleter_t)(void *)
Definition pdb.h:70
int pdb_remove(struct pdb *db, uint32_t ssrc, struct pdb_e **item)
Definition pdb.c:346
struct pdb_e * pdb_get(struct pdb *db, uint32_t ssrc)
Definition pdb.c:332
Definition hd-rum.c:27
Definition pbuf.c:96
Definition pdb.h:72
time_ns_t creation_time
Definition pdb.h:86
char * sdes_name
Definition pdb.h:75
char * sdes_loc
Definition pdb.h:78
decoder_state_deleter_t decoder_state_deleter
decoder state deleter
Definition pdb.h:82
char * sdes_note
Definition pdb.h:80
struct tfrc * tfrc_state
Definition pdb.h:85
void * decoder_state
state of decoder for participant
Definition pdb.h:81
char * sdes_tool
Definition pdb.h:79
char * sdes_email
Definition pdb.h:76
uint32_t ssrc
Definition pdb.h:73
char * sdes_phone
Definition pdb.h:77
uint8_t pt
Definition pdb.h:83
char * sdes_cname
Definition pdb.h:74
struct pbuf * playout_buffer
Definition pdb.h:84
Definition pdb.c:84
volatile int * delay_ms
Definition pdb.c:88
Definition tfrc.c:69
long long time_ns_t
Definition tv.h:81