changeset 3180:d53f70e3c794

spudec_new has a dvd_priv_t as an argument, which is defined in libmpdemux/stream.h only if USE_DVDREAD is defined. (Arpi)
author pl
date Wed, 28 Nov 2001 12:44:39 +0000
parents 6fc8473dc374
children c8edb0691f09
files libvo/sub.c mplayer.c spudec.c spudec.h
diffstat 4 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/sub.c	Wed Nov 28 12:34:10 2001 +0000
+++ b/libvo/sub.c	Wed Nov 28 12:44:39 2001 +0000
@@ -273,10 +273,11 @@
 }
 
 void *vo_spudec=NULL;
-
+#ifdef USE_DVDREAD
 inline static void vo_draw_spudec(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
     spudec_draw(vo_spudec, draw_alpha);
 }
+#endif
 
 static int draw_alpha_init_flag=0;
 
@@ -302,10 +303,11 @@
     if(vo_osd_progbar_type>=0 && vo_font->font[OSD_PB_0]>=0){
         vo_draw_text_progbar(dxs,dys,draw_alpha);
     }
-
+#ifdef USE_DVDREAD
     if(vo_spudec){
 	vo_draw_spudec(dxs,dys,draw_alpha);
     }
+#endif
 
 }
          
--- a/mplayer.c	Wed Nov 28 12:34:10 2001 +0000
+++ b/mplayer.c	Wed Nov 28 12:44:39 2001 +0000
@@ -53,7 +53,9 @@
 #include "codec-cfg.h"
 
 #include "dvdauth.h"
+#ifdef USE_DVDREAD
 #include "spudec.h"
+#endif
 
 #include "linux/getch2.h"
 #include "linux/keycodes.h"
@@ -256,11 +258,13 @@
 
 void uninit_player(unsigned int mask){
   mask=inited_flags&mask;
+#ifdef USE_DVDREAD
   if (mask&INITED_SPUDEC){
     inited_flags&=~INITED_SPUDEC;
     current_module="uninit_spudec";
     spudec_free(vo_spudec);
   }
+#endif
   if(mask&INITED_VO){
     inited_flags&=~INITED_VO;
     current_module="uninit_vo";
@@ -779,10 +783,12 @@
   inited_flags|=INITED_STREAM;
   stream->start_pos+=seek_to_byte;
 
+#ifdef USE_DVDREAD
   current_module="spudec";
   vo_spudec=spudec_new(stream->priv);
   if (vo_spudec!=NULL)
     inited_flags|=INITED_SPUDEC;
+#endif
   current_module=NULL;
 
   if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024);
@@ -2039,6 +2045,8 @@
   }
 #endif
   
+
+#ifdef USE_DVDREAD
   // DVD sub:
   if(vo_spudec){
     unsigned char* packet=NULL;
@@ -2056,6 +2064,7 @@
     }
     current_module=NULL;
   }
+#endif
   
 } // while(!eof)
 
--- a/spudec.c	Wed Nov 28 12:34:10 2001 +0000
+++ b/spudec.c	Wed Nov 28 12:44:39 2001 +0000
@@ -11,6 +11,8 @@
 
  */
 
+#ifdef USE_DVDREAD
+
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -318,3 +320,6 @@
     free(spu);
   }
 }
+
+#endif /* USE_DVDREAD */
+
--- a/spudec.h	Wed Nov 28 12:34:10 2001 +0000
+++ b/spudec.h	Wed Nov 28 12:44:39 2001 +0000
@@ -1,3 +1,4 @@
+#ifdef USE_DVDREAD
 #ifndef _MPLAYER_SPUDEC_H
 #define _MPLAYER_SPUDEC_H
 
@@ -10,3 +11,4 @@
 void spudec_free(void *this);
 
 #endif
+#endif