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;}
145 void requestMulticast() {this->request_multicast=
true;}
146 void requestTCP() {this->request_tcp=
true;}
147 void setRecvBufferSize(
unsigned i) {this->recv_buffer_size=i;}
148 void setReorderingTime(
unsigned i) {this->reordering_time=i;}
154 static void continueAfterSETUP(RTSPClient* rtspClient,
int resultCode,
char* resultString);
155 static void continueAfterPLAY(RTSPClient* rtspClient,
int resultCode,
char* resultString);
162 static void shutdownStream(RTSPClient* rtspClient,
int exitCode = 1);
187 char const* streamId = NULL);
192 char const* streamId);
196 static void afterGettingFrame(
void* clientData,
unsigned frameSize,
unsigned numTruncatedBytes,
struct timeval presentationTime,
unsigned durationInMicroseconds);
197 void afterGettingFrame(
unsigned frameSize,
unsigned numTruncatedBytes,
struct timeval presentationTime,
unsigned durationInMicroseconds);
209 u_int8_t* fReceiveBuffer;
211 MediaSubsession& fSubsession;
216 int subsession_index;
220 uint8_t* getReceiveBuffer() {
return fReceiveBuffer;}
Custom payload Frame.
Definition: frame.h:166
The mother class of all frame filters! FrameFilters are used to create "filter chains".
Definition: framefilter.h:44
Live555 handling of media frames.
Definition: live.h:173
SetupFrame setupframe
This frame is used to send subsession information.
Definition: live.h:214
static FrameSink * createNew(UsageEnvironment &env, StreamClientState &scs, FrameFilter &framefilter, bool &passthrough, char const *streamId=NULL)
Default constructor.
Definition: live.cpp:516
static void afterGettingFrame(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
Called after live555 event loop has composed a new frame.
Definition: live.cpp:603
void setReceiveBuffer(unsigned target_size)
Calculates receiving memory buffer size.
Definition: live.cpp:682
bool & passthrough
pass frame to framefilter or not
Definition: live.h:217
virtual Boolean continuePlaying()
Live555 redefined virtual function.
Definition: live.cpp:664
void sendParameterSets()
Extracts sps and pps info from the SDP string. Creates sps and pps frames and sends them to the filte...
Definition: live.cpp:698
unsigned checkBufferSize(unsigned target_size)
Calculates receiving memory buffer size.
Definition: live.cpp:673
long unsigned nbuf
Size of bytebuffer.
Definition: live.h:210
BasicFrame basicframe
Data is being copied into this frame.
Definition: live.h:215
virtual ~FrameSink()
Default virtual destructor.
Definition: live.cpp:596
Setup frame.
Definition: frame.h:277
Class to hold per-stream state that we maintain throughout each stream's lifetime.
Definition: live.h:78
MediaSession * session
Created by RTSPClient or SDPClient. Closed by StreamClientState::~StreamClientState.
Definition: live.h:86
virtual ~StreamClientState()
Default virtual destructor. Calls Medium::close on the MediaSession object.
Definition: live.cpp:486
void close()
Calls Medium::close on the MediaSubsession objects and their sinks.
Definition: live.cpp:473
MediaSubsession * subsession
Created by RTSPClient or SDPClient. Closed by StreamClientState::close.
Definition: live.h:87
int subsession_index
Managed by RTSPClient or SDPClient.
Definition: live.h:85
MediaSubsessionIterator * iter
Created by RTSPClient or SDPClient. Deleted by StreamClientState::~StreamClientState.
Definition: live.h:84
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
StreamClientState()
Default constructor.
Definition: live.cpp:469
Handles a live555 RTSP connection.
Definition: live.h:111
static void shutdownStream(RTSPClient *rtspClient, int exitCode=1)
Used to shut down and close a stream (including its "RTSPClient" object):
Definition: live.cpp:408
bool request_multicast
Request multicast during rtsp negotiation.
Definition: live.h:141
bool passthrough
control media sink passthrough to framefilter
Definition: live.h:132
FrameFilter & framefilter
Target frame filter where frames are being fed.
Definition: live.h:136
static void subsessionByeHandler(void *clientData)
Called when a RTCP "BYE" is received for a subsession.
Definition: live.cpp:387
static void continueAfterSETUP(RTSPClient *rtspClient, int resultCode, char *resultString)
Called after rtsp SETUP command gets a reply.
Definition: live.cpp:236
virtual ~ValkkaRTSPClient()
Default virtual destructor.
Definition: live.cpp:88
static void streamTimerHandler(void *clientData)
Called at the end of a stream's expected duration (if the stream has not already signaled its end usi...
Definition: live.cpp:398
static void subsessionAfterPlaying(void *clientData)
Called when a stream's subsession (e.g., audio or video substream) ends.
Definition: live.cpp:366
LiveStatus * livestatus
This points to a variable that is being used by LiveThread to inform about the stream state.
Definition: live.h:137
bool request_tcp
Request interleaved streaming over tcp.
Definition: live.h:142
static void continueAfterGET_PARAMETER(RTSPClient *rtspClient, int resultCode, char *resultString)
Used by pingGET_PARAMETER: a dummy callback to GET_PARAMETER.
Definition: live.cpp:139
static void setupNextSubsession(RTSPClient *rtspClient)
Used to iterate through each stream's 'subsessions', setting up each one.
Definition: live.cpp:154
static void continueAfterDESCRIBE(RTSPClient *rtspClient, int resultCode, char *resultString)
Called after rtsp DESCRIBE command gets a reply.
Definition: live.cpp:92
static void pingGetParameter(void *clientData)
Send a periodic GET_PARAMETER "ping" to the camera.
Definition: live.cpp:342
bool & termplease
Points to a variable that is being used by LiveThread to inform this client to exit asap if in LiveSt...
Definition: live.h:138
unsigned recv_buffer_size
Operating system ringbuffer size for incoming socket.
Definition: live.h:143
static ValkkaRTSPClient * createNew(UsageEnvironment &env, const std::string rtspURL, FrameFilter &framefilter, LiveStatus *livestatus, bool &termplease, int verbosityLevel=0, char const *applicationName=NULL, portNumBits tunnelOverHTTPPortNum=0)
Default constructor.
Definition: live.cpp:74
static void continueAfterPLAY(RTSPClient *rtspClient, int resultCode, char *resultString)
Called after rtsp PLAY command gets a reply.
Definition: live.cpp:293
unsigned reordering_time
Live555 packet reordering treshold time (microsecs)
Definition: live.h:144
Thread safe system of fifo and a stack.
Definition of FrameFilter and derived classes for various purposes.
LiveStatus
Status for the ValkkaRTSPClient.
Definition: live.h:62
@ closed
Client has been closed and Medium::close has been called on the MediaSession, etc....
@ alive
Client has succesfully started playing.
@ pending
Client's been requested to send the describe command. This might hang for several reasons: camera off...
UsageEnvironment & operator<<(UsageEnvironment &env, const RTSPClient &rtspClient)
A function that outputs a string that identifies each stream (for debugging output).
Definition: live.cpp:47
List of common header files.
Logging facility.
Definition: logging.h:64
@ none
undefined (initial value)
Definition: usbthread.h:143