Changeset 287759 in webkit


Ignore:
Timestamp:
Jan 7, 2022, 10:43:28 AM (4 years ago)
Author:
youenn@apple.com
Message:

Expose rvfc processingDuration for the WebRTC code path
https://bugs.webkit.org/show_bug.cgi?id=234949

Reviewed by Eric Carlson.

Source/WebCore:

This processing duration is the time it took for an assembled frame to be decoded and sent to RealtimIncomingVideoSource.
This duration can be approximately retrieved from WebRTC encoded transform (time for the assembled frame, aka time just before decoding)
and the time at which it is exposed by requestVideoFrameCallback (aka time just after decoding).
The processing duration is rounded in milliseconds.

Covered by updated test.

  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

LayoutTests:

  • webrtc/peerConnection-rvfc.html:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r287757 r287759  
     12022-01-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Expose rvfc processingDuration for the WebRTC code path
     4        https://bugs.webkit.org/show_bug.cgi?id=234949
     5
     6        Reviewed by Eric Carlson.
     7
     8        * webrtc/peerConnection-rvfc.html:
     9
    1102022-01-07  Simon Fraser  <simon.fraser@apple.com>
    211
  • trunk/LayoutTests/webrtc/peerConnection-rvfc.html

    r284528 r287759  
    5454    assert_equals(metadata.width, 320);
    5555    assert_greater_than(metadata.presentedFrames, presentedFrames);
     56    assert_greater_than(metadata.processingDuration, 0);
    5657}, "Validate callbacks and metadata for peer connection tracks");
    5758        </script>
  • trunk/Source/WebCore/ChangeLog

    r287757 r287759  
     12022-01-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Expose rvfc processingDuration for the WebRTC code path
     4        https://bugs.webkit.org/show_bug.cgi?id=234949
     5
     6        Reviewed by Eric Carlson.
     7
     8        This processing duration is the time it took for an assembled frame to be decoded and sent to RealtimIncomingVideoSource.
     9        This duration can be approximately retrieved from WebRTC encoded transform (time for the assembled frame, aka time just before decoding)
     10        and the time at which it is exposed by requestVideoFrameCallback (aka time just after decoding).
     11        The processing duration is rounded in milliseconds.
     12
     13        Covered by updated test.
     14
     15        * platform/mediastream/RealtimeIncomingVideoSource.cpp:
     16
    1172022-01-07  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/platform/mediastream/RealtimeIncomingVideoSource.cpp

    r285984 r287759  
    116116    });
    117117    metadata.receiveTime = Seconds::fromMicroseconds(lastPacketTimestamp->receive_time().us());
     118    if (frame.processing_time())
     119        metadata.processingDuration = Seconds::fromMilliseconds(frame.processing_time()->Elapsed().ms()).value();
     120
    118121    return metadata;
    119122}
Note: See TracChangeset for help on using the changeset viewer.