mirror of
https://github.com/mpromonet/v4l2rtspserver
synced 2024-11-11 19:10:40 +00:00
add parameter to configure RTCP timeout
This commit is contained in:
parent
3c83669169
commit
2435332d4f
@ -63,6 +63,7 @@ Usage
|
||||
-m url : multicast url (default multicast)
|
||||
-M addr : multicast group (default is a random address)
|
||||
-c : don't repeat config (default repeat config before IDR frame)
|
||||
-t secs : RTCP expiration timeout (default 65)
|
||||
V4L2 options :
|
||||
-r : V4L2 capture using read interface (default use memory mapped buffers)
|
||||
-s : V4L2 capture using live555 mainloop (default use a separated reading thread)
|
||||
|
@ -166,10 +166,11 @@ int main(int argc, char** argv)
|
||||
bool useThread = true;
|
||||
in_addr_t maddr = INADDR_NONE;
|
||||
bool repeatConfig = true;
|
||||
int timeout = 65;
|
||||
|
||||
// decode parameters
|
||||
int c = 0;
|
||||
while ((c = getopt (argc, argv, "v::Q:O:" "P:T:m:u:M:c" "rsF:W:H:" "h")) != -1)
|
||||
while ((c = getopt (argc, argv, "v::Q:O:" "P:T:m:u:M:ct:" "rsF:W:H:" "h")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@ -183,6 +184,7 @@ int main(int argc, char** argv)
|
||||
case 'm': multicast = true; murl = optarg; break;
|
||||
case 'M': multicast = true; maddr = inet_addr(optarg); break;
|
||||
case 'c': repeatConfig = false; break;
|
||||
case 't': timeout = atoi(optarg); break;
|
||||
// V4L2
|
||||
case 'r': useMmap = false; break;
|
||||
case 's': useThread = false; break;
|
||||
@ -205,6 +207,7 @@ int main(int argc, char** argv)
|
||||
std::cout << "\t -m url : multicast url (default " << murl << ")" << std::endl;
|
||||
std::cout << "\t -M addr : multicast group (default is a random address)" << std::endl;
|
||||
std::cout << "\t -c : don't repeat config (default repeat config before IDR frame)" << std::endl;
|
||||
std::cout << "\t -t secs : RTCP expiration timeout (default " << timeout << ")" << std::endl;
|
||||
std::cout << "\t V4L2 options :" << std::endl;
|
||||
std::cout << "\t -r : V4L2 capture using read interface (default use memory mapped buffers)" << std::endl;
|
||||
std::cout << "\t -s : V4L2 capture using live555 mainloop (default use a reader thread)" << std::endl;
|
||||
@ -228,7 +231,8 @@ int main(int argc, char** argv)
|
||||
UsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);
|
||||
|
||||
// create RTSP server
|
||||
RTSPServer* rtspServer = RTSPServer::createNew(*env, rtspPort);
|
||||
UserAuthenticationDatabase* authDB = NULL;
|
||||
RTSPServer* rtspServer = RTSPServer::createNew(*env, rtspPort, authDB, timeout);
|
||||
if (rtspServer == NULL)
|
||||
{
|
||||
LOG(ERROR) << "Failed to create RTSP server: " << env->getResultMsg();
|
||||
|
Loading…
Reference in New Issue
Block a user