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.

32 lines
1.2KB

  1. #ifndef _dash_mpd_h_
  2. #define _dash_mpd_h_
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. typedef struct dash_mpd_t dash_mpd_t;
  9. typedef int (*dash_mpd_segment)(void* param, int adapation, const void* data, size_t bytes, int64_t pts, int64_t dts, int64_t duration, const char* name);
  10. dash_mpd_t* dash_mpd_create(int flags, dash_mpd_segment handler, void* param);
  11. void dash_mpd_destroy(dash_mpd_t* mpd);
  12. /// @param[in] prefix dash adapation set name prefix
  13. /// @return >=0-adapation id, <0-error
  14. int dash_mpd_add_video_adaptation_set(dash_mpd_t* mpd, const char* prefix, uint8_t object, int width, int height, const void* extra_data, size_t extra_data_size);
  15. int dash_mpd_add_audio_adaptation_set(dash_mpd_t* mpd, const char* prefix, uint8_t object, int channel_count, int bits_per_sample, int sample_rate, const void* extra_data, size_t extra_data_size);
  16. /// @param[in] adapation create by dash_mpd_add_video_adapation_set/dash_mpd_add_audio_adapation_set
  17. int dash_mpd_input(dash_mpd_t* mpd, int adapation, const void* data, size_t bytes, int64_t pts, int64_t dts, int flags);
  18. size_t dash_mpd_playlist(dash_mpd_t* mpd, char* playlist, size_t bytes);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif /* !_dash_mpd_h_ */