libgpac
Documentation of the core library of GPAC. For more information, check out http://gpac.wp.mines-telecom.fr
filestreamer.h File Reference

RTP file streamer functions. More...

#include <gpac/tools.h>
+ Include dependency graph for filestreamer.h:
typedef struct __isom_rtp_streamer GF_ISOMRTPStreamer
 FileStreamer object. More...
 
GF_ISOMRTPStreamergf_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...
 
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...
 
GF_Err gf_isom_streamer_send_next_packet (GF_ISOMRTPStreamer *streamer, s32 send_ahead_delay, s32 max_sleep_time)
 sends RTP packet More...
 
void gf_isom_streamer_reset (GF_ISOMRTPStreamer *streamer, Bool is_loop)
 resets RTP sender More...
 

Detailed Description

>

Typedef Documentation

typedef struct __isom_rtp_streamer GF_ISOMRTPStreamer

This section documents the list object of the GPAC framework.

Function Documentation

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
void gf_isom_streamer_del ( GF_ISOMRTPStreamer streamer)

Destructs an RTP file streamer

Parameters
streamerobject to destruct
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
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
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.
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