[Live-devel] extend cont.
Joseph Reinhold
joseph.reinhold at rccny.com
Mon Aug 12 09:56:11 PDT 2013
Reference ----
------------------------------
Message: 4
Date: Sat, 10 Aug 2013 20:06:05 +0000
From: Joseph Reinhold <joseph.reinhold at rccny.com<mailto:joseph.reinhold at rccny.com>>
To: "live-devel at lists.live555.com<mailto:live-devel at lists.live555.com>" <live-devel at ns.live555.com<mailto:live-devel at ns.live555.com>>
Subject: [Live-devel] extending
Message-ID: <CF3D9FEEC972D6479EE01A288FBD67FFEC9685 at EX1.radiant.corp<mailto:CF3D9FEEC972D6479EE01A288FBD67FFEC9685 at EX1.radiant.corp>>
Content-Type: text/plain; charset="us-ascii"
I having great deal of problems extending the handleCmd_GET_PARAMETER method Please help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130810/e372259d/attachment-0001.html>
------------------------------
Message: 5
Date: Sat, 10 Aug 2013 13:46:19 -0700
From: Ross Finlayson <finlayson at live555.com<mailto:finlayson at live555.com>>
To: LIVE555 Streaming Media - development & use
<live-devel at ns.live555.com<mailto:live-devel at ns.live555.com>>
Subject: Re: [Live-devel] extending
Message-ID: <AA97C99B-1268-4698-9A9D-E559EE234183 at live555.com<mailto:AA97C99B-1268-4698-9A9D-E559EE234183 at live555.com>>
Content-Type: text/plain; charset="us-ascii"
> I having great deal of problems extending the handleCmd_GET_PARAMETER
> method
That's rather vague (to put it mildly :-) Can you explain specifically what trouble you're having?
Occurring to 555 notes
void RTSPServer::RTSPClientSession
::handleCmd_GET_PARAMETER(RTSPServer::RTSPClientConnection* ourClientConnection,
ServerMediaSubsession* /*subsession*/, char const* /*fullRequestStr*/) {
// By default, we implement "GET_PARAMETER" just as a 'keep alive', and send back a dummy response.
// (If you want to handle "GET_PARAMETER" properly, you can do so by defining a subclass of "RTSPServer"
// and "RTSPServer::RTSPClientSession", and then reimplement this virtual function in your subclass.)
ourClientConnection->setRTSPResponse("200 OK", fOurSessionId, LIVEMEDIA_LIBRARY_VERSION_STRING);
}
I should be able to extend handleCmd_GET_PARAMETER
I getting all sort of issues I can not expand
These a copies of the files that I am using in an attempt to extend this method
/***************** ***************************
** RADIANT extension for RTSPServer
*********************************************/
#ifndef _RTSP_SERVEREXTENSIONS_HH
#define _RTSP_SERVEREXTENSIONS_HH
class RTSPServerExtensions :protected RTSPServer
{
public:
RTSPServerExtensions(UsageEnvironment& env,
int ourSocket,
Port ourPort,
UserAuthenticationDatabase* authDatabase,
unsigned int y) {}
~RTSPServerExtensions(){}
public:
class RTSPClientConnectionExtension: protected RTSPServer:: RTSPClientConnection
{ public:
~RTSPClientConnectionExtension(){}
RTSPClientConnectionExtension(RTSPServer& ourServer, int clientSocket, struct sockaddr_in clientAddr){}
public:
void handleCmd_GET_PARAMETER(RTSPClientConnection* ourClientConnection,
ServerMediaSubsession* subsession, char const* fullRequestStr);
void handleCmd_SET_PARAMETER(RTSPClientConnection* ourClientConnection,
ServerMediaSubsession* subsession, char const* fullRequestStr);
void handleCmd_GET_PARAMETER(char const* fullRequestStr); // when operating on the entire server
void handleCmd_SET_PARAMETER(char const* fullRequestStr); // when operating on the entire server
private:
};
};
#endif
#include "RTSPServer.hh"
#include "RTSPCommon.hh"
#include "RTSPServerExtensions.hh"
#include "ProxyServerMediaSession.hh"
#include "Base64.hh"
#include <GroupsockHelper.hh>
#include "RTSPServerExtensions.hh"
void RTSPServerExtensions::RTSPClientConnectionExtension::handleCmd_GET_PARAMETER(RTSPServer::RTSPClientConnection* ourClientConnection,
ServerMediaSubsession* /*subsession*/, char const* fullRequestStr)
{
if(0 == fOurServer.fClientSessions->Lookup(fOurServer.sessionIdStr))
{
}
else
{
// ptr->setRTSPResponse("200 OK",fOurSessionId, LIVEMEDIA_LIBRARY_VERSION_STRING);
ourClientConnection->setRTSPResponse
("200 OK",fOurSessionId,
LIVEMEDIA_LIBRARY_VERSION_STRING);
}
// By default, we implement "GET_PARAMETER" just as a 'keep alive', and send back a dummy response.
// (If you want to handle "GET_PARAMETER" properly, you can do so by defining a subclass of "RTSPServer"
// and "RTSPServer::RTSPClientSession", and then reimplement this virtual function in your subclass.)
// ourClientConnection->setRTSPResponse("200 OK", RTSPClientSession::fOurSessionId, LIVEMEDIA_LIBRARY_VERSION_STRING);
}
void RTSPServerExtensions::RTSPClientConnectionExtension
::handleCmd_SET_PARAMETER(RTSPServer::RTSPClientConnection* ourClientConnection,
ServerMediaSubsession* /*subsession*/, char const* /*fullRequestStr*/) {
// By default, we implement "SET_PARAMETER" just as a 'keep alive', and send back an empty response.
// (If you want to handle "SET_PARAMETER" properly, you can do so by defining a subclass of "RTSPServer"
// and "RTSPServer::RTSPClientSession", and then reimplement this virtual function in your subclass.)
// ourClientConnection->setRTSPResponse("200 OK", fOurSessionId);
}
void RTSPServerExtensions::RTSPClientConnectionExtension
::handleCmd_GET_PARAMETER(char const* /*fullRequestStr*/) {
// By default, we implement "GET_PARAMETER" (on the entire server) just as a 'no op', and send back a dummy response.
// (If you want to handle this type of "GET_PARAMETER" differently, you can do so by defining a subclass of "RTSPServer"
// and "RTSPServer::RTSPClientConnection", and then reimplement this virtual function in your subclass.)
// setRTSPResponse("200 OK", LIVEMEDIA_LIBRARY_VERSION_STRING);
}
void RTSPServerExtensions:: RTSPClientConnectionExtension
::handleCmd_SET_PARAMETER(char const* /*fullRequestStr*/) {
// By default, we implement "SET_PARAMETER" (on the entire server) just as a 'no op', and send back an empty response.
// (If you want to handle this type of "SET_PARAMETER" differently, you can do so by defining a subclass of "RTSPServer"
// and "RTSPServer::RTSPClientConnection", and then reimplement this virtual function in your subclass.)
// setRTSPResponse("200 OK");
}
/*
RTSPServerExtensions::RTSPServerExtensions(UsageEnvironment& env,
int ourSocket,
Port ourPort,
UserAuthenticationDatabase* authDatabase,
unsigned int y)
{}
*/
// these are the errors I am getting
make all
cd liveMedia; make
make[1]: Entering directory `/home/radiant/workspace/RccMediaServer/liveMedia'
arm-none-linux-gnueabi-g++ -c -Iinclude -I../UsageEnvironment/include -I../groupsock/include -I. -g -O0 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Wall -DBSD=1 RTSPServerExtensions.cpp
In file included from RTSPServerExtensions.cpp:5:
include/RTSPServerExtensions.hh: In constructor 'RTSPServerExtensions::RTSPServerExtensions(UsageEnvironment&, int, Port, UserAuthenticationDatabase*, unsigned int)':
make[1]: Leaving directory `/home/radiant/workspace/RccMediaServer/liveMedia'
include/RTSPServerExtensions.hh:16: error: no matching function for call to 'RTSPServer::RTSPServer()'
include/RTSPServer.hh:146: note: candidates are: RTSPServer::RTSPServer(UsageEnvironment&, int, Port, UserAuthenticationDatabase*, unsigned int)
include/RTSPServer.hh:64: note: RTSPServer::RTSPServer(const RTSPServer&)
include/RTSPServerExtensions.hh: In constructor 'RTSPServerExtensions::RTSPClientConnectionExtension::RTSPClientConnectionExtension(RTSPServer&, int, sockaddr_in)':
include/RTSPServerExtensions.hh:28: error: no matching function for call to 'RTSPServer::RTSPClientConnection::RTSPClientConnection()'
include/RTSPServer.hh:175: note: candidates are: RTSPServer::RTSPClientConnection::RTSPClientConnection(RTSPServer&, int, sockaddr_in)
include/RTSPServer.hh:173: note: RTSPServer::RTSPClientConnection::RTSPClientConnection(const RTSPServer::RTSPClientConnection&)
include/RTSPServer.hh: In member function 'void RTSPServerExtensions::RTSPClientConnectionExtension::handleCmd_GET_PARAMETER(RTSPServer::RTSPClientConnection*, ServerMediaSubsession*, const char*)':
include/RTSPServer.hh:141: error: 'char* RTSPServer::sessionIdStr' is protected
RTSPServerExtensions.cpp:17: error: within this context
RTSPServerExtensions.cpp:25: error: 'fOurSessionId' was not declared in this scope
make[1]: *** [RTSPServerExtensions.o] Error 1
make: *** [liveMedia/libliveMedia.a] Error 2
For starters my extension of the 'RTSPServer::RTSPServer
is not compling due to the fact that the signature of my constructor does not match 'RTSPServer::RTSPServer
'RTSPServerExtensions::RTSPServerExtensions(UsageEnvironment&, int, Port, UserAuthenticationDatabase*, unsigned int)':
RTSPServer::RTSPServer(UsageEnvironment&, int, Port, UserAuthenticationDatabase*, unsigned int)
But yet appears to.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130812/f59440e8/attachment-0001.html>
More information about the live-devel
mailing list