1 /*
2  * Copyright (C) 2020 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 // Helper classes and functions to be used by provider and listener.
18 #ifndef ANDROID_MEDIA_ECO_C2UTILS_H_
19 #define ANDROID_MEDIA_ECO_C2UTILS_H_
20 
21 #include <cutils/atomic.h>
22 #include <utils/Errors.h>
23 
24 #include <C2Config.h>
25 #include "ECOData.h"
26 #include "ECODataKey.h"
27 #include "ECOServiceConstants.h"
28 
29 namespace android {
30 namespace media {
31 namespace eco {
32 
33 // Convert C2MediaType to ECOCodecType
34 extern int C2MediaType2ECOCodecType(std::shared_ptr<C2PortMediaTypeSetting::output> mediatype);
35 
36 // Convert C2Profile to ECOProfile
37 extern int C2Profile2ECOProfile(C2Config::profile_t profile);
38 
39 // Convert C2Level to ECOLevel
40 extern int C2Level2ECOLevel(C2Config::level_t level);
41 
42 // Convert C2PictureType to ECOFrameType
43 extern int C2PictureType2ECOFrameType(C2Config::picture_type_t frametype);
44 
45 }  // namespace eco
46 }  // namespace media
47 }  // namespace android
48 
49 #endif  // ANDROID_MEDIA_ECO_C2UTILS_H_
50