You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
377 lines
11 KiB
377 lines
11 KiB
9 years ago
|
#!/bin/bash
|
||
|
# Copyright 2013-2015 Tomas Popela <tpopela@redhat.com>
|
||
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||
|
# a copy of this software and associated documentation files (the
|
||
|
# "Software"), to deal in the Software without restriction, including
|
||
|
# without limitation the rights to use, copy, modify, merge, publish,
|
||
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
||
|
# permit persons to whom the Software is furnished to do so, subject to
|
||
|
# the following conditions:
|
||
|
#
|
||
|
# The above copyright notice and this permission notice shall be included
|
||
|
# in all copies or substantial portions of the Software.
|
||
|
#
|
||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||
|
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||
|
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
|
|
||
|
# $1 files
|
||
|
# $2 verbose
|
||
|
function copy_files() {
|
||
|
for file in $1
|
||
|
do
|
||
7 years ago
|
dir_name=$(echo "$file" | sed 's%/[^/]*$%/%')
|
||
9 years ago
|
if [[ $dir_name == */* ]]; then
|
||
|
tmp_dir_name="tmp_"$dir_name
|
||
7 years ago
|
mkdir -p "../tmp_ffmpeg/$tmp_dir_name"
|
||
9 years ago
|
else
|
||
|
tmp_dir_name=$file
|
||
|
fi
|
||
|
|
||
|
if [ "$2" -eq 1 ]; then
|
||
7 years ago
|
cp "$file" "../tmp_ffmpeg/$tmp_dir_name"
|
||
9 years ago
|
else
|
||
7 years ago
|
cp "$file" "../tmp_ffmpeg/$tmp_dir_name" > /dev/null 2>&1
|
||
9 years ago
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
7 years ago
|
where=$(pwd)
|
||
9 years ago
|
|
||
7 years ago
|
if ! generated_files=$(./get_free_ffmpeg_source_files.py "$1" "$2"); then
|
||
|
exit 1
|
||
|
fi
|
||
9 years ago
|
# As the build system files does not contain the header files, cheat here
|
||
|
# and generate the header files names from source files. These that does not
|
||
|
# exist will be later skipped while copying.
|
||
|
generated_files_headers="${generated_files//.c/.h}"
|
||
|
generated_files_headers="$generated_files_headers ${generated_files//.c/_internal.h}"
|
||
|
if [ "$2" -ne "1" ]; then
|
||
|
generated_files_headers="$generated_files_headers ${generated_files//.S/.h}"
|
||
|
fi
|
||
|
generated_files_headers="$generated_files_headers ${generated_files//.asm/.h}"
|
||
|
|
||
|
header_files=" libavcodec/x86/inline_asm.h \
|
||
3 years ago
|
libavcodec/x86/hpeldsp.h \
|
||
9 years ago
|
libavcodec/x86/mathops.h \
|
||
2 years ago
|
libavcodec/x86/vpx_arith.h \
|
||
6 years ago
|
libavcodec/aarch64/vp8dsp.h \
|
||
|
libavcodec/arm/vp8dsp.h \
|
||
2 years ago
|
libavcodec/arm/vpx_arith.h \
|
||
8 years ago
|
libavcodec/aac.h \
|
||
8 years ago
|
libavcodec/aacps.h \
|
||
|
libavcodec/aacpsdsp.h \
|
||
|
libavcodec/aacsbrdata.h \
|
||
7 years ago
|
libavcodec/aac_ac3_parser.h \
|
||
8 years ago
|
libavcodec/aac_defines.h \
|
||
|
libavcodec/ac3.h \
|
||
2 years ago
|
libavcodec/ac3defs.h \
|
||
8 years ago
|
libavcodec/ac3tab.h \
|
||
7 years ago
|
libavcodec/adts_header.h \
|
||
9 years ago
|
libavcodec/avcodec.h \
|
||
|
libavcodec/blockdsp.h \
|
||
|
libavcodec/bytestream.h \
|
||
8 years ago
|
libavcodec/cbrt_data.h \
|
||
8 years ago
|
libavcodec/cbrt_tablegen.h \
|
||
4 years ago
|
libavcodec/codec.h \
|
||
5 years ago
|
libavcodec/codec_id.h \
|
||
3 years ago
|
libavcodec/codec_internal.h \
|
||
4 years ago
|
libavcodec/codec_par.h \
|
||
9 years ago
|
libavcodec/dct.h \
|
||
8 years ago
|
libavcodec/dct32.h \
|
||
3 years ago
|
libavcodec/defs.h \
|
||
2 years ago
|
libavcodec/dv.h \
|
||
9 years ago
|
libavcodec/error_resilience.h \
|
||
|
libavcodec/fdctdsp.h \
|
||
|
libavcodec/fft.h \
|
||
|
libavcodec/fft-internal.h \
|
||
|
libavcodec/fft_table.h \
|
||
|
libavcodec/flac.h \
|
||
8 years ago
|
libavcodec/flacdsp.h \
|
||
2 years ago
|
libavcodec/flac_parse.h \
|
||
9 years ago
|
libavcodec/frame_thread_encoder.h \
|
||
|
libavcodec/get_bits.h \
|
||
|
libavcodec/h263dsp.h \
|
||
|
libavcodec/h264chroma.h \
|
||
3 years ago
|
libavcodec/hevc.h \
|
||
8 years ago
|
libavcodec/hpeldsp.h \
|
||
7 years ago
|
libavcodec/hwaccels.h \
|
||
5 years ago
|
libavcodec/hwconfig.h \
|
||
9 years ago
|
libavcodec/idctdsp.h \
|
||
|
libavcodec/internal.h \
|
||
8 years ago
|
libavcodec/kbdwin.h \
|
||
9 years ago
|
libavcodec/mathops.h \
|
||
|
libavcodec/me_cmp.h \
|
||
5 years ago
|
libavcodec/mlp_parse.h \
|
||
9 years ago
|
libavcodec/motion_est.h \
|
||
7 years ago
|
libavcodec/mpeg12.h \
|
||
8 years ago
|
libavcodec/mpeg12data.h \
|
||
7 years ago
|
libavcodec/mpeg12vlc.h \
|
||
8 years ago
|
libavcodec/mpegaudio.h \
|
||
|
libavcodec/mpegaudiodecheader.h \
|
||
4 years ago
|
libavcodec/mpegaudiodec_common_tablegen.h \
|
||
8 years ago
|
libavcodec/mpegaudiodsp.h \
|
||
8 years ago
|
libavcodec/mpegaudio_tablegen.h \
|
||
9 years ago
|
libavcodec/mpegpicture.h \
|
||
|
libavcodec/mpegutils.h \
|
||
|
libavcodec/mpegvideo.h \
|
||
6 years ago
|
libavcodec/mpegvideodata.h \
|
||
9 years ago
|
libavcodec/mpegvideoencdsp.h \
|
||
|
libavcodec/options_table.h \
|
||
2 years ago
|
libavcodec/opus.h \
|
||
6 years ago
|
libavcodec/opusdsp.h \
|
||
7 years ago
|
libavcodec/opus_celt.h \
|
||
|
libavcodec/opus_pvq.h \
|
||
8 years ago
|
libavcodec/opus_rc.h \
|
||
5 years ago
|
libavcodec/packet.h \
|
||
4 years ago
|
libavcodec/packet_internal.h \
|
||
9 years ago
|
libavcodec/pcm_tablegen.h \
|
||
|
libavcodec/pixblockdsp.h \
|
||
|
libavcodec/pixels.h \
|
||
6 years ago
|
libavcodec/png.h \
|
||
4 years ago
|
libavcodec/pngdsp.h \
|
||
9 years ago
|
libavcodec/put_bits.h \
|
||
|
libavcodec/qpeldsp.h \
|
||
|
libavcodec/ratecontrol.h \
|
||
|
libavcodec/rectangle.h \
|
||
|
libavcodec/rl.h \
|
||
|
libavcodec/rnd_avg.h \
|
||
8 years ago
|
libavcodec/sbr.h \
|
||
|
libavcodec/sbrdsp.h \
|
||
|
libavcodec/sinewin.h \
|
||
|
libavcodec/sinewin_tablegen.h \
|
||
3 years ago
|
libavcodec/startcode.h \
|
||
9 years ago
|
libavcodec/thread.h \
|
||
3 years ago
|
libavcodec/threadframe.h \
|
||
8 years ago
|
libavcodec/unary.h \
|
||
9 years ago
|
libavcodec/version.h \
|
||
3 years ago
|
libavcodec/version_major.h \
|
||
8 years ago
|
libavcodec/videodsp.h \
|
||
|
libavcodec/vlc.h \
|
||
|
libavcodec/vorbisdsp.h \
|
||
9 years ago
|
libavcodec/vp3data.h \
|
||
5 years ago
|
libavcodec/vp4data.h \
|
||
8 years ago
|
libavcodec/vp3dsp.h \
|
||
9 years ago
|
libavcodec/vp56.h \
|
||
|
libavcodec/vp56dsp.h \
|
||
|
libavcodec/vp8data.h \
|
||
8 years ago
|
libavcodec/vp8dsp.h \
|
||
2 years ago
|
libavcodec/vp89_rac.h \
|
||
8 years ago
|
libavformat/apetag.h \
|
||
9 years ago
|
libavformat/avformat.h \
|
||
|
libavformat/dv.h \
|
||
8 years ago
|
libavformat/img2.h \
|
||
9 years ago
|
libavformat/internal.h \
|
||
8 years ago
|
libavformat/mov_chan.h \
|
||
9 years ago
|
libavformat/pcm.h \
|
||
|
libavformat/rdt.h \
|
||
|
libavformat/rtp.h \
|
||
|
libavformat/rtpdec.h \
|
||
|
libavformat/spdif.h \
|
||
|
libavformat/srtp.h \
|
||
|
libavformat/options_table.h \
|
||
|
libavformat/version.h \
|
||
3 years ago
|
libavformat/version_major.h \
|
||
9 years ago
|
libavformat/w64.h \
|
||
4 years ago
|
libavutil/aarch64/cpu.h \
|
||
9 years ago
|
libavutil/x86/asm.h \
|
||
|
libavutil/x86/bswap.h \
|
||
|
libavutil/x86/cpu.h \
|
||
|
libavutil/x86/emms.h
|
||
|
libavutil/x86/intreadwrite.h \
|
||
|
libavutil/x86/intmath.h
|
||
|
libavutil/x86/timer.h \
|
||
|
libavutil/attributes.h \
|
||
2 years ago
|
libavutil/attributes_internal.h \
|
||
9 years ago
|
libavutil/audio_fifo.h \
|
||
|
libavutil/avassert.h \
|
||
|
libavutil/avutil.h \
|
||
|
libavutil/bswap.h \
|
||
|
libavutil/common.h \
|
||
|
libavutil/colorspace.h \
|
||
|
libavutil/cpu.h \
|
||
|
libavutil/cpu_internal.h \
|
||
|
libavutil/dynarray.h \
|
||
8 years ago
|
libavutil/ffmath.h \
|
||
|
libavutil/fixed_dsp.h \
|
||
|
libavutil/float_dsp.h \
|
||
7 years ago
|
libavutil/imgutils.h \
|
||
|
libavutil/imgutils_internal.h \
|
||
9 years ago
|
libavutil/internal.h \
|
||
|
libavutil/intfloat.h \
|
||
|
libavutil/intreadwrite.h \
|
||
|
libavutil/libm.h \
|
||
|
libavutil/lls.h \
|
||
|
libavutil/macros.h \
|
||
|
libavutil/pixfmt.h \
|
||
|
libavutil/qsort.h \
|
||
|
libavutil/replaygain.h \
|
||
8 years ago
|
libavutil/softfloat.h \
|
||
|
libavutil/softfloat_tables.h \
|
||
9 years ago
|
libavutil/thread.h \
|
||
|
libavutil/timer.h \
|
||
|
libavutil/timestamp.h \
|
||
5 years ago
|
libavutil/tx_priv.h \
|
||
9 years ago
|
libavutil/version.h \
|
||
|
libswresample/swresample.h \
|
||
|
libswresample/version.h \
|
||
3 years ago
|
libswresample/version_major.h \
|
||
8 years ago
|
compat/va_copy.h \
|
||
|
compat/atomics/gcc/stdatomic.h "
|
||
9 years ago
|
|
||
7 years ago
|
manual_files=" libavcodec/aarch64/fft_neon.S \
|
||
|
libavcodec/aarch64/h264pred_neon.S \
|
||
|
libavcodec/aarch64/hpeldsp_neon.S \
|
||
|
libavcodec/aarch64/mdct_neon.S \
|
||
6 years ago
|
libavcodec/aarch64/neon.S \
|
||
7 years ago
|
libavcodec/aarch64/vorbisdsp_neon.S \
|
||
2 years ago
|
libavcodec/aarch64/vorbisdsp_init.c \
|
||
6 years ago
|
libavcodec/aarch64/vp8dsp_neon.S \
|
||
3 years ago
|
libavcodec/x86/hpeldsp.asm \
|
||
7 years ago
|
libavcodec/x86/hpeldsp_rnd_template.c \
|
||
9 years ago
|
libavcodec/x86/rnd_template.c \
|
||
8 years ago
|
libavcodec/x86/videodsp.asm \
|
||
9 years ago
|
libavcodec/x86/videodsp_init.c \
|
||
|
libavcodec/x86/vorbisdsp_init.c \
|
||
3 years ago
|
libavcodec/x86/vp3dsp.asm \
|
||
|
libavcodec/x86/vp8dsp.asm \
|
||
9 years ago
|
libavcodec/bit_depth_template.c \
|
||
|
libavcodec/fft_template.c \
|
||
8 years ago
|
libavcodec/flacdec.c \
|
||
|
libavcodec/flacdsp.c \
|
||
|
libavcodec/flacdsp_template.c \
|
||
|
libavcodec/flacdsp_lpc_template.c \
|
||
9 years ago
|
libavcodec/h264pred_template.c \
|
||
|
libavcodec/hpel_template.c \
|
||
8 years ago
|
libavcodec/hpeldsp.c \
|
||
9 years ago
|
libavcodec/mdct_template.c \
|
||
3 years ago
|
libavcodec/options.c \
|
||
3 years ago
|
libavcodec/pcm.c \
|
||
9 years ago
|
libavcodec/pel_template.c \
|
||
|
libavcodec/utils.c \
|
||
8 years ago
|
libavcodec/videodsp.c \
|
||
9 years ago
|
libavcodec/videodsp_template.c \
|
||
8 years ago
|
libavcodec/vorbisdsp.c \
|
||
|
libavcodec/vp3dsp.c \
|
||
|
libavcodec/vp8dsp.c \
|
||
3 years ago
|
libavformat/flacdec.c \
|
||
9 years ago
|
libavformat/options.c \
|
||
|
libavformat/pcm.c \
|
||
|
libavformat/utils.c \
|
||
2 years ago
|
libavformat/version.c \
|
||
7 years ago
|
libavutil/aarch64/asm.S \
|
||
|
libavutil/aarch64/bswap.h \
|
||
4 years ago
|
libavutil/aarch64/cpu.c \
|
||
2 years ago
|
libavutil/aarch64/float_dsp_init.c \
|
||
7 years ago
|
libavutil/aarch64/float_dsp_neon.S \
|
||
7 years ago
|
libavutil/aarch64/timer.h \
|
||
9 years ago
|
libavutil/cpu.c \
|
||
8 years ago
|
libavutil/fixed_dsp.c \
|
||
|
libavutil/float_dsp.c \
|
||
7 years ago
|
libavutil/imgutils.c \
|
||
3 years ago
|
libavutil/tx_float.c \
|
||
5 years ago
|
libavutil/tx_template.c \
|
||
3 years ago
|
libavutil/utils.c \
|
||
2 years ago
|
libavutil/version.c \
|
||
9 years ago
|
libavutil/x86/cpu.c \
|
||
|
libavutil/x86/float_dsp_init.c \
|
||
2 years ago
|
libavutil/x86/tx_float_init.c \
|
||
9 years ago
|
libavutil/x86/x86inc.asm \
|
||
|
libavutil/x86/x86util.asm "
|
||
|
|
||
7 years ago
|
mp3_files=" libavcodec/aarch64/aacpsdsp_init_aarch64.c \
|
||
7 years ago
|
libavcodec/aarch64/aacpsdsp_neon.S \
|
||
7 years ago
|
libavcodec/aarch64/autorename_libavcodec_aarch64_aacpsdsp_neon.S \
|
||
7 years ago
|
libavcodec/aarch64/autorename_libavcodec_aarch64_sbrdsp_neon.S \
|
||
7 years ago
|
libavcodec/aarch64/mpegaudiodsp_init.c \
|
||
7 years ago
|
libavcodec/aarch64/mpegaudiodsp_neon.S \
|
||
7 years ago
|
libavcodec/aarch64/sbrdsp_init_aarch64.c \
|
||
7 years ago
|
libavcodec/aarch64/sbrdsp_neon.S \
|
||
7 years ago
|
libavcodec/aac_ac3_parser.c \
|
||
8 years ago
|
libavcodec/aac_parser.c \
|
||
|
libavcodec/aacps_float.c \
|
||
|
libavcodec/aacpsdsp_float.c \
|
||
|
libavcodec/aacsbr.c \
|
||
|
libavcodec/aactab.c \
|
||
|
libavcodec/ac3tab.c \
|
||
|
libavcodec/autorename_libavcodec_mpegaudiodsp.c \
|
||
8 years ago
|
libavcodec/autorename_libavcodec_sbrdsp.c \
|
||
|
libavcodec/cbrt_data.c \
|
||
|
libavcodec/dct.c \
|
||
|
libavcodec/dct32_fixed.c \
|
||
|
libavcodec/dct32_float.c \
|
||
8 years ago
|
libavcodec/dct32_template.c \
|
||
8 years ago
|
libavcodec/kbdwin.c \
|
||
|
libavcodec/mpegaudio.c \
|
||
|
libavcodec/mpegaudio_parser.c \
|
||
|
libavcodec/mpegaudiodec_fixed.c \
|
||
8 years ago
|
libavcodec/mpegaudiodec_template.c \
|
||
8 years ago
|
libavcodec/mpegaudiodecheader.c \
|
||
8 years ago
|
libavcodec/mpegaudiodsp.c \
|
||
8 years ago
|
libavcodec/mpegaudiodsp_data.c \
|
||
|
libavcodec/mpegaudiodsp_fixed.c \
|
||
|
libavcodec/mpegaudiodsp_float.c \
|
||
8 years ago
|
libavcodec/mpegaudiodsp_template.c \
|
||
8 years ago
|
libavcodec/sbrdsp.c \
|
||
8 years ago
|
libavcodec/sbrdsp_template.c \
|
||
8 years ago
|
libavcodec/sinewin.c \
|
||
8 years ago
|
libavcodec/x86/dct_init.c \
|
||
|
libavcodec/x86/dct32.asm \
|
||
|
libavcodec/x86/imdct36.asm \
|
||
|
libavcodec/x86/mpegaudiodsp.c \
|
||
|
libavcodec/x86/sbrdsp_init.c \
|
||
|
libavcodec/x86/sbrdsp.asm \
|
||
|
libavformat/aacdec.c \
|
||
8 years ago
|
libavformat/apetag.c \
|
||
|
libavformat/img2.c \
|
||
|
libavformat/mov.c \
|
||
|
libavformat/mov_chan.c \
|
||
|
libavformat/mp3dec.c "
|
||
|
|
||
9 years ago
|
other_files=" BUILD.gn \
|
||
|
Changelog \
|
||
|
COPYING.GPLv2 \
|
||
|
COPYING.GPLv3 \
|
||
|
COPYING.LGPLv2.1 \
|
||
|
COPYING.LGPLv3 \
|
||
|
CREDITS \
|
||
|
CREDITS.chromium \
|
||
|
ffmpeg_generated.gni \
|
||
|
ffmpeg_options.gni \
|
||
|
INSTALL.md \
|
||
|
LICENSE.md \
|
||
|
MAINTAINERS \
|
||
|
OWNERS \
|
||
|
README.chromium \
|
||
|
README.md \
|
||
7 years ago
|
RELEASE "
|
||
9 years ago
|
|
||
7 years ago
|
cd "$1/third_party/ffmpeg" || exit 1
|
||
9 years ago
|
|
||
|
copy_files "$generated_files" 0
|
||
|
copy_files "$generated_files_headers" 0
|
||
|
copy_files "$manual_files" 1
|
||
|
copy_files "$other_files" 1
|
||
|
copy_files "$header_files" 1
|
||
8 years ago
|
copy_files "$mp3_files" 1
|
||
9 years ago
|
|
||
|
mkdir -p ../tmp_ffmpeg/tmp_chromium/config
|
||
|
cp -r chromium/config ../tmp_ffmpeg/tmp_chromium
|
||
|
|
||
7 years ago
|
cd ../tmp_ffmpeg || exit 1
|
||
|
|
||
|
while IFS= read -r -d '' tmp_directory
|
||
|
do
|
||
|
new_name=${tmp_directory//tmp_/}
|
||
|
mv "$tmp_directory" "$new_name"
|
||
|
done < <(find . -type d -name 'tmp_*' -print0)
|
||
9 years ago
|
|
||
7 years ago
|
cd "$where" || exit 1
|
||
9 years ago
|
|
||
7 years ago
|
rm -rf "$1/third_party/ffmpeg"
|
||
|
mv "$1/third_party/tmp_ffmpeg" "$1/third_party/ffmpeg"
|