mediastreamer2 5.2.0
Data Structures | Typedefs | Functions
Text_stream_api

Data Structures

struct  _TextStream
 

Typedefs

typedef struct _TextStream TextStream
 

Functions

TextStreamtext_stream_new (MSFactory *factory, int loc_rtp_port, int loc_rtcp_port, bool_t ipv6)
 
TextStreamtext_stream_new_with_sessions (MSFactory *factory, const MSMediaStreamSessions *sessions)
 
TextStreamtext_stream_new2 (MSFactory *factory, const char *ip, int loc_rtp_port, int loc_rtcp_port)
 
TextStreamtext_stream_start (TextStream *stream, RtpProfile *profile, const char *rem_rtp_addr, int rem_rtp_port, const char *rem_rtcp_addr, int rem_rtcp_port, int payload_type)
 
void text_stream_stop (TextStream *stream)
 
void text_stream_iterate (TextStream *stream)
 
void text_stream_putchar32 (TextStream *stream, uint32_t i)
 
void text_stream_prepare_text (TextStream *stream)
 
void text_stream_unprepare_text (TextStream *stream)
 

Detailed Description

Function Documentation

◆ text_stream_iterate()

void text_stream_iterate ( TextStream stream)

Executes background low priority tasks related to text processing (RTP statistics analysis). It should be called periodically, for example with an interval of 100 ms or so.

Parameters
[in]streamTextStream object previously created with text_stream_new().

◆ text_stream_new()

TextStream * text_stream_new ( MSFactory factory,
int  loc_rtp_port,
int  loc_rtcp_port,
bool_t  ipv6 
)

Creates a TextStream object listening on a RTP port.

Parameters
loc_rtp_portthe local UDP port to listen for RTP packets.
loc_rtcp_portthe local UDP port to listen for RTCP packets
ipv6TRUE if ipv6 must be used.
factory
Returns
a new TextStream.

◆ text_stream_new2()

TextStream * text_stream_new2 ( MSFactory factory,
const char *  ip,
int  loc_rtp_port,
int  loc_rtcp_port 
)

Creates a TextStream object listening on a RTP port for a dedicated address.

Parameters
loc_ipthe local ip to listen for RTP packets. Can be ::, O.O.O.O or any ip4/6 addresses
[in]loc_rtp_portthe local UDP port to listen for RTP packets.
[in]loc_rtcp_portthe local UDP port to listen for RTCP packets
factory
Returns
a new TextStream.

◆ text_stream_new_with_sessions()

TextStream * text_stream_new_with_sessions ( MSFactory factory,
const MSMediaStreamSessions sessions 
)

Creates a TextStream object from initialized MSMediaStreamSessions.

Parameters
sessionsthe MSMediaStreamSessions
factory
Returns
a new TextStream

◆ text_stream_putchar32()

void text_stream_putchar32 ( TextStream stream,
uint32_t  i 
)

Writes a character to stream in UTF-32 format.

Parameters
[in]streamTextStream object previously created with text_stream_new().
[in]ithe Char in UTF-32 format.

◆ text_stream_start()

TextStream * text_stream_start ( TextStream stream,
RtpProfile *  profile,
const char *  rem_rtp_addr,
int  rem_rtp_port,
const char *  rem_rtcp_addr,
int  rem_rtcp_port,
int  payload_type 
)

Starts a text stream.

Parameters
[in]streamTextStream object previously created with text_stream_new().
[in]profileRtpProfile object holding the PayloadType that can be used during the text session.
[in]rem_rtp_addrThe remote IP address where to send the text to.
[in]rem_rtp_portThe remote port where to send the text to.
[in]rem_rtcp_addrThe remote IP address for RTCP.
[in]rem_rtcp_portThe remote port for RTCP.
[in]payload_typeThe payload type number used to send the text stream. A valid PayloadType must be available at this index in the profile.
[in]factory

◆ text_stream_stop()

void text_stream_stop ( TextStream stream)

Stops the text streaming thread and free everything