5 #include "ace/Get_Opt.h"
6 #include "tao/PortableServer/PortableServer.h"
7 #include "tao/Strategies/advanced_resource.h"
8 #include "orbsvcs/Naming/Naming_Client.h"
9 #include "orbsvcs/AV/AVStreams_i.h"
10 #include "orbsvcs/AV/Endpoint_Strategy.h"
11 #include "orbsvcs/AV/Transport.h"
12 #include "orbsvcs/AV/sfp.h"
13 #include "orbsvcs/AV/MCast.h"
15 class FTP_Client_Callback
16 :public TAO_AV_Callback
19 FTP_Client_Callback ();
20 virtual int handle_end_stream ();
21 void set_protocol_object (TAO_AV_Protocol_Object
*protocol_object
) {this->protocol_object_
= protocol_object
;}
22 virtual int handle_timeout (void *arg
);
23 virtual void get_timeout (ACE_Time_Value
*&tv
,
28 TAO_AV_Protocol_Object
*protocol_object_
;
31 class FTP_Client_StreamEndPoint
32 :public TAO_Client_StreamEndPoint
35 FTP_Client_StreamEndPoint ();
37 virtual int get_callback (const char *flowname
,
38 TAO_AV_Callback
*&callback
);
40 virtual int set_protocol_object (const char *flowname
,
41 TAO_AV_Protocol_Object
*object
);
43 FTP_Client_Callback
*callback_
;
46 typedef TAO_AV_Endpoint_Reactive_Strategy_A
<FTP_Client_StreamEndPoint
,TAO_VDev
,AV_Null_MediaCtrl
> ENDPOINT_STRATEGY
;
49 class Endpoint_Reactive_Strategy
50 : public ENDPOINT_STRATEGY
53 Endpoint_Reactive_Strategy (CORBA::ORB_ptr orb
,
54 PortableServer::POA_ptr poa
,
56 // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A.
58 virtual int make_stream_endpoint (FTP_Client_StreamEndPoint
*& endpoint
);
59 // hook to make our streamendpoint taking a Client pointer
62 // pointer to command handler object
70 int init (int argc
, ACE_TCHAR
*argv
[]);
74 TAO_StreamCtrl
* streamctrl ();
76 int parse_args (int argc
, ACE_TCHAR
*argv
[]);
77 int bind_to_server (const char *name
);
78 Endpoint_Reactive_Strategy endpoint_strategy_
;
79 AVStreams::MMDevice_var server_mmdevice_
;
80 TAO_MMDevice client_mmdevice_
;
81 TAO_StreamCtrl streamctrl_
;
82 // Video stream controller
86 const char *filename_
;
89 TAO_Naming_Client my_naming_client_
;
96 typedef ACE_Unmanaged_Singleton
<Client
,ACE_Null_Mutex
> CLIENT
;
98 #endif /* TAO_AV_FTP_H */