# Copyright (C) 2025 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.

domain: AV_CODEC

CODEC_START_INFO:
  __BASE: {type: BEHAVIOR, level: MINOR, desc: AV_CODEC codec start event}
  CLIENT_PID: {type: INT32, desc: Codec client pid}
  CLIENT_UID: {type: INT32, desc: Codec client uid}
  CODEC_INSTANCE_ID: {type: INT32, desc: Codec instance id}
  CODEC_NAME: {type: STRING, desc: Codec name}
  CODEC_IS_VENDOR: {type: STRING, desc: True is hardware codec or false is software codec}
  CODEC_MODE: {type: STRING, desc: Buffer mode or Surface mode}
  ENCODER_BITRATE: {type: INT64, desc: Encoder output bitrate}
  VIDEO_WIDTH: {type: INT32, desc: Video codec input width}
  VIDEO_HEIGHT: {type: INT32, desc: Video codec input height}
  VIDEO_FRAMERATE: {type: DOUBLE, desc: Video codec output framerate}
  VIDEO_PIXEL_FORMAT: {type: STRING, desc: Video codec input pixel format}
  AUDIO_CHANNEL_COUNT: {type: INT32, desc: Audio codec input channel count}
  AUDIO_SAMPLE_RATE: {type: INT32, desc: Audio codec input sample rate}

CODEC_STOP_INFO:
  __BASE: {type: BEHAVIOR, level: MINOR, desc: AV_CODEC codec stop event}
  CLIENT_PID: {type: INT32, desc: Codec client pid}
  CLIENT_UID: {type: INT32, desc: Codec client uid}
  CODEC_INSTANCE_ID: {type: INT32, desc: Codec instance id}

FAULT:
  __BASE: {type: FAULT, level: CRITICAL, desc: AV_CODEC fault}
  MODULE: {type: STRING, desc: Module name}
  MSG: {type: STRING, desc: Fault description}
  FAULTTYPE: {type: STRING, desc: Fault type}

STATISTICS_INFO:
  __BASE: {type: STATISTIC, level: CRITICAL, desc: AVCodec statistics event info, preserve: true}
  QUERY_CAP_TIMES: {type: UINT32, desc: Number of capability query requests}
  CREATE_CODEC_TIMES: {type: UINT32, desc: Number of video codec creations}
  CODEC_SPECIFIED_INFO: {type: STRING, desc: Specification information of video codec creation}
  APP_NAME_DICT: {type: STRING, desc: Dictionary of application names invoking the codec}
  CAP_UNSUPPORTED_INFO: {type: STRING, desc: Unsupported capability specification information}
  DEC_ABNORMAL_OCCUPATION_INFO: {type: STRING, desc: Statistics on application exceptions occupying decoders}
  SPEED_DECODING_INFO: {type: STRING, desc: Statistics on playback speed decoding}
  CODEC_ERROR_INFO: {type: STRING, desc: Statistics on codec exceptions}