Commit 3a0fe9c2 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

qtmux: add support for muxing PNG

Demuxer already supported it.
parent a722f6e8
...@@ -186,6 +186,7 @@ G_BEGIN_DECLS ...@@ -186,6 +186,7 @@ G_BEGIN_DECLS
#define FOURCC_fiel GST_MAKE_FOURCC('f','i','e','l') #define FOURCC_fiel GST_MAKE_FOURCC('f','i','e','l')
#define FOURCC_pcst GST_MAKE_FOURCC('p','c','s','t') #define FOURCC_pcst GST_MAKE_FOURCC('p','c','s','t')
#define FOURCC_pgap GST_MAKE_FOURCC('p','g','a','p') #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_pnot GST_MAKE_FOURCC('p','n','o','t')
#define FOURCC_qt__ GST_MAKE_FOURCC('q','t',' ',' ') #define FOURCC_qt__ GST_MAKE_FOURCC('q','t',' ',' ')
#define FOURCC_qtim GST_MAKE_FOURCC('q','t','i','m') #define FOURCC_qtim GST_MAKE_FOURCC('q','t','i','m')
......
...@@ -5280,6 +5280,9 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) ...@@ -5280,6 +5280,9 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
} else if (strcmp (mimetype, "image/jpeg") == 0) { } else if (strcmp (mimetype, "image/jpeg") == 0) {
entry.fourcc = FOURCC_jpeg; entry.fourcc = FOURCC_jpeg;
sync = FALSE; sync = FALSE;
} else if (strcmp (mimetype, "image/png") == 0) {
entry.fourcc = FOURCC_png;
sync = FALSE;
} else if (strcmp (mimetype, "image/x-j2c") == 0 || } else if (strcmp (mimetype, "image/x-j2c") == 0 ||
strcmp (mimetype, "image/x-jpc") == 0) { strcmp (mimetype, "image/x-jpc") == 0) {
const gchar *colorspace; const gchar *colorspace;
......
...@@ -192,6 +192,8 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { ...@@ -192,6 +192,8 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
COMMON_VIDEO_CAPS "; " COMMON_VIDEO_CAPS "; "
"image/jpeg, " "image/jpeg, "
COMMON_VIDEO_CAPS_NO_FRAMERATE "; " COMMON_VIDEO_CAPS_NO_FRAMERATE "; "
"image/png, "
COMMON_VIDEO_CAPS_NO_FRAMERATE "; "
"video/x-vp8, " "video/x-vp8, "
COMMON_VIDEO_CAPS "; " COMMON_VIDEO_CAPS "; "
"video/x-dirac, " "video/x-dirac, "
......
...@@ -13568,7 +13568,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, ...@@ -13568,7 +13568,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN; GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
switch (fourcc) { switch (fourcc) {
case GST_MAKE_FOURCC ('p', 'n', 'g', ' '): case FOURCC_png:
_codec ("PNG still images"); _codec ("PNG still images");
caps = gst_caps_new_empty_simple ("image/png"); caps = gst_caps_new_empty_simple ("image/png");
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment