---
cleanfiles is initialised to an empty string and we can concat any filename
preceded by a space, the script then runs "rm -f $cleanfiles ..." , which
remove every file added to cleanfiles, as rm file1 file2 will remove file1 as
well as file2
 tests/fate-run.sh |    9 +++++
 tests/metasrc.dat |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 tests/metasrc.dat

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index b19f0ae..989464b 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -7,6 +7,7 @@ base=$(dirname $0)
 
 base64=tests/base64
 
+cleanfiles=''
 test="${1#fate-}"
 samples=$2
 target_exec=$3
@@ -22,6 +23,7 @@ cmp_shift=${12:-0}
 cmp_target=${13:-0}
 size_tolerance=${14:-0}
 
+srcmetafile="tests/metasrc.dat"
 outdir="tests/data/fate"
 outfile="${outdir}/${test}"
 errfile="${outdir}/${test}.err"
@@ -68,6 +70,13 @@ framecrc(){
     avconv "$@" -f framecrc -
 }
 
+metadata(){
+    testfile=$outdir/`basename $2`
+    cleanfiles="$cleanfiles $testfile"
+    avconv -i "$srcmetafile" "$@" -flags +bitexact -c copy -y "$testfile"
+    avconv -i "$testfile" -f ffmetadata -
+}
+
 framemd5(){
     avconv "$@" -f framemd5 -
 }
diff --git a/tests/metasrc.dat b/tests/metasrc.dat
new file mode 100644
index 0000000..8ab4287
--- /dev/null
+++ b/tests/metasrc.dat
@@ -0,0 +1,90 @@
+;FFMETADATA1
+title=Libav metadata test
+artist=Libav Developers
+album=Metadata Tests
+album art=../../lena.pnm
+copyright=Copyright (c) libav
+year=2012
+genre=Testing
+comments=This is a libav metadatasrc file used for testing metadata demuxing 
+muxing.
+duration=290
+starttime=0
+totalduration=290
+width=640
+height=480
+videodatarate=394
+audiodatarate=125
+totaldatarate=527
+framerate=30
+bytelength=19108485
+canseekontime=true
+sourcedata=B4A7D0403HH1310992803941382
+purl=http://libav.org
+pmsg=Libav
+encoder=Lavf52.87.1
+[STREAM]
+title=Homura Magica - 10
+[STREAM]
+language=jpn
+title=Stereo AAC
+[STREAM]
+[STREAM]
+filename=COMMI___.TTF
+mimetype=application/x-truetype-font
+[STREAM]
+filename=CostaPtf-Demi.otf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=CostaPtf-Italic.otf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=HGPMINCB.TTF
+mimetype=application/x-truetype-font
+[STREAM]
+filename=Mixage_Bold_BT.ttf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=Mixage_Bold_Italic_BT.ttf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=Syntax.otf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=tork.ttf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=Trade_Gothic_LT.ttf
+mimetype=application/x-truetype-font
+[STREAM]
+filename=Trade_Gothic_LT_Bold.ttf
+mimetype=application/x-truetype-font
+[CHAPTER]
+TIMEBASE=1/1000000000
+START=0
+END=676759000000
+title=Dear livestream watchers: please stop using the Flash player, you're 
killing my server. Use the mirrors. Love, Fluff
+[CHAPTER]
+TIMEBASE=1/1000000000
+START=676759000000
+END=1344677000000
+title=No ads here this week in honor of Homura being the manliest magical girl 
in recorded history.
+[CHAPTER]
+TIMEBASE=1/1000000000
+START=1344677000000
+END=1434600000000
+title=*pours out a 40 for my homie Homura*
+[CHAPTER]
+TIMEBASE=1/1000000000
+START=1434600000000
+END=1449657000000
+title=Maybe if you bought this on Bluray these girls would be a little bit 
less traumatized. How about that, huh!?
+[CHAPTER]
+TIMEBASE=1/1000000000
+START=1449657000000
+END=1469593000000
+title=Is it Thursday yet?
+[CHAPTER]
+TIMEBASE=1/1000000000
+START=1469593000000
+END=1484650000000
+title=MORNING RESCUE SEASON 2 WHATUP
-- 
1.7.4.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to