Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNRTCP Class Reference

#include <MNRTCP.h>

Inheritance diagram for MNRTCP:

Inheritance graph
[legend]
Collaboration diagram for MNRTCP:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~MNRTCP ()
RTP_RC rtcp_start ()
virtual void rt_set_ssrc (u_int32 ssrc)
virtual RTP_RC process_data (MNRope *rope, struct sockaddr_in *dest)
virtual void notify_write_enabled ()
int rtcp_send_app (char *app, int len, int subtype)
int rtcp_send_app (MNRTCPPacket_APP *packet)
void set_send_buffer (size_t size)
void rtcp_set_app_name (const char *name)
void set_send_sdes (rtcp_sdes_type_t type, char *text, int prio)
const sdes_list_itemrtcp_get_sdes_text (rtcp_sdes_type_t type)
virtual MNRTCPrt_get_rtcp_ptr ()
bool rtcp_find (u_int32 ssrc)
sockaddr_in rtcp_get_ssrc_addr (u_int32 ssrc)
void rtcp_reset (u_int32 ssrc)
SSRCEntryrtcp_get_info_ptr (u_int32 ssrc)
SSRCEntry rtcp_get_info (u_int32 ssrc)
u_int32 rtcp_get_first_ssrc ()
u_int32 rtcp_get_next_ssrc (u_int32 ssrc)
void rtcp_update_recv (rtp_hdr_t *rtp, ntp64 time_, struct sockaddr_in dest)
void rtcp_update_recv (MNRTPPacketPtr packet, ntp64 time_, struct sockaddr_in dest)
void rtcp_update_send (u_int32 packet_count, u_int32 octet_count, u_int32 ts)

Protected Member Functions

 MNRTCP (MNSelector &sel, u_int32 ssrc, int port, int remote_port, OS::GCPtr< MNShared_RTP_RTCP > shared_data, RTSP::TransportTypes requested_transport=RTSP::RTP_AVP_UDP)
 MNRTCP (MNSelector &sel, u_int32 ssrc, MNSocket &port, int remote_port, OS::GCPtr< MNShared_RTP_RTCP > shared_data, RTSP::TransportTypes requested_transport=RTSP::RTP_AVP_UDP)

Constructor & Destructor Documentation

MNRTCP::MNRTCP MNSelector sel,
u_int32  ssrc,
int  port,
int  remote_port,
OS::GCPtr< MNShared_RTP_RTCP shared_data,
RTSP::TransportTypes  requested_transport = RTSP::RTP_AVP_UDP
[protected]
 

Constructor, initializes all variables and flags.

Parameters:
sel Main selector of the process.
ssrc SSRC for the flow that is handled by this RTCP object.
port The UDP/TCP port to listen to.
remote_port The remote UDP/TCP port from which received RTCP messages will be processed.
shared_data Data that is shared with the RTP object.

MNRTCP::MNRTCP MNSelector sel,
u_int32  ssrc,
MNSocket port,
int  remote_port,
OS::GCPtr< MNShared_RTP_RTCP shared_data,
RTSP::TransportTypes  requested_transport = RTSP::RTP_AVP_UDP
[protected]
 

Constructor, initializes all variables and flags.

Parameters:
sel Main selector of the process.
ssrc SSRC for the flow that is handled by this RTCP object.
port The bound socket that will be used to received RTCP messages.
remote_port The remote UDP/TCP port from which received RTCP messages will be processed.
shared_data Data that is shared with the RTP object.

virtual MNRTCP::~MNRTCP  )  [virtual]
 

Destructor, releases all resources


Member Function Documentation

virtual void MNRTCP::notify_write_enabled  )  [virtual]
 

This function notifies the queue of outstanding data not yet sent. It is called by RTPbase::writer and it calls MNSocketQueue.send_bytes itself.

Implements MNRTPbase.

virtual RTP_RC MNRTCP::process_data MNRope rope,
struct sockaddr_in *  dest
[virtual]
 

This function processes arriving RTCP data. It is called by RTPbase::reader and it calls RTCPreader_cb itself.

Parameters:
rope The rope that holds the bytes that have arrived. The rope carries length information as well.
dest This sockaddr_in structure contains information about the sender, such as address and port.
Returns:
Error codes or OK.

Implements MNRTPbase.

virtual MNRTCP* MNRTCP::rt_get_rtcp_ptr  )  [virtual]
 

Returns a pointer to the RTCP object itself.

Returns:
this

Reimplemented from MNRTPbase.

virtual void MNRTCP::rt_set_ssrc u_int32  ssrc  )  [virtual]
 

Fixes the SSRC that is used by this host for sending on this port.

Parameters:
ssrc The new SSRC value.

Reimplemented from MNRTPbase.

bool MNRTCP::rtcp_find u_int32  ssrc  ) 
 

Searches for an SSRC in the list.

Parameters:
ssrc The requested SSRC.
Return values:
true If the SSRC is in the list.
false If the SSRC is not in the list.

u_int32 MNRTCP::rtcp_get_first_ssrc  ) 
 

SSRCEntry MNRTCP::rtcp_get_info u_int32  ssrc  ) 
 

get a copy of the info on a ssrc

SSRCEntry* MNRTCP::rtcp_get_info_ptr u_int32  ssrc  ) 
 

get info about an ssrc

u_int32 MNRTCP::rtcp_get_next_ssrc u_int32  ssrc  ) 
 

const sdes_list_item* MNRTCP::rtcp_get_sdes_text rtcp_sdes_type_t  type  ) 
 

Returns the text of a stored SDES message. If no matching message is stored, NULL is returned. The caller should not modify the data that is returned because it contains, among other things, length information.

Parameters:
type The type of message that is requested by the caller.
Returns:
A pointer to the SDES entry that was requested, or NULL if no entry matches.

struct sockaddr_in MNRTCP::rtcp_get_ssrc_addr u_int32  ssrc  ) 
 

Returns the IP address of the stored SSRC, if there isn't any, if returns 0 as s_addr instead.

Parameters:
ssrc The requested SSRC.
Returns:
The address as a sockaddr_in structure containing host's dotted decimal address and the sending port.

void MNRTCP::rtcp_reset u_int32  ssrc  ) 
 

Clean up structure of the RTCP object after an SSRC collision. Reset the list and send a BYE packet for the SSRC that is kicked.

int MNRTCP::rtcp_send_app MNRTCPPacket_APP packet  ) 
 

Sends a ready-made application defined RTCP packet.

Parameters:
packet A ready-made packet for transmission as an application specific RTCP packet.

int MNRTCP::rtcp_send_app char *  app,
int  len,
int  subtype
 

Sends an application defined RTCP packet.

Parameters:
app The application defined buffer. It must have a size multiple of u_int32. All data in this buffer must be in network byte order.
len The length of the application-defined buffer app in u_int32 words. This is the nb of u_int32 in application-data (without cmn-hdr, without ssrc, without name)
subtype see RFC

void MNRTCP::rtcp_set_app_name const char *  name  ) 
 

Defines the name of the application that is sent with an RTCP APP packet's paclet header.

Parameters:
name The name of the application, not more than 4 ASCII characters.

RTP_RC MNRTCP::rtcp_start  ) 
 

Computes the timeout for the first RTCP packet and starts the UDP/TCP server thread for RTCP.

Returns:
OK or an error code.

void MNRTCP::rtcp_update_recv MNRTPPacketPtr  packet,
ntp64  time_,
struct sockaddr_in  dest
 

void MNRTCP::rtcp_update_recv rtp_hdr_t rtp,
ntp64  time_,
struct sockaddr_in  dest
 

void MNRTCP::rtcp_update_send u_int32  packet_count,
u_int32  octet_count,
u_int32  ts
 

updates sender stats and sets the sr flag

void MNRTCP::set_send_buffer size_t  size  ) 
 

Changes the size of the send buffer.

Parameters:
size The new size of the send buffer.

void MNRTCP::set_send_sdes rtcp_sdes_type_t  type,
char *  text,
int  prio
 

Add or change an SDES item
prio gives the message a priority - it determines how often this sdes item is sent eg 1 is every packet, 2 every 2nd packet etc.. This call is directly redirected to SDESSchedule::set_sdes

Parameters:
type SDES type, according to RFC1889 or MNRTPNetTypes.h
text The message, at most 255 characters without the trailing zero.
prio The priority, counting the number of RTCP messages that are sent without this message type before it is sent once.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:35:59 2005 for Komssys by doxygen 1.3.8