![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "config.h"#include "config_unix.h"#include "config_win32.h"#include "debug.h"#include "rtp/rtp.h"#include "rtp/pbuf.h"#include "tfrc.h"#include "pdb.h"
Go to the source code of this file.
Classes | |
| struct | pdb |
| struct | s_pdb_node |
Macros | |
| #define | BTREE_MAGIC 0x10101010 |
| #define | BTREE_NODE_MAGIC 0x01010101 |
| #define | PDB_MAGIC 0x10101010 |
| #define | PDB_NODE_MAGIC 0x01010101 |
Typedefs | |
| typedef struct s_pdb_node | pdb_node_t |
Functions | |
| int | pdb_add (struct pdb *db, uint32_t ssrc) |
| static struct pdb_e * | pdb_create_item (uint32_t ssrc, volatile int *delay_ms) |
| static pdb_node_t * | pdb_delete_node (struct pdb *tree, pdb_node_t *z) |
| void | pdb_destroy (struct pdb **db_p) |
| void | pdb_destroy_item (struct pdb_e *item) |
| struct pdb_e * | pdb_get (struct pdb *db, uint32_t ssrc) |
| struct pdb * | pdb_init (volatile int *delay_ms) |
| static void | pdb_insert_node (struct pdb *tree, pdb_node_t *z) |
| void | pdb_iter_done (pdb_iter_t *it) |
| struct pdb_e * | pdb_iter_init (struct pdb *db, pdb_iter_t *it) |
| struct pdb_e * | pdb_iter_next (pdb_iter_t *it) |
| static pdb_node_t * | pdb_min (pdb_node_t *x) |
| int | pdb_remove (struct pdb *db, uint32_t ssrc, struct pdb_e **item) |
| static pdb_node_t * | pdb_search (pdb_node_t *x, uint32_t key) |
| static pdb_node_t * | pdb_successor (pdb_node_t *x) |
| static void | pdb_validate (struct pdb *t) |
| #define BTREE_MAGIC 0x10101010 |
Definition at line 95 of file pdb.c.
Referenced by pdb_validate().
| #define PDB_MAGIC 0x10101010 |
Definition at line 72 of file pdb.c.
Referenced by pdb_init().
| typedef struct s_pdb_node pdb_node_t |
| int pdb_add | ( | struct pdb * | db, |
| uint32_t | ssrc ) |
Definition at line 299 of file pdb.c.
References BTREE_NODE_MAGIC, s_pdb_node::data, debug_msg, pdb::delay_ms, s_pdb_node::key, s_pdb_node::left, s_pdb_node::magic, s_pdb_node::parent, pdb_create_item(), pdb_insert_node(), pdb_search(), pdb_validate(), s_pdb_node::right, pdb::root, and pdb_e::ssrc.
Referenced by initialize_audio_network(), rtp_video_rxtx::initialize_network(), process_sdes(), rtp_recv_callback(), and vidcap_rtsp_init().

|
static |
Definition at line 277 of file pdb.c.
References pdb_e::creation_time, pdb_e::decoder_state, pdb_e::decoder_state_deleter, get_time_in_ns(), pbuf_init(), pdb_e::playout_buffer, pdb_e::pt, pdb_e::sdes_cname, pdb_e::sdes_email, pdb_e::sdes_loc, pdb_e::sdes_name, pdb_e::sdes_note, pdb_e::sdes_phone, pdb_e::sdes_tool, pdb_e::ssrc, tfrc_init(), and pdb_e::tfrc_state.
Referenced by pdb_add().

|
static |
Definition at line 204 of file pdb.c.
References pdb::count, s_pdb_node::data, s_pdb_node::key, s_pdb_node::left, s_pdb_node::parent, pdb_successor(), pdb_validate(), s_pdb_node::right, and pdb::root.
Referenced by pdb_remove().

| void pdb_destroy | ( | struct pdb ** | db_p | ) |
Definition at line 256 of file pdb.c.
References pdb_destroy_item(), pdb_iter_done(), pdb_iter_init(), pdb_iter_next(), pdb_remove(), pdb_validate(), pdb::root, and pdb_e::ssrc.
Referenced by rtp_video_rxtx::~rtp_video_rxtx(), audio_done(), and audio_init().

| void pdb_destroy_item | ( | struct pdb_e * | item | ) |
Definition at line 370 of file pdb.c.
References pbuf_destroy(), and tfrc_done().
Referenced by pdb_destroy(), and rtp_recv_callback().

Definition at line 332 of file pdb.c.
References s_pdb_node::data, pdb_search(), pdb_validate(), pdb::root, and pdb_e::ssrc.
Referenced by process_sdes(), and rtp_recv_callback().

| struct pdb * pdb_init | ( | volatile int * | delay_ms | ) |
| delay_ms | delay to be added to playback. Main reason is to give user a possibility to sync audio and video. |
Definition at line 244 of file pdb.c.
References pdb::count, pdb::delay_ms, pdb::magic, PDB_MAGIC, and pdb::root.
Referenced by rtp_video_rxtx::rtp_video_rxtx(), audio_init(), and vidcap_rtsp_init().
|
static |
Definition at line 175 of file pdb.c.
References pdb::count, s_pdb_node::key, s_pdb_node::left, s_pdb_node::parent, pdb_validate(), s_pdb_node::right, and pdb::root.
Referenced by pdb_add().

| void pdb_iter_done | ( | pdb_iter_t * | it | ) |
Definition at line 412 of file pdb.c.
Referenced by audio_receiver_process_message(), audio_receiver_thread(), pdb_destroy(), ultragrid_rtp_video_rxtx::receiver_loop(), ultragrid_rtp_video_rxtx::remove_display_from_decoders(), and vidcap_rtsp_thread().
| struct pdb_e * pdb_iter_init | ( | struct pdb * | db, |
| pdb_iter_t * | it ) |
Definition at line 393 of file pdb.c.
References s_pdb_node::data, pdb_min(), and pdb::root.
Referenced by audio_receiver_process_message(), audio_receiver_thread(), pdb_destroy(), ultragrid_rtp_video_rxtx::receiver_loop(), ultragrid_rtp_video_rxtx::receiver_process_messages(), ultragrid_rtp_video_rxtx::remove_display_from_decoders(), and vidcap_rtsp_thread().

| struct pdb_e * pdb_iter_next | ( | pdb_iter_t * | it | ) |
Definition at line 402 of file pdb.c.
References s_pdb_node::data, and pdb_successor().
Referenced by audio_receiver_process_message(), audio_receiver_thread(), pdb_destroy(), ultragrid_rtp_video_rxtx::receiver_loop(), ultragrid_rtp_video_rxtx::receiver_process_messages(), ultragrid_rtp_video_rxtx::remove_display_from_decoders(), and vidcap_rtsp_thread().

|
static |
Definition at line 135 of file pdb.c.
References s_pdb_node::left.
Referenced by pdb_iter_init(), and pdb_successor().
Definition at line 346 of file pdb.c.
References s_pdb_node::data, debug_msg, pdb_delete_node(), pdb_search(), pdb_validate(), pdb::root, and pdb_e::ssrc.
Referenced by pdb_destroy(), and rtp_recv_callback().

|
static |
Definition at line 163 of file pdb.c.
References key, s_pdb_node::key, s_pdb_node::left, and s_pdb_node::right.
Referenced by pdb_add(), pdb_get(), and pdb_remove().
|
static |
Definition at line 146 of file pdb.c.
References s_pdb_node::parent, pdb_min(), and s_pdb_node::right.
Referenced by pdb_delete_node(), and pdb_iter_next().

|
static |
Definition at line 119 of file pdb.c.
References BTREE_MAGIC, pdb::count, pdb::magic, and pdb::root.
Referenced by pdb_add(), pdb_delete_node(), pdb_destroy(), pdb_get(), pdb_insert_node(), and pdb_remove().