changeset 25574:bef7f820d179

implemented _ANGLE STREAM_CTRLs, patch by oattila chello hu
author nicodvb
date Sat, 05 Jan 2008 14:22:48 +0000
parents a27aae25dd75
children f94eee219ee0
files stream/stream_dvdnav.c
diffstat 1 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvdnav.c	Sat Jan 05 14:22:05 2008 +0000
+++ b/stream/stream_dvdnav.c	Sat Jan 05 14:22:48 2008 +0000
@@ -351,6 +351,33 @@
         return 1;
       break;
     }
+    case STREAM_CTRL_GET_NUM_ANGLES:
+    {
+        uint32_t curr, angles;
+        if(dvdnav_get_angle_info(priv->dvdnav, &curr, &angles) != DVDNAV_STATUS_OK)
+          break;
+        *((int *)arg) = angles;
+        return 1;
+    }
+    case STREAM_CTRL_GET_ANGLE:
+    {
+        uint32_t curr, angles;
+        if(dvdnav_get_angle_info(priv->dvdnav, &curr, &angles) != DVDNAV_STATUS_OK)
+          break;
+        *((int *)arg) = curr;
+        return 1;
+    }
+    case STREAM_CTRL_SET_ANGLE:
+    {
+        uint32_t curr, angles;
+        int new_angle = *((int *)arg);
+        if(dvdnav_get_angle_info(priv->dvdnav, &curr, &angles) != DVDNAV_STATUS_OK)
+          break;
+        if(new_angle>angles || new_angle<1)
+            break;
+        if(dvdnav_angle_change(priv->dvdnav, new_angle) != DVDNAV_STATUS_OK)
+        return 1;
+    }
   }
 
   return STREAM_UNSUPPORTED;