3 //=============================================================================
7 * This application receives data from a AV sender and writes it to
10 * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
12 //=============================================================================
15 #include "orbsvcs/Naming/Naming_Client.h"
16 #include "orbsvcs/AV/AVStreams_i.h"
17 #include "orbsvcs/AV/Endpoint_Strategy.h"
18 #include "orbsvcs/AV/Policy.h"
21 * @class Receiver_Callback
23 * @brief Application defined callback object.
25 * AVStreams calls this class when data shows up from a sender.
27 class Receiver_Callback
: public TAO_AV_Callback
33 // Method that is called when there is data to be received from a
35 int receive_frame (ACE_Message_Block
*frame
,
36 TAO_AV_frame_info
*frame_info
,
37 const ACE_Addr
&peer_address
);
39 // Called when the sender is done sending data and wants to close
40 // down the connection.
41 int handle_destroy ();
44 /// Keeping a count of the incoming frames.
49 * @class Receiver_StreamEndPoint
51 * @brief Application defined stream endpoint object.
53 * AVStreams calls this class during connection setup.
55 class Receiver_StreamEndPoint
: public TAO_Server_StreamEndPoint
58 // Create a receiver application callback.
59 int get_callback (const char *flowname
,
60 TAO_AV_Callback
*&callback
);
63 /// Receiver application callback.
64 Receiver_Callback callback_
;
70 * @brief Receiver application class.
72 * This class receives data from a AV sender and writes it to
84 /// Initialize data components.
89 /// The Naming Service Client.
90 TAO_Naming_Client naming_client_
;
92 /// The endpoint reactive strategy.
93 TAO_AV_Endpoint_Reactive_Strategy_B
94 <Receiver_StreamEndPoint
,TAO_VDev
,AV_Null_MediaCtrl
> reactive_strategy_
;
96 /// Receiver MMDevice.
97 TAO_MMDevice
*mmdevice_
;