1 /* 2 * Copyright (c) 2023, Alliance for Open Media. All rights reserved 3 * 4 * This source code is subject to the terms of the BSD 3-Clause Clear License 5 * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear 6 * License was not distributed with this source code in the LICENSE file, you 7 * can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the 8 * Alliance for Open Media Patent License 1.0 was not distributed with this 9 * source code in the PATENTS file, you can obtain it at 10 * www.aomedia.org/license/patent. 11 */ 12 13 #ifndef CLI_AUDIO_ELEMENT_WITH_DATA_H_ 14 #define CLI_AUDIO_ELEMENT_WITH_DATA_H_ 15 16 #include <list> 17 #include <vector> 18 19 #include "absl/container/flat_hash_map.h" 20 #include "iamf/cli/channel_label.h" 21 #include "iamf/obu/audio_element.h" 22 #include "iamf/obu/codec_config.h" 23 #include "iamf/obu/param_definitions.h" 24 #include "iamf/obu/types.h" 25 26 namespace iamf_tools { 27 28 typedef absl::flat_hash_map<DecodedUleb128, std::list<ChannelLabel::Label>> 29 SubstreamIdLabelsMap; 30 typedef absl::flat_hash_map<ChannelLabel::Label, float> LabelGainMap; 31 32 struct AudioElementWithData { 33 friend bool operator==(const AudioElementWithData& lhs, 34 const AudioElementWithData& rhs) = default; 35 AudioElementObu obu; 36 const CodecConfigObu* codec_config; 37 SubstreamIdLabelsMap substream_id_to_labels; 38 LabelGainMap label_to_output_gain; 39 std::vector<ChannelNumbers> channel_numbers_for_layers; 40 }; 41 42 } // namespace iamf_tools 43 44 #endif // CLI_AUDIO_ELEMENT_WITH_DATA_H_ 45