1
0

dec_api.h 866 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <bfc/platform/types.h>
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include "ldecod/inc/mbuffer.h"
  7. #include "lcommon/inc/frame.h"
  8. typedef void *h264_decoder_t;
  9. int H264_Init(); // initializes the library. currently just does a CPU feature check (sse2, etc)
  10. h264_decoder_t H264_CreateDecoder();
  11. void H264_DestroyDecoder(h264_decoder_t decoder);
  12. void H264_DecodeFrame(h264_decoder_t decoder, const void *buffer, size_t bufferlen, uint64_t time_code);
  13. void H264_GetPicture(h264_decoder_t decoder, StorablePicture **pic);
  14. void H264_FreePicture(h264_decoder_t decoder, StorablePicture *pic);
  15. void H264_Flush(h264_decoder_t decoder);
  16. void H264_EndOfStream(h264_decoder_t decoder);
  17. void H264_HurryUp(h264_decoder_t decoder, int state);
  18. const FrameFormat *H264_GetOutputFormat(h264_decoder_t decoder, double *aspect_ratio);
  19. #ifdef __cplusplus
  20. }
  21. #endif