[FFmpeg-devel] [PATCH 2/5] fate: add concat demuxer tests
Marton Balint
cus at passwd.hu
Sat Oct 24 22:42:13 CEST 2015
Signed-off-by: Marton Balint <cus at passwd.hu>
---
tests/Makefile | 1 +
tests/fate-run.sh | 14 ++++
tests/fate/concatdec.mak | 12 ++++
tests/ref/fate/concat-demuxer-lavf-mxf | 1 +
tests/ref/fate/concat-demuxer-lavf-mxf_d10 | 1 +
tests/ref/fate/concat-demuxer-lavf-ts | 1 +
tests/test_template.ffconcat | 112 +++++++++++++++++++++++++++++
7 files changed, 142 insertions(+)
create mode 100644 tests/fate/concatdec.mak
create mode 100644 tests/ref/fate/concat-demuxer-lavf-mxf
create mode 100644 tests/ref/fate/concat-demuxer-lavf-mxf_d10
create mode 100644 tests/ref/fate/concat-demuxer-lavf-ts
create mode 100644 tests/test_template.ffconcat
diff --git a/tests/Makefile b/tests/Makefile
index 7ee4a46..62544d0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -113,6 +113,7 @@ include $(SRC_PATH)/tests/fate/audio.mak
include $(SRC_PATH)/tests/fate/bmp.mak
include $(SRC_PATH)/tests/fate/cdxl.mak
include $(SRC_PATH)/tests/fate/checkasm.mak
+include $(SRC_PATH)/tests/fate/concatdec.mak
include $(SRC_PATH)/tests/fate/cover-art.mak
include $(SRC_PATH)/tests/fate/demux.mak
include $(SRC_PATH)/tests/fate/dfa.mak
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index a3938dc..2056093 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -249,6 +249,20 @@ gapless(){
do_md5sum $decfile3
}
+concat(){
+ template=$(target_path $1)
+ sample=$(target_path $2)
+
+ concatfile="${outdir}/${test}.ffconcat"
+ packetfile="${outdir}/${test}.ffprobe"
+ cleanfiles="$concatfile $packetfile"
+
+ awk "{gsub(/%SRCFILE%/, \"$sample\"); print}" $template > $concatfile
+ run ffprobe${PROGSUF} -show_streams -show_packets -v 0 -fflags keepside -f concat $concatfile > $packetfile
+
+ do_md5sum $packetfile
+}
+
mkdir -p "$outdir"
# Disable globbing: command arguments may contain globbing characters and
diff --git a/tests/fate/concatdec.mak b/tests/fate/concatdec.mak
new file mode 100644
index 0000000..89d5409
--- /dev/null
+++ b/tests/fate/concatdec.mak
@@ -0,0 +1,12 @@
+FATE_CONCAT_TEMPLATE=tests/test_template.ffconcat
+
+FATE_CONCAT_DEMUXER_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts
+FATE_CONCAT_DEMUXER_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += mxf
+FATE_CONCAT_DEMUXER_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += mxf_d10
+
+$(foreach D,$(FATE_CONCAT_DEMUXER_LAVF-yes),$(eval fate-concat-demuxer-lavf-$(D): ffprobe$(PROGSSUF)$(EXESUF) fate-lavf-$(D)))
+$(foreach D,$(FATE_CONCAT_DEMUXER_LAVF-yes),$(eval fate-concat-demuxer-lavf-$(D): CMD = concat $(FATE_CONCAT_TEMPLATE) tests/data/lavf/lavf.$(D)))
+
+FATE_CONCAT_DEMUXER-$(CONFIG_CONCAT_DEMUXER) += $(FATE_CONCAT_DEMUXER_LAVF-yes:%=fate-concat-demuxer-lavf-%)
+
+FATE-$(CONFIG_FFPROBE) += $(FATE_CONCAT_DEMUXER-yes)
diff --git a/tests/ref/fate/concat-demuxer-lavf-mxf b/tests/ref/fate/concat-demuxer-lavf-mxf
new file mode 100644
index 0000000..a6fa554
--- /dev/null
+++ b/tests/ref/fate/concat-demuxer-lavf-mxf
@@ -0,0 +1 @@
+56359998da34c3957124a8928fb58f3d *tests/data/fate/concat-demuxer-lavf-mxf.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-lavf-mxf_d10
new file mode 100644
index 0000000..018d631
--- /dev/null
+++ b/tests/ref/fate/concat-demuxer-lavf-mxf_d10
@@ -0,0 +1 @@
+89c81149b4673c60aba7cf5f27cec823 *tests/data/fate/concat-demuxer-lavf-mxf_d10.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-lavf-ts b/tests/ref/fate/concat-demuxer-lavf-ts
new file mode 100644
index 0000000..2e8ba46
--- /dev/null
+++ b/tests/ref/fate/concat-demuxer-lavf-ts
@@ -0,0 +1 @@
+1993b3613952fa76da8c5c260a16a96a *tests/data/fate/concat-demuxer-lavf-ts.ffprobe
diff --git a/tests/test_template.ffconcat b/tests/test_template.ffconcat
new file mode 100644
index 0000000..e9b685d
--- /dev/null
+++ b/tests/test_template.ffconcat
@@ -0,0 +1,112 @@
+#ffconcat version 1.0
+# ^ header is commented out to avoid probing therefore enable unsafe paths
+
+file %SRCFILE%
+
+file %SRCFILE%
+file_packet_metadata dummy=1
+duration 1
+
+file %SRCFILE%
+inpoint 00:00.00
+outpoint 00:00.04
+
+file %SRCFILE%
+inpoint 00:00.04
+outpoint 00:00.08
+
+file %SRCFILE%
+inpoint 00:00.08
+outpoint 00:00.12
+
+file %SRCFILE%
+inpoint 00:00.12
+outpoint 00:00.16
+
+file %SRCFILE%
+inpoint 00:00.16
+outpoint 00:00.20
+
+file %SRCFILE%
+inpoint 00:00.20
+outpoint 00:00.24
+
+file %SRCFILE%
+inpoint 00:00.24
+outpoint 00:00.28
+
+file %SRCFILE%
+inpoint 00:00.28
+outpoint 00:00.32
+
+file %SRCFILE%
+inpoint 00:00.32
+outpoint 00:00.36
+
+file %SRCFILE%
+inpoint 00:00.36
+outpoint 00:00.40
+
+file %SRCFILE%
+inpoint 00:00.40
+outpoint 00:00.44
+
+file %SRCFILE%
+inpoint 00:00.44
+outpoint 00:00.48
+
+file %SRCFILE%
+inpoint 00:00.48
+outpoint 00:00.52
+
+file %SRCFILE%
+inpoint 00:00.52
+outpoint 00:00.56
+
+file %SRCFILE%
+inpoint 00:00.56
+outpoint 00:00.60
+
+file %SRCFILE%
+inpoint 00:00.60
+outpoint 00:00.64
+
+file %SRCFILE%
+inpoint 00:00.64
+outpoint 00:00.68
+
+file %SRCFILE%
+inpoint 00:00.68
+outpoint 00:00.72
+
+file %SRCFILE%
+inpoint 00:00.72
+outpoint 00:00.76
+
+file %SRCFILE%
+inpoint 00:00.76
+outpoint 00:00.80
+
+file %SRCFILE%
+inpoint 00:00.80
+outpoint 00:00.84
+
+file %SRCFILE%
+inpoint 00:00.84
+outpoint 00:00.88
+
+file %SRCFILE%
+inpoint 00:00.88
+outpoint 00:00.92
+
+file %SRCFILE%
+inpoint 00:00.92
+outpoint 00:00.96
+
+file %SRCFILE%
+inpoint 00:00.96
+outpoint 00:01.00
+
+file %SRCFILE%
+inpoint 00:01.60
+
--
2.1.4
More information about the ffmpeg-devel
mailing list