1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #define LOG_TAG "C2SoftIamfDec" 18 #include <log/log.h> 19 20 namespace android { 21 22 namespace { 23 24 constexpr char COMPONENT_NAME[] = "c2.android.iamf.decoder"; 25 26 } // namespace 27 28 class C2SoftIamfDec::IntfImpl : public SimpleInterface<void>::BaseParams { 29 public: IntfImpl(const std::shared_ptr<C2ReflectorHelper> & helper)30 explicit IntfImpl(const std::shared_ptr<C2ReflectorHelper>& helper) 31 : SimpleInterface<void>::BaseParams(helper, COMPONENT_NAME, C2Component::KIND_DECODER, 32 C2Component::DOMAIN_AUDIO, 33 // Replace with IAMF mimetype when available 34 "audio/iamf") { 35 // Configure (e.g. noPrivateBuffers(), etc.) 36 // Add parameters. 37 } 38 } 39 40 C2SoftIamfDec::C2SoftIamfDec(const char* name, c2_node_id_t id, 41 const std::shared_ptr<IntfImpl>& intfImpl) 42 : SimpleC2Component(std::make_shared<SimpleInterface<IntfImpl>>(name, id, intfImpl)), 43 mIntf(intfImpl) { 44 } 45 46 C2SoftIamfDec::~C2SoftIamfDec() { 47 onRelease(); 48 } 49 50 c2_status_t C2SoftIamfDec::onInit() { 51 return C2_BAD_STATE; 52 } 53 54 c2_status_t C2SoftIamfDec::onStop() { 55 return C2_NO_INIT; 56 } 57 58 void C2SoftIamfDec::onReset() { 59 return; 60 } 61 62 void C2SoftIamfDec::onRelease() { 63 return; 64 } 65 66 c2_status_t C2SoftIamfDec::onFlush_sm() { 67 return C2_NO_INIT; 68 } 69 70 void C2SoftIamfDec::process(const std::unique_ptr<C2Work>& work, 71 const std::shared_ptr<C2BlockPool>& pool) { 72 return; 73 } 74 75 c2_status_t C2SoftIamfDec::drain(uint32_t drainMode, const std::shared_ptr<C2BlockPool>& pool) { 76 return C2_NO_INIT; 77 } 78 79 } // namespace android 80