From 3a0fe9c2f5f8ccbfda002a647f9e5f0571c4638a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 15 Jun 2017 23:31:24 +0100 Subject: [PATCH] qtmux: add support for muxing PNG Demuxer already supported it. --- gst/isomp4/fourcc.h | 1 + gst/isomp4/gstqtmux.c | 3 +++ gst/isomp4/gstqtmuxmap.c | 2 ++ gst/isomp4/qtdemux.c | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h index d302c97..f9c6335 100644 --- a/gst/isomp4/fourcc.h +++ b/gst/isomp4/fourcc.h @@ -186,6 +186,7 @@ G_BEGIN_DECLS #define FOURCC_fiel GST_MAKE_FOURCC('f','i','e','l') #define FOURCC_pcst GST_MAKE_FOURCC('p','c','s','t') #define FOURCC_pgap GST_MAKE_FOURCC('p','g','a','p') +#define FOURCC_png GST_MAKE_FOURCC('p','n','g',' ') #define FOURCC_pnot GST_MAKE_FOURCC('p','n','o','t') #define FOURCC_qt__ GST_MAKE_FOURCC('q','t',' ',' ') #define FOURCC_qtim GST_MAKE_FOURCC('q','t','i','m') diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 36d6978..ba5539b 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -5280,6 +5280,9 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) } else if (strcmp (mimetype, "image/jpeg") == 0) { entry.fourcc = FOURCC_jpeg; sync = FALSE; + } else if (strcmp (mimetype, "image/png") == 0) { + entry.fourcc = FOURCC_png; + sync = FALSE; } else if (strcmp (mimetype, "image/x-j2c") == 0 || strcmp (mimetype, "image/x-jpc") == 0) { const gchar *colorspace; diff --git a/gst/isomp4/gstqtmuxmap.c b/gst/isomp4/gstqtmuxmap.c index b8e08e0..33acef9 100644 --- a/gst/isomp4/gstqtmuxmap.c +++ b/gst/isomp4/gstqtmuxmap.c @@ -192,6 +192,8 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { COMMON_VIDEO_CAPS "; " "image/jpeg, " COMMON_VIDEO_CAPS_NO_FRAMERATE "; " + "image/png, " + COMMON_VIDEO_CAPS_NO_FRAMERATE "; " "video/x-vp8, " COMMON_VIDEO_CAPS "; " "video/x-dirac, " diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index f362ee4..0a41b26 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -13568,7 +13568,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN; switch (fourcc) { - case GST_MAKE_FOURCC ('p', 'n', 'g', ' '): + case FOURCC_png: _codec ("PNG still images"); caps = gst_caps_new_empty_simple ("image/png"); break; -- 2.7.4