New issue
Advanced search Search tips

Issue 737220 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 660942



Sign in to add a comment

MojoVideoDecoderService should allow VideoFrame release callbacks to be called after it's destructed

Project Member Reported by w...@chromium.org, Jun 27 2017

Issue description

Currently VideoFrame release callbacks route through MVDS, which means they aren't called after it's destructed.

We need to separate the lifetimes so that callbacks can be received later to correctly keep textures alive as long as the mailbox VideoFrame referencing them is alive.
 

Comment 1 by w...@chromium.org, Sep 15 2017

Blocking: 660942
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 5 2017

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

commit b795cd5ca7a49a8e5da74ff14abf4613ab50d59c
Author: Dan Sanders <sandersd@chromium.org>
Date: Tue Dec 05 21:14:35 2017

[media] Create channel for cross-process VideoFrame release.

This CL defines a new interface, VideoFrameReleaser, and adds a channel
in MojoVideoDecoder to use it, in a way that can outlive the
VideoDecoder.

On the renderer side, MojoVideoFrameReleaser is ref counted, and will
live as long as there are outstanding VideoFrames.

On the gpu side, VideoFrameHandleReleaserImpl maintains a map of
outstanding VideoFrames, and will live until the map is empty.

The old path, with special methods on mojom::VideoDecoder, is removed.
VideoDecoder implementations can now attach regular mailbox release
callbacks to their VideoFrames and expect normal results.

Bug:  737220 , 733828
Change-Id: I3c26e1e98c61f180246815fcc79f6731d8a26ed4
Reviewed-on: https://chromium-review.googlesource.com/762104
Commit-Queue: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521831}
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/base/video_frame.cc
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/base/video_frame.h
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/clients/mojo_video_decoder.cc
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/clients/mojo_video_decoder.h
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/interfaces/video_decoder.mojom
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/services/gpu_mojo_media_client.cc
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/services/gpu_mojo_media_client.h
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/services/mojo_video_decoder_service.cc
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/services/mojo_video_decoder_service.h
[modify] https://crrev.com/b795cd5ca7a49a8e5da74ff14abf4613ab50d59c/media/mojo/test/mojo_video_decoder_integration_test.cc

Status: Fixed (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 23 2018

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

commit ff17b0a99e02a4a087b19356f43a4ffc23c1fd42
Author: liberato@chromium.org <liberato@chromium.org>
Date: Fri Mar 23 23:03:01 2018

Allow textures to outlive the MCVD that created them.

Previously, MCVD destroyed the textures that back the VideoFrames
when MCVD was destroyed.  When the pipeline suspends, this causes
any VideoFrame to become undrawable.

This CL adds TexturePool, which holds references to the textures
until all VideoFrames are destroyed.  While the implementation
isn't exactly a pool, we will be adding pool functionality to
it shortly.

This CL also introduces a wrapper for GL command buffer stubs, to
allow for easier testing.

Similarly, this CL adds a wrapper around TextureRef.

Bug:  737220 
Test: TexturePoolTest
Cq-Include-Trybots: luci.chromium.try:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I3d9bd42b9f8d3782b3eb4ceca30388774dc4854b
Reviewed-on: https://chromium-review.googlesource.com/966782
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545609}
[modify] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/BUILD.gn
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/command_buffer_stub_wrapper.h
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/command_buffer_stub_wrapper_impl.cc
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/command_buffer_stub_wrapper_impl.h
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/mock_command_buffer_stub_wrapper.cc
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/mock_command_buffer_stub_wrapper.h
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/texture_pool.cc
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/texture_pool.h
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/texture_pool_unittest.cc
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/texture_wrapper.cc
[add] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/texture_wrapper.h
[modify] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/video_frame_factory_impl.cc
[modify] https://crrev.com/ff17b0a99e02a4a087b19356f43a4ffc23c1fd42/media/gpu/android/video_frame_factory_impl.h

Sign in to add a comment