FileStreamer

FileStreamer object. More...

Typedefs

typedef struct __file_streamer GF_FileStreamer

Enumerations

enum  { GF_STREAMER_LOG_NONE = 0, GF_STREAMER_LOG_AU, GF_STREAMER_LOG_PACKET }

Functions

GF_FileStreamer * gf_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)
 RTP File Streamer list constructor.
void gf_streamer_del (GF_FileStreamer *streamer)
 RTP file streamer destructor.
GF_Err gf_streamer_write_sdp (GF_FileStreamer *streamer, char *sdpfilename)
 writes the SDP file
GF_Err gf_streamer_get_sdp (GF_FileStreamer *streamer, char **out_sdp_buffer)
 gets the SDP file
GF_Err gf_streamer_send_next_packet (GF_FileStreamer *streamer, s32 send_ahead_delay, s32 max_sleep_time)
 sends RTP packet
void gf_streamer_reset (GF_FileStreamer *streamer, Bool is_loop)
 resets RTP sender

Detailed Description

This section documents the list object of the GPAC framework.


Function Documentation

GF_FileStreamer* gf_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 RTP file 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_streamer_del ( GF_FileStreamer *  streamer  ) 

Destructs an RTP file streamer

Parameters:
ptr object to destruct
GF_Err gf_streamer_write_sdp ( GF_FileStreamer *  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_streamer_get_sdp ( GF_FileStreamer *  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_streamer_send_next_packet ( GF_FileStreamer *  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_streamer_reset ( GF_FileStreamer *  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 3 Nov 2009 for libgpac by  doxygen 1.6.1