void m3u8_builder_init_config( m3u8_config_t* conf, uint32_t max_segment_duration) { conf->m3u8_version = 3; conf->iframes_m3u8_header_len = vod_snprintf( conf->iframes_m3u8_header, sizeof(conf->iframes_m3u8_header) - 1, iframes_m3u8_header_format, vod_div_ceil(max_segment_duration, 1000)) - conf->iframes_m3u8_header; }
void m3u8_builder_init_config( m3u8_config_t* conf, uint32_t max_segment_duration, hls_encryption_type_t encryption_method) { if (encryption_method == HLS_ENC_SAMPLE_AES) { conf->m3u8_version = 5; } else { conf->m3u8_version = 3; } conf->iframes_m3u8_header_len = vod_snprintf( conf->iframes_m3u8_header, sizeof(conf->iframes_m3u8_header) - 1, iframes_m3u8_header_format, vod_div_ceil(max_segment_duration, 1000)) - conf->iframes_m3u8_header; }