Public Member Functions | Private Attributes

TAO_AV_RTCP_Object Class Reference

TAO_AV_Protocol_Object for RTCP protocol. More...

#include <RTCP.h>

Inheritance diagram for TAO_AV_RTCP_Object:
Inheritance graph
[legend]
Collaboration diagram for TAO_AV_RTCP_Object:
Collaboration graph
[legend]

List of all members.

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_Callbackclient_cb_
TAO_AV_RTCP_Callback rtcp_cb_
ACE_UINT32 ssrc_

Detailed Description

TAO_AV_Protocol_Object for RTCP protocol.

Definition at line 199 of file RTCP.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 442 of file RTCP.cpp.

{
}


Member Function Documentation

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]

Implements TAO_AV_Protocol_Object.

Definition at line 426 of file RTCP.cpp.

{
  return 0;
}

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]

Definition at line 238 of file RTCP.h.

{this->ssrc_ = ssrc; }

ACE_UINT32 TAO_AV_RTCP_Object::ssrc ( void   )  [inline]

Definition at line 239 of file RTCP.h.

{ return this->ssrc_; }

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);
}


Member Data Documentation

Definition at line 245 of file RTCP.h.

Definition at line 246 of file RTCP.h.

ACE_UINT32 TAO_AV_RTCP_Object::ssrc_ [private]

Definition at line 247 of file RTCP.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines