• Vasiliy Telezhnikov's avatar
    Get coded size for MediaCodec path · 63c640c5
    Vasiliy Telezhnikov authored
    This CL modifies MediaCodec path to get use real coded_size and
    visible_rect in VideoFrame instead of relying on texture matrix
    transform.
    
    To achieve this we utilize similar approach as in YCbCrHelper.
    Helper is renamed to FrameInfoHelper. During CreateVideoFrame
    VideoFrameFactoryImpl will check if it has cached FrameInfo for
    current visible size that comes from media codec. If not it
    will post task to FrameInfoHelper to get it. To avoid
    unnecessary frame renders FrameInfoHelper also does similar
    caching. If info is not cached it will Render frame early to
    get the info.
    
    To be able render frame before creation CodecImage and
    SharedImageVideo the render logic is extracted from CodecImage
    to CodecOutputBufferRenderer.
    
    Bug: 1076564
    Change-Id: I5baac124f46d78a89ae4300d5a01a9b9ab04af2e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2196922Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
    Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
    Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#769028}
    63c640c5
shared_image_video.cc 20.1 KB