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 authentification level.

patch #7389: RTMP getUptime always returns a large number

Submitted by:  Tim Retout <diocles>
Submitted on:  Sun 14 Nov 2010 12:25:32 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/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>
Project 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>
Project 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>
Project 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>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 17 Nov 2010 11:00:28 PM UTCdioclesAttached File-=>Added 0001-Fix-RTMP-relative-timestamp-calculations.patch, #22044
      Attached File-=>Added 0002-Replace-RTMP-getUptime-with-clocktimr-getTicks.patch, #22045
    Sun 14 Nov 2010 12:25:32 AM UTCdioclesAttached File-=>Added 0001-Use-C-std-clock-for-RTMP-uptime-on-non-Amiga-systems.patch, #22012

    Back to the top


    Powered by Savane 3.1-cleanup