summaryrefslogtreecommitdiff
path: root/mkvlib/c
diff options
context:
space:
mode:
authorb5f0d6c3 <[email protected]>2022-04-26 18:35:43 +0800
committerb5f0d6c3 <[email protected]>2022-04-26 18:35:43 +0800
commit90672d8e982811ec7ca3eac2b7a96a2eb6d816f5 (patch)
tree7ae738ff79c5b877a1271ff71a5ca4765560bea3 /mkvlib/c
parent2dd0bdd567230fc5b3a41ec17554d8e7ca2ed1e3 (diff)
update mkvlib:add mks output support.
Diffstat (limited to 'mkvlib/c')
-rw-r--r--mkvlib/c/exports.go8
-rw-r--r--mkvlib/c/sdk.cs10
-rw-r--r--mkvlib/c/sdk.py9
3 files changed, 24 insertions, 3 deletions
diff --git a/mkvlib/c/exports.go b/mkvlib/c/exports.go
index 2729ff5..80f1c16 100644
--- a/mkvlib/c/exports.go
+++ b/mkvlib/c/exports.go
@@ -167,6 +167,14 @@ func Cache(p *C.char) {
getter.GetProcessorInstance().Cache(gs(p))
}
+//export MKS
+func MKS() {
+ if !checkInstance() {
+ return
+ }
+ getter.GetProcessorInstance().MKS()
+}
+
func cs(gs string) *C.char {
return C.CString(gs)
}
diff --git a/mkvlib/c/sdk.cs b/mkvlib/c/sdk.cs
index 4699b1d..a565e55 100644
--- a/mkvlib/c/sdk.cs
+++ b/mkvlib/c/sdk.cs
@@ -38,7 +38,7 @@ public static class mkvlib
static extern bool MakeMKVs(IntPtr dir, IntPtr data, IntPtr output, IntPtr slang, IntPtr stitle, logCallback lcb);
[DllImport("mkvlib.so")]
- static extern bool A2P(bool a2p, bool apc, int pr, int pf);
+ static extern void A2P(bool a2p, bool apc, int pr, int pf);
[DllImport("mkvlib.so")]
static extern IntPtr GetFontsList(IntPtr dir, logCallback lcb);
@@ -47,6 +47,9 @@ public static class mkvlib
static extern void Cache(IntPtr p);
[DllImport("mkvlib.so")]
+ static extern void MKS();
+
+ [DllImport("mkvlib.so")]
static extern IntPtr CreateFontsCache(IntPtr dir, IntPtr output, logCallback lcb);
[DllImport("mkvlib.so")]
@@ -129,6 +132,11 @@ public static class mkvlib
Cache(cs(p));
}
+ public static void MKS()
+ {
+ MKS();
+ }
+
public static string[] CreateFontsCache(string dir, string output, Action<string> lcb)
{
string result = css(CreateFontsCache(cs(dir), cs(output), _lcb(lcb)));
diff --git a/mkvlib/c/sdk.py b/mkvlib/c/sdk.py
index 5a67caf..f2c693b 100644
--- a/mkvlib/c/sdk.py
+++ b/mkvlib/c/sdk.py
@@ -70,7 +70,7 @@ def makeMKVs(dir, data, output, slang, stitle, lcb):
def a2p(en, apc, pr, pf):
call = lib.A2P
- return call(en, apc, pr, pf)
+ call(en, apc, pr, pf)
def getFontsList(dir, lcb):
@@ -81,7 +81,7 @@ def getFontsList(dir, lcb):
def cache(p):
call = lib.Cache
- return call(p.encode())
+ call(p.encode())
def createFontsCache(dir, output, lcb):
@@ -93,3 +93,8 @@ def createFontsCache(dir, output, lcb):
def copyFontsFromCache(subs, dist, lcb):
call = lib.CopyFontsFromCache
return call(subs.encode(), dist.encode(), lcb)
+
+
+def mks():
+ call = lib.MKS
+ call()