[FFmpeg-cvslog] avformat: add xbm_pipe demuxer

Paul B Mahol git at videolan.org
Fri Feb 5 16:37:17 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Feb  3 13:52:00 2021 +0100| [84d5df54468e7e76f0c5c3ae7076dc955ce86a79] | committer: Paul B Mahol

avformat: add xbm_pipe demuxer

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84d5df54468e7e76f0c5c3ae7076dc955ce86a79
---

 Changelog                | 1 +
 libavformat/Makefile     | 1 +
 libavformat/allformats.c | 1 +
 libavformat/img2dec.c    | 8 ++++++++
 libavformat/version.h    | 2 +-
 5 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index bb109a0dd1..1000754da3 100644
--- a/Changelog
+++ b/Changelog
@@ -66,6 +66,7 @@ version <next>:
 - colorcorrect filter
 - binka demuxer
 - XBM parser
+- xbm_pipe demuxer
 
 
 version 4.3:
diff --git a/libavformat/Makefile b/libavformat/Makefile
index aca85878d0..10fee749c8 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -277,6 +277,7 @@ OBJS-$(CONFIG_IMAGE_SVG_PIPE_DEMUXER)     += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER) += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_TIFF_PIPE_DEMUXER)    += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_WEBP_PIPE_DEMUXER)    += img2dec.o img2.o
+OBJS-$(CONFIG_IMAGE_XBM_PIPE_DEMUXER)     += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_XPM_PIPE_DEMUXER)     += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_XWD_PIPE_DEMUXER)     += img2dec.o img2.o
 OBJS-$(CONFIG_INGENIENT_DEMUXER)         += ingenientdec.o rawdec.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 9628c726a7..f837ddabc8 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -518,6 +518,7 @@ extern AVInputFormat  ff_image_svg_pipe_demuxer;
 extern AVInputFormat  ff_image_sunrast_pipe_demuxer;
 extern AVInputFormat  ff_image_tiff_pipe_demuxer;
 extern AVInputFormat  ff_image_webp_pipe_demuxer;
+extern AVInputFormat  ff_image_xbm_pipe_demuxer;
 extern AVInputFormat  ff_image_xpm_pipe_demuxer;
 extern AVInputFormat  ff_image_xwd_pipe_demuxer;
 
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 1279d47f54..dcf07a69bc 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -1031,6 +1031,13 @@ static int pam_probe(const AVProbeData *p)
     return pnm_magic_check(p, 7) ? pnm_probe(p) : 0;
 }
 
+static int xbm_probe(const AVProbeData *p)
+{
+    if (!memcmp(p->buf, "#define", 7))
+        return AVPROBE_SCORE_MAX - 1;
+    return 0;
+}
+
 static int xpm_probe(const AVProbeData *p)
 {
     const uint8_t *b = p->buf;
@@ -1139,5 +1146,6 @@ IMAGEAUTO_DEMUXER(sunrast, AV_CODEC_ID_SUNRAST)
 IMAGEAUTO_DEMUXER(svg,     AV_CODEC_ID_SVG)
 IMAGEAUTO_DEMUXER(tiff,    AV_CODEC_ID_TIFF)
 IMAGEAUTO_DEMUXER(webp,    AV_CODEC_ID_WEBP)
+IMAGEAUTO_DEMUXER(xbm,     AV_CODEC_ID_XBM)
 IMAGEAUTO_DEMUXER(xpm,     AV_CODEC_ID_XPM)
 IMAGEAUTO_DEMUXER(xwd,     AV_CODEC_ID_XWD)
diff --git a/libavformat/version.h b/libavformat/version.h
index b12ce3a843..3e92bfca4a 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,7 +32,7 @@
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  58
-#define LIBAVFORMAT_VERSION_MINOR  66
+#define LIBAVFORMAT_VERSION_MINOR  67
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \



More information about the ffmpeg-cvslog mailing list