diff options
author | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-12 06:53:49 +0000 |
---|---|---|
committer | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-12 06:53:49 +0000 |
commit | 8fb66197a69404696b05c5da7be26fe6e52543ed (patch) | |
tree | 282d573b51006d08b4a1dffe87dc085a08e04097 /TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h | |
parent | 57d044e0e38bdb348f4510f2c482cc00c37dae01 (diff) | |
download | ATCD-8fb66197a69404696b05c5da7be26fe6e52543ed.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h')
-rw-r--r-- | TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h | 98 |
1 files changed, 69 insertions, 29 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h index 73a27e7e2e2..720015bb1f7 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h @@ -3,36 +3,35 @@ /* $Id$ */ -#if defined (MPEG_VIDEO_SERVER_H) +#if !defined (MPEG_VIDEO_SERVER_H) #define MPEG_VIDEO_SERVER_H +#include "ace/Reactor.h" #include "ace/Event_Handler.h" - -class Video_Server -{ -public: - Video_Server (int control_fd, - int data_fd, - int rttag, - int max_pkt_size); - int run (void); - -protected: - - int position (void); - int step_video (void); - int fast_forward (void); - int fast_backward (void); - int play (void); - int close (void); - int stat_stream (void); - int stat_sent (void); - -}; - +#include "Globals.h" +#include "../mpeg_shared/fileio.h" +#include "../mpeg_shared/com.h" +#include "../include/common.h" +#include "../mpeg_shared/routine.h" +#include "../mpeg_shared/sendpt.h" +#include "proto.h" + + +// Function Prototypes + +int FBread (char *buf, int size); +int INITvideo (void); +int PLAYliveVideo(PLAYpara * para); +void ComputeFirstSendPattern(float limit); +int FrameToGroup (int * frame); +int SendReferences(int group, int frame); +int send_to_network(int timeToUse); +void StartPlayLiveVideo (void); +void GetFeedBack (void); +int SendPicture (int *frame); class Video_Data_Handler - : public virtual Event_Handler + : public virtual ACE_Event_Handler { public: @@ -41,31 +40,72 @@ public: virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); // Called when input events occur (e.g., connection or data). + + virtual ACE_HANDLE get_handle (void) const; + // Get the handle used by this event handler + private: - int data_handle_; + ACE_HANDLE data_handle_; }; class Video_Control_Handler - : public virtual Event_Handler + : public virtual ACE_Event_Handler { public: + Video_Control_Handler (int video_control_fd); // Construct this handler with a data fd virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); // Called when input events occur (e.g., connection or data). + virtual ACE_HANDLE get_handle (void) const; + // Returns the handle used by the event_handler. + private: - int control_handle_; + + ACE_HANDLE control_handle_; }; +class Video_Server +{ +public: + Video_Server (int control_fd, + int data_fd, + int rttag, + int max_pkt_size); + int run (void); + static int SendPacket (int shtag,int gop,int frame,int timeToUse); + static int CmdRead(char *buf, int psize); + static void CmdWrite(char *buf, int size); + static void on_exit_routine(void); + static PLAYpara para; +protected: + int position (void); + int step_video (void); + int fast_forward (void); + int fast_backward (void); + int play (void); + // int close (void); + int stat_stream (void); + int stat_sent (void); + int fast_video_play (void); +private: + ACE_Reactor* reactor_; + // Reactor ,points to ACE_Reactor::instance () + Video_Data_Handler* data_handler_; + // Data Socket Event Handler + Video_Control_Handler* control_handler_; + // Control Socket Event Handler + +}; -#endif +#endif // MPEG_VIDEO_SERVER_H |