Changeset 219513 in webkit


Ignore:
Timestamp:
Jul 14, 2017, 11:35:00 AM (8 years ago)
Author:
eric.carlson@apple.com
Message:

[MediaStream] Limit the number of remote video samples queued
https://bugs.webkit.org/show_bug.cgi?id=174505
<rdar://problem/33223015>

Reviewed by Youenn Fablet.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeOldSamplesFromPendingQueue): Only
enqueue a fixed number of frames with invalid or negative decode times.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r219511 r219513  
     12017-07-14  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [MediaStream] Limit the number of remote video samples queued
     4        https://bugs.webkit.org/show_bug.cgi?id=174505
     5        <rdar://problem/33223015>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
     10        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeOldSamplesFromPendingQueue): Only
     11        enqueue a fixed number of frames with invalid or negative decode times.
     12
    1132017-07-14  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm

    r218615 r219513  
    258258void MediaPlayerPrivateMediaStreamAVFObjC::removeOldSamplesFromPendingQueue(PendingSampleQueue& queue)
    259259{
     260    if (queue.isEmpty())
     261        return;
     262
     263    auto decodeTime = queue.first()->decodeTime();
     264    if (!decodeTime.isValid() || decodeTime < MediaTime::zeroTime()) {
     265        while (queue.size() > 5)
     266            queue.removeFirst();
     267
     268        return;
     269    }
     270
    260271    MediaTime now = streamTime();
    261272    while (!queue.isEmpty()) {
     
    263274            break;
    264275        queue.removeFirst();
    265     };
     276    }
    266277}
    267278
Note: See TracChangeset for help on using the changeset viewer.