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