? ffmpeg_win32.patch
Index: avcodec.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/ffmpegcolorspace/avcodec.h,v
retrieving revision 1.10
diff -u -r1.10 avcodec.h
--- avcodec.h	15 Sep 2005 15:43:28 -0000	1.10
+++ avcodec.h	5 Nov 2005 15:55:00 -0000
@@ -11,7 +11,12 @@
 extern "C" {
 #endif
 
-#include "_stdint.h"
+#ifndef WIN32
+	#include "_stdint.h"
+#else
+	#include <stdint.h>
+#endif
+
 
 #include <sys/types.h> /* size_t */
 
Index: gstffmpegcodecmap.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/ffmpegcolorspace/gstffmpegcodecmap.c,v
retrieving revision 1.20
diff -u -r1.20 gstffmpegcodecmap.c
--- gstffmpegcodecmap.c	31 Oct 2005 11:43:01 -0000	1.20
+++ gstffmpegcodecmap.c	5 Nov 2005 15:56:32 -0000
@@ -67,43 +67,6 @@
   }
 }
 
-/* this macro makes a caps width fixed or unfixed width/height
- * properties depending on whether we've got a context.
- *
- * See below for why we use this.
- *
- * We should actually do this stuff at the end, like in riff-media.c,
- * but I'm too lazy today. Maybe later.
- */
-
-#define GST_FF_VID_CAPS_NEW(mimetype, ...)			\
-    (context != NULL) ?						\
-    gst_caps_new_simple (mimetype,			      	\
-	"width",     G_TYPE_INT,   context->width,	      	\
-	"height",    G_TYPE_INT,   context->height,	  	\
-	"framerate", G_TYPE_DOUBLE, 1. * context->frame_rate /  \
-				   context->frame_rate_base,    \
-	__VA_ARGS__, NULL)  					\
-    :	  							\
-    gst_caps_new_simple (mimetype,			      	\
-	"width",     GST_TYPE_INT_RANGE, 1, G_MAXINT,      	\
-	"height",    GST_TYPE_INT_RANGE, 1, G_MAXINT,	      	\
-	"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE,	\
-	__VA_ARGS__, NULL)
-
-/* same for audio - now with channels/sample rate
- */
-
-#define GST_FF_AUD_CAPS_NEW(mimetype, ...)			\
-    (context != NULL) ?					      	\
-    gst_caps_new_simple (mimetype,	      			\
-	"rate", G_TYPE_INT, context->sample_rate,		\
-	"channels", G_TYPE_INT, context->channels,		\
-	__VA_ARGS__, NULL)					\
-    :								\
-    gst_caps_new_simple (mimetype,	      			\
-	__VA_ARGS__, NULL)
-
 /* Convert a FFMPEG Pixel Format and optional AVCodecContext
  * to a GstCaps. If the context is ommitted, no fixed values
  * for video/audio size will be included in the GstCaps
@@ -245,34 +208,94 @@
 
   if (bpp != 0) {
     if (a_mask != 0) {
-      caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
-          "bpp", G_TYPE_INT, bpp,
-          "depth", G_TYPE_INT, depth,
-          "red_mask", G_TYPE_INT, r_mask,
-          "green_mask", G_TYPE_INT, g_mask,
-          "blue_mask", G_TYPE_INT, b_mask,
-          "alpha_mask", G_TYPE_INT, a_mask,
-          "endianness", G_TYPE_INT, endianness, NULL);
+		if(context) {
+			caps = gst_caps_new_simple ("video/x-raw-rgb",
+				"width",     G_TYPE_INT,   context->width,
+				"height",    G_TYPE_INT,   context->height,
+				"framerate", G_TYPE_DOUBLE, 1. * context->frame_rate / context->frame_rate_base,
+				"bpp", G_TYPE_INT, bpp,
+				"depth", G_TYPE_INT, depth,
+				"red_mask", G_TYPE_INT, r_mask,
+				"green_mask", G_TYPE_INT, g_mask,
+				"blue_mask", G_TYPE_INT, b_mask,
+				"alpha_mask", G_TYPE_INT, a_mask,
+				"endianness", G_TYPE_INT, endianness, NULL);
+		}
+		else {
+			caps = gst_caps_new_simple ("video/x-raw-rgb",
+				"width",     GST_TYPE_INT_RANGE, 16, 4096,
+				"height",    GST_TYPE_INT_RANGE, 16, 4096,
+				"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE,
+				"bpp", G_TYPE_INT, bpp,
+				"depth", G_TYPE_INT, depth,
+				"red_mask", G_TYPE_INT, r_mask,
+				"green_mask", G_TYPE_INT, g_mask,
+				"blue_mask", G_TYPE_INT, b_mask,
+				"alpha_mask", G_TYPE_INT, a_mask,
+				"endianness", G_TYPE_INT, endianness, NULL);
+		}
     } else if (r_mask != 0) {
-      caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
-          "bpp", G_TYPE_INT, bpp,
-          "depth", G_TYPE_INT, depth,
-          "red_mask", G_TYPE_INT, r_mask,
-          "green_mask", G_TYPE_INT, g_mask,
-          "blue_mask", G_TYPE_INT, b_mask,
-          "endianness", G_TYPE_INT, endianness, NULL);
+	  if(context) {
+  			caps = gst_caps_new_simple ("video/x-raw-rgb",
+				"width",     G_TYPE_INT,   context->width,
+				"height",    G_TYPE_INT,   context->height,
+				"framerate", G_TYPE_DOUBLE, 1. * context->frame_rate / context->frame_rate_base,
+				"bpp", G_TYPE_INT, bpp,
+				"depth", G_TYPE_INT, depth,
+				"red_mask", G_TYPE_INT, r_mask,
+				"green_mask", G_TYPE_INT, g_mask,
+				"blue_mask", G_TYPE_INT, b_mask,
+				"endianness", G_TYPE_INT, endianness, NULL);
+	  }
+	  else {
+			caps = gst_caps_new_simple ("video/x-raw-rgb",
+				"width",     GST_TYPE_INT_RANGE, 16, 4096,
+				"height",    GST_TYPE_INT_RANGE, 16, 4096,
+				"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE,
+				"bpp", G_TYPE_INT, bpp,
+				"depth", G_TYPE_INT, depth,
+				"red_mask", G_TYPE_INT, r_mask,
+				"green_mask", G_TYPE_INT, g_mask,
+				"blue_mask", G_TYPE_INT, b_mask,
+				"endianness", G_TYPE_INT, endianness, NULL);
+	  }
     } else {
-      caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
-          "bpp", G_TYPE_INT, bpp,
-          "depth", G_TYPE_INT, depth,
-          "endianness", G_TYPE_INT, endianness, NULL);
-      if (context) {
-        gst_ffmpeg_set_palette (caps, context);
-      }
+	  if(context) {
+  			caps = gst_caps_new_simple ("video/x-raw-rgb",
+				"width",     G_TYPE_INT,   context->width,
+				"height",    G_TYPE_INT,   context->height,
+				"framerate", G_TYPE_DOUBLE, 1. * context->frame_rate / context->frame_rate_base,
+				"bpp", G_TYPE_INT, bpp,
+				"depth", G_TYPE_INT, depth,
+				"endianness", G_TYPE_INT, endianness, NULL);
+
+			gst_ffmpeg_set_palette (caps, context);
+	  }
+	  else {
+			caps = gst_caps_new_simple ("video/x-raw-rgb",
+				"width",     GST_TYPE_INT_RANGE, 16, 4096,
+				"height",    GST_TYPE_INT_RANGE, 16, 4096,
+				"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE,
+				"bpp", G_TYPE_INT, bpp,
+				"depth", G_TYPE_INT, depth,
+				"endianness", G_TYPE_INT, endianness, NULL);
+	  }
     }
   } else if (fmt) {
-    caps = GST_FF_VID_CAPS_NEW ("video/x-raw-yuv",
-        "format", GST_TYPE_FOURCC, fmt, NULL);
+	if(context) {
+  		caps = gst_caps_new_simple ("video/x-raw-yuv",
+			"width",     G_TYPE_INT,   context->width,
+			"height",    G_TYPE_INT,   context->height,
+			"framerate", G_TYPE_DOUBLE, 1. * context->frame_rate / context->frame_rate_base,
+			"format", GST_TYPE_FOURCC, fmt, NULL);
+	}
+	else {
+		caps = gst_caps_new_simple ("video/x-raw-yuv",
+			"width",     GST_TYPE_INT_RANGE, 16, 4096,
+			"height",    GST_TYPE_INT_RANGE, 16, 4096,
+			"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE,
+			"format", GST_TYPE_FOURCC, fmt, NULL);
+	}
   }
 
   if (caps != NULL) {
@@ -315,10 +338,19 @@
   }
 
   if (bpp) {
-    caps = GST_FF_AUD_CAPS_NEW ("audio/x-raw-int",
-        "signed", G_TYPE_BOOLEAN, signedness,
-        "endianness", G_TYPE_INT, G_BYTE_ORDER,
-        "width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
+	if(context)
+		caps = gst_caps_new_simple ("audio/x-raw-int",
+			"rate", G_TYPE_INT, context->sample_rate,
+			"channels", G_TYPE_INT, context->channels,
+			"signed", G_TYPE_BOOLEAN, signedness,
+			"endianness", G_TYPE_INT, G_BYTE_ORDER,
+			"width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
+
+	else
+		caps = gst_caps_new_simple ("audio/x-raw-int",
+			"signed", G_TYPE_BOOLEAN, signedness,
+			"endianness", G_TYPE_INT, G_BYTE_ORDER,
+			"width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
   }
 
   if (caps != NULL) {
Index: gstffmpegcodecmap.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/ffmpegcolorspace/gstffmpegcodecmap.h,v
retrieving revision 1.3
diff -u -r1.3 gstffmpegcodecmap.h
--- gstffmpegcodecmap.h	31 Oct 2004 14:33:18 -0000	1.3
+++ gstffmpegcodecmap.h	25 Oct 2005 11:05:16 -0000
@@ -20,7 +20,7 @@
 #ifndef __GST_FFMPEG_CODECMAP_H__
 #define __GST_FFMPEG_CODECMAP_H__
 
-#include <avcodec.h>
+#include "avcodec.h"
 #include <gst/gst.h>
 
 /*
