summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--include/xine.h.in8
-rw-r--r--src/input/input_dvd.c28
-rw-r--r--src/xine-engine/xine_interface.c8
4 files changed, 42 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e1804913..094e4887e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ xine-lib (1.1)
* new quality deinterlacer from dscaler: TomsMoComp (Tom's Motion Compensated)
* added help for most deinterlace methods
* added --with-external-a52dec and --with-external-libmad switches
+ * new stream infos allows frontends to query current title/chapter/angle on dvds
xine-lib (1.0.2)
* fixed playback of single-session Real RTSP streams, such as
diff --git a/include/xine.h.in b/include/xine.h.in
index 7e197f981..f141560a7 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.h.in,v 1.142 2005/06/17 22:33:01 dsalt Exp $
+ * $Id: xine.h.in,v 1.143 2005/07/03 20:31:28 miguelfreitas Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -896,6 +896,12 @@ const char *xine_get_meta_info (xine_stream_t *stream, int info);
#define XINE_STREAM_INFO_SKIPPED_FRAMES 27 /* for 1000 frames delivered */
#define XINE_STREAM_INFO_DISCARDED_FRAMES 28 /* for 1000 frames delivered */
#define XINE_STREAM_INFO_VIDEO_AFD 29
+#define XINE_STREAM_INFO_DVD_TITLE_NUMBER 30
+#define XINE_STREAM_INFO_DVD_TITLE_COUNT 31
+#define XINE_STREAM_INFO_DVD_CHAPTER_NUMBER 32
+#define XINE_STREAM_INFO_DVD_CHAPTER_COUNT 33
+#define XINE_STREAM_INFO_DVD_ANGLE_NUMBER 34
+#define XINE_STREAM_INFO_DVD_ANGLE_COUNT 35
/* possible values for XINE_STREAM_INFO_VIDEO_AFD */
#define XINE_VIDEO_AFD_NOT_PRESENT -1
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 90456a349..cc6be8a35 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_dvd.c,v 1.199 2005/05/14 16:11:44 miguelfreitas Exp $
+ * $Id: input_dvd.c,v 1.200 2005/07/03 20:31:28 miguelfreitas Exp $
*
*/
@@ -365,6 +365,7 @@ static int update_title_display(dvd_input_plugin_t *this) {
xine_ui_data_t data;
int tt=-1, pr=-1;
size_t ui_str_length=0;
+ int num_tt = 0;
if(!this || !(this->stream))
return 0;
@@ -381,27 +382,52 @@ static int update_title_display(dvd_input_plugin_t *this) {
this->tt = tt;
this->pr = pr;
}
+
+ dvdnav_get_number_of_titles(this->dvdnav, &num_tt );
+
if(tt >= 1) {
int num_angle = 0, cur_angle = 0;
+ int num_part = 0;
/* no menu here */
/* Reflect angle info if appropriate */
+ dvdnav_get_number_of_parts(this->dvdnav, tt, &num_part);
dvdnav_get_angle_info(this->dvdnav, &cur_angle, &num_angle);
if(num_angle > 1) {
snprintf(ui_title, MAX_STR_LEN,
"Title %i, Chapter %i, Angle %i of %i",
tt,pr,cur_angle, num_angle);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_NUMBER,cur_angle);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_COUNT,num_angle);
} else {
snprintf(ui_title, MAX_STR_LEN,
"Title %i, Chapter %i",
tt,pr);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_NUMBER,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_COUNT,0);
}
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_TITLE_NUMBER,tt);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_TITLE_COUNT,num_tt);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_CHAPTER_NUMBER,pr);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_CHAPTER_COUNT,num_part);
} else if (tt == 0 && dvdnav_menu_table[pr]) {
snprintf(ui_title, MAX_STR_LEN,
"DVD %s Menu",
dvdnav_menu_table[pr]);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_TITLE_NUMBER,tt);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_TITLE_COUNT,num_tt);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_CHAPTER_NUMBER,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_CHAPTER_COUNT,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_NUMBER,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_COUNT,0);
} else {
strcpy(ui_title, "DVD Menu");
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_TITLE_NUMBER,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_TITLE_COUNT,num_tt);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_CHAPTER_NUMBER,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_CHAPTER_COUNT,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_NUMBER,0);
+ _x_stream_info_set(this->stream,XINE_STREAM_INFO_DVD_ANGLE_COUNT,0);
}
ui_str_length = strlen(ui_title);
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index 743dbd3ee..70415c3e8 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_interface.c,v 1.89 2005/06/17 22:33:02 dsalt Exp $
+ * $Id: xine_interface.c,v 1.90 2005/07/03 20:31:29 miguelfreitas Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -672,6 +672,12 @@ uint32_t xine_get_stream_info (xine_stream_t *stream, int info) {
case XINE_STREAM_INFO_IGNORE_SPU:
case XINE_STREAM_INFO_VIDEO_HAS_STILL:
case XINE_STREAM_INFO_VIDEO_AFD:
+ case XINE_STREAM_INFO_DVD_TITLE_NUMBER:
+ case XINE_STREAM_INFO_DVD_TITLE_COUNT:
+ case XINE_STREAM_INFO_DVD_CHAPTER_NUMBER:
+ case XINE_STREAM_INFO_DVD_CHAPTER_COUNT:
+ case XINE_STREAM_INFO_DVD_ANGLE_NUMBER:
+ case XINE_STREAM_INFO_DVD_ANGLE_COUNT:
return _x_stream_info_get_public(stream, info);
case XINE_STREAM_INFO_MAX_AUDIO_CHANNEL: