1 #ifndef live_HEADER_GUARD 2 #define live_HEADER_GUARD 44 UsageEnvironment&
operator<<(UsageEnvironment& env,
const RTSPClient& rtspClient);
45 UsageEnvironment&
operator<<(UsageEnvironment& env,
const MediaSubsession& subsession);
48 void usage(UsageEnvironment& env,
char const* progName);
84 MediaSubsessionIterator*
iter;
88 TaskToken streamTimerTask;
98 void setFrame() {this->frame_flag=
true;}
99 void clearFrame() {this->frame_flag=
false;}
100 bool gotFrame() {
return this->frame_flag;}
123 static ValkkaRTSPClient* createNew(UsageEnvironment& env,
const std::string rtspURL,
FrameFilter& framefilter,
LiveStatus* livestatus,
int verbosityLevel = 0,
char const* applicationName = NULL, portNumBits tunnelOverHTTPPortNum = 0);
126 ValkkaRTSPClient(UsageEnvironment& env,
const std::string rtspURL,
FrameFilter& framefilter,
LiveStatus* livestatus,
int verbosityLevel,
char const* applicationName, portNumBits tunnelOverHTTPPortNum);
140 void requestMulticast() {this->request_multicast=
true;}
141 void requestTCP() {this->request_tcp=
true;}
142 void setRecvBufferSize(
unsigned i) {this->recv_buffer_size=i;}
143 void setReorderingTime(
unsigned i) {this->reordering_time=i;}
147 static void continueAfterDESCRIBE(RTSPClient* rtspClient,
int resultCode,
char* resultString);
148 static void continueAfterGET_PARAMETER(RTSPClient* rtspClient,
int resultCode,
char* resultString);
149 static void continueAfterSETUP(RTSPClient* rtspClient,
int resultCode,
char* resultString);
150 static void continueAfterPLAY(RTSPClient* rtspClient,
int resultCode,
char* resultString);
153 static void subsessionAfterPlaying(
void* clientData);
154 static void subsessionByeHandler(
void* clientData);
155 static void streamTimerHandler(
void* clientData);
156 static void setupNextSubsession(RTSPClient* rtspClient);
157 static void shutdownStream(RTSPClient* rtspClient,
int exitCode = 1);
158 static void pingGetParameter(
void* clientData);
187 static void afterGettingFrame(
void* clientData,
unsigned frameSize,
unsigned numTruncatedBytes,
struct timeval presentationTime,
unsigned durationInMicroseconds);
188 void afterGettingFrame(
unsigned frameSize,
unsigned numTruncatedBytes,
struct timeval presentationTime,
unsigned durationInMicroseconds);
191 void setReceiveBuffer(
unsigned target_size);
192 unsigned checkBufferSize(
unsigned target_size);
193 void sendParameterSets();
196 virtual Boolean continuePlaying();
200 u_int8_t* fReceiveBuffer;
202 MediaSubsession& fSubsession;
207 int subsession_index;
210 uint8_t* getReceiveBuffer() {
return fReceiveBuffer;}
unsigned recv_buffer_size
Operating system ringbuffer size for incoming socket.
Definition: live.h:138
Custom payload Frame.
Definition: frame.h:160
Thread safe system of fifo and a stack.
TaskToken pingGetParameterTask
Ping the camera periodically with GET_PARAMETER query.
Definition: live.h:89
bool frame_flag
Set always when a frame is received.
Definition: live.h:92
int subsession_index
Managed by RTSPClient or SDPClient.
Definition: live.h:85
BasicFrame basicframe
Data is being copied into this frame.
Definition: live.h:206
MediaSession * session
Created by RTSPClient or SDPClient. Closed by StreamClientState::~StreamClientState.
Definition: live.h:86
Live555 handling of media frames.
Definition: live.h:168
FrameFilter & framefilter
Target frame filter where frames are being fed.
Definition: live.h:132
Class to hold per-stream state that we maintain throughout each stream's lifetime.
Definition: live.h:78
undefined (initial value)
Definition: usbthread.h:143
UsageEnvironment & operator<<(UsageEnvironment &env, const RTSPClient &rtspClient)
A function that outputs a string that identifies each stream (for debugging output).
Definition: live.cpp:47
SetupFrame setupframe
This frame is used to send subsession information.
Definition: live.h:205
Logging facility.
Definition: logging.h:63
LiveStatus
Status for the ValkkaRTSPClient.
Definition: live.h:62
MediaSubsession * subsession
Created by RTSPClient or SDPClient. Closed by StreamClientState::close.
Definition: live.h:87
LiveStatus * livestatus
This points to a variable that is being used by LiveThread to inform about the stream state...
Definition: live.h:133
bool request_multicast
Request multicast during rtsp negotiation.
Definition: live.h:136
Handles a live555 RTSP connection.
Definition: live.h:111
Definition of FrameFilter and derived classes for various purposes.
Client has succesfully started playing.
long unsigned nbuf
Size of bytebuffer.
Definition: live.h:201
unsigned reordering_time
Live555 packet reordering treshold time (microsecs)
Definition: live.h:139
Client has been closed and Medium::close has been called on the MediaSession, etc. This is done by shutdownStream (which sets livestatus to LiveStatus::closed). ValkkaRTSPClient has been annihilated!
Setup frame.
Definition: frame.h:270
Client's been requested to send the describe command. This might hang for several reasons: camera off...
MediaSubsessionIterator * iter
Created by RTSPClient or SDPClient. Deleted by StreamClientState::~StreamClientState.
Definition: live.h:84
List of common header files.
The mother class of all frame filters! FrameFilters are used to create "filter chains".
Definition: framefilter.h:46
bool request_tcp
Request interleaved streaming over tcp.
Definition: live.h:137