avformat: Add single jpeg muxer

Needed to fix Ticket4218

Based on patch by: Otávio Ribeiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Caligula useraccount 2015-06-08 03:28:33 +02:00 committed by Michael Niedermayer
parent 990605768c
commit 51ac1f616f
3 changed files with 13 additions and 0 deletions

View File

@ -400,6 +400,7 @@ OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o
OBJS-$(CONFIG_SEGMENT_MUXER) += segment.o
OBJS-$(CONFIG_SHORTEN_DEMUXER) += rawdec.o
OBJS-$(CONFIG_SIFF_DEMUXER) += siff.o
OBJS-$(CONFIG_SINGLEJPEG_MUXER) += rawenc.o
OBJS-$(CONFIG_SMACKER_DEMUXER) += smacker.o
OBJS-$(CONFIG_SMJPEG_DEMUXER) += smjpegdec.o smjpeg.o
OBJS-$(CONFIG_SMJPEG_MUXER) += smjpegenc.o smjpeg.o

View File

@ -273,6 +273,7 @@ void av_register_all(void)
REGISTER_MUXER (SEGMENT, stream_segment);
REGISTER_DEMUXER (SHORTEN, shorten);
REGISTER_DEMUXER (SIFF, siff);
REGISTER_MUXER (SINGLEJPEG, singlejpeg);
REGISTER_DEMUXER (SLN, sln);
REGISTER_DEMUXER (SMACKER, smacker);
REGISTER_MUXDEMUX(SMJPEG, smjpeg);

View File

@ -250,6 +250,17 @@ AVOutputFormat ff_mjpeg_muxer = {
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
AVOutputFormat ff_singlejpeg_muxer = {
.name = "singlejpeg",
.long_name = NULL_IF_CONFIG_SMALL("JPEG single image"),
.mime_type = "image/jpeg",
.audio_codec = AV_CODEC_ID_NONE,
.video_codec = AV_CODEC_ID_MJPEG,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
.write_header = force_one_stream,
};
#endif
#if CONFIG_MLP_MUXER