Revision: 37755
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37755
Author:   campbellbarton
Date:     2011-06-23 16:10:48 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
allow building with ffmpeg but not aud

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt        2011-06-23 16:08:16 UTC (rev 37754)
+++ trunk/blender/CMakeLists.txt        2011-06-23 16:10:48 UTC (rev 37755)
@@ -203,7 +203,7 @@
        message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
 endif()
 
-if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK OR 
WITH_CODEC_FFMPEG))
+if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
        message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG 
require WITH_AUDASPACE")
 endif()
 

Modified: trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c        
2011-06-23 16:08:16 UTC (rev 37754)
+++ trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c        
2011-06-23 16:10:48 UTC (rev 37755)
@@ -91,7 +91,9 @@
 static int audio_outbuf_size = 0;
 static double audio_time = 0.0f;
 
+#ifdef WITH_AUDASPACE
 static AUD_Device* audio_mixdown_device = 0;
+#endif
 
 #define FFMPEG_AUTOSPLIT_SIZE 2000000000
 
@@ -105,6 +107,7 @@
        }
 }
 
+#ifdef WITH_AUDASPACE
 static int write_audio_frame(void) 
 {
        AVCodecContext* c = NULL;
@@ -147,6 +150,7 @@
        }
        return 0;
 }
+#endif // #ifdef WITH_AUDASPACE
 
 /* Allocate a temporary frame */
 static AVFrame* alloc_picture(int pix_fmt, int width, int height) 
@@ -853,7 +857,7 @@
        ffmpeg_autosplit_count = 0;
 
        success = start_ffmpeg_impl(rd, rectx, recty, reports);
-
+#ifdef WITH_AUDASPACE
        if(audio_stream)
        {
                AVCodecContext* c = audio_stream->codec;
@@ -863,12 +867,13 @@
                specs.rate = rd->ffcodecdata.audio_mixrate;
                audio_mixdown_device = sound_mixdown(scene, specs, rd->sfra, 
rd->ffcodecdata.audio_volume);
        }
-
+#endif
        return success;
 }
 
 void end_ffmpeg(void);
 
+#ifdef WITH_AUDASPACE
 static void write_audio_frames(double to_pts)
 {
        int finished = 0;
@@ -880,6 +885,7 @@
                }
        }
 }
+#endif
 
 int append_ffmpeg(RenderData *rd, int frame, int *pixels, int rectx, int 
recty, ReportList *reports) 
 {
@@ -907,8 +913,9 @@
                }
        }
 
+#ifdef WITH_AUDASPACE
        write_audio_frames((frame - rd->sfra) / (((double)rd->frs_sec) / 
rd->frs_sec_base));
-
+#endif
        return success;
 }
 
@@ -922,12 +929,14 @@
                write_audio_frames();
        }*/
 
+#ifdef WITH_AUDASPACE
        if(audio_mixdown_device)
        {
                AUD_closeReadDevice(audio_mixdown_device);
                audio_mixdown_device = 0;
        }
-       
+#endif
+
        if (video_stream && video_stream->codec) {
                fprintf(stderr, "Flushing delayed frames...\n");
                flush_ffmpeg ();                

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to