From 69f68fa9f693c626a27d791f0efdc8913b914de9 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Mon, 24 Oct 2005 13:36:40 +0000 Subject: [PATCH] And here comes my change on caps for framerate and geometry range. Original commit message from CVS: 2005-10-24 Julien MOUTTE * gst-libs/gst/video/video.h: * gst/ffmpegcolorspace/gstffmpegcodecmap.c: * sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support): And here comes my change on caps for framerate and geometry range. We are now accepting 1 to MAXINT for width and height, and from 0.0 to MAXDOUBLE for framerate. That allows duration less png frames to be blended correctly in videomixer. --- ChangeLog | 11 +++++++++++ gst-libs/gst/video/video.h | 4 ++-- gst/ffmpegcolorspace/gstffmpegcodecmap.c | 6 +++--- sys/ximage/ximagesink.c | 4 ++-- sys/xvimage/xvimagesink.c | 8 ++++---- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86ed047..b0533c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-10-24 Julien MOUTTE + + * gst-libs/gst/video/video.h: + * gst/ffmpegcolorspace/gstffmpegcodecmap.c: + * sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support): And + here comes my change on caps for framerate and geometry range. + We are now accepting 1 to MAXINT for width and height, and from + 0.0 to MAXDOUBLE for framerate. That allows duration less png frames + to be blended correctly in videomixer. + 2005-10-24 Thomas Vander Stichele * configure.ac: diff --git a/gst-libs/gst/video/video.h b/gst-libs/gst/video/video.h index 97a2aac..60efe3e 100644 --- a/gst-libs/gst/video/video.h +++ b/gst-libs/gst/video/video.h @@ -59,8 +59,8 @@ G_BEGIN_DECLS #define GST_VIDEO_GREEN_MASK_15_INT 0x03e0 #define GST_VIDEO_BLUE_MASK_15_INT 0x001f -#define GST_VIDEO_SIZE_RANGE "(int) [ 16, 4096 ]" -#define GST_VIDEO_FPS_RANGE "(double) [ 0, max ]" +#define GST_VIDEO_SIZE_RANGE "(int) [ 1, max ]" +#define GST_VIDEO_FPS_RANGE "(double) [ 0.0, max ]" /* consider the next 2 protected */ #define __GST_VIDEO_CAPS_MAKE_32A(R, G, B, A) \ diff --git a/gst/ffmpegcolorspace/gstffmpegcodecmap.c b/gst/ffmpegcolorspace/gstffmpegcodecmap.c index b120cf0..e1e61fc 100644 --- a/gst/ffmpegcolorspace/gstffmpegcodecmap.c +++ b/gst/ffmpegcolorspace/gstffmpegcodecmap.c @@ -86,9 +86,9 @@ gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context) __VA_ARGS__, NULL) \ : \ gst_caps_new_simple (mimetype, \ - "width", GST_TYPE_INT_RANGE, 16, 4096, \ - "height", GST_TYPE_INT_RANGE, 16, 4096, \ - "framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, \ + "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 diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index f6ba29e..099acfc 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -67,7 +67,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb, " - "framerate = (double) [ 1.0, 100.0 ], " + "framerate = (double) [ 0.0, MAX ], " "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]") ); @@ -929,7 +929,7 @@ gst_ximagesink_xcontext_get (GstXImageSink * ximagesink) "blue_mask", G_TYPE_INT, xcontext->visual->blue_mask, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL); + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); if (ximagesink->par) { int nom, den; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index cf21205..e422ed3 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -64,11 +64,11 @@ static GstStaticPadTemplate gst_xvimagesink_sink_template_factory = GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb, " - "framerate = (double) [ 1.0, 100.0 ], " + "framerate = (double) [ 0.0, MAX ], " "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]; " "video/x-raw-yuv, " - "framerate = (double) [ 1.0, 100.0 ], " + "framerate = (double) [ 0.0, MAX ], " "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]") ); @@ -884,7 +884,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink, "red_mask", G_TYPE_INT, formats[i].blue_mask, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL); + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); /* For RGB caps we store them and the image format so that we can get back the format @@ -908,7 +908,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink, "format", GST_TYPE_FOURCC, formats[i].id, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL); + "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); break; default: g_assert_not_reached (); -- 2.7.4