qtmux: add support for muxing PNG

Demuxer already supported it.
This commit is contained in:
Tim-Philipp Müller 2017-06-15 23:31:24 +01:00
parent a722f6e832
commit 3a0fe9c2f5
4 changed files with 7 additions and 1 deletions

View file

@ -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')

View file

@ -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;

View file

@ -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, "

View file

@ -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;