[Bug 767512] jpeg2000parse: support j2c and jp2 file formats
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jun 13 06:51:21 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=767512
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #329648|none |needs-work
status| |
--- Comment #12 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 329648:
--> (https://bugzilla.gnome.org/review?bug=767512&attachment=329648)
::: gst/videoparsers/gstjpeg2000parse.c
@@ +112,3 @@
+ "image/x-j2c,"
+ GST_RTP_J2K_SAMPLING_LIST ";"
+ "image/x-j2c, " "colorspace = (string) { sRGB, sYUV, GRAY }")
And for JP2 we don't need any fields :)
@@ +220,3 @@
+
+ current_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SINK_PAD (parse));
+ if (!current_caps) {
Here we would have to handle autodetection later
@@ +238,3 @@
+ codec_format = GST_JPEG2000_PARSE_J2C;
+ } else if (gst_structure_has_name (current_caps_struct, "image/x-jpc")) {
+ codec_format = GST_JPEG2000_PARSE_JPC;
It would make sense to do all the caps handling in ::set_sink_caps(), which is
called whenever the sink caps are actually changing. Then you wouldn't have to
parse this for every single frame
@@ +253,3 @@
goto beach;
} else {
+ if (codec_format == GST_JPEG2000_PARSE_J2C) {
Might make sense to do this before the J2K parsing, so that the box is parsed
and then the J2K magic is also tried to be detected afterwards
@@ +283,3 @@
+ if (codec_format == GST_JPEG2000_PARSE_J2C)
+ *skipsize -= GST_JPEG2000_PARSE_SIZE_OF_J2C_MAGIC -
+ GST_JPEG2000_PARSE_SIZE_OF_J2K_MAGIC;
Why? Please add a comment 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