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_IAMF_COMPONENTS_H_ 14 #define CLI_IAMF_COMPONENTS_H_ 15 16 #include <memory> 17 #include <string> 18 #include <vector> 19 20 #include "iamf/cli/loudness_calculator_factory_base.h" 21 #include "iamf/cli/obu_sequencer_base.h" 22 #include "iamf/cli/proto/mix_presentation.pb.h" 23 #include "iamf/cli/proto/user_metadata.pb.h" 24 #include "iamf/cli/renderer_factory.h" 25 26 namespace iamf_tools { 27 28 /*!\brief Creates an instance of `RendererFactoryBase`. 29 * 30 * This is useful for binding different kinds of renderer factories in an IAMF 31 * Encoder. 32 * 33 * \return Unique pointer to the created renderer factory 34 */ 35 std::unique_ptr<RendererFactoryBase> CreateRendererFactory(); 36 37 /*!\brief Creates an instance of `LoudnessCalculatorFactoryBase`. 38 * 39 * This is useful for binding different kinds of loudness calculator factories 40 * in an IAMF Encoder. 41 * 42 * \return Unique pointer to the created loudness calculator factory. 43 */ 44 std::unique_ptr<LoudnessCalculatorFactoryBase> 45 CreateLoudnessCalculatorFactory(); 46 47 /*!\brief Creates instances of `ObuSequencerBase`. 48 * 49 * This is useful for binding different kinds of sequencers in an IAMF Encoder. 50 * 51 * \param user_metadata Input user metadata. 52 * \param output_iamf_directory Directory to output IAMF files to. 53 * \param include_temporal_delimiters Whether the serialized data should 54 * include temporal delimiters. 55 * \return Vector of unique pointers to the created OBU sequencers. 56 */ 57 std::vector<std::unique_ptr<ObuSequencerBase>> CreateObuSequencers( 58 const iamf_tools_cli_proto::UserMetadata& user_metadata, 59 const std::string& output_iamf_directory, bool include_temporal_delimiters); 60 61 } // namespace iamf_tools 62 63 #endif // CLI_IAMF_COMPONENTS_H_ 64