montage-tech/src/kware/demux_mp/live555/liveMedia/RTSPClient.cpp
// default value; you can reassign this in your application if you need to
default value; you can reassign this in your application if you need to
default value ; you can reassign this in your application if you need to
RTSPClient::RTSPClient(UsageEnvironment& env, char const* rtspURL,
		int verbosityLevel, char const* applicationName,
		portNumBits tunnelOverHTTPPortNum)
: Medium(env),
	fVerbosityLevel(verbosityLevel), fTunnelOverHTTPPortNum(tunnelOverHTTPPortNum),
	fUserAgentHeaderStr(NULL), fUserAgentHeaderStrLen(0), fInputSocketNum(-1), fOutputSocketNum(-1), fServerAddress(0), fCSeq(1),
	fBaseURL(NULL), fTCPStreamIdCount(0), fLastSessionId(NULL), fSessionTimeoutParameter(0),
	fSessionCookieCounter(0), fHTTPTunnelingConnectionIsPending(False) {
		setBaseURL(rtspURL);
		fResponseBuffer = new char[responseBufferSize+1];
		resetResponseBuffer();
		char const* const libName = "LIVE555 Streaming Media v";
		char const* const libVersionStr = LIVEMEDIA_LIBRARY_VERSION_STRING;
		char const* libPrefix; char const* libSuffix;
		if (applicationName == NULL || applicationName[0] == '\0') {
			applicationName = libPrefix = libSuffix = "";
		} else {
			libPrefix = " (";
			libSuffix = ")";
		}
		unsigned userAgentNameSize
			= strlen(applicationName) + strlen(libPrefix) + strlen(libName) + strlen(libVersionStr) + strlen(libSuffix) + 1;
		char* userAgentName = new char[userAgentNameSize];
		sprintf(userAgentName, "%s%s%s%s%s", applicationName, libPrefix, libName, libVersionStr, libSuffix);
		setUserAgentString(userAgentName);
		delete[] userAgentName;
	}
RTSPClient :: RTSPClient ( UsageEnvironment & env , char const * rtspURL , int verbosityLevel , char const * applicationName , portNumBits tunnelOverHTTPPortNum ) : Medium ( env ) , fVerbosityLevel ( verbosityLevel ) , fTunnelOverHTTPPortNum ( tunnelOverHTTPPortNum ) , fUserAgentHeaderStr ( NULL ) , fUserAgentHeaderStrLen ( 0 ) , fInputSocketNum ( -1 ) , fOutputSocketNum ( -1 ) , fServerAddress ( 0 ) , fCSeq ( 1 ) , fBaseURL ( NULL ) , fTCPStreamIdCount ( 0 ) , fLastSessionId ( NULL ) , fSessionTimeoutParameter ( 0 ) , fSessionCookieCounter ( 0 ) , fHTTPTunnelingConnectionIsPending ( False ) { setBaseURL ( rtspURL ) ; fResponseBuffer = new char [ responseBufferSize + 1 ] ; resetResponseBuffer ( ) ; char const * const libName = " " ; char const * const libVersionStr = LIVEMEDIA_LIBRARY_VERSION_STRING ; char const * libPrefix ; char const * libSuffix ; if ( applicationName == NULL || applicationName [ 0 ] == ' \0 ' ) { applicationName = libPrefix = libSuffix = " " ; } else { libPrefix = " " ; libSuffix = " " ; } unsigned userAgentNameSize = strlen ( applicationName ) + strlen ( libPrefix ) + strlen ( libName ) + strlen ( libVersionStr ) + strlen ( libSuffix ) + 1 ; char * userAgentName = new char [ userAgentNameSize ] ; sprintf ( userAgentName , " " , applicationName , libPrefix , libName , libVersionStr , libSuffix ) ; setUserAgentString ( userAgentName ) ; delete [ ] userAgentName ; }
default value; you can reassign this in your application if you need to
default value ; you can reassign this in your application if you need to
// Set the "User-Agent:" header to use in each request: