MediaProcessors
|
#include <mutex>
#include "live555_rtsp.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
#include <libcjson/cJSON.h>
#include <libmediaprocsutils/uri_parser.h>
#include <libmediaprocsutils/log.h>
#include <libmediaprocsutils/stat_codes.h>
#include <libmediaprocsutils/check_utils.h>
#include <libmediaprocsutils/schedule.h>
#include <libmediaprocsutils/fair_lock.h>
#include <libmediaprocsutils/fifo.h>
#include <libmediaprocs/proc_if.h>
#include <libmediaprocs/procs.h>
#include <libmediaprocs/proc.h>
#include "muxers_settings.h"
#include "proc_muxer.h"
#include <liveMedia/liveMedia.hh>
#include <BasicUsageEnvironment/BasicUsageEnvironment.hh>
#include "MultiFramedRTPSink.hh"
Go to the source code of this file.
Classes | |
struct | live555_rtsp_mux_settings_ctx_s |
struct | live555_rtsp_mux_ctx_s |
struct | live555_rtsp_es_mux_settings_ctx_s |
struct | live555_rtsp_es_mux_ctx_s |
struct | live555_rtsp_dmux_settings_ctx_s |
struct | live555_rtsp_dmux_ctx_s |
class | SimpleRTPSink2 |
class | SimpleFramedSource |
class | SimpleMediaSubsession |
class | SimpleClientMediaSubsession |
class | SimpleClientSession |
class | StreamClientState |
class | SimpleRTSPClient |
class | DummySink |
Macros | |
#define | SERVER_TOUT 10 |
#define | FRAMED_SOURCE_FIFO_SLOTS 16 |
#define | SINK_BUFFER_SIZE 200000 |
#define | LOGD_CTX_INIT(CTX) |
#define | LOGD(...) |
#define | TAG_HAS(NEEDLE) (strstr(tag, NEEDLE)!= NULL) |
#define | TAG_IS(TAG) (strcmp(tag, TAG)== 0) |
#define | PROC_ID_STR_FMT "{\"elementary_stream_id\":%d}" |
Typedefs | |
typedef struct live555_rtsp_mux_settings_ctx_s | live555_rtsp_mux_settings_ctx_t |
typedef struct live555_rtsp_mux_ctx_s | live555_rtsp_mux_ctx_t |
typedef struct live555_rtsp_es_mux_settings_ctx_s | live555_rtsp_es_mux_settings_ctx_t |
typedef struct live555_rtsp_es_mux_ctx_s | live555_rtsp_es_mux_ctx_t |
typedef struct live555_rtsp_dmux_settings_ctx_s | live555_rtsp_dmux_settings_ctx_t |
typedef struct live555_rtsp_dmux_ctx_s | live555_rtsp_dmux_ctx_t |
Functions | |
static proc_ctx_t * | live555_rtsp_mux_open (const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg) |
static int | live555_rtsp_mux_init_given_settings (live555_rtsp_mux_ctx_t *live555_rtsp_mux_ctx, const muxers_settings_mux_ctx_t *muxers_settings_mux_ctx, log_ctx_t *log_ctx) |
static void | live555_rtsp_mux_close (proc_ctx_t **ref_proc_ctx) |
static void | live555_rtsp_mux_deinit_except_settings (live555_rtsp_mux_ctx_t *live555_rtsp_mux_ctx, log_ctx_t *log_ctx) |
static int | live555_rtsp_mux_process_frame (proc_ctx_t *proc_ctx, fifo_ctx_t *iput_fifo_ctx, fifo_ctx_t *oput_fifo_ctx) |
static int | live555_rtsp_mux_rest_put (proc_ctx_t *proc_ctx, const char *str) |
static int | live555_rtsp_mux_opt (proc_ctx_t *proc_ctx, const char *tag, va_list arg) |
static int | live555_rtsp_mux_rest_get (proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse) |
static int | live555_rtsp_mux_rest_get_es_array (procs_ctx_t *procs_ctx_es_muxers, cJSON **ref_cjson_es_array, log_ctx_t *log_ctx) |
static int | live555_rtsp_mux_settings_ctx_init (volatile live555_rtsp_mux_settings_ctx_t *live555_rtsp_mux_settings_ctx, log_ctx_t *log_ctx) |
static void | live555_rtsp_mux_settings_ctx_deinit (volatile live555_rtsp_mux_settings_ctx_t *live555_rtsp_mux_settings_ctx, log_ctx_t *log_ctx) |
static void * | taskScheduler_thr (void *t) |
static proc_ctx_t * | live555_rtsp_es_mux_open (const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg) |
static void | live555_rtsp_es_mux_close (proc_ctx_t **ref_proc_ctx) |
static int | live555_rtsp_es_mux_process_frame (proc_ctx_t *proc_ctx, fifo_ctx_t *iput_fifo_ctx, fifo_ctx_t *oput_fifo_ctx) |
static int | live555_rtsp_es_mux_rest_put (proc_ctx_t *proc_ctx, const char *str) |
static int | live555_rtsp_es_mux_rest_get (proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse) |
static int | live555_rtsp_es_mux_settings_ctx_init (volatile live555_rtsp_es_mux_settings_ctx_t *live555_rtsp_es_mux_settings_ctx, log_ctx_t *log_ctx) |
static void | live555_rtsp_es_mux_settings_ctx_deinit (volatile live555_rtsp_es_mux_settings_ctx_t *live555_rtsp_es_mux_settings_ctx, log_ctx_t *log_ctx) |
static proc_ctx_t * | live555_rtsp_dmux_open (const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg) |
static int | live555_rtsp_dmux_init_given_settings (live555_rtsp_dmux_ctx_t *live555_rtsp_dmux_ctx, const muxers_settings_dmux_ctx_t *muxers_settings_dmux_ctx, log_ctx_t *log_ctx) |
static void | live555_rtsp_dmux_close (proc_ctx_t **ref_proc_ctx) |
static void | live555_rtsp_dmux_deinit_except_settings (live555_rtsp_dmux_ctx_t *live555_rtsp_dmux_ctx, log_ctx_t *log_ctx) |
static int | live555_rtsp_dmux_rest_get (proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse) |
static int | live555_rtsp_dmux_process_frame (proc_ctx_t *proc_ctx, fifo_ctx_t *iput_fifo_ctx, fifo_ctx_t *oput_fifo_ctx) |
static int | live555_rtsp_dmux_rest_put (proc_ctx_t *proc_ctx, const char *str) |
static int | live555_rtsp_dmux_settings_ctx_init (volatile live555_rtsp_dmux_settings_ctx_t *live555_rtsp_dmux_settings_ctx, log_ctx_t *log_ctx) |
static void | live555_rtsp_dmux_settings_ctx_deinit (volatile live555_rtsp_dmux_settings_ctx_t *live555_rtsp_dmux_settings_ctx, log_ctx_t *log_ctx) |
static void | continueAfterDESCRIBE (RTSPClient *rtspClient, int resultCode, char *resultString) |
static void | continueAfterSETUP (RTSPClient *rtspClient, int resultCode, char *resultString) |
static void | continueAfterPLAY (RTSPClient *rtspClient, int resultCode, char *resultString) |
static void | subsessionAfterPlaying (void *clientData) |
static void | subsessionByeHandler (void *clientData) |
static void | setupNextSubsession (RTSPClient *rtspClient) |
static void | shutdownStream (RTSPClient *rtspClient, int exitCode=1) |
void | live555_rtsp_reset_on_new_settings (proc_ctx_t *proc_ctx, int flag_is_muxer, log_ctx_t *log_ctx) |
void | live555_rtsp_reset_on_new_settings_es_mux (proc_ctx_t *proc_ctx, log_ctx_t *log_ctx) |
void | live555_rtsp_reset_on_new_settings_es_dmux (proc_ctx_t *proc_ctx, log_ctx_t *log_ctx) |
Variables | |
const proc_if_t | proc_if_live555_rtsp_mux |
static const proc_if_t | proc_if_live555_rtsp_es_mux |
const proc_if_t | proc_if_live555_rtsp_dmux |
Definition in file live555_rtsp.cpp.
#define TAG_HAS | ( | NEEDLE | ) | (strstr(tag, NEEDLE)!= NULL) |
Returns non-zero if given 'tag' string contains 'needle' sub-string.
Definition at line 78 of file live555_rtsp.cpp.
#define TAG_IS | ( | TAG | ) | (strcmp(tag, TAG)== 0) |
Returns non-zero if 'tag' string is equal to given TAG string.
Definition at line 83 of file live555_rtsp.cpp.
typedef struct live555_rtsp_dmux_settings_ctx_s live555_rtsp_dmux_settings_ctx_t |
Live555's RTSP de-multiplexer settings context structure.
Live555's RTSP elementary stream (ES) multiplexer settings context structure.
typedef struct live555_rtsp_mux_ctx_s live555_rtsp_mux_ctx_t |
Live555's RTSP multiplexer context structure.
typedef struct live555_rtsp_mux_settings_ctx_s live555_rtsp_mux_settings_ctx_t |
Live555's RTSP multiplexer settings context structure.
|
static |
Implements the proc_if_s::close callback. See .proc_if.h for further details.
Definition at line 2198 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::open callback. See .proc_if.h for further details.
Definition at line 2110 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::process_frame callback. See .proc_if.h for further details.
Definition at line 2424 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::rest_get callback. See .proc_if.h for further details.
Definition at line 2260 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::rest_put callback. See .proc_if.h for further details.
Definition at line 2516 of file live555_rtsp.cpp.
|
static |
Release specific Live555 RTSP de-multiplexer settings (allocated in heap memory).
live555_rtsp_dmux_settings_ctx | |
log_ctx |
Definition at line 2592 of file live555_rtsp.cpp.
|
static |
Initialize specific Live555 RTSP de-multiplexer settings to defaults.
live555_rtsp_dmux_settings_ctx | |
log_ctx |
Definition at line 2561 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::close callback. See .proc_if.h for further details.
Definition at line 1386 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::process_frame callback. See .proc_if.h for further details.
Definition at line 1417 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::rest_get callback. See .proc_if.h for further details.
Definition at line 1574 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::rest_put callback. See .proc_if.h for further details.
Definition at line 1469 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::close callback. See .proc_if.h for further details.
Definition at line 748 of file live555_rtsp.cpp.
|
static |
Release RTSP multiplexer at the exception of its settings context structure.
Definition at line 779 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::open callback. See .proc_if.h for further details.
Definition at line 613 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::opt callback. See .proc_if.h for further details.
Definition at line 911 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::process_frame callback. See .proc_if.h for further details.
Definition at line 857 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::rest_get callback. See .proc_if.h for further details.
Definition at line 1018 of file live555_rtsp.cpp.
|
static |
Implements the proc_if_s::rest_put callback. See .proc_if.h for further details.
Definition at line 976 of file live555_rtsp.cpp.
|
static |
Release specific Live555 RTSP multiplexer settings (allocated in heap memory).
live555_rtsp_mux_settings_ctx | |
log_ctx |
Definition at line 1264 of file live555_rtsp.cpp.
|
static |
Initialize specific Live555 RTSP multiplexer settings to defaults.
live555_rtsp_mux_settings_ctx | |
log_ctx |
Definition at line 1233 of file live555_rtsp.cpp.
|
static |
Iterate through each stream's 'sub-sessions', setting up each one.
Definition at line 2670 of file live555_rtsp.cpp.
|
static |
Used to shut down and close a stream (including its "RTSPClient" object).
Definition at line 2871 of file live555_rtsp.cpp.
|
static |
called when a stream's sub-session (e.g., audio or video sub-stream) ends.
Definition at line 2818 of file live555_rtsp.cpp.
|
static |
Called when a RTCP "BYE" is received for a sub-session.
Definition at line 2848 of file live555_rtsp.cpp.
const proc_if_t proc_if_live555_rtsp_dmux |
Processor interface implementing the wrapper of the live555 RTSP de-multiplexer.
Definition at line 589 of file live555_rtsp.cpp.
|
static |
Definition at line 570 of file live555_rtsp.cpp.
const proc_if_t proc_if_live555_rtsp_mux |
Processor interface implementing the wrapper of the live555 RTSP multiplexer.
Definition at line 551 of file live555_rtsp.cpp.