isomp4: Fix AV1 default alignment
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 2 Mar 2022 21:24:38 +0000 (16:24 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 4 Mar 2022 21:58:15 +0000 (21:58 +0000)
ISOMP4 store TU (temporal units) worth of AV1. Expose this in the
caps to reduce overhead in the parser, and in the muxer to avoid
storing frames split in the wrong way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>

subprojects/gst-plugins-good/gst/isomp4/gstqtmuxmap.c
subprojects/gst-plugins-good/gst/isomp4/qtdemux.c

index 143b217..18dbe93 100644 (file)
@@ -205,7 +205,8 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
             COMMON_VIDEO_CAPS "; "
             "video/x-dirac, "
             COMMON_VIDEO_CAPS "; " "video/x-qt-part, " COMMON_VIDEO_CAPS "; "
-            "video/x-av1, " COMMON_VIDEO_CAPS),
+            "video/x-av1, " "alignment = (string) \"tu\", "
+            COMMON_VIDEO_CAPS ";"),
         GST_STATIC_CAPS (PCM_CAPS_FULL "; "
             PCM_CAPS_UNPOSITIONED " ; "
             MP123_CAPS " ; "
@@ -229,7 +230,8 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
         GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"),
         GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";" H265_CAPS ";"
             "video/x-mp4-part," COMMON_VIDEO_CAPS "; "
-            "video/x-av1, " COMMON_VIDEO_CAPS),
+            "video/x-av1, " "alignment = (string) \"tu\", "
+            COMMON_VIDEO_CAPS ";"),
         GST_STATIC_CAPS (MP123_CAPS "; "
             AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS),
         GST_STATIC_CAPS (TEXT_UTF8),
index 8bc9df7..091864b 100644 (file)
@@ -14749,7 +14749,8 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
       break;
     case FOURCC_av01:
       _codec ("AV1");
-      caps = gst_caps_new_empty_simple ("video/x-av1");
+      caps = gst_caps_new_simple ("video/x-av1",
+          "alignment", G_TYPE_STRING, "tu", NULL);
       break;
     case GST_MAKE_FOURCC ('k', 'p', 'c', 'd'):
     default: