[M120 Migration][MM] Migrate patches for suspend and resume. 73/305473/3
authorSun-woo Nam <sunny.nam@samsung.com>
Fri, 2 Feb 2024 04:19:46 +0000 (20:19 -0800)
committerSunwoo Nam <sunny.nam@samsung.com>
Fri, 16 Feb 2024 02:16:55 +0000 (02:16 +0000)
commit945a6e5b89689679a0de36e89b257fd23a35d124
treefd38728d9f406e067d470eef735d34d67f7f31c0
parent3f97c6d4d2d2261af45f61344e6c1037aa6129e3
[M120 Migration][MM] Migrate patches for suspend and resume.

This patch supports suspend and resume behaviors when media goes to
background or the mulit-videos scenario.

- Handle suspend for Capi Player.
Handle suspend request from MediaCapabilityManager and resource conflict.
https://review.tizen.org/gerrit/#/c/292279/

- Arrange the suspend logic.
Release the esplusplayer when resource is conflicted.
https://review.tizen.org/gerrit/#/c/298638/

- Fix potential crash issue
Add null check to avoid crash.
https://review.tizen.org/gerrit/#/c/300715/

- Fix the media suspend/resume issue between apps.
Cancel the request suspend task if it has not been completed
when the player is resumed.
Flush the player buffer before seek.
https://review.tizen.org/gerrit/#/c/298571/

- Distinguish suspend situations based on the resource conflict.
The suspend situation by the player is mainly as follows.
1) If there are multiple videos in one content, request suspend by
MediaCapabilityManager.
2) Resource conflict occurs when another video plays in another process.
In case 1), these suspended videos doon't need to be resumed
when the app is suspended and resumed.
In case 2), the video should be resumed when the app is suspended and resumed.
https://review.tizen.org/gerrit/#/c/299121/

Change-Id: I53a602665458945bd359b89276f3602479fea5e7
Signed-off-by: Sun-woo Nam <sunny.nam@samsung.com>
21 files changed:
base/task/sequenced_task_runner.h
media/base/pipeline.h
media/base/pipeline_impl.cc
media/base/pipeline_impl.h
media/base/renderer_client.h
media/mojo/clients/mojo_renderer.cc
media/mojo/clients/mojo_renderer.h
media/mojo/mojom/renderer.mojom
media/mojo/services/mojo_renderer_service.cc
media/mojo/services/mojo_renderer_service.h
third_party/blink/public/platform/web_media_player.h
third_party/blink/renderer/core/html/media/html_media_element.cc
third_party/blink/renderer/core/html/media/html_media_element.h
third_party/blink/renderer/platform/media/web_media_player_impl.cc
third_party/blink/renderer/platform/media/web_media_player_impl.h
tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc
tizen_src/chromium_impl/media/filters/media_player_bridge_capi.cc
tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h
tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc
tizen_src/chromium_impl/media/filters/media_player_esplusplayer.h
tizen_src/chromium_impl/media/filters/media_player_tizen.h