New issue
Advanced search Search tips

Issue 731472 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 440222



Sign in to add a comment

Video frame pools should have time based expiry of resources.

Project Member Reported by dalecur...@chromium.org, Jun 9 2017

Issue description

As we look at varying the number of buffered frames the VideoRendererImpl might ask for at a given time we need to ensure the frame pools will expire resources in a timely manner. Doing something say like checking a last used time every ~10 seconds will allow us to GC these unused buffers.

I.e. if VRI starts requesting 8 frames and then reduces down to 4, we may have 4 stale buffers left in a given frame pool wasting memory.

I'll run some numbers to see how badly this affects memory usage.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2f7fc637e426f4d432e35bae82609280add316fd

commit 2f7fc637e426f4d432e35bae82609280add316fd
Author: Dale Curtis <dalecurtis@chromium.org>
Date: Wed Jun 28 23:32:14 2017

Improve memory efficiency of various video frame pools.

Now that we are starting to experiment with variable numbers of
frames held by the video renderer, we need to make sure we expire
old frame data in situations where we drop from a high buffer count
back to a low one (for memory pressure or background, etc.

Similarly, for paused and eventually suspended media, we want to
ensure that we release all unused resources when the renderer or
decoder is torn down. Only VideoFramePool was correctly clearing
unused resources upon shutdown when a single frame was still in
use. The other pools waited until destruction before clearing
resources.

BUG= 731472 , 734813
TEST=tbd

Change-Id: I836daf335d52a000dcba401d7855473b23a99731
Reviewed-on: https://chromium-review.googlesource.com/546917
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483191}
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/BUILD.gn
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/base/test_helpers.cc
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/base/test_helpers.h
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/base/video_frame_pool.cc
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/base/video_frame_pool.h
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/base/video_frame_pool_unittest.cc
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/filters/vpx_video_decoder.cc
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/filters/vpx_video_decoder.h
[add] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/filters/vpx_video_decoder_unittest.cc
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/renderers/mock_gpu_memory_buffer_video_frame_pool.h
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/renderers/video_renderer_impl.h
[add] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/test/data/vp9-I-frame-1280x720
[add] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/test/data/vp9-I-frame-320x240
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/video/gpu_memory_buffer_video_frame_pool.cc
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/video/gpu_memory_buffer_video_frame_pool.h
[modify] https://crrev.com/2f7fc637e426f4d432e35bae82609280add316fd/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment