#include "RTSPClient.hh"#include "RTSPCommon.hh"#include "Base64.hh"#include "Locale.hh"#include <GroupsockHelper.hh>#include "our_md5.h"Include dependency graph for RTSPClient.cpp:

Go to the source code of this file.
Functions | |
| static char * | getLine (char *startOfLine) |
| static Boolean | isAbsoluteURL (char const *url) |
| static char * | createScaleString (float scale, float currentScale) |
| static char * | createRangeString (float start, float end) |
Variables | |
| static char const * | NoSessionErr = "No RTSP session is currently in progress\n" |
| static char* createRangeString | ( | float | start, | |
| float | end | |||
| ) | [static] |
Definition at line 1029 of file RTSPClient.cpp.
References strDup().
Referenced by RTSPClient::playMediaSession(), and RTSPClient::playMediaSubsession().
01029 { 01030 char buf[100]; 01031 if (start < 0) { 01032 // We're resuming from a PAUSE; there's no "Range:" header at all 01033 buf[0] = '\0'; 01034 } else if (end < 0) { 01035 // There's no end time: 01036 Locale("C", LC_NUMERIC); 01037 sprintf(buf, "Range: npt=%.3f-\r\n", start); 01038 } else { 01039 // There's both a start and an end time; include them both in the "Range:" hdr 01040 Locale("C", LC_NUMERIC); 01041 sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end); 01042 } 01043 01044 return strDup(buf); 01045 }
| static char* createScaleString | ( | float | scale, | |
| float | currentScale | |||
| ) | [static] |
Definition at line 1016 of file RTSPClient.cpp.
References strDup().
Referenced by RTSPClient::playMediaSession(), and RTSPClient::playMediaSubsession().
01016 { 01017 char buf[100]; 01018 if (scale == 1.0f && currentScale == 1.0f) { 01019 // This is the default value; we don't need a "Scale:" header: 01020 buf[0] = '\0'; 01021 } else { 01022 Locale("C", LC_NUMERIC); 01023 sprintf(buf, "Scale: %f\r\n", scale); 01024 } 01025 01026 return strDup(buf); 01027 }
| static char* getLine | ( | char * | startOfLine | ) | [static] |
Definition at line 146 of file RTSPClient.cpp.
References NULL.
Referenced by RTSPClient::checkForAuthenticationFailure(), RTSPClient::describeURL(), RTSPClient::getMediaSessionParameter(), RTSPClient::getResponse(), SIPClient::getResponseCode(), RTSPClient::playMediaSession(), RTSPClient::playMediaSubsession(), RTSPClient::sendOptionsCmd(), and RTSPClient::setupMediaSubsession().
00146 { 00147 // returns the start of the next line, or NULL if none 00148 for (char* ptr = startOfLine; *ptr != '\0'; ++ptr) { 00149 // Check for the end of line: \r\n (but also accept \r or \n by itself): 00150 if (*ptr == '\r' || *ptr == '\n') { 00151 // We found the end of the line 00152 if (*ptr == '\r') { 00153 *ptr++ = '\0'; 00154 if (*ptr == '\n') ++ptr; 00155 } else { 00156 *ptr++ = '\0'; 00157 } 00158 return ptr; 00159 } 00160 } 00161 00162 return NULL; 00163 }
| static Boolean isAbsoluteURL | ( | char const * | url | ) | [static] |
Definition at line 601 of file RTSPClient.cpp.
Referenced by RTSPClient::constructSubsessionURL().
00601 { 00602 // Assumption: "url" is absolute if it contains a ':', before any 00603 // occurrence of '/' 00604 while (*url != '\0' && *url != '/') { 00605 if (*url == ':') return True; 00606 ++url; 00607 } 00608 00609 return False; 00610 }
char const* NoSessionErr = "No RTSP session is currently in progress\n" [static] |
Definition at line 1047 of file RTSPClient.cpp.
Referenced by RTSPClient::getMediaSessionParameter(), RTSPClient::pauseMediaSession(), RTSPClient::pauseMediaSubsession(), RTSPClient::playMediaSession(), RTSPClient::playMediaSubsession(), RTSPClient::recordMediaSubsession(), RTSPClient::setMediaSessionParameter(), RTSPClient::teardownMediaSession(), and RTSPClient::teardownMediaSubsession().
1.5.2