PageRenderTime 25ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Show/avc/pvavcdecoderinterface.h

http://github.com/mbebenita/Broadway
C Header | 48 lines | 22 code | 6 blank | 20 comment | 0 complexity | 364eedcf4d8ec9d79eebff988e57f925 MD5 | raw file
Possible License(s): BSD-3-Clause
  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. typedef void (*FunctionType_Unbind)(void *, int);
  21. typedef int (*FunctionType_Alloc)(void *, int, uint8 **);
  22. typedef int (*FunctionType_SPS)(void *, uint, uint);
  23. typedef int (*FunctionType_Malloc)(void *, int32, int);
  24. typedef void(*FunctionType_Free)(void *, int);
  25. // PVAVCDecoderInterface pure virtual interface class
  26. class PVAVCDecoderInterface
  27. {
  28. public:
  29. virtual ~PVAVCDecoderInterface() {};
  30. virtual bool InitAVCDecoder(FunctionType_SPS, FunctionType_Alloc, FunctionType_Unbind,
  31. FunctionType_Malloc, FunctionType_Free, void *) = 0;
  32. virtual void CleanUpAVCDecoder(void) = 0;
  33. virtual void ResetAVCDecoder(void) = 0;
  34. virtual int32 DecodeSPS(uint8 *bitstream, int32 buffer_size) = 0;
  35. virtual int32 DecodePPS(uint8 *bitstream, int32 buffer_size) = 0;
  36. virtual int32 DecodeAVCSlice(uint8 *bitstream, int32 *buffer_size) = 0;
  37. virtual bool GetDecOutput(int *indx, int *release) = 0;
  38. virtual void GetVideoDimensions(int32 *width, int32 *height, int32 *top, int32 *left, int32 *bottom, int32 *right) = 0;
  39. // virtual int AVC_Malloc(int32 size, int attribute);
  40. // virtual void AVC_Free(int mem);
  41. };
  42. #endif // PVAVCDECODERINTERFACE_H_INCLUDED