[Bug 767908] jpeg2000parse: use enums for colorspace and sampling, rather than strings
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Jun 22 07:02:43 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=767908
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #330170|none |needs-work
status| |
--- Comment #14 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 330170:
--> (https://bugzilla.gnome.org/review?bug=767908&attachment=330170)
I wanted to get rid of the colorspace field in the JPEG2000 caps (for GStreamer
2.0), not in general :) In general I'd prefer to get rid of the fourccs in the
video/x-raw caps and replace them with something more meaningful, but that's
unrelated.
::: gst-libs/gst/codecparsers/gstjpeg2000sampling.c
@@ +21,3 @@
+#include "gstjpeg2000sampling.h"
+
+static const gchar *GstJPEG2000SamplingStrings[] = {
snake_case variable names
@@ +51,3 @@
+gst_jpeg2000_get_sampling_string (GstJPEG2000Sampling sampling)
+{
+ if (sampling > 0 && sampling <= sizeof (GstJPEG2000SamplingStrings))
This should probably also be a g_return_val_if_fail() instead
::: gst-libs/gst/codecparsers/gstjpeg2000sampling.h
@@ +53,3 @@
+ GST_JPEG2000_YBR410,
+ GST_JPEG2000_GRAYSCALE,
+ GST_JPEG2000_YBRA4444_EXT
GST_JPEG2000_SAMPLING_XXX
@@ +59,3 @@
+#define GST_JPEG2000_SAMPLING_LIST "sampling = (string) {\"RGB\", \"BGR\",
\"RGBA\", \"BGRA\", \"YCbCr-4:4:4\", \"YCbCr-4:2:2\", \"YCbCr-4:2:0\",
\"YCbCr-4:1:1\", \"GRAYSCALE\" , \"YCbCrA-4:4:4:4\"}"
+
+const gchar *gst_jpeg2000_get_sampling_string (GstJPEG2000Sampling sampling);
gst_jpeg2000_sampling_to_string()
@@ +60,3 @@
+
+const gchar *gst_jpeg2000_get_sampling_string (GstJPEG2000Sampling sampling);
+GstJPEG2000Sampling gst_jpeg2000_get_sampling (const gchar * sampling_string);
gst_jpeg2000_sampling_from_string()
@@ +75,3 @@
+ GST_JPEG2000_SAMPLING_RGB,
+ GST_JPEG2000_SAMPLING_YUV,
+ GST_JPEG2000_SAMPLING_GRAY
GST_JPEG2000_SAMPLING_COLORSPACE_XXX but it seems like GstJPEG2000Colorspace /
GST_JPEG2000_COLORSPACE_XXX is better
@@ +80,3 @@
+const gchar *gst_jpeg2000_get_color_space_string
(GstJPEG2000SamplingColorSpace
+ colorspace);
+GstJPEG2000SamplingColorSpace gst_jpeg2000_get_color_space (const gchar *
to_string() and from_string()
@@ +83,3 @@
+ colorspace_string);
+
+#define GST_JPEG2000_SAMPLING_COLORSPACE_LIST "colorspace = (string) {
\"sRGB\", \"sYUV\", \"GRAY\" }"
No SAMPLING here
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list