mirror of
https://github.com/mpromonet/v4l2rtspserver
synced 2024-11-03 23:15:56 +00:00
fix activation of MPEG-DASH & HLS
This commit is contained in:
parent
c29cef007e
commit
92534284da
12
src/main.cpp
12
src/main.cpp
@ -173,11 +173,11 @@ int main(int argc, char** argv)
|
||||
bool repeatConfig = true;
|
||||
int timeout = 65;
|
||||
bool muxTS = false;
|
||||
unsigned int hlsSegment = -1;
|
||||
unsigned int hlsSegment = 0;
|
||||
|
||||
// decode parameters
|
||||
int c = 0;
|
||||
while ((c = getopt (argc, argv, "v::Q:O:" "I:P:p:m:u:M:ct:TS:" "rwsf::F:W:H:" "h")) != -1)
|
||||
while ((c = getopt (argc, argv, "v::Q:O:" "I:P:p:m:u:M:ct:TS::" "rwsf::F:W:H:" "h")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@ -194,7 +194,7 @@ int main(int argc, char** argv)
|
||||
case 'c': repeatConfig = false; break;
|
||||
case 't': timeout = atoi(optarg); break;
|
||||
case 'T': muxTS = true; break;
|
||||
case 'S': hlsSegment = atoi(optarg); muxTS=true; break;
|
||||
case 'S': hlsSegment = optarg ? atoi(optarg) : 5; muxTS=true; break;
|
||||
// V4L2
|
||||
case 'r': ioTypeIn = V4l2DeviceFactory::IOTYPE_READ; break;
|
||||
case 'w': ioTypeOut = V4l2DeviceFactory::IOTYPE_READ; break;
|
||||
@ -224,7 +224,7 @@ int main(int argc, char** argv)
|
||||
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 -T : send Transport Stream instead of elementary Stream" << std::endl;
|
||||
std::cout << "\t -S secs : HTTP segment duration (enable HLS & MPEG-DASH)" << std::endl;
|
||||
std::cout << "\t -S[secs] : enable HLS & MPEG-DASH with segment duration of secs (default 5)" << 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 -w : V4L2 capture using write interface (default use memory mapped buffers)"<< std::endl;
|
||||
@ -356,8 +356,8 @@ int main(int argc, char** argv)
|
||||
addSession(rtspServer, baseUrl+url, HLSServerMediaSubsession::createNew(*env,replicator,rtpFormat, hlsSegment));
|
||||
struct in_addr ip;
|
||||
ip.s_addr = ourIPAddress(*env);
|
||||
LOG(NOTICE) << "HLS http://" << inet_ntoa(ip) << ":" << rtspPort << baseUrl+url << ".m3u8";
|
||||
LOG(NOTICE) << "MPEG-DASH http://" << inet_ntoa(ip) << ":" << rtspPort << baseUrl+url << ".mpd";
|
||||
LOG(NOTICE) << "HLS http://" << inet_ntoa(ip) << ":" << rtspPort << "/" << baseUrl+url << ".m3u8";
|
||||
LOG(NOTICE) << "MPEG-DASH http://" << inet_ntoa(ip) << ":" << rtspPort << "/" << baseUrl+url << ".mpd";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user