TAO_AV_Protocol_Object for RTCP protocol. More...
#include <RTCP.h>
Public Member Functions | |
TAO_AV_RTCP_Object (TAO_AV_Callback *client_cb, TAO_AV_RTCP_Callback *&rtcp_cb, TAO_AV_Transport *transport=0) | |
constructor. | |
virtual | ~TAO_AV_RTCP_Object (void) |
Destructor. | |
virtual int | handle_input (void) |
virtual int | handle_control_input (ACE_Message_Block *frame, const ACE_Addr &peer_address) |
Called on a control object. | |
virtual int | handle_control_output (ACE_Message_Block *frame) |
virtual int | set_policies (const TAO_AV_PolicyList &policy_list) |
set/get policies. | |
virtual int | start (void) |
start/stop the flow. | |
virtual int | stop (void) |
virtual int | send_frame (ACE_Message_Block *frame, TAO_AV_frame_info *frame_info=0) |
send a data frame. | |
virtual int | send_frame (const iovec *iov, int iovcnt, TAO_AV_frame_info *frame_info=0) |
send a frame in iovecs. | |
virtual int | send_frame (const char *buf, size_t len) |
virtual int | destroy (void) |
end the stream. | |
void | ssrc (ACE_UINT32 ssrc) |
ACE_UINT32 | ssrc (void) |
void | ts_offset (ACE_UINT32 ts_offset) |
Private Attributes | |
TAO_AV_Callback * | client_cb_ |
TAO_AV_RTCP_Callback | rtcp_cb_ |
ACE_UINT32 | ssrc_ |
TAO_AV_Protocol_Object for RTCP protocol.
Definition at line 199 of file RTCP.h.
TAO_AV_RTCP_Object::TAO_AV_RTCP_Object | ( | TAO_AV_Callback * | client_cb, | |
TAO_AV_RTCP_Callback *& | rtcp_cb, | |||
TAO_AV_Transport * | transport = 0 | |||
) |
constructor.
Definition at line 432 of file RTCP.cpp.
:TAO_AV_Protocol_Object (&rtcp_cb_, transport) { rtcp_cb = &this->rtcp_cb_; this->client_cb_ = client_cb; }
TAO_AV_RTCP_Object::~TAO_AV_RTCP_Object | ( | void | ) | [virtual] |
int TAO_AV_RTCP_Object::destroy | ( | void | ) | [virtual] |
end the stream.
Implements TAO_AV_Protocol_Object.
Definition at line 447 of file RTCP.cpp.
{ this->callback_->handle_destroy (); delete this; return 0; }
int TAO_AV_RTCP_Object::handle_control_input | ( | ACE_Message_Block * | control_frame, | |
const ACE_Addr & | peer_address | |||
) | [virtual] |
Called on a control object.
Reimplemented from TAO_AV_Protocol_Object.
Definition at line 474 of file RTCP.cpp.
{ return this->callback_->receive_frame (frame, 0, peer_address); }
int TAO_AV_RTCP_Object::handle_control_output | ( | ACE_Message_Block * | frame | ) | [virtual] |
Definition at line 483 of file RTCP.cpp.
{ TAO_AV_RTCP_Callback *cb = dynamic_cast<TAO_AV_RTCP_Callback*> (this->callback_); return cb->send_frame (frame); }
int TAO_AV_RTCP_Object::handle_input | ( | void | ) | [virtual] |
Implements TAO_AV_Protocol_Object.
Definition at line 385 of file RTCP.cpp.
{ size_t bufsiz = 2*this->transport_->mtu (); ACE_Message_Block data (bufsiz); int n = this->transport_->recv (data.rd_ptr (),bufsiz); if (n == 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_ERROR, "TAO_AV_RTCP::handle_input:connection closed\n")); return -1; } if (n < 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_ERROR,"TAO_AV_RTCP::handle_input:recv error\n")); return -1; } data.wr_ptr (n); ACE_Addr *peer_addr = this->transport_->get_peer_addr (); this->callback_->receive_control_frame (&data,*peer_addr); return 0; }
int TAO_AV_RTCP_Object::send_frame | ( | const iovec * | iov, | |
int | iovcnt, | |||
TAO_AV_frame_info * | frame_info = 0 | |||
) | [virtual] |
send a frame in iovecs.
Implements TAO_AV_Protocol_Object.
Definition at line 417 of file RTCP.cpp.
{ return this->transport_->send (iov, iovcnt); }
int TAO_AV_RTCP_Object::send_frame | ( | const char * | buf, | |
size_t | len | |||
) | [virtual] |
int TAO_AV_RTCP_Object::send_frame | ( | ACE_Message_Block * | frame, | |
TAO_AV_frame_info * | frame_info = 0 | |||
) | [virtual] |
send a data frame.
Implements TAO_AV_Protocol_Object.
Definition at line 410 of file RTCP.cpp.
{ return this->transport_->send (frame); }
int TAO_AV_RTCP_Object::set_policies | ( | const TAO_AV_PolicyList & | policy_list | ) | [virtual] |
set/get policies.
Reimplemented from TAO_AV_Protocol_Object.
Definition at line 456 of file RTCP.cpp.
{
return -1;
}
void TAO_AV_RTCP_Object::ssrc | ( | ACE_UINT32 | ssrc | ) | [inline] |
ACE_UINT32 TAO_AV_RTCP_Object::ssrc | ( | void | ) | [inline] |
int TAO_AV_RTCP_Object::start | ( | void | ) | [virtual] |
start/stop the flow.
Reimplemented from TAO_AV_Protocol_Object.
Definition at line 462 of file RTCP.cpp.
{ return this->callback_->handle_start (); }
int TAO_AV_RTCP_Object::stop | ( | void | ) | [virtual] |
Reimplemented from TAO_AV_Protocol_Object.
Definition at line 468 of file RTCP.cpp.
{ return this->callback_->handle_stop (); }
void TAO_AV_RTCP_Object::ts_offset | ( | ACE_UINT32 | ts_offset | ) |
Definition at line 491 of file RTCP.cpp.
{ TAO_AV_RTCP_Callback *cb = dynamic_cast<TAO_AV_RTCP_Callback*> (this->callback_); cb->ts_offset (ts_offset); }
TAO_AV_Callback* TAO_AV_RTCP_Object::client_cb_ [private] |
ACE_UINT32 TAO_AV_RTCP_Object::ssrc_ [private] |