# Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/ohos.gni")
import("//foundation/multimedia/av_codec/config.gni")

group("av_codec_services_package") {
  deps = [
    "media_engine:av_codec_media_engine_package",
    "services:av_codec_service",
    "utils:av_codec_service_utils",
  ]
  if (av_codec_support_fcodec) {
    deps += [ "engine/codec/video/fcodec:fcodec" ]
  }
  if (av_codec_support_avc_encoder) {
    deps += [ "engine/codec/video/avcencoder:avc_encoder" ]
  }
  if (av_codec_support_av1_decoder) {
    deps += [ "engine/codec/video/av1decoder:av1_decoder" ]
  }
  if (av_codec_support_hevc_decoder) {
    deps += [ "engine/codec/video/hevcdecoder:hevc_decoder" ]
  }
  if (av_codec_support_hcodec) {
    deps += [ "engine/codec/video/hcodec:hcodec_group" ]
  }
  if (av_codec_support_vp8_decoder || av_codec_support_vp9_decoder) {
    deps += [ "engine/codec/video/vpxdecoder:vpx_decoder" ]
  }

  print("av_codec_support_fcodec =", av_codec_support_fcodec)
  print("av_codec_support_avc_encoder =", av_codec_support_avc_encoder)
  print("av_codec_support_hevc_decoder =", av_codec_support_hevc_decoder)
  print("av_codec_support_hcodec =", av_codec_support_hcodec)
  print("av_codec_support_vp8_decoder =", av_codec_support_vp8_decoder)
  print("av_codec_support_vp9_decoder =", av_codec_support_vp9_decoder)
  print("av_codec_support_av1_decoder =", av_codec_support_av1_decoder)
}