1 /*
2  * Copyright (C) 2022 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 I_MEDIA_PROFILE_SERVICE_H
17 #define I_MEDIA_PROFILE_SERVICE_H
18 
19 #include "i_recorder_profiles_service.h"
20 #include "recorder_profiles.h"
21 
22 namespace OHOS {
23 namespace Media {
24 enum RecorderProfilesType : int32_t {
25     RECORDER_TYPE_NONE = -1,
26     RECORDER_TYPE_AUDIO_CAPS,
27     RECORDER_TYPE_VIDEO_CAPS,
28     RECORDER_TYPE_PROFILE,
29 };
30 
31 /**
32  * @brief Capability data of recorder and profile, parser from config file
33  *
34  * @since 3.2
35  * @version 3.2
36  */
37 struct RecorderProfilesData {
38     int32_t mediaProfileType = RECORDER_TYPE_NONE;
39     int32_t sourceId = 0;
40     VideoRecorderCaps videoCaps;
41     AudioRecorderCaps audioCaps;
42     VideoRecorderProfile recorderProfile;
43 };
44 
45 class IRecorderProfilesService {
46 public:
47     virtual ~IRecorderProfilesService() = default;
48     virtual bool IsAudioRecorderConfigSupported(const RecorderProfilesData &profile) = 0;
49     virtual bool HasVideoRecorderProfile(int32_t sourceId, int32_t qualityLevel) = 0;
50     virtual std::vector<RecorderProfilesData> GetAudioRecorderCapsInfo() = 0;
51     virtual std::vector<RecorderProfilesData> GetVideoRecorderCapsInfo() = 0;
52     virtual RecorderProfilesData GetVideoRecorderProfileInfo(int32_t sourceId, int32_t qualityLevel) = 0;
53 };
54 }  // namespace Media
55 }  // namespace OHOS
56 #endif