[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56395] trunk/blender: More build fixes for visual studio 2012.

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Apr 29 21:15:56 CEST 2013


Revision: 56395
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56395
Author:   blendix
Date:     2013-04-29 19:15:56 +0000 (Mon, 29 Apr 2013)
Log Message:
-----------
More build fixes for visual studio 2012.

Patch #35019, #35131 and #35152 by Jurgen Herrmann.

Modified Paths:
--------------
    trunk/blender/intern/ffmpeg/ffmpeg_compat.h
    trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
    trunk/blender/source/blender/freestyle/intern/view_map/Functions1D.cpp

Modified: trunk/blender/intern/ffmpeg/ffmpeg_compat.h
===================================================================
--- trunk/blender/intern/ffmpeg/ffmpeg_compat.h	2013-04-29 19:15:53 UTC (rev 56394)
+++ trunk/blender/intern/ffmpeg/ffmpeg_compat.h	2013-04-29 19:15:56 UTC (rev 56395)
@@ -29,6 +29,12 @@
 #endif
 /* end sanity check */
 
+/* visual studio 2012 does not define inline for C */
+#ifdef _MSC_VER
+#define FFMPEG_INLINE static __inline
+#else
+#define FFMPEG_INLINE static inline
+#endif
 
 #include <libavcodec/avcodec.h>
 #include <libavutil/rational.h>
@@ -89,7 +95,7 @@
 #define FFMPEG_SAMPLE_FMT_S16P_SUPPORTED
 #else
 
-static inline
+FFMPEG_INLINE
 int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
 {
 	/* no planar formats in FFmpeg < 0.9 */
@@ -98,7 +104,7 @@
 
 #endif
 
-static inline
+FFMPEG_INLINE
 int av_get_cropped_height_from_codec(AVCodecContext *pCodecCtx)
 {
 	int y = pCodecCtx->height;
@@ -127,7 +133,7 @@
 }
 
 #if ((LIBAVUTIL_VERSION_MAJOR < 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR < 22))
-static inline
+FFMPEG_INLINE
 int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
 {
 	const AVOption *rv = NULL;
@@ -135,7 +141,7 @@
 	return rv != NULL;
 }
 
-static inline
+FFMPEG_INLINE
 int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags)
 {
 	const AVOption *rv = NULL;
@@ -143,7 +149,7 @@
 	return rv != NULL;
 }
 
-static inline
+FFMPEG_INLINE
 int av_opt_set_double(void *obj, const char *name, double val, int search_flags)
 {
 	const AVOption *rv = NULL;
@@ -160,7 +166,7 @@
 #endif
 
 #if ((LIBAVUTIL_VERSION_MAJOR < 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR < 54))
-static inline
+FFMPEG_INLINE
 enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt)
 {
     if (sample_fmt < 0 || sample_fmt >= AV_SAMPLE_FMT_NB)
@@ -174,7 +180,7 @@
 #endif
 
 #if ((LIBAVCODEC_VERSION_MAJOR < 53) || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR < 35))
-static inline
+FFMPEG_INLINE
 int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
 {
 	/* TODO: no options are taking into account */
@@ -183,14 +189,14 @@
 #endif
 
 #if ((LIBAVFORMAT_VERSION_MAJOR < 53) || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVFORMAT_VERSION_MINOR < 21))
-static inline
+FFMPEG_INLINE
 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
 {
 	/* TODO: no codec is taking into account */
 	return av_new_stream(s, 0);
 }
 
-static inline
+FFMPEG_INLINE
 int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
 {
 	/* TODO: no options are taking into account */
@@ -199,7 +205,7 @@
 #endif
 
 #if ((LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR > 32)) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR == 24) && (LIBAVFORMAT_VERSION_MICRO >= 100)))
-static inline
+FFMPEG_INLINE
 void my_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
 {
 	int i;
@@ -213,7 +219,7 @@
 	}
 }
 
-static inline
+FFMPEG_INLINE
 void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
 {
 	my_update_cur_dts(s, ref_st, timestamp);
@@ -221,7 +227,7 @@
 #endif
 
 #if ((LIBAVCODEC_VERSION_MAJOR < 54) || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR < 28))
-static inline
+FFMPEG_INLINE
 void avcodec_free_frame(AVFrame **frame)
 {
 	/* don't need to do anything with old AVFrame
@@ -278,7 +284,7 @@
 #endif
 
 #ifndef FFMPEG_HAVE_DECODE_AUDIO3
-static inline 
+FFMPEG_INLINE 
 int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
 			  int *frame_size_ptr, AVPacket *avpkt)
 {
@@ -289,7 +295,7 @@
 #endif
 
 #ifndef FFMPEG_HAVE_DECODE_VIDEO2
-static inline
+FFMPEG_INLINE
 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
                          int *got_picture_ptr,
                          AVPacket *avpkt)
@@ -299,7 +305,7 @@
 }
 #endif
 
-static inline
+FFMPEG_INLINE
 int64_t av_get_pts_from_frame(AVFormatContext *avctx, AVFrame * picture)
 {
 	int64_t pts = picture->pkt_pts;

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2013-04-29 19:15:53 UTC (rev 56394)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2013-04-29 19:15:56 UTC (rev 56395)
@@ -904,7 +904,7 @@
 	GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized");
 
 	if (hwnd) {
-		GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLong(hwnd, GWL_USERDATA);
+		GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
 		if (window) {
 			switch (msg) {
 				// we need to check if new key layout has AltGr

Modified: trunk/blender/source/blender/freestyle/intern/view_map/Functions1D.cpp
===================================================================
--- trunk/blender/source/blender/freestyle/intern/view_map/Functions1D.cpp	2013-04-29 19:15:53 UTC (rev 56394)
+++ trunk/blender/source/blender/freestyle/intern/view_map/Functions1D.cpp	2013-04-29 19:15:56 UTC (rev 56395)
@@ -220,7 +220,7 @@
 	if (ve) {
 		ViewShape *aShape = ve->aShape();
 		if (aShape == 0) {
-			oShapes.insert(0);
+			oShapes.insert((ViewShape*)0);
 			return;
 		}
 		oShapes.insert(aShape);




More information about the Bf-blender-cvs mailing list