1 /* 2 * Copyright (c) 2009-2011 Intel Corporation. All rights reserved. 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 OMX_VIDEO_DECODER_PAVC_H_ 18 #define OMX_VIDEO_DECODER_PAVC_H_ 19 20 21 #include "OMXVideoDecoderBase.h" 22 23 class OMXVideoDecoderPAVC : public OMXVideoDecoderBase { 24 public: 25 OMXVideoDecoderPAVC(); 26 virtual ~OMXVideoDecoderPAVC(); 27 28 protected: 29 virtual OMX_ERRORTYPE InitInputPortFormatSpecific(OMX_PARAM_PORTDEFINITIONTYPE *paramPortDefinitionInput); 30 virtual OMX_ERRORTYPE ProcessorInit(void); 31 virtual OMX_ERRORTYPE ProcessorDeinit(void); 32 virtual OMX_ERRORTYPE ProcessorFlush(OMX_U32 portIndex); 33 virtual OMX_ERRORTYPE ProcessorProcess( 34 OMX_BUFFERHEADERTYPE ***pBuffers, 35 buffer_retain_t *retains, 36 OMX_U32 numberBuffers); 37 38 virtual OMX_ERRORTYPE PrepareConfigBuffer(VideoConfigBuffer *p); 39 virtual OMX_ERRORTYPE PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buffer, buffer_retain_t *retain, VideoDecodeBuffer *p); 40 41 virtual OMX_ERRORTYPE BuildHandlerList(void); 42 DECLARE_HANDLER(OMXVideoDecoderPAVC, ParamVideoAvc); 43 DECLARE_HANDLER(OMXVideoDecoderPAVC, VideoProfileLevelQuerySupported); 44 DECLARE_HANDLER(OMXVideoDecoderPAVC, VideoProfileLevelCurrent); 45 46 47 private: 48 enum { 49 // OMX_PARAM_PORTDEFINITIONTYPE 50 INPORT_MIN_BUFFER_COUNT = 1, 51 INPORT_ACTUAL_BUFFER_COUNT = 4, 52 INPORT_BUFFER_SIZE = 1382400, 53 54 // for OMX_VIDEO_PARAM_INTEL_AVC_DECODE_SETTINGS 55 // default number of reference frame 56 NUM_REFERENCE_FRAME = 4, 57 58 // extra number of reference frame to allocate for video conferencing use case. 59 // total number of reference frame allocated by default in video conferencing use case is 10. 60 EXTRA_REFERENCE_FRAME = 6, 61 }; 62 63 OMX_VIDEO_PARAM_AVCTYPE mParamAvc; 64 OMX_VIDEO_AVCPROFILETYPE mCurrentProfile; 65 OMX_VIDEO_AVCLEVELTYPE mCurrentLevel; 66 int32_t mIMROffset; 67 68 }; 69 70 #endif /* OMX_VIDEO_DECODER_PAVC_H_ */ 71 72