- HDMI CEC API is deprecated.
- Audio controller API can check soundBar/TV/receiver's capability.
Migrated from:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/291012/
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/291239/
Change-Id: Ibf3813fe5f795fb472eebe2e3a6978951556c84c
Signed-off-by: peng1xiao <peng1.xiao@samsung.com>
%else
%define __enable_gamepad_latency_test 0
%endif
+
+%if "%{_vd_cfg_product_type}" != "LFD" && "%{_vd_cfg_product_type}" != "IWB" && "%{?_with_emulator}" != "1" && "%{_vd_cfg_licensing}" == "n" && %{tizen_version} > 60
+%define _tizen_atmos_decoder_enable 1
+%endif
+
%{?_use_system_icu: %define __use_system_icu %{_use_system_icu}}
# Product tv can't utilize system icu due to nacl dependency.
%if "%{?profile}" != "tv" && %{tizen_version} == 60 && %{?_use_system_icu: 0}%{!?_use_system_icu: 1}
BuildRequires: pkgconfig(tv-resource-information)
BuildRequires: pkgconfig(vd-win-util)
BuildRequires: pkgconfig(WebProduct)
+%if "%{_tizen_atmos_decoder_enable}" == "1"
+BuildRequires: pkgconfig(ais-control-settings)
+%endif
%if %{tizen_version} >= 60
BuildRequires: pkgconfig(resource-center-api)
%endif
%endif
"ozone_auto_platforms=false" \
"enable_wrt_js=%{macro_to_bool __enable_wrt_js}" \
+ "tizen_atmos_decoder_enable=%{macro_to_bool _tizen_atmos_decoder_enable}" \
%if 0%{?__enable_wrt_js}
"xwalk_extension_path=\"%{__xwalk_extension_path}\"" \
"xwalk_extension_service_path=\"%{__xwalk_extension_service_path}\"" \
#include "hdmicec_api.h"
#include "tizen_src/chromium_impl/build/tizen_version.h"
#include "tizen_src/chromium_impl/tizen/tizen_tv_platform.h"
+#if defined(ENABLE_ATMOS_DECODER)
+#include <audio_control_setting_managed.h>
+#endif
#endif
using blink::WebMediaSource;
#endif
}
+bool IsAtmosDecodingSupportedOnTizen(const ContentType& content_type) {
+#if defined(ENABLE_ATMOS_DECODER)
+ int atmos_support = 0;
+ // audio_ctrl_setting_get_atmos_capability() checks if TV can decode ATMOS
+ // itself. The function returns 0 when 1) The sound output is not a TV
+ // speaker. 2) Menu > Sound > Expert Settings > Dolby ATMOS menu OFF. 3) In
+ // case of Multiview mode. 4) In VR360 mode.
+ AUDIO_CTRL_SETTING_E ret = AUDIO_CTRL_SETTING_ERR_NONE;
+ ret = audio_ctrl_setting_get_atmos_capability(&atmos_support);
+ if (ret != AUDIO_CTRL_SETTING_ERR_NONE) {
+ LOG(WARNING) << "[ATMOS] AUDIO_CTRL_SETTING_ERR: " << ret;
+ }
+ if (atmos_support == 1 &&
+ content_type.Parameter("codecs").FindIgnoringCase("ec-3") != kNotFound &&
+ content_type.Parameter("channels").ToInt() <= 8) {
+ return true;
+ }
+#endif
+ return false;
+}
+
bool MediaSource::IsCodecAndMediaTypeSupported(
const ContentType& content_type) {
DVLOG(1) << __func__ << "MediaSource Extention Type (W="
}
String features = content_type.Parameter("features");
- if (!features.empty()) {
+ if (features == dolby_eac3_atmos) {
+ return IsAtmosDecodingSupportedOnTizen(content_type);
+ } else if (!features.empty()) {
+ LOG(WARNING) << "The features has invalid parameter: " << features;
return false;
}
}
}
+config("audio_ctrl_setting") {
+ if (tizen_atmos_decoder_enable) {
+ ldflags = [ "-laudio_ctrl_setting" ]
+ }
+}
+
+tizen_pkg_config("libaudio_ctrl_setting") {
+ packages = []
+ if (tizen_atmos_decoder_enable) {
+ packages = [ "ais-control-settings" ]
+ }
+}
+
tizen_pkg_config("libmm-player") {
packages = []
if (is_tizen) {
if (tizen_audio_io) {
defines += [ "TIZEN_MULTIMEDIA_USE_CAPI_AUDIO_IO" ]
}
+ if (tizen_atmos_decoder_enable) {
+ defines += [ "ENABLE_ATMOS_DECODER" ]
+ }
if (tizen_autofill) {
defines += [ "TIZEN_AUTOFILL" ]
if (tizen_autofill_fw) {
enable_ewk_interface = false
enable_wrt_js = false
+ tizen_atmos_decoder_enable = false
tizen_pepper_extensions = false
# Tizen multimedia related
]
}
+ if (tizen_atmos_decoder_enable) {
+ external_media_video_decode_config += [
+ "//tizen_src/build:libaudio_ctrl_setting",
+ "//tizen_src/build:audio_ctrl_setting",
+ ]
+ }
+
external_media_capture_config += [
"//tizen_src/build:capi-media-camera",
"//tizen_src/build:libcapi-media-camera",
auto* plugin = &HbbtvDynamicPlugin::Get();
plugin->Init(injected_bundle_path_);
}
+ // Keep tizen app id into CommandLine in order to access it
+ // from all over the browser process.
+ command_line.AppendSwitchASCII(switches::kTizenAppId, tizen_app_id_);
#endif // IS_TIZEN_TV
#endif // IS_TIZEN
}