summaryrefslogtreecommitdiff
path: root/mkvlib/c/exports.go
diff options
context:
space:
mode:
authorb5f0d6c3 <[email protected]>2022-05-06 10:46:55 +0800
committerb5f0d6c3 <[email protected]>2022-05-06 10:46:55 +0800
commit79f40d4f7bedf2554d072f6ded4eb73373dd7319 (patch)
treebef73cc28e3800ec02d3764302eddbc601ff8d8c /mkvlib/c/exports.go
parent8c382de8c87260d68b9c10e2bf687cbd53e3beb8 (diff)
update
Diffstat (limited to 'mkvlib/c/exports.go')
-rw-r--r--mkvlib/c/exports.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/mkvlib/c/exports.go b/mkvlib/c/exports.go
index 1c12825..fc5965d 100644
--- a/mkvlib/c/exports.go
+++ b/mkvlib/c/exports.go
@@ -215,6 +215,32 @@ func GetFontInfo(p *C.char) *C.char {
return cs(string(data))
}
+//export Version
+func Version() *C.char {
+ return cs(mkvlib.Version())
+}
+
+//export CreateBlankOrBurnVideo
+func CreateBlankOrBurnVideo(t int64, s, enc, ass, fontdir, output *C.char) bool {
+ if !checkInstance() {
+ return false
+ }
+ return getter.GetProcessorInstance().CreateBlankOrBurnVideo(t, gs(s), gs(enc), gs(ass), gs(fontdir), gs(output))
+}
+
+//export CreateTestVideo
+func CreateTestVideo(asses, s, fontdir, enc *C.char, burn bool, lcb C.logCallback) bool {
+ if !checkInstance() {
+ return false
+ }
+ obj := make([]string, 0)
+ if json.Unmarshal([]byte(gs(asses)), &obj) == nil {
+ _asses := obj
+ return getter.GetProcessorInstance().CreateTestVideo(_asses, gs(s), gs(fontdir), gs(enc), burn, _lcb(lcb))
+ }
+ return false
+}
+
func cs(gs string) *C.char {
return C.CString(gs)
}