diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp | 195 |
1 files changed, 25 insertions, 170 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp index 305b061ab14..346d2f342e4 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp @@ -114,7 +114,6 @@ TAO_Basic_StreamCtrl::TAO_Basic_StreamCtrl (void) { } - // Stop the transfer of data of the stream // Empty the_spec means apply operation to all flows void @@ -267,7 +266,7 @@ TAO_Basic_StreamCtrl::destroy (const AVStreams::flowSpec &flow_spec, // Empty the_spec means apply operation to all flows CORBA::Boolean TAO_Basic_StreamCtrl::modify_QoS (AVStreams::streamQoS & new_qos, - const AVStreams::flowSpec &flowspec, + const AVStreams::flowSpec &the_spec, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::noSuchFlow, @@ -275,49 +274,11 @@ TAO_Basic_StreamCtrl::modify_QoS (AVStreams::streamQoS & new_qos, { ACE_TRY { - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_Basic_StreamCtrl::modify_QoS\n")); - - AVStreams::flowSpec in_flowspec; - AVStreams::flowSpec out_flowspec; - - in_flowspec.length (0); - out_flowspec.length (0); - - int in_index = 0; - int out_index = 0; - - for (u_int i=0;i < flowspec.length ();i++) - { - TAO_Forward_FlowSpec_Entry entry; - entry.parse (flowspec [i].in ()); - int direction = entry.direction (); - if (direction == 0) - { - in_flowspec.length (in_index + 1); - in_flowspec [in_index++] = CORBA::string_dup (entry.entry_to_string ()); - } - else - { - out_flowspec.length (out_index + 1); - out_flowspec [out_index++] = CORBA::string_dup (entry.entry_to_string ()); - } - } - - if (in_flowspec.length () != 0) - { - this->vdev_a_->modify_QoS (new_qos, in_flowspec, ACE_TRY_ENV); - ACE_TRY_CHECK; - } - - if (out_flowspec.length () != 0) - { - this->vdev_b_->modify_QoS (new_qos, out_flowspec, ACE_TRY_ENV); - ACE_TRY_CHECK; - } - } + this->vdev_a_->modify_QoS (new_qos, the_spec, ACE_TRY_ENV); + ACE_TRY_CHECK; + this->vdev_b_->modify_QoS (new_qos, the_spec, ACE_TRY_ENV); + ACE_TRY_CHECK; + } ACE_CATCHANY { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Basic_StreamCtrl::modify_QoS"); @@ -749,15 +710,6 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party, streamctrl_any, ACE_TRY_ENV); ACE_TRY_CHECK; - - CORBA::Any streamendpoint_a_any; - streamendpoint_a_any <<= this->sep_a_.in (); - this->vdev_a_->define_property ("Related_StreamEndpoint_A", - streamendpoint_a_any, - ACE_TRY_ENV); - - ACE_TRY_CHECK; - // add the mmdevice, sep and vdev to the map. MMDevice_Map_Entry map_entry; MMDevice_Map_Hash_Key key (a_party); @@ -812,14 +764,6 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party, ACE_TRY_ENV); ACE_TRY_CHECK; - CORBA::Any streamendpoint_b_any; - streamendpoint_b_any <<= this->sep_b_.in (); - this->vdev_b_->define_property ("Related_StreamEndpoint_B", - streamendpoint_b_any, - ACE_TRY_ENV); - - ACE_TRY_CHECK; - // add the mmdevice, sep and vdev to the map. MMDevice_Map_Entry map_entry; MMDevice_Map_Hash_Key key (b_party); @@ -1386,11 +1330,6 @@ TAO_StreamCtrl::modify_QoS (AVStreams::streamQoS &the_qos, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed)) { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_StreamCtrl::modify_QoS\n")); - - if (this->mcastconfigif_ != 0) { // call modify_Qos on the root VDev which is the mcast configif. @@ -1753,27 +1692,15 @@ TAO_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder, AVStreams::streamQoS network_qos; if (qos.length () > 0) { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "QoS is Specified\n")); - - int result = this->translate_qos (qos, - network_qos); + int result = this->translate_qos (qos, network_qos); if (result != 0) if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "QoS translation failed\n")); - - this->qos ().set (network_qos); + ACE_DEBUG ((LM_DEBUG, "QoS translation failed\n")); } - - AVStreams::flowSpec flow_spec (the_spec); this->handle_preconnect (flow_spec); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_StreamEndPoint::connect: flow_spec_length = %d\n", + ACE_DEBUG ((LM_DEBUG, "TAO_StreamEndPoint::connect: flow_spec_length = %d\n", flow_spec.length ())); u_int i; for (i=0;i<flow_spec.length ();i++) @@ -1819,27 +1746,17 @@ TAO_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder, TAO_Reverse_FlowSpec_Entry, 0); if (entry->parse (flow_spec[i].in ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Reverse_Flow_Spec_Set::parse failed\n"), - 0); - + ACE_ERROR_RETURN ((LM_ERROR, "Reverse_Flow_Spec_Set::parse failed\n"), 0); if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_StreamEndPoint::Connect: Reverse Flow Spec %s\n", - entry->entry_to_string ())); - + ACE_DEBUG ((LM_DEBUG, "TAO_StreamEndPoint::Connect: Reverse Flow Spec %s\n", entry->entry_to_string ())); this->reverse_flow_spec_set.insert (entry); } - result = TAO_AV_CORE::instance ()->init_reverse_flows (this, this->forward_flow_spec_set, this->reverse_flow_spec_set, TAO_AV_Core::TAO_AV_ENDPOINT_A); if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "TAO_AV_Core::init_reverse_flows failed\n"), - 0); - + ACE_ERROR_RETURN ((LM_ERROR, "TAO_AV_Core::init_reverse_flows failed\n"), 0); // Make the upcall to the app retv = this->handle_postconnect (flow_spec); } @@ -1862,7 +1779,6 @@ TAO_StreamEndPoint::translate_qos (const AVStreams::streamQoS& application_qos, for (u_int i=0;i<len;i++) { network_qos [i].QoSType = application_qos [i].QoSType; - network_qos [i].QoSParams = application_qos [i].QoSParams; } return 0; } @@ -2065,7 +1981,7 @@ TAO_StreamEndPoint::destroy (const AVStreams::flowSpec &flow_spec, CORBA::Boolean TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr /*initiator*/, CORBA::Boolean /*is_mcast*/, - AVStreams::streamQoS &qos, + AVStreams::streamQoS &/*qos*/, AVStreams::flowSpec &flow_spec, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, @@ -2075,29 +1991,11 @@ TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr /*initiato AVStreams::FPError)) { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\n(%P|%t) TAO_StreamEndPoint::request_connection called")); - - int result = 0; ACE_TRY { - AVStreams::streamQoS network_qos; - if (qos.length () > 0) - { - - ACE_DEBUG ((LM_DEBUG, - "QoS is Specified\n")); - - int result = this->translate_qos (qos, network_qos); - if (result != 0) - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "QoS translation failed\n")); - - this->qos ().set (network_qos); - } - + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) TAO_StreamEndPoint::request_connection called")); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) TAO_StreamEndPoint::request_connection: " @@ -2115,10 +2013,7 @@ TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr /*initiato if (entry->parse (flow_spec[i]) == -1) return 0; if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_StreamEndPoint::request_connection Flow Spec %s", - entry->entry_to_string ())); - + ACE_DEBUG ((LM_DEBUG, "TAO_StreamEndPoint::request_connection Flow Spec %s", entry->entry_to_string ())); this->forward_flow_spec_set.insert (entry); } @@ -2137,8 +2032,7 @@ TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr /*initiato } ACE_CATCHANY { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "TAO_StreamEndpoint::request_connection"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_StreamEndpoint::request_connection"); return 0; } ACE_ENDTRY; @@ -2155,11 +2049,7 @@ TAO_StreamEndPoint::modify_QoS (AVStreams::streamQoS &/* new_qos */, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed)) { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_StreamEndPoint::modify_QoS\n")); - return 1; - + return 0; } // Sets the list of protocols this streamendpoint can understand. @@ -3049,53 +2939,18 @@ TAO_VDev::set_dev_params (const char *flowName, // QoS Modification should be handled by the application currently. CORBA::Boolean TAO_VDev::modify_QoS (AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &flowspec, + const AVStreams::flowSpec &the_spec, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed)) { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO_VDev::modify_QoS\n")); - - if (flowspec.length () != 0) - { - TAO_Forward_FlowSpec_Entry entry; - entry.parse (flowspec [0]); - int direction = entry.direction (); - if (direction == 0) - { - AVStreams::StreamEndPoint_A_ptr sep_a; - - CORBA::Any_ptr streamendpoint_a_any = - this->get_property_value ("Related_StreamEndpoint_A", - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - *streamendpoint_a_any >>= sep_a; - if (sep_a != 0) - { - sep_a->modify_QoS (the_qos, flowspec, ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - } - else ACE_DEBUG ((LM_DEBUG, - "Stream EndPoint Not Found\n")); - } - else - { - AVStreams::StreamEndPoint_B_ptr sep_b; - - CORBA::Any_ptr streamendpoint_b_any = - this->get_property_value ("Related_StreamEndpoint_B", - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - *streamendpoint_b_any >>= sep_b; - sep_b->modify_QoS (the_qos, flowspec, ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - } - } - return 1; + ACE_UNUSED_ARG (the_qos); + ACE_UNUSED_ARG (the_spec); + ACE_UNUSED_ARG (ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + return 0; } TAO_VDev::~TAO_VDev (void) |