> > Am 27.07.2010 14:24, schrieb august: > >> Also note, that what you probably want to do is already implemented in > >> bgav_seek() and bgav_seek_scaled(), so maybe it's easier to use these > >> functions instead. > > > > oh. ok. > > > > Does that mean that bgav_seek uses sample accurate mode internally if it > > is set? > > Yes, but note that there *might* be an off-by-one rounding error due to the > internal conversion from gavl_time_t to the sample number. If you want to seek > to an audio sample with 100% accuracy, use: > > bgav_seek_scaled(bgav, sample, samplerate); > > BTW I'm currently testing the seek methods for *real* sample accuracy: > > 1. Decode N samples and then read 10240 samples into frame1 > 2. Reopen the file, seek to the Nth sample and read 10240 samples into frame2 > 3. Test if frame1 and frame2 are bitwise identical > > I fixed tons of bugs with this tool (tests/seektest.c) already and I'm not > completely done yet :)
Very cool. Squashing bugs is very satisfying! but, I have to say, time in gavl and bgav is somewhat confusing. There is int64_t time and gavl_time_t which is also a int64_t. Also, what are "stream ticks"? Is there somewhere where this is explained? Also, for audio timestamp, what is a "samplerate tic"? How do I go from stream ticks to number of frames? For example, I call bgav_audio_duration and get the number of samples. But, if I call bgav_video_duration, I get stream ticks. How do I go from that return value to number of frames? I'm trying to keep audio and video in sync while looping, and am looking to keep track of the last video frame. any suggestions would be helpful. What is your general model for keeping AV sync? Do you use the audio and video timestamp? -august. ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ Gmerlin-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gmerlin-general
