From d5a0cfc563a63a389b7337e3652ca1a3b75dd3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 16 Feb 2023 16:16:47 +0200 Subject: [PATCH] qtdemux: Add support for SpeedHQ video codec Part-of: --- .../gst-plugins-good/gst/isomp4/fourcc.h | 10 ++++++++++ .../gst-plugins-good/gst/isomp4/qtdemux.c | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/isomp4/fourcc.h b/subprojects/gst-plugins-good/gst/isomp4/fourcc.h index 37b9e12582..0865a18c9d 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/fourcc.h +++ b/subprojects/gst-plugins-good/gst/isomp4/fourcc.h @@ -304,6 +304,16 @@ G_BEGIN_DECLS #define FOURCC_av1m GST_MAKE_FOURCC('a','v','1','m') #define FOURCC_av1s GST_MAKE_FOURCC('a','v','1','s') #define FOURCC_av1M GST_MAKE_FOURCC('a','v','1','M') +#define FOURCC_SHQ0 GST_MAKE_FOURCC('S','H','Q','0') +#define FOURCC_SHQ1 GST_MAKE_FOURCC('S','H','Q','1') +#define FOURCC_SHQ2 GST_MAKE_FOURCC('S','H','Q','2') +#define FOURCC_SHQ3 GST_MAKE_FOURCC('S','H','Q','3') +#define FOURCC_SHQ4 GST_MAKE_FOURCC('S','H','Q','4') +#define FOURCC_SHQ5 GST_MAKE_FOURCC('S','H','Q','5') +#define FOURCC_SHQ6 GST_MAKE_FOURCC('S','H','Q','6') +#define FOURCC_SHQ7 GST_MAKE_FOURCC('S','H','Q','7') +#define FOURCC_SHQ8 GST_MAKE_FOURCC('S','H','Q','8') +#define FOURCC_SHQ9 GST_MAKE_FOURCC('S','H','Q','9') #define FOURCC_cfhd GST_MAKE_FOURCC('C','F','H','D') #define FOURCC_ap4x GST_MAKE_FOURCC('a','p','4','x') diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 2b055e8c2a..c7543b6ef4 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -15662,6 +15662,25 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, "stream-format", G_TYPE_STRING, "obu-stream", "alignment", G_TYPE_STRING, "tu", NULL); break; + case FOURCC_SHQ0: + case FOURCC_SHQ1: + case FOURCC_SHQ2: + case FOURCC_SHQ3: + case FOURCC_SHQ4: + case FOURCC_SHQ5: + case FOURCC_SHQ6: + case FOURCC_SHQ7: + case FOURCC_SHQ8: + case FOURCC_SHQ9:{ + gchar *format = + g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); + _codec ("SpeedHQ"); + caps = + gst_caps_new_simple ("video/x-speedhq", "variant", G_TYPE_STRING, + format, NULL); + g_free (format); + break; + } case GST_MAKE_FOURCC ('k', 'p', 'c', 'd'): default: {