From: Michael R. <mr...@us...> - 2003-10-28 17:47:47
|
correcting myself, Hi again, > So I should not do this: > > frame->pts = pts; > frame->vpts = this->stream->metronom->audio_vpts; > > but rather this: > > if (pts) { > frame->pts = pts; > frame->vpts = this->stream->metronom->audio_vpts; > pts = 0; > } else > frame->pts = frame->vpts = 0; A stupid idea, of course. How about: if (pts) { vpts = this->stream->metronom->audio_vpts; frame->pts = pts; frame->vpts = vpts; pts = 0; } else { vpts += frame->duration; frame->pts = 0; frame->vpts = vpts; } At least this could be a temporary solution for now. For possibly after 1.0 (but maybe even before, depending on the engine impact), I think there is a more clean approach: Visualization post plugins could have a private metronom instance, which would be fed with the video frames (which have been assigned the pts values from the audio buffers) to calculate their vpts. All the nice metronom features like drift calculation would immediately be there. This would, however, require metronom modification, so that it does not require access to the stream any more. But since metronom doesn't use the stream for important things, I think this is easy to do. Michael -- panic("sun_82072_fd_inb: How did I get here?"); 2.2.16 /usr/src/linux/include/asm-sparc/floppy.h |