// Copyright (c) 2023, Alliance for Open Media. All rights reserved
//
// This source code is subject to the terms of the BSD 3-Clause Clear License
// and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear
// License was not distributed with this source code in the LICENSE file, you
// can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the
// Alliance for Open Media Patent License 1.0 was not distributed with this
// source code in the PATENTS file, you can obtain it at
// www.aomedia.org/license/patent.

edition = "2023";

package iamf_tools_cli_proto;

import "iamf/cli/proto/obu_header.proto";
import "iamf/cli/proto/parameter_data.proto";

message ParameterDataExtension {
  // `parameter_data_size` is ignored. The value in the bitstream is inferred
  // based on the size of `parameter_data_bytes`.
  uint32 parameter_data_size = 1 [deprecated = true];
  bytes parameter_data_bytes = 2;
}

message ParameterSubblock {
  uint32 subblock_duration = 1;

  oneof parameter_data {
    MixGainParameterData mix_gain_parameter_data = 2;
    DemixingInfoParameterData demixing_info_parameter_data = 3;
    ReconGainInfoParameterData recon_gain_info_parameter_data = 4;
    ParameterDataExtension parameter_data_extension = 5;
  }
}

message ParameterBlockObuMetadata {
  uint32 parameter_id = 1;
  uint32 duration = 2;
  // `num_subblocks` is ignored. The value in the bitstream is inferred based on
  // the number of `subblocks`.
  uint32 num_subblocks = 3 [deprecated = true];
  uint32 constant_subblock_duration = 4;
  repeated ParameterSubblock subblocks = 5;
  int64 start_timestamp = 6;
  ObuHeaderMetadata obu_header = 7;
}
