I have attached a proposal of API changes for IDirectFBVideoProvider that implements some missing feataures keeping the maximum compatibility with the current interface.

The patch adds two methods:
- SetSpeed() can be used to change playback speed, it takes a speed
  multiplier as argument (> 0.0, 1.0 for normal speed, 0.0 for pause);
  calling Play() resets the speed multiplier to 1.0; if playback was
  stopped/paused using Stop(), SetSpeed() doesn't take effect.
- GetRatio() can be used to query the video aspect ratio.

To notify end of playback, GetPos() returns DFB_EOF (new errorcode).

--
Regards,
     Claudio Ciccani

[EMAIL PROTECTED]
http://directfb.org
http://sf.net/projects/php-directfb
--- DirectFB/include/directfb.h	2005-02-28 11:17:01.000000000 +0100
+++ /home/klan/src/DirectFB/include/directfb.h	2005-03-12 18:21:54.000000000 +0100
@@ -193,7 +193,8 @@
      DFB_NOSUCHINSTANCE, /* Requested instance is not known to remote site. */
      DFB_ITEMNOTFOUND,   /* No such item found. */
      DFB_VERSIONMISMATCH,/* Some versions didn't match. */
-     DFB_NOSHAREDMEMORY  /* There's not enough shared memory. */
+     DFB_NOSHAREDMEMORY, /* There's not enough shared memory. */
+     DFB_EOF             /* End of file/stream reached. */
 } DFBResult;
 
 /*
@@ -4671,6 +4672,14 @@
      );
 
      /*
+      * Set the speed multiplier (1.0 for normal speed).
+      */
+     DFBResult (*SetSpeed) (
+          IDirectFBVideoProvider   *thiz,
+          double                    multiplier
+     );
+
+     /*
       * Gets current position within the stream.
       */
      DFBResult (*GetPos) (
@@ -4686,6 +4695,14 @@
           double                   *ret_seconds
      );
 
+     /*
+      * Gets the video aspect ratio.
+      */
+     DFBResult (*GetRatio) (
+          IDirectFBVideoProvider   *thiz,
+          double                   *ret_ratio
+     );
+
    /** Color Adjustment **/
 
      /*
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to