Re: Re: RELEASE TESTING needed for libdvdread

Aurelien Jacobs <[email protected]> Wed, 21 Sep 2005 13:47:33 +0200
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
--Multipart_Wed__21_Sep_2005_13_47_33_+0200_n5raIvpFl5FE5atS
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wed, 21 Sep 2005 07:58:02 +0200
"Gamester17" <[email protected]> wrote:

> On Thu, 20 Sep 2005, 23:35:00 +0100
> Aurelien Jacobs <[email protected]> wrote:
> > On Sun, 18 Sep 2005 16:19:56 +0200
> > Bj|rn Englund <[email protected]> wrote: 
> > 
> >> Hi.
> >> I'm planning to make a new release of libdvdread in about a week.
> >> Help is needed to test that it works on all differents platforms
> >> before the release. 
> >> 
> >> If you have time please test libdvdread from:
> >> http://www.dtek.chalmers.se/~dvd/dist/libdvdread-0.9.4-cvs.tar.gz
> >or > cvs
> > 
> > Nice to see that most of the usable parts of the MPlayer diff was
> > included in cvs :-)
> > Here is a small diff containing the few remaining MPlayer changes
> > which shouldn't be controversial. It would be nice to see this
> > included into next release. 
> > 
> > Aurel
> 
> Just wondering if you will be including latest patches not yet in
> MPlayer?: 
> 
> [PATCH] DVD subpicture/audio stream mapping   Lehel Bernadt
> http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-August/thread.html#36580
> http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-September/thread.html#373
> 52 

Ok, attached the libdvdread part of this one. It's nice and clean, but it may
break code which try to access to the audio_control and subp_control directly.
So I don't know if it has chances to get accepted here ?

> [PATCH] DVD playback   Lehel Bernadt
> http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-August/thread.html#36654

Not related to libdvdread.

> [PATCH] -identify DVD titles   kiriuja
> http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-September/thread.html#372
> 21 

Not related to libdvdread, and has good chances to be committed in mplayer soon.

> [PATCH] libdvdcss upgrade   Diego Biurrun
> http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-September/thread.html#373
> 03 

Will certainly be committed soon.

Aurel
--Multipart_Wed__21_Sep_2005_13_47_33_+0200_n5raIvpFl5FE5atS
Content-Type: text/plain; name=stream-mapping.diff
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=stream-mapping.diff

diff -urN MPlayer-20050806/libmpdvdkit2/ifo_print.c Mplayer-patched/libmpdvdkit2/ifo_print.c
--- MPlayer-20050806/libmpdvdkit2/ifo_print.c	2005-07-01 00:48:26.000000000 +0200
+++ Mplayer-patched/libmpdvdkit2/ifo_print.c	2005-08-25 15:38:24.000000000 +0200
@@ -761,14 +761,14 @@
   ifoPrint_USER_OPS(&pgc->prohibited_ops);
   
     for(i = 0; i < 8; i++) {
-      if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */
+      if(pgc->audio_control[i].present) {
 	printf("Audio stream %i control: %04x\n", 
 	       i, pgc->audio_control[i]);
       }
     }
   
   for(i = 0; i < 32; i++) {
-    if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */
+    if(pgc->subp_control[i].present) {
       printf("Subpicture stream %2i control: %08x\n", 
 	     i, pgc->subp_control[i]);
     }
diff -urN MPlayer-20050806/libmpdvdkit2/ifo_read.c Mplayer-patched/libmpdvdkit2/ifo_read.c
--- MPlayer-20050806/libmpdvdkit2/ifo_read.c	2005-07-01 00:48:26.000000000 +0200
+++ Mplayer-patched/libmpdvdkit2/ifo_read.c	2005-08-25 15:39:12.000000000 +0200
@@ -638,10 +638,6 @@
   B2N_16(pgc->cell_playback_offset);
   B2N_16(pgc->cell_position_offset);
 
-  for(i = 0; i < 8; i++)
-    B2N_16(pgc->audio_control[i]);
-  for(i = 0; i < 32; i++)
-    B2N_32(pgc->subp_control[i]);
   for(i = 0; i < 16; i++)
     B2N_32(pgc->palette[i]);
   
@@ -650,10 +646,10 @@
 
   /* verify time (look at print_time) */
   for(i = 0; i < 8; i++)
-    if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
+    if(!pgc->audio_control[i].present)
       CHECK_ZERO(pgc->audio_control[i]);
   for(i = 0; i < 32; i++)
-    if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
+    if(!pgc->subp_control[i].present)
       CHECK_ZERO(pgc->subp_control[i]);
   
   /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */
diff -urN MPlayer-20050806/libmpdvdkit2/ifo_types.h Mplayer-patched/libmpdvdkit2/ifo_types.h
--- MPlayer-20050806/libmpdvdkit2/ifo_types.h	2005-07-01 00:48:26.000000000 +0200
+++ Mplayer-patched/libmpdvdkit2/ifo_types.h	2005-08-25 19:19:30.000000000 +0200
@@ -398,6 +398,36 @@
 } ATTRIBUTE_PACKED user_ops_t;
 
 /**
+ * Subpicture stream mapping for a subtitle
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+  unsigned int present : 1;
+  unsigned int s_4p3   : 7; /* stream for 4:3 on any display */
+#else
+  unsigned int s_4p3   : 7;
+  unsigned int present : 1;
+#endif
+  uint8_t s_wide; /* stream for 16:9 on widescreen display */
+  uint8_t s_lbox; /* stream for 16:9 on letterboxed 4:3 display */
+  uint8_t s_panscan; /* stream for 16:9 with pan&scan data on 4:3 display */
+} ATTRIBUTE_PACKED subp_mapping_t;
+
+/**
+ * Audio stream mapping for a soundtrack
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+  unsigned int present : 1;
+  unsigned int s_audio : 7;
+#else
+  unsigned int s_audio : 7;
+  unsigned int present : 1;
+#endif
+  uint8_t unknown; /* it seems it's always 0 */
+} ATTRIBUTE_PACKED audio_mapping_t;
+
+/**
  * Program Chain Information.
  */
 typedef struct {
@@ -406,8 +436,8 @@
   uint8_t  nr_of_cells;
   dvd_time_t playback_time;
   user_ops_t prohibited_ops;
-  uint16_t audio_control[8]; /* New type? */
-  uint32_t subp_control[32]; /* New type? */
+  audio_mapping_t audio_control[8];
+  subp_mapping_t subp_control[32];
   uint16_t next_pgc_nr;
   uint16_t prev_pgc_nr;
   uint16_t goup_pgc_nr;

--Multipart_Wed__21_Sep_2005_13_47_33_+0200_n5raIvpFl5FE5atS--