Dear all,
We are very interested to retrieve raw data from IP cameras (MJPEG, MPEG4, H.264) via RTSP and using your Live 555. In order to do it we implemented the Demux class which inherit from the class FramedSource. Inside de Demux class we have the AfterReadingFrame which is call each time a frame is available. Definition of AfterReadingFrame. static void AfterReadingFrame(void* clientData, unsigned frameSize,unsigned /*numTruncatedBytes*/,struct timeval presentationTime,unsigned /*durationInMicroseconds*/); The function AfterReadingFrame is passed to the getNextFrame as seen below. subsession->readSource()->getNextFrame(m_FrameBuffer,MAX_RTP_FRAME_SIZE,RTSP .AfterReadingFrame,subsession,onSourceClosure,subsession); Inside of the AfterReadingFrame function we are accessing to the frame buffer, variable fTo and looking for the frame size from the variable fFrameSize MediaSubsession* bufferQueue = (MediaSubsession*)clientData; Demux *sFrame = (Demux*)bufferQueue->readSource(); unsigned char* pBuffer = sFrame->fTo; unsigned int FrameSize = sFrame-> fFrameSize; We think that the buffer obtained and size is correct. However, when trying to write directly the frame to a file (MJPEG video stream) or create a header jpg and to add the pBuffer we cannot see the saved frame. What contains the pBuffer? Raw data or the frame with its header. Is that the best way to retrieve raw data from a IP camera? Thank you in advance! Best Regards, Josep Aguilera.
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel