Home | History | Annotate | Download | only in video
      1 /*
      2  * Copyright 2016, 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 #ifndef MEDIA_VIDEO_HIDL_TEST_COMMON_H
     18 #define MEDIA_VIDEO_HIDL_TEST_COMMON_H
     19 
     20 /*
     21  * Common video utils
     22  */
     23 void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     24                               std::vector<int32_t>* arrProfile,
     25                               std::vector<int32_t>* arrLevel);
     26 
     27 void setupRAWPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_U32 nFrameWidth,
     28                   OMX_U32 nFrameHeight, OMX_U32 nBitrate, OMX_U32 xFramerate,
     29                   OMX_COLOR_FORMATTYPE eColorFormat);
     30 
     31 void setupAVCPort(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     32                   OMX_VIDEO_AVCPROFILETYPE eProfile,
     33                   OMX_VIDEO_AVCLEVELTYPE eLevel, OMX_U32 xFramerate);
     34 
     35 void setupHEVCPort(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     36                    OMX_VIDEO_HEVCPROFILETYPE eProfile,
     37                    OMX_VIDEO_HEVCLEVELTYPE eLevel);
     38 
     39 void setupMPEG4Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     40                     OMX_VIDEO_MPEG4PROFILETYPE eProfile,
     41                     OMX_VIDEO_MPEG4LEVELTYPE eLevel, OMX_U32 xFramerate);
     42 
     43 void setupH263Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     44                    OMX_VIDEO_H263PROFILETYPE eProfile,
     45                    OMX_VIDEO_H263LEVELTYPE eLevel, OMX_U32 xFramerate);
     46 
     47 void setupVPXPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_U32 xFramerate);
     48 
     49 void setupVP8Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     50                   OMX_VIDEO_VP8PROFILETYPE eProfile,
     51                   OMX_VIDEO_VP8LEVELTYPE eLevel);
     52 
     53 void setupVP9Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
     54                   OMX_VIDEO_VP9PROFILETYPE eProfile,
     55                   OMX_VIDEO_VP9LEVELTYPE eLevel);
     56 
     57 #endif  // MEDIA_VIDEO_HIDL_TEST_COMMON_H
     58