1e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu/* 2e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* Copyright (c) 2009-2011 Intel Corporation. All rights reserved. 3e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* 4e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* Licensed under the Apache License, Version 2.0 (the "License"); 5e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* you may not use this file except in compliance with the License. 6e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* You may obtain a copy of the License at 7e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* 8e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* http://www.apache.org/licenses/LICENSE-2.0 9e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* 10e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* Unless required by applicable law or agreed to in writing, software 11e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* distributed under the License is distributed on an "AS IS" BASIS, 12e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* See the License for the specific language governing permissions and 14e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu* limitations under the License. 15e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu*/ 16e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 17e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 18e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 19e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu#ifndef OMX_VIDEO_DECODER_MPEG4_H_ 20e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu#define OMX_VIDEO_DECODER_MPEG4_H_ 21e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 22e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 23e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu#include "OMXVideoDecoderBase.h" 24e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 25e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiuclass OMXVideoDecoderMPEG4 : public OMXVideoDecoderBase { 26e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiupublic: 27e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu OMXVideoDecoderMPEG4(); 28e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual ~OMXVideoDecoderMPEG4(); 29e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 30e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiuprotected: 31e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE InitInputPortFormatSpecific(OMX_PARAM_PORTDEFINITIONTYPE *paramPortDefinitionInput); 32e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE ProcessorInit(void); 33e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE ProcessorDeinit(void); 34e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE ProcessorProcess( 35b2257cdcf3ffd7a4a7dedbe4842185689bcf7fb7xiao OMX_BUFFERHEADERTYPE ***pBuffers, 36e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu buffer_retain_t *retains, 37e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu OMX_U32 numberBuffers); 38e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 39e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE PrepareConfigBuffer(VideoConfigBuffer *p); 40e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buffer, buffer_retain_t *retain, VideoDecodeBuffer *p); 41e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 42e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu virtual OMX_ERRORTYPE BuildHandlerList(void); 436c36d9722df768cfe63e015193459d870f3cdaa9Tianmi Chen virtual OMX_ERRORTYPE SetMaxOutputBufferCount(OMX_PARAM_PORTDEFINITIONTYPE *p); 440541f11be2f78b558476772f1f877e140f9d844bywan virtual OMX_COLOR_FORMATTYPE GetOutputColorFormat(int width); 45e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu DECLARE_HANDLER(OMXVideoDecoderMPEG4, ParamVideoMpeg4); 466bc8d027bb46c0638d26b3f755350b84f6325de3wfeng DECLARE_HANDLER(OMXVideoDecoderMPEG4, ParamVideoMpeg4ProfileLevel); 47e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 48e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiuprivate: 49e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu enum { 50e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu // OMX_PARAM_PORTDEFINITIONTYPE 51e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu INPORT_MIN_BUFFER_COUNT = 1, 52e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu INPORT_ACTUAL_BUFFER_COUNT = 5, 53e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu INPORT_BUFFER_SIZE = 1382400, 5403118b9de04779e0aca0da6fe6fe5b0b0704a11cTianmi Chen 558483e61c67457f8dd5c998492dcaf8d9af275452ywan OUTPORT_NATIVE_BUFFER_COUNT = 15, 56e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu }; 57e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 58e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu OMX_VIDEO_PARAM_MPEG4TYPE mParamMpeg4; 59e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu}; 60e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu 61e7ace334fb7c64f7b32aa3746e5a11bcefa60bfbAndy Qiu#endif /* OMX_VIDEO_DECODER_MPEG4_H_ */ 62