1 /* 2 * Copyright (C) 2024 Huawei Device 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 TRANSCODER_SERVICE_PROXY_H 17 #define TRANSCODER_SERVICE_PROXY_H 18 19 #include "i_standard_transcoder_service.h" 20 #include "nocopyable.h" 21 22 namespace OHOS { 23 namespace Media { 24 class TransCoderServiceProxy : public IRemoteProxy<IStandardTransCoderService>, public NoCopyable { 25 public: 26 explicit TransCoderServiceProxy(const sptr<IRemoteObject> &impl); 27 virtual ~TransCoderServiceProxy(); 28 29 int32_t SetListenerObject(const sptr<IRemoteObject> &object) override; 30 int32_t SetVideoEncoder(VideoCodecFormat encoder) override; 31 int32_t SetVideoSize(int32_t width, int32_t height) override; 32 int32_t SetVideoEncodingBitRate(int32_t rate) override; 33 int32_t SetAudioEncoder(AudioCodecFormat encoder) override; 34 int32_t SetAudioEncodingBitRate(int32_t bitRate) override; 35 int32_t SetOutputFormat(OutputFormatType format) override; 36 int32_t SetInputFile(int32_t fd, int64_t offset, int64_t size) override; 37 int32_t SetOutputFile(int32_t fd) override; 38 int32_t Prepare() override; 39 int32_t Start() override; 40 int32_t Pause() override; 41 int32_t Resume() override; 42 int32_t Cancel() override; 43 int32_t Release() override; 44 int32_t DestroyStub() override; 45 46 private: 47 static inline BrokerDelegator<TransCoderServiceProxy> delegator_; 48 }; 49 } // namespace Media 50 } // namespace OHOS 51 #endif // RECORDER_SERVICE_PROXY_H 52