GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
filestreamer.c File Reference
#include <gpac/internal/media_dev.h>
#include <gpac/constants.h>
#include <gpac/math.h>
#include <gpac/isomedia.h>
#include <gpac/ietf.h>
#include <gpac/config_file.h>
#include <gpac/base_coding.h>
#include <gpac/filestreamer.h>
#include <gpac/rtp_streamer.h>
+ Include dependency graph for filestreamer.c:

Data Structures

struct  GF_RTPTrack
 
struct  GF_ISOMRTPStreamer
 FileStreamer object. More...
 

Functions

static GF_Err gf_isom_streamer_setup_sdp (GF_ISOMRTPStreamer *streamer, char *sdpfilename, char **out_sdp_buffer)
 
GF_Err gf_isom_streamer_write_sdp (GF_ISOMRTPStreamer *streamer, char *sdpfilename)
 writes the SDP file More...
 
GF_Err gf_isom_streamer_get_sdp (GF_ISOMRTPStreamer *streamer, char **out_sdp_buffer)
 gets the SDP file More...
 
void gf_isom_streamer_reset (GF_ISOMRTPStreamer *streamer, Bool is_loop)
 resets RTP sender More...
 
GF_Err gf_isom_streamer_send_next_packet (GF_ISOMRTPStreamer *streamer, s32 send_ahead_delay, s32 max_sleep_time)
 sends RTP packet More...
 
static u16 check_next_port (GF_ISOMRTPStreamer *streamer, u16 first_port)
 
GF_ISOMRTPStreamer * gf_isom_streamer_new (const char *file_name, const char *ip_dest, u16 port, Bool loop, Bool force_mpeg4, u32 path_mtu, u32 ttl, char *ifce_addr)
 ISO File RTP Streamer list constructor. More...
 
void gf_isom_streamer_del (GF_ISOMRTPStreamer *streamer)
 RTP file streamer destructor. More...
 

Data Structure Documentation

struct GF_RTPTrack
+ Collaboration diagram for GF_RTPTrack:
Data Fields
struct __tag_rtp_track * next
GF_RTPStreamer * rtp
u16 port
Double microsec_ts_scale
u32 avc_nalu_size
u32 track_num
u32 timescale
u32 nb_aus
GF_ISOSample * au
u32 current_au
u32 sample_duration
u32 sample_desc_index
u64 microsec_dts
u32 ts_offset
u32 microsec_ts_offset
struct __isom_rtp_streamer

This section documents the list object of the GPAC framework.

+ Collaboration diagram for GF_ISOMRTPStreamer:
Data Fields
GF_ISOFile * isom
char * dest_ip
Bool loop
Bool force_mpeg4_generic
u32 timelineOrigin
GF_RTPTrack * stream
u32 duration_ms
u32 base_track
Bool first_RTCP_sent

Function Documentation

static GF_Err gf_isom_streamer_setup_sdp ( GF_ISOMRTPStreamer *  streamer,
char *  sdpfilename,
char **  out_sdp_buffer 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_isom_streamer_write_sdp ( GF_ISOMRTPStreamer *  streamer,
char *  sdpfilename 
)

Writes the SDP file asscoiated with the streaming session

Parameters
streamerRTP streamer object
sdpfilenameSDP file name to create

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_isom_streamer_get_sdp ( GF_ISOMRTPStreamer *  streamer,
char **  out_sdp_buffer 
)

Gets the SDP asscoiated with all media in the streaming session (only media parts are returned)

Parameters
streamerRTP streamer object
out_sdp_bufferlocation to the SDP buffer to allocate and fill

+ Here is the call graph for this function:

void gf_isom_streamer_reset ( GF_ISOMRTPStreamer *  streamer,
Bool  is_loop 
)

Reset the RTP streams to the beginning of the media file

Parameters
streamerRTP streamer object
is_loopindicates whether the RTP timelines shall continue from the end of the file or shall restart from 0
GF_Err gf_isom_streamer_send_next_packet ( GF_ISOMRTPStreamer *  streamer,
s32  send_ahead_delay,
s32  max_sleep_time 
)

Sends the next RTP packet in the current file, potentially waiting for the TS to be mature. If the last packet is sent and looping is disabled, this will return GF_EOS.

Parameters
streamerRTP streamer object
send_ahead_delaydelay in milliseconds for packet sending. A packet is sent if (packet.timestamp + send_ahead_delay) is greate than the current time.
max_sleep_timeindicates that if the streamer has to wait more than max_sleep_time before sending the packet, it should return and send it later.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u16 check_next_port ( GF_ISOMRTPStreamer *  streamer,
u16  first_port 
)
static

+ Here is the caller graph for this function:

GF_ISOMRTPStreamer* gf_isom_streamer_new ( const char *  file_name,
const char *  ip_dest,
u16  port,
Bool  loop,
Bool  force_mpeg4,
u32  path_mtu,
u32  ttl,
char *  ifce_addr 
)
    Constructs a new ISO file RTP streamer
Parameters
file_namesource file name to stream. Hint tracks will be ignored, all media tracks will be streamed
ip_destdestination IP address (V4 or V6, unicast or multicast)
portdestination port
loopwhether streaming stops at the end of all tracks or not. If not, RTP TS will continuously be incremented
force_mpeg4forces usage of MPEG-4 generic (RFC3640) for all streams
path_mtumaximum RTP packet payload size allowed
ttlmulticast time to live
ifce_addrIP of the local interface to use (may be NULL)
Returns
new list object

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gf_isom_streamer_del ( GF_ISOMRTPStreamer *  streamer)

Destructs an RTP file streamer

Parameters
streamerobject to destruct

+ Here is the call graph for this function:

+ Here is the caller graph for this function: