avcodecmap: add jpeg2000 decoder mapping
authorThiago Santos <thiagoss@osg.samsung.com>
Sat, 10 Oct 2015 00:22:12 +0000 (21:22 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Sun, 11 Oct 2015 08:27:57 +0000 (05:27 -0300)
Map the 3 possible jpeg2000 caps to JPEG2000 codec id

ext/libav/gstavcodecmap.c

index 126919e..14686dd 100644 (file)
@@ -954,6 +954,18 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
           "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
       break;
 
+    case AV_CODEC_ID_JPEG2000:
+      caps =
+          gst_ff_vid_caps_new (context, NULL, codec_id, encode, "image/x-j2c",
+          NULL);
+      if (!encode) {
+        gst_caps_append (caps, gst_ff_vid_caps_new (context, NULL, codec_id,
+                encode, "image/x-jpc", NULL));
+        gst_caps_append (caps, gst_ff_vid_caps_new (context, NULL, codec_id,
+                encode, "image/jp2", NULL));
+      }
+      break;
+
     case AV_CODEC_ID_SP5X:
       caps =
           gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/sp5x",