PageRenderTime 203ms CodeModel.GetById 80ms app.highlight 4ms RepoModel.GetById 117ms app.codeStats 0ms

/Avc/pvavcdecoderinterface.h

http://github.com/mbebenita/Broadway
C Header | 48 lines | 22 code | 6 blank | 20 comment | 0 complexity | 364eedcf4d8ec9d79eebff988e57f925 MD5 | raw file
 1/* ------------------------------------------------------------------
 2 * Copyright (C) 1998-2009 PacketVideo
 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
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18#ifndef PVAVCDECODERINTERFACE_H_INCLUDED
19#define PVAVCDECODERINTERFACE_H_INCLUDED
20
21typedef void (*FunctionType_Unbind)(void *, int);
22typedef int (*FunctionType_Alloc)(void *, int, uint8 **);
23typedef int (*FunctionType_SPS)(void *, uint, uint);
24typedef int (*FunctionType_Malloc)(void *, int32, int);
25typedef void(*FunctionType_Free)(void *, int);
26
27
28// PVAVCDecoderInterface pure virtual interface class
29class PVAVCDecoderInterface
30{
31    public:
32        virtual ~PVAVCDecoderInterface() {};
33        virtual bool    InitAVCDecoder(FunctionType_SPS, FunctionType_Alloc, FunctionType_Unbind,
34                                       FunctionType_Malloc, FunctionType_Free, void *) = 0;
35        virtual void    CleanUpAVCDecoder(void) = 0;
36        virtual void    ResetAVCDecoder(void) = 0;
37        virtual int32   DecodeSPS(uint8 *bitstream, int32 buffer_size) = 0;
38        virtual int32   DecodePPS(uint8 *bitstream, int32 buffer_size) = 0;
39        virtual int32   DecodeAVCSlice(uint8 *bitstream, int32 *buffer_size) = 0;
40        virtual bool    GetDecOutput(int *indx, int *release) = 0;
41        virtual void    GetVideoDimensions(int32 *width, int32 *height, int32 *top, int32 *left, int32 *bottom, int32 *right) = 0;
42//  virtual int     AVC_Malloc(int32 size, int attribute);
43//  virtual void    AVC_Free(int mem);
44};
45
46#endif // PVAVCDECODERINTERFACE_H_INCLUDED
47
48