summaryrefslogtreecommitdiffstats
path: root/sub/sd.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-16 20:03:08 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-18 14:58:09 +0200
commite990fb2ffeaa786339895c8f3b3f104ef536bf39 (patch)
tree383aaa216cd5d1f7c4dd75f7c27cfbaadaa7970a /sub/sd.h
parent8636eb77c5f9f1e49a12e3e1653fe4c2e8e0bfc3 (diff)
downloadmpv-e990fb2ffeaa786339895c8f3b3f104ef536bf39.tar.bz2
mpv-e990fb2ffeaa786339895c8f3b3f104ef536bf39.tar.xz
subtitles: add framework for subtitle decoders
Add a framework for subtitle decoder modules that work more like audio/video decoders do, and change libass rendering of demuxed subtitles to use the new framework. The old subtitle code is messy, with details specific to handling particular subtitle types spread over high-level code. This should make it easier to clean things up and fix some bugs/limitations.
Diffstat (limited to 'sub/sd.h')
-rw-r--r--sub/sd.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sub/sd.h b/sub/sd.h
new file mode 100644
index 0000000000..d5aea5c1a6
--- /dev/null
+++ b/sub/sd.h
@@ -0,0 +1,16 @@
+#ifndef MPLAYER_SD_H
+#define MPLAYER_SD_H
+
+struct osd_state;
+struct sh_sub;
+
+struct sd_functions {
+ void (*init)(struct sh_sub *sh, struct osd_state *osd);
+ void (*decode)(struct sh_sub *sh, struct osd_state *osd,
+ void *data, int data_len, double pts, double duration);
+ void (*reset)(struct sh_sub *sh, struct osd_state *osd);
+ void (*switch_off)(struct sh_sub *sh, struct osd_state *osd);
+ void (*uninit)(struct sh_sub *sh);
+};
+
+#endif