From 7faf96eb14c71a668c8c0a2f5a6cf952f96b411d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 16 Dec 2012 20:05:46 +0100 Subject: [PATCH] openjpeg: Correct template caps a bit --- ext/openjpeg/gstopenjpegdec.c | 5 ++++- ext/openjpeg/gstopenjpegenc.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ext/openjpeg/gstopenjpegdec.c b/ext/openjpeg/gstopenjpegdec.c index e379b8f627..d2cc9befbb 100644 --- a/ext/openjpeg/gstopenjpegdec.c +++ b/ext/openjpeg/gstopenjpegdec.c @@ -61,7 +61,10 @@ static GstStaticPadTemplate gst_openjpeg_dec_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("image/x-j2c; image/x-jpc; image/jp2") + GST_STATIC_CAPS ("image/x-j2c, " + "colorspace = (string) { sRGB, sYUV, GRAY }; " + "image/x-jpc, " + "colorspace = (string) { sRGB, sYUV, GRAY }; " "image/jp2") ); static GstStaticPadTemplate gst_openjpeg_dec_src_template = diff --git a/ext/openjpeg/gstopenjpegenc.c b/ext/openjpeg/gstopenjpegenc.c index 05d8c92f0f..f814b43118 100644 --- a/ext/openjpeg/gstopenjpegenc.c +++ b/ext/openjpeg/gstopenjpegenc.c @@ -70,7 +70,17 @@ static GstStaticPadTemplate gst_openjpeg_enc_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("image/x-j2c; image/x-jpc; image/jp2") + GST_STATIC_CAPS ("image/x-j2c, " + "width = (int) [1, MAX], " + "height = (int) [1, MAX], " + "num-components = (int) [1, 4], " + "colorspace = (string) { sRGB, sYUV, GRAY }; " + "image/x-jpc, " + "width = (int) [1, MAX], " + "height = (int) [1, MAX], " + "num-components = (int) [1, 4], " + "colorspace = (string) { sRGB, sYUV, GRAY }; " + "image/jp2, " "width = (int) [1, MAX], " "height = (int) [1, MAX]") ); #define parent_class gst_openjpeg_enc_parent_class