changeset 25573:a27aae25dd75

implemented _ANGLE STREAM_CTRLs, patch by oattila chello hu
author nicodvb
date Sat, 05 Jan 2008 14:22:05 +0000
parents f6c0bce13b17
children bef7f820d179
files stream/stream_dvd.c
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvd.c	Sat Jan 05 14:20:47 2008 +0000
+++ b/stream/stream_dvd.c	Sat Jan 05 14:22:05 2008 +0000
@@ -743,6 +743,25 @@
             *((double *)arg) = !d->vts_file->vtsi_mat->vts_video_attr.display_aspect_ratio ? 4.0/3.0 : 16.0/9.0;
             return 1;
         }
+        case STREAM_CTRL_GET_NUM_ANGLES:
+        {
+            *((int *)arg) = d->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
+            return 1;
+        }
+        case STREAM_CTRL_GET_ANGLE:
+        {
+            *((int *)arg) = dvd_angle+1;
+            return 1;
+        }
+        case STREAM_CTRL_SET_ANGLE:
+        {
+            int ang = *((int *)arg);
+            if(ang>d->vmg_file->tt_srpt->title[dvd_title].nr_of_angles || ang<=0)
+                break;
+            dvd_angle = ang - 1;
+            d->angle_seek = 1;
+            return 1;
+        }
     }
     return STREAM_UNSUPPORTED;
 }