changeset 4868:e79024cb5620

early draft
author arpi
date Tue, 26 Feb 2002 02:33:20 +0000
parents 2729796fb896
children 15af74a11ce9
files DOCS/tech/libmpcodecs.txt
diffstat 1 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOCS/tech/libmpcodecs.txt	Tue Feb 26 02:33:20 2002 +0000
@@ -0,0 +1,34 @@
+# video decoder:
+
+int init(sh_video)  -> loads codec dll, check if available and it accepts header if any
+
+int control(sh_video,cmd,param,...) -> various set/get/query functions
+
+int decode(sh_video,framedrop) -> decode frame, callbacks to config/get_surface
+
+int uninit(sh_video)
+
+# callbacks for video decoder:
+
+mpcodecs_config_vo(sh_video, w, h, preferred_outfmt){
+    // it will be called by codec (either init() or decode()) when it gets
+    // enough info to know image dimensions, colorspaces and buffering type
+    
+    // this func should use control() to get/set parameters for a given outfmt
+    // (like supported buffering types, stride limitations, etc) or to
+    // query and select other colorspace.
+
+}
+
+// possible buffer setups:
+- 1 static overwrite only (partial update type codecs: cvid, fli, vfw etc)
+- 1+ independent temp writeonly (I-only mpegs, jpeg, mjpeg etc)
+- 2+ static read/write (I+P mpegs)
+- 2+ static read/write and 1+ temp writeonly (I+P+B mpegs)
+
+image_t* mpcodecs_get_surface(sh_video, flags){
+// flags:
+//  0x1 - read  (make it readable -> don't put to slow video ram)
+
+}
+