• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 #ifndef OHOS_CAMERA_DPS_MEDIA_MANAGER_ADAPTER_H
16 #define OHOS_CAMERA_DPS_MEDIA_MANAGER_ADAPTER_H
17 
18 #include "media_manager_interface.h"
19 #include "mpeg_manager_factory.h"
20 
21 namespace OHOS {
22 namespace CameraStandard {
23 namespace DeferredProcessing {
24 class MediaManagerAdapter : public MediaManagerIntf {
25 public:
26     MediaManagerAdapter();
27     ~MediaManagerAdapter() override;
28     int32_t MpegAcquire(const std::string& requestId, const sptr<IPCFileDescriptor>& inputFd) override;
29     int32_t MpegUnInit(const int32_t result) override;
30     sptr<IPCFileDescriptor> MpegGetResultFd() override;
31     void MpegAddUserMeta(std::unique_ptr<MediaUserInfo> userInfo) override;
32     uint64_t MpegGetProcessTimeStamp() override;
33     sptr<Surface> MpegGetSurface() override;
34     sptr<Surface> MpegGetMakerSurface() override;
35     void MpegSetMarkSize(int32_t size) override;
36     int32_t MpegRelease() override;
37 private:
38     std::shared_ptr<MpegManager> mpegManager_ = {nullptr};
39 };
40 } // namespace DeferredProcessing
41 } // namespace CameraStandard
42 } // namespace OHOS
43 #endif // OHOS_CAMERA_DPS_MEDIA_MANAGER_ADAPTER_H