[M130 Migration][HBBTV] Avoid preparing player when any decoder is conflicted. 74/325074/6
authorKajetan Brzuszczak <k.brzuszczak@partner.samsung.com>
Tue, 11 Feb 2025 11:57:05 +0000 (12:57 +0100)
committerBot Blink <blinkbot@samsung.com>
Mon, 2 Jun 2025 15:34:37 +0000 (15:34 +0000)
[Problem]
Resource conflict occurs when two players do prepare at the same time
  which cause a black screen, because chromium replaces only the first
  prepare with a preload when potential conflict is detected.

[Solution]
Call a Prepare MMPlayer only when ChooseDecoder is successfully completed.

Bug: https://jira-eu.sec.samsung.net/browse/VDWASM-2237
Signed-off-by: Kajetan Brzuszczak <k.brzuszczak@partner.samsung.com>
Change-Id: I5c95e99c8a685155fad2eceede0386f0d57acc89

tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc

index 4543eaed4986d5a6cbbaeb5e0c592e39c8c8743a..c2b9c90285b9bf984c11bd246f75fdfce7b57825 100644 (file)
@@ -1499,7 +1499,10 @@ bool MediaPlayerBridgeCapiTV::PreloadIfNeeded(int& ret) {
     LOG_ID(ERROR, GetPlayerId()) << "(" << static_cast<void*>(this)
                                  << "), GetMediaPlayerClient return null";
   SetDisplayAtPausedState();
-  return !content::HardwareResourceHelper::Get().IsDualDecoding();
+
+  // NOTE: Call SetPlayerPrepareAsync only when ChooseDecoder succeeded to avoid
+  //       resource conflicts. ChooseDecoder calls it itself. HBBTV-only
+  return blink::IsHbbTV();
 }
 
 void MediaPlayerBridgeCapiTV::SetDisplayAtPausedState() {