• Thomas Guilbert's avatar
    Add VideoFrame.clone() · f19b1b09
    Thomas Guilbert authored
    This CL adds the ability to clone a blink::VideoFrame. Doing so creates
    a new VideoFrame, with a new reference to the same underlying
    media::VideoFrame. This allows users that want to keep a frame alive
    to pass a clone to workers or objects which might destroy the frame.
    
    An example use case might be a user sending cloned reference to
    different workers, which can then call destroy() on the frames without
    impacting each other's work. A user could also send a clone to
    VideoEncoder, to keep using the frame after the VideoEncoder is done
    with the clone and calls destroy on it.
    
    Bug: 1108023
    Change-Id: Ia4f22f1429e466474fb87ce9700a54b87428440b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355092
    Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
    Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
    Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#798386}
    f19b1b09
video_frame.idl 2.43 KB