Home | History | Annotate | Download | only in videodecoder
      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 
     18 #ifndef VIDEO_DECODER_INTERFACE_H_
     19 #define VIDEO_DECODER_INTERFACE_H_
     20 
     21 #include "VideoDecoderDefs.h"
     22 
     23 class IVideoDecoder {
     24 public:
     25     virtual ~IVideoDecoder() {}
     26     virtual Decode_Status start(VideoConfigBuffer *buffer) = 0;
     27     virtual Decode_Status reset(VideoConfigBuffer *buffer) = 0;
     28     virtual void stop(void) = 0;
     29     virtual void flush() = 0;
     30     virtual Decode_Status decode(VideoDecodeBuffer *buffer) = 0;
     31     virtual void freeSurfaceBuffers(void) = 0;
     32     virtual const VideoRenderBuffer* getOutput(bool draining = false, VideoErrorBuffer *output_buf = NULL) = 0;
     33     virtual const VideoFormatInfo* getFormatInfo(void) = 0;
     34     virtual Decode_Status signalRenderDone(void * graphichandler, bool isNew = false) = 0;
     35     virtual bool checkBufferAvail() = 0;
     36     virtual Decode_Status getRawDataFromSurface(VideoRenderBuffer *renderBuffer = NULL, uint8_t *pRawData = NULL, uint32_t *pSize = NULL, bool internal = true) = 0;
     37     virtual void enableErrorReport(bool enabled) = 0;
     38     virtual int getOutputQueueLength(void) = 0;
     39 };
     40 
     41 #endif /* VIDEO_DECODER_INTERFACE_H_ */
     42