[Mplayer-cvslog] CVS: main/libmpdemux demux_ogg.c,1.13,1.14 demuxer.c,1.112,1.113

Arpi of Ize arpi at mplayerhq.hu
Mon Sep 16 00:38:33 CEST 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv4739

Modified Files:
	demux_ogg.c demuxer.c 
Log Message:
removed dummy OGG functions - use #ifdef instead


Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- demux_ogg.c	14 Sep 2002 23:21:22 -0000	1.13
+++ demux_ogg.c	15 Sep 2002 22:38:30 -0000	1.14
@@ -1,6 +1,7 @@
 
 #include "config.h"
 
+#ifdef HAVE_OGGVORBIS
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -10,28 +11,6 @@
 #include "stream.h"
 #include "demuxer.h"
 #include "stheader.h"
-
-#ifndef HAVE_OGGVORBIS
-/// Some dummy function to use when no Ogg and Vorbis lib are avaible
-int demux_ogg_open(demuxer_t* demuxer) {
-  return 0;
-}
-
-int demux_ogg_fill_buffer(demuxer_t *d) {
-  return 0;
-}
-
-demuxer_t* init_avi_with_ogg(demuxer_t* demuxer) {
-  mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_NoOggVorbis);
-  // disable audio
-  demuxer->audio->id = -2;
-  return demuxer;
-}
-
-void demux_close_ogg(demuxer_t* demuxer) {
-
-}
-#else
 
 #include <ogg/ogg.h>
 #include <vorbis/codec.h>

Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- demuxer.c	13 Sep 2002 18:58:14 -0000	1.112
+++ demuxer.c	15 Sep 2002 22:38:30 -0000	1.113
@@ -202,8 +202,10 @@
 #endif
     case DEMUXER_TYPE_AUDIO:
       demux_close_audio(demuxer); break;
+#ifdef HAVE_OGGVORBIS
     case DEMUXER_TYPE_OGG:
       demux_close_ogg(demuxer); break;
+#endif
 #ifdef STREAMING_LIVE_DOT_COM
     case DEMUXER_TYPE_RTP:
       demux_close_rtp(demuxer); break;
@@ -326,7 +328,9 @@
     case DEMUXER_TYPE_Y4M: return demux_y4m_fill_buffer(demux);
     case DEMUXER_TYPE_AUDIO: return demux_audio_fill_buffer(ds);
     case DEMUXER_TYPE_DEMUXERS: return demux_demuxers_fill_buffer(demux,ds);
+#ifdef HAVE_OGGVORBIS
     case DEMUXER_TYPE_OGG: return demux_ogg_fill_buffer(demux);
+#endif
     case DEMUXER_TYPE_RAWAUDIO: return demux_rawaudio_fill_buffer(demux,ds);
 #ifdef STREAMING_LIVE_DOT_COM
     case DEMUXER_TYPE_RTP: return demux_rtp_fill_buffer(demux, ds);
@@ -752,6 +756,7 @@
       demuxer = NULL;
   }
 }
+#ifdef HAVE_OGGVORBIS
 //=============== Try to open as Ogg file: =================
 if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_OGG){
   demuxer=new_demuxer(stream,DEMUXER_TYPE_OGG,audio_id,video_id,dvdsub_id);
@@ -763,6 +768,7 @@
       demuxer = NULL;
   }
 }
+#endif
 //=============== Try to open as PVA file: =================
 if(file_format == DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_PVA){
 	demuxer=new_demuxer(stream,DEMUXER_TYPE_PVA,audio_id,video_id,dvdsub_id);
@@ -933,6 +939,8 @@
    if(!demuxer) return NULL; // failed to open
    sh_a = (sh_audio_t*)demuxer->audio->sh;
    if(demuxer->audio->id != -2 && sh_a) {
+#ifdef HAVE_OGGVORBIS
+    // support for Ogg-in-AVI:
      if(sh_a->format == 0xFFFE)
        demuxer = init_avi_with_ogg(demuxer);
      else if(sh_a->format == 0x674F) {
@@ -947,6 +955,7 @@
        } else
 	 demuxer = new_demuxers_demuxer(demuxer,od,demuxer);
      }
+#endif
    }       
    return demuxer;
 //  break;
@@ -1119,9 +1128,7 @@
 
 extern void demux_audio_seek(demuxer_t *demuxer,float rel_seek_secs,int flags);
 extern void demux_demuxers_seek(demuxer_t *demuxer,float rel_seek_secs,int flags);
-#ifdef HAVE_OGGVORBIS
 extern void demux_ogg_seek(demuxer_t *demuxer,float rel_seek_secs,int flags);
-#endif
 extern void demux_rawaudio_seek(demuxer_t *demuxer,float rel_seek_secs,int flags);
 
 int demux_seek(demuxer_t *demuxer,float rel_seek_secs,int flags){




More information about the MPlayer-cvslog mailing list