parent
7c9e99f636
commit
16adf6fa8d
@ -0,0 +1,21 @@
|
||||
Index: strigi-0.7.8/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp
|
||||
===================================================================
|
||||
--- strigi-0.7.8.orig/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp
|
||||
+++ strigi-0.7.8/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp
|
||||
@@ -355,7 +355,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul
|
||||
#endif
|
||||
|
||||
if(fc->bit_rate)
|
||||
- ar.addValue(factory->bitrateProperty, fc->bit_rate);
|
||||
+ ar.addValue(factory->bitrateProperty, (int)fc->bit_rate);
|
||||
else if (fc->duration!= no_bitrate && fc->duration > 0) {
|
||||
cout<<"Trying to estimate bitrate\n";
|
||||
int64_t size;
|
||||
@@ -486,7 +486,6 @@ FFMPEGEndAnalyzer::analyze(AnalysisResul
|
||||
outs << stream.avg_frame_rate.num / stream.avg_frame_rate.den;
|
||||
ar.addTriplet(streamuri, frameRatePropertyName, outs.str());
|
||||
}
|
||||
- if (codec.pix_fmt != PIX_FMT_NONE) {}//FIXME pixel format
|
||||
}
|
||||
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST menhir-20141215.tar.gz 556231 SHA256 2592967c123a31e1b6566ab9f6034e7a0a709d57d547097f05693baf96a46fa4 SHA512 1fff6b987016be37eaca0bb3fea7ec0c498c1448d076e991e1555718cf760318a8d710622af930175f234f49f8dd767ce62cc880c33458958ceeb1bda4817243 WHIRLPOOL 28e6018ce127b28e362aaf1fe030240253cb2ffb0a52d9b34e81c71882ae517376aa3df6c5d19c6db13819260f667f5708522486a74bc498bad3dac11378b56c
|
||||
DIST menhir-20150914.tar.gz 626388 SHA256 a3057ec0867377ceaf9caecf69d331440d9c0fb70e39ade619a7856aa67d535d SHA512 7717fcc63ae938eb7c8ae3a5e7d279a357735c0e3b062d9060cc70d3016640e1427d25ee8182e3e034c678d9b0e706fe219f707dd4d14689457f321b135b1fef WHIRLPOOL d66204d753d0677f9eb51d09641f9148077e62caa7ae042665697036457724040950bbb190df6bd029224a0607a67cac8f4597927b4f667ca09091e07d09f7bd
|
||||
|
@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit findlib
|
||||
|
||||
DESCRIPTION="LR(1) parser generator for the OCaml language"
|
||||
HOMEPAGE="http://gallium.inria.fr/~fpottier/menhir/"
|
||||
SRC_URI="http://gallium.inria.fr/~fpottier/menhir/${P}.tar.gz"
|
||||
|
||||
LICENSE="QPL-1.0 LGPL-2-with-linking-exception"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="examples +ocamlopt"
|
||||
|
||||
DEPEND=">=dev-lang/ocaml-4.02:=[ocamlopt?]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_configure() {
|
||||
if ! use ocamlopt ; then
|
||||
export TARGET=byte
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake PREFIX="${EPREFIX}"/usr -j1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
findlib_src_preinst
|
||||
emake PREFIX="${ED}"/usr docdir="${ED}"/usr/share/doc/"${PF}" $(use examples || echo "DOCS=manual.pdf") install
|
||||
use examples && docompress -x /usr/share/doc/${PF}/demos
|
||||
dodoc AUTHORS CHANGES
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST nose-exclude-0.1.9.tar.gz 3444 SHA256 c2862e55f9c6245141fc0437bad5f71a3aa8377d2727b85694884887027625ca SHA512 2f26a3d371bf50d71e235e801c0bef37ac3e7388df7bd16203b5bb330393b2c938deb4a0c2502c75c10038c798456174b74ef4dd10567ac103bf965fcfaf4dea WHIRLPOOL b926c273a1c16a69ab15157d87b079fecd813b579c69eaa9cceee441dca1607e2b949af991e3d0b23d593b07fd9597eedde1e8721fe38a897e0f6f7d221b817d
|
||||
DIST nose-exclude-0.2.0.tar.gz 5741 SHA256 27babdc53e0741ed09d21b7fdb5d244aabb1679f67ef81289f0f34e50aca51c9 SHA512 0c23fe809e7e4f75e34bd6e7922cbc021ca880511f9f4d6094ec7cb330261ce2eb10135595f64d555c6503eef5280f8fc41665d8a491e1a01a566c5e277c83f4 WHIRLPOOL 34d9731097e5a6f8e0de111438b3d5db65ec470a79317336c3eb2fceb583a4b7929d4c9b0da8d6b1fc8e8132d2724f2263c2b70e5fc9530dd38be554994b05e8
|
||||
DIST nose-exclude-0.3.0.tar.gz 5789 SHA256 eb40022d531c21e827e1261f3a51665a1535b83023598df1e968f41a7d9b3b88 SHA512 25a87e2fe8f424bd009b02b854029dc371ed9a73c7a062c5da32dc76949f0f19c47ac6ab844f2143651e7b66a6b52300edd0eeab3346292671c311ef42f5565c WHIRLPOOL a0841effaf08bda27678d7dffc19c1e933d83fa0ce7340745e72dba17faebc35b85323e598c3d089bcfca70ec521f6cd61c5d46cc56be2f60bf8e24b5904c09e
|
||||
DIST nose-exclude-0.4.1.tar.gz 5930 SHA256 44466a9bcb56d2e568750f91504d1278c74eabb259a305b06e975b87b51635da SHA512 07dd869f948fb6e6f23dbecc316d08f23701f30ace3755e560f94deeb62cb2b5e1f5690477260d8d3a7f634e3e9959142a340f4fe0886e2ad12852444244ca3f WHIRLPOOL 5ef409e2ada229f7e7fc4c32ea86377709d305fa3a1f11543ba7d6aeee67558eeb554cdce06a9a67b7d9ae80d66ce90ca9a5608e4d54610eed8a9a02ea20e7da
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Exclude specific directories from nosetests runs"
|
||||
HOMEPAGE="https://github.com/kgrandis/nose-exclude"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
RDEPEND="dev-python/nose[${PYTHON_USEDEP}]"
|
||||
|
||||
python_test() {
|
||||
# https://github.com/kgrandis/nose-exclude/issue/10/test-failures-with-python-3
|
||||
python_is_python3 && return
|
||||
esetup.py test
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST pytest-2.7.1.tar.gz 531671 SHA256 530f23c79e1b13850e93f3a59720f1eca75bad01307dc4fd694a6a19619fb9cb SHA512 1bc23bf67a7400b48b718ef3a03591a3b2047d58b633c6eb16ca4732a9198b3fbbce5a2bfc93097322988b65498ee1a7278d7e035e10d91e6b58d1d3b2a61eba WHIRLPOOL d8eb985d967d8e4b48cab2df58b1e7415bb961087e9a53f4336dc830291b0aa5d4679a49429d6cd67510ec19470a397e07a7c505fd5555ee509c1ff508847b9c
|
||||
DIST pytest-2.7.2.tar.gz 532836 SHA256 b30457f735420d0000d10a44bbd478cf03f8bf20e25bd77248f9bab40f4fd6a4 SHA512 5474a4fe58437a4971fb21b1b37dad3c08e18e5d154931ff23e597f881100a3515bf0cf71d06b143465594ad2a91a96f84f4836d84c39691143c8d88ca7a4360 WHIRLPOOL 6ab7371f952109ac476774222883e1381fe5ee6a54d967f2d90765f6c59c90634a16c42e8e2e1661169db6a9cb1327242ff2281cf1caeabd86a4dacd24f4bb06
|
||||
DIST pytest-2.7.3.tar.gz 548235 SHA256 d5a9c3db3515ab95902ba08c09d1e941a21a440dc2d65f31bac02667508a9efc SHA512 ad9b57f202c60c247dd4753fb8391e3e88b390e34de678ea12384d81d76693dd37e04f11f6da19a6eda2c74a73db23789856ccaa325d32b4beb6bff86d9e4173 WHIRLPOOL 4aecd53142e503083abe2631bf403509c515d52176c430b7ab1e0becdf404e0fce4bad4343a4ab62525a6e008de0c35b4fac4a352d06938288dbf8deb8a4a250
|
||||
|
@ -0,0 +1,61 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3 )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="py.test: simple powerful testing with Python"
|
||||
HOMEPAGE="http://pytest.org/ https://pypi.python.org/pypi/pytest"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="doc test"
|
||||
|
||||
# When bumping, please check setup.py for the proper py version
|
||||
PY_VER="1.4.29"
|
||||
RDEPEND=">=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]"
|
||||
|
||||
#pexpect dep based on https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/pexpect[${PYTHON_USEDEP}] )
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
|
||||
|
||||
python_prepare_all() {
|
||||
# Disable versioning of py.test script to avoid collision with
|
||||
# versioning performed by the eclass.
|
||||
sed -e "s/return points/return {'py.test': target}/" -i setup.py || die "sed failed"
|
||||
grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
|
||||
|
||||
# Prevent un-needed d'loading
|
||||
sed -e "s/'sphinx.ext.intersphinx', //" -i doc/en/conf.py || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
mkdir doc/en/.build || die
|
||||
emake -C doc/en html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# test_nose.py not written to suit py3.2 in pypy3
|
||||
if [[ "${EPYTHON}" == pypy3 ]]; then
|
||||
"${PYTHON}" "${BUILD_DIR}"/lib/pytest.py \
|
||||
--ignore=testing/test_nose.py \
|
||||
|| die "tests failed with ${EPYTHON}"
|
||||
else
|
||||
"${PYTHON}" "${BUILD_DIR}"/lib/pytest.py \
|
||||
|| die "tests failed with ${EPYTHON}"
|
||||
fi
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && dohtml -r doc/en/_build/html/
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST sphinx_rtd_theme-0.1.6.tar.gz 217067 SHA256 0f29f544f6d037989fa0c7729a9eab7e4d8ea50d6f0ef37363f472756c1edca6 SHA512 f79e8192264ef01675240853e9be8a5bd0c86808f0e918e60c7c6e0c078caeef87c76421db795149214ef4edc1389e7c2001a98436611292ff826e7b9b9d0f15 WHIRLPOOL 110494f3c9bb6e838557fa4bcb1ac8f33e91b30d2da780720e897cfc4f635c0a14f502d5aac50115495bcc591de79eae83a2e359b81b917e524c9459194420f6
|
||||
DIST sphinx_rtd_theme-0.1.7.tar.gz 220230 SHA256 9a490c861f6cf96a0050c29a92d5d1e01eda02ae6f50760ad5c96a327cdf14e8 SHA512 390f007ecba0a59ef92e1aab3457e7c09fa7ff45690f9351857d8aa635371c81329b12e7d4052ba9abaabb82a28a911334c4dc601105ee97cb0eb2b1be0ae426 WHIRLPOOL 00150c49a8e1a56aa378cac795b7ed7a681aef59c7a70294b1b3e582fa1d13ce7abc251567219422fa495c610dfda2a40c1255c2c8306af72188294fa1a84ec2
|
||||
DIST sphinx_rtd_theme-0.1.8.tar.gz 424804 SHA256 74f633ed3a61da1d1d59c3185483c81a9d7346bf0e7b5f29ad0764a6f159b68a SHA512 2ade6b86f88fa9e8fa3242b4f5fcf665016098a3819e08400fbe216ccb8ab6e1d0786fba20c1ed722525bc5fd088bc70ceb93c0ed4c5a8ac79ab6499a0a98994 WHIRLPOOL 7bfdd8679d4300a9cef03ca5bbff01cc2cfbc241244f26f08c0356aba8da5bcfdd2bba4603cc687ba5bfbc2b3c7dbf69a5169d88c215173d3dd686fed035704b
|
||||
DIST sphinx_rtd_theme-0.1.9.tar.gz 698461 SHA256 273846f8aacac32bf9542365a593b495b68d8035c2e382c9ccedcac387c9a0a1 SHA512 e793a4da6209c26acb261efd03e6591561d7fbad97b3d7ab0a105e125a15a035d2066a1b1572a95954304d361abec39d9e1e401cd7200c6206cc8c89ad134d0f WHIRLPOOL 77edc637b20b86a0273c9365fabdec7712dc40e6dae8533085c6c1f6261df9b0ada32f8b0d0d818f2c20902ce1c6619d9fe534da9c524f034638fb729a204052
|
||||
|
@ -0,0 +1,20 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="ReadTheDocs.org theme for Sphinx"
|
||||
HOMEPAGE="https://github.com/snide/sphinx_rtd_theme/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
PDEPEND="dev-python/sphinx[${PYTHON_USEDEP}]"
|
@ -1,4 +1,5 @@
|
||||
DIST urllib3-1.10.3.tar.gz 136894 SHA256 ce1bb9a3f103610a062ace3ae6e56ebf2fa0fbeb5c395d601c64d8a7e6df180b SHA512 d36280a29f1580565e79c58991d4ecf2cd69d2b262950bb90c1b0f89f225b6b3cee556914b6a7b3031dd074af8ae6187e6a3641ad8591c6b870203c33d40b113 WHIRLPOOL 5042b1c7e3c156d26c83a770636d9e7a9cf45b638f1b8733603afa255fe1a3ac03abb6447ba5e3f1ad98d7a449fe164c374ab5e131566b15e7c9281ba39677bc
|
||||
DIST urllib3-1.10.4.tar.gz 138538 SHA256 52131e6a561466f1206e1a648d9a73dda2a804d0f70e83782bd88494542ded09 SHA512 83118aa5bf23add5bb5dafd98d32459315d971246ac2a49f7f0d0fcad6414099885f6d4fc7847de17e983b949c8a21fa4ed71c0216e578bdfc8eb351672f7c09 WHIRLPOOL 03431b6c575f3399bf8876d7dfad126986864e3a3f09d05e7e682b5b374ed420854c776a3d7bac91538086e43a9b832975aaf0b1b2e3fcde1ba8cfe93417bdc3
|
||||
DIST urllib3-1.10.tar.gz 128200 SHA256 25b4a7fbbd9112e0190f31f8877aa0523caeab8630872ad1bbddaba01cdd6599 SHA512 32f9162f82a676146fae6bba462d21eb81635d8660ca4676b5e8dd3d18b68525a265695c646f06c099a78c24d9b108f0610d3e17f20578d473771bebd42cc52d WHIRLPOOL a8a84b79fd0edeecdd19eaef0ee809d1c5d842ff6bcf089df9a1111744a2f42bec1a366b76b6e7334a51cad83d42b166f133a4156bbbfb7be24518353ee71081
|
||||
DIST urllib3-1.12.tar.gz 151072 SHA256 0ea512776971fe4e76192600fe41e4e7ee96b4b9a5b15aefc1ac31d2a63872c6 SHA512 44f1cf9c5d5538e35d026551a2d1dc7119786c1148b9a769fa9f652f0368e996512962c6245c92d1f4bb1d8e816e2fb0ffebeb0060b01f92b2a5d6e01d15426f WHIRLPOOL d386e4fb47b2ea4d78d2ad690c9252d6be1b3f5a624e20670e22c9b3a28dc910e3d5ecd24ca54d8f8337f8e9a9875208efce06952cd392d9c8254257eadeee70
|
||||
DIST urllib3-1.9.1.tar.gz 171086 SHA256 d858379ef5988d4534bb8909432d697422100aaff272299d661339836b6dae9b SHA512 c972e4dc9dabf6378da75e0abce5e53bec29624f2dc0faff3c8ce762474d490da6aec7d2e374c57d0d18e640311845750eb257fc7829ac9d25a3d9c957c59c6f WHIRLPOOL 666b82e712939b3ff5dfe109ba0498c16dbea7f2c0f0c2e1c317cf7e6f03711ce4a9468bb72327abe7821aa75c0257d30dbce5c196ba59215df3dba4084c7360
|
||||
|
@ -0,0 +1,89 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
|
||||
HOMEPAGE="https://github.com/shazow/urllib3"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/certifi[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/backports-ssl-match-hostname[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
$(python_gen_cond_dep 'dev-python/pyopenssl[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
$(python_gen_cond_dep 'dev-python/ndg-httpsclient[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
$(python_gen_cond_dep 'dev-python/pyasn1[${PYTHON_USEDEP}]' python2_7 pypy)
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
${RDEPEND}
|
||||
>=www-servers/tornado-4.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-1.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/nose-1.3.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
# Testsuite written requiring mock to be installed under all Cpythons
|
||||
|
||||
python_prepare_all() {
|
||||
# Replace bundled copy of dev-python/six
|
||||
cat > urllib3/packages/six.py <<-EOF
|
||||
from __future__ import absolute_import
|
||||
from six import *
|
||||
EOF
|
||||
|
||||
sed \
|
||||
-e 's:\.packages\.six:six:g' \
|
||||
-e 's:\.six:six:g' \
|
||||
-i urllib3/util/response.py urllib3/response.py || die
|
||||
|
||||
sed -i '/cover-min-percentage/d' setup.cfg || die
|
||||
# Fix tests
|
||||
sed -i 's/urllib3.packages.six/six/' test/test_retry.py || die
|
||||
|
||||
# Reset source of objects.inv
|
||||
if use doc; then
|
||||
local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
|
||||
local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
|
||||
local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
|
||||
local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
|
||||
sed \
|
||||
-e "s|'python': ('http://docs.python.org/2.7', None|'${PYTHON_DOC}': ('${PYTHON_DOC_INVENTORY}'|" \
|
||||
-i docs/conf.py || die
|
||||
fi
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
use doc && emake -C docs html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# Failures still occur under py2.7.
|
||||
# https://github.com/shazow/urllib3/issues/621
|
||||
|
||||
[[ "${EPYTHON}" == pypy ]] && return
|
||||
|
||||
nosetests -v test || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST vcrpy-1.5.2.tar.gz 299525 SHA256 ef3216e91ab3a51b67c44e0e4a8c50f6edcc812658da4c73ff32b1eb36a8a9bf SHA512 2eccc061a1e90b03fb0688aac5566bdf96a7bfd6ffc34aa71af8395665cde8f183d02c5107572f1bbca0388c865c913f1b2a9c7b295c11be395dce20c4d5b761 WHIRLPOOL 49a0eb2d582003bebb788129d5f03a8d120d9752867d439a7394e7ed664b6a1b296d59d5a501e861cf3e78e4679c7a6e683843d75a0e512d0e4185da196f6081
|
||||
DIST vcrpy-1.7.3.tar.gz 164928 SHA256 d10f10eb23f7a662ff6c637f2fd57bfed29d62a0211dfd6802767cfc5f0716a1 SHA512 338d168436438d13af09e969bb2bdfd49b62fe12f78b3899fd423c3221a0d194bb2c53e660d1e5fabd76dff27ba6eca1c5052e0bd40a995929de56614bbe13cd WHIRLPOOL 19e34d7ed9ea5ec99a34595f5f38859befe34ca33a0b853550c106ab91b891dde62ca1b1291a903cd17c8c96d81cd55536868dfe5486b5e716ded5685e5b3eb2
|
||||
|
@ -0,0 +1,42 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{3,4} pypy )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Automatically mock your HTTP interactions to simplify and speed up testing"
|
||||
HOMEPAGE="https://github.com/kevin1024/vcrpy"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
#SRC_URI="https://github.com/kevin1024/vcrpy/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/contextlib2[${PYTHON_USEDEP}]
|
||||
>=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
>=dev-python/six-1.5[${PYTHON_USEDEP}]
|
||||
dev-python/urllib3[${PYTHON_USEDEP}]
|
||||
dev-python/wrapt[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'dev-python/contextlib2[${PYTHON_USEDEP}]' python2_7)
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
python_test() {
|
||||
py.test -vv || die
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
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.
|
||||
|
||||
Restrictions: By making use of the Software for military purposes, you choose
|
||||
to make a Bunny unhappy.
|
||||
|
||||
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.
|
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="OpenGL Mathematics"
|
||||
HOMEPAGE="http://glm.g-truc.net/"
|
||||
SRC_URI="https://github.com/g-truc/glm/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( HappyBunny MIT )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86_avx2"
|
||||
|
||||
RDEPEND="virtual/opengl"
|
||||
|
||||
src_configure() {
|
||||
if use test; then
|
||||
local mycmakeargs=( -DGLM_TEST_ENABLE=ON )
|
||||
|
||||
use cpu_flags_x86_sse2 && mycmakeargs+=( -DGLM_TEST_ENABLE_SIMD_SSE2=ON )
|
||||
use cpu_flags_x86_sse3 && mycmakeargs+=( -DGLM_TEST_ENABLE_SIMD_SSE3=ON )
|
||||
use cpu_flags_x86_avx && mycmakeargs+=( -DGLM_TEST_ENABLE_SIMD_AVX=ON )
|
||||
use cpu_flags_x86_avx2 && mycmakeargs+=( -DGLM_TEST_ENABLE_SIMD_AVX2=ON )
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -0,0 +1,287 @@
|
||||
Index: libquicktime-1.2.4/plugins/ffmpeg/video.c
|
||||
===================================================================
|
||||
--- libquicktime-1.2.4.orig/plugins/ffmpeg/video.c
|
||||
+++ libquicktime-1.2.4/plugins/ffmpeg/video.c
|
||||
@@ -37,10 +37,10 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#ifdef PIX_FMT_YUV422P10
|
||||
-#define PIX_FMT_YUV422P10_OR_DUMMY PIX_FMT_YUV422P10
|
||||
+#ifdef AV_PIX_FMT_YUV422P10
|
||||
+#define AV_PIX_FMT_YUV422P10_OR_DUMMY AV_PIX_FMT_YUV422P10
|
||||
#else
|
||||
-#define PIX_FMT_YUV422P10_OR_DUMMY -1234
|
||||
+#define AV_PIX_FMT_YUV422P10_OR_DUMMY -1234
|
||||
#endif
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT >= ((54<<16)|(1<<8)|0)
|
||||
@@ -90,9 +90,9 @@ typedef struct
|
||||
int imx_bitrate;
|
||||
int imx_strip_vbi;
|
||||
|
||||
- /* In some cases FFMpeg would report something like PIX_FMT_YUV422P, while
|
||||
- we would like to treat it as PIX_FMT_YUVJ422P. It's only used for decoding */
|
||||
- enum PixelFormat reinterpret_pix_fmt;
|
||||
+ /* In some cases FFMpeg would report something like AV_PIX_FMT_YUV422P, while
|
||||
+ we would like to treat it as AV_PIX_FMT_YUVJ422P. It's only used for decoding */
|
||||
+ enum AVPixelFormat reinterpret_pix_fmt;
|
||||
|
||||
int is_imx;
|
||||
int y_offset;
|
||||
@@ -137,42 +137,42 @@ typedef struct
|
||||
|
||||
static const struct
|
||||
{
|
||||
- enum PixelFormat ffmpeg_id;
|
||||
+ enum AVPixelFormat ffmpeg_id;
|
||||
int lqt_id;
|
||||
int exact;
|
||||
}
|
||||
colormodels[] =
|
||||
{
|
||||
- { PIX_FMT_YUV420P, BC_YUV420P, 1 }, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
|
||||
+ { AV_PIX_FMT_YUV420P, BC_YUV420P, 1 }, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- { PIX_FMT_YUV422, BC_YUV422, 1 },
|
||||
+ { AV_PIX_FMT_YUV422, BC_YUV422, 1 },
|
||||
#else
|
||||
- { PIX_FMT_YUYV422, BC_YUV422, 1 },
|
||||
+ { AV_PIX_FMT_YUYV422, BC_YUV422, 1 },
|
||||
#endif
|
||||
- { PIX_FMT_RGB24, BC_RGB888, 1 }, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
|
||||
- { PIX_FMT_BGR24, BC_BGR888, 1 }, ///< Packed pixel, 3 bytes per pixel, BGRBGR...
|
||||
- { PIX_FMT_YUV422P, BC_YUV422P, 1 }, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
- { PIX_FMT_YUV444P, BC_YUV444P, 1 }, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples)
|
||||
- { PIX_FMT_YUV411P, BC_YUV411P, 1 }, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples)
|
||||
- { PIX_FMT_YUV422P16, BC_YUV422P16, 1 }, ///< Planar 16 bit YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
-#ifdef PIX_FMT_YUV422P10
|
||||
- { PIX_FMT_YUV422P10, BC_YUV422P10, 1 }, ///< 10 bit samples in uint16_t containers, planar 4:2:2
|
||||
-#endif
|
||||
- { PIX_FMT_RGB565, BC_RGB565, 1 }, ///< always stored in cpu endianness
|
||||
- { PIX_FMT_YUVJ420P, BC_YUVJ420P, 1 }, ///< Planar YUV 4:2:0 full scale (jpeg)
|
||||
- { PIX_FMT_YUVJ422P, BC_YUVJ422P, 1 }, ///< Planar YUV 4:2:2 full scale (jpeg)
|
||||
- { PIX_FMT_YUVJ444P, BC_YUVJ444P, 1 }, ///< Planar YUV 4:4:4 full scale (jpeg)
|
||||
+ { AV_PIX_FMT_RGB24, BC_RGB888, 1 }, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
|
||||
+ { AV_PIX_FMT_BGR24, BC_BGR888, 1 }, ///< Packed pixel, 3 bytes per pixel, BGRBGR...
|
||||
+ { AV_PIX_FMT_YUV422P, BC_YUV422P, 1 }, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
+ { AV_PIX_FMT_YUV444P, BC_YUV444P, 1 }, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples)
|
||||
+ { AV_PIX_FMT_YUV411P, BC_YUV411P, 1 }, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples)
|
||||
+ { AV_PIX_FMT_YUV422P16, BC_YUV422P16, 1 }, ///< Planar 16 bit YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
+#ifdef AV_PIX_FMT_YUV422P10
|
||||
+ { AV_PIX_FMT_YUV422P10, BC_YUV422P10, 1 }, ///< 10 bit samples in uint16_t containers, planar 4:2:2
|
||||
+#endif
|
||||
+ { AV_PIX_FMT_RGB565, BC_RGB565, 1 }, ///< always stored in cpu endianness
|
||||
+ { AV_PIX_FMT_YUVJ420P, BC_YUVJ420P, 1 }, ///< Planar YUV 4:2:0 full scale (jpeg)
|
||||
+ { AV_PIX_FMT_YUVJ422P, BC_YUVJ422P, 1 }, ///< Planar YUV 4:2:2 full scale (jpeg)
|
||||
+ { AV_PIX_FMT_YUVJ444P, BC_YUVJ444P, 1 }, ///< Planar YUV 4:4:4 full scale (jpeg)
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- { PIX_FMT_RGBA32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
+ { AV_PIX_FMT_RGBA32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
#else
|
||||
- { PIX_FMT_RGB32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
+ { AV_PIX_FMT_RGB32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
#endif
|
||||
- { PIX_FMT_RGB555, BC_RGB888, 0 }, ///< always stored in cpu endianness, most significant bit to 1
|
||||
- { PIX_FMT_GRAY8, BC_RGB888, 0 },
|
||||
- { PIX_FMT_MONOWHITE, BC_RGB888, 0 }, ///< 0 is white
|
||||
- { PIX_FMT_MONOBLACK, BC_RGB888, 0 }, ///< 0 is black
|
||||
- { PIX_FMT_PAL8, BC_RGB888, 0 }, ///< 8 bit with RGBA palette
|
||||
- { PIX_FMT_YUV410P, BC_YUV420P, 0 }, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
|
||||
+ { AV_PIX_FMT_RGB555, BC_RGB888, 0 }, ///< always stored in cpu endianness, most significant bit to 1
|
||||
+ { AV_PIX_FMT_GRAY8, BC_RGB888, 0 },
|
||||
+ { AV_PIX_FMT_MONOWHITE, BC_RGB888, 0 }, ///< 0 is white
|
||||
+ { AV_PIX_FMT_MONOBLACK, BC_RGB888, 0 }, ///< 0 is black
|
||||
+ { AV_PIX_FMT_PAL8, BC_RGB888, 0 }, ///< 8 bit with RGBA palette
|
||||
+ { AV_PIX_FMT_YUV410P, BC_YUV420P, 0 }, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
|
||||
};
|
||||
|
||||
static const struct
|
||||
@@ -343,16 +343,16 @@ static int lqt_tenbit_dnxhd_supported(AV
|
||||
if (!codec->pix_fmts)
|
||||
return 0;
|
||||
|
||||
- for (i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; ++i)
|
||||
+ for (i = 0; codec->pix_fmts[i] != AV_PIX_FMT_NONE; ++i)
|
||||
{
|
||||
- if (codec->pix_fmts[i] == PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
+ if (codec->pix_fmts[i] == AV_PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static enum PixelFormat lqt_ffmpeg_get_ffmpeg_colormodel(int id)
|
||||
+static enum AVPixelFormat lqt_ffmpeg_get_ffmpeg_colormodel(int id)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -361,10 +361,10 @@ static enum PixelFormat lqt_ffmpeg_get_f
|
||||
if(colormodels[i].lqt_id == id)
|
||||
return colormodels[i].ffmpeg_id;
|
||||
}
|
||||
- return PIX_FMT_NB;
|
||||
+ return AV_PIX_FMT_NB;
|
||||
}
|
||||
|
||||
-static int lqt_ffmpeg_get_lqt_colormodel(enum PixelFormat id, int * exact)
|
||||
+static int lqt_ffmpeg_get_lqt_colormodel(enum AVPixelFormat id, int * exact)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -402,24 +402,24 @@ static void lqt_ffmpeg_setup_decoding_co
|
||||
/* First we try codec-specific colormodel matching. */
|
||||
if(codec->decoder->id == AV_CODEC_ID_DNXHD)
|
||||
{
|
||||
- /* FFMpeg supports PIX_FMT_YUV422P and PIX_FMT_YUV422P10 for DNxHD, which
|
||||
- we sometimes interpret as PIX_FMT_YUVJ422P and PIX_FMT_YUVJ422P10. */
|
||||
- if (codec->avctx->pix_fmt == PIX_FMT_YUV422P || codec->avctx->pix_fmt == PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
+ /* FFMpeg supports AV_PIX_FMT_YUV422P and AV_PIX_FMT_YUV422P10 for DNxHD, which
|
||||
+ we sometimes interpret as AV_PIX_FMT_YUVJ422P and AV_PIX_FMT_YUVJ422P10. */
|
||||
+ if (codec->avctx->pix_fmt == AV_PIX_FMT_YUV422P || codec->avctx->pix_fmt == AV_PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
{
|
||||
- int p10 = (codec->avctx->pix_fmt == PIX_FMT_YUV422P10_OR_DUMMY);
|
||||
+ int p10 = (codec->avctx->pix_fmt == AV_PIX_FMT_YUV422P10_OR_DUMMY);
|
||||
*exact = 1;
|
||||
if (lqt_ffmpeg_get_avid_yuv_range(vtrack->track) == AVID_FULL_YUV_RANGE)
|
||||
{
|
||||
vtrack->stream_cmodel = p10 ? BC_YUVJ422P10 : BC_YUVJ422P;
|
||||
- codec->reinterpret_pix_fmt = p10 ? PIX_FMT_YUV422P10_OR_DUMMY : PIX_FMT_YUVJ422P;
|
||||
- // Note: reinterpret_pix_fmt should really be PIX_FMT_YUVJ422P10, except
|
||||
+ codec->reinterpret_pix_fmt = p10 ? AV_PIX_FMT_YUV422P10_OR_DUMMY : AV_PIX_FMT_YUVJ422P;
|
||||
+ // Note: reinterpret_pix_fmt should really be AV_PIX_FMT_YUVJ422P10, except
|
||||
// there is no such colormodel in FFMpeg. Fortunately, it's not a problem
|
||||
// in this case, as reinterpret_pix_fmt is only used when *exact == 0.
|
||||
}
|
||||
else
|
||||
{
|
||||
vtrack->stream_cmodel = p10 ? BC_YUV422P10 : BC_YUV422P;
|
||||
- codec->reinterpret_pix_fmt = p10 ? PIX_FMT_YUV422P10_OR_DUMMY : PIX_FMT_YUV422P;
|
||||
+ codec->reinterpret_pix_fmt = p10 ? AV_PIX_FMT_YUV422P10_OR_DUMMY : AV_PIX_FMT_YUV422P;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -440,14 +440,14 @@ static void lqt_ffmpeg_setup_encoding_co
|
||||
|
||||
if (codec->encoder->id == AV_CODEC_ID_DNXHD)
|
||||
{
|
||||
- /* FFMpeg's DNxHD encoder only supports PIX_FMT_YUV422P and PIX_FMT_YUV422P10
|
||||
- and doesn't know anything about PIX_FMT_YUVJ422P and PIX_FMT_YUVJ422P10
|
||||
+ /* FFMpeg's DNxHD encoder only supports AV_PIX_FMT_YUV422P and AV_PIX_FMT_YUV422P10
|
||||
+ and doesn't know anything about AV_PIX_FMT_YUVJ422P and AV_PIX_FMT_YUVJ422P10
|
||||
(in fact, the latter doesn't even exist) */
|
||||
- codec->avctx->pix_fmt = PIX_FMT_YUV422P;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
if (vtrack->stream_cmodel == BC_YUV422P10 || vtrack->stream_cmodel == BC_YUVJ422P10)
|
||||
{
|
||||
if (lqt_tenbit_dnxhd_supported(codec->encoder))
|
||||
- codec->avctx->pix_fmt = PIX_FMT_YUV422P10_OR_DUMMY;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_YUV422P10_OR_DUMMY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,7 +458,7 @@ static void lqt_ffmpeg_setup_encoding_co
|
||||
/* From avcodec.h: */
|
||||
|
||||
/*
|
||||
- * PIX_FMT_RGBA32 is handled in an endian-specific manner. A RGBA
|
||||
+ * AV_PIX_FMT_RGBA32 is handled in an endian-specific manner. A RGBA
|
||||
* color is put together as:
|
||||
* (A << 24) | (R << 16) | (G << 8) | B
|
||||
* This is stored as BGRA on little endian CPU architectures and ARGB on
|
||||
@@ -530,7 +530,7 @@ static void convert_rgba_to_argb(uint8_t
|
||||
*/
|
||||
|
||||
static void convert_image_decode(quicktime_ffmpeg_video_codec_t *codec,
|
||||
- AVFrame * in_frame, enum PixelFormat in_format,
|
||||
+ AVFrame * in_frame, enum AVPixelFormat in_format,
|
||||
unsigned char ** out_frame, int out_format,
|
||||
int width, int height, int row_span, int row_span_uv)
|
||||
{
|
||||
@@ -547,9 +547,9 @@ static void convert_image_decode(quickti
|
||||
* RGBA format like in ffmpeg??
|
||||
*/
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- if((in_format == PIX_FMT_RGBA32) && (out_format == BC_RGBA8888))
|
||||
+ if((in_format == AV_PIX_FMT_RGBA32) && (out_format == BC_RGBA8888))
|
||||
#else
|
||||
- if((in_format == PIX_FMT_RGB32) && (out_format == BC_RGBA8888))
|
||||
+ if((in_format == AV_PIX_FMT_RGB32) && (out_format == BC_RGBA8888))
|
||||
#endif
|
||||
{
|
||||
convert_image_decode_rgba(in_frame, out_frame, width, height, codec->y_offset);
|
||||
@@ -829,7 +829,7 @@ static int lqt_ffmpeg_decode_video(quick
|
||||
if(avcodec_open2(codec->avctx, codec->decoder, NULL) != 0)
|
||||
return -1;
|
||||
#endif
|
||||
- codec->frame = avcodec_alloc_frame();
|
||||
+ codec->frame = av_frame_alloc();
|
||||
vtrack->stream_cmodel = LQT_COLORMODEL_NONE;
|
||||
codec->initialized = 1;
|
||||
}
|
||||
@@ -929,10 +929,10 @@ static int lqt_ffmpeg_decode_video(quick
|
||||
#ifdef HAVE_LIBSWSCALE
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- if(!((codec->avctx->pix_fmt == PIX_FMT_RGBA32) &&
|
||||
+ if(!((codec->avctx->pix_fmt == AV_PIX_FMT_RGBA32) &&
|
||||
(vtrack->stream_cmodel == BC_RGBA8888)))
|
||||
#else
|
||||
- if(!((codec->avctx->pix_fmt == PIX_FMT_RGB32) &&
|
||||
+ if(!((codec->avctx->pix_fmt == AV_PIX_FMT_RGB32) &&
|
||||
(vtrack->stream_cmodel == BC_RGBA8888)))
|
||||
#endif
|
||||
{
|
||||
@@ -1318,7 +1318,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
|
||||
if(!codec->initialized)
|
||||
{
|
||||
- codec->frame = avcodec_alloc_frame();
|
||||
+ codec->frame = av_frame_alloc();
|
||||
|
||||
/* time_base is 1/framerate for constant framerate */
|
||||
|
||||
@@ -1396,9 +1396,9 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
if(vtrack->stream_cmodel == BC_RGBA8888)
|
||||
{
|
||||
/* Libquicktime doesn't natively support a color model equivalent
|
||||
- to PIX_FMT_ARGB, which is required for QTRLE with alpha channel.
|
||||
+ to AV_PIX_FMT_ARGB, which is required for QTRLE with alpha channel.
|
||||
So, we use BC_RGBA8888 and do ad hoc conversion below. */
|
||||
- codec->avctx->pix_fmt = PIX_FMT_ARGB;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_ARGB;
|
||||
vtrack->track->mdia.minf.stbl.stsd.table[0].depth = 32;
|
||||
}
|
||||
}
|
||||
@@ -1467,7 +1467,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
}
|
||||
// codec->lqt_colormodel = ffmepg_2_lqt(codec->com.ffcodec_enc);
|
||||
|
||||
- if(codec->y_offset != 0 || codec->avctx->pix_fmt == PIX_FMT_ARGB)
|
||||
+ if(codec->y_offset != 0 || codec->avctx->pix_fmt == AV_PIX_FMT_ARGB)
|
||||
{
|
||||
if(!codec->tmp_rows)
|
||||
{
|
||||
@@ -1492,7 +1492,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
vtrack->stream_cmodel,
|
||||
0, 0, 0, codec->y_offset);
|
||||
}
|
||||
- else if(codec->avctx->pix_fmt == PIX_FMT_ARGB)
|
||||
+ else if(codec->avctx->pix_fmt == AV_PIX_FMT_ARGB)
|
||||
{
|
||||
convert_rgba_to_argb(row_pointers[0], vtrack->stream_row_span,
|
||||
codec->tmp_rows[0], codec->tmp_row_span,
|
||||
Index: libquicktime-1.2.4/plugins/ffmpeg/audio.c
|
||||
===================================================================
|
||||
--- libquicktime-1.2.4.orig/plugins/ffmpeg/audio.c
|
||||
+++ libquicktime-1.2.4/plugins/ffmpeg/audio.c
|
||||
@@ -1266,7 +1266,7 @@ static int lqt_ffmpeg_encode_audio(quick
|
||||
pkt.data = codec->chunk_buffer;
|
||||
pkt.size = codec->chunk_buffer_alloc;
|
||||
|
||||
- avcodec_get_frame_defaults(&f);
|
||||
+ av_frame_unref(&f);
|
||||
f.nb_samples = codec->avctx->frame_size;
|
||||
|
||||
avcodec_fill_audio_frame(&f, channels, codec->avctx->sample_fmt,
|
@ -0,0 +1,658 @@
|
||||
Index: cinelerra-20140710/cinelerra/ffmpeg.C
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/cinelerra/ffmpeg.C
|
||||
+++ cinelerra-20140710/cinelerra/ffmpeg.C
|
||||
@@ -38,7 +38,7 @@ int FFMPEG::init(char *codec_string) {
|
||||
printf("FFMPEG::init avcodec_open() failed\n");
|
||||
}
|
||||
|
||||
- picture = avcodec_alloc_frame();
|
||||
+ picture = av_frame_alloc();
|
||||
|
||||
|
||||
return 0;
|
||||
@@ -55,62 +55,62 @@ AVCodecID FFMPEG::codec_id(char *codec_s
|
||||
#define CODEC_IS(x) (! strncmp(codec_string, x, 4))
|
||||
|
||||
if (CODEC_IS(QUICKTIME_DV) ||
|
||||
- CODEC_IS(QUICKTIME_DVSD)) return CODEC_ID_DVVIDEO;
|
||||
+ CODEC_IS(QUICKTIME_DVSD)) return AV_CODEC_ID_DVVIDEO;
|
||||
|
||||
if (CODEC_IS(QUICKTIME_MP4V) ||
|
||||
- CODEC_IS(QUICKTIME_DIVX)) return CODEC_ID_MPEG4;
|
||||
+ CODEC_IS(QUICKTIME_DIVX)) return AV_CODEC_ID_MPEG4;
|
||||
|
||||
- return CODEC_ID_NONE;
|
||||
+ return AV_CODEC_ID_NONE;
|
||||
|
||||
#undef CODEC_IS
|
||||
}
|
||||
|
||||
-PixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) {
|
||||
+AVPixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) {
|
||||
switch (color_model)
|
||||
{
|
||||
case BC_YUV422:
|
||||
- return PIX_FMT_YUYV422;
|
||||
+ return AV_PIX_FMT_YUYV422;
|
||||
case BC_RGB888:
|
||||
- return PIX_FMT_RGB24;
|
||||
+ return AV_PIX_FMT_RGB24;
|
||||
case BC_BGR8888: // NOTE: order flipped
|
||||
- return PIX_FMT_RGB32;
|
||||
+ return AV_PIX_FMT_RGB32;
|
||||
case BC_BGR888:
|
||||
- return PIX_FMT_BGR24;
|
||||
+ return AV_PIX_FMT_BGR24;
|
||||
case BC_YUV420P:
|
||||
- return PIX_FMT_YUV420P;
|
||||
+ return AV_PIX_FMT_YUV420P;
|
||||
case BC_YUV422P:
|
||||
- return PIX_FMT_YUV422P;
|
||||
+ return AV_PIX_FMT_YUV422P;
|
||||
case BC_YUV444P:
|
||||
- return PIX_FMT_YUV444P;
|
||||
+ return AV_PIX_FMT_YUV444P;
|
||||
case BC_YUV411P:
|
||||
- return PIX_FMT_YUV411P;
|
||||
+ return AV_PIX_FMT_YUV411P;
|
||||
case BC_RGB565:
|
||||
- return PIX_FMT_RGB565;
|
||||
+ return AV_PIX_FMT_RGB565;
|
||||
};
|
||||
|
||||
- return PIX_FMT_NB;
|
||||
+ return AV_PIX_FMT_NB;
|
||||
}
|
||||
|
||||
-int FFMPEG::pix_fmt_to_color_model(PixelFormat pix_fmt) {
|
||||
+int FFMPEG::pix_fmt_to_color_model(AVPixelFormat pix_fmt) {
|
||||
switch (pix_fmt)
|
||||
{
|
||||
- case PIX_FMT_YUYV422:
|
||||
+ case AV_PIX_FMT_YUYV422:
|
||||
return BC_YUV422;
|
||||
- case PIX_FMT_RGB24:
|
||||
+ case AV_PIX_FMT_RGB24:
|
||||
return BC_RGB888;
|
||||
- case PIX_FMT_RGB32:
|
||||
+ case AV_PIX_FMT_RGB32:
|
||||
return BC_BGR8888;
|
||||
- case PIX_FMT_BGR24:
|
||||
+ case AV_PIX_FMT_BGR24:
|
||||
return BC_BGR888;
|
||||
- case PIX_FMT_YUV420P:
|
||||
+ case AV_PIX_FMT_YUV420P:
|
||||
return BC_YUV420P;
|
||||
- case PIX_FMT_YUV422P:
|
||||
+ case AV_PIX_FMT_YUV422P:
|
||||
return BC_YUV422P;
|
||||
- case PIX_FMT_YUV444P:
|
||||
+ case AV_PIX_FMT_YUV444P:
|
||||
return BC_YUV444P;
|
||||
- case PIX_FMT_YUV411P:
|
||||
+ case AV_PIX_FMT_YUV411P:
|
||||
return BC_YUV411P;
|
||||
- case PIX_FMT_RGB565:
|
||||
+ case AV_PIX_FMT_RGB565:
|
||||
return BC_RGB565;
|
||||
};
|
||||
|
||||
@@ -119,7 +119,7 @@ int FFMPEG::pix_fmt_to_color_model(Pixel
|
||||
|
||||
int FFMPEG::init_picture_from_frame(AVPicture *picture, VFrame *frame) {
|
||||
int cmodel = frame->get_color_model();
|
||||
- PixelFormat pix_fmt = color_model_to_pix_fmt(cmodel);
|
||||
+ AVPixelFormat pix_fmt = color_model_to_pix_fmt(cmodel);
|
||||
|
||||
int size = avpicture_fill(picture, frame->get_data(), pix_fmt,
|
||||
frame->get_w(), frame->get_h());
|
||||
@@ -142,16 +142,16 @@ int FFMPEG::init_picture_from_frame(AVPi
|
||||
|
||||
int FFMPEG::convert_cmodel(VFrame *frame_in, VFrame *frame_out) {
|
||||
|
||||
- PixelFormat pix_fmt_in =
|
||||
+ AVPixelFormat pix_fmt_in =
|
||||
color_model_to_pix_fmt(frame_in->get_color_model());
|
||||
- PixelFormat pix_fmt_out =
|
||||
+ AVPixelFormat pix_fmt_out =
|
||||
color_model_to_pix_fmt(frame_out->get_color_model());
|
||||
#ifdef HAVE_SWSCALER
|
||||
// We need a context for swscale
|
||||
struct SwsContext *convert_ctx;
|
||||
#endif
|
||||
// do conversion within libavcodec if possible
|
||||
- if (pix_fmt_in != PIX_FMT_NB && pix_fmt_out != PIX_FMT_NB) {
|
||||
+ if (pix_fmt_in != AV_PIX_FMT_NB && pix_fmt_out != AV_PIX_FMT_NB) {
|
||||
// set up a temporary pictures from frame_in and frame_out
|
||||
AVPicture picture_in, picture_out;
|
||||
init_picture_from_frame(&picture_in, frame_in);
|
||||
@@ -226,14 +226,14 @@ int FFMPEG::convert_cmodel_transfer(VFra
|
||||
}
|
||||
|
||||
|
||||
-int FFMPEG::convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt_in,
|
||||
+int FFMPEG::convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt_in,
|
||||
int width_in, int height_in, VFrame *frame_out) {
|
||||
|
||||
// set up a temporary picture_out from frame_out
|
||||
AVPicture picture_out;
|
||||
init_picture_from_frame(&picture_out, frame_out);
|
||||
int cmodel_out = frame_out->get_color_model();
|
||||
- PixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out);
|
||||
+ AVPixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out);
|
||||
|
||||
#ifdef HAVE_SWSCALER
|
||||
// We need a context for swscale
|
||||
@@ -242,7 +242,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi
|
||||
int result;
|
||||
#ifndef HAVE_SWSCALER
|
||||
// do conversion within libavcodec if possible
|
||||
- if (pix_fmt_out != PIX_FMT_NB) {
|
||||
+ if (pix_fmt_out != AV_PIX_FMT_NB) {
|
||||
result = img_convert(&picture_out,
|
||||
pix_fmt_out,
|
||||
picture_in,
|
||||
@@ -280,7 +280,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi
|
||||
// make an intermediate temp frame only if necessary
|
||||
int cmodel_in = pix_fmt_to_color_model(pix_fmt_in);
|
||||
if (cmodel_in == BC_TRANSPARENCY) {
|
||||
- if (pix_fmt_in == PIX_FMT_RGB32) {
|
||||
+ if (pix_fmt_in == AV_PIX_FMT_RGB32) {
|
||||
// avoid infinite recursion if things are broken
|
||||
printf("FFMPEG::convert_cmodel pix_fmt_in broken!\n");
|
||||
return 1;
|
||||
Index: cinelerra-20140710/cinelerra/ffmpeg.h
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/cinelerra/ffmpeg.h
|
||||
+++ cinelerra-20140710/cinelerra/ffmpeg.h
|
||||
@@ -18,7 +18,7 @@ class FFMPEG
|
||||
int init(char *codec_string);
|
||||
int decode(uint8_t *data, long data_size, VFrame *frame_out);
|
||||
|
||||
- static int convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt,
|
||||
+ static int convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt,
|
||||
int width_in, int height_in,
|
||||
VFrame *frame_out);
|
||||
static int convert_cmodel(VFrame *frame_in, VFrame *frame_out);
|
||||
@@ -29,8 +29,8 @@ class FFMPEG
|
||||
static AVCodecID codec_id(char *codec_string);
|
||||
|
||||
private:
|
||||
- static PixelFormat color_model_to_pix_fmt(int color_model);
|
||||
- static int pix_fmt_to_color_model(PixelFormat pix_fmt);
|
||||
+ static AVPixelFormat color_model_to_pix_fmt(int color_model);
|
||||
+ static int pix_fmt_to_color_model(AVPixelFormat pix_fmt);
|
||||
|
||||
int got_picture;
|
||||
Asset *asset;
|
||||
Index: cinelerra-20140710/cinelerra/fileac3.C
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/cinelerra/fileac3.C
|
||||
+++ cinelerra-20140710/cinelerra/fileac3.C
|
||||
@@ -85,7 +85,7 @@ int FileAC3::open_file(int rd, int wr)
|
||||
if(wr)
|
||||
{
|
||||
avcodec_register_all();
|
||||
- codec = avcodec_find_encoder(CODEC_ID_AC3);
|
||||
+ codec = avcodec_find_encoder(AV_CODEC_ID_AC3);
|
||||
if(!codec)
|
||||
{
|
||||
eprintf("codec not found.\n");
|
||||
@@ -211,12 +211,56 @@ int FileAC3::write_samples(double **buff
|
||||
current_sample + frame_size <= temp_raw_size;
|
||||
current_sample += frame_size)
|
||||
{
|
||||
- int compressed_size = avcodec_encode_audio(
|
||||
- codec_context,
|
||||
- temp_compressed + output_size,
|
||||
- compressed_allocated - output_size,
|
||||
- temp_raw + current_sample * asset->channels);
|
||||
- output_size += compressed_size;
|
||||
+ AVPacket pkt;
|
||||
+ AVFrame *frame;
|
||||
+ int ret, samples_size, got_packet;
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = temp_compressed + output_size;
|
||||
+ pkt.size = compressed_allocated - output_size;
|
||||
+ frame = av_frame_alloc();
|
||||
+ if(!frame) return AVERROR(ENOMEM);
|
||||
+ if(codec_context->frame_size) {
|
||||
+ frame->nb_samples = codec_context->frame_size;
|
||||
+ } else {
|
||||
+ /* if frame_size is not set, the number of samples must be
|
||||
+ * * calculated from the buffer size */
|
||||
+ int64_t nb_samples;
|
||||
+ if (!av_get_bits_per_sample(codec_context->codec_id)) {
|
||||
+ av_frame_free(&frame);
|
||||
+ return AVERROR(EINVAL);
|
||||
+ }
|
||||
+ nb_samples = (int64_t)(compressed_allocated - output_size) * 8 /
|
||||
+ (av_get_bits_per_sample(codec_context->codec_id) *
|
||||
+ codec_context->channels);
|
||||
+ if (nb_samples >= INT_MAX) {
|
||||
+ av_frame_free(&frame);
|
||||
+ return AVERROR(EINVAL);
|
||||
+ }
|
||||
+ frame->nb_samples = nb_samples;
|
||||
+ }
|
||||
+
|
||||
+ /* it is assumed that the samples buffer is large enough based on the
|
||||
+ * * relevant parameters */
|
||||
+ samples_size = av_samples_get_buffer_size(NULL, codec_context->channels,
|
||||
+ frame->nb_samples,
|
||||
+ codec_context->sample_fmt, 1);
|
||||
+ if ((ret = avcodec_fill_audio_frame(frame, codec_context->channels,
|
||||
+ codec_context->sample_fmt,
|
||||
+ (const uint8_t *)(temp_raw + current_sample * asset->channels),
|
||||
+ samples_size, 1)) < 0) {
|
||||
+ av_frame_free(&frame);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = avcodec_encode_audio2(codec_context, &pkt, frame, &got_packet);
|
||||
+ output_size += pkt.size;
|
||||
+ /* free any side data since we cannot return it */
|
||||
+ av_packet_free_side_data(&pkt);
|
||||
+
|
||||
+ if (frame && frame->extended_data != frame->data)
|
||||
+ av_freep(&frame->extended_data);
|
||||
+
|
||||
+ av_frame_free(&frame);
|
||||
}
|
||||
|
||||
// Shift buffer back
|
||||
Index: cinelerra-20140710/quicktime/mpeg4.c
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/quicktime/mpeg4.c
|
||||
+++ cinelerra-20140710/quicktime/mpeg4.c
|
||||
@@ -595,7 +595,7 @@ static int encode(quicktime_t *file, uns
|
||||
if(!codec->encode_initialized[current_field])
|
||||
{
|
||||
// Encore section
|
||||
- if(codec->ffmpeg_id == CODEC_ID_MPEG4 && codec->use_encore)
|
||||
+ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 && codec->use_encore)
|
||||
{
|
||||
codec->encode_initialized[current_field] = 1;
|
||||
codec->encode_handle[current_field] = encode_handle++;
|
||||
@@ -647,7 +647,7 @@ static int encode(quicktime_t *file, uns
|
||||
context->width = width_i;
|
||||
context->height = height_i;
|
||||
context->gop_size = codec->gop_size;
|
||||
- context->pix_fmt = PIX_FMT_YUV420P;
|
||||
+ context->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
context->bit_rate = codec->bitrate / codec->total_fields;
|
||||
context->bit_rate_tolerance = codec->bitrate_tolerance;
|
||||
context->rc_eq = video_rc_eq;
|
||||
@@ -705,19 +705,19 @@ static int encode(quicktime_t *file, uns
|
||||
// All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg...
|
||||
|
||||
// Copyed from ffmpeg's mpegvideo.c... set 4MV only where it is supported
|
||||
- if(codec->ffmpeg_id == CODEC_ID_MPEG4 ||
|
||||
- codec->ffmpeg_id == CODEC_ID_H263 ||
|
||||
- codec->ffmpeg_id == CODEC_ID_H263P ||
|
||||
- codec->ffmpeg_id == CODEC_ID_FLV1)
|
||||
+ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 ||
|
||||
+ codec->ffmpeg_id == AV_CODEC_ID_H263 ||
|
||||
+ codec->ffmpeg_id == AV_CODEC_ID_H263P ||
|
||||
+ codec->ffmpeg_id == AV_CODEC_ID_FLV1)
|
||||
context->flags |= CODEC_FLAG_4MV;
|
||||
// Not compatible with Win
|
||||
// context->flags |= CODEC_FLAG_QPEL;
|
||||
|
||||
if(file->cpus > 1 &&
|
||||
- (codec->ffmpeg_id == CODEC_ID_MPEG4 ||
|
||||
- codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
|
||||
- codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
|
||||
- codec->ffmpeg_id == CODEC_ID_H263P ))
|
||||
+ (codec->ffmpeg_id == AV_CODEC_ID_MPEG4 ||
|
||||
+ codec->ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO ||
|
||||
+ codec->ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO ||
|
||||
+ codec->ffmpeg_id == AV_CODEC_ID_H263P ))
|
||||
{
|
||||
context->thread_count = file->cpus;
|
||||
}
|
||||
@@ -740,7 +740,7 @@ static int encode(quicktime_t *file, uns
|
||||
*/
|
||||
avcodec_open2(context, codec->encoder[current_field], opts);
|
||||
|
||||
- avcodec_get_frame_defaults(&codec->picture[current_field]);
|
||||
+ av_frame_unref(&codec->picture[current_field]);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -891,10 +891,18 @@ static int encode(quicktime_t *file, uns
|
||||
picture->quality = 0;
|
||||
picture->pts = vtrack->current_position * quicktime_frame_rate_d(file, track);
|
||||
picture->key_frame = 0;
|
||||
- bytes = avcodec_encode_video(context,
|
||||
- codec->work_buffer,
|
||||
- codec->buffer_size,
|
||||
- picture);
|
||||
+
|
||||
+ AVPacket pkt;
|
||||
+ int ret, got_pkt;
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = codec->work_buffer;
|
||||
+ pkt.size = codec->buffer_size;
|
||||
+ ret = avcodec_encode_video2(context,
|
||||
+ &pkt,
|
||||
+ picture, &got_pkt);
|
||||
+ bytes = pkt.size;
|
||||
+ if(ret < 0 || !got_pkt) return 1;
|
||||
+
|
||||
is_keyframe = context->coded_frame && context->coded_frame->key_frame;
|
||||
/*
|
||||
* printf("encode current_position=%d is_keyframe=%d\n",
|
||||
@@ -1161,7 +1169,7 @@ void quicktime_init_codec_div3(quicktime
|
||||
QUICKTIME_DIV3,
|
||||
"DIVX",
|
||||
"Mike Row Soft MPEG4 Version 3");
|
||||
- result->ffmpeg_id = CODEC_ID_MSMPEG4V3;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_div5(quicktime_video_map_t *vtrack)
|
||||
@@ -1170,7 +1178,7 @@ void quicktime_init_codec_div5(quicktime
|
||||
QUICKTIME_DX50,
|
||||
"DIVX",
|
||||
"Mike Row Soft MPEG4 Version 5");
|
||||
- result->ffmpeg_id = CODEC_ID_MPEG4;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MPEG4;
|
||||
}
|
||||
|
||||
// Mike Rowe Soft MPEG-4
|
||||
@@ -1180,7 +1188,7 @@ void quicktime_init_codec_div3lower(quic
|
||||
QUICKTIME_DIV3_LOWER,
|
||||
"DIVX",
|
||||
"Mike Row Soft MPEG4 Version 3");
|
||||
- result->ffmpeg_id = CODEC_ID_MSMPEG4V3;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_div3v2(quicktime_video_map_t *vtrack)
|
||||
@@ -1189,7 +1197,7 @@ void quicktime_init_codec_div3v2(quickti
|
||||
QUICKTIME_MP42,
|
||||
"MP42",
|
||||
"Mike Row Soft MPEG4 Version 2");
|
||||
- result->ffmpeg_id = CODEC_ID_MSMPEG4V2;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V2;
|
||||
}
|
||||
|
||||
// Generic MPEG-4
|
||||
@@ -1199,7 +1207,7 @@ void quicktime_init_codec_divx(quicktime
|
||||
QUICKTIME_DIVX,
|
||||
"MPEG-4",
|
||||
"Generic MPEG Four");
|
||||
- result->ffmpeg_id = CODEC_ID_MPEG4;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MPEG4;
|
||||
result->use_encore = 1;
|
||||
}
|
||||
|
||||
@@ -1209,7 +1217,7 @@ void quicktime_init_codec_mpg4(quicktime
|
||||
QUICKTIME_MPG4,
|
||||
"MPEG-4",
|
||||
"FFMPEG (msmpeg4)");
|
||||
- result->ffmpeg_id = CODEC_ID_MSMPEG4V1;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V1;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_dx50(quicktime_video_map_t *vtrack)
|
||||
@@ -1218,7 +1226,7 @@ void quicktime_init_codec_dx50(quicktime
|
||||
QUICKTIME_DX50,
|
||||
"MPEG-4",
|
||||
"FFMPEG (mpeg4)");
|
||||
- result->ffmpeg_id = CODEC_ID_MPEG4;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MPEG4;
|
||||
}
|
||||
|
||||
// Generic MPEG-4
|
||||
@@ -1228,7 +1236,7 @@ void quicktime_init_codec_mp4v(quicktime
|
||||
QUICKTIME_MP4V,
|
||||
"MPEG4",
|
||||
"Generic MPEG Four");
|
||||
- result->ffmpeg_id = CODEC_ID_MPEG4;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MPEG4;
|
||||
// result->use_encore = 1;
|
||||
}
|
||||
|
||||
@@ -1240,7 +1248,7 @@ void quicktime_init_codec_svq1(quicktime
|
||||
QUICKTIME_SVQ1,
|
||||
"Sorenson Version 1",
|
||||
"From the chearch of codecs of yesterday's sights");
|
||||
- result->ffmpeg_id = CODEC_ID_SVQ1;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_SVQ1;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_svq3(quicktime_video_map_t *vtrack)
|
||||
@@ -1249,7 +1257,7 @@ void quicktime_init_codec_svq3(quicktime
|
||||
QUICKTIME_SVQ3,
|
||||
"Sorenson Version 3",
|
||||
"From the chearch of codecs of yesterday's sights");
|
||||
- result->ffmpeg_id = CODEC_ID_SVQ3;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_SVQ3;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_h263(quicktime_video_map_t *vtrack)
|
||||
@@ -1258,7 +1266,7 @@ void quicktime_init_codec_h263(quicktime
|
||||
QUICKTIME_H263,
|
||||
"H.263",
|
||||
"H.263");
|
||||
- result->ffmpeg_id = CODEC_ID_H263;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_H263;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_xvid(quicktime_video_map_t *vtrack)
|
||||
@@ -1267,7 +1275,7 @@ void quicktime_init_codec_xvid(quicktime
|
||||
QUICKTIME_XVID,
|
||||
"XVID",
|
||||
"FFmpeg MPEG-4");
|
||||
- result->ffmpeg_id = CODEC_ID_MPEG4;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MPEG4;
|
||||
}
|
||||
|
||||
void quicktime_init_codec_dnxhd(quicktime_video_map_t *vtrack)
|
||||
@@ -1276,7 +1284,7 @@ void quicktime_init_codec_dnxhd(quicktim
|
||||
QUICKTIME_DNXHD,
|
||||
"DNXHD",
|
||||
"DNXHD");
|
||||
- result->ffmpeg_id = CODEC_ID_DNXHD;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_DNXHD;
|
||||
}
|
||||
|
||||
// field based MPEG-4
|
||||
@@ -1287,7 +1295,7 @@ void quicktime_init_codec_hv60(quicktime
|
||||
"Dual MPEG-4",
|
||||
"MPEG 4 with alternating streams every other frame. (Not standardized)");
|
||||
result->total_fields = 2;
|
||||
- result->ffmpeg_id = CODEC_ID_MPEG4;
|
||||
+ result->ffmpeg_id = AV_CODEC_ID_MPEG4;
|
||||
}
|
||||
|
||||
|
||||
Index: cinelerra-20140710/quicktime/qtffmpeg.c
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/quicktime/qtffmpeg.c
|
||||
+++ cinelerra-20140710/quicktime/qtffmpeg.c
|
||||
@@ -39,7 +39,7 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg
|
||||
ptr->height = h;
|
||||
ptr->ffmpeg_id = ffmpeg_id;
|
||||
//printf("quicktime_new_ffmpeg 1 %d\n", ptr->ffmpeg_id);
|
||||
- if(ffmpeg_id == CODEC_ID_SVQ1)
|
||||
+ if(ffmpeg_id == AV_CODEC_ID_SVQ1)
|
||||
{
|
||||
ptr->width_i = quicktime_quantize32(ptr->width);
|
||||
ptr->height_i = quicktime_quantize32(ptr->height);
|
||||
@@ -86,10 +86,10 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg
|
||||
context->extradata_size = avcc->data_size;
|
||||
}
|
||||
if(cpus > 1 &&
|
||||
- (ffmpeg_id == CODEC_ID_MPEG4 ||
|
||||
- ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
|
||||
- ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
|
||||
- ffmpeg_id == CODEC_ID_H263P ))
|
||||
+ (ffmpeg_id == AV_CODEC_ID_MPEG4 ||
|
||||
+ ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO ||
|
||||
+ ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO ||
|
||||
+ ffmpeg_id == AV_CODEC_ID_H263P ))
|
||||
{
|
||||
context->thread_count = cpus;
|
||||
}
|
||||
@@ -224,16 +224,16 @@ static int get_chroma_factor(quicktime_f
|
||||
{
|
||||
switch(ffmpeg->decoder_context[current_field]->pix_fmt)
|
||||
{
|
||||
- case PIX_FMT_YUV420P:
|
||||
+ case AV_PIX_FMT_YUV420P:
|
||||
return 4;
|
||||
break;
|
||||
- case PIX_FMT_YUYV422:
|
||||
+ case AV_PIX_FMT_YUYV422:
|
||||
return 2;
|
||||
break;
|
||||
- case PIX_FMT_YUV422P:
|
||||
+ case AV_PIX_FMT_YUV422P:
|
||||
return 2;
|
||||
break;
|
||||
- case PIX_FMT_YUV410P:
|
||||
+ case AV_PIX_FMT_YUV410P:
|
||||
return 9;
|
||||
break;
|
||||
default:
|
||||
@@ -277,7 +277,7 @@ int quicktime_ffmpeg_decode(quicktime_ff
|
||||
//printf("quicktime_ffmpeg_decode 1 %d\n", ffmpeg->last_frame[current_field]);
|
||||
|
||||
if(ffmpeg->last_frame[current_field] == -1 &&
|
||||
- ffmpeg->ffmpeg_id != CODEC_ID_H264)
|
||||
+ ffmpeg->ffmpeg_id != AV_CODEC_ID_H264)
|
||||
{
|
||||
int current_frame = vtrack->current_position;
|
||||
// For certain codecs,
|
||||
@@ -328,7 +328,7 @@ int quicktime_ffmpeg_decode(quicktime_ff
|
||||
// For MPEG-4, get another keyframe before first keyframe.
|
||||
// The Sanyo tends to glitch with only 1 keyframe.
|
||||
// Not enough memory.
|
||||
- if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == CODEC_ID_MPEG4 */)
|
||||
+ if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == AV_CODEC_ID_MPEG4 */)
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -423,16 +423,16 @@ int quicktime_ffmpeg_decode(quicktime_ff
|
||||
// Hopefully this setting will be left over if the cache was used.
|
||||
switch(ffmpeg->decoder_context[current_field]->pix_fmt)
|
||||
{
|
||||
- case PIX_FMT_YUV420P:
|
||||
+ case AV_PIX_FMT_YUV420P:
|
||||
input_cmodel = BC_YUV420P;
|
||||
break;
|
||||
- case PIX_FMT_YUYV422:
|
||||
+ case AV_PIX_FMT_YUYV422:
|
||||
input_cmodel = BC_YUV422;
|
||||
break;
|
||||
- case PIX_FMT_YUV422P:
|
||||
+ case AV_PIX_FMT_YUV422P:
|
||||
input_cmodel = BC_YUV422P;
|
||||
break;
|
||||
- case PIX_FMT_YUV410P:
|
||||
+ case AV_PIX_FMT_YUV410P:
|
||||
input_cmodel = BC_YUV9P;
|
||||
break;
|
||||
default:
|
||||
Index: cinelerra-20140710/quicktime/qth264.c
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/quicktime/qth264.c
|
||||
+++ cinelerra-20140710/quicktime/qth264.c
|
||||
@@ -370,7 +370,7 @@ static int decode(quicktime_t *file, uns
|
||||
if(!codec->decoder) codec->decoder = quicktime_new_ffmpeg(
|
||||
file->cpus,
|
||||
codec->total_fields,
|
||||
- CODEC_ID_H264,
|
||||
+ AV_CODEC_ID_H264,
|
||||
width,
|
||||
height,
|
||||
stsd_table);
|
||||
Index: cinelerra-20140710/quicktime/wma.c
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/quicktime/wma.c
|
||||
+++ cinelerra-20140710/quicktime/wma.c
|
||||
@@ -193,15 +193,38 @@ printf("decode 2 %x %llx %llx\n", chunk_
|
||||
codec->packet_buffer,
|
||||
chunk_size);
|
||||
#else
|
||||
- bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||
AVPacket pkt;
|
||||
av_init_packet( &pkt );
|
||||
pkt.data = codec->packet_buffer;
|
||||
pkt.size = chunk_size;
|
||||
- result = avcodec_decode_audio3(codec->decoder_context,
|
||||
- (int16_t*)(codec->work_buffer + codec->output_size * sample_size),
|
||||
- &bytes_decoded,
|
||||
+ AVFrame *frame = av_frame_alloc();
|
||||
+ int got_frame = 0;
|
||||
+
|
||||
+ result = avcodec_decode_audio4(codec->decoder_context,
|
||||
+ frame, &got_frame,
|
||||
&pkt);
|
||||
+
|
||||
+ if(result >= 0 && got_frame)
|
||||
+ {
|
||||
+ int ch, plane_size;
|
||||
+ int planar = av_sample_fmt_is_planar(codec->decoder_context->sample_fmt);
|
||||
+ int data_size = av_samples_get_buffer_size(&plane_size, codec->decoder_context->channels,
|
||||
+ frame->nb_samples,
|
||||
+ codec->decoder_context->sample_fmt, 1);
|
||||
+ memcpy(codec->work_buffer + codec->output_size * sample_size, frame->extended_data[0], plane_size);
|
||||
+
|
||||
+ if (planar && codec->decoder_context->channels > 1) {
|
||||
+ uint8_t *out = ((uint8_t *)(codec->work_buffer + codec->output_size * sample_size)) + plane_size;
|
||||
+ for (ch = 1; ch < codec->decoder_context->channels; ch++) {
|
||||
+ memcpy(out, frame->extended_data[ch], plane_size);
|
||||
+ out += plane_size;
|
||||
+ }
|
||||
+ }
|
||||
+ bytes_decoded = data_size;
|
||||
+ } else {
|
||||
+ bytes_decoded = 0;
|
||||
+ }
|
||||
+ av_frame_free(&frame);
|
||||
#endif
|
||||
|
||||
pthread_mutex_unlock(&ffmpeg_lock);
|
||||
@@ -298,7 +321,7 @@ void quicktime_init_codec_wmav1(quicktim
|
||||
codec_base->title = "Win Media Audio 1";
|
||||
codec_base->desc = "Win Media Audio 1";
|
||||
codec_base->wav_id = 0x160;
|
||||
- codec->ffmpeg_id = CODEC_ID_WMAV1;
|
||||
+ codec->ffmpeg_id = AV_CODEC_ID_WMAV1;
|
||||
}
|
||||
|
||||
|
||||
@@ -313,5 +336,5 @@ void quicktime_init_codec_wmav2(quicktim
|
||||
codec_base->title = "Win Media Audio 2";
|
||||
codec_base->desc = "Win Media Audio 2";
|
||||
codec_base->wav_id = 0x161;
|
||||
- codec->ffmpeg_id = CODEC_ID_WMAV2;
|
||||
+ codec->ffmpeg_id = AV_CODEC_ID_WMAV2;
|
||||
}
|
||||
Index: cinelerra-20140710/cinelerra/fileyuv.C
|
||||
===================================================================
|
||||
--- cinelerra-20140710.orig/cinelerra/fileyuv.C
|
||||
+++ cinelerra-20140710/cinelerra/fileyuv.C
|
||||
@@ -196,7 +196,7 @@ int FileYUV::write_frames(VFrame ***laye
|
||||
return stream->write_frame_raw(frame->get_data(), frame_size);
|
||||
|
||||
// decode and write an encoded frame
|
||||
- if (FFMPEG::codec_id(incoming_asset->vcodec) != CODEC_ID_NONE)
|
||||
+ if (FFMPEG::codec_id(incoming_asset->vcodec) != AV_CODEC_ID_NONE)
|
||||
{
|
||||
if (! ffmpeg)
|
||||
{
|
||||
@@ -306,7 +306,7 @@ int FileYUV::can_copy_from(Edit *edit, i
|
||||
if (edit->asset->format == FILE_YUV) return 1;
|
||||
|
||||
// if FFMPEG can decode it, we'll accept it
|
||||
- if (FFMPEG::codec_id(edit->asset->vcodec) != CODEC_ID_NONE) return 1;
|
||||
+ if (FFMPEG::codec_id(edit->asset->vcodec) != AV_CODEC_ID_NONE) return 1;
|
||||
|
||||
incoming_asset = 0;
|
||||
|
@ -0,0 +1,31 @@
|
||||
Index: DVDStyler-2.9.3/src/mediaenc_ffmpeg.cpp
|
||||
===================================================================
|
||||
--- DVDStyler-2.9.3.orig/src/mediaenc_ffmpeg.cpp
|
||||
+++ DVDStyler-2.9.3/src/mediaenc_ffmpeg.cpp
|
||||
@@ -178,7 +178,7 @@ bool wxFfmpegMediaEncoder::addVideoStrea
|
||||
c->time_base.den = isNTSC(videoFormat) ? 30000 : 25;
|
||||
c->time_base.num = isNTSC(videoFormat) ? 1001 : 1;
|
||||
c->gop_size = isNTSC(videoFormat) ? 15 : 12;
|
||||
- c->pix_fmt = PIX_FMT_YUV420P;
|
||||
+ c->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
c->rc_buffer_size = VIDEO_BUF_SIZE;
|
||||
c->rc_max_rate = 9000000;
|
||||
c->rc_min_rate = 0;
|
||||
@@ -279,7 +279,7 @@ void wxFfmpegMediaEncoder::CloseAudioEnc
|
||||
m_audioStm = NULL;
|
||||
}
|
||||
|
||||
-AVFrame* allocPicture(PixelFormat pix_fmt, int width, int height) {
|
||||
+AVFrame* allocPicture(AVPixelFormat pix_fmt, int width, int height) {
|
||||
AVFrame* frame = av_frame_alloc();
|
||||
if (!frame)
|
||||
return NULL;
|
||||
@@ -318,7 +318,7 @@ bool wxFfmpegMediaEncoder::OpenVideoEnco
|
||||
return false;
|
||||
}
|
||||
|
||||
- m_imgConvertCtx = sws_getContext(c->width, c->height, PIX_FMT_RGB24, c->width, c->height, c->pix_fmt, SWS_BICUBIC,
|
||||
+ m_imgConvertCtx = sws_getContext(c->width, c->height, AV_PIX_FMT_RGB24, c->width, c->height, c->pix_fmt, SWS_BICUBIC,
|
||||
NULL, NULL, NULL);
|
||||
if (!m_imgConvertCtx) {
|
||||
wxLogError(wxT("Cannot initialize the conversion context"));
|
@ -0,0 +1,204 @@
|
||||
Index: ffmpeg2theora-0.29/src/avinfo.c
|
||||
===================================================================
|
||||
--- ffmpeg2theora-0.29.orig/src/avinfo.c
|
||||
+++ ffmpeg2theora-0.29/src/avinfo.c
|
||||
@@ -174,7 +174,7 @@ void json_codec_info(FILE *output, AVCod
|
||||
|
||||
if (p) {
|
||||
codec_name = p->name;
|
||||
- } else if (enc->codec_id == CODEC_ID_MPEG2TS) {
|
||||
+ } else if (enc->codec_id == AV_CODEC_ID_MPEG2TS) {
|
||||
/* fake mpeg2 transport stream codec (currently not
|
||||
registered) */
|
||||
codec_name = "mpeg2ts";
|
||||
@@ -200,7 +200,7 @@ void json_codec_info(FILE *output, AVCod
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
codec_name = fix_codec_name(codec_name);
|
||||
json_add_key_value(output, "codec", (void *)codec_name, JSON_STRING, 0, indent);
|
||||
- if (enc->pix_fmt != PIX_FMT_NONE) {
|
||||
+ if (enc->pix_fmt != AV_PIX_FMT_NONE) {
|
||||
json_add_key_value(output, "pixel_format", (void *)av_get_pix_fmt_name(enc->pix_fmt), JSON_STRING, 0, indent);
|
||||
}
|
||||
if (enc->width) {
|
||||
@@ -235,37 +235,37 @@ void json_codec_info(FILE *output, AVCod
|
||||
|
||||
/* for PCM codecs, compute bitrate directly */
|
||||
switch(enc->codec_id) {
|
||||
- case CODEC_ID_PCM_F64BE:
|
||||
- case CODEC_ID_PCM_F64LE:
|
||||
+ case AV_CODEC_ID_PCM_F64BE:
|
||||
+ case AV_CODEC_ID_PCM_F64LE:
|
||||
bitrate = enc->sample_rate * enc->channels * 64;
|
||||
break;
|
||||
- case CODEC_ID_PCM_S32LE:
|
||||
- case CODEC_ID_PCM_S32BE:
|
||||
- case CODEC_ID_PCM_U32LE:
|
||||
- case CODEC_ID_PCM_U32BE:
|
||||
- case CODEC_ID_PCM_F32BE:
|
||||
- case CODEC_ID_PCM_F32LE:
|
||||
+ case AV_CODEC_ID_PCM_S32LE:
|
||||
+ case AV_CODEC_ID_PCM_S32BE:
|
||||
+ case AV_CODEC_ID_PCM_U32LE:
|
||||
+ case AV_CODEC_ID_PCM_U32BE:
|
||||
+ case AV_CODEC_ID_PCM_F32BE:
|
||||
+ case AV_CODEC_ID_PCM_F32LE:
|
||||
bitrate = enc->sample_rate * enc->channels * 32;
|
||||
break;
|
||||
- case CODEC_ID_PCM_S24LE:
|
||||
- case CODEC_ID_PCM_S24BE:
|
||||
- case CODEC_ID_PCM_U24LE:
|
||||
- case CODEC_ID_PCM_U24BE:
|
||||
- case CODEC_ID_PCM_S24DAUD:
|
||||
+ case AV_CODEC_ID_PCM_S24LE:
|
||||
+ case AV_CODEC_ID_PCM_S24BE:
|
||||
+ case AV_CODEC_ID_PCM_U24LE:
|
||||
+ case AV_CODEC_ID_PCM_U24BE:
|
||||
+ case AV_CODEC_ID_PCM_S24DAUD:
|
||||
bitrate = enc->sample_rate * enc->channels * 24;
|
||||
break;
|
||||
- case CODEC_ID_PCM_S16LE:
|
||||
- case CODEC_ID_PCM_S16BE:
|
||||
- case CODEC_ID_PCM_S16LE_PLANAR:
|
||||
- case CODEC_ID_PCM_U16LE:
|
||||
- case CODEC_ID_PCM_U16BE:
|
||||
+ case AV_CODEC_ID_PCM_S16LE:
|
||||
+ case AV_CODEC_ID_PCM_S16BE:
|
||||
+ case AV_CODEC_ID_PCM_S16LE_PLANAR:
|
||||
+ case AV_CODEC_ID_PCM_U16LE:
|
||||
+ case AV_CODEC_ID_PCM_U16BE:
|
||||
bitrate = enc->sample_rate * enc->channels * 16;
|
||||
break;
|
||||
- case CODEC_ID_PCM_S8:
|
||||
- case CODEC_ID_PCM_U8:
|
||||
- case CODEC_ID_PCM_ALAW:
|
||||
- case CODEC_ID_PCM_MULAW:
|
||||
- case CODEC_ID_PCM_ZORK:
|
||||
+ case AV_CODEC_ID_PCM_S8:
|
||||
+ case AV_CODEC_ID_PCM_U8:
|
||||
+ case AV_CODEC_ID_PCM_ALAW:
|
||||
+ case AV_CODEC_ID_PCM_MULAW:
|
||||
+ case AV_CODEC_ID_PCM_ZORK:
|
||||
bitrate = enc->sample_rate * enc->channels * 8;
|
||||
break;
|
||||
default:
|
||||
Index: ffmpeg2theora-0.29/src/ffmpeg2theora.c
|
||||
===================================================================
|
||||
--- ffmpeg2theora-0.29.orig/src/ffmpeg2theora.c
|
||||
+++ ffmpeg2theora-0.29/src/ffmpeg2theora.c
|
||||
@@ -143,7 +143,7 @@ static AVFrame *frame_alloc(int pix_fmt,
|
||||
uint8_t *picture_buf;
|
||||
int size;
|
||||
|
||||
- picture = avcodec_alloc_frame();
|
||||
+ picture = av_frame_alloc();
|
||||
if (!picture)
|
||||
return NULL;
|
||||
size = avpicture_get_size (pix_fmt, width, height);
|
||||
@@ -226,7 +226,7 @@ static ff2theora ff2theora_init() {
|
||||
this->kate_streams=NULL;
|
||||
this->ignore_non_utf8 = 0;
|
||||
|
||||
- this->pix_fmt = PIX_FMT_YUV420P;
|
||||
+ this->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
|
||||
// ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv
|
||||
this->video_gamma = 0.0;
|
||||
@@ -350,14 +350,14 @@ static const char *find_category_for_sub
|
||||
AVCodecContext *enc = this->context->streams[idx]->codec;
|
||||
if (enc->codec_type != AVMEDIA_TYPE_SUBTITLE) return 0;
|
||||
switch (enc->codec_id) {
|
||||
- case CODEC_ID_TEXT:
|
||||
- case CODEC_ID_SSA:
|
||||
- case CODEC_ID_MOV_TEXT:
|
||||
+ case AV_CODEC_ID_TEXT:
|
||||
+ case AV_CODEC_ID_SSA:
|
||||
+ case AV_CODEC_ID_MOV_TEXT:
|
||||
if (included_subtitles & INCSUB_TEXT)
|
||||
return "SUB";
|
||||
else
|
||||
return NULL;
|
||||
- case CODEC_ID_DVD_SUBTITLE:
|
||||
+ case AV_CODEC_ID_DVD_SUBTITLE:
|
||||
if (included_subtitles & INCSUB_SPU)
|
||||
return "K-SPU";
|
||||
else
|
||||
@@ -1434,18 +1434,9 @@ void ff2theora_output(ff2theora this) {
|
||||
av_picture_copy((AVPicture *)output_tmp, (AVPicture *)frame, this->pix_fmt,
|
||||
display_width, display_height);
|
||||
output_tmp_p=NULL;
|
||||
- }
|
||||
- if ((this->deinterlace==0 && frame->interlaced_frame) ||
|
||||
- this->deinterlace==1) {
|
||||
- if (avpicture_deinterlace((AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,display_width,display_height)<0) {
|
||||
- fprintf(stderr, "Deinterlace failed.\n");
|
||||
- exit(1);
|
||||
- }
|
||||
- }
|
||||
- else{
|
||||
- av_picture_copy((AVPicture *)output, (AVPicture *)output_tmp, this->pix_fmt,
|
||||
- display_width, display_height);
|
||||
- }
|
||||
+ }
|
||||
+ av_picture_copy((AVPicture *)output, (AVPicture *)output_tmp, this->pix_fmt,
|
||||
+ display_width, display_height);
|
||||
// now output
|
||||
|
||||
if (ppMode)
|
||||
@@ -1537,11 +1528,37 @@ void ff2theora_output(ff2theora this) {
|
||||
int bytes_per_sample = av_get_bytes_per_sample(aenc->sample_fmt);
|
||||
|
||||
if (avpkt.size > 0) {
|
||||
- len1 = avcodec_decode_audio3(astream->codec, audio_buf, &data_size, &avpkt);
|
||||
+ AVFrame *frame = av_frame_alloc();
|
||||
+ int got_frame = 0;
|
||||
+
|
||||
+ if(!frame) break;
|
||||
+
|
||||
+ len1 = avcodec_decode_audio4(astream->codec, frame, &got_frame, &avpkt);
|
||||
if (len1 < 0) {
|
||||
/* if error, we skip the frame */
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ if (len1 >= 0 && got_frame) {
|
||||
+ int ch, plane_size;
|
||||
+ int planar = av_sample_fmt_is_planar(astream->codec->sample_fmt);
|
||||
+ data_size = av_samples_get_buffer_size(&plane_size, astream->codec->channels,
|
||||
+ frame->nb_samples,
|
||||
+ astream->codec->sample_fmt, 1);
|
||||
+ memcpy(audio_buf, frame->extended_data[0], plane_size);
|
||||
+
|
||||
+ if (planar && astream->codec->channels > 1) {
|
||||
+ uint8_t *out = ((uint8_t *)audio_buf) + plane_size;
|
||||
+ for (ch = 1; ch < astream->codec->channels; ch++) {
|
||||
+ memcpy(out, frame->extended_data[ch], plane_size);
|
||||
+ out += plane_size;
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ data_size = 0;
|
||||
+ }
|
||||
+ av_frame_free(&frame);
|
||||
+
|
||||
avpkt.size -= len1;
|
||||
avpkt.data += len1;
|
||||
if (data_size >0) {
|
||||
@@ -1642,15 +1659,15 @@ void ff2theora_output(ff2theora this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
- else if (enc->codec_id == CODEC_ID_TEXT) {
|
||||
+ else if (enc->codec_id == AV_CODEC_ID_TEXT) {
|
||||
utf8 = pkt.data;
|
||||
utf8len = pkt.size;
|
||||
}
|
||||
- else if (enc->codec_id == CODEC_ID_SSA) {
|
||||
+ else if (enc->codec_id == AV_CODEC_ID_SSA) {
|
||||
// SSA has control stuff in there, extract raw text
|
||||
extra_info_from_ssa(&pkt,&utf8,&utf8len,&allocated_utf8,&duration);
|
||||
}
|
||||
- else if (enc->codec_id == CODEC_ID_MOV_TEXT) {
|
||||
+ else if (enc->codec_id == AV_CODEC_ID_MOV_TEXT) {
|
||||
utf8 = pkt.data;
|
||||
utf8len = pkt.size;
|
||||
if (utf8len >= 2) {
|
@ -0,0 +1,57 @@
|
||||
Index: gpac-0.5.2/applications/dashcast/video_encoder.c
|
||||
===================================================================
|
||||
--- gpac-0.5.2.orig/applications/dashcast/video_encoder.c
|
||||
+++ gpac-0.5.2/applications/dashcast/video_encoder.c
|
||||
@@ -86,7 +86,7 @@ int dc_video_encoder_open(VideoOutputFil
|
||||
video_output_file->codec_ctx->time_base.den = video_data_conf->time_base.den;
|
||||
video_output_file->codec_ctx->time_base.num = video_data_conf->time_base.num * video_data_conf->time_base.den / video_data_conf->framerate;
|
||||
}
|
||||
- video_output_file->codec_ctx->pix_fmt = PIX_FMT_YUV420P;
|
||||
+ video_output_file->codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
|
||||
|
||||
// video_output_file->codec_ctx->codec_id = video_codec->id;
|
||||
@@ -96,7 +96,7 @@ int dc_video_encoder_open(VideoOutputFil
|
||||
// video_output_file->codec_ctx->height = video_data_conf->height;
|
||||
// video_output_file->codec_ctx->time_base = (AVRational) {1 ,
|
||||
// video_output_file->video_data_conf->framerate};
|
||||
-// video_output_file->codec_ctx->codec->pix_fmt = PIX_FMT_YUV420P;
|
||||
+// video_output_file->codec_ctx->codec->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
|
||||
//
|
||||
// av_opt_set(video_output_file->codec_ctx->priv_data, "preset", "ultrafast", 0);
|
||||
Index: gpac-0.5.2/applications/dashcast/video_muxer.c
|
||||
===================================================================
|
||||
--- gpac-0.5.2.orig/applications/dashcast/video_muxer.c
|
||||
+++ gpac-0.5.2/applications/dashcast/video_muxer.c
|
||||
@@ -643,7 +643,7 @@ int dc_ffmpeg_video_muxer_open(VideoOutp
|
||||
|
||||
video_stream->codec->time_base = video_codec_ctx->time_base;
|
||||
|
||||
- video_stream->codec->pix_fmt = PIX_FMT_YUV420P;
|
||||
+ video_stream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
video_stream->codec->gop_size = video_codec_ctx->time_base.den; //video_output_file->video_data_conf->framerate;
|
||||
|
||||
av_opt_set(video_stream->codec->priv_data, "preset", "ultrafast", 0);
|
||||
Index: gpac-0.5.2/applications/dashcast/video_scaler.c
|
||||
===================================================================
|
||||
--- gpac-0.5.2.orig/applications/dashcast/video_scaler.c
|
||||
+++ gpac-0.5.2/applications/dashcast/video_scaler.c
|
||||
@@ -125,7 +125,7 @@ int dc_video_scaler_data_init(VideoInput
|
||||
dc_consumer_init(&video_scaled_data->consumer, video_cb_size, name);
|
||||
|
||||
video_scaled_data->num_producers = max_source;
|
||||
- video_scaled_data->out_pix_fmt = PIX_FMT_YUV420P;
|
||||
+ video_scaled_data->out_pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
GF_SAFE_ALLOC_N(video_scaled_data->vsprop, max_source, VideoScaledProp);
|
||||
memset(video_scaled_data->vsprop, 0, max_source * sizeof(VideoScaledProp));
|
||||
|
||||
@@ -198,7 +198,7 @@ int dc_video_scaler_scale(VideoInputData
|
||||
video_scaled_data_node->cropped_frame->width = video_input_data->vprop[index].width - video_input_data->vprop[index].crop_x;
|
||||
video_scaled_data_node->cropped_frame->height = video_input_data->vprop[index].height - video_input_data->vprop[index].crop_y;
|
||||
#endif
|
||||
- if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
|
||||
+ if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, AV_PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
|
||||
GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("Video scaler: error while cropping picture.\n"));
|
||||
return -1;
|
||||
}
|
@ -0,0 +1,307 @@
|
||||
Index: gpac-0.5.2/modules/ffmpeg_in/ffmpeg_decode.c
|
||||
===================================================================
|
||||
--- gpac-0.5.2.orig/modules/ffmpeg_in/ffmpeg_decode.c
|
||||
+++ gpac-0.5.2/modules/ffmpeg_in/ffmpeg_decode.c
|
||||
@@ -102,7 +102,7 @@ static void FFDEC_LoadDSI(FFDec *ffd, GF
|
||||
}
|
||||
|
||||
switch (codec->id) {
|
||||
- case CODEC_ID_SVQ3:
|
||||
+ case AV_CODEC_ID_SVQ3:
|
||||
{
|
||||
u32 at_type, size;
|
||||
size = gf_bs_read_u32(bs);
|
||||
@@ -240,10 +240,10 @@ static GF_Err FFDEC_AttachStream(GF_Base
|
||||
(*ctx)->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
switch (ffd->oti) {
|
||||
case GPAC_OTI_VIDEO_MPEG4_PART2:
|
||||
- codec_id = CODEC_ID_MPEG4;
|
||||
+ codec_id = AV_CODEC_ID_MPEG4;
|
||||
break;
|
||||
case GPAC_OTI_VIDEO_AVC:
|
||||
- codec_id = CODEC_ID_H264;
|
||||
+ codec_id = AV_CODEC_ID_H264;
|
||||
break;
|
||||
#ifdef HAS_HEVC
|
||||
case GPAC_OTI_VIDEO_HEVC:
|
||||
@@ -257,14 +257,14 @@ static GF_Err FFDEC_AttachStream(GF_Base
|
||||
case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
|
||||
case GPAC_OTI_VIDEO_MPEG2_HIGH:
|
||||
case GPAC_OTI_VIDEO_MPEG2_422:
|
||||
- codec_id = CODEC_ID_MPEG2VIDEO;
|
||||
+ codec_id = AV_CODEC_ID_MPEG2VIDEO;
|
||||
break;
|
||||
case GPAC_OTI_IMAGE_JPEG:
|
||||
- codec_id = CODEC_ID_MJPEG;
|
||||
+ codec_id = AV_CODEC_ID_MJPEG;
|
||||
ffd->is_image=1;
|
||||
break;
|
||||
case 0xFF:
|
||||
- codec_id = CODEC_ID_SVQ3;
|
||||
+ codec_id = AV_CODEC_ID_SVQ3;
|
||||
break;
|
||||
}
|
||||
} else if (ffd->st==GF_STREAM_AUDIO) {
|
||||
@@ -273,18 +273,18 @@ static GF_Err FFDEC_AttachStream(GF_Base
|
||||
case GPAC_OTI_AUDIO_MPEG2_PART3:
|
||||
case GPAC_OTI_AUDIO_MPEG1:
|
||||
(*ctx)->frame_size = 1152;
|
||||
- codec_id = CODEC_ID_MP2;
|
||||
+ codec_id = AV_CODEC_ID_MP2;
|
||||
break;
|
||||
case GPAC_OTI_AUDIO_AC3:
|
||||
- codec_id = CODEC_ID_AC3;
|
||||
+ codec_id = AV_CODEC_ID_AC3;
|
||||
break;
|
||||
case GPAC_OTI_AUDIO_EAC3:
|
||||
- codec_id = CODEC_ID_EAC3;
|
||||
+ codec_id = AV_CODEC_ID_EAC3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ((ffd->st==GF_STREAM_ND_SUBPIC) && (ffd->oti==0xe0)) {
|
||||
- codec_id = CODEC_ID_DVD_SUBTITLE;
|
||||
+ codec_id = AV_CODEC_ID_DVD_SUBTITLE;
|
||||
}
|
||||
*codec = avcodec_find_decoder(codec_id);
|
||||
}
|
||||
@@ -375,8 +375,8 @@ static GF_Err FFDEC_AttachStream(GF_Base
|
||||
#endif //HAS_HEVC
|
||||
if (!ffd->output_cb_size) ffd->output_cb_size = 4;
|
||||
|
||||
- if (codec_id == CODEC_ID_RAWVIDEO) {
|
||||
- (*ctx)->codec_id = CODEC_ID_RAWVIDEO;
|
||||
+ if (codec_id == AV_CODEC_ID_RAWVIDEO) {
|
||||
+ (*ctx)->codec_id = AV_CODEC_ID_RAWVIDEO;
|
||||
(*ctx)->pix_fmt = ffd->raw_pix_fmt;
|
||||
if ((*ctx)->extradata && strstr((char *) (*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
|
||||
} else {
|
||||
@@ -388,7 +388,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
|
||||
}
|
||||
/*setup audio streams*/
|
||||
if (ffd->st==GF_STREAM_AUDIO) {
|
||||
- if ((*codec)->id == CODEC_ID_MP2) {
|
||||
+ if ((*codec)->id == AV_CODEC_ID_MP2) {
|
||||
(*ctx)->frame_size = ((*ctx)->sample_rate > 24000) ? 1152 : 576;
|
||||
}
|
||||
/*may be 0 (cfg not known yet)*/
|
||||
@@ -408,17 +408,17 @@ static GF_Err FFDEC_AttachStream(GF_Base
|
||||
|
||||
} else {
|
||||
switch ((*codec)->id) {
|
||||
- case CODEC_ID_MJPEG:
|
||||
- case CODEC_ID_MJPEGB:
|
||||
- case CODEC_ID_LJPEG:
|
||||
+ case AV_CODEC_ID_MJPEG:
|
||||
+ case AV_CODEC_ID_MJPEGB:
|
||||
+ case AV_CODEC_ID_LJPEG:
|
||||
#if (LIBAVCODEC_VERSION_INT > AV_VERSION_INT(51, 20, 0))
|
||||
- case CODEC_ID_GIF:
|
||||
+ case AV_CODEC_ID_GIF:
|
||||
#endif
|
||||
- case CODEC_ID_RAWVIDEO:
|
||||
+ case AV_CODEC_ID_RAWVIDEO:
|
||||
ffd->pix_fmt = GF_PIXEL_RGB_24;
|
||||
break;
|
||||
|
||||
- case CODEC_ID_DVD_SUBTITLE:
|
||||
+ case AV_CODEC_ID_DVD_SUBTITLE:
|
||||
#if !defined(FF_API_AVFRAME_LAVC)
|
||||
*frame = avcodec_alloc_frame();
|
||||
#else
|
||||
@@ -843,7 +843,7 @@ redecode:
|
||||
}
|
||||
|
||||
|
||||
- if ( ctx->codec_id == CODEC_ID_RAWVIDEO) {
|
||||
+ if ( ctx->codec_id == AV_CODEC_ID_RAWVIDEO) {
|
||||
if (*outBufferLength != ffd->out_size) {
|
||||
*outBufferLength = ffd->out_size;
|
||||
return GF_BUFFER_TOO_SMALL;
|
||||
@@ -852,7 +852,7 @@ redecode:
|
||||
*outBufferLength = ffd->out_size;
|
||||
assert(inBufferLength==ffd->out_size);
|
||||
|
||||
- if (ffd->raw_pix_fmt==PIX_FMT_BGR24) {
|
||||
+ if (ffd->raw_pix_fmt==AV_PIX_FMT_BGR24) {
|
||||
s32 i, j;
|
||||
for (j=0; j<ctx->height; j++) {
|
||||
u8 *src = (u8 *) inBuffer + j*3*ctx->width;
|
||||
@@ -940,7 +940,7 @@ redecode:
|
||||
/*OK we loose the DSI stored in the codec context, but H263 doesn't need any, and if we're
|
||||
here this means the DSI was broken, so no big deal*/
|
||||
avcodec_close(ctx);
|
||||
- *codec = avcodec_find_decoder(CODEC_ID_H263);
|
||||
+ *codec = avcodec_find_decoder(AV_CODEC_ID_H263);
|
||||
|
||||
#ifdef USE_AVCTX3
|
||||
if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
|
||||
@@ -991,7 +991,7 @@ redecode:
|
||||
|
||||
stride = frame->linesize[0];
|
||||
#ifndef NO_10bit
|
||||
- if ((ctx->pix_fmt == PIX_FMT_YUV420P10LE) && ffd->output_as_8bit && (frame->linesize[0] >= 2*w) ) {
|
||||
+ if ((ctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) && ffd->output_as_8bit && (frame->linesize[0] >= 2*w) ) {
|
||||
ffd->conv_to_8bit = 1;
|
||||
stride=w;
|
||||
}
|
||||
@@ -1000,7 +1000,7 @@ redecode:
|
||||
/*recompute outsize in case on-the-fly change*/
|
||||
if ((w != ctx->width) || (h != ctx->height)
|
||||
|| (ffd->direct_output && (stride != ffd->stride))
|
||||
- || ((ffd->out_pix_fmt==GF_PIXEL_YV12) && (ctx->pix_fmt != PIX_FMT_YUV420P) && !ffd->output_as_8bit )
|
||||
+ || ((ffd->out_pix_fmt==GF_PIXEL_YV12) && (ctx->pix_fmt != AV_PIX_FMT_YUV420P) && !ffd->output_as_8bit )
|
||||
//need to realloc the conversion buffer
|
||||
|| (ffd->conv_to_8bit && !ffd->conv_buffer && ffd->direct_output)
|
||||
) {
|
||||
@@ -1011,7 +1011,7 @@ redecode:
|
||||
}
|
||||
#ifndef NO_10bit
|
||||
//this YUV format is handled natively in GPAC
|
||||
- else if ((ctx->pix_fmt == PIX_FMT_YUV420P10LE) && !ffd->output_as_8bit) {
|
||||
+ else if ((ctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) && !ffd->output_as_8bit) {
|
||||
ffd->stride = ffd->direct_output ? frame->linesize[0] : ctx->width*2;
|
||||
outsize = ffd->stride * ctx->height * 3 / 2;
|
||||
ffd->out_pix_fmt = GF_PIXEL_YV12_10;
|
||||
@@ -1157,23 +1157,20 @@ redecode:
|
||||
if (ffd->out_pix_fmt==GF_PIXEL_RGB_24) {
|
||||
pict.data[0] = (uint8_t *)outBuffer;
|
||||
pict.linesize[0] = 3*ctx->width;
|
||||
- pix_out = PIX_FMT_RGB24;
|
||||
+ pix_out = AV_PIX_FMT_RGB24;
|
||||
} else {
|
||||
pict.data[0] = (uint8_t *)outBuffer;
|
||||
pict.data[1] = (uint8_t *)outBuffer + ffd->stride * ctx->height;
|
||||
pict.data[2] = (uint8_t *)outBuffer + 5 * ffd->stride * ctx->height / 4;
|
||||
pict.linesize[0] = ffd->stride;
|
||||
pict.linesize[1] = pict.linesize[2] = ffd->stride/2;
|
||||
- pix_out = PIX_FMT_YUV420P;
|
||||
+ pix_out = AV_PIX_FMT_YUV420P;
|
||||
#ifndef NO_10bit
|
||||
//this YUV format is handled natively in GPAC
|
||||
- if (ctx->pix_fmt==PIX_FMT_YUV420P10LE) {
|
||||
- pix_out = PIX_FMT_YUV420P10LE;
|
||||
+ if (ctx->pix_fmt==AV_PIX_FMT_YUV420P10LE) {
|
||||
+ pix_out = AV_PIX_FMT_YUV420P10LE;
|
||||
}
|
||||
#endif
|
||||
- if (!mmlevel && frame->interlaced_frame) {
|
||||
- avpicture_deinterlace((AVPicture *) frame, (AVPicture *) frame, ctx->pix_fmt, ctx->width, ctx->height);
|
||||
- }
|
||||
}
|
||||
pict.data[3] = 0;
|
||||
pict.linesize[3] = 0;
|
||||
@@ -1263,13 +1260,13 @@ static u32 FFDEC_CanHandleStream(GF_Base
|
||||
switch (ffd->oti) {
|
||||
case GPAC_OTI_AUDIO_MPEG2_PART3:
|
||||
case GPAC_OTI_AUDIO_MPEG1:
|
||||
- codec_id = CODEC_ID_MP2;
|
||||
+ codec_id = AV_CODEC_ID_MP2;
|
||||
break;
|
||||
case GPAC_OTI_AUDIO_AC3:
|
||||
- codec_id = CODEC_ID_AC3;
|
||||
+ codec_id = AV_CODEC_ID_AC3;
|
||||
break;
|
||||
case GPAC_OTI_AUDIO_EAC3:
|
||||
- codec_id = CODEC_ID_EAC3;
|
||||
+ codec_id = AV_CODEC_ID_EAC3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1309,11 +1306,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
|
||||
switch (ffd->oti) {
|
||||
/*MPEG-4 v1 simple profile*/
|
||||
case GPAC_OTI_VIDEO_MPEG4_PART2:
|
||||
- codec_id = CODEC_ID_MPEG4;
|
||||
+ codec_id = AV_CODEC_ID_MPEG4;
|
||||
break;
|
||||
/*H264 (not std OTI, just the way we use it internally)*/
|
||||
case GPAC_OTI_VIDEO_AVC:
|
||||
- codec_id = CODEC_ID_H264;
|
||||
+ codec_id = AV_CODEC_ID_H264;
|
||||
break;
|
||||
#ifdef HAS_HEVC
|
||||
case GPAC_OTI_VIDEO_HEVC:
|
||||
@@ -1329,11 +1326,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
|
||||
case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
|
||||
case GPAC_OTI_VIDEO_MPEG2_HIGH:
|
||||
case GPAC_OTI_VIDEO_MPEG2_422:
|
||||
- codec_id = CODEC_ID_MPEG2VIDEO;
|
||||
+ codec_id = AV_CODEC_ID_MPEG2VIDEO;
|
||||
break;
|
||||
/*JPEG*/
|
||||
case GPAC_OTI_IMAGE_JPEG:
|
||||
- codec_id = CODEC_ID_MJPEG;
|
||||
+ codec_id = AV_CODEC_ID_MJPEG;
|
||||
/*return maybe supported as FFMPEG JPEG decoder has some issues with many files, so let's use it only if no
|
||||
other dec is available*/
|
||||
if (avcodec_find_decoder(codec_id) != NULL)
|
||||
Index: gpac-0.5.2/modules/ffmpeg_in/ffmpeg_demux.c
|
||||
===================================================================
|
||||
--- gpac-0.5.2.orig/modules/ffmpeg_in/ffmpeg_demux.c
|
||||
+++ gpac-0.5.2/modules/ffmpeg_in/ffmpeg_demux.c
|
||||
@@ -333,13 +333,13 @@ static GF_ESD *FFD_GetESDescriptor(FFDem
|
||||
AVCodecContext *dec = ffd->ctx->streams[ffd->audio_st]->codec;
|
||||
esd->slConfig->timestampResolution = ffd->audio_tscale.den;
|
||||
switch (dec->codec_id) {
|
||||
- case CODEC_ID_MP2:
|
||||
+ case AV_CODEC_ID_MP2:
|
||||
esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_MPEG1;
|
||||
break;
|
||||
- case CODEC_ID_MP3:
|
||||
+ case AV_CODEC_ID_MP3:
|
||||
esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_MPEG2_PART3;
|
||||
break;
|
||||
- case CODEC_ID_AAC:
|
||||
+ case AV_CODEC_ID_AAC:
|
||||
if (!dec->extradata_size) goto opaque_audio;
|
||||
esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_AAC_MPEG4;
|
||||
esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
|
||||
@@ -374,25 +374,25 @@ opaque_audio:
|
||||
AVCodecContext *dec = ffd->ctx->streams[ffd->video_st]->codec;
|
||||
esd->slConfig->timestampResolution = ffd->video_tscale.den;
|
||||
switch (dec->codec_id) {
|
||||
- case CODEC_ID_MPEG4:
|
||||
+ case AV_CODEC_ID_MPEG4:
|
||||
/*there is a bug in fragmentation of raw H264 in ffmpeg, the NALU startcode (0x00000001) is split across
|
||||
two frames - we therefore force internal ffmpeg codec ID to avoid NALU size recompute
|
||||
at the decoder level*/
|
||||
-// case CODEC_ID_H264:
|
||||
+// case AV_CODEC_ID_H264:
|
||||
/*if dsi not detected force use ffmpeg*/
|
||||
if (!dec->extradata_size) goto opaque_video;
|
||||
/*otherwise use any MPEG-4 Visual*/
|
||||
- esd->decoderConfig->objectTypeIndication = (dec->codec_id==CODEC_ID_H264) ? GPAC_OTI_VIDEO_AVC : GPAC_OTI_VIDEO_MPEG4_PART2;
|
||||
+ esd->decoderConfig->objectTypeIndication = (dec->codec_id==AV_CODEC_ID_H264) ? GPAC_OTI_VIDEO_AVC : GPAC_OTI_VIDEO_MPEG4_PART2;
|
||||
esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
|
||||
esd->decoderConfig->decoderSpecificInfo->data = gf_malloc(sizeof(char)*dec->extradata_size);
|
||||
memcpy(esd->decoderConfig->decoderSpecificInfo->data,
|
||||
dec->extradata,
|
||||
sizeof(char)*dec->extradata_size);
|
||||
break;
|
||||
- case CODEC_ID_MPEG1VIDEO:
|
||||
+ case AV_CODEC_ID_MPEG1VIDEO:
|
||||
esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG1;
|
||||
break;
|
||||
- case CODEC_ID_MPEG2VIDEO:
|
||||
+ case AV_CODEC_ID_MPEG2VIDEO:
|
||||
esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG2_422;
|
||||
break;
|
||||
default:
|
||||
Index: gpac-0.5.2/modules/Makefile
|
||||
===================================================================
|
||||
--- gpac-0.5.2.orig/modules/Makefile
|
||||
+++ gpac-0.5.2/modules/Makefile
|
||||
@@ -100,12 +100,10 @@ endif
|
||||
|
||||
|
||||
ifneq ($(CONFIG_FFMPEG), no)
|
||||
-ifneq ($(CONFIG_LIBAV), new) #we don't support libav newest APIs
|
||||
ifeq ($(CONFIG_OPENHEVC),no)
|
||||
PLUGDIRS+=ffmpeg_in
|
||||
endif
|
||||
endif
|
||||
-endif
|
||||
|
||||
ifeq ($(CONFIG_OPENHEVC), yes)
|
||||
ifeq ($(CONFIG_FFMPEG), no)
|
@ -1 +1 @@
|
||||
Wed, 16 Sep 2015 06:11:37 +0000
|
||||
Wed, 16 Sep 2015 12:41:28 +0000
|
||||
|
@ -1 +1 @@
|
||||
Wed, 16 Sep 2015 06:11:37 +0000
|
||||
Wed, 16 Sep 2015 12:41:29 +0000
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue