Hi!I've subclassed FramedFilter to transcode a MPEG2 Stream (from vobStreamer) to MPEG4.
My "live-chain" is: MPEG1or2VideoRTPSource -> Transcoder -> FileSink I use the following code: void Transcoder::doGetNextFrame() {fInputSource->getNextFrame(fOrg, 4096, afterGettingFrame, this, handleClosure, this);
}void Transcoder::afterGettingFrame(void* ClientData, unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationIn Microseconds) {
Transcoder* transcoder = (Transcoder*)clientData;transcoder->afterGettingFrame1(numBytesRead, numTruncatedBytes, presentationTime, durationIn Microseconds);
}void Transcoder::afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationIn Microseconds) {
size = numBytesRead; while(size > 0) {...ffmpeg stuff (reads from fOrg, shall decode a frame and on success sets got_frame = 1)...
} size -= dec_bytes; fOrg += dec_bytes; }All the above functions get porperly called when I start the program, but the problem is that the ffmpeg decoder does not get enough data when the MPEG1or2VideoRTPSource::getNextFrame() is just called one time. size == 0 in this case but the frame can't be completely decoded. numBytesRead is between 700 and 1500 Bytes every time (seems too small imho). How do I obtain more data from the Source until I can decode one frame? Shouldn't MPEG1or2VideoRTPSource deliver exactly ONE VIDEO FRAME?
What am I doing wrong? Julian
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel