Skip to content

Commit 2b61be6

Browse files
committed
Added webm_muxer_set_max_cluster_duration() method to override the default which is 30s
1 parent d9d9eee commit 2b61be6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Sources/CWebM/CWebmMuxer.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ WebMHandle webm_muxer_create(const char *filename) {
4848
}
4949

5050

51+
void webm_muxer_set_max_cluster_duration(WebMHandle handle, unsigned long long duration_ns) {
52+
auto c = WebMMuxerContext::cast(handle);
53+
if (!c)
54+
return;
55+
c->segment->set_max_cluster_duration(duration_ns);
56+
}
57+
58+
5159
void webm_muxer_destroy(WebMHandle handle) {
5260
delete WebMMuxerContext::cast(handle);
5361
}

Sources/CWebM/include/CWebM.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ void webm_parser_reset(WebMHandle handle);
6464
// Muxer methods
6565

6666
WebMHandle webm_muxer_create(const char *filepath);
67+
void webm_muxer_set_max_cluster_duration(WebMHandle handle, unsigned long long duration_ns);
6768
void webm_muxer_destroy(WebMHandle handle);
6869
bool webm_muxer_finalize(WebMHandle handle, double duration);
6970
WebMTrackID webm_muxer_add_audio_track(WebMHandle handle, double sampling_frequency, int channels, const char *codec_id);

0 commit comments

Comments
 (0)