You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
756B

  1. #ifndef _flv_reader_h_
  2. #define _flv_reader_h_
  3. #include <stdint.h>
  4. #include <stddef.h>
  5. #if defined(__cplusplus)
  6. extern "C" {
  7. #endif
  8. void* flv_reader_create(const char* file);
  9. void* flv_reader_create2(int(*read)(void* param, void* buf, int len), void* param);
  10. void flv_reader_destroy(void* flv);
  11. ///@param[out] tagtype 8-audio, 9-video, 18-script data
  12. ///@param[out] timestamp FLV timestamp
  13. ///@param[out] taglen flv tag length(0 is ok but should be silently discard)
  14. ///@param[out] buffer FLV stream
  15. ///@param[in] bytes buffer size
  16. ///@return 1-got a packet, 0-EOF, other-error
  17. int flv_reader_read(void* flv, int* tagtype, uint32_t* timestamp, size_t* taglen, void* buffer, size_t bytes);
  18. #if defined(__cplusplus)
  19. }
  20. #endif
  21. #endif /* !_flv_reader_h_ */