libgpac
Documentation of the core library of GPAC
out_rtsp.c File Reference
#include <gpac/internal/media_dev.h>
#include <gpac/constants.h>
#include <gpac/maths.h>
#include <gpac/filters.h>
#include <gpac/ietf.h>
#include <gpac/config_file.h>
#include <gpac/base_coding.h>
#include <gpac/rtp_streamer.h>
#include "out_rtp.h"
+ Include dependency graph for out_rtsp.c:

Data Structures

struct  RTSP_DIRInfo
 
struct  GF_RTSPOutCtx
 
struct  GF_RTSPOutSession
 

Macros

#define OFFS(_n)   #_n, offsetof(GF_RTSPOutCtx, _n)
 

Enumerations

enum  { SDP_NONE = 0 , SDP_WAIT , SDP_LOADED }
 
enum  { MCAST_OFF = 0 , MCAST_ON , MCAST_MIRROR , MCAST_AUTHENTICATE_SETUP }
 
enum  { TRP_BOTH =0 , TRP_UDP_ONLY , TRP_TCP_ONLY }
 

Functions

static GF_Err rtspout_process_setup (GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess, char *ctrl)
 
static void rtspout_send_response (GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess)
 
static void rtspout_check_last_sess (GF_RTSPOutCtx *ctx)
 
static GF_Err rtspout_send_sdp (GF_RTSPOutSession *sess)
 
static void rtspout_del_stream (GF_RTPOutStream *st)
 
static void rtspout_del_session (GF_Filter *filter, GF_RTSPOutSession *sess)
 
GF_RTSPOutSessionrtspout_locate_session_for_pid (GF_Filter *filter, GF_RTSPOutCtx *ctx, GF_FilterPid *pid)
 
static void rtspout_on_rtcp (void *udta)
 
static GF_Err rtspout_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err rtspout_check_new_session (GF_RTSPOutCtx *ctx, Bool single_session)
 
static GF_Err rtspout_initialize (GF_Filter *filter)
 
static void rtspout_finalize (GF_Filter *filter)
 
static Bool rtspout_init_clock (GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess)
 
static void rtspout_send_event (GF_RTSPOutSession *sess, Bool send_stop, Bool send_play, Double start_range)
 
static GF_Err rtspout_process_rtp (GF_Filter *filter, GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess)
 
static GF_Err rtspout_interleave_packet (void *cbk1, void *cbk2, Bool is_rtcp, u8 *pck, u32 pck_size)
 
Bool rtspout_on_filter_setup_error (GF_Filter *f, void *on_setup_error_udta, GF_Err e)
 
static GF_Err rtspout_load_media_service (GF_Filter *filter, GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess, char *src_url)
 
static GF_Err rtspout_check_sdp (GF_Filter *filter, GF_RTSPOutSession *sess)
 
static void rtspout_get_next_mcast_port (GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess, u32 *port)
 
static GF_RTSPOutSessionrtspout_locate_mcast (GF_RTSPOutCtx *ctx, char *res_path)
 
static char * rtspout_get_local_res_path (GF_RTSPOutCtx *ctx, char *res_path, GF_RTSPCommand *com, u32 *err_code, u32 *mcast_mode)
 
static u32 rtspout_get_ctrl_id (GF_RTSPOutSession *sess, char *ctrl)
 
static GF_Err rtspout_process_session_signaling (GF_Filter *filter, GF_RTSPOutCtx *ctx, GF_RTSPOutSession **sess_ptr)
 
void rtspout_merge_http_tunnel (GF_Filter *filter, GF_RTSPOutCtx *ctx, GF_RTSPOutSession *sess)
 
static GF_Err rtspout_process (GF_Filter *filter)
 
static GF_FilterProbeScore rtspout_probe_url (const char *url, const char *mime)
 
const GF_FilterRegister * rtspout_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability RTSPOutCaps []
 
static const GF_FilterArgs RTSPOutArgs []
 
GF_FilterRegister RTSPOutRegister
 

Data Structure Documentation

◆ RTSP_DIRInfo

struct RTSP_DIRInfo
Data Fields
char * name
u32 name_len
char * path
char * ru
char * rg
char * mcast

◆ GF_RTSPOutCtx

struct GF_RTSPOutCtx
+ Collaboration diagram for GF_RTSPOutCtx:
Data Fields
char * dst
char * user_agent
char * cert
char * pkey
GF_PropStringList mounts
u32 port
u32 firstport
u32 timeout
Bool xps
u32 mtu
u32 ttl
char * ifce
u32 payt
u32 tt
s32 delay
char * info
char * url
char * email
s32 runfor
s32 tso
u32 maxc
u32 block_size
Bool close
Bool loop
Bool mpeg4
Bool quit
Bool htun
Bool dynurl
u32 mcast
u32 trp
Bool latm
GF_Filter * filter
GF_Socket * server_sock
GF_List * sessions
u32 next_wake_us
char * ip
Bool done
Bool is_active
GF_List * directories
void * ssl_ctx
u32 ms_timeout

◆ GF_RTSPOutSession

struct GF_RTSPOutSession
+ Collaboration diagram for GF_RTSPOutSession:
Data Fields
GF_RTSPOutCtx * ctx
struct __rtspout_session * mcast_mirror
GF_RTSPSession * rtsp
GF_RTSPCommand * command
GF_RTSPResponse * response
GF_List * streams
Bool loop_disabled
Bool loop
char * service_name
char * sessionID
char peer_address[GF_MAX_IP_NAME_LEN]
char ctrl_name[20]
u32 play_state
Double start_range
u32 last_cseq
Bool interleave
Bool is_tunnel
u32 base_pid_id
Bool first_RTCP_sent
GF_RTPOutStream * active_stream
u32 active_stream_idx
u64 active_min_ts_microsec
u64 sys_clock_at_init
Bool wait_for_loop
u64 microsec_ts_init
Bool single_session
char * server_path
GF_List * filter_srcs
u32 sdp_state
u32 next_stream_id
Bool needs_reconfig
u64 pause_sys_clock
Bool request_pending
char * multicast_ip
u64 sdp_id
u32 mcast_mode
char * mcast_sname
u32 last_active_time
char * setup_ctrl

Macro Definition Documentation

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_RTSPOutCtx, _n)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SDP_NONE 
SDP_WAIT 
SDP_LOADED 

◆ anonymous enum

anonymous enum
Enumerator
MCAST_OFF 
MCAST_ON 
MCAST_MIRROR 
MCAST_AUTHENTICATE_SETUP 

◆ anonymous enum

anonymous enum
Enumerator
TRP_BOTH 
TRP_UDP_ONLY 
TRP_TCP_ONLY 

Function Documentation

◆ rtspout_process_setup()

static GF_Err rtspout_process_setup ( GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess,
char *  ctrl 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_send_response()

static void rtspout_send_response ( GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_check_last_sess()

static void rtspout_check_last_sess ( GF_RTSPOutCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_send_sdp()

static GF_Err rtspout_send_sdp ( GF_RTSPOutSession sess)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_del_stream()

static void rtspout_del_stream ( GF_RTPOutStream st)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_del_session()

static void rtspout_del_session ( GF_Filter *  filter,
GF_RTSPOutSession sess 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_locate_session_for_pid()

GF_RTSPOutSession* rtspout_locate_session_for_pid ( GF_Filter *  filter,
GF_RTSPOutCtx ctx,
GF_FilterPid *  pid 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_on_rtcp()

static void rtspout_on_rtcp ( void *  udta)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_configure_pid()

static GF_Err rtspout_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
static
+ Here is the call graph for this function:

◆ rtspout_check_new_session()

static GF_Err rtspout_check_new_session ( GF_RTSPOutCtx ctx,
Bool  single_session 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_initialize()

static GF_Err rtspout_initialize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ rtspout_finalize()

static void rtspout_finalize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ rtspout_init_clock()

static Bool rtspout_init_clock ( GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_send_event()

static void rtspout_send_event ( GF_RTSPOutSession sess,
Bool  send_stop,
Bool  send_play,
Double  start_range 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_process_rtp()

static GF_Err rtspout_process_rtp ( GF_Filter *  filter,
GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_interleave_packet()

static GF_Err rtspout_interleave_packet ( void *  cbk1,
void *  cbk2,
Bool  is_rtcp,
u8 pck,
u32  pck_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_on_filter_setup_error()

Bool rtspout_on_filter_setup_error ( GF_Filter *  f,
void *  on_setup_error_udta,
GF_Err  e 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_load_media_service()

static GF_Err rtspout_load_media_service ( GF_Filter *  filter,
GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess,
char *  src_url 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_check_sdp()

static GF_Err rtspout_check_sdp ( GF_Filter *  filter,
GF_RTSPOutSession sess 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_get_next_mcast_port()

static void rtspout_get_next_mcast_port ( GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess,
u32 port 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_locate_mcast()

static GF_RTSPOutSession* rtspout_locate_mcast ( GF_RTSPOutCtx ctx,
char *  res_path 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_get_local_res_path()

static char* rtspout_get_local_res_path ( GF_RTSPOutCtx ctx,
char *  res_path,
GF_RTSPCommand com,
u32 err_code,
u32 mcast_mode 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_get_ctrl_id()

static u32 rtspout_get_ctrl_id ( GF_RTSPOutSession sess,
char *  ctrl 
)
static
+ Here is the caller graph for this function:

◆ rtspout_process_session_signaling()

static GF_Err rtspout_process_session_signaling ( GF_Filter *  filter,
GF_RTSPOutCtx ctx,
GF_RTSPOutSession **  sess_ptr 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_merge_http_tunnel()

void rtspout_merge_http_tunnel ( GF_Filter *  filter,
GF_RTSPOutCtx ctx,
GF_RTSPOutSession sess 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtspout_process()

static GF_Err rtspout_process ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ rtspout_probe_url()

static GF_FilterProbeScore rtspout_probe_url ( const char *  url,
const char *  mime 
)
static

◆ rtspout_register()

const GF_FilterRegister* rtspout_register ( GF_FilterSession *  session)
+ Here is the call graph for this function:

Variable Documentation

◆ RTSPOutCaps

const GF_FilterCapability RTSPOutCaps[]
static
Initial value:
=
{
{0},
{0},
}
@ GF_CODECID_NONE
Definition: constants.h:383
@ GF_STREAM_FILE
Definition: constants.h:104
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ GF_CAPFLAG_LOADED_FILTER
Definition: filters.h:2210
@ GF_CAPFLAG_PRESENT
Definition: filters.h:2216
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_UNFRAMED
Definition: filters.h:1118
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_TIMESCALE
Definition: filters.h:1128
@ GF_TRUE
Definition: setup.h:474

◆ RTSPOutArgs

const GF_FilterArgs RTSPOutArgs[]
static

◆ RTSPOutRegister

GF_FilterRegister RTSPOutRegister