diff options
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp | 66 |
1 files changed, 20 insertions, 46 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp index e97f210997e..36d1fcab944 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp @@ -89,8 +89,7 @@ Sender::parse_args (int argc, int Sender::init (int argc, - char **argv - ACE_ENV_ARG_DECL) + char **argv) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -140,27 +139,22 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->sender_mmdevice_->_this (); // Register the object reference with the Naming Service and bind to // the receivers this->connection_manager_.bind_to_receivers (this->sender_name_, - mmdevice.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + mmdevice.in ()); // Connect to the receivers - this->connection_manager_.connect_to_receivers (mmdevice.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->connection_manager_.connect_to_receivers (mmdevice.in ()); return 0; } // Method to send data at the specified rate int -Sender::pace_data (ACE_ENV_SINGLE_ARG_DECL) +Sender::pace_data (void) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -175,7 +169,7 @@ Sender::pace_data (ACE_ENV_SINGLE_ARG_DECL) this->frame_rate_, inter_frame_time.msec ())); - ACE_TRY + try { // The time taken for sending a frame and preparing for the next frame ACE_High_Res_Timer elapsed_timer; @@ -237,9 +231,7 @@ Sender::pace_data (ACE_ENV_SINGLE_ARG_DECL) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + TAO_AV_CORE::instance ()->orb ()->run (wait_time); } } @@ -273,13 +265,11 @@ Sender::pace_data (ACE_ENV_SINGLE_ARG_DECL) } // end while } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Sender::pace_data Failed\n"); + ex._tao_print_exception ("Sender::pace_data Failed\n"); return -1; } - ACE_ENDTRY; return 0; } @@ -293,61 +283,45 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0 - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + 0); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + = orb->resolve_initial_references ("RootPOA"); //Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + = PortableServer::POA::_narrow (obj.in ()); PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + = root_poa->the_POAManager (); - mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + mgr->activate (); // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa.in ()); // Initialize the Client. int result = 0; result = SENDER::instance ()->init (argc, - argv - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + argv); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR, "client::init failed\n"), -1); - SENDER::instance ()->pace_data (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + SENDER::instance ()->pace_data (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"Sender Failed\n"); + ex._tao_print_exception ("Sender Failed\n"); return -1; } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); SENDER::close (); // Explicitly finalize the Unmanaged_Singleton. |