Hi All, I am wanting to stream a single JPEG file over RTP for test purposes, I load the file and then create a video source to stream it to a client, in this case VLC. I am using the following code on each frame:
void TestJPEGVideoSource::doGetNextFrame() { fFrameSize = this->sosSize; if ( fFrameSize > fMaxSize ) { printf( "Truncating frame!!\n" ); fNumTruncatedBytes = fFrameSize - fMaxSize; fFrameSize = fMaxSize; } memcpy( fTo, this->buffer + this->sosIndex, fFrameSize ); if ( fPresentationTime.tv_sec == 0 && fPresentationTime.tv_usec == 0 ) { gettimeofday( &fPresentationTime, NULL ); } else { unsigned uSeconds = fPresentationTime.tv_usec + ( fTimePerFrame * 1000 ); fPresentationTime.tv_sec += uSeconds / 1000000; fPresentationTime.tv_usec = uSeconds % 1000000; } fDurationInMicroseconds = fTimePerFrame * 1000; nextTask() = envir().taskScheduler().scheduleDelayedTask( 0, (TaskFunc*)FramedSource::afterGetting, this ); } Where 'buffer' is the JPEG file, and sosIndex is the SOS marker index of the file. The problem is that when I come to decode the stream in VLC the image is far blockier than the original. Why is this? What am I doing wrong? Thanks in advance Andy
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel