Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

42 lignes
1.3KB

  1. #ifndef _flv_writer_h_
  2. #define _flv_writer_h_
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #if defined(__cplusplus)
  6. extern "C" {
  7. #endif
  8. struct flv_vec_t
  9. {
  10. void* ptr;
  11. int len;
  12. };
  13. /// @param[in] param flv_writer_create2 param
  14. /// @param[in] n vec number
  15. /// @return 0-ok, other-error
  16. typedef int (*flv_writer_onwrite)(void* param, const struct flv_vec_t* vec, int n);
  17. void* flv_writer_create(const char* file);
  18. /// @param[in] audio 1-has audio, 0-don't has audio
  19. /// @param[in] video 1-has video, 0-don't has video
  20. void* flv_writer_create2(int audio, int video, flv_writer_onwrite onwrite, void* param);
  21. void flv_writer_destroy(void* flv);
  22. /// Video: FLV VideoTagHeader + AVCVIDEOPACKET: AVCDecoderConfigurationRecord(ISO 14496-15) / One or more NALUs(four-bytes length + NALU)
  23. /// Audio: FLV AudioTagHeader + AACAUDIODATA: AudioSpecificConfig(14496-3) / Raw AAC frame data in UI8
  24. /// @param[in] data FLV Audio/Video Data(don't include FLV Tag Header)
  25. /// @param[in] type 8-audio, 9-video
  26. /// @return 0-ok, other-error
  27. int flv_writer_input(void* flv, int type, const void* data, size_t bytes, uint32_t timestamp);
  28. int flv_writer_input_v(void* flv, int type, const struct flv_vec_t* vec, int num, uint32_t timestamp);
  29. #if defined(__cplusplus)
  30. }
  31. #endif
  32. #endif /* !_flv_writer_h_ */