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.
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.
void gf_isom_streamer_del (GF_ISOMRTPStreamer *streamer)
 RTP file streamer destructor.
GF_Err gf_isom_streamer_write_sdp (GF_ISOMRTPStreamer *streamer, char *sdpfilename)
 writes the SDP file
GF_Err gf_isom_streamer_get_sdp (GF_ISOMRTPStreamer *streamer, char **out_sdp_buffer)
 gets the SDP file
GF_Err gf_isom_streamer_send_next_packet (GF_ISOMRTPStreamer *streamer, s32 send_ahead_delay, s32 max_sleep_time)
 sends RTP packet
void gf_isom_streamer_reset (GF_ISOMRTPStreamer *streamer, Bool is_loop)
 resets RTP sender

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_name source file name to stream. Hint tracks will be ignored, all media tracks will be streamed
ip_dest destination IP address (V4 or V6, unicast or multicast)
port destination port
loop whether streaming stops at the end of all tracks or not. If not, RTP TS will continuously be incremented
force_mpeg4 forces usage of MPEG-4 generic (RFC3640) for all streams
path_mtu maximum RTP packet payload size allowed
ttl multicast time to live
ifce_addr IP 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:
streamer object to destruct
GF_Err gf_isom_streamer_write_sdp ( GF_ISOMRTPStreamer streamer,
char *  sdpfilename 
)

Writes the SDP file asscoiated with the streaming session

Parameters:
streamer RTP streamer object
sdpfilename SDP 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:
streamer RTP streamer object
out_sdp_buffer location 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:
streamer RTP streamer object
send_ahead_delay delay in milliseconds for packet sending. A packet is sent if (packet.timestamp + send_ahead_delay) is greate than the current time.
max_sleep_time indicates 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:
streamer RTP streamer object
is_loop indicates whether the RTP timelines shall continue from the end of the file or shall restart from 0

Generated on 4 May 2016 for libgpac by  doxygen 1.6.1