[Live-devel] Open RTSP and video file splitting...

Matteo Lisi matteo.lisi at engicam.com
Thu Dec 16 06:37:05 PST 2010


Hi to All...

I'm working on linux I'm trying to modify the test program "openRTSP" in 
live555 packet, for taking the streaming from a IP cam and put in a 
different file every 60 seconds.

Like final result I want to have a collection of video file with lenght 
60 seconds named stdout_xxx.mp4.

In file "playCommon.cpp" I created a task that every 60 seconds do the 
following action:

void sessionTimerFileHandler(void* /*clientData*/) {
static int file_counter=1;
char outFileName[30];

fileTimerTask  = env->taskScheduler().scheduleDelayedTask(60000000, (TaskFunc*)sessionTimerFileHandler, (void*)NULL);

   Medium::close(qtOut);
   sprintf(outFileName, "stdout_%03d.mp4",file_counter);
   file_counter++ ;

*env<<  outFileName<<  "\n";

  qtOut = QuickTimeFileSink::createNew(*env, *session, outFileName,
					   fileSinkBufferSize,
					   movieWidth, movieHeight,
					   movieFPS,
					   packetLossCompensate,
					   syncStreams,
                                            generateHintTracks,
					   generateMP4Format);

       *env<<  "exit function\n";
}


But often the program exits in "Segmentation Fault", and I don't know why...

I launch my application why this command line:

./myapp -v -4 -w 640 -h 480 -f 25 rtsp://admin:12345@192.168.2.62

It's possible that the program crash during the closing and reopening of 
"qout" object, while the streaming still try to write in output file ?

Thanks

Matteo

-- 


------------------------------------------------------------------------
http://www.engicam.com <http://www.engicam.com>


*ENGICAM s.r.l.*
Progettazione di sistemi elettronici
50018 Scandicci - FIRENZE
Via dei Pratoni, 16 int. 13

Tel. +39 055 7311387
Fax. +39 055 720608
Web www.engicam.com <http://www.engicam.com>

C.F./P.I. 05389070482
Registro Imprese di FIRENZE 542918
Capitale sociale versato 20.000,00€
------------------------------------------------------------------------
NOTICE: This message and attachments are intended only for the use of 
their addresses and may contain confidential information belonging to 
Engicam. If you are not the intended recipient, you are hereby notified 
that any reading, dissemination, distribution, or copying of this 
message, or any attachment, is strictly prohibited. If you have received 
this message in error, please notify the original sender immediately and 
delete this message, along with any attachments.


More information about the live-devel mailing list