patchGnash - The GNU Flash player - Patches: patch #7389, RTMP getUptime always returns a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7389: RTMP getUptime always returns a large number

Submitter:  Tim Retout <diocles>
Submitted:  Sun 14 Nov 2010 12:25:32 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Thu 18 Nov 2010 07:33:20 AM UTC, comment #5: 

May I suggest you maintain a fork on some public repo ?
It'd help others taking a look at the work in progress.
Please make your own test for RTMP, a self contained test would be best. Could use red5 as a server and we already have an --enable-red5-testing configure switch setting a RED5_HOST variable for use by test generatods. See testsuite/misc-ming.all/red5test.as for an example test.

Sandro Santilli <strk>
Group Member
Wed 17 Nov 2010 11:05:41 PM UTC, comment #4: 

Ehhh, already spotted a bug: delta has the wrong type, it should be boost::uint32_t.  I'll work on this a bit more - if I can convince BBC iPlayer to work, it'll be the one and only test case.

Tim Retout <diocles>
Wed 17 Nov 2010 11:00:28 PM UTC, comment #3: 

Just to confuse the issue, I'm looking at changing how RTMP packet timestamps are calculated.  I've attached my work in progress, but I'm struggling to find an AVM1 RTMP site to test it with. :/

Once that's applied, the 0002 patch replaces getUptime() with getTicks().


(file #22044, file #22045)

Tim Retout <diocles>
Sun 14 Nov 2010 10:56:17 AM UTC, comment #2: 

Uhm, actually VM is in libcore, and so is VirtualClock.
Maybe we should move it to libbase instead as I think it's worth
being able to control what time the RTMP client sends to server.
For example, if you want to save an RTMP stream in full quality
you want to pretend no time elapsed since last frame fetch, or almost, so you get all frames, with no drops.

For now it seems fine to use the ClockTime.h in libbase, just for portability.

Sandro Santilli <strk>
Group Member
Sun 14 Nov 2010 10:54:15 AM UTC, comment #1: 

Please see libbase/ClockTime.h, use boost::uint64_t getTicks().
Even better, if it's a timer you're looking for, you should use the VM clock (VM::getClock()) so it's possible for hosting application to provide a virtual one.

Sandro Santilli <strk>
Group Member
Sun 14 Nov 2010 12:25:32 AM UTC, original submission:  

On Linux 2.6, times(2) uses "429 million seconds before system boot time" as the arbitrary point in the past from which the return value counts.  This leads to the extended RTMP timestamp field always being used.  (Although most packets should be using relative timestamps anyway?)

This patch changes it to always use std::clock() except on AmigaOS, and fixes the multiplier - I'm guessing AmigaOS doesn't have std::clock(), else I would have picked that there as well.

Tim Retout <diocles>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by diocles (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-17 diocles Attached File- Added 0001-Fix-RTMP-relative-timestamp-calculations.patch, #22044
        Attached File- Added 0002-Replace-RTMP-getUptime-with-clocktimr-getTicks.patch, #22045
    2010-11-14 diocles Attached File- Added 0001-Use-C-std-clock-for-RTMP-uptime-on-non-Amiga-systems.patch, #22012

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code