[Live-devel] Question regarding seeking and using epoch time.

Morgan Tørvolt morgan.torvolt at gmail.com
Wed Oct 22 13:58:20 PDT 2008

> I'm not particularly interested in this, but if you send us a patch, I'll
> probably add it.

After actually writing the patch, I am less confident that you will actually.

I made the change. I believe I managed to change it everywhere. At
least the tests I have done works well.

I realize that this changes some functions at some places. There are a
couple of functions that uses reference transfer of the float/double.
Where this happens you cannot pass a float to the function as you
could before. This means recompiling and changing from float to double
some places. Since double is used many other places anyway, my
preference would be to change them all to double.

Some people might get some unexpected results, in that the
seekStreamSource(float) function that used to work, will not work
anymore. No compile errors. they will need to change to double for it
to work again.

I do not believe that this will make the code go slower since it seems
to me that the changes affects functions that are not called very

In total, it gives something, and whatever it changes is for the
better for the library. It might give some people headaches though.

If it was up to me, I would replace all floats with doubles. Problems
like mine would never happen again. This is up to you though Ross.
There might be good reasons for not doing this that I am not entirely
aware of (like code efficiency on embedded systems) of course, but the
PCR calculations it TransportStreamFramer is double, is it not?

> (In the meantime, you could just use an offset from some fixed, later
> 'epoch' time - e.g., 1/1/2008.)

Not a very good permanent solution I belive. Floats have only 7.2
digits of precision (some argues 7.5), which starts giving errors
after less than half a year. It would just go downhill from there, and
get worse and worse. This might be a good argument for actually
impelementing my patch, as others that has a half year video
surveillance backlog and want to access it as one single file (playing
smaller files back to back for instance) will need it.

Best regards
Morgan Tørvolt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 002.patch
Type: application/octet-stream
Size: 24481 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081022/43c7f6d6/attachment-0001.obj>

More information about the live-devel mailing list