TAO_StreamCtrl Class Reference

Implementation the A/V StreamCtrl class. this class is used to control the stream. It should be subclassed by applications that want to provide more control features. More...

#include <AVStreams_i.h>

Inheritance diagram for TAO_StreamCtrl:

Inheritance graph
[legend]
Collaboration diagram for TAO_StreamCtrl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_StreamCtrl (void)
 Default Constructor.

virtual ~TAO_StreamCtrl (void)
 virtual destructor.

virtual void stop (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow)
virtual void start (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow)
virtual void destroy (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow)
virtual CORBA::Boolean bind_devs (AVStreams::MMDevice_ptr a_party, AVStreams::MMDevice_ptr b_party, AVStreams::streamQoS &the_qos, const AVStreams::flowSpec &the_flows ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed)
virtual CORBA::Boolean bind (AVStreams::StreamEndPoint_A_ptr a_party, AVStreams::StreamEndPoint_B_ptr b_party, AVStreams::streamQoS &the_qos, const AVStreams::flowSpec &the_flows ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed)
virtual void unbind_dev (AVStreams::MMDevice_ptr dev, const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow)
virtual void unbind_party (AVStreams::StreamEndPoint_ptr the_ep, const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow)
 Unbind the_ep from the stream. Empty the_spec means apply to all flows.

virtual void unbind (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpFailed)
 unbind the stream. Same effect as Basic_StreamCtrl::destroy ()

virtual AVStreams::VDev_ptr get_related_vdev (AVStreams::MMDevice_ptr adev, AVStreams::StreamEndPoint_out sep ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpFailed)
virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed)

Protected Types

typedef ACE_Hash_Map_Manager<
MMDevice_Map_Hash_Key, MMDevice_Map_Entry,
ACE_Null_Mutex
MMDevice_Map
typedef ACE_Hash_Map_Iterator<
MMDevice_Map_Hash_Key, MMDevice_Map_Entry,
ACE_Null_Mutex
MMDevice_Map_Iterator

Protected Attributes

MMDevice_Map mmdevice_a_map_
MMDevice_Map mmdevice_b_map_
TAO_MCastConfigIfmcastconfigif_
AVStreams::MCastConfigIf_var mcastconfigif_ptr_
AVStreams::StreamCtrl_var streamctrl_
CORBA::ULong source_id_

Detailed Description

Implementation the A/V StreamCtrl class. this class is used to control the stream. It should be subclassed by applications that want to provide more control features.

Definition at line 223 of file AVStreams_i.h.


Member Typedef Documentation

typedef ACE_Hash_Map_Manager<MMDevice_Map_Hash_Key,MMDevice_Map_Entry,ACE_Null_Mutex> TAO_StreamCtrl::MMDevice_Map [protected]
 

Definition at line 337 of file AVStreams_i.h.

typedef ACE_Hash_Map_Iterator<MMDevice_Map_Hash_Key,MMDevice_Map_Entry,ACE_Null_Mutex> TAO_StreamCtrl::MMDevice_Map_Iterator [protected]
 

Definition at line 338 of file AVStreams_i.h.


Constructor & Destructor Documentation

TAO_StreamCtrl::TAO_StreamCtrl void   ) 
 

Default Constructor.

Definition at line 456 of file AVStreams_i.cpp.

References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TRY, ACE_TRY_CHECK, TAO_AV_RTCP::alloc_srcid(), ACE_OS::hostname(), ACE_OS::inet_addr(), source_id_, and streamctrl_.

00457   :mcastconfigif_ (0)
00458 {
00459   ACE_DECLARE_NEW_CORBA_ENV;
00460   ACE_TRY
00461     {
00462       this->streamctrl_ = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
00463       ACE_TRY_CHECK;
00464       char buf [BUFSIZ];
00465       int result = ACE_OS::hostname (buf, BUFSIZ);
00466       unsigned long ipaddr = 0;
00467       if (result == 0)
00468         ipaddr = ACE_OS::inet_addr (buf);
00469       this->source_id_ = TAO_AV_RTCP::alloc_srcid (ipaddr);
00470     }
00471   ACE_CATCHANY
00472     {
00473       ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_StreamCtrl::TAO_StreamCtrl");
00474     }
00475   ACE_ENDTRY;
00476   ACE_CHECK;
00477 }

TAO_StreamCtrl::~TAO_StreamCtrl void   )  [virtual]
 

virtual destructor.

Definition at line 479 of file AVStreams_i.cpp.

References mcastconfigif_.

00480 {
00481   delete this->mcastconfigif_;
00482 }


Member Function Documentation

virtual CORBA::Boolean TAO_StreamCtrl::bind AVStreams::StreamEndPoint_A_ptr  a_party,
AVStreams::StreamEndPoint_B_ptr  b_party,
AVStreams::streamQoS the_qos,
const AVStreams::flowSpec &the_flows  ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed) [virtual]
 

Establish a connection between two streamendpoints. This can be used if the streamendpoints have been created independent of a MMDevice

virtual CORBA::Boolean TAO_StreamCtrl::bind_devs AVStreams::MMDevice_ptr  a_party,
AVStreams::MMDevice_ptr  b_party,
AVStreams::streamQoS the_qos,
const AVStreams::flowSpec &the_flows  ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed) [virtual]
 

Establish a stream between a_party and b_party, with qos the_qos, and for the flows in the_flows if the_flows is empty, bind all the flows Causes a connection to be established between the StreamEndpoints. Returns success/failure

virtual void TAO_StreamCtrl::destroy const AVStreams::flowSpec &the_spec  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, AVStreams::noSuchFlow) [virtual]
 

Tears down the stream. This will close the connection, and delete the streamendpoint and vdev associated with this stream Empty the_spec means apply operation to all flows

Reimplemented from TAO_Basic_StreamCtrl.

AVStreams::VDev_ptr TAO_StreamCtrl::get_related_vdev AVStreams::MMDevice_ptr  adev,
AVStreams::StreamEndPoint_out sep  ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, AVStreams::streamOpFailed) [virtual]
 

Definition at line 1375 of file AVStreams_i.cpp.

References TAO_StreamCtrl::MMDevice_Map_Entry::sep_, and TAO_StreamCtrl::MMDevice_Map_Entry::vdev_.

01380 {
01381   MMDevice_Map_Hash_Key key (adev);
01382   MMDevice_Map_Entry entry;
01383   int result = -1;
01384   result = this->mmdevice_a_map_.find (key, entry);
01385   if (result < 0)
01386     {
01387       result = this->mmdevice_a_map_.find (key, entry);
01388       if (result < 0)
01389         return AVStreams::VDev::_nil ();
01390     }
01391   sep = AVStreams::StreamEndPoint::_duplicate (entry.sep_.in ());
01392   return AVStreams::VDev::_duplicate (entry.vdev_.in ());
01393 }

virtual CORBA::Boolean TAO_StreamCtrl::modify_QoS AVStreams::streamQoS new_qos,
const AVStreams::flowSpec &the_spec  ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed) [virtual]
 

Changes the QoS associated with the stream Empty the_spec means apply operation to all flows

Reimplemented from TAO_Basic_StreamCtrl.

virtual void TAO_StreamCtrl::start const AVStreams::flowSpec &the_spec  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, AVStreams::noSuchFlow) [virtual]
 

Start the transfer of data in the stream. Empty the_spec means apply operation to all flows

Reimplemented from TAO_Basic_StreamCtrl.

virtual void TAO_StreamCtrl::stop const AVStreams::flowSpec &the_spec  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, AVStreams::noSuchFlow) [virtual]
 

Stop the transfer of data of the stream Empty the_spec means apply operation to all flows

Reimplemented from TAO_Basic_StreamCtrl.

virtual void TAO_StreamCtrl::unbind ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, AVStreams::streamOpFailed) [virtual]
 

unbind the stream. Same effect as Basic_StreamCtrl::destroy ()

virtual void TAO_StreamCtrl::unbind_dev AVStreams::MMDevice_ptr  dev,
const AVStreams::flowSpec &the_spec  ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow) [virtual]
 

virtual void TAO_StreamCtrl::unbind_party AVStreams::StreamEndPoint_ptr  the_ep,
const AVStreams::flowSpec &the_spec  ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, AVStreams::streamOpFailed, AVStreams::noSuchFlow) [virtual]
 

Unbind the_ep from the stream. Empty the_spec means apply to all flows.


Member Data Documentation

TAO_MCastConfigIf* TAO_StreamCtrl::mcastconfigif_ [protected]
 

Definition at line 342 of file AVStreams_i.h.

Referenced by ~TAO_StreamCtrl().

AVStreams::MCastConfigIf_var TAO_StreamCtrl::mcastconfigif_ptr_ [protected]
 

Definition at line 343 of file AVStreams_i.h.

MMDevice_Map TAO_StreamCtrl::mmdevice_a_map_ [protected]
 

Definition at line 340 of file AVStreams_i.h.

MMDevice_Map TAO_StreamCtrl::mmdevice_b_map_ [protected]
 

Definition at line 341 of file AVStreams_i.h.

CORBA::ULong TAO_StreamCtrl::source_id_ [protected]
 

Definition at line 345 of file AVStreams_i.h.

Referenced by TAO_StreamCtrl().

AVStreams::StreamCtrl_var TAO_StreamCtrl::streamctrl_ [protected]
 

Definition at line 344 of file AVStreams_i.h.

Referenced by TAO_StreamCtrl().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:48:52 2006 for TAO_AV by doxygen 1.3.6