Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

42 wiersze
1.8KB

  1. #ifndef mkv_writer_h
  2. #define mkv_writer_h
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #include "mkv-format.h"
  6. #include "mkv-buffer.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. typedef struct mkv_writer_t mkv_writer_t;
  11. /// @param[in] options mkv options, such as: MKV_OPTION_LIVE, see more @mkv-format.h
  12. mkv_writer_t* mkv_writer_create(const struct mkv_buffer_t* buffer, void* param, int options);
  13. void mkv_writer_destroy(mkv_writer_t* mkv);
  14. /// @param[in] codec MPEG-4 systems ObjectTypeIndication such as: mkv_OBJECT_H264, see more @mkv-format.h
  15. /// @param[in] extra_data AudioSpecificConfig/AVCDecoderConfigurationRecord/HEVCDecoderConfigurationRecord
  16. /// @return >=0-track, <0-error
  17. int mkv_writer_add_audio(mkv_writer_t* mkv, enum mkv_codec_t codec, int channel_count, int bits_per_sample, int sample_rate, const void* extra_data, size_t extra_data_size);
  18. int mkv_writer_add_video(mkv_writer_t* mkv, enum mkv_codec_t codec, int width, int height, const void* extra_data, size_t extra_data_size);
  19. int mkv_writer_add_subtitle(mkv_writer_t* mkv, enum mkv_codec_t codec, const void* extra_data, size_t extra_data_size);
  20. /// Write audio/video stream
  21. /// raw AAC data, don't include ADTS/AudioSpecificConfig
  22. /// H.264/H.265 MP4 format, replace start code(0x00000001) with NALU size
  23. /// @param[in] track return by mkv_writer_add_audio/mkv_writer_add_video
  24. /// @param[in] data audio/video frame
  25. /// @param[in] bytes buffer size
  26. /// @param[in] pts timestamp in millisecond
  27. /// @param[in] dts timestamp in millisecond
  28. /// @param[in] flags MKV_FLAGS_XXX, such as: MKV_FLAGS_KEYFREAME, see more @mkv-format.h
  29. /// @return 0-ok, other-error
  30. int mkv_writer_write(mkv_writer_t* mkv, int track, const void* data, size_t bytes, int64_t pts, int64_t dts, int flags);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* mkv_writer_h */