mpeg4vid_api.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. #ifdef __cplusplus
  3. extern "C"
  4. {
  5. #endif
  6. #include <bfc/platform/types.h>
  7. #include "mp4def.h"
  8. typedef void *mpeg4vid_decoder_t;
  9. mpeg4vid_decoder_t MPEG4Video_CreateDecoder(int filetype, int codec);
  10. void MPEG4Video_DestroyDecoder(mpeg4vid_decoder_t decoder);
  11. void MPEG4Video_DecodeFrame(mpeg4vid_decoder_t decoder, const void *buffer, size_t bufferlen, uint64_t time_code);
  12. void MPEG4Video_GetPicture(mpeg4vid_decoder_t decoder, mp4_Frame **frame);
  13. int MPEG4Video_GetOutputFormat(mpeg4vid_decoder_t decoder, int *width, int *height, double *aspect_ratio);
  14. void MPEG4Video_Flush(mpeg4vid_decoder_t decoder);
  15. void MPEG4Video_HurryUp(mpeg4vid_decoder_t decoder, int state);
  16. void MPEG4Video_EndOfStream(mpeg4vid_decoder_t decoder);
  17. void MPEG4Video_ReleaseFrame(mpeg4vid_decoder_t d, mp4_Frame *frame);
  18. #define MPEG4_PROFILE_SIMPLE 0
  19. #define MPEG4_PROFILE_SIMPLE_SCALABLE 1
  20. #define MPEG4_PROFILE_CORE 2
  21. #define MPEG4_PROFILE_MAIN 3
  22. #define MPEG4_PROFILE_NBIT 4
  23. #define MPEG4_PROFILE_SCALABLE_TEXTURE 5
  24. #define MPEG4_PROFILE_SIMPLE_FACE 6
  25. #define MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE 7
  26. #define MPEG4_PROFILE_HYBRID 8
  27. #define MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE 9
  28. #define MPEG4_PROFILE_CORE_SCALABLE 10
  29. #define MPEG4_PROFILE_ADVANCED_CODE_EFFICIENCY 11
  30. #define MPEG4_PROFILE_ADVANCED_CORE 12
  31. #define MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE 13
  32. #define MPEG4_PROFILE_STUDIO 14
  33. #define MPEG4_PROFILE_ADVANCED_SIMPLE 15
  34. #define MPEG4_PROFILE_FGS 16
  35. #define MPEG4_LEVEL_0 0
  36. #define MPEG4_LEVEL_1 1
  37. #define MPEG4_LEVEL_2 2
  38. #define MPEG4_LEVEL_3 3
  39. #define MPEG4_LEVEL_4 4
  40. #define MPEG4_LEVEL_5 5
  41. #define MPEG4_LEVEL_3B 13
  42. #define MPEG4_FILETYPE_RAW 0
  43. #define MPEG4_FILETYPE_MP4 1
  44. #define MPEG4_FILETYPE_AVI 2
  45. #define MPEG4_CODEC_DEFAULT 0
  46. #define MPEG4_CODEC_DIVX5 1
  47. #ifdef __cplusplus
  48. }
  49. #endif