diff options
author | thexai <58434170+thexai@users.noreply.github.com> | 2023-11-25 20:01:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-25 20:01:55 +0100 |
commit | 73a56d24904c62042e75588c24f7c574a08bf9fb (patch) | |
tree | fd742b98747749599106678a8894f8767e608f60 | |
parent | 1c77c459aad30d1d8cd5bb60ae2b92ddeac80529 (diff) | |
parent | 75aac0f96f932cab6cbd6b56d162f9b22dd3479b (diff) |
Merge pull request #24143 from quietvoid/dovi_compat_profile
[Android] Set codec profile 8 in DOVI compatibility mode
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp index 52c11c558c..b06a4ce13e 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp @@ -498,6 +498,10 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio m_mime = "video/hevc"; m_formatname = "amc-hevc"; + const auto settings = CServiceBroker::GetSettingsComponent()->GetSettings(); + const bool convertDovi = + (settings) ? settings->GetBool(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) : false; + bool isDvhe = (m_hints.codec_tag == MKTAG('d', 'v', 'h', 'e')); bool isDvh1 = (m_hints.codec_tag == MKTAG('d', 'v', 'h', '1')); @@ -557,6 +561,12 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheDth; break; case 7: + // set profile 8 when converting + if (convertDovi && CJNIBase::GetSDKVersion() >= 27) + profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheSt; + + // Profile 7 is not commonly supported. Not setting the profile here + // allows to pick the first available Dolby Vision codec. // profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheDtb; break; case 8: @@ -587,9 +597,6 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio // Only set for profile 7, container hint allows to skip parsing unnecessarily if (m_bitstream && m_hints.dovi.dv_profile == 7) { - bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool( - CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI); - CLog::Log(LOGDEBUG, "CDVDVideoCodecAndroidMediaCodec::Open Dolby Vision compatibility mode " "enabled: {}", |