v4l2-ctl: Question on last_ts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Hans,


I do not understand the concept on last_ts.

cap dqbuf: 0 seq:      0 bytesused: 512000 ts: 137342.420951 delta last: 137342420.951 ms (ts-monotonic, ts-src-soe) cap dqbuf: 1 seq:      2 bytesused: 512000 ts: 137342.484954 dropped: 1 (ts-monotonic, ts-src-soe)

It seems to print the timestamp on the first frame, but then never again (how useful is it, to print the same timestamp twice?).


if (last_ts <= 0.0)
            fprintf(f, " delta last: %.03f ms", (ts - last_ts) * 1000.0);
        last_ts = ts;

Might it be, that commit 222e1760c7 "utils: fix implicit float conversion" got the float conversion wrong and it should rather be

        if (last_ts > 0.0)

To my understanding, this would yield a much-more useful output of printing the diff to the last frame _in every frame_


cap dqbuf: 0 seq:      0 bytesused: 512000 ts: 143215.916971 (ts-monotonic, ts-src-soe) cap dqbuf: 1 seq:      2 bytesused: 512000 ts: 143215.984995 delta last: 68.024 ms dropped: 1 (ts-monotonic, ts-src-soe) cap dqbuf: 2 seq:      3 bytesused: 512000 ts: 143216.016956 delta last: 31.961 ms (ts-monotonic, ts-src-soe) cap dqbuf: 3 seq:      4 bytesused: 512000 ts: 143216.052981 delta last: 36.025 ms (ts-monotonic, ts-src-soe) cap dqbuf: 0 seq:      5 bytesused: 512000 ts: 143216.088920 delta last: 35.939 ms fps: 29.08 (ts-monotonic, ts-src-soe)




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux