1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/* -*- C++ -*- */
// $Id$
#ifndef AV_VIDEO_CONTROL_H
#define AV_VIDEO_CONTROL_H
#include "mpeg_shared/Video_ControlS.h"
#include "Video_Server.h"
class Video_Data_Handler;
class Video_Sig_Handler;
class Video_Control_State;
class Video_Control_i
: public virtual POA_Video_Control
{
public:
Video_Control_i ();
// constructor
int create_handlers (void);
// creates the data and signal handlers
virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara ¶,
Video_Control::INITvideoReply_out reply,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean stat_stream (CORBA::Char_out ch,
CORBA::Long_out size,
CORBA::Environment &_tao_environment);
virtual void close (CORBA::Environment &_tao_environment);
virtual CORBA::Boolean stat_sent (CORBA::Environment &_tao_environment);
virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶,
CORBA::Environment &_tao_environment
);
virtual CORBA::Boolean fast_backward (const Video_Control::FFpara ¶,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean step (const Video_Control::STEPpara ¶,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶,
CORBA::Long_out vts,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean position (const Video_Control::POSITIONpara ¶,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean speed (const Video_Control::SPEEDpara ¶,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean stop (CORBA::Long cmdsn,
CORBA::Environment &_tao_environment);
virtual CORBA::Boolean set_peer (char * &peer,
CORBA::Environment &_tao_environment);
// called by the client to inform us about it's ip and
// udp address.
void change_state (Video_Control_State *state);
// Used to change the state
Video_Control_State *get_state (void);
// Accessor for the state_
virtual ~Video_Control_i (void);
// Destructor
protected:
int register_handlers (void);
// called by set_peer to install the data_handler and
// the sig_handler
ACE_Reactor *reactor_;
// The Reactor
Video_Control_State *state_;
// State pattern - pointer to abstract State object
Video_Data_Handler *data_handler_;
// Data Socket Event Handler
Video_Sig_Handler *sig_handler_;
// signal handler for SIGALRM to periodically send the video frames
// to the client
};
// Video_Control_i instance singleton.
// %%
typedef ACE_Singleton <Video_Control_i, ACE_Null_Mutex> VIDEO_CONTROL_I;
#endif /* if !defined (AV_VIDEO_CONTROL_H) */
|