summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp')
-rw-r--r--TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp
index fbdb0919dbb..52d9ea10836 100644
--- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp
@@ -55,15 +55,15 @@ Sender::shutdown (void)
ACE_DECLARE_NEW_CORBA_ENV;
// File reading is complete, destroy the stream.
AVStreams::flowSpec stop_spec;
- this->streamctrl_->destroy (stop_spec,
- ACE_TRY_ENV);
+ this->streamctrl_->destroy (stop_spec
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
-
+
// Shut the orb down.
- TAO_AV_CORE::instance ()->orb ()->shutdown (0,
- ACE_TRY_ENV);
+ TAO_AV_CORE::instance ()->orb ()->shutdown (0
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
-
+
}
int
@@ -100,7 +100,7 @@ Sender::parse_args (int argc,
// Method to get the object reference of the receiver
int
-Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV)
+Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL)
{
CosNaming::Name name (1);
name.length (1);
@@ -109,13 +109,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV)
// Resolve the receiver object reference from the Naming Service
CORBA::Object_var receiver_mmdevice_obj =
- this->naming_client_->resolve (name,
- ACE_TRY_ENV);
+ this->naming_client_->resolve (name
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
this->receiver_mmdevice_ =
- AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (),
- ACE_TRY_ENV);
+ AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (CORBA::is_nil (this->receiver_mmdevice_.in ()))
@@ -128,8 +128,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV)
int
Sender::init (int argc,
- char **argv,
- CORBA::Environment &ACE_TRY_ENV)
+ char **argv
+ TAO_ENV_ARG_DECL)
{
// Initialize the endpoint strategy with the orb and poa.
int result =
@@ -166,9 +166,9 @@ Sender::init (int argc,
"File opened successfully\n"));
// Resolve the object reference of the receiver from the Naming Service.
- result = this->bind_to_receiver (ACE_TRY_ENV);
+ result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
-
+
if (result != 0)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) Error binding to the naming service\n"),
@@ -210,7 +210,7 @@ Sender::init (int argc,
this->sender_mmdevice_;
AVStreams::MMDevice_var mmdevice =
- this->sender_mmdevice_->_this (ACE_TRY_ENV);
+ this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
ACE_NEW_RETURN (this->streamctrl_,
@@ -225,8 +225,8 @@ Sender::init (int argc,
this->streamctrl_->bind_devs (mmdevice.in (),
this->receiver_mmdevice_.in (),
the_qos.inout (),
- flow_spec,
- ACE_TRY_ENV);
+ flow_spec
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (bind_result == 0)
@@ -239,7 +239,7 @@ Sender::init (int argc,
// Method to send data at the specified rate
int
-Sender::pace_data (CORBA::Environment &ACE_TRY_ENV)
+Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL)
{
// The time that should lapse between two consecutive frames sent.
ACE_Time_Value inter_frame_time;
@@ -316,8 +316,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV)
// Run the orb for the wait time so the sender can
// continue other orb requests.
- TAO_AV_CORE::instance ()->orb ()->run (wait_time,
- ACE_TRY_ENV);
+ TAO_AV_CORE::instance ()->orb ()->run (wait_time
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
}
@@ -325,31 +325,31 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV)
// Start timer before sending the frame.
elapsed_timer.start ();
- ProtocolObject_SetItor end = this->protocol_object_.end ();
- for (ProtocolObject_SetItor begin = this->protocol_object_.begin ();
- begin != end; ++begin)
- {
- // Send frame.
- int result =
- (*begin)->send_frame (&this->mb_);
-
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "send failed:%p",
- "Sender::pace_data send\n"),
- -1);
- }
-
-
+ ProtocolObject_SetItor end = this->protocol_object_.end ();
+ for (ProtocolObject_SetItor begin = this->protocol_object_.begin ();
+ begin != end; ++begin)
+ {
+ // Send frame.
+ int result =
+ (*begin)->send_frame (&this->mb_);
+
+ if (result < 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "send failed:%p",
+ "Sender::pace_data send\n"),
+ -1);
+ }
+
+
ACE_DEBUG ((LM_DEBUG,
"Sender::pace_data frame %d was sent succesfully\n",
++this->frame_count_));
-
+
// Reset the message block.
this->mb_.reset ();
-
+
} // end while
-
+
this->shutdown ();
}
ACE_CATCHANY
@@ -372,38 +372,38 @@ main (int argc,
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0,
- ACE_TRY_ENV);
+ 0
+ TAO_ENV_ARG_PARAMETER);
CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA",
- ACE_TRY_ENV);
+ = orb->resolve_initial_references ("RootPOA"
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get the POA_var object from Object_var
PortableServer::POA_var root_poa
- = PortableServer::POA::_narrow (obj.in (),
- ACE_TRY_ENV);
+ = PortableServer::POA::_narrow (obj.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::POAManager_var mgr
- = root_poa->the_POAManager (ACE_TRY_ENV);
+ = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- mgr->activate (ACE_TRY_ENV);
+ mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize the AV Stream components.
TAO_AV_CORE::instance ()->init (orb.in (),
- root_poa.in (),
- ACE_TRY_ENV);
+ root_poa.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize the Sender.
int result = 0;
result = SENDER::instance ()->init (argc,
- argv,
- ACE_TRY_ENV);
+ argv
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (result < 0)
@@ -412,7 +412,7 @@ main (int argc,
-1);
// Start sending data.
- result = SENDER::instance ()->pace_data (ACE_TRY_ENV);
+ result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY