1CONFIG_PATH := hardware/qcom/media/conf_files/$(MSMSTEPPE)
2
3# Video feature flags
4
5# Video configuration files
6PRODUCT_COPY_FILES += \
7    $(CONFIG_PATH)/codec2.vendor.ext.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.vendor.ext.policy \
8    $(CONFIG_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
9    $(CONFIG_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
10    $(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
11    $(CONFIG_PATH)/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
12    $(CONFIG_PATH)/media_codecs_sdmmagpie_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_v1.xml \
13    $(CONFIG_PATH)/media_codecs_sdmmagpie_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_v2.xml \
14    $(CONFIG_PATH)/media_codecs_vendor_sdmmagpie_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
15    $(CONFIG_PATH)/media_codecs_vendor_sdmmagpie_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v2.xml \
16    $(CONFIG_PATH)/media_codecs_performance_sdmmagpie_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v1.xml \
17    $(CONFIG_PATH)/media_codecs_performance_sdmmagpie_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v2.xml \
18    $(CONFIG_PATH)/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
19    $(CONFIG_PATH)/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml
20
21# Produce packages addition
22PRODUCT_PACKAGES += \
23    libcodec2_vndk.vendor \
24    libcodec2_hidl@1.0.vendor
25ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
26  $(warning "Compiling with full value-added framework")
27else
28  $(warning "Compiling without full value-added framework - enabling GENERIC_ODM_IMAGE")
29  GENERIC_ODM_IMAGE := true
30endif
31
32# Vendor property overrides
33# Enable Codec2.0 HAL for pure AOSP variants.
34ifeq ($(GENERIC_ODM_IMAGE),true)
35  $(warning "Forcing codec2.0 HW for generic odm build variant")
36  DEVICE_MANIFEST_FILE += hardware/qcom/media/conf_files/sm6150/c2_manifest_vendor.xml
37  #Set default ranks and rank Codec 2.0 over OMX codecs
38  PRODUCT_ODM_PROPERTIES += debug.stagefright.ccodec=4
39  PRODUCT_ODM_PROPERTIES += debug.stagefright.omx_default_rank=1000
40  PRODUCT_COPY_FILES += \
41      device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
42      device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
43else
44  $(warning "Enabling codec2.0 SW only for non-generic odm build variant")
45  DEVICE_MANIFEST_FILE += hardware/qcom/media/conf_files/sm6150/c2_manifest.xml
46  #Rank OMX SW codecs lower than OMX HW codecs
47  PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank.sw-audio=1
48  PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
49  PRODUCT_PROPERTY_OVERRIDES += media.settings.xml=/vendor/etc/media_profiles_vendor.xml
50  PRODUCT_COPY_FILES += \
51      device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
52      $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
53endif
54