Home | History | Annotate | Download | only in videocodec
      1 /*
      2 * Copyright (c) 2012 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 
     18 
     19 #ifndef OMX_VIDEO_DECODER_VP8_H_
     20 #define OMX_VIDEO_DECODER_VP8_H_
     21 
     22 
     23 #include "OMXVideoDecoderBase.h"
     24 #include <OMX_VideoExt.h>
     25 
     26 class OMXVideoDecoderVP8 : public OMXVideoDecoderBase {
     27 public:
     28     OMXVideoDecoderVP8();
     29     virtual ~OMXVideoDecoderVP8();
     30 
     31 protected:
     32     virtual OMX_ERRORTYPE InitInputPortFormatSpecific(OMX_PARAM_PORTDEFINITIONTYPE *paramPortDefinitionInput);
     33     virtual OMX_ERRORTYPE ProcessorInit(void);
     34     virtual OMX_ERRORTYPE ProcessorDeinit(void);
     35     virtual OMX_ERRORTYPE ProcessorProcess(
     36             OMX_BUFFERHEADERTYPE ***pBuffers,
     37             buffer_retain_t *retains,
     38             OMX_U32 numberBuffers);
     39 
     40    virtual OMX_ERRORTYPE PrepareConfigBuffer(VideoConfigBuffer *p);
     41    virtual OMX_ERRORTYPE PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buffer, buffer_retain_t *retain, VideoDecodeBuffer *p);
     42 
     43    virtual OMX_ERRORTYPE BuildHandlerList(void);
     44    virtual OMX_ERRORTYPE SetMaxOutputBufferCount(OMX_PARAM_PORTDEFINITIONTYPE *p);
     45    virtual OMX_COLOR_FORMATTYPE GetOutputColorFormat(int width);
     46    DECLARE_HANDLER(OMXVideoDecoderVP8, ParamVideoVp8);
     47 
     48 private:
     49     enum {
     50         // OMX_PARAM_PORTDEFINITIONTYPE
     51         INPORT_MIN_BUFFER_COUNT = 1,
     52         INPORT_ACTUAL_BUFFER_COUNT = 5,
     53         INPORT_BUFFER_SIZE = 1382400,
     54 
     55         OUTPORT_NATIVE_BUFFER_COUNT = 8,
     56     };
     57 
     58     OMX_VIDEO_PARAM_VP8TYPE mParamVp8;
     59 };
     60 
     61 #endif /* OMX_VIDEO_DECODER_VP8_H_ */
     62