1 /* 2 * Copyright (c) 2023 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_SHARING_AUDIO_DECODER_H 17 #define OHOS_SHARING_AUDIO_DECODER_H 18 19 #include "common/event_comm.h" 20 #include "common/sharing_log.h" 21 #include "media_frame_pipeline.h" 22 23 namespace OHOS { 24 namespace Sharing { 25 class AudioDecoder : public FrameSource, 26 public FrameDestination { 27 public: 28 AudioDecoder() = default; 29 virtual ~AudioDecoder() = default; 30 31 virtual int32_t Init(const AudioTrack &audioTrack) = 0; 32 Start()33 virtual bool Start() 34 { 35 SHARING_LOGD("trace."); 36 return true; 37 } 38 Stop()39 virtual void Stop() 40 { 41 SHARING_LOGD("trace."); 42 } 43 Release()44 virtual void Release() 45 { 46 SHARING_LOGD("trace."); 47 } 48 49 public: 50 bool inited_ = false; 51 }; 52 } // namespace Sharing 53 } // namespace OHOS 54 #endif