openjpegenc: Only allow stripe with image/x-jpc format
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 22 Dec 2020 23:20:35 +0000 (18:20 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 20 Sep 2021 15:11:02 +0000 (15:11 +0000)
It's the only format that our MPEG-TS muxer allows and the carriage of
JPEG 2000 stripes is only defined for MPEG-TS as far as I know.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>

ext/openjpeg/gstopenjpegenc.c

index af5814b..4d70e30 100644 (file)
@@ -152,13 +152,14 @@ static GstStaticPadTemplate gst_openjpeg_enc_src_template =
         "width = (int) [1, MAX], "
         "height = (int) [1, MAX], "
         "num-components = (int) [1, 4], "
-        "num-stripes = (int) [1, MAX], "
         GST_JPEG2000_SAMPLING_LIST ","
         GST_JPEG2000_COLORSPACE_LIST "; "
         "image/x-jpc, "
         "width = (int) [1, MAX], "
         "height = (int) [1, MAX], "
         "num-components = (int) [1, 4], "
+        "num-stripes = (int) [1, MAX], "
+        "alignment = (string) { frame, stripe }, "
         GST_JPEG2000_SAMPLING_LIST ","
         GST_JPEG2000_COLORSPACE_LIST "; "
         "image/jp2, " "width = (int) [1, MAX], " "height = (int) [1, MAX]")