1 /* 2 * Copyright (c) 2024, 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_ADM_TO_USER_METADATA_ADM_XML_TO_ADM_H_ 14 #define CLI_ADM_TO_USER_METADATA_ADM_XML_TO_ADM_H_ 15 16 #include <cstdint> 17 18 #include "absl/status/statusor.h" 19 #include "absl/strings/string_view.h" 20 #include "iamf/cli/adm_to_user_metadata/adm/adm_elements.h" 21 22 namespace iamf_tools { 23 namespace adm_to_user_metadata { 24 25 /*!\brief Parses the input XML to `ADM`. 26 * 27 * \param xml_data XML data to parse. 28 * \param importance_threshold Threshold for to determine which audio objects to 29 * ignore. Any `audioObject`s with a lower `importance` will be dropped 30 * from the output ADM. 31 * \param file_type ADM file type of the input wav. 32 * \return Output ADM on success. A specific error code on failure. 33 */ 34 absl::StatusOr<ADM> ParseXmlToAdm(absl::string_view xml_data, 35 int32_t importance_threshold, 36 AdmFileType file_type); 37 38 } // namespace adm_to_user_metadata 39 } // namespace iamf_tools 40 41 #endif // CLI_ADM_TO_USER_METADATA_ADM_XML_TO_ADM_H_ 42