3 //=============================================================================
7 * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
9 //=============================================================================
11 #include "orbsvcs/Naming/Naming_Client.h"
12 #include "orbsvcs/AV/AVStreams_i.h"
13 #include "orbsvcs/AV/Endpoint_Strategy.h"
14 #include "orbsvcs/AV/Protocol_Factory.h"
16 // = Defines application specific sender stream endpoint.
17 class Sender_StreamEndPoint
: public TAO_Client_StreamEndPoint
20 int get_callback (const char *flowname
,
21 TAO_AV_Callback
*&callback
);
22 /// Create the application callback and return its handle to
23 /// AVStreams for further application callbacks.
25 int set_protocol_object (const char *flowname
,
26 TAO_AV_Protocol_Object
*object
);
27 /// Set protocol object corresponding to the transport protocol
30 CORBA::Boolean
modify_QoS (AVStreams::streamQoS
&new_qos
,
31 const AVStreams::flowSpec
&flow_spec
);
33 /// The over-ridden modify_qos method to change the qos of the
34 /// flows specified in the flow spec to that in the new_qos.
37 TAO_AV_Callback callback_
;
38 /// Application callback.
41 typedef TAO_AV_Endpoint_Reactive_Strategy_A
42 <Sender_StreamEndPoint
,
45 SENDER_ENDPOINT_STRATEGY
;
50 * @brief Class is responsible for streaming (and pacing) data to a
61 /// Method to initialize the various data components.
64 /// Method to pace and send data from a file.
66 void protocol_object (TAO_AV_Protocol_Object
*protocol_object
);
67 /// Set the protocol object corresponding to the transport protocol chosen.
70 int parse_args (int argc
, ACE_TCHAR
*argv
[]);
71 /// Method to parse the command line arguments.
73 int bind_to_receiver ();
74 /// Method that binds the sender to the receiver.
76 SENDER_ENDPOINT_STRATEGY endpoint_strategy_
;
77 /// The endpoint strategy used by the sender.
79 AVStreams::MMDevice_var receiver_mmdevice_
;
80 /// The receiver MMDevice that the sender connects to.
82 TAO_MMDevice
*sender_mmdevice_
;
83 /// The sender MMDevice.
85 TAO_StreamCtrl
*streamctrl_
;
89 /// Number of frames sent.
91 ACE_CString filename_
;
92 /// File from which data is read.
94 TAO_Naming_Client naming_client_
;
95 /// The Naming Service client.
98 /// File handle of the file read from.
100 ACE_CString protocol_
;
101 /// Selected protocol - default is UDP
104 /// Rate at which the data will be sent.
106 ACE_Message_Block mb_
;
107 /// Message block into which data is read from a file and then sent.
109 TAO_AV_Protocol_Object
*protocol_object_
;
110 /// Protocol object corresponding to the transport protocol selected.