diff --git a/app-accessibility/speech-dispatcher/Manifest b/app-accessibility/speech-dispatcher/Manifest deleted file mode 100644 index ac3729b6d..000000000 --- a/app-accessibility/speech-dispatcher/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST speech-dispatcher-0.8.tar.gz 1229312 SHA256 0a6ce544cfbac8592a8ea08e3ab24c389153904ea51c6fd68756cea52de9efa2 SHA512 57452dd7a436714fbfc75d2d78b65179213cd1032173181865f82a4bb4b33f9dc9b39bc5e39422589447613593dfb1baf058fd67350e116c28955c9627120441 WHIRLPOOL 0a40ee6d8c9e3b7a192d76bd6e968ea9293c0bf2d233dc7d6ef5a95b5491b3a3d503872663c6bba0eb97fb15abb47fec741eb5278b1d5bbdc0bfc125253abb48 -EBUILD speech-dispatcher-0.8-r3.ebuild 2734 SHA256 b35d725c103ef23f15bcb08a8861ff864e5184230cf120ffe5ea52244f53eab3 SHA512 64eabafbe8ddefec8c0057d069858e8efe114129c09c9d228d3a28e708bca33eb0ae1aeb3c8349d5e2cb6f8466f972f7f99a0dfbcac7d5af2265cbf2ec8b5ed9 WHIRLPOOL dd252cea367d7a4ca4895feec0712a6cf405c66ac75d720bf80af0f828faae57759e5b035a173ffa06afb9f5449a5b98e6f48797c3e29cf757fdce98bd7cec89 diff --git a/app-accessibility/speech-dispatcher/speech-dispatcher-0.8-r3.ebuild b/app-accessibility/speech-dispatcher/speech-dispatcher-0.8-r3.ebuild deleted file mode 100644 index e97948023..000000000 --- a/app-accessibility/speech-dispatcher/speech-dispatcher-0.8-r3.ebuild +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-accessibility/speech-dispatcher/speech-dispatcher-0.8-r2.ebuild,v 1.11 2013/08/18 13:26:07 ago Exp $ - -EAPI=5 - -PYTHON_COMPAT=( python3_2 python3_3 ) - -inherit eutils python-r1 - -DESCRIPTION="Speech synthesis interface" -HOMEPAGE="http://www.freebsoft.org/speechd" -SRC_URI="http://www.freebsoft.org/pub/projects/speechd/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" -IUSE="alsa ao +espeak flite nas pulseaudio python static-libs" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -COMMON_DEPEND="python? ( ${PYTHON_DEPS} ) - >=dev-libs/dotconf-1.3 - >=dev-libs/glib-2.28:2 - >=media-libs/libsndfile-1.0.2 - alsa? ( media-libs/alsa-lib ) - ao? ( media-libs/libao ) - espeak? ( app-accessibility/espeak ) - flite? ( app-accessibility/flite ) - nas? ( media-libs/nas ) - pulseaudio? ( media-sound/pulseaudio )" -DEPEND="${COMMON_DEPEND} - >=dev-util/intltool-0.40.0 - virtual/pkgconfig" - RDEPEND="${COMMON_DEPEND}" - -src_configure() { - local myeconfargs=( - --disable-python - $(use_enable static-libs static) - $(use_with alsa) - $(use_with ao libao) - $(use_with espeak) - $(use_with flite) - $(use_with pulseaudio pulse) - $(use_with nas) - ) - econf ${myeconfargs[@]} -} - -src_compile() { - use python && python_copy_sources - - emake - - if use python; then - building() { - cd src/api/python || die - emake \ - pyexecdir="$(python_get_sitedir)" \ - pythondir="$(python_get_sitedir)" - } - python_foreach_impl run_in_build_dir building - fi -} - -src_install() { - emake DESTDIR="${D}" install - dodoc ANNOUNCE AUTHORS BUGS ChangeLog FAQ NEWS README* - - prune_libtool_files --all - - if use python; then - installation() { - cd src/api/python || die - emake \ - DESTDIR="${D}" \ - pyexecdir="$(python_get_sitedir)" \ - pythondir="$(python_get_sitedir)" \ - install - } - python_foreach_impl run_in_build_dir installation - python_replicate_script "${ED}"/usr/bin/spd-conf - fi -} - -pkg_postinst() { - local editconfig="n" - if ! use espeak; then - ewarn "You have disabled espeak, which is speech-dispatcher's" - ewarn "default speech synthesizer." - ewarn - editconfig="y" - fi - if ! use pulseaudio; then - ewarn "You have disabled pulseaudio support." - ewarn "pulseaudio is speech-dispatcher's default audio subsystem." - ewarn - editconfig="y" - fi - if [[ "${editconfig}" == "y" ]]; then - ewarn "You must edit ${EROOT}etc/speech-dispatcher/speechd.conf" - ewarn "and make sure the settings there match your system." - ewarn - fi - elog "For festival support, you need to" - elog "install app-accessibility/festival-freebsoft-utils." -} diff --git a/app-admin/conkyforecast/Manifest b/app-admin/conkyforecast/Manifest deleted file mode 100644 index 4ce73ad73..000000000 --- a/app-admin/conkyforecast/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST conkyforecast_2.15.tar.gz 11016353 RMD160 69b6770c8f575a3fcf462e997bff5b3fd1b6ca36 SHA1 9efc8004abcdbb6e149b91eb07a6dfa98fe28276 SHA256 b393dc6c7ec830a03ae9975a631067e9e632394c24fd512af4a2a5aab688b69b -EBUILD conkyforecast-2.15.ebuild 1146 RMD160 66d5c46ab6bd888514180e7cbbbe7607e278a964 SHA1 1846174867738b56da8ade4f19ecd61b7faae121 SHA256 860c06b823c4c527eff7085b53e02fb8ee3f329c1d1355720f60af5338056062 -MISC metadata.xml 261 RMD160 fd6c87fa63054c379e842b826f994dce900bb013 SHA1 471683d4ccc2d0934e4f154b51de1be0435f508b SHA256 c4a2402d01197b6c1a7476c5b2b1ec7552b4acbc7dd51c7d775c4100c6324c8d diff --git a/app-admin/conkyforecast/conkyforecast-2.15.ebuild b/app-admin/conkyforecast/conkyforecast-2.15.ebuild deleted file mode 100644 index 64e8cf0e7..000000000 --- a/app-admin/conkyforecast/conkyforecast-2.15.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/conkyforecast/conkyforecast-2.15.ebuild,v 1.1 2010/12/22 15:08:22 xmw Exp $ - -EAPI=3 - -PYTHON_DEPEND="2" - -inherit distutils python - -DESCRIPTION="Conky weather forecast script with support for language files" -HOMEPAGE="https://launchpad.net/~conkyhardcore" -SRC_URI="https://launchpad.net/~conkyhardcore/+archive/ppa/+files/${PN}_${PV}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/conky" - -S=${WORKDIR}/src - -pkg_config() { - python_set_active_version 2 - python_pkg_setup -} - -src_prepare() { - sed -i -e "s:/usr/bin/python:$(PYTHON -a):" conkyForecast || die "sed'ing in src_prepare die" - distutils_src_prepare -} - -pkg_postinst() { - elog "You have to define a partner id and registration code for " - elog "the weather.com xoap. You need to copy the template from" - elog "/usr/share/conkyforecast/conkyForecast.config into you account" - elog "as ~/.conkyForecast.config and edit the respective fields." - elog - elog "More details can be found in the README file." -} diff --git a/app-admin/conkyforecast/metadata.xml b/app-admin/conkyforecast/metadata.xml deleted file mode 100644 index 234b4095d..000000000 --- a/app-admin/conkyforecast/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - no-herd - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/app-arch/xarchiver/Manifest b/app-arch/xarchiver/Manifest deleted file mode 100644 index b2281be1f..000000000 --- a/app-arch/xarchiver/Manifest +++ /dev/null @@ -1,7 +0,0 @@ -AUX xarchiver-0.5.2-add-to_escaped_path.patch 834 SHA256 8ce446cb7de71cb59de3d25e809abae4c28a7970dab3e096cb687011c2071cf6 SHA512 54d705aadbecae22083dd31c55831d9059d2ce3c5f98755c7708d858b31aaa3b17f2444e853b3f7b20ba6c0f253ad700e29f0a367ec56b9048ce135884701a7f WHIRLPOOL a10c8aeaffd9a9f8d06fe8e7c47bb648f447e18df5d0fc7d8ab9299857efe6312aac809ca344b46e1bc90a651d5f979c0f18c1a113a73ad140da1f5c21bfb9be -AUX xarchiver-0.5.2-add_xz_support.patch 14741 SHA256 ee5c761073b0065fa62e11302e5f7c81a90d5c896b8bcdadbc0753531fd15a02 SHA512 4047c107956a24a68cd53312a989a9d953c06f8eff4db44367ad4c682c3fd157e481eec5f0ed9027df0a54fe729a4bbbaedc47b00bdea0436334c433af54d6d4 WHIRLPOOL 3e1855b18275f88d5ef156ae02b2dfade901567379c8ff635596093163dd5d6052d6b631fd466fed3229b27cd0082b985b3110075901bb7845450cfa38d32527 -AUX xarchiver-0.5.2-drag-n-drop_escaped_path.patch 795 SHA256 7aa83e3eceae9cf5947d2b1f9fa91bc78b62465d8a743eb0b0b2c1538fa72332 SHA512 3410de95f2650f83f65db06658327e46daa67d4ae1c694e46b2d3623a8b9255c6bedf4ed3a57ea0ef45bcf345fc66fd941d56e15e935bf91d7bd38bb02f054b0 WHIRLPOOL 27bab71b86e21ea3a6a6fdbba849da303d96ef6e6b88d846709c0f0bad4f7ed24d1eb0f79387e1636d76c8c3f95f67fa05febb1bea6eebe0c09810451782644e -AUX xarchiver-0.5.2-stack-smash.patch 581 SHA256 2032d3a7cdafc23b2577a6798af5ca93a913ff2a10ac4cf5adaf176433e9e424 SHA512 dc60b4c8425435eb94e0f6e683ed307ab4068afac7ad62fcdf28ef1b7f0396eeea556db22614d46667db02c261648f7b34f99e2514fc37fe3f66aa59d70689b0 WHIRLPOOL 694db7c0e69d5017811703f3d8df371bfe793d6a64671062474049ab0fd03d5cf18f7dfd81a0aa0a185e27a5a575ce18e3886241227a825a13443e4e100a67f2 -DIST xarchiver-0.5.2.tar.bz2 755418 SHA256 cea932ff9d505969201fd502470bbebbc5726ab3d6765e142fc8295aa677ad2a SHA512 05235f364cfb8f5acc1d3dbb5c581c0d55f72dbc08fd4bc166649740d78e7c76c87b61e64ce5651011a3c1cace369ffd24cd3b1759620be629f9abb6dc29bc5f WHIRLPOOL 97967e6c5d4c19a2b65fd08cdeb15cf649cace15bcf91d49c9e3c1e0cbbfe622851141410f198fd2708d2fc391443cd705f30239f4bb2dfd208f67093624a4b2 -EBUILD xarchiver-0.5.2-r4.ebuild 1461 SHA256 7c4326d64237c286f67cfab7945ab4ecf101e3464e7b2e8679daaef7d1432507 SHA512 7594eb79b01f7269438ad0df89dea2452c6e33011ab62479a550d6fe5e9621cfee350baec02e3eec55838257b4745b35ed8b83ffb84e4f43e98300387b36a339 WHIRLPOOL 08a09723dd27b357dd49ea56526a588f992ebb32eb86e39792a0a4e237cc5c97fe279e9e004d3b3b334c9da922c9694f4e930efb72174155fe663dce8c41dd81 -MISC metadata.xml 282 SHA256 e4c094365dccc476d8033116d416b8c037c870c34df1b13260dca4552b0826eb SHA512 dfd9387fafdec97766a9914a13091b9af56db9134ac0be59302e84703aa21f4344029dc205e4567305a49eb031784d58fa36c8d51ee3666d5e86f62bed67ccf0 WHIRLPOOL 14109a702dc1d738ca84022a51042622d0966748069c9203a60c74eac7e7b8e01ec7c2763b4c30d308557ffde90b93b6a91315b10a25779fd882aaf4deeaf35a diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch deleted file mode 100644 index cd899051e..000000000 --- a/app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/main.c b/src/main.c -index 6e835cb..47bdc7b 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -193,13 +193,13 @@ int main (int argc, char **argv) - g_free(_current_dir); - GSList *files = NULL; - _current_dir = g_path_get_basename(add_files); -- files = g_slist_append(files,xa_escape_filename(_current_dir,"$'`\"\\!?* ()[]&|:;<>#")); -+ files = g_slist_append(files,xa_escape_filename(_current_dir,"$|;<>#")); - g_free(_current_dir); - g_free(add_files); - for (x = 1; x< argc; x++) - { - _current_dir = g_path_get_basename(argv[x]); -- files = g_slist_append(files,xa_escape_filename(_current_dir,"$'`\"\\!?* ()[]&|:;<>#")); -+ files = g_slist_append(files,xa_escape_filename(_current_dir,"$|;<>#")); - g_free (_current_dir); - } - xa_execute_add_commands(archive,files,NULL); diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch deleted file mode 100644 index 09361138b..000000000 --- a/app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch +++ /dev/null @@ -1,314 +0,0 @@ -Patch from: http://slackbuilds.org/repository/13.1/system/xarchiver/ - -Not submitted upstream because the upstream author rewrote the code. So, this -patch may be dropped when/if upstream releases a new version - -diff -Nur xarchiver-0.5.2.orig/src/add_dialog.c xarchiver-0.5.2/src/add_dialog.c ---- xarchiver-0.5.2.orig/src/add_dialog.c 2008-11-10 04:41:31.000000000 -0600 -+++ xarchiver-0.5.2/src/add_dialog.c 2009-11-30 13:17:54.983349491 -0600 -@@ -209,7 +209,7 @@ - else - gtk_widget_set_size_request (add_dialog->dialog1,530,420); - -- if (archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA || archive->type == XARCHIVETYPE_LZOP) -+ if (archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA || archive->type == XARCHIVETYPE_XZ || archive->type == XARCHIVETYPE_LZOP) - gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(add_dialog->filechooserwidget1),FALSE); - else - gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(add_dialog->filechooserwidget1),TRUE); -@@ -222,7 +222,7 @@ - else - gtk_widget_set_sensitive(add_dialog->store_path,TRUE); - /* 7z doesn't appear to let the user chooses if storing full paths */ -- if (archive->type == XARCHIVETYPE_7ZIP || archive->type == XARCHIVETYPE_LZOP || archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA) -+ if (archive->type == XARCHIVETYPE_7ZIP || archive->type == XARCHIVETYPE_LZOP || archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA || archive->type == XARCHIVETYPE_XZ ) - { - flag = FALSE; - } -@@ -244,7 +244,7 @@ - flag = TRUE; - gtk_widget_set_sensitive(add_dialog->solid_archive,flag); - -- if (archive->type != XARCHIVETYPE_TAR && archive->type != XARCHIVETYPE_TAR_GZ && archive->type != XARCHIVETYPE_TAR_LZMA && archive->type != XARCHIVETYPE_TAR_BZ2 && archive->type != XARCHIVETYPE_TAR_LZOP) -+ if (archive->type != XARCHIVETYPE_TAR && archive->type != XARCHIVETYPE_TAR_GZ && archive->type != XARCHIVETYPE_TAR_LZMA && archive->type != XARCHIVETYPE_TAR_XZ && archive->type != XARCHIVETYPE_TAR_BZ2 && archive->type != XARCHIVETYPE_TAR_LZOP) - { - flag = TRUE; - if (archive->type == XARCHIVETYPE_7ZIP) -@@ -306,7 +306,7 @@ - g_signal_connect (G_OBJECT (add_dialog->compression_value),"value-changed",G_CALLBACK (fix_adjustment_value), NULL); - gtk_tooltips_set_tip (add_dialog->option_tooltip,add_dialog->compression_scale, compression_msg, NULL ); - -- if (archive->type == XARCHIVETYPE_TAR || archive->type == XARCHIVETYPE_TAR_GZ || archive->type == XARCHIVETYPE_TAR_LZMA || archive->type == XARCHIVETYPE_TAR_BZ2 || archive->type == XARCHIVETYPE_TAR_LZOP) -+ if (archive->type == XARCHIVETYPE_TAR || archive->type == XARCHIVETYPE_TAR_GZ || archive->type == XARCHIVETYPE_TAR_LZMA || archive->type == XARCHIVETYPE_TAR_XZ || archive->type == XARCHIVETYPE_TAR_BZ2 || archive->type == XARCHIVETYPE_TAR_LZOP) - flag = FALSE; - else - flag = TRUE; -diff -Nur xarchiver-0.5.2.orig/src/archive.h xarchiver-0.5.2/src/archive.h ---- xarchiver-0.5.2.orig/src/archive.h 2008-11-07 02:49:41.000000000 -0600 -+++ xarchiver-0.5.2/src/archive.h 2009-11-30 13:17:54.984326164 -0600 -@@ -30,6 +30,7 @@ - XARCHIVETYPE_BZIP2, - XARCHIVETYPE_GZIP, - XARCHIVETYPE_LZMA, -+ XARCHIVETYPE_XZ, - XARCHIVETYPE_LZOP, - XARCHIVETYPE_RAR, - XARCHIVETYPE_RPM, -@@ -37,6 +38,7 @@ - XARCHIVETYPE_TAR_BZ2, - XARCHIVETYPE_TAR_GZ, - XARCHIVETYPE_TAR_LZMA, -+ XARCHIVETYPE_TAR_XZ, - XARCHIVETYPE_TAR_LZOP, - XARCHIVETYPE_ZIP, - XARCHIVETYPE_LHA, -diff -Nur xarchiver-0.5.2.orig/src/bzip2.c xarchiver-0.5.2/src/bzip2.c ---- xarchiver-0.5.2.orig/src/bzip2.c 2008-11-10 05:17:48.000000000 -0600 -+++ xarchiver-0.5.2/src/bzip2.c 2009-11-30 13:17:54.984326164 -0600 -@@ -54,6 +54,15 @@ - archive->extract = extract[archive->type]; - xa_open_tar_compressed_file(archive); - } -+ else if (g_str_has_suffix(archive->escaped_path,".tar.xz") || g_str_has_suffix (archive->escaped_path,".txz")) -+ { -+ archive->type = XARCHIVETYPE_TAR_XZ; -+ archive->format = "TAR.XZ"; -+ archive->delete = delete[archive->type]; -+ archive->add = add[archive->type]; -+ archive->extract = extract[archive->type]; -+ xa_open_tar_compressed_file(archive); -+ } - else if (g_str_has_suffix(archive->escaped_path,".tar.lzop") || - g_str_has_suffix (archive->escaped_path,".tzo") || - g_str_has_suffix(archive->escaped_path,".tar.lzo")) -@@ -85,6 +94,12 @@ - executable = "lzma "; - len = 5; - } -+ else if (archive->type == XARCHIVETYPE_XZ) -+ { -+ archive->format = "XZ"; -+ executable = "xz "; -+ len = 5; -+ } - else if (archive->type == XARCHIVETYPE_LZOP) - { - archive->format = "LZOP"; -@@ -163,6 +178,8 @@ - command = g_strconcat(tar," tfjv ",archive->escaped_path,NULL); - else if (archive->type == XARCHIVETYPE_TAR_LZMA) - command = g_strconcat(tar," tv --use-compress-program=lzma -f ",archive->escaped_path,NULL); -+ else if (archive->type == XARCHIVETYPE_TAR_XZ) -+ command = g_strconcat(tar," tv --use-compress-program=xz -f ",archive->escaped_path,NULL); - else if (archive->type == XARCHIVETYPE_TAR_LZOP) - command = g_strconcat(tar," tv --use-compress-program=lzop -f ",archive->escaped_path,NULL); - /* else fail? */ -@@ -205,6 +222,11 @@ - executable = "lzma "; - len = 5; - } -+ else if (archive->type == XARCHIVETYPE_XZ) -+ { -+ executable = "xz "; -+ len = 5; -+ } - else if (archive->type == XARCHIVETYPE_LZOP) - { - executable = "lzop "; -diff -Nur xarchiver-0.5.2.orig/src/extract_dialog.c xarchiver-0.5.2/src/extract_dialog.c ---- xarchiver-0.5.2.orig/src/extract_dialog.c 2008-11-10 04:28:11.000000000 -0600 -+++ xarchiver-0.5.2/src/extract_dialog.c 2009-11-30 13:17:54.985326653 -0600 -@@ -815,6 +815,11 @@ - archive->type = XARCHIVETYPE_TAR_LZMA; - archive->extract = extract[XARCHIVETYPE_TAR_LZMA]; - } -+ else if (g_str_has_suffix(archive->escaped_path,".tar.xz")|| g_str_has_suffix (archive->escaped_path,".txz")) -+ { -+ archive->type = XARCHIVETYPE_TAR_XZ; -+ archive->extract = extract[XARCHIVETYPE_TAR_XZ]; -+ } - else if (g_str_has_suffix(archive->escaped_path,".tar.lzop") || - g_str_has_suffix (archive->escaped_path,".tzo") || - g_str_has_suffix(archive->escaped_path,".tar.lzo")) -diff -Nur xarchiver-0.5.2.orig/src/main.c xarchiver-0.5.2/src/main.c ---- xarchiver-0.5.2.orig/src/main.c 2008-11-10 05:21:43.000000000 -0600 -+++ xarchiver-0.5.2/src/main.c 2009-11-30 13:17:54.986351656 -0600 -@@ -296,9 +296,10 @@ - open_archive[XARCHIVETYPE_BZIP2] = &xa_open_bzip2_lzma; - open_archive[XARCHIVETYPE_GZIP] = &xa_open_gzip; - open_archive[XARCHIVETYPE_LZMA] = &xa_open_bzip2_lzma; -+ open_archive[XARCHIVETYPE_XZ] = &xa_open_bzip2_lzma; - open_archive[XARCHIVETYPE_RAR] = &xa_open_rar; - open_archive[XARCHIVETYPE_RPM] = &xa_open_rpm; -- open_archive[XARCHIVETYPE_TAR] = open_archive[XARCHIVETYPE_TAR_BZ2] = open_archive[XARCHIVETYPE_TAR_GZ] = open_archive[XARCHIVETYPE_TAR_LZMA] = open_archive[XARCHIVETYPE_TAR_LZOP] = &xa_open_tar; -+ open_archive[XARCHIVETYPE_TAR] = open_archive[XARCHIVETYPE_TAR_BZ2] = open_archive[XARCHIVETYPE_TAR_GZ] = open_archive[XARCHIVETYPE_TAR_LZMA] = open_archive[XARCHIVETYPE_TAR_XZ] = open_archive[XARCHIVETYPE_TAR_LZOP] = &xa_open_tar; - open_archive[XARCHIVETYPE_ZIP] = &xa_open_zip; - open_archive[XARCHIVETYPE_LHA] = &xa_open_lha; - open_archive[XARCHIVETYPE_LZOP] = &xa_open_bzip2_lzma; -@@ -310,6 +311,7 @@ - delete[XARCHIVETYPE_BZIP2] = 0; - delete[XARCHIVETYPE_GZIP] = 0; - delete[XARCHIVETYPE_LZMA] = 0; -+ delete[XARCHIVETYPE_XZ] = 0; - delete[XARCHIVETYPE_RAR] = &xa_rar_delete; - delete[XARCHIVETYPE_RPM] = 0; - delete[XARCHIVETYPE_TAR] = delete[XARCHIVETYPE_TAR_BZ2] = delete[XARCHIVETYPE_TAR_GZ] = delete[XARCHIVETYPE_TAR_LZMA] = delete[XARCHIVETYPE_TAR_LZOP] = &xa_tar_delete; -@@ -325,7 +327,7 @@ - add[XARCHIVETYPE_BZIP2] = add[XARCHIVETYPE_GZIP] = add[XARCHIVETYPE_LZMA] = &xa_tar_add; - add[XARCHIVETYPE_RAR] = &xa_rar_add; - add[XARCHIVETYPE_RPM] = 0; -- add[XARCHIVETYPE_TAR] = add[XARCHIVETYPE_TAR_BZ2] = add[XARCHIVETYPE_TAR_GZ] = add[XARCHIVETYPE_TAR_LZMA] = add[XARCHIVETYPE_TAR_LZOP] = &xa_tar_add; -+ add[XARCHIVETYPE_TAR] = add[XARCHIVETYPE_TAR_BZ2] = add[XARCHIVETYPE_TAR_GZ] = add[XARCHIVETYPE_TAR_LZMA] = add[XARCHIVETYPE_TAR_XZ] = add[XARCHIVETYPE_TAR_LZOP] = &xa_tar_add; - add[XARCHIVETYPE_ZIP] = &xa_zip_add; - add[XARCHIVETYPE_LHA] = &xa_lha_add; - add[XARCHIVETYPE_LZOP] = &xa_tar_add; -@@ -337,7 +339,7 @@ - extract[XARCHIVETYPE_BZIP2] = extract[XARCHIVETYPE_GZIP] = extract[XARCHIVETYPE_LZMA] = &xa_tar_extract; - extract[XARCHIVETYPE_RAR] = &xa_rar_extract; - extract[XARCHIVETYPE_RPM] = &xa_rpm_extract; -- extract[XARCHIVETYPE_TAR] = extract[XARCHIVETYPE_TAR_BZ2] = extract[XARCHIVETYPE_TAR_GZ] = extract[XARCHIVETYPE_TAR_LZMA] = extract[XARCHIVETYPE_TAR_LZOP] = &xa_tar_extract; -+ extract[XARCHIVETYPE_TAR] = extract[XARCHIVETYPE_TAR_BZ2] = extract[XARCHIVETYPE_TAR_GZ] = extract[XARCHIVETYPE_TAR_LZMA] = extract[XARCHIVETYPE_TAR_XZ] = extract[XARCHIVETYPE_TAR_LZOP] = &xa_tar_extract; - extract[XARCHIVETYPE_ZIP] = &xa_zip_extract; - extract[XARCHIVETYPE_LHA] = &xa_lha_extract; - extract[XARCHIVETYPE_LZOP] = &xa_tar_extract; -@@ -348,7 +350,7 @@ - test[XARCHIVETYPE_DEB] = test[XARCHIVETYPE_BZIP2] = test[XARCHIVETYPE_GZIP] = test[XARCHIVETYPE_LZMA] = 0; - test[XARCHIVETYPE_RAR] = &xa_rar_test; - test[XARCHIVETYPE_RPM] = 0; -- test[XARCHIVETYPE_TAR] = test[XARCHIVETYPE_TAR_BZ2] = test[XARCHIVETYPE_TAR_GZ] = test[XARCHIVETYPE_TAR_LZMA] = test[XARCHIVETYPE_TAR_LZOP] = 0; -+ test[XARCHIVETYPE_TAR] = test[XARCHIVETYPE_TAR_BZ2] = test[XARCHIVETYPE_TAR_GZ] = test[XARCHIVETYPE_TAR_LZMA] = test[XARCHIVETYPE_TAR_XZ] = test[XARCHIVETYPE_TAR_LZOP] = 0; - test[XARCHIVETYPE_ZIP] = &xa_zip_test; - test[XARCHIVETYPE_LHA] = &xa_lha_test; - test[XARCHIVETYPE_LZOP] = 0; -@@ -392,6 +394,14 @@ - g_free (absolute_path); - } - -+ absolute_path = g_find_program_in_path("xz"); -+ if ( absolute_path ) -+ { -+ ArchiveType = g_list_append(ArchiveType, "xz"); -+ ArchiveSuffix = g_list_append(ArchiveSuffix, "*.xz"); -+ g_free (absolute_path); -+ } -+ - absolute_path = g_find_program_in_path("lzop"); - if ( absolute_path ) - { -@@ -460,6 +470,11 @@ - ArchiveType = g_list_append(ArchiveType, "tar.lzma"); - ArchiveSuffix = g_list_append(ArchiveSuffix, "*.tlz"); - } -+ if ( g_list_find ( ArchiveType , "xz") ) -+ { -+ ArchiveType = g_list_append(ArchiveType, "tar.xz"); -+ ArchiveSuffix = g_list_append(ArchiveSuffix, "*.txz"); -+ } - if ( g_list_find ( ArchiveType , "lzo") ) - { - ArchiveType = g_list_append(ArchiveType, "tar.lzo"); -@@ -528,6 +543,8 @@ - archive->type = XARCHIVETYPE_TAR_GZ; - else if ( g_str_has_suffix ( archive->escaped_path , ".tar.lzma") || g_str_has_suffix ( archive->escaped_path , ".tlz") ) - archive->type = XARCHIVETYPE_TAR_LZMA; -+ else if ( g_str_has_suffix ( archive->escaped_path , ".tar.xz") || g_str_has_suffix ( archive->escaped_path , ".txz") ) -+ archive->type = XARCHIVETYPE_TAR_XZ; - else if ( g_str_has_suffix ( archive->escaped_path , ".tar.lzo") || - g_str_has_suffix ( archive->escaped_path , ".tzo") || - g_str_has_suffix ( archive->escaped_path , ".tar.lzop")) -diff -Nur xarchiver-0.5.2.orig/src/new_dialog.c xarchiver-0.5.2/src/new_dialog.c ---- xarchiver-0.5.2.orig/src/new_dialog.c 2008-11-11 02:28:46.000000000 -0600 -+++ xarchiver-0.5.2/src/new_dialog.c 2009-11-30 13:17:54.987349701 -0600 -@@ -202,6 +202,8 @@ - type = XARCHIVETYPE_GZIP; - else if (strcmp ( ComboArchiveType,"lzma") == 0) - type = XARCHIVETYPE_LZMA; -+ else if (strcmp ( ComboArchiveType,"xz") == 0) -+ type = XARCHIVETYPE_XZ; - else if (strcmp ( ComboArchiveType,"lzo") == 0) - type = XARCHIVETYPE_LZOP; - else if (strcmp ( ComboArchiveType,"rar") == 0) -@@ -214,6 +216,8 @@ - type = XARCHIVETYPE_TAR_GZ; - else if (strcmp ( ComboArchiveType,"tar.lzma") == 0) - type = XARCHIVETYPE_TAR_LZMA; -+ else if (strcmp ( ComboArchiveType,"tar.xz") == 0) -+ type = XARCHIVETYPE_TAR_XZ; - else if (strcmp ( ComboArchiveType,"tar.lzo") == 0) - type = XARCHIVETYPE_TAR_LZOP; - else if (strcmp ( ComboArchiveType,"jar") == 0 || strcmp ( ComboArchiveType,"zip") == 0 ) -diff -Nur xarchiver-0.5.2.orig/src/tar.c xarchiver-0.5.2/src/tar.c ---- xarchiver-0.5.2.orig/src/tar.c 2008-11-10 04:28:34.000000000 -0600 -+++ xarchiver-0.5.2/src/tar.c 2009-11-30 13:19:34.037344951 -0600 -@@ -242,6 +242,17 @@ - files->str , NULL ); - break; - -+ case XARCHIVETYPE_TAR_XZ: -+ if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) -+ xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); -+ else -+ command = g_strconcat (tar, " ", -+ archive->add_recurse ? "" : "--no-recursion ", -+ archive->remove_files ? "--remove-files " : "", -+ "--use-compress-program=xz -cvvf ",archive->escaped_path, -+ files->str , NULL ); -+ break; -+ - case XARCHIVETYPE_TAR_LZOP: - if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) - xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); -@@ -449,6 +460,10 @@ - executable = "lzma -f "; - filename = "dummy.lzma"; - break; -+ case XARCHIVETYPE_TAR_XZ: -+ executable = "xz -f "; -+ filename = "dummy.xz"; -+ break; - case XARCHIVETYPE_TAR_LZOP: - executable = "lzop -f "; - filename = "dummy.lzo"; -diff -Nur xarchiver-0.5.2.orig/src/window.c xarchiver-0.5.2/src/window.c ---- xarchiver-0.5.2.orig/src/window.c 2008-11-11 02:31:45.000000000 -0600 -+++ xarchiver-0.5.2/src/window.c 2009-11-30 13:17:54.990326583 -0600 -@@ -1125,6 +1125,8 @@ - xx = XARCHIVETYPE_GZIP; - else if (memcmp ( magic,"\x5d\x00\x00\x80",4) == 0) - xx = XARCHIVETYPE_LZMA; -+ else if (memcmp ( magic,"\xFD7zXZ\x00\0x00",3) || memcmp ( magic, "\xFD7zXZ\x00\0x10",3) == 0) -+ xx = XARCHIVETYPE_XZ; - else if (memcmp ( magic,"\211LZO",4) == 0) - xx = XARCHIVETYPE_LZOP; - else if (memcmp ( magic,"\xed\xab\xee\xdb",4) == 0) -@@ -1462,6 +1464,7 @@ - case XARCHIVETYPE_GZIP: - case XARCHIVETYPE_BZIP2: - case XARCHIVETYPE_LZMA: -+ case XARCHIVETYPE_XZ: - case XARCHIVETYPE_LZOP: - case XARCHIVETYPE_RPM: - pos = 3; -@@ -1481,6 +1484,7 @@ - case XARCHIVETYPE_TAR_GZ: - case XARCHIVETYPE_TAR_BZ2: - case XARCHIVETYPE_TAR_LZMA: -+ case XARCHIVETYPE_TAR_XZ: - case XARCHIVETYPE_TAR_LZOP: - case XARCHIVETYPE_TAR: - case XARCHIVETYPE_ZIP: -@@ -1525,6 +1529,7 @@ - case XARCHIVETYPE_GZIP: - case XARCHIVETYPE_BZIP2: - case XARCHIVETYPE_LZMA: -+ case XARCHIVETYPE_XZ: - case XARCHIVETYPE_LZOP: - case XARCHIVETYPE_RPM: - pos = 3; -@@ -1544,6 +1549,7 @@ - case XARCHIVETYPE_TAR_GZ: - case XARCHIVETYPE_TAR_BZ2: - case XARCHIVETYPE_TAR_LZMA: -+ case XARCHIVETYPE_TAR_XZ: - case XARCHIVETYPE_TAR_LZOP: - case XARCHIVETYPE_TAR: - case XARCHIVETYPE_ZIP: diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch deleted file mode 100644 index ff0d928b9..000000000 --- a/app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://bugzilla.xfce.org/show_bug.cgi?id=5187 -http://bugs.gentoo.org/show_bug.cgi?id=262519 - ---- src/window.c -+++ src/window.c -@@ -1724,6 +1724,9 @@ - gtk_tree_selection_selected_foreach (selection,(GtkTreeSelectionForeachFunc) xa_concat_selected_filenames,&names); - archive->full_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (extract_window->extract_full)); - archive->overwrite = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (extract_window->overwrite_check)); -+ gchar *unescaped_extraction_path = archive->extraction_path; -+ archive->extraction_path = xa_escape_filename(unescaped_extraction_path, "$'`\"\\!?* ()[]&|:;<>#"); -+ g_free(unescaped_extraction_path); - (*archive->extract) (archive,names); - - g_list_foreach (row_list,(GFunc) gtk_tree_path_free,NULL); diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch deleted file mode 100644 index 66104822e..000000000 --- a/app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- xarchiver-0.5.2-old/src/window.c 2008-11-11 09:31:45.000000000 +0100 -+++ xarchiver-0.5.2/src/window.c 2009-01-25 16:26:07.000000000 +0100 -@@ -1447,7 +1447,7 @@ - GtkTreeIter iter; - gint n_elem = 0,pos = 0,dirs = 0; - unsigned long int total_size = 0; -- unsigned long int size = 0; -+ guint64 size = 0; - XEntry *entry = NULL; - - path = gtk_tree_path_new_first(); -@@ -1517,7 +1517,7 @@ - GtkTreeModel *model; - gint selected = 0,pos = 0,dirs = 0; - unsigned long int total_size = 0; -- unsigned long int size = 0; -+ guint64 size = 0; - XEntry *entry; - - switch (archive->type) diff --git a/app-arch/xarchiver/metadata.xml b/app-arch/xarchiver/metadata.xml deleted file mode 100644 index e3645219c..000000000 --- a/app-arch/xarchiver/metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - -xfce -Archive manager for 7zip, arj, bzip2, gzip, iso, rar, lha, deb, rpm, tar and zip formats. - diff --git a/app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild b/app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild deleted file mode 100644 index 4df4a1128..000000000 --- a/app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/xarchiver/xarchiver-0.5.2-r3.ebuild,v 1.6 2012/05/03 01:58:53 jdhore Exp $ - -EAPI=5 -inherit xfconf - -DESCRIPTION="a GTK+ based and advanced archive manager that can be used with Thunar" -HOMEPAGE="http://xarchiver.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux" -IUSE="debug" - -RDEPEND=">=dev-libs/glib-2.16 - >=x11-libs/gtk+-2.10:2" -DEPEND="${RDEPEND} - dev-util/intltool - virtual/pkgconfig" - -pkg_setup() { - PATCHES=( - "${FILESDIR}"/${P}-stack-smash.patch - "${FILESDIR}"/${P}-add_xz_support.patch - "${FILESDIR}"/${P}-drag-n-drop_escaped_path.patch - "${FILESDIR}"/${P}-add-to_escaped_path.patch - ) - - XFCONF=( - $(xfconf_use_debug) - ) - - DOCS=( AUTHORS ChangeLog NEWS README TODO ) -} - -src_prepare() { - sed -i -e '/COPYING/d' doc/Makefile.in || die - xfconf_src_prepare -} - -src_install() { - xfconf_src_install DOCDIR="${ED}/usr/share/doc/${PF}" -} - -pkg_postinst() { - xfconf_pkg_postinst - elog "You need external programs for some formats, including" - elog "7zip - app-arch/p7zip" - elog "arj - app-arch/unarj app-arch/arj" - elog "lha - app-arch/lha" - elog "lzop - app-arch/lzop" - elog "rar - app-arch/unrar app-arch/rar" - elog "zip - app-arch/unzip app-arch/zip" -} diff --git a/app-benchmarks/ioping/ChangeLog b/app-benchmarks/ioping/ChangeLog deleted file mode 100644 index 17a92cae8..000000000 --- a/app-benchmarks/ioping/ChangeLog +++ /dev/null @@ -1,9 +0,0 @@ -# ChangeLog for app-benchmarks/ioping -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v3 -# $Header: $ - -*ioping-0.4 (07 Jun 2011) - - 06 Jun 2011; Dmitry 'daks' Fomenko - +ioping-0.4.ebuild: - Initial ebuild diff --git a/app-benchmarks/ioping/Manifest b/app-benchmarks/ioping/Manifest deleted file mode 100644 index fa01aaabc..000000000 --- a/app-benchmarks/ioping/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST ioping-0.4.tar.gz 5803 SHA256 87100c34d50a27fafb44fd72634bf11947ae0afa8971e0a9919028f1a0749718 -EBUILD ioping-0.4.ebuild 597 SHA256 0986eafe574f1f42f4eab13bbe4eabfb7fa79bed777e3cfc3a9079e8e7d00ea3 SHA512 91a4525d52e2f28a7b1600fac97e65f825b03bcb3962e1c28ad61c09d4630f68ab88a86242aad546a2f5137d7e0468aac3af5567bb1dda51e9e22b52b0cb7f32 WHIRLPOOL befe2cbaaacfb737d7bde477a66246a62b9bea3e5d088c6172cef63c5d0836a5182846179b1bd9b2ae304883fe4ba87fd49be301e1a2bc890461dff35d19a7c0 -MISC ChangeLog 244 SHA256 a1a652e7fc9279a49e21a5e7fb5a8a2f5fa8b36af64f820d76f07bf11a3a4cd4 SHA512 7543ad1d51aed98e2c379339811d34308d4e5a2920ea89a17e80a17ca27d6743a6cf57adeb1754992d1a9fd9f09f5fa68feb972015e6f6d5be1909a749cae9d6 WHIRLPOOL ab58781b59012f668e600f5b555cc9739ab736b4e19f4710a8b15445efff4613d95185576cbd284226d839cea252e738dead787d029f3b61e765f86a90e2e22d -MISC metadata.xml 261 SHA256 c4a2402d01197b6c1a7476c5b2b1ec7552b4acbc7dd51c7d775c4100c6324c8d SHA512 8faf1b8a224dfff5fb6877b201be94676085384e1956f5b7a59f736355c5a977265977607834db708ff1134db7d84e05310b534d87e234a4aceb91cc6ea6dc9c WHIRLPOOL 6b9ef570281ca1f8a3286f5a2f525e0a87938b7eab2b45264a0e92ad55e4543aed919d8234df0231a35052e1dcb4ea2f0bd3d194585eaa7e96bf835e54c7634f diff --git a/app-benchmarks/ioping/ioping-0.4.ebuild b/app-benchmarks/ioping/ioping-0.4.ebuild deleted file mode 100644 index 0aee7843c..000000000 --- a/app-benchmarks/ioping/ioping-0.4.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -DESCRIPTION="ioping is a simple disk I/O latency monitoring tool" -HOMEPAGE="http://kir.sacred.ru/ioping/ http://code.google.com/p/ioping/" -SRC_URI="http://ioping.googlecode.com/files/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" - -src_compile() { - mv Makefile Makefile.orig - sed -e "s/PREFIX=\/usr\/local/PREFIX=\/usr/" Makefile.orig > Makefile - emake || die -} - -src_install() { - dobin ${PN} - doman ${PN}.1 -} diff --git a/app-benchmarks/ioping/metadata.xml b/app-benchmarks/ioping/metadata.xml deleted file mode 100644 index 234b4095d..000000000 --- a/app-benchmarks/ioping/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - no-herd - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/app-forensics/skdet/ChangeLog b/app-forensics/skdet/ChangeLog deleted file mode 100644 index fba29cf3a..000000000 --- a/app-forensics/skdet/ChangeLog +++ /dev/null @@ -1,14 +0,0 @@ -# ChangeLog for app-forensics/skdet -# Copyright 2011-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -* skdet-1.0-r1 (13 Jun 2012) - - 13 Jul 2011; Dmitry 'daks' Fomenko ; - +skdet-1.0-r1.ebuild: - Add patch http://dvgevers.home.xs4all.nl/skdet/skdet-fix-includes.diff, - cleanup ebuild. - -* skdet-1.0 (07 Jul 2011) - 07 Jul 2011; Dmitry 'daks' Fomenko ; - Initial ebuild. diff --git a/app-forensics/skdet/Manifest b/app-forensics/skdet/Manifest deleted file mode 100644 index 64a9bdf7e..000000000 --- a/app-forensics/skdet/Manifest +++ /dev/null @@ -1,7 +0,0 @@ -DIST skdet-1.0.1 1146 RMD160 713a1bbfdf3762b3aec8ee3f4d55a8c7641bb00f SHA1 17a28ce06d647ca1b9a4b38028d0ca6b2167165c SHA256 8c41f4262f0caf83ce694c8324e0ef88f7fd0311b7277ee645a35d6c391adb76 -DIST skdet-1.0.tar.bz2 9315 RMD160 456758c04127027e5564696dd4fedc16a5465ccd SHA1 b61e02853a7b94ffce17c563250230e03f76a598 SHA256 a5842d3e56c8586c52879700453f740744c374a1f2c648eef337cae7e244e7b6 -DIST skdet-fix-includes.diff 677 RMD160 dec8ea8f1bc9f1542ade584bfcff04bb5b8ad90e SHA1 59bfb29bc1f7601027629453a39dc81508dd9df5 SHA256 1ee83c1122dfe74c8aec7800fe0026affda6ea37c7643491fd8df62f08ed2fbc -EBUILD skdet-1.0-r1.ebuild 814 RMD160 9f473531052a61219ffecf100b62fc2d03b2e178 SHA1 1ebe6903c77415e7462218533d567a8ef0f1f540 SHA256 c3d42770eb8a0eaef694e18a6229e0a6e86ba2de401ac13659b677f10c67d9e9 -EBUILD skdet-1.0.ebuild 570 RMD160 58f49b77342d44376501e3ca9891da32e72e0e89 SHA1 0d49802a8dd88f70ff49d958aa5f816e9cda6909 SHA256 0c23ee6c5927ad239517db6aca0401f4238182f06beca485dc9585e6cfd595fb -MISC ChangeLog 425 RMD160 48b7d2183a0ff8661d5e7ea39526533beadf6662 SHA1 4b0811b08354330325939a5e0bfea190a0d48944 SHA256 86d6e6bb3d604a661fcf0710dca4f324c711b38d5c99448cc7ccaffc6b733210 -MISC metadata.xml 239 RMD160 69ef66c10d13ce09eb50805a19fbf4a7a10bb024 SHA1 a71fd233f4b2c2301a2544f9aad504f596a0ea28 SHA256 46132d153ef5ee1075082ff571718736b90a2a48f85d29c7e38e07ba81322e42 diff --git a/app-forensics/skdet/metadata.xml b/app-forensics/skdet/metadata.xml deleted file mode 100644 index 075818f09..000000000 --- a/app-forensics/skdet/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/app-forensics/skdet/skdet-1.0-r1.ebuild b/app-forensics/skdet/skdet-1.0-r1.ebuild deleted file mode 100644 index 56126dcb3..000000000 --- a/app-forensics/skdet/skdet-1.0-r1.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit eutils - -DESCRIPTION="Skdet is a simple program that will detect the rootkits" -HOMEPAGE="http://www.xs4all.nl/~dvgevers/skdet/" -SRC_URI="http://dvgevers.home.xs4all.nl/skdet/skdet-1.0.tar.bz2 - http://dvgevers.home.xs4all.nl/skdet/skdet-1.0.1 - http://dvgevers.home.xs4all.nl/skdet/skdet-fix-includes.diff" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" - -PATCHES=( "${DISTDIR}"/"${PN}"-fix-includes.diff ) - -src_prepare() { - base_src_prepare - rm "${PN}" - sed -e '/STRIP/d' -i "${S}"/Makefile || die "sed failed" -} - -src_install() { - dodoc AUTHORS ChangeLog CONTRIBUTIONS CREDITS README tests/* - dosbin "${PN}" - doman "${DISTDIR}"/"${P}".1 -} diff --git a/app-forensics/skdet/skdet-1.0.ebuild b/app-forensics/skdet/skdet-1.0.ebuild deleted file mode 100644 index 7816a6695..000000000 --- a/app-forensics/skdet/skdet-1.0.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -DESCRIPTION="Skdet is a simple program that will detect the rootkits" -HOMEPAGE="http://www.xs4all.nl/~dvgevers/skdet/" -SRC_URI="http://www.xs4all.nl/~dvgevers/skdet/skdet-1.0.tar.bz2" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -RESTRICT="mirror" - -DEPEND="" -RDEPEND="${DEPEND}" - -src_compile() { - rm "${PN}" - emake ||die -} - -src_install() { - dosbin "${PN}" - dodoc AUTHORS ChangeLog CONTRIBUTIONS - doman "${FILESDIR}"/"${PN}".1 -} diff --git a/app-forensics/unhide/ChangeLog b/app-forensics/unhide/ChangeLog deleted file mode 100644 index 5d9deffd5..000000000 --- a/app-forensics/unhide/ChangeLog +++ /dev/null @@ -1,13 +0,0 @@ -# ChangeLog for app-forensics/unhide -# Copyright 2011-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -* unhide-20110113 (07 Jul 2011) - - 07 Jul 2011; Dmitry 'daks' Fomenko ; - +unhide-20110113.ebuild, -unhide-20100819.ebuild: - Version bump, remove obsolete ebuild. - -* unhide-20100819 (07 Jul 2011) - 07 Jul 2011; Dmitry 'daks' Fomenko ; - Initial ebuild. diff --git a/app-forensics/unhide/Manifest b/app-forensics/unhide/Manifest deleted file mode 100644 index 4535186aa..000000000 --- a/app-forensics/unhide/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST unhide-20110113.tgz 34207 RMD160 89628c7837fcf96a1dda4279e79c9d97e1e12a6b SHA1 c34662387c4832266ab89e47b912e43f913070a8 SHA256 21ef6128232d02bba981acdf20f92b92258189f0660c4dac9a8d2dfdcc83e6ab -EBUILD unhide-20110113.ebuild 956 RMD160 100a152532327f69d34b0c30cbc0fc789c60253e SHA1 47ca3cb24099a33083b1e5a3a653db7edfc2689a SHA256 5542a336660e5a2f4fef038e9a185abf4ff614cf926f3b50f0b460f2d764eec7 -MISC ChangeLog 410 RMD160 3262216d2c06052281346427645c65e9aea82661 SHA1 1b269b5af08d9d4bc4b431d6e7a24b002da020a3 SHA256 1efbf42cf9c18a17a503c18f6310edfb952d6a9ae1eca74f529ca4a0eb0bbfe2 -MISC metadata.xml 239 RMD160 69ef66c10d13ce09eb50805a19fbf4a7a10bb024 SHA1 a71fd233f4b2c2301a2544f9aad504f596a0ea28 SHA256 46132d153ef5ee1075082ff571718736b90a2a48f85d29c7e38e07ba81322e42 diff --git a/app-forensics/unhide/metadata.xml b/app-forensics/unhide/metadata.xml deleted file mode 100644 index 075818f09..000000000 --- a/app-forensics/unhide/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/app-forensics/unhide/unhide-20110113.ebuild b/app-forensics/unhide/unhide-20110113.ebuild deleted file mode 100644 index 5815dbed1..000000000 --- a/app-forensics/unhide/unhide-20110113.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -inherit toolchain-funcs flag-o-matic - -DESCRIPTION="Unhide is a forensic tool to find hidden processes and TCP/UDP ports by rootkits/LKMs" -HOMEPAGE="http://security-projects.com/?Unhide" -SRC_URI="mirror://sourceforge/${PN}/${PN}-${PV}.tgz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" - -src_configure() { - append-cflags -lpthread -} - -src_compile() { - $(tc-getCC) -DVERSION=${PV} ${CFLAGS} ${LDFLAGS} \ - ${PN}.c -o ${PN} || die "Failed to compile ${PN}" - - $(tc-getCC) -DVERSION=${PV} ${CFLAGS} ${LDFLAGS} \ - ${PN}-linux26.c -o ${PN}-linux26 || die "Failed to compile ${PN}-linux26" - - $(tc-getCC) -DVERSION=${PV} ${CFLAGS} ${LDFLAGS} \ - ${PN}-tcp.c -o ${PN}-tcp || die "Failed to compile ${PN}-tcp" -} - -src_install() { - dosbin ${PN} ${PN}-linux26 ${PN}-tcp - dodoc README.txt - doman man/* -} diff --git a/app-text/cherrytree/ChangeLog b/app-text/cherrytree/ChangeLog deleted file mode 100644 index d2cf9db09..000000000 --- a/app-text/cherrytree/ChangeLog +++ /dev/null @@ -1,17 +0,0 @@ -# ChangeLog for app-text/cherrytree -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*cherrytree-0.30.5 (02 Dec 2013) - - 02 Dec 2013; Блохин Юрий - +cherrytree-0.30.5.ebuild: - Добавлена новая версия app-text/cherrytree - -* cherrytree-0.29.4.ebuild (02 Apr 2013) -* cherrytree-0.28.5.ebuild (02 Apr 2013) - - 02 Apr 2013; Dmitry 'daks' Fomenko ; - +cherrytree-0.29.4.ebuild, cherrytree-0.28.5.ebuild, - +metadata.xml, +Changelog: - Initial import, from bug #396543. diff --git a/app-text/cherrytree/Manifest b/app-text/cherrytree/Manifest deleted file mode 100644 index 61d170394..000000000 --- a/app-text/cherrytree/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -DIST cherrytree-0.28.5.tar.xz 622684 SHA256 0d15626fe877d3f02114ce98f13f41fa16a8520525dc0fa37edef9144d89f391 SHA512 4ad9c5b43296b86cfe7fc66dd2cd8ae5ab7f914e3908e89082ecee9dcdb24aed61b37a148e50a4a4fbe2b64e0fa3137ce44f6bedcbf11a98b9110ba01ffece13 WHIRLPOOL ec482602d067874908ae5581e90e367cbee7348ac43078cec1aab37d6914b6324e429d1bd077ca3c5827d277c2ca5855f7232eb50766d76428258db62728ac13 -DIST cherrytree-0.29.4.tar.xz 706560 SHA256 464ed343bf210930724f40feec88d370789d048ed90ad8a76b8eee397aaca0eb SHA512 3c93f1c3046131f3e7c6736b16e95e2c54df33efe36f6a2d18d29898020c8ad93af8b6e1381d93aca3989baa1c6db1fbfbbeeba3f78656f1985edc55a84efd98 WHIRLPOOL ed91b630eefe2f9032fbcfbe61cdd57c4b290d23bd54b2fe9cd62eb94281d0602f98e50c5ac884eed46bbb64bdb8887857ff6bffeeaa4d6aa124efcbcd34cadb -DIST cherrytree-0.30.5.tar.xz 5552396 SHA256 7af69e4cf6d88eb4b7d4703e03a782930741e4d49d5297fc970cf011fc743330 SHA512 99a1ad809b952c908ba0a852360d086a8a2a075f1816c887f82588a26292fedc7b1f3719300ddb6c7b0713769051c8a77251538eb8b9282ee9a79e49852c0236 WHIRLPOOL 1fffacc38fad132d9bd971c22a690d66a222915d84cf0141eecd3ad8d0328e416597a4f41045e2b4059ae7849299c68fe9c4a70363b5213fed81f5e3206db271 -EBUILD cherrytree-0.28.5.ebuild 952 SHA256 91628f945d1f0b2158658b4bc65f2f5fd912d69e5b98923a16fa99e99bad59f9 SHA512 7aa87785931c5a3ae7621d606a807f49df6336657665349cbea1649114a4242e6f25c56d787b1de35a0a558ef15013f4b427e01dee750c782882aa50a591ba7d WHIRLPOOL 6df21314d4b6fb3dddb60e4d458db908a8b43b94bbe08105340076f9e5cd577462e551f8476e377e8cd324ba64c8b53dbeaf14c55aab8dc36bda4e895fc35486 -EBUILD cherrytree-0.29.4-r1.ebuild 970 SHA256 a4bd0af0b7b6e03d244e05946808aa5b53e8647e9142e92b497f2b52214f8fb8 SHA512 789e7dfc48d80bfee84b7548197270cfa5d4618e62985e8ddd5ad97d77c6aad68d5d11e7144d25648aa2f4a23a36fe76d1b966fc39a1f85e2baaba76a0cd1bde WHIRLPOOL 7dffb2b9ac07a7643e08e69e2bf3c53b54f058b4e5ea42b382459a0aec9769f9ffdf203035623fcce9b20295a9a95f855afda14cf5f2d51b53255af44ea06a31 -EBUILD cherrytree-0.29.4.ebuild 952 SHA256 91628f945d1f0b2158658b4bc65f2f5fd912d69e5b98923a16fa99e99bad59f9 SHA512 7aa87785931c5a3ae7621d606a807f49df6336657665349cbea1649114a4242e6f25c56d787b1de35a0a558ef15013f4b427e01dee750c782882aa50a591ba7d WHIRLPOOL 6df21314d4b6fb3dddb60e4d458db908a8b43b94bbe08105340076f9e5cd577462e551f8476e377e8cd324ba64c8b53dbeaf14c55aab8dc36bda4e895fc35486 -EBUILD cherrytree-0.30.5.ebuild 1014 SHA256 8acd7fad2b1a3fef8e13ee1f79d37ecc9a192299c12311e56ad405ca429a1c5a SHA512 9e625fa448ec626c59c58d0eacdff7e7df70a91c91e39bcb1d8c1bb5c26f68139870f069f708f04f7f559715715760f71688a9d09d3432e893d1d38221371995 WHIRLPOOL 0c76471a974292bfe490d54e51d8870d047c2b124e468974d1a664bff691f8acf0794bec9ed71d488e6878dfbf5ff4c0e3d4e0d10df0613f2f3160de7e766ba5 -MISC ChangeLog 564 SHA256 1aac84ffd9c82938a0e671663c6adb2d39199fa9f9b9a03bae735cd5f4fbf8bf SHA512 fce62ad545694e7236358c5c23a03e118cf722fce0d7a54203d2c76e324edbbd9b7c8d8e3a08b09f0afe973b9964bfc15dddb87fc4e156e379c968701d563e77 WHIRLPOOL 398f95f6e9338654bfaf6e097fdd5acb8a62fda1ff566602df3db73f5d9eb1ab6fbb3d534d63bd62aafdc85ac5c017aa869aff6acfe1ad1c9f964d0bdde046e3 -MISC metadata.xml 239 SHA256 46132d153ef5ee1075082ff571718736b90a2a48f85d29c7e38e07ba81322e42 SHA512 6355a32d108ed321ca77474192a5e83a05e173299dd34c95fe79b4bf464bb3d92b788ae4a03ee6a5235b17b22cffda0f1d557058a011c6d0b5eaf6ad54b7bbb5 WHIRLPOOL 07155d7fadf9c83395761153866d53dac1133efbb0e99057070bb83d612b5b385739bd39a5b0db363f28238f349fd8702f3b53db330ab588e846b47c52567f83 diff --git a/app-text/cherrytree/cherrytree-0.28.5.ebuild b/app-text/cherrytree/cherrytree-0.28.5.ebuild deleted file mode 100644 index 92e7144e7..000000000 --- a/app-text/cherrytree/cherrytree-0.28.5.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -PYTHON_DEPEND="2:2.6" -PYTHON_USE_WITH="sqlite" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython" - -inherit distutils eutils fdo-mime - -DESCRIPTION="A hierarchical note taking application" -HOMEPAGE="http://www.giuspen.com/cherrytree/" -SRC_URI="http://www.giuspen.com/software/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" -IUSE="" - -RDEPEND="x11-libs/libX11 - >=dev-python/pygtk-2.12:2 - dev-python/pygtksourceview" -DEPEND="${RDEPEND} - sys-devel/gettext - " - -src_prepare() { - # Avoid sandbox violation - sed -e "s:subprocess.call(\"update-desktop-database\"):#subprocess.call(\"update-desktop-database\"):g" \ - -i setup.py || die "sed failed to patch install.py" - - distutils_src_prepare -} - -pkg_postinst() { - fdo-mime_desktop_database_update - fdo-mime_mime_database_update -} - diff --git a/app-text/cherrytree/cherrytree-0.29.4-r1.ebuild b/app-text/cherrytree/cherrytree-0.29.4-r1.ebuild deleted file mode 100644 index 8045cca89..000000000 --- a/app-text/cherrytree/cherrytree-0.29.4-r1.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -PYTHON_DEPEND="2:2.6" -PYTHON_USE_WITH="sqlite" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython" - -inherit distutils eutils fdo-mime - -DESCRIPTION="A hierarchical note taking application" -HOMEPAGE="http://www.giuspen.com/cherrytree/" -SRC_URI="http://www.giuspen.com/software/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" -IUSE="" - -RDEPEND="x11-libs/libX11 - >=dev-python/pygtk-2.16:2 - dev-python/pygtksourceview:2 - app-arch/p7zip" -DEPEND="${RDEPEND} - sys-devel/gettext - " - -src_prepare() { - # Avoid sandbox violation - sed -e "s:subprocess.call(\"update-desktop-database\"):#subprocess.call(\"update-desktop-database\"):g" \ - -i setup.py || die "sed failed to patch install.py" - - distutils_src_prepare -} - -pkg_postinst() { - fdo-mime_desktop_database_update - fdo-mime_mime_database_update -} - diff --git a/app-text/cherrytree/cherrytree-0.29.4.ebuild b/app-text/cherrytree/cherrytree-0.29.4.ebuild deleted file mode 100644 index 92e7144e7..000000000 --- a/app-text/cherrytree/cherrytree-0.29.4.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -PYTHON_DEPEND="2:2.6" -PYTHON_USE_WITH="sqlite" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython" - -inherit distutils eutils fdo-mime - -DESCRIPTION="A hierarchical note taking application" -HOMEPAGE="http://www.giuspen.com/cherrytree/" -SRC_URI="http://www.giuspen.com/software/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" -IUSE="" - -RDEPEND="x11-libs/libX11 - >=dev-python/pygtk-2.12:2 - dev-python/pygtksourceview" -DEPEND="${RDEPEND} - sys-devel/gettext - " - -src_prepare() { - # Avoid sandbox violation - sed -e "s:subprocess.call(\"update-desktop-database\"):#subprocess.call(\"update-desktop-database\"):g" \ - -i setup.py || die "sed failed to patch install.py" - - distutils_src_prepare -} - -pkg_postinst() { - fdo-mime_desktop_database_update - fdo-mime_mime_database_update -} - diff --git a/app-text/cherrytree/cherrytree-0.30.5.ebuild b/app-text/cherrytree/cherrytree-0.30.5.ebuild deleted file mode 100644 index 9c8abfe81..000000000 --- a/app-text/cherrytree/cherrytree-0.30.5.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# Original ebuild from the calculate overlay - -EAPI=5 - -PYTHON_DEPEND="2:2.6" -PYTHON_USE_WITH="sqlite" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython" - -inherit distutils eutils fdo-mime - -DESCRIPTION="A hierarchical note taking application" -HOMEPAGE="http://www.giuspen.com/cherrytree/" -SRC_URI="http://www.giuspen.com/software/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" -IUSE="" - -RDEPEND="x11-libs/libX11 - >=dev-python/pygtk-2.16:2 - dev-python/pygtksourceview:2 - app-arch/p7zip" -DEPEND="${RDEPEND} - sys-devel/gettext - " - -src_prepare() { - # Avoid sandbox violation - sed -e "s:subprocess.call(\"update-desktop-database\"):#subprocess.call(\"update-desktop-database\"):g" \ - -i setup.py || die "sed failed to patch install.py" - - distutils_src_prepare -} - -pkg_postinst() { - fdo-mime_desktop_database_update - fdo-mime_mime_database_update -} diff --git a/app-text/cherrytree/metadata.xml b/app-text/cherrytree/metadata.xml deleted file mode 100644 index 075818f09..000000000 --- a/app-text/cherrytree/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/app-text/htmldoccyr/Manifest b/app-text/htmldoccyr/Manifest deleted file mode 100644 index 311eeee0c..000000000 --- a/app-text/htmldoccyr/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST htmldoccyr-0.1.tar.bz2 2824521 RMD160 ec4b10bab6f6fb16733470ad3b67664899fe2d09 SHA1 b2c4de35b5b0832a24a74df18473a4cc718ee969 SHA256 bd79a713b41aee0139406d2731723ade6953839967e284de67b3aba6815fdf37 -EBUILD htmldoccyr-0.1.ebuild 706 RMD160 a32e7f352b6cb4073a7775fda092ffba8f92e735 SHA1 7e5ef99e26303c73a49b72635ced46d049670e39 SHA256 ec699acc17e68c4ba42ef83c2ae596f12b231cbec91155d6eb52ed8b01ff9dd0 diff --git a/app-text/htmldoccyr/htmldoccyr-0.1.ebuild b/app-text/htmldoccyr/htmldoccyr-0.1.ebuild deleted file mode 100644 index f778c0dd7..000000000 --- a/app-text/htmldoccyr/htmldoccyr-0.1.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -MY_PV="${PV/_rc/RC}" - -DESCRIPTION="Cyrillic fonts for htmldoc" -HOMEPAGE="http://www.calculate-linux.org/htmldoccyr" -SRC_URI="ftp://ftp.local.calculate.ru/pub/${PN}/${P}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -DEPEND=">=app-text/htmldoc-1.8.26" -RDEPEND="${DEPEND}" - -src_compile() { - echo "Nothing compile" -} - -src_install() { - emake install DESTDIR="${D}" -} - -pkg_postinst() { - elog "Execute the following command to replace fonts htmldoc to cyrillic:" - elog - elog "/usr/bin/htmldoccyr" - elog -} diff --git a/app-text/wgetpaste/ChangeLog b/app-text/wgetpaste/ChangeLog deleted file mode 100644 index 7564cecf0..000000000 --- a/app-text/wgetpaste/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for app-text/wgetpaste -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*wgetpaste-2.18-r1 (15 Aug 2011) - - 15 Aug 2011; Mike Hiretsky (mhiretskiy) - +wgetpaste-2.18-r1.ebuild, +metadata.xml: - Update revision for auto-rebuild - diff --git a/app-text/wgetpaste/Manifest b/app-text/wgetpaste/Manifest deleted file mode 100644 index baba579a7..000000000 --- a/app-text/wgetpaste/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST wgetpaste-2.18.tar.bz2 9147 RMD160 0d1b3049782fd3b17ef598659b93ab8e8e75b249 SHA1 55ea730dd84ba35984c5ab1b2973934ec437131e SHA256 95ee46eac37ca74ce960c1726afc19f4a1dde4d1875ac860fdc5e45d3cb05d3e -EBUILD wgetpaste-2.18-r1.ebuild 895 RMD160 6caff6823f294f054720bd1d85fd3fdd59849832 SHA1 b24b6df74f15af80e7ec84ad3f6b31ca54ef03e3 SHA256 10a79d88af70454bf698b27b2f0642fcc8994923e9caf7976a1aab1abf5d256c -MISC ChangeLog 293 RMD160 2fec0f642a09b94e90934704cccd4ced95682051 SHA1 9d9cc9b367d74c98fefa04bb159fa15fe7881e99 SHA256 eca43d60ec2968e65fadfc297ba4596eba50ba17eb706ff20969025d0a7f7521 -MISC metadata.xml 343 RMD160 dd5629ac9b7e730b389d6eed820238fac3058449 SHA1 9462f6fcea793193c2384aba58073c83b5973083 SHA256 061d41b175b4ea9a9cc34e6cc530d86bd0af4e549acf8364e80265286f5e2fad diff --git a/app-text/wgetpaste/metadata.xml b/app-text/wgetpaste/metadata.xml deleted file mode 100644 index ae6152dd3..000000000 --- a/app-text/wgetpaste/metadata.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - no-herd - - spatz@gentoo.org - Dror Levin - - - wired@gentoo.org - Alex Alexander - - diff --git a/app-text/wgetpaste/wgetpaste-2.18-r1.ebuild b/app-text/wgetpaste/wgetpaste-2.18-r1.ebuild deleted file mode 100644 index fa37a4b25..000000000 --- a/app-text/wgetpaste/wgetpaste-2.18-r1.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/wgetpaste/wgetpaste-2.18.ebuild,v 1.7 2011/06/08 12:51:05 xarthisius Exp $ - -DESCRIPTION="Command-line interface to various pastebins" -HOMEPAGE="http://wgetpaste.zlin.dk/" -SRC_URI="http://wgetpaste.zlin.dk/${P}.tar.bz2" - -LICENSE="public-domain" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -IUSE="zsh-completion" - -DEPEND="" -RDEPEND="net-misc/wget - zsh-completion? ( app-shells/zsh )" - -src_install() { - dobin ${PN} || die "Failed to install wgetpaste" - if use zsh-completion ; then - insinto /usr/share/zsh/site-functions - doins _wgetpaste || die "Failed to install zsh-completions" - fi -} diff --git a/dev-perl/Net-FreeDB/Manifest b/dev-perl/Net-FreeDB/Manifest deleted file mode 100644 index 1fec714a9..000000000 --- a/dev-perl/Net-FreeDB/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST Net-FreeDB-0.08.tar.gz 19210 RMD160 ccd8fc82f9ba9180e8e06a76f9f6138f283808ce SHA1 89eaca559f8c12d1492be6bb36767dd9b4c9d54c SHA256 f9774b85cd8edae72d3f90dcb2efb78d4fa759b0008e0c90e1c0254bec5c86b6 -EBUILD Net-FreeDB-0.08.ebuild 456 RMD160 1500e502935e382dcb0e28b1c6fa73a1f3cdf90e SHA1 9bc1ea246f3d97a437de5263dd6be90d4db661e9 SHA256 1a855d9b4c8624b1df3715aeb4beb48f6112f2fce4eea7df2a68916697a051aa -MISC metadata.xml 229 RMD160 f0f6417bec31ce8baba6d476664f7210c8c84c98 SHA1 e5f94f5caadc6f843fc90bb7959570cd503676fd SHA256 3b08fca3c878bdfc4e7639f477dd542d55a4ab5dce39a475e82633071d13eb3f diff --git a/dev-perl/Net-FreeDB/Net-FreeDB-0.08.ebuild b/dev-perl/Net-FreeDB/Net-FreeDB-0.08.ebuild deleted file mode 100644 index 6a165fc88..000000000 --- a/dev-perl/Net-FreeDB/Net-FreeDB-0.08.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit perl-module - -DESCRIPTION="OOP interface to the FreeDB database" -HOMEPAGE="http://search.cpan.org/~roam/" -SRC_URI="mirror://cpan/authors/id/R/RO/ROAM/${P}.tar.gz" - -LICENSE="|| ( Artistic GPL-2 )" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND=">=dev-perl/CDDB-File-1.01 - dev-lang/perl - virtual/perl-libnet" -RDEPEND="${DEPEND}" diff --git a/dev-perl/Net-FreeDB/metadata.xml b/dev-perl/Net-FreeDB/metadata.xml deleted file mode 100644 index e6233b5dc..000000000 --- a/dev-perl/Net-FreeDB/metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - -no-herd -maintainer-wanted@gentoo.org - diff --git a/dev-python/PyQt4/ChangeLog b/dev-python/PyQt4/ChangeLog deleted file mode 100644 index 1e0ff65c7..000000000 --- a/dev-python/PyQt4/ChangeLog +++ /dev/null @@ -1,598 +0,0 @@ -# ChangeLog for dev-python/PyQt4 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/ChangeLog,v 1.144 2011/01/16 10:06:11 phajdan.jr Exp $ - - 16 Jan 2011; Pawel Hajdan jr PyQt4-4.8.1.ebuild: - x86 stable wrt bug #349607 - - 07 Jan 2011; Brent Baude PyQt4-4.8.1.ebuild: - Marking PyQt4-4.8.1 ppc stable for bug 349607 - - 04 Jan 2011; Markos Chandras PyQt4-4.8.1.ebuild: - Stable on amd64 wrt bug #349607 - - 30 Dec 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.8.1.ebuild, PyQt4-4.8.1-r1.ebuild, PyQt4-4.8.2.ebuild: - Require x11-libs/qt-opengl[-egl] until bug #344513 is fixed. - -*PyQt4-4.8.1-r1 (30 Dec 2010) - - 30 Dec 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.8.1.ebuild, +PyQt4-4.8.1-r1.ebuild: - Copy 4.8.1 to 4.8.1-r1. Delete "declarative" USE flag in 4.8.1. - - 25 Dec 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.8.2.ebuild: - Fix dependencies (bug #349672). - -*PyQt4-4.8.2 (24 Dec 2010) - - 24 Dec 2010; Arfrever Frehtes Taifersar Arahesis - +PyQt4-4.8.2.ebuild: - Version bump. - - 19 Dec 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.7.3.ebuild, PyQt4-4.7.7-r1.ebuild, PyQt4-4.8.1.ebuild: - Restrict Jython ABIs. - - 19 Dec 2010; Arfrever Frehtes Taifersar Arahesis - -files/PyQt4-4.5.4-qgraphicslinearlayout-fix.patch, - -files/configure-4.6.1.py.patch, -PyQt4-4.6.2.ebuild, -PyQt4-4.8.ebuild, - -files/configure.py.patch: - Delete. - - 06 Dec 2010; Alex Alexander -PyQt4-4.5.4-r4.ebuild: - old, depends on qt 4.5 - - 06 Nov 2010; Jeroen Roovers PyQt4-4.5.4-r4.ebuild, - PyQt4-4.6.2.ebuild, PyQt4-4.7.3.ebuild, PyQt4-4.7.7-r1.ebuild, - PyQt4-4.8.ebuild, PyQt4-4.8.1.ebuild: - Remove HPPA keywording (bug #239441). - -*PyQt4-4.8.1 (30 Oct 2010) - - 30 Oct 2010; Arfrever Frehtes Taifersar Arahesis - +PyQt4-4.8.1.ebuild: - Version bump. - - 23 Oct 2010; Raúl Porcel PyQt4-4.7.3.ebuild: - ia64/sparc stable wrt #315775 - -*PyQt4-4.8 (23 Oct 2010) - - 23 Oct 2010; Arfrever Frehtes Taifersar Arahesis - -PyQt4-4.7.ebuild, -PyQt4-4.7.5.ebuild, -PyQt4-4.7.7.ebuild, - +PyQt4-4.8.ebuild, metadata.xml: - Version bump. - -*PyQt4-4.7.7-r1 (06 Oct 2010) - - 06 Oct 2010; Theo Chatzimichos - +PyQt4-4.7.7-r1.ebuild, +files/PyQt4-4.7.7-fix-scpk-and-flag-issue.diff: - Revision bump, add patch that fixes compilation with PyKDE 4.5.2 - -*PyQt4-4.7.7 (21 Sep 2010) - - 21 Sep 2010; Markos Chandras -PyQt4-4.7.6.ebuild, - +PyQt4-4.7.7.ebuild: - Version bump. Remove old bogus version - - 13 Sep 2010; Tobias Klausmann PyQt4-4.7.3.ebuild: - Stable on alpha, bug #315775 - - 13 Sep 2010; Joseph Jezak PyQt4-4.7.3.ebuild: - Marked ppc stable for bug #315775. - - 10 Sep 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.7.6.ebuild: - Update EAPI. Fix dependencies. - -*PyQt4-4.7.6 (08 Sep 2010) - - 08 Sep 2010; Markos Chandras -PyQt4-4.7.2.ebuild, - +PyQt4-4.7.6.ebuild: - Version bump. Remove old ebuild - - 01 Sep 2010; Markos Chandras -PyQt4-4.7.4.ebuild, - PyQt4-4.7.5.ebuild: - Drop old bogus ebuild. Drop RESTRICT_PYTHON_ABIS from latest ebuild - -*PyQt4-4.7.5 (01 Sep 2010) - - 01 Sep 2010; Markos Chandras PyQt4-4.7.4.ebuild, - +PyQt4-4.7.5.ebuild: - Version bump - - 18 Aug 2010; Jeroen Roovers PyQt4-4.7.3.ebuild: - Stable for HPPA (bug #315775). - - 15 Jul 2010; Markos Chandras PyQt4-4.7.4.ebuild: - Bump sip dependency to 4.10.3. Fix arm epatch command - -*PyQt4-4.7.4 (13 Jul 2010) - - 13 Jul 2010; Markos Chandras +PyQt4-4.7.4.ebuild: - Version bump - - 05 Jul 2010; Samuli Suominen PyQt4-4.7.3.ebuild: - ppc64 stable wrt #315775 - - 16 Jun 2010; Tomas Touceda PyQt4-4.7.3.ebuild, - +files/PyQt4-4.7.3-qreal_float_support.patch: - Add patch for qreal/float support in ARM wrt bug 322349 - - 03 Jun 2010; Pawel Hajdan jr PyQt4-4.7.3.ebuild: - x86 stable wrt bug 315775 - - 25 May 2010; Markos Chandras PyQt4-4.7.3.ebuild: - Stable on amd64 wrt bug 315775 - - 23 Apr 2010; Theo Chatzimichos PyQt4-4.7.ebuild, - PyQt4-4.7.2.ebuild, PyQt4-4.7.3.ebuild: - Fix sip dep in PyQt4 ebuilds - -*PyQt4-4.7.3 (17 Apr 2010) - - 17 Apr 2010; Markos Chandras +PyQt4-4.7.3.ebuild: - Version bump - - 11 Apr 2010; PyQt4-4.7.ebuild: - ppc stable #301105 - -*PyQt4-4.7.2 (18 Mar 2010) - - 18 Mar 2010; Ben de Groot +PyQt4-4.7.2.ebuild, - +files/PyQt4-4.7.2-configure.py.patch: - Version bump. ChangeLog is no longer shipped. Update patch. - - 03 Mar 2010; Christian Faulhammer PyQt4-4.7.ebuild: - stable x86, bug 301105 - - 02 Mar 2010; Samuli Suominen PyQt4-4.7.ebuild: - amd64 stable wrt #301105 - - 16 Feb 2010; Jonathan Callen - -files/PyQt4-4.4.4-qgraphicsproxywidget-avoid-event-callback-loop.patch, - -files/fix_license_check.patch: - Drop old patches - - 10 Feb 2010; Jeroen Roovers PyQt4-4.6.2.ebuild: - Stable for HPPA (bug #300713). - - 08 Feb 2010; Christian Faulhammer PyQt4-4.6.2.ebuild: - stable x86, bug 300713 - - 02 Feb 2010; Alex Alexander PyQt4-4.5.4-r4.ebuild, - PyQt4-4.6.2.ebuild: - updated SRC_URI to use gentoo mirrors, upstream doesn't provide these - versions anymore - - 31 Jan 2010; PyQt4-4.6.2.ebuild: - Stable on amd64 wrt bug #300713 - - 20 Jan 2010; Jonathan Callen PyQt4-4.7.ebuild: - Add prefix keywords, support - -*PyQt4-4.7 (15 Jan 2010) - - 15 Jan 2010; Ben de Groot +PyQt4-4.7.ebuild: - Version bump - - 11 Jan 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.5.4-r4.ebuild, PyQt4-4.6.2.ebuild: - Don't call python_need_rebuild(). - - 06 Jan 2010; PyQt4-4.6.2.ebuild: - Migrate to qt4-r2 eclass - - 02 Jan 2010; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.5.4-r4.ebuild, PyQt4-4.6.2.ebuild: - Only restrict Python 3.2. - - 02 Jan 2010; Ben de Groot PyQt4-4.5.4-r4.ebuild, - PyQt4-4.6.2.ebuild: - Adding RESTRICT_PYTHON_ABIS for python3. Current PyQt4 versions only work - with python2. Fixes bug 292419. - - 13 Dec 2009; Ben de Groot -PyQt4-4.4.4-r2.ebuild, - -PyQt4-4.4.4-r5.ebuild, -PyQt4-4.5.2.ebuild, -PyQt4-4.5.4-r3.ebuild, - PyQt4-4.5.4-r4.ebuild, -PyQt4-4.6.1.ebuild, -PyQt4-4.6.1-r1.ebuild, - PyQt4-4.6.2.ebuild, metadata.xml: - Remove obsolete versions. Pin 4.5.4 on correct sip and Qt versions. Remove - qt3support useflag description from metadata, as it is no longer in use. - - 30 Nov 2009; Joseph Jezak PyQt4-4.5.4-r4.ebuild: - Marked ppc64 stable. - -*PyQt4-4.6.2 (20 Nov 2009) - - 20 Nov 2009; Arfrever Frehtes Taifersar Arahesis - +PyQt4-4.6.2.ebuild: - Version bump. - -*PyQt4-4.6.1-r1 (05 Nov 2009) - - 05 Nov 2009; Alex Alexander +PyQt4-4.6.1-r1.ebuild, - +files/PyQt4-4.6.1-configure-multilib.patch: - added multilib patch wrt bug #283936 - -*PyQt4-4.6.1 (28 Oct 2009) - - 28 Oct 2009; Markos Chandras +PyQt4-4.6.1.ebuild, - +files/configure-4.6.1.py.patch: - Version bump. Add new configuration patch - - 18 Oct 2009; Raúl Porcel PyQt4-4.5.4-r4.ebuild: - alpha/ia64/sparc stable wrt #284707 - - 27 Sep 2009; nixnut PyQt4-4.5.4-r4.ebuild: - ppc stable #284707 - - 22 Sep 2009; Markus Meier PyQt4-4.5.4-r4.ebuild: - add ~arm - - 22 Sep 2009; Jeroen Roovers PyQt4-4.5.4-r4.ebuild: - Stable for HPPA (bug #284707). - - 22 Sep 2009; Markus Meier PyQt4-4.5.4-r4.ebuild: - amd64 stable, bug #284707 - - 16 Sep 2009; Christian Faulhammer - PyQt4-4.5.4-r4.ebuild: - stable x86, bug 284707 - - 06 Sep 2009; Christian Ruppert - -files/PyQt4-4.4_compile.patch: - Remove unused patch. - - 16 Aug 2009; Markos Chandras -PyQt4-4.5.4.ebuild, - -PyQt4-4.5.4-r2.ebuild: - Remove old ebuilds - - 16 Aug 2009; Thomas Anderson - PyQt4-4.4.4-r5.ebuild: - stable amd64, bug 276852 - - 16 Aug 2009; Raúl Porcel PyQt4-4.4.4-r5.ebuild: - ia64 stable wrt #276852 - -*PyQt4-4.5.4-r4 (15 Aug 2009) - - 15 Aug 2009; Markos Chandras +PyQt4-4.5.4-r4.ebuild: - Build QtScriptTools bindings. Fixes bug 279945. Thanks to Davide Pesavento - for the patch - -*PyQt4-4.5.4-r3 (12 Aug 2009) - - 12 Aug 2009; Markos Chandras -PyQt4-4.5.4-r1.ebuild, - +PyQt4-4.5.4-r3.ebuild, - +files/PyQt4-4.5.4-qgraphicslinearlayout-fix.patch: - Added patch for removing items from QGraphicsLinearLayout. Fixes bug - 280634 . - THanks to Fabio Erculiani for the patch - -*PyQt4-4.5.4-r2 (11 Aug 2009) - - 11 Aug 2009; Markos Chandras +PyQt4-4.5.4-r2.ebuild: - Respect LINK, add missing inherit. Thanks to Davide Pesavento - -*PyQt4-4.5.4-r1 (05 Aug 2009) - - 05 Aug 2009; Markos Chandras +PyQt4-4.5.4-r1.ebuild: - New revision including various QA fixes due to eqmake4 usage - - 04 Aug 2009; Markos Chandras PyQt4-4.5.4.ebuild: - Fix bug #280055 for real this time - - 02 Aug 2009; Markos Chandras PyQt4-4.5.4.ebuild: - Fix QtCore rpath without checking X use flag. Install all html - documentation ( - bug #280055 ) - - 02 Aug 2009; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.5.4.ebuild: - Set SUPPORT_PYTHON_ABIS. - -*PyQt4-4.5.4 (31 Jul 2009) - - 31 Jul 2009; Alex Alexander +PyQt4-4.5.4.ebuild: - version bump - - 27 Jul 2009; nixnut PyQt4-4.4.4-r5.ebuild: - ppc stable #276852 - - 21 Jul 2009; Tobias Klausmann PyQt4-4.4.4-r5.ebuild: - Stable on alpha, bug #276852 - - 17 Jul 2009; Markos Chandras -PyQt4-4.4.4-r4.ebuild, - -PyQt4-4.5.1.ebuild: - Remove old ebuilds - -*PyQt4-4.5.2 (14 Jul 2009) - - 14 Jul 2009; Markos Chandras +PyQt4-4.5.2.ebuild: - Version bump - - 09 Jul 2009; Ferris McCormick PyQt4-4.4.4-r5.ebuild: - Sparc stable, Bug #276852. - - 08 Jul 2009; Christian Faulhammer - PyQt4-4.4.4-r5.ebuild: - stable x86, bug 276852 - - 08 Jul 2009; Jeroen Roovers PyQt4-4.4.4-r5.ebuild: - Stable for HPPA (bug #276852). - - 28 Jun 2009; Markos Chandras -PyQt4-4.5.ebuild: - Remove old ebuild - - 20 Jun 2009; Arfrever Frehtes Taifersar Arahesis - PyQt4-4.5.1.ebuild: - Don't install modules specific for other versions of Python (bug #274499). - - 16 Jun 2009; Markos Chandras PyQt4-4.5.1.ebuild: - Raise sip dependency to 4.8.1 - -*PyQt4-4.5.1 (16 Jun 2009) - - 16 Jun 2009; Markos Chandras PyQt4-4.4.4-r5.ebuild, - PyQt4-4.5.ebuild, +PyQt4-4.5.1.ebuild: - Drop qt3support use flag. Version bump. Bug-fix release - - 09 Jun 2009; Markos Chandras PyQt4-4.4.4-r2.ebuild, - PyQt4-4.4.4-r4.ebuild, PyQt4-4.4.4-r5.ebuild: - Add correct sip dependencies, fixes bug 273430 - -*PyQt4-4.5 (09 Jun 2009) - - 09 Jun 2009; Markos Chandras +PyQt4-4.5.ebuild: - Version bump - - 05 Jun 2009; Ben de Groot PyQt4-4.4.4-r5.ebuild: - Specify !kde for qt-phonon dep - - 03 Jun 2009; Ben de Groot PyQt4-4.4.4-r5.ebuild, - metadata.xml: - Add kde useflag, for selecting media-sound/phonon, bug 270188 - - 02 Jun 2009; Ben de Groot PyQt4-4.4.4-r5.ebuild: - QtDesigner is triggered by USE=X, so hide sed behind X useflag. Thanks - to Davide Pesavento for alerting. - - 01 Jun 2009; Markos Chandras - +files/fix_license_check.patch: - Add missing patch. Fixes bug 272126 - -*PyQt4-4.4.4-r5 (01 Jun 2009) - - 01 Jun 2009; Markos Chandras +PyQt4-4.4.4-r5.ebuild, - files/configure.py.patch, metadata.xml: - Fixed automagic dependency issue. ( bug 236341 ). Fixed rpath issues ( bug - 235819 , bug 271870 ). Thanks to Davide Pesavento - for the ebuilds and the rpath patch. - - 20 May 2009; Ben de Groot -PyQt4-4.4-r1.ebuild, - -PyQt4-4.4.4-r1.ebuild, -PyQt4-4.4.4-r3.ebuild, PyQt4-4.4.4-r4.ebuild: - Turn on default useflags for all Qt modules. Remove old. Move src_unpack - content to src_prepare, where it belongs. - - 15 May 2009; Alexis Ballier PyQt4-4.4.4-r4.ebuild: - keyword ~x86-fbsd, bug #269880 - -*PyQt4-4.4.4-r4 (26 Apr 2009) - - 26 Apr 2009; Markos Chandras - +files/PyQt4-4.4.4-qgraphicsproxywidget-avoid-event-callback-loop.patch, - +PyQt4-4.4.4-r4.ebuild: - Adding qt-xmlpatterns as dependency. Add patch for QGraphicsProxyWidget ( - thanks to Fabio Erculiani for providing the patch - ). Fixes bug #267012 - -*PyQt4-4.4.4-r3 (07 Apr 2009) - - 07 Apr 2009; Markos Chandras - +files/configure.py.patch, +PyQt4-4.4.4-r3.ebuild: - Fixed bug #204877 ( thanks to Davide Pesavento ) - - 27 Mar 2009; Jeroen Roovers PyQt4-4.4.4-r2.ebuild: - Stable for HPPA (bug #261652). - - 24 Mar 2009; Brent Baude PyQt4-4.4.4-r2.ebuild: - stable ppc64, bug 261652 - - 22 Mar 2009; Markus Meier PyQt4-4.4.4-r2.ebuild: - amd64 stable, bug #261652 - - 20 Mar 2009; Raúl Porcel PyQt4-4.4.4-r2.ebuild: - alpha/ia64/sparc/x86 stable wrt #261652 - - 20 Mar 2009; Brent Baude PyQt4-4.4.4-r2.ebuild: - stable ppc, bug 261652 - - 20 Mar 2009; Markos Chandras -PyQt4-4.3.1.ebuild, - -PyQt4-4.3.3.ebuild: - Dropping old packages due to qt-4.3 removal - - 18 Feb 2009; Jeroen Roovers PyQt4-4.4.4-r1.ebuild: - Stable for HPPA (bug #248083). - - 06 Feb 2009; Raúl Porcel PyQt4-4.4.4-r1.ebuild: - ia64/sparc stable wrt #248038 - - 04 Feb 2009; Brent Baude PyQt4-4.4.4-r1.ebuild: - Marking PyQt4-4.4.4-r1 ppc64 stable for bug 248038 - - 31 Jan 2009; Tobias Klausmann PyQt4-4.4.4-r1.ebuild: - Stable on alpha, bug #248038 - -*PyQt4-4.4.4-r2 (25 Jan 2009) - - 25 Jan 2009; Ben de Groot +PyQt4-4.4.4-r2.ebuild: - Add dbus-python dep, thanks to Maciej Mrozowski. Remove no longer needed - zlib useflag check. - - 18 Jan 2009; Markus Meier PyQt4-4.4.4-r1.ebuild: - amd64/x86 stable, bug #248038 - - 17 Jan 2009; nixnut PyQt4-4.4.4-r1.ebuild: - ppc stable #248038 - - 09 Jan 2009; Patrick Lauer -PyQt4-4.4.3.ebuild, - -PyQt4-4.4.4.ebuild: - Removing old - -*PyQt4-4.4.4-r1 (23 Nov 2008) - - 23 Nov 2008; Patrick Lauer +PyQt4-4.4.4-r1.ebuild: - Adding webkit useflag. Fixes pykde failing to build because of ordering - issues. - -*PyQt4-4.4.4 (21 Nov 2008) - - 21 Nov 2008; Ben de Groot -PyQt4-4.4.2.ebuild, - PyQt4-4.4.3.ebuild, +PyQt4-4.4.4.ebuild: - Drop ~x86-fbsd, as qt-core isn't keyworded for that arch yet. - Version bump, with updated deps. Remove hardmasked 4.4.2 version. - - 07 Oct 2008; Jeroen Roovers PyQt4-4.3.3.ebuild: - Stable for HPPA too. - -*PyQt4-4.4.3 (06 Sep 2008) - - 06 Sep 2008; Ben de Groot +PyQt4-4.4.3.ebuild: - Version bump. Fixes bug 234559. - - 06 Aug 2008; Jesus Rivero metadata.xml: - add GLEP 56 USE flag desc from use.local.desc - -*PyQt4-4.4-r1 (31 Jul 2008) - - 31 Jul 2008; Jesus Rivero - +files/PyQt4-4.4_compile.patch, -PyQt4-4.4.ebuild, +PyQt4-4.4-r1.ebuild: - Fixes bugs #233369 and #222435, thanks to Remy Bosch for the patch. - Removed old version - - 25 May 2008; Ingmar Vanhassel PyQt4-4.4.2.ebuild: - dev-python/PyQt4-4.4.2 needs Qt-4.4.0, fix dependencies, mask package. - -*PyQt4-4.4.2 (24 May 2008) - - 24 May 2008; Ben de Groot +PyQt4-4.4.2.ebuild: - Version bump. Updated homepage URL. Added split qt deps from bug 222709. - -*PyQt4-4.4 (14 May 2008) - - 14 May 2008; Ali Polatel PyQt4-4.3.1.ebuild, - PyQt4-4.3.3.ebuild, +PyQt4-4.4.ebuild: - Version bump. Change SRC_URI of old ebuilds to mirror://gentoo because - upstream doesn't have it anymore. - - 13 May 2008; Ali Polatel PyQt4-4.3.1.ebuild, - PyQt4-4.3.3.ebuild: - Changed HOMEPAGE. Thanks to Elias Probst, #220653 - - 12 May 2008; Markus Rothe PyQt4-4.3.3.ebuild: - Stable on ppc64 - - 07 Apr 2008; Alexis Ballier PyQt4-4.3.3.ebuild: - keyword ~x86-fbsd - - 02 Mar 2008; Wulf C. Krueger PyQt4-4.3.1.ebuild: - Marked stable on amd64 as per bug 201474. - - 21 Feb 2008; Raúl Porcel PyQt4-4.3.3.ebuild: - alpha/ia64/sparc stable - - 15 Feb 2008; nixnut PyQt4-4.3.1.ebuild: - Stable on ppc wrt bug 201474 - - 09 Feb 2008; Markus Ullmann PyQt4-4.3.3.ebuild: - Stable on x86 - - 28 Dec 2007; Caleb Tennis PyQt4-4.3.1.ebuild, - PyQt4-4.3.3.ebuild: - Explicitly depend on Qt 4.3 for these versions - -*PyQt4-4.3.3 (26 Dec 2007) - - 26 Dec 2007; Caleb Tennis +PyQt4-4.3.3.ebuild: - version bump - - 28 Nov 2007; Caleb Tennis -PyQt4-4.2.ebuild, - -PyQt4-4.3.ebuild: - Remove old versions - - 09 Nov 2007; Jeroen Roovers PyQt4-4.3.1.ebuild: - Marked ~hppa (bug #198456). Fixed quoting issues. - - 07 Nov 2007; Raúl Porcel PyQt4-4.3.1.ebuild: - Add ~alpha/~ia64/~sparc - - 20 Oct 2007; Markus Rothe PyQt4-4.3.1.ebuild: - Added ~ppc64; bug #196474 - -*PyQt4-4.3.1 (02 Oct 2007) - - 02 Oct 2007; Caleb Tennis +PyQt4-4.3.1.ebuild: - version bump - - 22 Aug 2007; Robert Buchholz PyQt4-4.3.ebuild: - Added ~ppc (bug #188998) - - 21 Aug 2007; Caleb Tennis PyQt4-4.3.ebuild: - add a check for zlib, per bug #188389 - -*PyQt4-4.3 (09 Aug 2007) - - 09 Aug 2007; Caleb Tennis +PyQt4-4.3.ebuild: - Version bump - - 24 Jun 2007; Tiziano Müller PyQt4-4.2.ebuild: - Fixed $ROOT abuse (bug #167271) and some cleanup - - 30 May 2007; Caleb Tennis -PyQt4-4.0.ebuild, - -PyQt4-4.1.1.ebuild: - remove old versions - - 30 May 2007; Caleb Tennis PyQt4-4.2.ebuild: - Fix doc install per bug #160675 - - 10 May 2007; Caleb Tennis PyQt4-4.2.ebuild: - fix from bug #177973 - -*PyQt4-4.2 (10 May 2007) - - 10 May 2007; Caleb Tennis +PyQt4-4.2.ebuild: - version bump - -*PyQt4-4.1.1 (20 Dec 2006) - - 20 Dec 2006; Markus Ullmann -PyQt4-4.1.ebuild, - +PyQt4-4.1.1.ebuild: - Version bump - - 15 Nov 2006; Caleb Tennis -PyQt4-4.0_beta1.ebuild: - remove old version - -*PyQt4-4.1 (14 Nov 2006) - - 14 Nov 2006; Caleb Tennis +PyQt4-4.1.ebuild: - version bump - - 22 Oct 2006; Thomas Cort PyQt4-4.0.ebuild: - Added ~amd64 keyword wrt Bug #137948. - - 11 Jul 2006; Caleb Tennis PyQt4-4.0.ebuild: - Fix a few minor issues with ebuild - -*PyQt4-4.0 (26 Jun 2006) - - 26 Jun 2006; Caleb Tennis +PyQt4-4.0.ebuild: - adding the release version - -*PyQt4-4.0_beta1 (05 May 2006) - - 05 May 2006; Caleb Tennis +metadata.xml, - +PyQt4-4.0_beta1.ebuild: - initial import, from bug #121554 - diff --git a/dev-python/PyQt4/Manifest b/dev-python/PyQt4/Manifest deleted file mode 100644 index 5208f2db4..000000000 --- a/dev-python/PyQt4/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -AUX PyQt4-4.6.1-configure-multilib.patch 883 RMD160 4ce96cdf4d53773c245544737c894c2494e9de29 SHA1 d0c9b214172b47537873e3fc1bd5fb34e815220c SHA256 6b33666a0b773122330d33a1b88ddd3b18d2d3b2c265e3fd4edc253f1bdfab1a -AUX PyQt4-4.7.2-configure.py.patch 933 RMD160 1c9525855d47bcdbf0c88618294be44274ce653b SHA1 4b27ab9173692a9d74598dc7c7fc88c3531e09b5 SHA256 1a87c58ccb14441f77c7c764b6e6c40d1bdd64c5b35581f3deda54019a3461be -AUX PyQt4-4.7.3-qreal_float_support.patch 6460 RMD160 f022dc75ccde5b923c689f82d169d02e8b066a19 SHA1 2e000133b482f5bb36a5795e375bfa3f60dd5c55 SHA256 8183d7a12c094d02eb4f1ac2b983690c39ee54182a0d28adba52348f705e9c16 -AUX PyQt4-4.7.7-fix-scpk-and-flag-issue.diff 1490 RMD160 0bfb92059ebf3518980ce5af432747ee01bf8540 SHA1 8e70a0a45757274ce92444054bd387abcb453022 SHA256 2f0b26dd0f725240378bd350303a97717f1a7c7bf37753ac5cc1d0717c013085 -AUX PyQt4-4.8.2-fix-wrong-class.patch 633 RMD160 85634b61bde33f18dcf645531163e4648bdce298 SHA1 357c799723b510008977c9795ed81c415d474c2b SHA256 93b3c19f2d9a3641a36ea7467660841180ce5614bbe7ab79360e03e4fc1c78fd -DIST PyQt-x11-gpl-4.8.2.tar.gz 9605005 RMD160 ba9948dcd05964c6f27d24b0f2d224a3d6109258 SHA1 fd26aed89a6032c85a553bfd5228280ac982b85c SHA256 ea9f4643d090a4416daa745ecf527c04429b89614d4fde8143a2155f64300fe4 -EBUILD PyQt4-4.8.2-r9.ebuild 4968 RMD160 53c9821d9b3b37116dd18c54779da31af6587068 SHA1 9c1b74fd4631e0ec7ea1a0b5e9831e892b13e18c SHA256 dfb8a8fe067ceadcd94d920cd999eeebfd3b989ad06c04c52dde4074b016bf54 -MISC ChangeLog 19970 RMD160 92b422296c512809c880de000a6135e2f03ce607 SHA1 79f043ab5bf984ebc25da468c676623731e3773f SHA256 5e119f8ff050f5b9b4bf6a7352fe397bac45d205d09ffcab4a82885905320e9f -MISC metadata.xml 878 RMD160 cdc42fae8ad9f67bbe0dcc949f7822cc72d0acf9 SHA1 f1907739ab33d27cd8276c57b4d062a3b44ae402 SHA256 89c99beeac252dc158fb953793675d0133b2daa91b22f4c5a016262348323afe diff --git a/dev-python/PyQt4/PyQt4-4.8.2-r9.ebuild b/dev-python/PyQt4/PyQt4-4.8.2-r9.ebuild deleted file mode 100644 index 66e8f7ed6..000000000 --- a/dev-python/PyQt4/PyQt4-4.8.2-r9.ebuild +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/PyQt4-4.8.2.ebuild,v 1.3 2010/12/30 18:08:19 arfrever Exp $ - -EAPI="3" -PYTHON_DEPEND="*" -PYTHON_EXPORT_PHASE_FUNCTIONS="1" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="*-jython" - -inherit python qt4-r2 toolchain-funcs - -MY_P="PyQt-x11-gpl-${PV/_pre/-snapshot-}" - -# Minimal supported version of Qt. -QT_VER="4.6.2" - -DESCRIPTION="Python bindings for the Qt toolkit" -HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt" -SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz" - -LICENSE="|| ( GPL-2 GPL-3 )" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="X assistant +dbus debug declarative doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns" - -DEPEND=">=dev-python/sip-4.12 - >=x11-libs/qt-core-${QT_VER}:4 - >=x11-libs/qt-script-${QT_VER}:4 - >=x11-libs/qt-test-${QT_VER}:4 - X? ( >=x11-libs/qt-gui-${QT_VER}:4[dbus?] ) - assistant? ( >=x11-libs/qt-assistant-${QT_VER}:4 ) - dbus? ( - >=dev-python/dbus-python-0.80 - >=x11-libs/qt-dbus-${QT_VER}:4 - ) - declarative? ( >=x11-libs/qt-declarative-${QT_VER}:4 ) - multimedia? ( >=x11-libs/qt-multimedia-${QT_VER}:4 ) - opengl? ( >=x11-libs/qt-opengl-${QT_VER}:4 || ( >=x11-libs/qt-opengl-4.7.0:4[-egl] =x11-libs/qt-phonon-${QT_VER}:4 media-sound/phonon ) ) - kde? ( media-sound/phonon ) - ) - sql? ( >=x11-libs/qt-sql-${QT_VER}:4 ) - svg? ( >=x11-libs/qt-svg-${QT_VER}:4 ) - webkit? ( >=x11-libs/qt-webkit-${QT_VER}:4 ) - xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_VER}:4 )" -RDEPEND="${DEPEND}" - -S=${WORKDIR}/${MY_P} - -PATCHES=( - "${FILESDIR}/${PN}-4.6.1-configure-multilib.patch" - "${FILESDIR}/${PN}-4.7.2-configure.py.patch" - "${FILESDIR}/${PN}-4.8.2-fix-wrong-class.patch" -) - -src_prepare() { - if ! use dbus; then - sed -e "s/^\([[:blank:]]\+\)check_dbus()/\1pass/" -i configure.py || die "sed configure.py failed" - fi - - # Support qreal for arm architecture (bug #322349). - use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch" - - qt4-r2_src_prepare - - # Use proper include directory. - sed -e "s:/usr/include:${EPREFIX}/usr/include:g" -i configure.py || die "sed configure.py failed" - - python_copy_sources - - preparation() { - if [[ "$(python_get_version --major)" == "3" ]]; then - rm -fr pyuic/uic/port_v2 - else - rm -fr pyuic/uic/port_v3 - fi - } - python_execute_function -s preparation -} - -pyqt4_use_enable() { - use $1 && echo "--enable=${2:-$1}" -} - -src_configure() { - configuration() { - local myconf=("$(PYTHON)" - configure.py - --confirm-license - --bindir="${EPREFIX}/usr/bin" - --destdir="${EPREFIX}$(python_get_sitedir)" - --sipdir="${EPREFIX}/usr/share/sip" - --qsci-api - $(use debug && echo --debug) - --enable=QtCore - --enable=QtNetwork - --enable=QtScript - --enable=QtTest - --enable=QtXml - $(pyqt4_use_enable X QtGui) - $(pyqt4_use_enable X QtDesigner) - $(pyqt4_use_enable X QtScriptTools) - # QtAssistant module is not available with Qt >=4.7.0. - $(pyqt4_use_enable assistant QtAssistant) - $(pyqt4_use_enable assistant QtHelp) - $(pyqt4_use_enable declarative QtDeclarative) - $(pyqt4_use_enable multimedia QtMultimedia) - $(pyqt4_use_enable opengl QtOpenGL) - $(pyqt4_use_enable phonon) - $(pyqt4_use_enable sql QtSql) - $(pyqt4_use_enable svg QtSvg) - $(pyqt4_use_enable webkit QtWebKit) - $(pyqt4_use_enable xmlpatterns QtXmlPatterns) - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - LINK="$(tc-getCXX)" - LINK_SHLIB="$(tc-getCXX)" - CFLAGS="${CFLAGS}" - CXXFLAGS="${CXXFLAGS}" - LFLAGS="${LDFLAGS}") - echo "${myconf[@]}" - "${myconf[@]}" || return 1 - - local mod - for mod in QtCore $(use X && echo QtDesigner QtGui); do - # Run eqmake4 inside the qpy subdirectories to avoid stripping and many other QA issues. - pushd qpy/${mod} > /dev/null || return 1 - eqmake4 $(ls w_qpy*.pro) - popd > /dev/null || return 1 - - # Fix insecure runpaths. - sed -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" -i ${mod}/Makefile || die "Fixing of rpaths failed" - done - - # Fix pre-stripping of libpythonplugin.so - if use X; then - cd "${BUILDDIR}/designer" - eqmake4 python.pro - fi - } - python_execute_function -s configuration -} - -src_compile() { - python_src_compile -} - -src_install() { - installation() { - # INSTALL_ROOT is needed for the QtDesigner module, other Makefiles use DESTDIR. - emake DESTDIR="${D}" INSTALL_ROOT="${D}" install - } - python_execute_function -s installation - - dodoc doc/pyqt4ref.txt NEWS THANKS || die "dodoc failed" - - if use doc; then - dohtml -r doc/* || die "dohtml failed" - fi - - if use examples; then - insinto /usr/share/doc/${PF} - doins -r examples || die "doins failed" - fi -} - -pkg_postinst() { - python_mod_optimize PyQt4 -} - -pkg_postrm() { - python_mod_cleanup PyQt4 -} diff --git a/dev-python/PyQt4/files/PyQt4-4.6.1-configure-multilib.patch b/dev-python/PyQt4/files/PyQt4-4.6.1-configure-multilib.patch deleted file mode 100644 index c187dcd4d..000000000 --- a/dev-python/PyQt4/files/PyQt4-4.6.1-configure-multilib.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- PyQt-x11-gpl-4.6.1~orig/configure.py 2009-11-04 22:28:05.000000000 +0100 -+++ PyQt-x11-gpl-4.6.1/configure.py 2009-11-04 23:10:01.000000000 +0100 -@@ -854,8 +854,8 @@ - # version. - link = "-framework Python" - elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "") and -- glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor))): -- lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"]) -+ glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor))): -+ lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"]) - link = "%s -lpython%d.%d" % (lib_dir_flag, py_major, py_minor) - else: - sipconfig.inform("Qt Designer plugin disabled because Python library is static") diff --git a/dev-python/PyQt4/files/PyQt4-4.7.2-configure.py.patch b/dev-python/PyQt4/files/PyQt4-4.7.2-configure.py.patch deleted file mode 100644 index 4f3b251de..000000000 --- a/dev-python/PyQt4/files/PyQt4-4.7.2-configure.py.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- PyQt-x11-gpl-4.7.2/configure.py.orig 2010-03-18 00:59:51.000000000 +0100 -+++ PyQt-x11-gpl-4.7.2/configure.py 2010-03-18 01:08:46.000000000 +0100 -@@ -478,7 +478,7 @@ - generate_code("QtXmlPatterns") - - if "phonon" in pyqt_modules: -- generate_code("phonon") -+ generate_code("phonon", extra_include_dirs=["/usr/include/phonon"]) - - if "QtAssistant" in pyqt_modules: - generate_code("QtAssistant") -@@ -797,6 +797,7 @@ - install_dir=pydbusmoddir, - qt=["QtCore"], - debug=opts.debug, -+ strip=0, - universal=sipcfg.universal, - arch=sipcfg.arch - ) -@@ -1611,6 +1612,7 @@ - warnings=1, - static=opts.static, - debug=opts.debug, -+ strip=0, - universal=sipcfg.universal, - arch=sipcfg.arch, - prot_is_public=opts.prot_is_public diff --git a/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch b/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch deleted file mode 100644 index 958fe56cb..000000000 --- a/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch +++ /dev/null @@ -1,254 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 03_qreal_float_support.dpatch by Michael Casadevall -## -## DP: Corrects a configure test, and adds explicate double handling -## to qlist.sip on architectures where qreal != double - -@DPATCH@ -Index: python-qt4-4.7.2/configure.py -=================================================================== ---- python-qt4-4.7.2.orig/configure.py 2010-03-17 19:29:19.000000000 +0100 -+++ python-qt4-4.7.2/configure.py 2010-03-25 23:53:55.468631945 +0100 -@@ -1915,8 +1915,9 @@ - out << "PyQt_NoOpenGLES\\n"; - #endif - -- if (sizeof (qreal) != sizeof (double)) -+#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) - out << "PyQt_qreal_double\\n"; -+#endif - - return 0; - } -Index: python-qt4-4.7.2/sip/QtCore/qlist.sip -=================================================================== ---- python-qt4-4.7.2.orig/sip/QtCore/qlist.sip 2010-03-17 19:29:26.000000000 +0100 -+++ python-qt4-4.7.2/sip/QtCore/qlist.sip 2010-03-25 23:53:55.468631945 +0100 -@@ -749,3 +749,227 @@ - return sipGetState(sipTransferObj); - %End - }; -+ -+// If we're on an architecture where qreal != double, then we need to also -+// explicately handle doubles. On architectures where qreal == double, they -+// will automaticially be cast upwards -+ -+%If (!PyQt_qreal_double) -+ -+%If (Qt_4_3_0 -) -+// QList > is implemented as a Python list of 2-element tuples. -+%MappedType QList > -+{ -+%TypeHeaderCode -+#include -+#include -+%End -+ -+%ConvertFromTypeCode -+ // Create the list. -+ PyObject *l; -+ -+ if ((l = PyList_New(sipCpp->size())) == NULL) -+ return NULL; -+ -+ // Set the list elements. -+ for (int i = 0; i < sipCpp->size(); ++i) -+ { -+ const QPair &p = sipCpp->at(i); -+ PyObject *pobj; -+ -+ if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL) -+ { -+ Py_DECREF(l); -+ -+ return NULL; -+ } -+ -+ PyList_SET_ITEM(l, i, pobj); -+ } -+ -+ return l; -+%End -+ -+%ConvertToTypeCode -+ SIP_SSIZE_T len; -+ -+ // Check the type if that is all that is required. -+ if (sipIsErr == NULL) -+ { -+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0) -+ return 0; -+ -+ for (SIP_SSIZE_T i = 0; i < len; ++i) -+ { -+ PyObject *tup = PySequence_ITEM(sipPy, i); -+ -+ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2) -+ return 0; -+ } -+ -+ return 1; -+ } -+ -+ QList > *ql = new QList >; -+ len = PySequence_Size(sipPy); -+ -+ for (SIP_SSIZE_T i = 0; i < len; ++i) -+ { -+ PyObject *tup = PySequence_ITEM(sipPy, i); -+ -+ double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0)); -+ double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1)); -+ -+ ql->append(QPair(first, second)); -+ } -+ -+ *sipCppPtr = ql; -+ -+ return sipGetState(sipTransferObj); -+%End -+}; -+%End -+%If (Qt_4_3_0 -) -+// QList > is implemented as a Python list of 2-element tuples. -+template -+%MappedType QList > -+{ -+%TypeHeaderCode -+#include -+#include -+%End -+ -+%ConvertFromTypeCode -+ // Create the list. -+ PyObject *l; -+ -+ if ((l = PyList_New(sipCpp->size())) == NULL) -+ return NULL; -+ -+ // Set the list elements. -+ for (int i = 0; i < sipCpp->size(); ++i) -+ { -+ const QPair &p = sipCpp->at(i); -+ TYPE *t = new TYPE(p.second); -+ PyObject *pobj; -+ -+ if ((pobj = sipBuildResult(NULL, "(dB)", p.first, t, sipClass_TYPE, sipTransferObj)) == NULL) -+ { -+ Py_DECREF(l); -+ delete t; -+ -+ return NULL; -+ } -+ -+ PyList_SET_ITEM(l, i, pobj); -+ } -+ -+ return l; -+%End -+ -+%ConvertToTypeCode -+ SIP_SSIZE_T len; -+ -+ // Check the type if that is all that is required. -+ if (sipIsErr == NULL) -+ { -+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0) -+ return 0; -+ -+ for (SIP_SSIZE_T i = 0; i < len; ++i) -+ { -+ PyObject *tup = PySequence_ITEM(sipPy, i); -+ -+ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2) -+ return 0; -+ -+ if (!sipCanConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, SIP_NOT_NONE)) -+ return 0; -+ } -+ -+ return 1; -+ } -+ -+ QList > *ql = new QList >; -+ len = PySequence_Size(sipPy); -+ -+ for (SIP_SSIZE_T i = 0; i < len; ++i) -+ { -+ PyObject *tup = PySequence_ITEM(sipPy, i); -+ double d; -+ int state; -+ -+ d = PyFloat_AsDouble(PySequence_ITEM(tup, 0)); -+ TYPE *t = reinterpret_cast(sipConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); -+ -+ if (*sipIsErr) -+ { -+ sipReleaseInstance(t, sipClass_TYPE, state); -+ -+ delete ql; -+ return 0; -+ } -+ -+ ql->append(QPair(d, *t)); -+ -+ sipReleaseInstance(t, sipClass_TYPE, state); -+ } -+ -+ *sipCppPtr = ql; -+ -+ return sipGetState(sipTransferObj); -+%End -+}; -+%End -+ -+// QList is implemented as a Python list of doubles. -+%MappedType QList -+{ -+%TypeHeaderCode -+#include -+%End -+ -+%ConvertFromTypeCode -+ // Create the list. -+ PyObject *l; -+ -+ if ((l = PyList_New(sipCpp->size())) == NULL) -+ return NULL; -+ -+ // Set the list elements. -+ for (int i = 0; i < sipCpp->size(); ++i) -+ { -+ PyObject *pobj; -+ -+ if ((pobj = PyFloat_FromDouble(sipCpp->value(i))) == NULL) -+ { -+ Py_DECREF(l); -+ -+ return NULL; -+ } -+ -+ PyList_SET_ITEM(l, i, pobj); -+ } -+ -+ return l; -+%End -+ -+%ConvertToTypeCode -+ // Check the type if that is all that is required. -+ if (sipIsErr == NULL) -+ return (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0); -+ -+ QList *ql = new QList; -+ SIP_SSIZE_T len = PySequence_Size(sipPy); -+ -+ for (SIP_SSIZE_T i = 0; i < len; ++i) -+ ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i))); -+ -+ *sipCppPtr = ql; -+ -+ return sipGetState(sipTransferObj); -+%End -+}; -+ -+%End diff --git a/dev-python/PyQt4/files/PyQt4-4.7.7-fix-scpk-and-flag-issue.diff b/dev-python/PyQt4/files/PyQt4-4.7.7-fix-scpk-and-flag-issue.diff deleted file mode 100644 index 38083e76e..000000000 --- a/dev-python/PyQt4/files/PyQt4-4.7.7-fix-scpk-and-flag-issue.diff +++ /dev/null @@ -1,40 +0,0 @@ -Index: PyQt-x11-gpl-4.7.7/pyuic/uic/Loader/loader.py -=================================================================== ---- PyQt-x11-gpl-4.7.7.orig/pyuic/uic/Loader/loader.py -+++ PyQt-x11-gpl-4.7.7/pyuic/uic/Loader/loader.py -@@ -1,3 +1,5 @@ -+import os.path -+ - from PyQt4 import QtGui, QtCore - from PyQt4.uic.uiparser import UIParser - from PyQt4.uic.Loader.qobjectcreator import LoaderCreatorPolicy -@@ -19,6 +21,7 @@ class DynamicUILoader(UIParser): - def loadUi(self, filename, toplevelInst=None): - self.toplevelInst = toplevelInst - -- # By using QFileInfo.path() rather than os.path.dirname() we allow -- # QString file names. -- return self.parse(filename, QtCore.QFileInfo(filename).path()) -+ # Allow the filename to be a QString. -+ filename = str(filename) -+ -+ return self.parse(filename, os.path.dirname(filename)) -Index: PyQt-x11-gpl-4.7.7/sip/QtCore/qglobal.sip -=================================================================== ---- PyQt-x11-gpl-4.7.7.orig/sip/QtCore/qglobal.sip -+++ PyQt-x11-gpl-4.7.7/sip/QtCore/qglobal.sip -@@ -312,12 +312,12 @@ public: - // Qt.Alignment class. - QFlags operator|(int f); - %MethodCode -- sipRes = new QFlags(*a0 | (ENUM(a1))); -+ sipRes = new QFlags(*a0 | a1); - %End - - QFlags operator^(int f); - %MethodCode -- sipRes = new QFlags(*a0 ^ (ENUM(a1))); -+ sipRes = new QFlags(*a0 ^ a1); - %End - - // These are necessary to prevent Python comparing object IDs. diff --git a/dev-python/PyQt4/files/PyQt4-4.8.2-fix-wrong-class.patch b/dev-python/PyQt4/files/PyQt4-4.8.2-fix-wrong-class.patch deleted file mode 100644 index b16dd45d4..000000000 --- a/dev-python/PyQt4/files/PyQt4-4.8.2-fix-wrong-class.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pyuic/uic/uiparser.py b/pyuic/uic/uiparser.py -index 921c273..84feb95 100644 ---- a/pyuic/uic/uiparser.py -+++ b/pyuic/uic/uiparser.py -@@ -158,7 +158,7 @@ class UIParser(object): - # Ignore the parent if it is a container. - parent = self.stack.topwidget - if isinstance(parent, (QtGui.QDockWidget, QtGui.QMdiArea, -- QtGui.QScrollArea, QtGui.StackedWidget, -+ QtGui.QScrollArea, QtGui.QStackedWidget, - QtGui.QToolBox, QtGui.QTabWidget, - QtGui.QWizard)): - parent = None diff --git a/dev-python/PyQt4/metadata.xml b/dev-python/PyQt4/metadata.xml deleted file mode 100644 index 569523904..000000000 --- a/dev-python/PyQt4/metadata.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - python - qt - - Build the QtGui and QtDesigner modules - Build the QtHelp and QtAssistant modules - Build the QtDeclarative module - Select media-sound/phonon as Phonon variant needed for KDE - Build the QtMultimedia module - Build the QtOpenGL module - Build the phonon module - Build the QtSql module - Build the QtSvg module - Build the QtWebKit module - Build the QtXmlPatterns module - - diff --git a/dev-util/bin_replace_string/Manifest b/dev-util/bin_replace_string/Manifest deleted file mode 100644 index 85a4ace74..000000000 --- a/dev-util/bin_replace_string/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST bin_replace_string-0.2.tar.bz2 69287 RMD160 2fe842264a0557dc623d2c00d89516174f1f5d59 SHA1 d7b222bef57218a9a93c96132728a0e9c7e3fce7 SHA256 4ab092edc3e30dec85b01747b67cdcabb1b535bdbe74732879d9e9cb7b6bd7be -EBUILD bin_replace_string-0.2.ebuild 544 RMD160 5783a699c111ae9120a4dfcb5d8d2352e55dec3f SHA1 c76ff133c3a112dbf0f98b7d501a145aefccc3e3 SHA256 c279bf93220ec618b558be83dcf1ebdcd94dea149bde349738e57b61b435b9e3 diff --git a/dev-util/bin_replace_string/bin_replace_string-0.2.ebuild b/dev-util/bin_replace_string/bin_replace_string-0.2.ebuild deleted file mode 100644 index f6932c79e..000000000 --- a/dev-util/bin_replace_string/bin_replace_string-0.2.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=2 - -inherit base - -DESCRIPTION="A tool to edit C strings in compiled binaries" -HOMEPAGE="http://ohnopub.net/~ohnobinki/bin_replace_string" -SRC_URI="ftp://ohnopub.net/mirror/bin_replace_string-0.2.tar.bz2" -LICENSE="AGPL-3" - -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="doc" - -RDEPEND="|| ( >=dev-libs/libelf-0.8.13 - dev-libs/elfutils )" -DEPEND="doc? ( app-text/txt2man ) - ${RDEPEND}" - -src_configure() { - econf $(use_enable doc) -} diff --git a/dev-util/gsimplecal/Manifest b/dev-util/gsimplecal/Manifest deleted file mode 100644 index 66fa74f75..000000000 --- a/dev-util/gsimplecal/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST gsimplecal-1.3.tar.gz 94290 RMD160 146d5032ad7f53eafa01c7a24e8bca85b90d0967 SHA1 9c706e64de4214e16e3f9cf0afd758380798ea5d SHA256 37e4d7e96ce7330ef7ad0362ae6c883cd166e021497a95a0eef7280f34068401 -EBUILD gsimplecal-1.3.ebuild 608 RMD160 29fbbcb911964774a29769845b5c9abb6041f65c SHA1 7094c1a3f2b62c18e373742107bda0a54dd327c1 SHA256 b90c412058e85c5a7d2b15917a1b5720835ce67c7bfe3f543cd3f5f7f909dca7 diff --git a/dev-util/gsimplecal/gsimplecal-1.3.ebuild b/dev-util/gsimplecal/gsimplecal-1.3.ebuild deleted file mode 100644 index cc3fc1205..000000000 --- a/dev-util/gsimplecal/gsimplecal-1.3.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="3" - -DESCRIPTION="A lightweight calendar designed for tint2" -HOMEPAGE="http://code.google.com/p/gsimplecal/" -SRC_URI="http://gsimplecal.googlecode.com/files/${P}.tar.gz" - -LICENSE="The BSD 2-Clause License" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="dev-libs/libunique:3 - x11-libs/gtk+:2 - >=sys-devel/autoconf-2.65" -DEPEND="${RDEPEND} - dev-util/pkgconfig" - -S="${WORKDIR}/${P}" - -src_configure() { - cd ${S} - ./configure - econf -} - -src_install() { - emake DESTDIR="${D}" install -} diff --git a/games-board/dreamchess/Manifest b/games-board/dreamchess/Manifest deleted file mode 100644 index ba34d5465..000000000 --- a/games-board/dreamchess/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -AUX dreamchess-0.2.0-configure.ac.patch 1357 RMD160 57f5fc5c92a7c2fd947cb940170c460ed58e3e52 SHA1 a5cf4be68c6657ae692381a56ad5659f6481c14c SHA256 8901ba65ce54400a61a4ebfd58fe91d1a17d4a3b56bf2256ceb59a24255ef9c7 -DIST dreamchess-0.2.0.tar.gz 5458328 RMD160 d3ee004589da020daac9fa8195d252b82851f696 SHA1 0e27c9d7cb20104367edc5aabe3076b70d989374 SHA256 7615699995a635c3dff6c952aa0d32723c415c8bb42448b4269d3daa199d8059 -DIST dreamchess-music-1.0.run.tar 74229760 RMD160 b9a7238e6e0cb962ccf83c166271aa571a96365b SHA1 9a2f720eff17f03cea31d75786e0f7cd61282c05 SHA256 d0472c94e40e8c2570eef83a3f36b61db60d45d79d4fb752bda4a23e76008cdd -EBUILD dreamchess-0.2.0.ebuild 1190 RMD160 c0e66e773e4577fb33e23a62a193f2357203de60 SHA1 447f39e100ecdb15ab5536d8925826b5ddb8787e SHA256 f01dd501f83a5cfa04f58b9d6ac770ce6bc698a8b47efebe5889ff4e5cf7be5e diff --git a/games-board/dreamchess/dreamchess-0.2.0.ebuild b/games-board/dreamchess/dreamchess-0.2.0.ebuild deleted file mode 100644 index b29ad9c54..000000000 --- a/games-board/dreamchess/dreamchess-0.2.0.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils autotools games - -MY_MUSIC="${PN}-music-1.0.run" - -DESCRIPTION="3D OpenGL moderately-strong chess engine" -HOMEPAGE="http://www.dreamchess.org/" -SRC_URI="mirror://berlios/${PN}/${P}.tar.gz - sound? ( music? ( mirror://berlios/${PN}/${MY_MUSIC}.tar ) )" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64" -IUSE="music sound" - -RDEPEND="virtual/opengl - media-libs/libsdl - media-libs/sdl-image - sound? ( media-libs/sdl-mixer ) - dev-libs/mini-xml" -DEPEND="${RDEPEND}" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}/${P}-configure.ac.patch" - eautoreconf - if use music ; then - if use sound ; then - "${WORKDIR}/${MY_MUSIC}" --tar xf - else - ewarn "You need to enable the sound use flag to play music." - fi - fi -} - -src_compile() { - egamesconf $( use_with sound mixer-sdl ) - emake || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install" - dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed" - newicon data/icon.png ${PN}.png || die "newicon failed" - make_desktop_entry ${PN} "DreamChess" ${PN}.png - prepgamesdirs -} diff --git a/games-board/dreamchess/files/dreamchess-0.2.0-configure.ac.patch b/games-board/dreamchess/files/dreamchess-0.2.0-configure.ac.patch deleted file mode 100644 index ef3437472..000000000 --- a/games-board/dreamchess/files/dreamchess-0.2.0-configure.ac.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- configure.ac.orig 2008-11-28 13:16:29.372873219 -0800 -+++ configure.ac 2008-11-28 13:15:20.523374056 -0800 -@@ -52,6 +52,7 @@ - dnl Check for SDL - AC_ARG_WITH([sdl], [ --without-sdl do not use SDL]) - AC_ARG_WITH([gl], [ --without-gl do not use GL]) -+AC_ARG_WITH([mixer-sdl], [ --without-mixer-sdl do not use SDL_Mixer]) - AC_ARG_ENABLE([linked-engine], [ --enable-linked-engine statically link with `dreamer' engine], [enable_linked_engine=yes]) - - AC_DEFUN([AC_CHECK_SDL_HEADER], -@@ -191,6 +192,7 @@ - with_ui_sdl="no" - fi - -+if test x"$with_mixer_sdl" = xyes; then - AC_CHECK_SDL_HEADER([SDL_mixer.h], [have_sdl_mixer_h="yes"], - [have_sdl_mixer_h="no"] - ) -@@ -205,6 +207,7 @@ - x"$have_sdl" = xyes -a \ - x"$have_sdl_mixer" = xyes; then supported_mixer_sdl="yes" - else supported_mixer_sdl="no" -+ AC_MSG_ERROR([SDL_Mixer was not found, please check your SDL installation.]) - fi - - if test x"$supported_mixer_sdl" = xno; then -@@ -214,6 +217,7 @@ - else - with_mixer_sdl="yes" - fi -+fi - - AC_DEFUN([AC_PRINT_LIB], - if test x"$2" = xyes; then -@@ -293,7 +297,6 @@ - fi - - AC_CHECK_HEADER([mxml.h], [], [AC_MSG_ERROR([Cannot find Mini-XML header file.])]) --AC_CHECK_LIB(mxml, mxmlLoadFile, [], [AC_MSG_ERROR([Cannot find Mini-XML library.])]) - - AM_CONDITIONAL(BEOS_RC, test x"$beos_rc" = x"yes") - AC_SUBST(DREAMCHESS_LIBS) diff --git a/gnome-extra/cinnamon-extensions/Manifest b/gnome-extra/cinnamon-extensions/Manifest deleted file mode 100644 index 9b8e00979..000000000 --- a/gnome-extra/cinnamon-extensions/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST cinnamon-extensions-1.6.7.4.tar.bz2 745593 SHA256 8782c348ceed786226259f203c84d3d603d558d6fc0d50d30ec7d12842251ce6 SHA512 c4770c5c6efbc0239a74a8bf728cc717d8d8a34edb776d291dec918f8b2032a346fa544f78e94eb6f29a21796166db8c23796256f2af0c2cfd487246acf4d725 WHIRLPOOL 2d7b90d3750281823870a54e71742fd69d0a58a3382bc1dc19d8219e766c77516e8f8ae7d153acabf22a71ea2fc0686cfaf6aab9b04cf695b501cc1d867996fa -EBUILD cinnamon-extensions-1.6.7.4.ebuild 1000 SHA256 5d767756053f5278248d9919b497250c9ede740939732a3f3f8dce8d4d76716f SHA512 cfe5b62e056b43bf1ebb36fb6cd7145b2b57fdf2508440f8e49f988c2d8d404f9954a67aec30019e7416ce3c6fe6ddea1fbfc1c9b7c28d7ccd434148124b7e57 WHIRLPOOL 1cb92fc0895a9d449d18ab1a85ef8d7f4b5dffebcdc28f7c98d1a9302a0e697170b461d2d36b7fc961fe6dfbcfbae4493ddf32e7d3384c102bcfa830d83ee5e4 -MISC metadata.xml 162 SHA256 aa767d7cd4aa87753509ccd5c72976108bfbbddc1311f98b9e8406816b9170e7 SHA512 8a867c9b4c3422d9aa6416aa3bb20da3784eca4f0e51c391841687038ccaaa1c7f62d62badd2fd683fd391816cc5b682ec9a74268715b29dab73b6336b0a3410 WHIRLPOOL 6bfdb7ef6ac996d737e9ce006dbe07ea6e2013dcb681d71c08aa207bb2f33c602a38c78d4318f6c2e5e991dd06ccdb3a0339d372f5e4839a69b7dc148f34eb75 diff --git a/gnome-extra/cinnamon-extensions/cinnamon-extensions-1.6.7.4.ebuild b/gnome-extra/cinnamon-extensions/cinnamon-extensions-1.6.7.4.ebuild deleted file mode 100644 index 5637c22b9..000000000 --- a/gnome-extra/cinnamon-extensions/cinnamon-extensions-1.6.7.4.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -inherit eutils - -DESCRIPTION="Extension pack for cinnamon" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND=" - >=gnome-extra/cinnamon-1.6.7" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/cinnamon/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate - insinto /usr/share/cinnamon/applets - doins -r applets/* - insinto /usr/share/glib-2.0/schemas - doins org.cinnamon.extensions.cinnadock.gschema.xml -} - -pkg_postinst() { - ebegin "Updating GSettings schemas" - /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ &>/dev/null - eend $? -} diff --git a/gnome-extra/cinnamon-extensions/metadata.xml b/gnome-extra/cinnamon-extensions/metadata.xml deleted file mode 100644 index 89be1d255..000000000 --- a/gnome-extra/cinnamon-extensions/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - -calculate - diff --git a/gnome-extra/evolution-tray/ChangeLog b/gnome-extra/evolution-tray/ChangeLog deleted file mode 100644 index 4028fde99..000000000 --- a/gnome-extra/evolution-tray/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for gnome-extra/evolution-tray -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*evolution-tray-0.0.3 (04 May 2010) - - 04 May 2010; Mike Hiretsky (mhiretskiy) - +evolution-tray-0.0.3.ebuild: - Add evolution-tray ebuild. - diff --git a/gnome-extra/evolution-tray/Manifest b/gnome-extra/evolution-tray/Manifest deleted file mode 100644 index 82be0e6ee..000000000 --- a/gnome-extra/evolution-tray/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST evolution-tray-0.0.3.tar.gz 342401 RMD160 990ef88febef7d29e09b6e28a76b84457d9f58b2 SHA1 22df57a92e2624918cc55bb97b9a4c61da03f03d SHA256 c0aeed274a722ca7ea5e4713a0433640cc6cde8a44efbdfb01b110c9b2df7969 -EBUILD evolution-tray-0.0.3.ebuild 548 RMD160 057c908c6f4b9a41b74498704fc05378c624b816 SHA1 8862337f9f743bf0b0dec2e9f2ed3d31b48198d7 SHA256 4eb6ba8727bbe24d02a55fcc691c4b5ffef762c23f20dd551da7cd4eeab42308 -MISC ChangeLog 286 RMD160 cc35f8c0d0f6edaab3b0937e4dad5d6457d89334 SHA1 d604b9156ea272514683ec0e639da82004ea0f2a SHA256 8e2f84603898ce0a954d4686a9cf551a29579ce718025b88073f3682129577e7 -MISC metadata.xml 273 RMD160 683818da015852ff289cd517e09b6c873ea255ef SHA1 4aefa6cbd52a3c71296f2c183679712d56061aa4 SHA256 e64e3ea815430323ce56715d89411296b7c6d54c5600b0d29e3a3caab3e28b95 diff --git a/gnome-extra/evolution-tray/evolution-tray-0.0.3.ebuild b/gnome-extra/evolution-tray/evolution-tray-0.0.3.ebuild deleted file mode 100644 index ff3e3cb66..000000000 --- a/gnome-extra/evolution-tray/evolution-tray-0.0.3.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -DESCRIPTION="The plugin for placing evolution in notification area." -HOMEPAGE="http://gnome.eu.org/evo/index.php/Evolution_Tray" -SRC_URI="http://gnome.eu.org/evolution-tray-0.0.3.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" - -DEPEND="mail-client/evolution" -RDEPEND="${DEPEND}" - -src_install() { - emake install DESTDIR="${D}" || die "Install failed" - dodoc NEWS README* AUTHORS ChangeLog || die "dodoc failed" -} diff --git a/gnome-extra/evolution-tray/metadata.xml b/gnome-extra/evolution-tray/metadata.xml deleted file mode 100644 index e95859357..000000000 --- a/gnome-extra/evolution-tray/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - -maintainer-wanted - -The plugin for placing evolution in notification area. - - - diff --git a/gnome-extra/gnome-shell-calculate/ChangeLog b/gnome-extra/gnome-shell-calculate/ChangeLog deleted file mode 100644 index d4fb9ccd5..000000000 --- a/gnome-extra/gnome-shell-calculate/ChangeLog +++ /dev/null @@ -1,12 +0,0 @@ -# ChangeLog for gnome-extra/gnome-shell-calculate -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*gnome-shell-calculate-9999 (16 Feb 2012) -*gnome-shell-calculate-3.2.2 (16 Feb 2012) - - 16 Feb 2012; Mike Hiretsky (mhiretskiy) - +gnome-shell-calculate-3.2.2.ebuild, +gnome-shell-calculate-9999.ebuild, - +metadata.xml: - Add live and 3.2.2. - diff --git a/gnome-extra/gnome-shell-calculate/Manifest b/gnome-extra/gnome-shell-calculate/Manifest deleted file mode 100644 index 8ee07570d..000000000 --- a/gnome-extra/gnome-shell-calculate/Manifest +++ /dev/null @@ -1,37 +0,0 @@ -AUX gnome-shell-extensions-3.2.2.15-fix_window_list.patch 1495 SHA256 96df3ef89a24555bae33688a99452b060b05508884c9048b7ebdc9780905bc3c SHA512 89092329fdf13cbaa5a1bd599afabbd2a5413b2154486afc1291968f6a3c74376cfe6b90eeee955b2956d5c1c6a0700e8a9adf668ebf69636264831bcee1c625 WHIRLPOOL fc2302fd60b6b28c9b9b1527a17a4f0c96b050f375407902bc0eee2266e0ec368a96549e28d5afb1e9701ee7474b0e8ae0bde2908ce6802c4f3422580bf0e180 -DIST gnome-shell-calculate-3.2.2.1.tar.bz2 35686 SHA256 25e7946135d29c8329df04514a4e9c5e8525f38e7acf870c5aae280988884d58 SHA512 f0c179ad189db525a4e6394a8d4a7501c577438ad868e4c0540199a6b4e0a45e7931a1cb858af90125b8c6175e6b62d5dd795e0e3b9db9de6a2405175427ecfe WHIRLPOOL 67843ccfe85d37479cee38c97d0f9745a8443d8aac6a049bf12d9d57c7646469f225189e153ef82b14ae473d7c725c18cbbf881f83ef825c7870b9ff482df031 -DIST gnome-shell-calculate-3.2.2.10.tar.bz2 41140 SHA256 75b0fcb1e30a7e96eac1f36ecc09bde9cceb3dc0f4b074abc7bf5bcc85312bfe SHA512 1a0c55c718d641525d1681352d7782ad8c088f211b26f770e38018cadb33dfaaf06d9c4c2af4f272cffa0c97fe83e72583cbef10b5f60f733d85c7c5b9936111 WHIRLPOOL d3a1bc8e119568a1de4641f3b9895898476d256a046ee8d6bad1823c37a082d838cd1cf481ea95e757fa86ab2f84a19adc91f039f9bee37da586754c509c70d5 -DIST gnome-shell-calculate-3.2.2.11.tar.bz2 41511 SHA256 01a6d3b210b40ac98199e5b532cb5024dbfb0c213f297bd461ce75a20982fc1f SHA512 cb6839f958cb07e30a6a1c965f587c74a86564b88ac4d73c431b1a2ecb2f937b3352d0d30c21e1e30f2a7fc1b74b822c446fc87952115989c973b2db208f3e2a WHIRLPOOL 5c312b46c12303e480846143a4def1ad05f91e4567857b2386e7c042fd9a43274eb4688633b21e658b3debaa630861771c15042be0699bcefb21f8c3fe09ae79 -DIST gnome-shell-calculate-3.2.2.12.tar.bz2 41439 SHA256 80ce8b6a9930408b8741dd76f1ee9a9d66b4906640dcb7d25b4a8b5a2d6e61ed SHA512 9669eefd779f6cc06ff7e57abc7142a57e8918b2f134ae168821f758500e84d7f82ad5b4858d2ba199a3af56c11577750c399c01d2b2446b2b98f00355df81ca WHIRLPOOL 0592035d00087a886177dd44fec1f50be65e4f65aad3e980dd9155dcb1bbe5cd99973131a03c3480c919d0c43c4090fa39ce8f3e695f56a836fb52f401c7f4ac -DIST gnome-shell-calculate-3.2.2.14.tar.bz2 41446 SHA256 c620cb14b6650551baa2cd021bc71aba4cbb7b389b38d14688fb40bafe3adb73 SHA512 07ec72dea5090681e2f3e8b30686fa613ff7bfb78bf76b7bcc78d00d4e5c9a6e0c4c62f2d0f130556644fcd0132f40603d0bf2bac6de3435e38e92e097b702a6 WHIRLPOOL 98d6e0712736a285c937b35525c71ce9b46e86024a286982c9529520a2e87ccd0cac1ffc4f051905104220f69f2c53e60ce76ff85385768e435022279182ea50 -DIST gnome-shell-calculate-3.2.2.15.tar.bz2 41546 SHA256 59a6d5e10018b652635f28cbed3160ff2eb7982e8e19c82a5eb5165e2e50b6fb SHA512 fe7a6e9da6562db39e6527c280ac6c8c22c899f4492ba75081adcfcb78a12f6ebed70a192145639f0eeb87e734b2eb1b5d0cc4fde0c6437a8cb4cd51ac25f48f WHIRLPOOL 4b8447fedb97a550eedcbe3438ad4ff36bc82ad639cfaeac28235274cd81bbb02a66c2f950a7c3ecefe9907437a80d16931bcf8ef682a4a290dc47819c2a7b8d -DIST gnome-shell-calculate-3.2.2.2.tar.bz2 36817 SHA256 e030a150ab13f1f692590d564526039727d7d7c7ae472d2caf0f900ab18569e0 SHA512 5453e3d75d3310018d8668a3dffcf2a69d36fb3edcb66e41e027208f251a7a04a5fd66246d2c3eaf4de551de3f46f23036538935aec69f6e8e3fd1fd1e6f6667 WHIRLPOOL 2e2408b0e7a69a33c9efd1c7442c54df5af0942ae081323d5bd22b52236083bc5c7940b7fb75eecfe1ee55822e8b2a5d1c2adc1eddcc6ec67f319f2bfdee19a1 -DIST gnome-shell-calculate-3.2.2.3.tar.bz2 37300 SHA256 a34cefb5a8179d71f6bc479a6709066232e9f6a721b2ea826a6f645c867b5400 SHA512 496066bd59205ebd2d72fde79bf57783404a287aac80416e6c33e32c69b2d861fb608f1b264f7a004d8a9d9099b3eac19f8cd32e58562a43a811cddbb9c21275 WHIRLPOOL def85d70ace694e316781eea95ac84d4faec39d72319a5c6ec45e354e4ce3eef0dbf16ebbf2078f113b814e40f430823ae19a3aef08eb940df4ce8782ed42bdf -DIST gnome-shell-calculate-3.2.2.4.tar.bz2 37871 SHA256 3791ac93ac3b9f4e667ccad8d4f2288f9da85f23a4ed762ce1349e2a146ee456 SHA512 1e67f79065afdeee05840849ce678291fc0f5069d204e1974b74653cd46ce54ebb3c09873c232e785c76228c7732b555e6e007d3707ae747f1abb896218e809e WHIRLPOOL 29e5f736408dc5ca6245cf0568f395c49a3564dd75c27f8526cb19896613119ba0e1c546b1295c6ff94a3e9cd642ce4745f59f6bb1c2639f85324f4e82267602 -DIST gnome-shell-calculate-3.2.2.5.tar.bz2 38268 SHA256 9329b5905c3b6ab0fb7a6445b2644730bd4a63ef792da4b76d4d495b6ffabcf8 SHA512 8270bde502a585c3180c8930d79e9c16ab7365a76fb9f55b0ab41f18cbdc48e1a08a11fc159c6f3feae042bbb655af320cc4f53faf77ef44c33e9c75fb0b2db0 WHIRLPOOL 756d1e08b599dcb15a620d816f2625e7d7315b74b3247802930f4e0f7daf6d7c34e7b5cc0a337557714e04dcd5b36b90f72e89b566c9e3ef5c910d347c87ba6f -DIST gnome-shell-calculate-3.2.2.6.tar.bz2 38372 SHA256 ea1893f406ce2e14f4de39b0d6239546b111bad300c1777a7d027c7d9ceea6b9 SHA512 35b5a2593e9bc581b585781c38942bb18e50afe7f5edf17802ff1f6becf16fe75aca611f9e8788fd24a53da89358c49a6059feca1a3e8c56c2fa794a1ace2d0b WHIRLPOOL 3d798a0ac44404554e91735f081e6099d26263910bd2183136865a6079ba9885e3729d8ae6484c7308359a6a9f422451af7844c8969aec7dff2a8ac5aa5a3abf -DIST gnome-shell-calculate-3.2.2.7.tar.bz2 39155 SHA256 7c7d23fcd0f7356439e3a80920e34a224910418ec26590549d9ed983cfa8111d SHA512 92b3e82c038b7970d5f0a0c93320189c42cf08dcba11b39bd24f5fa213f461511f5e1c540e46da92f821fcba1d6b9f7c59e07e0df16a12d7868b284f65706295 WHIRLPOOL dd66f4f51b622f08d8b52e6c170d1f2fb3a3b11752623b28e9628cd6c8f8a820d398f44609592f9d8c489b102a113027ad785ef8fd545566eee32a18afbfffba -DIST gnome-shell-calculate-3.2.2.8.tar.bz2 39287 SHA256 6360293ea8ce63d7881c76646b7aa6e724faa18da79a025e444dcf4b5abc5483 SHA512 94058ea5a163ca92b7f1249b2347c87da6b6c91bd0bfae00d58c966d79353e33234cfd91115d925ef62d3238a1c57d3b046fa797c930726ca2c00ba2327a9339 WHIRLPOOL 6ea6d04c74656e67a146675545909cb1acbeef7df25fd276dba64803893ebda8d5c19b147db5c915ef64e086acf2e07d79d4f4fcea9de1d83b4405c38f7bcc27 -DIST gnome-shell-calculate-3.2.2.9.tar.bz2 39941 SHA256 a93fe8b7430a94b08d0524eb9cf55064a5e312392e1799163186989d5243d172 SHA512 9a094db7e12e319f2a4cfa4965df4041e3d43575d33fe97d3e75b57d07366aefcffc04ac448bb44af5c35da57d61dba293a48eab911ca237a727dbfabee81e45 WHIRLPOOL 8c95d7da1c94ee27501acb08255aea06aa5779657d0700dd997f1eb075e26a69258272c1525c166d10dfbced8af4872548e2d9897f936353a9760d9c4e4adc46 -DIST gnome-shell-calculate-3.2.2.tar.bz2 33754 SHA256 76eeb5f5dcab584104b78d964c02bcabed1e113787b0b0e1df3b8142f92fc233 SHA512 7e3eb078510c77940319d9c976fdf1655c32e6e0e42ed7ed93ba65920bad7f0bc50c6194172fc9c1a9439862c15c2fdf1fce107521c1ce9c69aacec5b1442bf0 WHIRLPOOL e12c2702826d4834abc3fae9eebd452c45f27db1858745dc19fe94f018f943991930f5714d0f3ee0e050f90978f2b42e8f4199649b2036337e138a972e2c6803 -DIST gnome-shell-calculate-3.4.1.1.tar.bz2 84404 SHA256 b656c0c88c4ef55feb73232ebaf5395d02d93f4dfa2e4b4c8f9ada834c07bc34 SHA512 4066f44ad3272974251d338446f0a2efc442b4325bfd7133b7135b41dcaf303726ba86daac4f63a3dedff3e49be88e6bd34bba110db05a5eee7da6576f4863c2 WHIRLPOOL bb1a08f0a282362761b6607c374a189afea006f6519bb5fc0cca123c2896f487269abd509702a3936f30f0fae6abe016d0e2ba8708db6223583bdd71526281ef -EBUILD gnome-shell-calculate-3.2.2.1.ebuild 923 SHA256 588d1dabb5780df1d5715808ab367d4734ba4e73804a01d738f9fbcee68fd5ae SHA512 ebd96e60b1528d6284f54a2c9a7070237b4a6f77a11eacc57ea658a274c5545b9247182c1d9e3de70addb746985f15b762bb2affb86b236ac1c5e41043a77f2f WHIRLPOOL 9f223191553bdbb48b707d2b55213e0529e371f81d9876e827bf888e8c06d1762b9a788a11bb34e0e848bb13c03a6e67431fef6222a5811dcf1dac4ed904bf63 -EBUILD gnome-shell-calculate-3.2.2.10.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.11.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.12.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.14.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.15-r1.ebuild 1136 SHA256 8c0fa052ae798ee49c11a654be4aab9a41a987e28978f202d59d0a8f58e7848a SHA512 d8f0e65b56415689925fe487d19dd93058fe9ada28748e941e167f37a9671eb301b163d527008558a5455ad9a31977c9b3891558945c023de0b552803966cadf WHIRLPOOL dad22f31211e6b2bd7ec159dafe93edfb36a5c703c2e5ba026663ec8430f249ef4927021367b0c1873f1b0f2fca08315a7ee5ba8c1306f6557869d78b36ad53d -EBUILD gnome-shell-calculate-3.2.2.15.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.2.ebuild 923 SHA256 588d1dabb5780df1d5715808ab367d4734ba4e73804a01d738f9fbcee68fd5ae SHA512 ebd96e60b1528d6284f54a2c9a7070237b4a6f77a11eacc57ea658a274c5545b9247182c1d9e3de70addb746985f15b762bb2affb86b236ac1c5e41043a77f2f WHIRLPOOL 9f223191553bdbb48b707d2b55213e0529e371f81d9876e827bf888e8c06d1762b9a788a11bb34e0e848bb13c03a6e67431fef6222a5811dcf1dac4ed904bf63 -EBUILD gnome-shell-calculate-3.2.2.3.ebuild 923 SHA256 588d1dabb5780df1d5715808ab367d4734ba4e73804a01d738f9fbcee68fd5ae SHA512 ebd96e60b1528d6284f54a2c9a7070237b4a6f77a11eacc57ea658a274c5545b9247182c1d9e3de70addb746985f15b762bb2affb86b236ac1c5e41043a77f2f WHIRLPOOL 9f223191553bdbb48b707d2b55213e0529e371f81d9876e827bf888e8c06d1762b9a788a11bb34e0e848bb13c03a6e67431fef6222a5811dcf1dac4ed904bf63 -EBUILD gnome-shell-calculate-3.2.2.4.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.5.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.6.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.7.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.8.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.9.ebuild 921 SHA256 c0b00b2dfadc74a17a8f50570d528929ffd3e453e6be55082b3b1d2715030d1e SHA512 9a445e73b7f968c33bca95fb82f05324a1f40d50e2770221c95314ab2b39e765b4923e65e882a589ba7c3d120c2aba4865764c32ff4414a01c517d6bad849546 WHIRLPOOL 3a076fe1586568f5feb8c368693bf1f7936109f5a256a091df453b91aa751af6aa623bbfd2018dce2c2c840c6407f9843e672794489d8f3cb1977da11f4edc6b -EBUILD gnome-shell-calculate-3.2.2.ebuild 923 SHA256 588d1dabb5780df1d5715808ab367d4734ba4e73804a01d738f9fbcee68fd5ae SHA512 ebd96e60b1528d6284f54a2c9a7070237b4a6f77a11eacc57ea658a274c5545b9247182c1d9e3de70addb746985f15b762bb2affb86b236ac1c5e41043a77f2f WHIRLPOOL 9f223191553bdbb48b707d2b55213e0529e371f81d9876e827bf888e8c06d1762b9a788a11bb34e0e848bb13c03a6e67431fef6222a5811dcf1dac4ed904bf63 -EBUILD gnome-shell-calculate-3.4.1.1.ebuild 973 SHA256 6c92218548a42115b1042072832563807f883ce78db3ff888912bafaed0ac173 SHA512 ca3787fc9bc0ca424db312dc74e286cb4c7d9c27765d1e065ae0784a454818914294ffe82777d64922f4505cce7c9e6d5772454e415a087ae057e54943e48fa3 WHIRLPOOL 28e07204a61f82264429040fb3943e43fb72e966e75a34e7454f3e5eff026c83f2b7bf4f517d3b9237e9a6b2b1f288ccc24d62f1bd293df27f3d5854a8516d59 -EBUILD gnome-shell-calculate-9999.ebuild 866 SHA256 c83c7243d642068fe20d73aeb6f8dceb7f49934fff0e53a2681176fa78d6f316 SHA512 63a989f1da9b6bb31e30f9adc4779d48f5b4ebff5991d4f76efa104eed8f3b23733e5d2992a6c85143d9142a4e515c1c78d40ec43538ea10c9309614636c39b0 WHIRLPOOL 94659838c265bad67f3358664175d14ccb924cc74f16b7c5a66b6e230ebde50a720e37ff56ae55ab213d9f177a545d0aedad4f9be939b146fd9bf6c95acc0565 -MISC ChangeLog 395 SHA256 daf6368cd2652f2f6dfd1c277228e56676f33e7c6eed076e6689a9235ca2c5ea SHA512 6b50dc14d713d3214b02eb47c6a177601b1a920f0e8a11fe76e20f52e8846ee4893772a20638589dcd8d40b3b777c83fd320463e4030eab0ec9102f924ebdc8b WHIRLPOOL a96a4db14c613680b5fbf3ca718270490fd9661d27d5144c5a173d0db5dde018f207240f54bcc036bb20d5c049ed62060b72bb73c858cb1e58a4a70bfbc746ce -MISC metadata.xml 162 SHA256 aa767d7cd4aa87753509ccd5c72976108bfbbddc1311f98b9e8406816b9170e7 SHA512 8a867c9b4c3422d9aa6416aa3bb20da3784eca4f0e51c391841687038ccaaa1c7f62d62badd2fd683fd391816cc5b682ec9a74268715b29dab73b6336b0a3410 WHIRLPOOL 6bfdb7ef6ac996d737e9ce006dbe07ea6e2013dcb681d71c08aa207bb2f33c602a38c78d4318f6c2e5e991dd06ccdb3a0339d372f5e4839a69b7dc148f34eb75 diff --git a/gnome-extra/gnome-shell-calculate/files/gnome-shell-extensions-3.2.2.15-fix_window_list.patch b/gnome-extra/gnome-shell-calculate/files/gnome-shell-extensions-3.2.2.15-fix_window_list.patch deleted file mode 100644 index 26bd58e1b..000000000 --- a/gnome-extra/gnome-shell-calculate/files/gnome-shell-extensions-3.2.2.15-fix_window_list.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 75dcdf30c69241440668b6b074e198ba0662cbbd -Author: Хирецкий Михаил -Date: Wed Mar 14 15:58:17 2012 +0400 - - Fix window list and middle click on QuickLaunch - -diff --git extensions/QuickLaunch@wwwdotorg.org/extension.js extensions/QuickLaunch@wwwdotorg.org/extension.js -index 2f68749..daab441 100644 ---- extensions/QuickLaunch@wwwdotorg.org/extension.js -+++ extensions/QuickLaunch@wwwdotorg.org/extension.js -@@ -101,7 +101,7 @@ QLButton.prototype = { - }, - - generateMenu: function(animate) { -- if( global.get_pointer()[2] == 512 ) { -+ if( global.get_pointer()[2] & 512 ) { - this._focusDesktopActor(); - this.appinfo.launch([], null); - return; -diff --git extensions/windowlist@o2net.cl/extension.js extensions/windowlist@o2net.cl/extension.js -index 67fe570..3993b18 100644 ---- extensions/windowlist@o2net.cl/extension.js -+++ extensions/windowlist@o2net.cl/extension.js -@@ -120,6 +120,16 @@ AppMenuButton.prototype = { - - }, - -+ handleDragOver : function(source, actor, x, y, time) { -+ Main.testSource = source; -+ if (source == Main.xdndHandler) { -+ this.metaWindow.activate(global.get_current_time()); -+ return DND.DragMotionResult.CONTINUE; -+ } -+ -+ return DND.DragMotionResult.CONTINUE; -+ }, -+ - _onTitleChange: function() { - this._label.setText(this.metaWindow.get_title()); - //this._label.setText(this.app.get_name()); diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.1.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.1.ebuild deleted file mode 100644 index c89d3771e..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.1.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/*@* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.10.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.10.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.10.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.11.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.11.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.11.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.12.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.12.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.12.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.14.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.14.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.14.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.15-r1.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.15-r1.ebuild deleted file mode 100644 index c7cd083c5..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.15-r1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -inherit eutils - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_unpack() { - unpack "${A}" - cd "${S}" - - # fix window list (activate on drag'n'drop) fix middle click on quick launch - epatch "${FILESDIR}/gnome-shell-extensions-3.2.2.15-fix_window_list.patch" -} - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.15.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.15.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.15.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.2.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.2.ebuild deleted file mode 100644 index c89d3771e..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/*@* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.3.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.3.ebuild deleted file mode 100644 index c89d3771e..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.3.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/*@* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.4.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.4.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.4.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.5.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.5.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.5.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.6.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.6.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.6.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.7.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.7.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.7.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.8.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.8.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.8.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.9.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.9.ebuild deleted file mode 100644 index b7b9cb92a..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.9.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.ebuild deleted file mode 100644 index c89d3771e..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.2.2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/*@* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.4.1.1.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.4.1.1.ebuild deleted file mode 100644 index bc1b70ec1..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-3.4.1.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -inherit eutils - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -SRC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND=" - >=gnome-base/gnome-core-libs-3.4 - app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -#S="${WORKDIR}/.local/share/gnome-shell" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-9999.ebuild b/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-9999.ebuild deleted file mode 100644 index b11a8e27b..000000000 --- a/gnome-extra/gnome-shell-calculate/gnome-shell-calculate-9999.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-shell-frippery/gnome-shell-frippery-0.3.6.ebuild,v 1.2 2012/01/12 19:18:10 tetromino Exp $ - -EAPI="4" - -inherit git-2 - -DESCRIPTION="Extension pack Calculate-like features for GNOME 3" -HOMEPAGE="http://www.calculate-linux.org" -EGIT_REPO_URI="git://git.calculate.ru/${PN}.git" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="" -IUSE="" - -RDEPEND="app-admin/eselect-gnome-shell-extensions - gnome-extra/gnome-shell-extensions - gnome-extra/gnome-shell-frippery" -DEPEND="" - -src_install() { - insinto /usr/share/gnome-shell/extensions - doins -r extensions/* - insinto /usr/share/themes - doins -r themes/Calculate -} - -pkg_postinst() { - ebegin "Updating list of installed extensions" - eselect gnome-shell-extensions update - eend $? -} diff --git a/gnome-extra/gnome-shell-calculate/metadata.xml b/gnome-extra/gnome-shell-calculate/metadata.xml deleted file mode 100644 index 89be1d255..000000000 --- a/gnome-extra/gnome-shell-calculate/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - -calculate - diff --git a/gnome-extra/nm-applet/Manifest b/gnome-extra/nm-applet/Manifest deleted file mode 100644 index 1ef5d42c8..000000000 --- a/gnome-extra/nm-applet/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -AUX nm-applet-0.8.2-libnotify-0.7.patch 1111 RMD160 3a63b65cf30848b60e681ee05d63f645d8276e6a SHA1 059346b94cda77bbe2ce97c2ba90a9fe8ba54c1e SHA256 542e0c3a5f851f72e5672f982c7e86c45b79868f3d16500b930d58cf8f039b5d -DIST network-manager-applet-0.8.2.tar.bz2 1129756 RMD160 30a14d27732c53b17c66d034ecefe68eb115fb68 SHA1 1be46b1df52786cd22e1d3d888f828c27d46dd3a SHA256 c6f8723031092bd1c7db452df5578ec9ca8e9f98c2ea493dba7d40dbe0e02391 -EBUILD nm-applet-0.8.2-r10.ebuild 1358 RMD160 0eec1f88887208aec4d2cb33007a17add743e7cb SHA1 b8f052ea1a69a01515eaa6d145e2171815ba57b1 SHA256 9bb8667952902e08738984d9b1413d1f7ce11dde18b62b605c875b1a822d326f -EBUILD nm-applet-0.8.2-r9.ebuild 1407 RMD160 92622bf8e806c51c7b052fe67744db416866def7 SHA1 b4904a7ad29efa86074b448f5296ad37e1316357 SHA256 0b5b5a54504373d75f0909dcd04d169445025494e2a1e923f5ab440031b63ccc diff --git a/gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch b/gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch deleted file mode 100644 index 54aa473af..000000000 --- a/gnome-extra/nm-applet/files/nm-applet-0.8.2-libnotify-0.7.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- src/applet.c -+++ src/applet.c -@@ -58,6 +58,10 @@ - #include - #include - -+#ifndef NOTIFY_CHECK_VERSION -+#define NOTIFY_CHECK_VERSION(x,y,z) 0 -+#endif -+ - #include "applet.h" - #include "applet-device-wired.h" - #include "applet-device-wifi.h" -@@ -626,12 +630,20 @@ - escaped = utils_escape_notify_message (message); - notify = notify_notification_new (summary, - escaped, -- icon ? icon : GTK_STOCK_NETWORK, -- NULL); -+ icon ? icon : GTK_STOCK_NETWORK -+#if NOTIFY_CHECK_VERSION (0, 7, 0) -+ ); -+#else -+ , NULL); -+#endif - g_free (escaped); - applet->notification = notify; - -+#if NOTIFY_CHECK_VERSION (0, 7, 0) -+ /* notify_notification_attach_to_status_icon was removed */ -+#else - notify_notification_attach_to_status_icon (notify, applet->status_icon); -+#endif - notify_notification_set_urgency (notify, urgency); - notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT); - diff --git a/gnome-extra/nm-applet/nm-applet-0.8.2-r10.ebuild b/gnome-extra/nm-applet/nm-applet-0.8.2-r10.ebuild deleted file mode 100644 index 243a63a59..000000000 --- a/gnome-extra/nm-applet/nm-applet-0.8.2-r10.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild,v 1.5 2011/03/06 23:08:10 nirbheek Exp $ - -EAPI=2 -inherit eutils gnome2 - -MY_PN="${PN/nm-applet/network-manager-applet}" - -DESCRIPTION="Gnome applet for NetworkManager." -HOMEPAGE="http://projects.gnome.org/NetworkManager/" -SRC_URI="${SRC_URI//${PN}/${MY_PN}}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bluetooth" - -# FIXME: bluetooth is automagic -RDEPEND=">=dev-libs/glib-2.16:2 - >=dev-libs/dbus-glib-0.88 - >=sys-apps/dbus-1.4.1 - >=x11-libs/gtk+-2.18:2 - >=gnome-base/gconf-2.20:2 - >=x11-libs/libnotify-0.4.3 - >=gnome-base/libglade-2:2.0 - >=gnome-base/gnome-keyring-2.20 - - >=dev-libs/libnl-1.1 - >=net-misc/networkmanager-${PV} - >=net-wireless/wireless-tools-28_pre9 - >=net-wireless/wpa_supplicant-0.5.7 - net-misc/mobile-broadband-provider-info - bluetooth? ( >=net-wireless/gnome-bluetooth-2.27.6 ) - >=sys-auth/polkit-0.96-r1" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=dev-util/intltool-0.35" - -S=${WORKDIR}/${MY_PN}-${PV} - -pkg_setup () { - G2CONF="${G2CONF} - $(use_with bluetooth) - --disable-more-warnings - --localstatedir=/var" - - DOCS="AUTHORS ChangeLog NEWS README" -} - -src_prepare() { - epatch "${FILESDIR}"/${P}-libnotify-0.7.patch - gnome2_src_prepare -} diff --git a/gnome-extra/nm-applet/nm-applet-0.8.2-r9.ebuild b/gnome-extra/nm-applet/nm-applet-0.8.2-r9.ebuild deleted file mode 100644 index 353403c60..000000000 --- a/gnome-extra/nm-applet/nm-applet-0.8.2-r9.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.8.2.ebuild,v 1.1 2010/11/10 13:05:32 dagger Exp $ - -EAPI="2" - -inherit gnome2 eutils - -MY_PN="${PN/nm-applet/network-manager-applet}" - -DESCRIPTION="Gnome applet for NetworkManager." -HOMEPAGE="http://projects.gnome.org/NetworkManager/" -SRC_URI="${SRC_URI//${PN}/${MY_PN}}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bluetooth" - -# FIXME: bluetooth is automagic -# XXX: depend on dbus-1.2.6 when it goes stable -RDEPEND=">=dev-libs/glib-2.16 - >=dev-libs/dbus-glib-0.74 - >=sys-apps/dbus-1.2 - >=x11-libs/gtk+-2.18 - >=gnome-base/gconf-2.20 - >=gnome-extra/polkit-gnome-0.92 - >=x11-libs/libnotify-0.4.3 - >=gnome-base/libglade-2 - >=gnome-base/gnome-keyring-2.20 - - >=dev-libs/libnl-1.1 - >=net-misc/networkmanager-${PV} - >=net-wireless/wireless-tools-28_pre9 - >=net-wireless/wpa_supplicant-0.5.7 - || ( >=gnome-base/gnome-panel-2 xfce-base/xfce4-panel x11-misc/trayer ) - net-misc/mobile-broadband-provider-info - bluetooth? ( >=net-wireless/gnome-bluetooth-2.27.6 )" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=dev-util/intltool-0.35" - -DOCS="AUTHORS ChangeLog NEWS README" -# USE_DESTDIR="1" - -S="${WORKDIR}/${MY_PN}-${PV}" - -pkg_setup () { - G2CONF="${G2CONF} - $(use_with bluetooth) - --disable-more-warnings - --localstatedir=/var" -} diff --git a/kde-base/dolphin-box-plugin/ChangeLog b/kde-base/dolphin-box-plugin/ChangeLog deleted file mode 100644 index 907793a21..000000000 --- a/kde-base/dolphin-box-plugin/ChangeLog +++ /dev/null @@ -1,9 +0,0 @@ -# ChangeLog for kde-base/dolphin-box-plugin -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*kde-base/dolphin-box-plugin-4.5.4 (28 Dec 2010) - - 28 Dec 2010; Dmitry 'daks' Fomenko - +metadata.xml, +kde-base/dolphin-box-plugin-4.5.4: - Initial commit diff --git a/kde-base/dolphin-box-plugin/Manifest b/kde-base/dolphin-box-plugin/Manifest deleted file mode 100644 index 4ff52e16b..000000000 --- a/kde-base/dolphin-box-plugin/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -EBUILD dolphin-box-plugin-4.5.4.ebuild 880 SHA256 5c81c8e6ede7e687e250eeb8d185caf99cb2e6553d51f5845d703683665546a6 SHA512 894f072d24c35ca4e3de51a6e4f7b2220b8ab4d21bf8f4e934dc3dd715aadc60d65e82116a52f6bd8a58101b6a9dc2bddfa2d4b1503805a31f5c2de469735815 WHIRLPOOL 4fc3fbb51127e0d37a07ab4214b6408dc0a49de52c8d7942890ae787a76eb952230089ddbf41f1ca471232ec50e89a79ebb46e4229b4049c393d30e930eebbb0 -MISC ChangeLog 301 SHA256 b00bb2711a11e0cb849fe22df56acc78e8d073c40c460a01e604bc0a6ffef9a5 SHA512 625ea638d2d27f691411c2b868f365ce1ad42f5bc612e614367815eb6ab19ba5b870568110a1b213a60c940bef6636bcbca13842b32c2e917e0575b1cd05a8b5 WHIRLPOOL e507e4243dc4fa2a4e8d84ed16aff56aaedbd9417365fd1128c21e685bcbde91b583c3e81a73b3a3ad10774106189e7cf2f117d06fd0e4a08ffff2c4ec498f51 -MISC metadata.xml 261 SHA256 c4a2402d01197b6c1a7476c5b2b1ec7552b4acbc7dd51c7d775c4100c6324c8d SHA512 8faf1b8a224dfff5fb6877b201be94676085384e1956f5b7a59f736355c5a977265977607834db708ff1134db7d84e05310b534d87e234a4aceb91cc6ea6dc9c WHIRLPOOL 6b9ef570281ca1f8a3286f5a2f525e0a87938b7eab2b45264a0e92ad55e4543aed919d8234df0231a35052e1dcb4ea2f0bd3d194585eaa7e96bf835e54c7634f diff --git a/kde-base/dolphin-box-plugin/dolphin-box-plugin-4.5.4.ebuild b/kde-base/dolphin-box-plugin/dolphin-box-plugin-4.5.4.ebuild deleted file mode 100644 index f5aaee9cb..000000000 --- a/kde-base/dolphin-box-plugin/dolphin-box-plugin-4.5.4.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: - -EAPI="4" - -KMNAME="kdesdk" -inherit kde4-meta git-2 - -DESCRIPTION="Provides Dropbox integration in Dolphin." -EGIT_REPO_URI="git://anongit.kde.org/scratch/trichard/dolphin-box-plugin" -SRC_URI="" -HOMEPAGE="http://gitweb.kde.org/scratch/trichard/dolphin-box-plugin.git" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="" -LICENSE="GPL-3" - -DEPEND=" - $(add_kdebase_dep libkonq) -" -RDEPEND="${DEPEND} - dev-vcs/git -" -# $(add_kdebase_dep kompare) - -src_unpack() { - git-2_src_unpack -} - -src_prepare() { - git-2_src_prepare - cd "${S}" - cmake-utils_src_configure || die "cmake failed" -} - -pkg_postinst() { - elog "" - elog "Quick start:" - elog " * Restart Dolphin" - elog " * Settings --> Configure Dolphin --> Services" - elog " * Check Dropbox" - elog " * Restart Dolphin" -} diff --git a/kde-base/dolphin-box-plugin/metadata.xml b/kde-base/dolphin-box-plugin/metadata.xml deleted file mode 100644 index 234b4095d..000000000 --- a/kde-base/dolphin-box-plugin/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - no-herd - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/kde-misc/plasma-applet-flexibletask/ChangeLog b/kde-misc/plasma-applet-flexibletask/ChangeLog deleted file mode 100644 index 67b3e875c..000000000 --- a/kde-misc/plasma-applet-flexibletask/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for kde-misc/plasma-applet-flexibletask -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*plasma-applet-flexibletask-0.2c (01 Apr 2011) - - 01 Apr 2011; Mike Hiretsky (mhiretskiy) - +plasma-applet-flexibletask-0.2c.ebuild, +metadata.xml: - Initial ebuild. - diff --git a/kde-misc/plasma-applet-flexibletask/Manifest b/kde-misc/plasma-applet-flexibletask/Manifest deleted file mode 100644 index b5b72a878..000000000 --- a/kde-misc/plasma-applet-flexibletask/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST 129291-flexibletasks-0.2c.zip 49485 SHA256 1e5b06ffa06643866bbda8647fa69d2b69b67ce1e9005d0a7c5143f5779c84e7 SHA512 c80300a3ef662c383f1f749f5590352e64f2000f80832f8c709443cbeb6e542c79d59c2db72881dac2c23e0cdbd469c1b667fc7042c6d975570f9f6b63bc99c3 WHIRLPOOL 2495de874c178a5f7d63055f89c253831b37295aa05b16bc83fa4d9ef025c633472405ebc9029bf0cde9b2974d9673d9ae18034ebed37ecc42842eada27f9138 -EBUILD plasma-applet-flexibletask-0.2c.ebuild 603 SHA256 9a06decb3b06359f876fc200701790f72a4544008a73d8338ff9075399acb4d8 SHA512 51be3eb2ea72a16d01b4f187957e510771a7c5999e17b3e71b0d1abc3a8b226e712ab88f25d3fc8e5a76946cfd295aa3639a69ab61e3382f23f47af60424a161 WHIRLPOOL 4b0a041c2d56e99853fc3f1caa1f1fe8e0a359c95d22278b1ba831d64ff00bc11dc2596e1bfbe2fc956124ed23e63cb7205606e8d5e2b658dafa6da06c035684 -MISC ChangeLog 321 SHA256 f370a4ca8d40d48646498a9d420d40492eb8e46b5b6d461a7edb030c9e7069e5 SHA512 84ea68a267123343ab09617a7924200af7992839e923b544186bf07810cd62e1349a3b240a153434c8ac3359406bc4f21c4ed94926e2e35139cf0298257469ab WHIRLPOOL d1e262d021b5da88c95bbfccaebe37cc1eb7e258e3aa740a0aa388c2e92fadcec291cb60f4d1f1b9ed5ca531b9d1b42c23b687dd14c1b0c9391be7ff42d19d8e -MISC metadata.xml 158 SHA256 b1f2af69cc9a002750dfc0abd0f1dc63431290bebbabd4a17169dd3d4dbe89a2 SHA512 4210fc46453c5cae68335853dddf2bb18eaed5d151e0a5a860fc962a7657bc0a0555cf10dcff1ca7776ad40cc2112e098f1a1976629b831ad4acff6ab530d028 WHIRLPOOL b0760df8063b3b6c908f89997a605278b91ba53f9bea95c0a3f307783af8693aa8ee824b59380044b3cf3f51b5f6afc25a0f0b210d958ceef9763b6c81ec63c7 diff --git a/kde-misc/plasma-applet-flexibletask/metadata.xml b/kde-misc/plasma-applet-flexibletask/metadata.xml deleted file mode 100644 index 721dd1c8d..000000000 --- a/kde-misc/plasma-applet-flexibletask/metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - kde - - diff --git a/kde-misc/plasma-applet-flexibletask/plasma-applet-flexibletask-0.2c.ebuild b/kde-misc/plasma-applet-flexibletask/plasma-applet-flexibletask-0.2c.ebuild deleted file mode 100644 index a36bcd628..000000000 --- a/kde-misc/plasma-applet-flexibletask/plasma-applet-flexibletask-0.2c.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/kde-misc/plasma-applet-daisy/plasma-applet-daisy-0.0.4.25.ebuild,v 1.2 2011/01/31 14:28:25 tampakrap Exp $ - -EAPI=4 - -inherit kde4-base - -MYPN="flexibletasks" - -DESCRIPTION="Flexible Task Manager for KDE 4's plasma desktop" -HOMEPAGE="http://kde-look.org/content/show.php/Flexible+Tasks?content=129291" -SRC_URI="http://kde-look.org/CONTENT/content-files/129291-${MYPN}-${PV}.zip" - -LICENSE="GPL-3" -SLOT="4" -KEYWORDS="~amd64 ~x86" -IUSE="debug" - -S="${WORKDIR}/${MYPN}" diff --git a/kde-misc/plasma-applet-mountoid/ChangeLog b/kde-misc/plasma-applet-mountoid/ChangeLog deleted file mode 100644 index 02a147f36..000000000 --- a/kde-misc/plasma-applet-mountoid/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for kde-misc/plasma-applet-mountoid -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*plasma-applet-mountoid-0.41 (01 Apr 2011) - - 01 Apr 2011; Mike Hiretsky (mhiretskiy) - +plasma-applet-mountoid-0.41.ebuild, +metadata.xml: - Initail ebuild. - diff --git a/kde-misc/plasma-applet-mountoid/Manifest b/kde-misc/plasma-applet-mountoid/Manifest deleted file mode 100644 index 50f2fb1ae..000000000 --- a/kde-misc/plasma-applet-mountoid/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST 115943-mountoid-0.41.tar.gz 65579 SHA256 d9496aeee9a85558afcda83dfb1b87b370c1268ea34dd9a82b523a1579ac34f1 SHA512 5b06e6950e12561b6c3cb95e4265709d3bbe215365aacb5744990f9500c8a5c593e0aec0bf2b79bbce02866fb6a4bcb852897876a317240ea6b912f38723f855 WHIRLPOOL 418246e0e174a97a3c76ed381ce88d7607f247eea02d8baf0a0dfd473dd3f8773b04116f8c04a8151604568d9d9d0dc50e7373365069ac01c993b9f19f20176f -EBUILD plasma-applet-mountoid-0.41.ebuild 582 SHA256 c81b544a2d0c001841f8ec7a70eb8b6b60272e88b571f314086fc8dc7e04c2d9 SHA512 192584c585275336b49fde4f3c6277c934472e0b798926fe75b0507ff08201c2d4b58f619d9d6de17fe9df4386743c0c7d61e589345f37d1e4dbbf1a2126bcb2 WHIRLPOOL 4ea4762cd77229ef795786075a2fdb712265e14052beb5c543527b0b400ecb695948a341a9d14d353d0f4c13e1985d6a2234816a755fa892971ab8ce4135e424 -MISC ChangeLog 309 SHA256 0e2c02636702cc90979226b3c9c127a9b7ed1264cb2109d0efc1e825f024e121 SHA512 1503bb23cd17fe4f7d866b320dd427f037dd803450a42fd519e52b8d4d700dfbca2d3cf563618300ee5c073350239ba5beb7edc41ba189446c46ef62018f853d WHIRLPOOL e91506d9ff6a787093a5d582bc804f2205c05dd9109e957c2d950a84ffe5527d7b89c6a16cc67db0c15cd98ffd5fc071549276ad32fad49a438c76eccd320521 -MISC metadata.xml 158 SHA256 b1f2af69cc9a002750dfc0abd0f1dc63431290bebbabd4a17169dd3d4dbe89a2 SHA512 4210fc46453c5cae68335853dddf2bb18eaed5d151e0a5a860fc962a7657bc0a0555cf10dcff1ca7776ad40cc2112e098f1a1976629b831ad4acff6ab530d028 WHIRLPOOL b0760df8063b3b6c908f89997a605278b91ba53f9bea95c0a3f307783af8693aa8ee824b59380044b3cf3f51b5f6afc25a0f0b210d958ceef9763b6c81ec63c7 diff --git a/kde-misc/plasma-applet-mountoid/metadata.xml b/kde-misc/plasma-applet-mountoid/metadata.xml deleted file mode 100644 index 721dd1c8d..000000000 --- a/kde-misc/plasma-applet-mountoid/metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - kde - - diff --git a/kde-misc/plasma-applet-mountoid/plasma-applet-mountoid-0.41.ebuild b/kde-misc/plasma-applet-mountoid/plasma-applet-mountoid-0.41.ebuild deleted file mode 100644 index c8afbac7f..000000000 --- a/kde-misc/plasma-applet-mountoid/plasma-applet-mountoid-0.41.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/kde-misc/plasma-applet-daisy/plasma-applet-daisy-0.0.4.25.ebuild,v 1.2 2011/01/31 14:28:25 tampakrap Exp $ - -EAPI=4 - -inherit kde4-base - -MYPN="mountoid" - -DESCRIPTION="Mountoid for KDE 4's plasma desktop" -HOMEPAGE="http://kde-look.org/content/show.php/Mountoid?content=115943" -SRC_URI="http://kde-look.org/CONTENT/content-files/115943-${MYPN}-${PV}.tar.gz" - -LICENSE="GPL-3" -SLOT="4" -KEYWORDS="~amd64 ~x86" -IUSE="debug" - -S="${WORKDIR}/${MYPN}" diff --git a/media-libs/libffado/Manifest b/media-libs/libffado/Manifest deleted file mode 100644 index f44251661..000000000 --- a/media-libs/libffado/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST libffado-2.0.1.tar.gz 777163 RMD160 c9fba20fa362923f01c226015124f42f8dbb850d SHA1 9e327cb5ad0f56e8cfa84ec2a5f3f261b57ca96a SHA256 fda254ecf9c8007374d6120cf1c3614c7758d90981bc73f494b58313da7d199c -EBUILD libffado-2.0.1.ebuild 1439 RMD160 2f1356b44b57ebaf38eafa10417fd262a36a09ea SHA1 c280ddbf9d1240cbe090019054be5ba4e9293aa4 SHA256 77971720e1344a8853efa40ebc233fc6daf8c1486f0696bfdddf158eaafc9e50 diff --git a/media-libs/libffado/libffado-2.0.1.ebuild b/media-libs/libffado/libffado-2.0.1.ebuild deleted file mode 100644 index 4489aea0f..000000000 --- a/media-libs/libffado/libffado-2.0.1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=1 - -inherit eutils multilib -RESTRICT="mirror" - -DESCRIPTION="Successor for freebob: Library for accessing BeBoB IEEE1394 devices" -HOMEPAGE="http://www.ffado.org" -SRC_URI="http://www.ffado.org/files/${P}.tar.gz" - -LICENSE="GPL-2" -KEYWORDS="~amd64 ~x86" -SLOT="0" -IUSE="debug qt4" - -RDEPEND=">=media-libs/alsa-lib-1.0.0 - >=dev-cpp/libxmlpp-2.13.0 - >=sys-libs/libraw1394-1.3.0 - >=media-libs/libiec61883-1.1.0 - >=sys-libs/libavc1394-0.5.3 - >=sys-apps/dbus-1.0 - qt4? ( - || ( ( x11-libs/qt-core x11-libs/qt-gui ) - >=x11-libs/qt-4.0:4 ) - dev-python/PyQt4 - >=dev-python/dbus-python-0.83.0 )" - -DEPEND="${RDEPEND} - dev-util/scons" - -src_compile () { - local myconf="" - - use debug \ - && myconf="${myconf} DEBUG=True ENABLE_OPTIMIZATIONS=False" \ - || myconf="${myconf} DEBUG=False ENABLE_OPTIMIZATIONS=True" - - scons \ - PREFIX=/usr \ - LIBDIR=/usr/$(get_libdir) \ - ${myconf} || die -} - -src_install () { - scons DESTDIR="${D}" WILL_DEAL_WITH_XDG_MYSELF="True" install || die - dodoc AUTHORS ChangeLog README - - if use qt4; then - newicon "support/xdg/hi64-apps-ffado.png" "ffado.png" - newmenu "support/xdg/ffado.org-ffadomixer.desktop" "ffado-mixer.desktop" - fi -} - -pkg_postinst() { - ewarn "Important: This version of FFADO works on the new firewire-stack," - ewarn "and no longer needs the raw1394/ohci1394/ieee1394 modules." -} diff --git a/media-plugins/mac/Manifest b/media-plugins/mac/Manifest deleted file mode 100644 index 1f35a0606..000000000 --- a/media-plugins/mac/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST mac-3.99-u4-b5.tar.gz 421234 RMD160 34b5ba553f7ffa858249258dad9f64c60f0b6ac0 SHA1 f215c265c2cba719834c989498d5a8d2457b54de SHA256 d59ac5b1fa375a78eadbd5d9bb638ad0229185b42b562dbb04b0dab6475b6651 -EBUILD mac-3.99.ebuild 804 RMD160 fb8edb2220a3d3a255e8acba9d218135cba6aef3 SHA1 ff48239c606e1d444f079298496a44fc762b5277 SHA256 e440f7394af857bbfd8131f6b4350366f6233ac70e6ac3c5c39d85fefb77bea7 diff --git a/media-plugins/mac/mac-3.99.ebuild b/media-plugins/mac/mac-3.99.ebuild deleted file mode 100644 index d38433fef..000000000 --- a/media-plugins/mac/mac-3.99.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -MY_P=${PV}-u4-b5 -MY_F=mac-${MY_P} -DESCRIPTION="Monkey Audio Codec (MAC linux port)" -HOMEPAGE="http://sourceforge.net/projects/mac-port/" -SRC_URI="mirror://sourceforge/mac-port/$MY_F.tar.gz - http://195.113.31.123/~sanda/mac/$MY_F.tar.gz" - -LICENSE="MAC" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" - -src_unpack() { - unpack ${MY_F}.tar.gz || die "unpacking failed" - cd "${WORKDIR}" - mv ${MY_F} ${P} -} - -src_compile() { - econf || die "econf failed" - emake || die "make failed" -} - -src_install() { - einstall || die "install failed" - dodoc AUTHORS README AUTHORS src/License.htm NEWS ChangeLog -} diff --git a/media-sound/deadbeef/Manifest b/media-sound/deadbeef/Manifest deleted file mode 100644 index d427e1181..000000000 --- a/media-sound/deadbeef/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST deadbeef-0.5.6.tar.bz2 3279899 SHA256 17c123eb50e33c89403d8d3035b9132463a227a6905fd42bcbb2a3a5616cea5b SHA512 20d8d58e2df90078af2dd6583c7ae9d7b3b6f7d73cef1d823910614278779614c1544e839a886ab7ab972ad235220829d8e07dc1c959e98c94fc1e47299e5b4a WHIRLPOOL 9b7349c4664be4e98a935fb97393195cc4911d28e011a83c8f3d621b004ccb70f3e5e06129138eb3edf64b17c533b0b214a29e2fb71b96e7b6638b92d2a69947 -DIST deadbeef-0.6.0.tar.bz2 3433789 SHA256 78a684bd50f3bae2cb3913a7d9c1b06549d0718b37f923fbb0ea523fd9e7826a SHA512 3f6add4998dd0fc67c94c289905700144153ae2dc8c7e6cfa1bbfab7844c7dfe3985d5ff87909d9d0b1abe4926b5498055389ab74e83cc7db63f254081d7e666 WHIRLPOOL a8fb43cef99b030e2c79e54533516d142ef805e0d3f30639d13eb246dc9a1b8c71500f23d61d400ddd0776857d6cac4daf0d1d7656e21de249cd36d077d97fd4 -EBUILD deadbeef-0.5.6.ebuild 4486 SHA256 d14fd0b14fd214522b68e1b3d8a404f45385967eb8f45b0c488e9aa9c70e0cb7 SHA512 ea1be0544a9d905805d2815dee1fbca0e55cb4bffe9e8c771034ef110ef383b79adbe819991123777e63adaa08e5638071a731b6fede412ed2f3910f630fec62 WHIRLPOOL bff7463015c1d0031ed906f9e7687b7c99721b86b64f5b6717c01db098954318556355b5e66c1f02f4a905ff5f070a090e33210f9a54c799cd24143a1b05b67e -EBUILD deadbeef-0.6.0.ebuild 4524 SHA256 afc628f8c15f36587f6750fe7c5944fe6dd04725504b96bae76a750e9c64456f SHA512 2ddeb0499a41fda998f4c95153249b799d1363d518f4548fdedd2b983317424102054360e948450535e88e5bb361593ba82a5f2601a1dcac1b943355305cd677 WHIRLPOOL 4ba9c38166f8f7ed344971644e04e540ab6b8e8fed299dd4fbf4c25bb9f7abf777c5ae9194fc066b4d450593216be093f58ec63c7b4202ab508fcdeebb7727a8 diff --git a/media-sound/deadbeef/deadbeef-0.5.6.ebuild b/media-sound/deadbeef/deadbeef-0.5.6.ebuild deleted file mode 100644 index 3d7084bda..000000000 --- a/media-sound/deadbeef/deadbeef-0.5.6.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="4" - -inherit fdo-mime gnome2-utils versionator - -MY_PV="$(replace_version_separator 3 '-')" - -SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.bz2 - http://sourceforge.net/projects/${PN}/files/${PN}-${MY_PV}.tar.bz2/download -> ${PN}-${MY_PV}.tar.bz2" -KEYWORDS="~x86 ~amd64" - -DESCRIPTION="foobar2k-like music player" -HOMEPAGE="http://deadbeef.sourceforge.net/" - -LICENSE="GPL-2 - LGPL-2.1 - ZLIB - psf? ( BSD XMAME ) - dumb? ( DUMB-0.9.2 ) - shn? ( shorten )" -SLOT="0" -IUSE="adplug aac alsa psf ape cdda cover cover-imlib2 dts dumb converter curl ffmpeg flac gme - hotkeys lastfm m3u midi mms mp3 musepack nls notify nullout oss pulseaudio rpath mono2stereo - shellexec shn sid sndfile src static supereq threads tta vorbis vtx wavpack zip gtk3 +gtk2 infobar" - -LANGS="be bg bn ca cs da de el en_GB es fa fi fr gl he hr hu id it ja kk km lg nb nl pl pt_BR pt ru si sk sl sr@latin sr sv te tr uk vi zh_CN zh_TW" -for lang in ${LANGS}; do - IUSE+=" linguas_${lang}" -done - -RDEPEND="aac? ( media-libs/faad2 ) - alsa? ( media-libs/alsa-lib ) - cdda? ( dev-libs/libcdio media-libs/libcddb ) - cover? ( media-libs/imlib2 net-misc/curl ) - ffmpeg? ( virtual/ffmpeg ) - flac? ( media-libs/flac ) - gtk2? ( x11-libs/gtk+:2 ) - gtk3? ( x11-libs/gtk+:3 ) - lastfm? ( net-misc/curl ) - notify? ( sys-apps/dbus ) - midi? ( media-sound/timidity-freepats ) - mms? ( media-libs/libmms ) - mp3? ( media-libs/libmad ) - musepack? ( media-sound/musepack-tools ) - pulseaudio? ( media-sound/pulseaudio ) - sndfile? ( media-libs/libsndfile ) - src? ( media-libs/libsamplerate ) - vorbis? ( media-libs/libvorbis ) - wavpack? ( media-sound/wavpack ) - zip? ( dev-libs/libzip - sys-libs/zlib ) - curl? ( net-misc/curl ) - infobar? ( net-misc/curl )" - -DEPEND=" - dev-util/intltool - ${RDEPEND}" -S="${WORKDIR}/${PN}-${MY_PV}" -pkg_setup() { - if use psf || use dumb || use shn && use static ; then - die "ao/converter/dumb or shn plugins can't be builded statically" - fi -} - -src_prepare() { - if use midi ; then - # set default gentoo path - sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \ - -i "${S}/plugins/wildmidi/wildmidiplug.c" - fi - for lang in ${LANGS};do - for x in ${lang};do - if ! use linguas_${x}; then - rm -f "po/${x}.po" - fi - done - done -} - -src_configure() { - my_config="--disable-portable - --docdir=/usr/share/${PN} - $(use_enable aac) - $(use_enable adplug) - $(use_enable alsa) - $(use_enable ape ffap) - $(use_enable cdda) - $(use_enable converter) - $(use_enable dts dca) - $(use_enable dumb) - $(use_enable ffmpeg) - $(use_enable flac) - $(use_enable gme) - $(use_enable hotkeys) - $(use_enable m3u) - $(use_enable midi wildmidi) - $(use_enable mms) - $(use_enable mono2stereo) - $(use_enable mp3 mad) - $(use_enable musepack) - $(use_enable nls) - $(use_enable notify) - $(use_enable nullout) - $(use_enable oss) - $(use_enable psf) - $(use_enable pulseaudio pulse) - $(use_enable rpath) - $(use_enable shellexec) - $(use_enable shn) - $(use_enable sid) - $(use_enable sndfile) - $(use_enable src) - $(use_enable static) - $(use_enable static staticlink) - $(use_enable supereq) - $(use_enable threads) - $(use_enable tta) - $(use_enable vorbis) - $(use_enable vtx) - $(use_enable wavpack) - $(use_enable zip vfs-zip)" - - if use cover || use lastfm ; then - my_config="${my_config} - --enable-vfs-curl - $(use_enable cover artwork) - $(use_enable cover-imlib2 artwork-imlib2) - $(use_enable lastfm lfm)" - else - my_config="${my_config} - $(use_enable cover artwork) - $(use_enable cover-imlib2 artwork-imlib2) - $(use_enable curl vfs-curl) - $(use_enable lastfm lfm)" - fi - - if use infobar; then - my_config="${my_config} - --enable-vfs-curl" - fi - - if use gtk3;then - my_config="${my_config} - --enable-gtk3 - --enable-gtkui" - fi - - if use gtk2;then - my_config="${my_config} - --enable-gtkui" - else - my_config="${my_config} - --disable-gtk2" - fi - econf ${my_config} -} - -pkg_preinst() { - gnome2_icon_savelist - gnome2_schemas_savelist -} - -pkg_postinst() { - if use midi ; then - einfo "enable manually freepats support for timidity via" - einfo "eselect timidity set --global freepats" - fi - fdo-mime_desktop_database_update - fdo-mime_mime_database_update - gnome2_icon_cache_update - gnome2_schemas_update -} - -pkg_postrm() { - fdo-mime_desktop_database_update - fdo-mime_mime_database_update - gnome2_icon_cache_update - gnome2_schemas_update -} diff --git a/media-sound/deadbeef/deadbeef-0.6.0.ebuild b/media-sound/deadbeef/deadbeef-0.6.0.ebuild deleted file mode 100644 index 24699ec53..000000000 --- a/media-sound/deadbeef/deadbeef-0.6.0.ebuild +++ /dev/null @@ -1,183 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="4" - -inherit fdo-mime gnome2-utils versionator - -MY_PV="$(replace_version_separator 3 '-')" - -SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.bz2 - http://sourceforge.net/projects/${PN}/files/${PN}-${MY_PV}.tar.bz2/download -> ${PN}-${MY_PV}.tar.bz2" -KEYWORDS="~x86 ~amd64" - -DESCRIPTION="foobar2k-like music player" -HOMEPAGE="http://deadbeef.sourceforge.net/" - -LICENSE="GPL-2 - LGPL-2.1 - ZLIB - psf? ( BSD XMAME ) - dumb? ( DUMB-0.9.2 ) - shn? ( shorten )" -SLOT="0" -IUSE="adplug aac alsa psf ape cdda cover cover-imlib2 dts dumb converter curl ffmpeg flac gme - hotkeys lastfm m3u midi mms mp3 musepack nls notify nullout oss pulseaudio rpath mono2stereo - shellexec shn sid sndfile src static supereq threads tta vorbis vtx wavpack zip gtk3 +gtk2 infobar" - -LANGS="be bg bn ca cs da de el en_GB es fa fi fr gl he hr hu id it ja kk km lg nb nl pl pt_BR pt ru si sk sl sr@latin sr sv te tr uk vi zh_CN zh_TW" -for lang in ${LANGS}; do - IUSE+=" linguas_${lang}" -done - -RDEPEND="aac? ( media-libs/faad2 ) - alsa? ( media-libs/alsa-lib ) - cdda? ( dev-libs/libcdio media-libs/libcddb ) - cover? ( media-libs/imlib2 net-misc/curl ) - ffmpeg? ( virtual/ffmpeg ) - flac? ( media-libs/flac ) - gtk2? ( x11-libs/gtk+:2 ) - gtk3? ( x11-libs/gtk+:3 ) - lastfm? ( net-misc/curl ) - notify? ( sys-apps/dbus ) - midi? ( media-sound/timidity-freepats ) - mms? ( media-libs/libmms ) - mp3? ( media-libs/libmad ) - musepack? ( media-sound/musepack-tools ) - pulseaudio? ( media-sound/pulseaudio ) - sndfile? ( media-libs/libsndfile ) - src? ( media-libs/libsamplerate ) - vorbis? ( media-libs/libvorbis ) - wavpack? ( media-sound/wavpack ) - zip? ( dev-libs/libzip - sys-libs/zlib ) - curl? ( net-misc/curl ) - infobar? ( net-misc/curl )" - -DEPEND=" - dev-util/intltool - ${RDEPEND}" -S="${WORKDIR}/${PN}-${MY_PV}" -pkg_setup() { - if use psf || use dumb || use shn && use static ; then - die "ao/converter/dumb or shn plugins can't be builded statically" - fi -} - -src_prepare() { - if use midi ; then - # set default gentoo path - sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \ - -i "${S}/plugins/wildmidi/wildmidiplug.c" - fi - for lang in ${LANGS};do - for x in ${lang};do - if ! use linguas_${x}; then - rm -f "po/${x}.po" - fi - done - done -} - -src_configure() { - my_config="--disable-portable - --docdir=/usr/share/${PN} - $(use_enable aac) - $(use_enable adplug) - $(use_enable alsa) - $(use_enable ape ffap) - $(use_enable cdda) - $(use_enable converter) - $(use_enable dts dca) - $(use_enable dumb) - $(use_enable ffmpeg) - $(use_enable flac) - $(use_enable gme) - $(use_enable hotkeys) - $(use_enable m3u) - $(use_enable midi wildmidi) - $(use_enable mms) - $(use_enable mono2stereo) - $(use_enable mp3 mad) - $(use_enable musepack) - $(use_enable nls) - $(use_enable notify) - $(use_enable nullout) - $(use_enable oss) - $(use_enable psf) - $(use_enable pulseaudio pulse) - $(use_enable rpath) - $(use_enable shellexec) - $(use_enable shellexec shellexecui) - $(use_enable shn) - $(use_enable sid) - $(use_enable sndfile) - $(use_enable src) - $(use_enable static) - $(use_enable static staticlink) - $(use_enable supereq) - $(use_enable threads) - $(use_enable tta) - $(use_enable vorbis) - $(use_enable vtx) - $(use_enable wavpack) - $(use_enable zip vfs-zip)" - - if use cover || use lastfm ; then - my_config="${my_config} - --enable-vfs-curl - $(use_enable cover artwork) - $(use_enable cover-imlib2 artwork-imlib2) - $(use_enable lastfm lfm)" - else - my_config="${my_config} - $(use_enable cover artwork) - $(use_enable cover-imlib2 artwork-imlib2) - $(use_enable curl vfs-curl) - $(use_enable lastfm lfm)" - fi - - if use infobar; then - my_config="${my_config} - --enable-vfs-curl" - fi - - if use gtk3;then - my_config="${my_config} - --enable-gtk3 - --enable-gtkui" - fi - - if use gtk2;then - my_config="${my_config} - --enable-gtkui" - else - my_config="${my_config} - --disable-gtk2" - fi - econf ${my_config} -} - -pkg_preinst() { - gnome2_icon_savelist - gnome2_schemas_savelist -} - -pkg_postinst() { - if use midi ; then - einfo "enable manually freepats support for timidity via" - einfo "eselect timidity set --global freepats" - fi - fdo-mime_desktop_database_update - fdo-mime_mime_database_update - gnome2_icon_cache_update - gnome2_schemas_update -} - -pkg_postrm() { - fdo-mime_desktop_database_update - fdo-mime_mime_database_update - gnome2_icon_cache_update - gnome2_schemas_update -} diff --git a/media-video/get_iplayer/Manifest b/media-video/get_iplayer/Manifest deleted file mode 100644 index 747b8a804..000000000 --- a/media-video/get_iplayer/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST get_iplayer-2.78.tar.gz 194080 RMD160 dfbdf03d04a7d162017bc38bb66d1657b90f73a0 SHA1 bfa82f61ebff07f6668165427a4ac517a19a7d50 SHA256 4a03461cd4b0ea26a8345ffb14e7bb6e764d3485d797fe48917dae33eaef3aa3 -EBUILD get_iplayer-2.78.ebuild 579 RMD160 a3bbc2ad21cdb6b21d80e869a9e4347f3390b36f SHA1 984cc7ba84f2205fdcd09f8235ff5243a44cde76 SHA256 a368307d6e8e221be43e84095b7b529a3e1be6625dc84c853e30ddb898ce3d7e diff --git a/media-video/get_iplayer/get_iplayer-2.78.ebuild b/media-video/get_iplayer/get_iplayer-2.78.ebuild deleted file mode 100644 index 60bf7116b..000000000 --- a/media-video/get_iplayer/get_iplayer-2.78.ebuild +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -DESCRIPTION="BBC Iplayer downloading application" -HOMEPAGE="http://linuxcentre.net/get_iplayer/" -SRC_URI="ftp://ftp.infradead.org/pub/get_iplayer/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="" - -RDEPEND="media-video/mplayer - media-video/ffmpeg - media-sound/lame - media-video/flvstreamer - dev-perl/libwww-perl - " -DEPEND="" - -src_install() { - dobin ${PN} - doman ${PN}.1 - insinto /usr/share/${PN}/plugins - doins plugins/* -} - diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog deleted file mode 100644 index 858be7b8d..000000000 --- a/media-video/mplayer/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for media-video/mplayer -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*mplayer-1.0_rc4_p20110322-r51 (16 Aug 2011) - - 16 Aug 2011; Mike Hiretsky (mhiretskiy) - +mplayer-1.0_rc4_p20110322-r51.ebuild: - Update revision for auto-rebuild mplayer - diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest deleted file mode 100644 index 29bd5f11a..000000000 --- a/media-video/mplayer/Manifest +++ /dev/null @@ -1,28 +0,0 @@ -AUX vaapi-take2/01-mplayer-vaapi.patch 124283 RMD160 2eb017742707aba7dc4e7bb14221a044b3f2ebc3 SHA1 1333105c753235d02c9648e1c9c47086a4aac7e2 SHA256 6b82bf6a27685cd0cf082259a749bacb0c60752d4eaec70d46c4c52154f0a87c -AUX vaapi-take2/02-mplayer-vaapi-gma500-workaround.patch 3008 RMD160 3293051f87ec0f6663ef880ba79c71953d7f0174 SHA1 e27544b891fa5d19183e34ab56c255ae9ea5a3f7 SHA256 4ebde5f4e4e483346fc99fd813b9a94c0a3bbb0ad7517674737e9f23fe359abd -AUX vaapi-take2/03-mplayer-vaapi-0.29.patch 46329 RMD160 823bcafc8bc69a3d414c842d5944087495b2cfa8 SHA1 a1889c9996f8ec8d317b3ce033e3300472c6f840 SHA256 59afee2a470fb79cbc9844ff68b846b665aebff36612103fb3bc468f198f9cd4 -AUX vaapi-take2/04-mplayer-vdpau.patch 45086 RMD160 c3ea2f31039ac3bb951836bd9462879a76c752f1 SHA1 798e287550f965d1f540843a0729a14d90d2d928 SHA256 e648f6c97cdbcd6bdc86d61f4d385b1756ff5f2a764c168ff3e3fe98120d194b -AUX vaapi-take3/01-mplayer-vaapi.patch 128727 RMD160 7478cfef6680c88cabb31f832bb53fde988b6625 SHA1 663d239651c35a879f091e20b317c10ece6ae828 SHA256 be09d12958cb0750e4c3af74ae3a3d69182cae542134bff82b3ac349a8c84d37 -AUX vaapi-take3/02-mplayer-vaapi-gma500-workaround.patch 3021 RMD160 89ac058ace2d9d16e849400013719463f28db2dd SHA1 9a383ad908482f6e907ab21eca8064752408fe75 SHA256 ee7d47d2d1ad6208f446f104c6bf53450363088671d2b1b7859447beee46cc63 -AUX vaapi-take3/03-mplayer-vaapi-0.29.patch 47012 RMD160 3dd75a2b460baed845490825d9277bcf70ec4356 SHA1 93c0cdb35b0f39dd465e7dfec5d3efdf0dcea7a9 SHA256 63537514f137ed08c274a3000416c17c1d4db5dbb995a6d015cc07573d864a95 -AUX vaapi-take3/04-mplayer-vdpau.patch 44989 RMD160 ee0ba678398a48c24b8a234bef7f2b9782e7a941 SHA1 3e3d4f9555ba482c351563ccbb5c5689e624c3ec SHA256 9f4367b1023e9806001ca4d0d116e919b30c78e1550689d3e2926e1000f038e8 -AUX vaapi/01-mplayer-vaapi.patch 125634 RMD160 add288326843d97fc33d0d1eba9e3818a5a778bd SHA1 6821081a03627715223d7a55044ce04e02c07350 SHA256 0373141e6d662ba65a3a37f8d7808b073f7e740746a897a81cb40ea36450f670 -AUX vaapi/02-mplayer-vaapi-gma500-workaround.patch 2994 RMD160 cc3911d951c42ec1468eae4b8976697f47df050a SHA1 408c6783aae243fdb60fa7ea851cb5ec6184d4f4 SHA256 c145b2f8523bc99340d097f17c57538197b9c49175fce0b38d6eced3e06828a5 -AUX vaapi/03-mplayer-vaapi-0.29.patch 46210 RMD160 1d90e15164aac446d29450265890048c2e2bbca8 SHA1 f0553b65bf90178d4aac8f14f977b74e282b67d2 SHA256 f87d5c7e1a4fa084c5b07e19a92496ad1ffa0dd866196669af5cb4469600efdd -AUX vaapi/04-mplayer-vdpau.patch 44724 RMD160 9c5a3162bbe5b5a3ec137f1c48d82a63f2c15bec SHA1 34e471df2348f849dc3835896c81166871a698ea SHA256 61be856ec47cdd3dc91481776d38b1fdb858b5c32a347f270856672c072a028c -DIST Blue-1.7.tar.bz2 222567 RMD160 1f8c539ccadc54eea5e6678839bcc8ae1e16e6eb SHA1 45e5ee7a5541a5f1cfd2678a6c9b5911ca473cb9 SHA256 8bcd39a5755c44df778ebca3119c922347abfdadb101dcef011ce2566c1fb1d8 -DIST font-arial-cp1250.tar.bz2 249705 RMD160 a2fc7ae07b0d80936ea58e168e1047efccb9eb91 SHA1 ccf11dce5d0fb72fd3af97f788b7471cd0cd0b68 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 -DIST font-arial-iso-8859-1.tar.bz2 234242 RMD160 666697cd5efd9387057a898c714175e7c2aacbcd SHA1 152c40bf20de34aa8802d7f80d34d673b0b67212 SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29 -DIST font-arial-iso-8859-2.tar.bz2 222208 RMD160 562d4d92c4f5f3d537340fde3ad8d1495ac41acb SHA1 7b99bbe0e9ba89a57eccbea8f93c453c4f268181 SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1 -DIST mplayer-1.0_rc4_p20100612.tbz2 8968316 RMD160 4179808dc9b99404affa2c95189fba3bb6fe5ad8 SHA1 a8d758dca9473006f66a947fb9019c35c66baa6b SHA256 098e16793baea2a9c4cf24ebcc8bc41c639c9806347b08724168e17e367b5d74 -DIST mplayer-1.0_rc4_p20101114.tar.xz 8515160 RMD160 73aec83d64abaadf9c6b6110f5d42e6bfae1ca87 SHA1 b6cfd5e05ef5a48a9d3d2f272f6f629461de8474 SHA256 02d6a259e063304cbf2ebb89fcb89d5133383d514264df9a423872684eb36c2d -DIST mplayer-1.0_rc4_p20101219.tar.xz 8639552 RMD160 f8f1c05185aba8efa5a78d7d0666eb7712a1120b SHA1 d0909a96cdb228b23795553827bcce8f82609e0a SHA256 8f5c56c7fdc811a38d8b4cd8dfbfb620a5160ae2f67605941e32c33c771233be -DIST mplayer-1.0_rc4_p20110322.tar.xz 8323532 RMD160 7082c95fa20cb7e3d491546ae08a4dfafdc17d09 SHA1 3f60cf0ce8c910e3628e425167cb6a46bb4a29a3 SHA256 addaae78cfd7f8cb950370b3b43d82c2f8170830ccc1046b98726d34f3958bf5 -DIST svgalib_helper-1.9.17-mplayer.tar.gz 7583 RMD160 927ff34f187e4fa9528e2e48208173d98b3d1d1b SHA1 bf789706d1d79c695f781644c7ea6d57c3eed4c3 SHA256 a6f803f3df4cd4544751d3a3ee936a8bf0e20e32a452639b3f7c7d9e73e65938 -EBUILD mplayer-1.0_rc4_p20100612-r50.ebuild 20354 RMD160 5e0a18409cfb24e6dbaeb1c3a51d8fb98f18b953 SHA1 053978376a1ec7c3836197539296a4fb23ee3f38 SHA256 a05791c258d16c6dba09f1dc2a782afa0f1d03cb316bd3b6871621b6712ecd17 -EBUILD mplayer-1.0_rc4_p20101114-r50.ebuild 20280 RMD160 a85a39739d94dad854f1cb6b718979242e6312f1 SHA1 9a28c2c5925fe903be518e6c3be891caa225ac78 SHA256 4cb97389439a616f936d5f67ef83f96cd0048706c2e92c2446e9b01df1f192e4 -EBUILD mplayer-1.0_rc4_p20101219-r50.ebuild 20280 RMD160 5eb3cd60a2886251f521d4e435eb9a067e6b4286 SHA1 0d6e3d8650bf6f0afb4b23ddfc43648fc727dfb0 SHA256 398951968d4d191d8527c88bceeb7b9cbf6bc662f35947db16cfc48a05ff91c6 -EBUILD mplayer-1.0_rc4_p20110322-r50.ebuild 20452 RMD160 3a44cfb138af89a49a549992de6ff20a88dba727 SHA1 e66408ba16a996ba692c7d2b4d6ab53b93ebc0b7 SHA256 d7cf0f7081948159ec56ce831b110aef4d062dcdac46c605173db8dfcbffa911 -EBUILD mplayer-1.0_rc4_p20110322-r51.ebuild 20452 RMD160 3a44cfb138af89a49a549992de6ff20a88dba727 SHA1 e66408ba16a996ba692c7d2b4d6ab53b93ebc0b7 SHA256 d7cf0f7081948159ec56ce831b110aef4d062dcdac46c605173db8dfcbffa911 -MISC ChangeLog 311 RMD160 0fbcc6e5f7c862a8a1581599cf0ba0e2bf42c95d SHA1 794c5adac75a2a7fe220ca24251faae014dc313f SHA256 e706f1658915a818aba064a2adfbd777c7808117de34c84c4a7b92c039e7fffe -MISC metadata.xml 3591 RMD160 883e9161526d98f546d5b790a76da78ae6b03b94 SHA1 bf3ab6509cfa4a72a088ba005c9a92e44bac6df1 SHA256 956383713923533a4caa6e39fbe8067b2afa7c7aecc3e52c9dd0715435226ef8 diff --git a/media-video/mplayer/files/vaapi-take2/01-mplayer-vaapi.patch b/media-video/mplayer/files/vaapi-take2/01-mplayer-vaapi.patch deleted file mode 100644 index bd3903eee..000000000 --- a/media-video/mplayer/files/vaapi-take2/01-mplayer-vaapi.patch +++ /dev/null @@ -1,3906 +0,0 @@ -diff --git a/Makefile b/Makefile -index 9d1bca1..c593ba2 100644 ---- a/Makefile -+++ b/Makefile -@@ -624,6 +624,7 @@ SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c - SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c - SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c - SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c -+SRCS_MPLAYER-$(VAAPI) += libvo/vo_vaapi.c - SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c - SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c - SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \ -@@ -677,6 +678,7 @@ SRCS_MPLAYER = command.c \ - libvo/aspect.c \ - libvo/geometry.c \ - libvo/video_out.c \ -+ libvo/stats.c \ - libvo/vo_mpegpes.c \ - libvo/vo_null.c \ - sub/spuenc.c \ -diff --git a/cfg-common.h b/cfg-common.h -index 4f8c7ba..c2cbbf1 100644 ---- a/cfg-common.h -+++ b/cfg-common.h -@@ -244,6 +244,7 @@ const m_option_t common_opts[] = { - {"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, - {"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, - {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -+ {"va", &video_hwaccel_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, - - // postprocessing: - #ifdef CONFIG_LIBAVCODEC -diff --git a/codec-cfg.c b/codec-cfg.c -index b8ca998..6a75293 100644 ---- a/codec-cfg.c -+++ b/codec-cfg.c -@@ -224,6 +224,13 @@ static const struct { - {"VDPAU_VC1",IMGFMT_VDPAU_VC1}, - {"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4}, - -+ {"VAAPI_MPEG2", IMGFMT_VAAPI_MPEG2}, -+ {"VAAPI_MPEG4", IMGFMT_VAAPI_MPEG4}, -+ {"VAAPI_H263", IMGFMT_VAAPI_H263}, -+ {"VAAPI_H264", IMGFMT_VAAPI_H264}, -+ {"VAAPI_WMV3", IMGFMT_VAAPI_WMV3}, -+ {"VAAPI_VC1", IMGFMT_VAAPI_VC1}, -+ - {NULL, 0} - }; - -diff --git a/configure b/configure -index 55ff660..89a0a9a 100755 ---- a/configure -+++ b/configure -@@ -385,6 +385,9 @@ Codecs: - --disable-muxer=MUXER disable specified FFmpeg muxer - --enable-muxer=MUXER enable specified FFmpeg muxer - -+Hardware acceleration: -+ --enable-vaapi enable VA-API acceleration [disable] -+ - Video output: - --disable-vidix disable VIDIX [for x86 *nix] - --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in -@@ -414,6 +417,7 @@ Video output: - --enable-dvb enable DVB video output [autodetect] - --enable-mga enable mga_vid video output [autodetect] - --enable-xmga enable mga_vid X11 video output [autodetect] -+ --enable-xrender enable Xrender video output [autodetect] - --enable-xv enable Xv video output [autodetect] - --enable-xvmc enable XvMC acceleration [disable] - --enable-vdpau enable VDPAU acceleration [autodetect] -@@ -582,8 +586,7 @@ _libavparsers=$libavparsers_all - libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') - libavbsfs=$libavbsfs_all - libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') --# Disable all hardware accelerators for now. --libavhwaccels= -+libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL) echo $h;; esac; done) - libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') - libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//) - libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') -@@ -600,11 +603,15 @@ _libswscale_so=auto - _libavcodec_mpegaudio_hp=yes - _mencoder=yes - _mplayer=yes -+_vaapi=auto -+_vaapi_glx=no -+_libgtop=auto - _x11=auto - _xshape=auto - _xss=auto - _dga1=auto - _dga2=auto -+_xrender=auto - _xv=auto - _xvmc=no #auto when complete - _vdpau=auto -@@ -944,10 +951,14 @@ for ac_option do - --disable-xshape) _xshape=no ;; - --enable-xss) _xss=yes ;; - --disable-xss) _xss=no ;; -+ --enable-xrender) _xrender=yes ;; -+ --disable-xrender) _xrender=no ;; - --enable-xv) _xv=yes ;; - --disable-xv) _xv=no ;; - --enable-xvmc) _xvmc=yes ;; - --disable-xvmc) _xvmc=no ;; -+ --enable-vaapi) _vaapi=yes ;; -+ --disable-vaapi) _vaapi=no ;; - --enable-vdpau) _vdpau=yes ;; - --disable-vdpau) _vdpau=no ;; - --enable-sdl) _sdl=yes ;; -@@ -3966,6 +3977,28 @@ fi - echores "$_gettimeofday" - - -+echocheck "clock_gettime()" -+cat > $TMPC << EOF -+#include -+int main(void) { -+ struct timespec t; -+ clock_gettime(CLOCK_REALTIME, &t); -+ return 0; -+} -+EOF -+_clock_gettime=no -+cc_check -lrt && _clock_gettime=yes -+if test "$_clock_gettime" = yes ; then -+ def_clock_gettime='#define HAVE_CLOCK_GETTIME 1' -+ extra_ldflags="$extra_ldflags -lrt" -+ _need_clock_gettime=no -+else -+ def_clock_gettime='#undef HAVE_CLOCK_GETTIME' -+ _need_clock_gettime=yes -+fi -+echores "$_clock_gettime" -+ -+ - echocheck "glob()" - cat > $TMPC << EOF - #include -@@ -4405,7 +4438,7 @@ else - novomodules="x11 $novomodules" - res_comment="check if the dev(el) packages are installed" - # disable stuff that depends on X -- _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no -+ _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vaapi=no ; _vdpau=no - fi - echores "$_x11" - -@@ -4462,6 +4495,30 @@ else - fi - - -+echocheck "Xrender" -+if test "$_xrender" = auto ; then -+ cat > $TMPC < -+#include -+int main(void) { -+ (void) XRenderCreatePicture(0, 0, 0, 0, 0); -+ return 0; } -+EOF -+ _xrender=no -+ cc_check -lXrender && _xrender=yes -+fi -+ -+if test "$_xrender" = yes ; then -+ def_xrender='#define CONFIG_XRENDER 1' -+ libs_mplayer="$libs_mplayer -lXrender" -+ vomodules="xrender $vomodules" -+else -+ def_xrender='#undef CONFIG_XRENDER' -+ novomodules="xrender $novomodules" -+fi -+echores "$_xrender" -+ -+ - echocheck "Xv" - if test "$_xv" = auto ; then - cat > $TMPC < $TMPC << EOF -+#include -+#include -+int main(void) { return 0; } -+EOF -+cc_check $($_pkg_config --libs --cflags libgtop-2.0) && tmp_run && _libgtop=yes -+ -+ fi -+fi -+echores "$_libgtop" -+ -+if test "$_libgtop" = yes ; then -+ def_libgtop='#define CONFIG_LIBGTOP 1' -+ libs_mplayer="$libs_mplayer $($_pkg_config --libs libgtop-2.0)" -+ extra_cflags="$extra_cflags $($_pkg_config --cflags libgtop-2.0)" -+else -+ def_libgtop='#define CONFIG_LIBGTOP 0' -+fi -+ -+ - echocheck "PNG support" - if test "$_png" = auto ; then - _png=no -@@ -5375,6 +5457,23 @@ else - fi - echores "$_gl" - -+echocheck "OpenGL utilities (GLU)" -+_glu=no -+if test "$_gl" = yes; then -+ cat > $TMPC << EOF -+#include -+int main(void) { -+ gluPerspective(0.0, 0.0, 0.0, 0.0); -+ return 0; -+} -+EOF -+ cc_check -lGLU && _glu=yes -+fi -+if test "$_glu" = yes; then -+ libs_mplayer="$libs_mplayer -lGLU" -+fi -+echores "$_glu" -+ - - echocheck "MatrixView" - if test "$_gl" = no ; then -@@ -5995,6 +6094,52 @@ echores "$_dart" - fi #if os2 - - -+######################### -+# HARDWARE ACCELERATORS # -+######################### -+ -+echocheck "VA-API" -+if test "$_vaapi" = yes -o "$_vaapi" = auto; then -+ _vaapi=no -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplay(0); return 0; } -+EOF -+ cc_check -lva-x11 && _vaapi=yes -+fi -+ -+if test "$_vaapi" = yes ; then -+ def_vaapi='#define CONFIG_VAAPI 1' -+ libs_mencoder="$libs_mencoder -lva" -+ libs_mplayer="$libs_mplayer -lva-x11 -lva" -+ vomodules="vaapi $vomodules" -+else -+ def_vaapi='#define CONFIG_VAAPI 0' -+ novomodules="vaapi $novomodules" -+ _libavhwaccels=`echo $_libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VAAPI_HWACCEL//g"` -+fi -+echores "$_vaapi" -+ -+echocheck "VA-API (with GLX support)" -+if test "$_vaapi" = yes; then -+ _vaapi_glx=no -+ if test "$_gl" = "yes" -a "$_glu" = yes; then -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplayGLX(0); return 0; } -+EOF -+ cc_check -lva-glx && _vaapi_glx=yes -+ fi -+fi -+if test "$_vaapi_glx" = yes; then -+ def_vaapi_glx='#define CONFIG_VAAPI_GLX 1' -+ libs_mplayer="$libs_mplayer -lva-glx" -+else -+ def_vaapi_glx='#define CONFIG_VAAPI_GLX 0' -+fi -+echores "$_vaapi_glx" -+ -+ - # set default CD/DVD devices - if win32 || os2 ; then - default_cdrom_device="D:" -@@ -8677,6 +8822,7 @@ TV_V4L2 = $_tv_v4l2 - TWOLAME=$_twolame - UNRAR_EXEC = $_unrar_exec - V4L2 = $_v4l2 -+VAAPI = $_vaapi - VCD = $_vcd - VDPAU = $_vdpau - VESA = $_vesa -@@ -8774,7 +8920,9 @@ CONFIG_MLIB = $_mlib - CONFIG_MUXERS = $_mencoder - CONFIG_POSTPROC = yes - CONFIG_RTPDEC = $networking -+CONFIG_VAAPI = $_vaapi - CONFIG_VDPAU = $_vdpau -+CONFIG_XRENDER = $_xrender - CONFIG_XVMC = $_xvmc - CONFIG_ZLIB = $_zlib - -@@ -8893,6 +9041,7 @@ $def_winsock2_h - - - /* system functions */ -+$def_clock_gettime - $def_gethostbyname2 - $def_gettimeofday - $def_glob -@@ -8924,6 +9073,7 @@ $def_extern_asm - $def_extern_prefix - $def_iconv - $def_kstat -+$def_libgtop - $def_macosx_bundle - $def_macosx_finder - $def_maemo -@@ -9155,6 +9305,8 @@ $def_tdfxfb - $def_tdfxvid - $def_tga - $def_v4l2 -+$def_vaapi -+$def_vaapi_glx - $def_vdpau - $def_vesa - $def_vidix -@@ -9180,6 +9332,7 @@ $def_xf86keysym - $def_xinerama - $def_xmga - $def_xss -+$def_xrender - $def_xv - $def_xvmc - $def_xvr100 -diff --git a/etc/codecs.conf b/etc/codecs.conf -index a8d2ae0..8eece64 100644 ---- a/etc/codecs.conf -+++ b/etc/codecs.conf -@@ -172,6 +172,7 @@ videocodec ffmpeg2 - fourcc slif ; SoftLab MPEG-2 I-frames Codec - driver ffmpeg - dll "mpeg2video" -+ out VAAPI_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -901,6 +902,7 @@ videocodec ffwmv3 - fourcc WMV3,wmv3 - driver ffmpeg - dll wmv3 -+ out VAAPI_WMV3 - out YV12,I420,IYUV - - videocodec ffwmv3vdpau -@@ -918,6 +920,7 @@ videocodec ffvc1 - fourcc vc-1,VC-1 - driver ffmpeg - dll vc1 -+ out VAAPI_VC1 - out YV12,I420,IYUV - - videocodec ffvc1vdpau -@@ -939,6 +942,7 @@ videocodec ffh264 - format 0x10000005 - driver ffmpeg - dll h264 -+ out VAAPI_H264 - out YV12,I420,IYUV - - videocodec ffh264vdpau -@@ -1008,6 +1012,7 @@ videocodec ffodivx - fourcc SIPP ; Samsung SHR-6040 - driver ffmpeg - dll mpeg4 ;opendivx -+ out VAAPI_MPEG4 - out YV12,I420,IYUV - - videocodec ffodivxvdpau -@@ -1577,6 +1582,7 @@ videocodec ffh263 - fourcc VX1K ; Agora Labs VX1000S H263 - driver ffmpeg - dll h263 -+ out VAAPI_H263 - out YV12,I420,IYUV - - videocodec ffzygo -diff --git a/fmt-conversion.c b/fmt-conversion.c -index 9e88100..bd32ce8 100644 ---- a/fmt-conversion.c -+++ b/fmt-conversion.c -@@ -18,12 +18,14 @@ - - #include "mp_msg.h" - #include "libavutil/avutil.h" -+#include "libavcodec/avcodec.h" - #include "libmpcodecs/img_format.h" - #include "fmt-conversion.h" - - static const struct { - int fmt; - enum PixelFormat pix_fmt; -+ enum CodecID codec_id; - } conversion_map[] = { - {IMGFMT_ARGB, PIX_FMT_ARGB}, - {IMGFMT_BGRA, PIX_FMT_BGRA}, -@@ -95,6 +97,17 @@ static const struct { - {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, - {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, - {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, -+ -+ /* VA-API formats */ -+ {IMGFMT_VAAPI_MPEG2, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG2_IDCT,PIX_FMT_VAAPI_IDCT, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG2_MOCO,PIX_FMT_VAAPI_MOCO, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG4, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG4}, -+ {IMGFMT_VAAPI_H263, PIX_FMT_VAAPI_VLD, CODEC_ID_H263}, -+ {IMGFMT_VAAPI_H264, PIX_FMT_VAAPI_VLD, CODEC_ID_H264}, -+ {IMGFMT_VAAPI_WMV3, PIX_FMT_VAAPI_VLD, CODEC_ID_WMV3}, -+ {IMGFMT_VAAPI_VC1, PIX_FMT_VAAPI_VLD, CODEC_ID_VC1}, -+ - {0, PIX_FMT_NONE} - }; - -@@ -111,12 +124,14 @@ enum PixelFormat imgfmt2pixfmt(int fmt) - return pix_fmt; - } - --int pixfmt2imgfmt(enum PixelFormat pix_fmt) -+int pixfmt2imgfmt(enum PixelFormat pix_fmt, int codec_id) - { - int i; - int fmt; - for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++) -- if (conversion_map[i].pix_fmt == pix_fmt) -+ if (conversion_map[i].pix_fmt == pix_fmt && -+ (conversion_map[i].codec_id == 0 || -+ conversion_map[i].codec_id == codec_id)) - break; - fmt = conversion_map[i].fmt; - if (!fmt) -diff --git a/fmt-conversion.h b/fmt-conversion.h -index 9e133a8..962ca4e 100644 ---- a/fmt-conversion.h -+++ b/fmt-conversion.h -@@ -23,6 +23,6 @@ - #include "libavutil/avutil.h" - - enum PixelFormat imgfmt2pixfmt(int fmt); --int pixfmt2imgfmt(enum PixelFormat pix_fmt); -+int pixfmt2imgfmt(enum PixelFormat pix_fmt, int codec_id); - - #endif /* MPLAYER_FMT_CONVERSION_H */ -diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c -index 0a26245..e66e263 100644 ---- a/gui/mplayer/gtk/opts.c -+++ b/gui/mplayer/gtk/opts.c -@@ -66,9 +66,11 @@ static GtkWidget * CLVDrivers; - GtkWidget * prEFontName; - GtkWidget * prEDVDDevice; - GtkWidget * prECDRomDevice; -+static GtkWidget * EVHW; - static GtkWidget * EVFM; - static GtkWidget * EAFM; - -+static GtkWidget * CBVHW; - static GtkWidget * CBVFM; - static GtkWidget * CBAFM; - static GtkWidget * CBAudioEqualizer; -@@ -354,6 +356,26 @@ void ShowPreferences( void ) - // -- 5. page - gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); - if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 ); -+ -+ { -+ int i; -+ GList * Items = NULL; -+ char * name = NULL; -+ -+ Items = g_list_append(Items, MSGTR_PREFERENCES_None); -+ for (i = 0; i < HWACCEL_COUNT; i++) { -+ const char *hwaccel_name = get_video_hwaccel_name(i); -+ if (!hwaccel_name) -+ continue; -+ Items = g_list_append(Items, hwaccel_name); -+ if (video_hwaccel_name && !gstrcmp(video_hwaccel_name, get_video_hwaccel_short_name(i) ) ) name = hwaccel_name; -+ } -+ gtk_combo_set_popdown_strings(GTK_COMBO(CBVHW), Items); -+ g_list_free(Items); -+ if (name) -+ gtk_entry_set_text(GTK_ENTRY(EVHW), name); -+ } -+ - { - int i; - GList * Items = NULL; -@@ -600,6 +622,17 @@ static void prButton( GtkButton * button, gpointer user_data ) - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1; - - { -+ int i; -+ const char *tmp = gtk_entry_get_text(GTK_ENTRY(EVHW)); -+ for (i = 0; i < HWACCEL_COUNT; i++) { -+ if (!gstrcmp(tmp, get_video_hwaccel_name(i))) { -+ video_hwaccel_name = get_video_hwaccel_short_name(i); -+ break; -+ } -+ } -+ } -+ -+ { - int i; - const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); - for( i=0;mpcodecs_vd_drivers[i];i++ ) -@@ -1199,6 +1232,20 @@ GtkWidget * create_Preferences( void ) - - hbox5=AddHBox( vbox602,1 ); - -+ AddLabel( MSGTR_PREFERENCES_VideoHardwareAcceleration,hbox5 ); -+ -+ CBVHW=gtk_combo_new(); -+ gtk_widget_set_name( CBVHW,"CBVHW" ); -+ gtk_widget_show( CBVHW ); -+ gtk_box_pack_start( GTK_BOX( hbox5 ),CBVHW,TRUE,TRUE,0 ); -+ -+ EVHW=GTK_COMBO( CBVHW )->entry; -+ gtk_widget_set_name( EVHW,"CEVHW" ); -+ gtk_entry_set_editable( GTK_ENTRY( EVHW ),FALSE ); -+ gtk_widget_show( EVHW ); -+ -+ hbox5=AddHBox( vbox602,1 ); -+ - AddLabel( MSGTR_PREFERENCES_VideoCodecFamily,hbox5 ); - - CBVFM=gtk_combo_new(); -diff --git a/help/help_mp-en.h b/help/help_mp-en.h -index a112418..121eac9 100644 ---- a/help/help_mp-en.h -+++ b/help/help_mp-en.h -@@ -717,6 +717,7 @@ static const char help_text[]= - #define MSGTR_PREFERENCES_IDX "Rebuild index table, if needed" - #define MSGTR_PREFERENCES_VideoCodecFamily "Video codec family:" - #define MSGTR_PREFERENCES_AudioCodecFamily "Audio codec family:" -+#define MSGTR_PREFERENCES_VideoHardwareAcceleration "Video hardware acceleration:" - #define MSGTR_PREFERENCES_FRAME_OSD_Level "OSD level" - #define MSGTR_PREFERENCES_FRAME_Subtitle "Subtitle" - #define MSGTR_PREFERENCES_FRAME_Font "Font" -@@ -1653,6 +1654,7 @@ static const char help_text[]= - #define MSGTR_MPCODECS_UnexpectedInitVoError "[VD_FFMPEG] Unexpected init_vo error.\n" - #define MSGTR_MPCODECS_UnrecoverableErrorRenderBuffersNotTaken "[VD_FFMPEG] Unrecoverable error, render buffers not taken.\n" - #define MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed "[VD_FFMPEG] Only buffers allocated by vo_xvmc allowed.\n" -+#define MSGTR_MPCODECS_VAAPIAcceleratedCodec "[VD_FFMPEG] VA API accelerated codec.\n" - - // libmpcodecs/ve_lavc.c - #define MSGTR_MPCODECS_HighQualityEncodingSelected "[VE_LAVC] High quality encoding selected (non-realtime)!\n" -diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c -index 1dd6e42..ce9facc 100644 ---- a/libmpcodecs/dec_video.c -+++ b/libmpcodecs/dec_video.c -@@ -56,9 +56,47 @@ extern double vout_time_usage; - int field_dominance = -1; - - int divx_quality = 0; -+char *video_hwaccel_name=NULL; - - const vd_functions_t *mpvdec = NULL; - -+int get_video_hwaccel(void) -+{ -+ static int video_hwaccel = -1; -+ if (video_hwaccel < 0) { -+ video_hwaccel = HWACCEL_NONE; -+ if (video_hwaccel_name) { -+ if (!strcmp(video_hwaccel_name,"xvmc")) -+ video_hwaccel = HWACCEL_XVMC; -+ else if (!strcmp(video_hwaccel_name,"vaapi")) -+ video_hwaccel = HWACCEL_VAAPI; -+ else if (!strcmp(video_hwaccel_name,"vdpau")) -+ video_hwaccel = HWACCEL_VDPAU; -+ } -+ } -+ return video_hwaccel; -+} -+ -+const char *get_video_hwaccel_name(int hwaccel) -+{ -+ switch (hwaccel) { -+ case HWACCEL_XVMC: return "XvMC"; -+ case HWACCEL_VAAPI: return "VA API"; -+ case HWACCEL_VDPAU: return "VDPAU"; -+ } -+ return NULL; -+} -+ -+const char *get_video_hwaccel_short_name(int hwaccel) -+{ -+ switch (hwaccel) { -+ case HWACCEL_XVMC: return "xvmc"; -+ case HWACCEL_VAAPI: return "vaapi"; -+ case HWACCEL_VDPAU: return "vdpau"; -+ } -+ return NULL; -+} -+ - int get_video_quality_max(sh_video_t *sh_video) - { - vf_instance_t *vf = sh_video->vfilter; -diff --git a/libmpcodecs/dec_video.h b/libmpcodecs/dec_video.h -index 04fc8f4..a9bedb0 100644 ---- a/libmpcodecs/dec_video.h -+++ b/libmpcodecs/dec_video.h -@@ -21,6 +21,14 @@ - - #include "libmpdemux/stheader.h" - -+enum { -+ HWACCEL_NONE = 0, -+ HWACCEL_XVMC, -+ HWACCEL_VAAPI, -+ HWACCEL_VDPAU, -+ HWACCEL_COUNT -+}; -+ - // dec_video.c: - void vfm_help(void); - -@@ -41,6 +49,11 @@ int set_rectangle(sh_video_t *sh_video, int param, int value); - void resync_video_stream(sh_video_t *sh_video); - int get_current_video_decoder_lag(sh_video_t *sh_video); - -+int get_video_hwaccel(void); -+const char *get_video_hwaccel_name(int hwaccel); -+const char *get_video_hwaccel_short_name(int hwaccel); -+ - extern int divx_quality; -+extern char *video_hwaccel_name; - - #endif /* MPLAYER_DEC_VIDEO_H */ -diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c -index bdf4d2f..65f0bd1 100644 ---- a/libmpcodecs/img_format.c -+++ b/libmpcodecs/img_format.c -@@ -96,6 +96,14 @@ const char *vo_format_name(int format) - case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first"; - case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation"; - case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT"; -+ case IMGFMT_VAAPI_MPEG2: return "MPEG-2 VA-API Acceleration"; -+ case IMGFMT_VAAPI_MPEG2_IDCT: return "MPEG-2 VA-API Acceleration (Motion Compensation and IDCT)"; -+ case IMGFMT_VAAPI_MPEG2_MOCO: return "MPEG-2 VA-API Acceleration (Motion Compensation)"; -+ case IMGFMT_VAAPI_MPEG4: return "MPEG-4 VA-API Acceleration"; -+ case IMGFMT_VAAPI_H263: return "H.263 VA-API Acceleration"; -+ case IMGFMT_VAAPI_H264: return "H.264 VA-API Acceleration"; -+ case IMGFMT_VAAPI_WMV3: return "WMV3 VA-API Acceleration"; -+ case IMGFMT_VAAPI_VC1: return "VC-1 VA-API Acceleration"; - case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration"; - case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration"; - case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration"; -diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h -index e580082..d0aaa45 100644 ---- a/libmpcodecs/img_format.h -+++ b/libmpcodecs/img_format.h -@@ -182,6 +182,26 @@ - #define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02) - #define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82) - -+/* VA-API Formats */ -+ -+#define IMGFMT_VAAPI 0x56410000 /* 'VA'00 */ -+#define IMGFMT_VAAPI_MASK 0xFFFF0000 -+#define IMGFMT_IS_VAAPI(fmt) (((fmt) & IMGFMT_VAAPI_MASK) == IMGFMT_VAAPI) -+#define IMGFMT_VAAPI_CODEC_MASK 0x000000F0 -+#define IMGFMT_VAAPI_CODEC(fmt) ((fmt) & IMGFMT_VAAPI_CODEC_MASK) -+#define IMGFMT_VAAPI_CODEC_MPEG2 (0x10) -+#define IMGFMT_VAAPI_CODEC_MPEG4 (0x20) -+#define IMGFMT_VAAPI_CODEC_H264 (0x30) -+#define IMGFMT_VAAPI_CODEC_VC1 (0x40) -+#define IMGFMT_VAAPI_MPEG2 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2) -+#define IMGFMT_VAAPI_MPEG2_IDCT (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2|1) -+#define IMGFMT_VAAPI_MPEG2_MOCO (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2|2) -+#define IMGFMT_VAAPI_MPEG4 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG4) -+#define IMGFMT_VAAPI_H263 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG4|1) -+#define IMGFMT_VAAPI_H264 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_H264) -+#define IMGFMT_VAAPI_VC1 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_VC1) -+#define IMGFMT_VAAPI_WMV3 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_VC1|1) -+ - // VDPAU specific format. - #define IMGFMT_VDPAU 0x1DC80000 - #define IMGFMT_VDPAU_MASK 0xFFFF0000 -@@ -193,7 +193,7 @@ - #define IMGFMT_VDPAU_VC1 (IMGFMT_VDPAU|0x05) - #define IMGFMT_VDPAU_MPEG4 (IMGFMT_VDPAU|0x06) - --#define IMGFMT_IS_HWACCEL(fmt) (IMGFMT_IS_VDPAU(fmt) || IMGFMT_IS_XVMC(fmt)) -+#define IMGFMT_IS_HWACCEL(fmt) (IMGFMT_IS_VDPAU(fmt) || IMGFMT_IS_XVMC(fmt)) || IMGFMT_IS_VAAPI(fmt) - - typedef struct { - void* data;diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c -index f239181..35438c9 100644 -diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c -index ea6b6b2..dad5eb6 100644 ---- a/libmpcodecs/vd.c -+++ b/libmpcodecs/vd.c -@@ -403,3 +403,12 @@ void mpcodecs_draw_slice(sh_video_t *sh, unsigned char **src, int *stride, - if (vf->draw_slice) - vf->draw_slice(vf, src, stride, w, h, x, y); - } -+ -+void *mpcodecs_get_hwaccel_context(sh_video_t *sh) -+{ -+ void *ctx = NULL; -+ struct vf_instance *vf = sh->vfilter; -+ if (vf->control(vf, VFCTRL_GET_HWACCEL_CONTEXT, &ctx) == CONTROL_TRUE) -+ return ctx; -+ return NULL; -+} -diff --git a/libmpcodecs/vd.h b/libmpcodecs/vd.h -index 8f7c238..e655d60 100644 ---- a/libmpcodecs/vd.h -+++ b/libmpcodecs/vd.h -@@ -64,6 +64,7 @@ extern const m_option_t xvid_dec_opts[]; - int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt); - mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); - void mpcodecs_draw_slice(sh_video_t *sh, unsigned char** src, int* stride, int w,int h, int x, int y); -+void *mpcodecs_get_hwaccel_context(sh_video_t *sh); - - #define VDFLAGS_DROPFRAME 3 - -diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c -index 38f1fbd..5b003fa 100644 ---- a/libmpcodecs/vd_ffmpeg.c -+++ b/libmpcodecs/vd_ffmpeg.c -@@ -32,6 +32,7 @@ - - #include "vd_internal.h" - #include "vd_ffmpeg.h" -+#include "dec_video.h" - - static const vd_info_t info = { - "FFmpeg's libavcodec codec family", -@@ -228,8 +229,8 @@ static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt - int imgfmt; - if (fmt == PIX_FMT_NONE) - return; -- imgfmt = pixfmt2imgfmt(fmt); -+ imgfmt = pixfmt2imgfmt(fmt, avctx->codec_id); - if (IMGFMT_IS_HWACCEL(imgfmt)) { - sh_video_t *sh = avctx->opaque; - vd_ffmpeg_ctx *ctx = sh->context; - ctx->do_dr1 = 1; -@@ -286,6 +287,12 @@ static int init(sh_video_t *sh){ - avctx->codec_type = CODEC_TYPE_VIDEO; - avctx->codec_id = lavc_codec->id; - -+#if CONFIG_VAAPI -+ if(get_video_hwaccel() == HWACCEL_VAAPI){ -+ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_VAAPIAcceleratedCodec); -+ avctx->get_format = get_format; -+ } -+#endif /* CONFIG_VAAPI */ - #if CONFIG_VDPAU - if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ - avctx->get_format = get_format; -@@ -479,7 +486,7 @@ static void draw_slice(struct AVCodecContext *s, - const AVFrame *src, int offset[4], - int y, int type, int height){ - sh_video_t *sh = s->opaque; -- uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]}; -+ uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2], src->data[3] + offset[3]}; - int strides[MP_MAX_PLANES] = {src->linesize[0], src->linesize[1], src->linesize[2]}; - #if 0 - int start=0, i; -@@ -558,9 +565,10 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ - sh->disp_w = width; - sh->disp_h = height; - ctx->pix_fmt = pix_fmt; -- ctx->best_csp = pixfmt2imgfmt(pix_fmt); -+ ctx->best_csp = pixfmt2imgfmt(pix_fmt, avctx->codec_id); - if (!mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, ctx->best_csp)) - return -1; -+ avctx->hwaccel_context = mpcodecs_get_hwaccel_context(sh); - ctx->vo_initialized = 1; - } - return 0; -@@ -955,24 +970,62 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ - return mpi; - } - --#if CONFIG_XVMC || CONFIG_VDPAU -+#if CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU -+static inline int is_hwaccel_format(int imgfmt) -+{ -+ switch (get_video_hwaccel()) { -+ case HWACCEL_VAAPI: return IMGFMT_IS_VAAPI(imgfmt) != 0; -+ case HWACCEL_VDPAU: return IMGFMT_IS_VDPAU(imgfmt) != 0; -+ case HWACCEL_XVMC: return IMGFMT_IS_XVMC(imgfmt) != 0; -+ } -+ return 0; -+} -+ -+static int query_format(sh_video_t *sh, int fmt) -+{ -+ vd_ffmpeg_ctx * const ctx = sh->context; -+ AVCodecContext * const avctx = ctx->avctx; -+ int r, width, height; -+ /* XXX: some codecs have not initialized width and height yet at -+ this point, so we are faking the dimensions so that init_vo() -+ doesn't fail because of 0x0 size */ -+ if ((width = avctx->width) == 0) -+ avctx->width = 64; -+ if ((height = avctx->height) == 0) -+ avctx->height = 64; -+ r = init_vo(sh, fmt); -+ avctx->width = width; -+ avctx->height = height; -+ return r; -+} -+ - static enum PixelFormat get_format(struct AVCodecContext *avctx, -- const enum PixelFormat *fmt){ -- enum PixelFormat selected_format; -+ const enum PixelFormat *fmt){ -+ enum PixelFormat selected_format = PIX_FMT_NONE; - int imgfmt; - sh_video_t *sh = avctx->opaque; -- int i; -- -- for(i=0;fmt[i]!=PIX_FMT_NONE;i++){ -- imgfmt = pixfmt2imgfmt(fmt[i]); -- if(!IMGFMT_IS_HWACCEL(imgfmt)) continue; -- mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); -- if(init_vo(sh, fmt[i]) >= 0) { -- break; -+ int i, try_hwaccel; -+ -+ for (try_hwaccel = 1; try_hwaccel >= 0; --try_hwaccel) { -+ for (i = 0; fmt[i] != PIX_FMT_NONE; i++){ -+ imgfmt = pixfmt2imgfmt(fmt[i], avctx->codec_id); -+ if ((try_hwaccel ^ is_hwaccel_format(imgfmt)) != 0) -+ continue; -+ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); -+ if (query_format(sh, fmt[i]) >= 0) { -+ if (try_hwaccel) { -+ /* don't allow format conversion for HW acceleration */ -+ if (sh->codec->outfmt[sh->outfmtidx] != imgfmt) -+ continue; -+ } -+ selected_format = fmt[i]; -+ break; -+ } - } -+ if (selected_format != PIX_FMT_NONE) -+ break; - } -- selected_format = fmt[i]; - set_format_params(avctx, selected_format); - return selected_format; - } --#endif /* CONFIG_XVMC || CONFIG_VDPAU */ -+#endif /* CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU */ -diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h -index 945fbc1..44e308a 100644 ---- a/libmpcodecs/vf.h -+++ b/libmpcodecs/vf.h -@@ -111,6 +111,7 @@ typedef struct vf_seteq_s - #define VFCTRL_GET_PTS 17 /* Return last pts value that reached vf_vo*/ - #define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */ - #define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */ -+#define VFCTRL_GET_HWACCEL_CONTEXT 20 /* Get HW accelerator context */ - - #include "vfcap.h" - -diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c -index 061a34b..a11c2b7 100644 ---- a/libmpcodecs/vf_vo.c -+++ b/libmpcodecs/vf_vo.c -@@ -170,6 +170,12 @@ static int control(struct vf_instance *vf, int request, void* data) - *(double *)data = vf->priv->pts; - return CONTROL_TRUE; - } -+ case VFCTRL_GET_HWACCEL_CONTEXT: -+ { -+ if(!video_out) return CONTROL_FALSE; // vo not configured? -+ return(video_out->control(VOCTRL_GET_HWACCEL_CONTEXT, data) -+ == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE; -+ } - } - // return video_out->control(request,data); - return CONTROL_UNKNOWN; -diff --git a/libvo/gl_common.c b/libvo/gl_common.c -index 9862dd9..638bd78 100644 ---- a/libvo/gl_common.c -+++ b/libvo/gl_common.c -@@ -140,6 +140,11 @@ void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, fl - void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); - /** \} */ // end of glextfunctions group - -+void (GLAPIENTRY *mpglXBindTexImage)(Display *, GLXDrawable, int, const int *); -+void (GLAPIENTRY *mpglXReleaseTexImage)(Display *, GLXDrawable, int); -+GLXPixmap (GLAPIENTRY *mpglXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *); -+void (GLAPIENTRY *mpglXDestroyPixmap)(Display *, GLXPixmap); -+ - //! \defgroup glgeneral OpenGL general helper functions - - //! \defgroup glcontext OpenGL context management helper functions -@@ -469,6 +474,10 @@ static const extfunc_desc_t extfuncs[] = { - {&mpglTexImage3D, NULL, {"glTexImage3D", NULL}}, - {&mpglAllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}}, - {&mpglFreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}}, -+ {&mpglXBindTexImage, "GLX_EXT_texture_from_pixmap", {"glXBindTexImageEXT", NULL}}, -+ {&mpglXReleaseTexImage, "GLX_EXT_texture_from_pixmap", {"glXReleaseTexImageEXT", NULL}}, -+ {&mpglXCreatePixmap, "GLX_EXT_texture_from_pixmap", {"glXCreatePixmap", NULL}}, -+ {&mpglXDestroyPixmap, "GLX_EXT_texture_from_pixmap", {"glXDestroyPixmap", NULL}}, - {NULL} - }; - -diff --git a/libvo/gl_common.h b/libvo/gl_common.h -index c4fb9bd..5614ac7 100644 ---- a/libvo/gl_common.h -+++ b/libvo/gl_common.h -@@ -507,4 +507,9 @@ extern void (GLAPIENTRY *mpglTexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei - extern void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, float); - extern void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); - -+extern void (GLAPIENTRY *mpglXBindTexImage)(Display *, GLXDrawable, int, const int *); -+extern void (GLAPIENTRY *mpglXReleaseTexImage)(Display *, GLXDrawable, int); -+extern GLXPixmap (GLAPIENTRY *mpglXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *); -+extern void (GLAPIENTRY *mpglXDestroyPixmap)(Display *, GLXPixmap); -+ - #endif /* MPLAYER_GL_COMMON_H */ -diff --git a/libvo/stats.c b/libvo/stats.c -new file mode 100644 -index 0000000..c4ff0ca ---- /dev/null -+++ b/libvo/stats.c -@@ -0,0 +1,217 @@ -+#include "config.h" -+#include "stats.h" -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if CONFIG_LIBGTOP -+#include -+#include -+#include -+#endif -+ -+// Process statistics -+struct proc_stats { -+ uint64_t utime; -+ uint64_t stime; -+ uint64_t cutime; -+ uint64_t cstime; -+ uint64_t frequency; -+ uint64_t cpu_time; -+ uint64_t start_time; -+ uint64_t current_time; -+}; -+ -+// Get current process stats -+static int get_proc_stats(struct proc_stats *pstats); -+ -+void stats_init(void) -+{ -+#if CONFIG_LIBGTOP -+ glibtop_init(); -+#endif -+} -+ -+void stats_exit(void) -+{ -+#if CONFIG_LIBGTOP -+ glibtop_close(); -+#endif -+} -+ -+// Get CPU frequency -+unsigned int get_cpu_frequency(void) -+{ -+ unsigned int freq = 0; -+#if defined __linux__ -+ { -+ FILE *proc_file = fopen("/proc/cpuinfo", "r"); -+ if (proc_file) { -+ char line[256]; -+ char *old_locale = setlocale(LC_NUMERIC, NULL); -+ setlocale(LC_NUMERIC, "C"); -+ while(fgets(line, sizeof(line), proc_file)) { -+ float f; -+ int len = strlen(line); -+ if (len == 0) -+ continue; -+ line[len - 1] = 0; -+ if (sscanf(line, "cpu MHz : %f", &f) == 1) -+ freq = (unsigned int)f; -+ } -+ setlocale(LC_NUMERIC, old_locale); -+ fclose(proc_file); -+ } -+ } -+#endif -+ return freq; -+} -+ -+// Get CPU usage in percent -+static float get_cpu_usage_1(void) -+{ -+ static struct proc_stats prev_stats; -+ struct proc_stats curr_stats; -+ uint64_t prev_proc_time = 0, curr_proc_time = 0; -+ float pcpu = 0.0f; -+ -+ if (get_proc_stats(&curr_stats) == 0) { -+ prev_proc_time += prev_stats.utime; -+ prev_proc_time += prev_stats.stime; -+ prev_proc_time += prev_stats.cutime; -+ prev_proc_time += prev_stats.cstime; -+ curr_proc_time += curr_stats.utime; -+ curr_proc_time += curr_stats.stime; -+ curr_proc_time += curr_stats.cutime; -+ curr_proc_time += curr_stats.cstime; -+ if (prev_stats.start_time > 0) -+ pcpu = 100.0 * ((float)(curr_proc_time - prev_proc_time) / -+ (float)(curr_stats.cpu_time - prev_stats.cpu_time)); -+ prev_stats = curr_stats; -+ } -+ return pcpu; -+} -+ -+float get_cpu_usage(enum CpuUsageType type) -+{ -+ static float pcpu_total = 0.0; -+ static unsigned int n_samples; -+ float pcpu; -+ -+ pcpu = get_cpu_usage_1(); -+ pcpu_total += pcpu / 100.0; -+ ++n_samples; -+ -+ if (type == CPU_USAGE_AVERAGE) -+ pcpu = 100.0 * (pcpu_total / n_samples); -+ return pcpu; -+} -+ -+// For ELF executable, notes are pushed before environment and args -+static int find_elf_note(unsigned long match, unsigned long *pval) -+{ -+ unsigned long *ep = (unsigned long *)__environ; -+ while (*ep++); -+ for (; *ep != 0; ep += 2) { -+ if (ep[0] == match) { -+ *pval = ep[1]; -+ return 0; -+ } -+ } -+ return -1; -+} -+ -+#ifndef AT_CLKTCK -+#define AT_CLKTCK 17 -+#endif -+ -+// Get current process stats -+int get_proc_stats(struct proc_stats *pstats) -+{ -+ int error = -1; -+ char line[256], *str, *end; -+ char vc; -+ int vi; -+ unsigned long vul; -+ unsigned long long vull; -+ float vf; -+#if defined __linux__ -+ { -+ FILE *proc_file = fopen("/proc/self/stat", "r"); -+ if (proc_file) { -+ if (fgets(line, sizeof(line), proc_file)) { -+ unsigned long utime, stime, cutime, cstime, start_time; -+ str = strrchr(line, ')'); -+ if (str && sscanf(str + 2, -+ "%c " -+ "%d %d %d %d %d " -+ "%lu %lu %lu %lu %lu %lu %lu " -+ "%ld %ld %ld %ld %ld %ld " -+ "%lu %lu ", -+ &vc, -+ &vi, &vi, &vi, &vi, &vi, -+ &vul, &vul, &vul, &vul, &vul, &utime, &stime, -+ &cutime, &cstime, &vul, &vul, &vul, &vul, -+ &start_time, &vul) == 21) { -+ pstats->utime = utime; -+ pstats->stime = stime; -+ pstats->cutime = cutime; -+ pstats->cstime = cstime; -+ pstats->start_time = start_time; -+ error = 0; -+ } -+ } -+ fclose(proc_file); -+ } -+ if (error) -+ return error; -+ error = -1; -+ -+ if (find_elf_note(AT_CLKTCK, &vul) == 0) { -+ pstats->frequency = vul; -+ error = 0; -+ } -+ if (error) -+ return error; -+ error = -1; -+ -+ proc_file = fopen("/proc/uptime", "r"); -+ if (proc_file) { -+ if (fgets(line, sizeof(line), proc_file)) { -+ char *old_locale = setlocale(LC_NUMERIC, NULL); -+ setlocale(LC_NUMERIC, "C"); -+ if (sscanf(line, "%f", &vf) == 1) { -+ pstats->cpu_time = (uint64_t)(vf * (float)pstats->frequency); -+ error = 0; -+ } -+ setlocale(LC_NUMERIC, old_locale); -+ } -+ fclose(proc_file); -+ } -+ } -+#elif CONFIG_LIBGTOP -+ { -+ glibtop_cpu cpu; -+ glibtop_proc_time proc_time; -+ glibtop_proc_state proc_state; -+ -+ glibtop_get_cpu(&cpu); -+ glibtop_get_proc_state(&proc_state, getpid()); -+ pstats->cpu_time = cpu.xcpu_total[proc_state.processor]; -+ -+ glibtop_get_proc_time(&proc_time, getpid()); -+ pstats->utime = proc_time.utime; -+ pstats->stime = proc_time.stime; -+ pstats->cutime = proc_time.cutime; -+ pstats->cstime = proc_time.cstime; -+ pstats->start_time = proc_time.start_time; -+ pstats->frequency = proc_time.frequency; -+ -+ error = 0; -+ } -+#endif -+ return error; -+} -diff --git a/libvo/stats.h b/libvo/stats.h -new file mode 100644 -index 0000000..62e7412 ---- /dev/null -+++ b/libvo/stats.h -@@ -0,0 +1,21 @@ -+#ifndef MPLAYER_STATS_H -+#define MPLAYER_STATS_H -+ -+#include -+ -+void stats_init(void); -+void stats_exit(void); -+ -+/// CPU usage model -+enum CpuUsageType { -+ CPU_USAGE_QUANTUM = 1, ///< CPU usage since the last call to cpu_get_usage() -+ CPU_USAGE_AVERAGE ///< CPU usage average'd since program start -+}; -+ -+/// Get CPU frequency -+unsigned int get_cpu_frequency(void); -+ -+/// Get CPU usage in percent -+float get_cpu_usage(enum CpuUsageType type); -+ -+#endif /* MPLAYER_STATS_H */ -diff --git a/libvo/video_out.c b/libvo/video_out.c -index 0318867..3373475 100644 ---- a/libvo/video_out.c -+++ b/libvo/video_out.c -@@ -95,6 +95,7 @@ extern const vo_functions_t video_out_xmga; - extern const vo_functions_t video_out_x11; - extern vo_functions_t video_out_xover; - extern const vo_functions_t video_out_xvmc; -+extern const vo_functions_t video_out_vaapi; - extern const vo_functions_t video_out_vdpau; - extern const vo_functions_t video_out_xv; - extern const vo_functions_t video_out_gl_nosw; -@@ -290,6 +291,9 @@ const vo_functions_t* const video_out_drivers[] = - #ifdef CONFIG_MD5SUM - &video_out_md5sum, - #endif -+#if CONFIG_VAAPI -+ &video_out_vaapi, -+#endif - NULL - }; - -diff --git a/libvo/video_out.h b/libvo/video_out.h -index 5e64b0e..785c6d2 100644 ---- a/libvo/video_out.h -+++ b/libvo/video_out.h -@@ -99,6 +99,10 @@ typedef struct { - int w,h; - } mp_win_t; - -+// Return current HW acceleration context -+// void *get_hwaccel_context(void); -+#define VOCTRL_GET_HWACCEL_CONTEXT 33 -+ - #define VO_TRUE 1 - #define VO_FALSE 0 - #define VO_ERROR -1 -diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c -new file mode 100644 -index 0000000..c888656 ---- /dev/null -+++ b/libvo/vo_vaapi.c -@@ -0,0 +1,2668 @@ -+/* -+ * VA API output module -+ * -+ * Copyright (C) 2008-2009 Splitted-Desktop Systems -+ * -+ * This file is part of MPlayer. -+ * -+ * MPlayer is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * MPlayer is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with MPlayer; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#include "config.h" -+#include "mp_msg.h" -+#include "help_mp.h" -+#include "subopt-helper.h" -+#include "video_out.h" -+#include "video_out_internal.h" -+#include "fastmemcpy.h" -+#include "sub/sub.h" -+#include "x11_common.h" -+#include "libavutil/common.h" -+#include "libavcodec/vaapi.h" -+#include "gui/interface.h" -+#include "stats.h" -+#include "sub/ass_mp.h" -+#include "sub/eosd.h" -+#include -+ -+#if CONFIG_GL -+#include "gl_common.h" -+#include -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#if CONFIG_VAAPI_GLX -+#include -+#endif -+ -+#if CONFIG_XRENDER -+#include -+#endif -+ -+/* Compatibility glue with VA-API >= 0.30 */ -+#ifndef VA_INVALID_ID -+#define VA_INVALID_ID 0xffffffff -+#endif -+#ifndef VA_FOURCC -+#define VA_FOURCC(ch0, ch1, ch2, ch3) \ -+ ((uint32_t)(uint8_t)(ch0) | \ -+ ((uint32_t)(uint8_t)(ch1) << 8) | \ -+ ((uint32_t)(uint8_t)(ch2) << 16) | \ -+ ((uint32_t)(uint8_t)(ch3) << 24 )) -+#endif -+#if defined VA_SRC_BT601 && defined VA_SRC_BT709 -+#define USE_VAAPI_COLORSPACE 1 -+#else -+#define USE_VAAPI_COLORSPACE 0 -+#endif -+ -+/* Defined to 1 if IA44/AI44 subpicture formats are allowed */ -+/* XXX: they are not visually attractive... */ -+#define USE_VAAPI_IA44_FORMATS 0 -+ -+/* Defined to 1 if VA/GLX 'bind' API is available */ -+#define USE_VAAPI_GLX_BIND \ -+ (VA_MAJOR_VERSION == 0 && \ -+ ((VA_MINOR_VERSION == 30 && \ -+ VA_MICRO_VERSION == 4 && VA_SDS_VERSION >= 5) || \ -+ (VA_MINOR_VERSION == 31 && \ -+ VA_MICRO_VERSION == 0 && VA_SDS_VERSION < 5))) -+ -+/* Compatibility glue with VA-API >= 0.31 */ -+#if defined VA_CHECK_VERSION -+#if VA_CHECK_VERSION(0,31,0) -+#define vaPutImage2 vaPutImage -+#define vaAssociateSubpicture2 vaAssociateSubpicture -+#endif -+#endif -+ -+static vo_info_t info = { -+ "VA API with X11", -+ "vaapi", -+ "Gwenole Beauchesne ", -+ "" -+}; -+ -+const LIBVO_EXTERN(vaapi) -+ -+/* Numbers of video surfaces */ -+#define MAX_OUTPUT_SURFACES 2 /* Maintain synchronisation points in flip_page() */ -+#define MAX_VIDEO_SURFACES 21 /* Maintain free surfaces in a queue (use least-recently-used) */ -+#define NUM_VIDEO_SURFACES_MPEG2 3 /* 1 decode frame, up to 2 references */ -+#define NUM_VIDEO_SURFACES_MPEG4 3 /* 1 decode frame, up to 2 references */ -+#define NUM_VIDEO_SURFACES_H264 21 /* 1 decode frame, up to 20 references */ -+#define NUM_VIDEO_SURFACES_VC1 3 /* 1 decode frame, up to 2 references */ -+ -+static void ensure_osd(void); -+static int reset_xrender_specific(void); -+ -+typedef void (*draw_alpha_func)(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride); -+ -+typedef void (*eosd_draw_alpha_func)(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color); -+ -+struct vaapi_surface { -+ VASurfaceID id; -+ VAImage image; -+ int is_bound; /* Flag: image bound to the surface? */ -+}; -+ -+struct vaapi_equalizer { -+ VADisplayAttribute brightness; -+ VADisplayAttribute contrast; -+ VADisplayAttribute hue; -+ VADisplayAttribute saturation; -+}; -+ -+static int g_is_visible; -+static int g_is_paused; -+static uint32_t g_image_width; -+static uint32_t g_image_height; -+static uint32_t g_image_format; -+static uint32_t g_image_fields; -+static Pixmap g_image_pixmap; -+static struct vo_rect g_output_rect; -+static struct vaapi_surface *g_output_surfaces[MAX_OUTPUT_SURFACES]; -+static unsigned int g_output_surface; -+static int g_deint; -+static int g_deint_type; -+static int g_colorspace; -+ -+static int gl_enabled; -+static int gl_use_tfp; -+#if CONFIG_GL -+static MPGLContext gl_context; -+static int gl_binding; -+static int gl_reflect; -+static int gl_finish; -+static GLuint gl_texture; -+static GLuint gl_font_base; -+static Pixmap gl_pixmap; -+static int gl_visual_attr[] = { -+ GLX_RGBA, -+ GLX_RED_SIZE, 1, -+ GLX_GREEN_SIZE, 1, -+ GLX_BLUE_SIZE, 1, -+ GLX_DOUBLEBUFFER, -+ GL_NONE -+}; -+#endif -+ -+#if CONFIG_VAAPI_GLX -+static void *gl_surface; -+#endif -+ -+static int xr_enabled; -+#if CONFIG_XRENDER -+static Pixmap g_image_pixmap; -+static Picture xr_video_picture; -+static Picture xr_window_picture; -+#endif -+ -+static struct vaapi_context *va_context; -+static VAProfile *va_profiles; -+static int va_num_profiles; -+static VAEntrypoint *va_entrypoints; -+static int va_num_entrypoints; -+static VASurfaceID *va_surface_ids; -+static int va_num_surfaces; -+static struct vaapi_surface **va_free_surfaces; -+static int va_free_surfaces_head_index; -+static int va_free_surfaces_tail_index; -+static VAImageFormat *va_image_formats; -+static int va_num_image_formats; -+static VAImageFormat *va_subpic_formats; -+static unsigned int *va_subpic_flags; -+static int va_num_subpic_formats; -+static VAImage va_osd_image; -+static uint8_t *va_osd_image_data; -+static VASubpictureID va_osd_subpicture; -+static int va_osd_associated; -+static draw_alpha_func va_osd_draw_alpha; -+static uint8_t *va_osd_palette; -+static struct vaapi_equalizer va_equalizer; -+static VAImage va_eosd_image; -+static uint8_t *va_eosd_image_data; -+static VASubpictureID va_eosd_subpicture; -+static int va_eosd_associated; -+static eosd_draw_alpha_func va_eosd_draw_alpha; -+ -+///< Flag: direct surface mapping: use mpi->number to select free VA surface? -+static int va_dm; -+ -+///< Flag: gather run-time statistics (CPU usage, frequency) -+static int cpu_stats; -+static unsigned int cpu_frequency; -+static float cpu_usage; -+ -+// X error trap -+static int x11_error_code = 0; -+static int (*old_error_handler)(Display *, XErrorEvent *); -+ -+static int error_handler(Display *dpy, XErrorEvent *error) -+{ -+ x11_error_code = error->error_code; -+ return 0; -+} -+ -+static void x11_trap_errors(void) -+{ -+ x11_error_code = 0; -+ old_error_handler = XSetErrorHandler(error_handler); -+} -+ -+static int x11_untrap_errors(void) -+{ -+ XSetErrorHandler(old_error_handler); -+ return x11_error_code; -+} -+ -+static int check_status(VAStatus status, const char *msg) -+{ -+ if (status != VA_STATUS_SUCCESS) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] %s: %s\n", msg, vaErrorStr(status)); -+ return 0; -+ } -+ return 1; -+} -+ -+static const char *string_of_VAImageFormat(VAImageFormat *imgfmt) -+{ -+ static char str[5]; -+ str[0] = imgfmt->fourcc; -+ str[1] = imgfmt->fourcc >> 8; -+ str[2] = imgfmt->fourcc >> 16; -+ str[3] = imgfmt->fourcc >> 24; -+ str[4] = '\0'; -+ return str; -+} -+ -+static const char *string_of_VAProfile(VAProfile profile) -+{ -+ switch (profile) { -+#define PROFILE(profile) \ -+ case VAProfile##profile: return "VAProfile" #profile -+ PROFILE(MPEG2Simple); -+ PROFILE(MPEG2Main); -+ PROFILE(MPEG4Simple); -+ PROFILE(MPEG4AdvancedSimple); -+ PROFILE(MPEG4Main); -+ PROFILE(H264Baseline); -+ PROFILE(H264Main); -+ PROFILE(H264High); -+ PROFILE(VC1Simple); -+ PROFILE(VC1Main); -+ PROFILE(VC1Advanced); -+#undef PROFILE -+ } -+ return ""; -+} -+ -+static const char *string_of_VAEntrypoint(VAEntrypoint entrypoint) -+{ -+ switch (entrypoint) { -+#define ENTRYPOINT(entrypoint) \ -+ case VAEntrypoint##entrypoint: return "VAEntrypoint" #entrypoint -+ ENTRYPOINT(VLD); -+ ENTRYPOINT(IZZ); -+ ENTRYPOINT(IDCT); -+ ENTRYPOINT(MoComp); -+ ENTRYPOINT(Deblocking); -+#undef ENTRYPOINT -+ } -+ return ""; -+} -+ -+static int has_profile(VAProfile profile) -+{ -+ if (va_profiles && va_num_profiles > 0) { -+ int i; -+ for (i = 0; i < va_num_profiles; i++) { -+ if (va_profiles[i] == profile) -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int VAProfile_from_imgfmt(uint32_t format) -+{ -+ static const int mpeg2_profiles[] = -+ { VAProfileMPEG2Main, VAProfileMPEG2Simple, -1 }; -+ static const int mpeg4_profiles[] = -+ { VAProfileMPEG4Main, VAProfileMPEG4AdvancedSimple, VAProfileMPEG4Simple, -1 }; -+ static const int h264_profiles[] = -+ { VAProfileH264High, VAProfileH264Main, VAProfileH264Baseline, -1 }; -+ static const int wmv3_profiles[] = -+ { VAProfileVC1Main, VAProfileVC1Simple, -1 }; -+ static const int vc1_profiles[] = -+ { VAProfileVC1Advanced, -1 }; -+ -+ const int *profiles = NULL; -+ switch (IMGFMT_VAAPI_CODEC(format)) { -+ case IMGFMT_VAAPI_CODEC_MPEG2: -+ profiles = mpeg2_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_MPEG4: -+ profiles = mpeg4_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_H264: -+ profiles = h264_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_VC1: -+ switch (format) { -+ case IMGFMT_VAAPI_WMV3: -+ profiles = wmv3_profiles; -+ break; -+ case IMGFMT_VAAPI_VC1: -+ profiles = vc1_profiles; -+ break; -+ } -+ break; -+ } -+ -+ if (profiles) { -+ for (int i = 0; profiles[i] != -1; i++) { -+ if (has_profile(profiles[i])) -+ return profiles[i]; -+ } -+ } -+ return -1; -+} -+ -+static int has_entrypoint(VAEntrypoint entrypoint) -+{ -+ if (va_entrypoints && va_num_entrypoints > 0) { -+ int i; -+ for (i = 0; i < va_num_entrypoints; i++) { -+ if (va_entrypoints[i] == entrypoint) -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int VAEntrypoint_from_imgfmt(uint32_t format) -+{ -+ int entrypoint = 0; -+ switch (format) { -+ case IMGFMT_VAAPI_MPEG2: -+ case IMGFMT_VAAPI_MPEG4: -+ case IMGFMT_VAAPI_H263: -+ case IMGFMT_VAAPI_H264: -+ case IMGFMT_VAAPI_WMV3: -+ case IMGFMT_VAAPI_VC1: -+ entrypoint = VAEntrypointVLD; -+ break; -+ case IMGFMT_VAAPI_MPEG2_IDCT: -+ entrypoint = VAEntrypointIDCT; -+ break; -+ case IMGFMT_VAAPI_MPEG2_MOCO: -+ entrypoint = VAEntrypointMoComp; -+ break; -+ } -+ -+ if (entrypoint) -+ return has_entrypoint(entrypoint); -+ -+ return -1; -+} -+ -+static VAImageFormat *find_image_format(uint32_t fourcc) -+{ -+ if (va_image_formats && va_num_image_formats > 0) { -+ int i; -+ for (i = 0; i < va_num_image_formats; i++) { -+ if (va_image_formats[i].fourcc == fourcc) -+ return &va_image_formats[i]; -+ } -+ } -+ return NULL; -+} -+ -+static VAImageFormat *VAImageFormat_from_imgfmt(uint32_t format) -+{ -+ uint32_t fourcc = 0; -+ -+ switch (format) { -+ case IMGFMT_NV12: fourcc = VA_FOURCC('N','V','1','2'); break; -+ case IMGFMT_YV12: fourcc = VA_FOURCC('Y','V','1','2'); break; -+ case IMGFMT_I420: fourcc = VA_FOURCC('I','4','2','0'); break; -+ case IMGFMT_IYUV: fourcc = VA_FOURCC('I','Y','U','V'); break; -+ } -+ -+ if (fourcc) -+ return find_image_format(fourcc); -+ -+ return NULL; -+} -+ -+static struct vaapi_surface *alloc_vaapi_surface(unsigned int width, -+ unsigned int height, -+ unsigned int format) -+{ -+ struct vaapi_surface *surface = NULL; -+ struct vaapi_surface **surfaces; -+ VASurfaceID *surface_ids; -+ VAStatus status; -+ -+ surface = calloc(1, sizeof(*surface)); -+ if (!surface) -+ goto error; -+ -+ surfaces = realloc(va_free_surfaces, -+ (1 + va_num_surfaces) * sizeof(surfaces[0])); -+ if (!surfaces) -+ goto error; -+ -+ surface_ids = realloc(va_surface_ids, -+ (1 + va_num_surfaces) * sizeof(surface_ids[0])); -+ if (!surface_ids) -+ goto error; -+ -+ status = vaCreateSurfaces(va_context->display, width, height, format, -+ 1, &surface->id); -+ if (!check_status(status, "vaCreateSurfaces()")) -+ goto error; -+ -+ va_surface_ids = surface_ids; -+ va_surface_ids[va_num_surfaces] = surface->id; -+ va_free_surfaces = surfaces; -+ va_free_surfaces[va_num_surfaces] = surface; -+ surface->image.image_id = VA_INVALID_ID; -+ surface->image.buf = VA_INVALID_ID; -+ ++va_num_surfaces; -+ return surface; -+error: -+ free(surface); -+ return NULL; -+} -+ -+static void resize(void) -+{ -+ struct vo_rect src; -+ -+ calc_src_dst_rects(g_image_width, g_image_height, -+ &src, &g_output_rect, NULL, NULL); -+ -+ ensure_osd(); -+ -+ vo_x11_clearwindow(mDisplay, vo_window); -+ -+#if CONFIG_GL -+#define FOVY 60.0f -+#define ASPECT 1.0f -+#define Z_NEAR 0.1f -+#define Z_FAR 100.0f -+#define Z_CAMERA 0.869f -+ -+ if (gl_enabled) { -+ glViewport(0, 0, vo_dwidth, vo_dheight); -+ glMatrixMode(GL_PROJECTION); -+ glLoadIdentity(); -+ gluPerspective(FOVY, ASPECT, Z_NEAR, Z_FAR); -+ glMatrixMode(GL_MODELVIEW); -+ glLoadIdentity(); -+ -+ glTranslatef(-0.5f, -0.5f, -Z_CAMERA); -+ glScalef(1.0f / (GLfloat)vo_dwidth, -+ -1.0f / (GLfloat)vo_dheight, -+ 1.0f / (GLfloat)vo_dwidth); -+ glTranslatef(0.0f, -1.0f * (GLfloat)vo_dheight, 0.0f); -+ } -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ reset_xrender_specific(); -+#endif -+ -+ if (g_is_visible) -+ flip_page(); -+} -+ -+#if CONFIG_GL -+static int gl_build_font(void) -+{ -+ XFontStruct *fi; -+ -+ gl_font_base = glGenLists(96); -+ -+ fi = XLoadQueryFont(mDisplay, "-adobe-helvetica-medium-r-normal--16-*-*-*-p-*-iso8859-1" ); -+ if (!fi) { -+ fi = XLoadQueryFont(mDisplay, "fixed"); -+ if (!fi) -+ return -1; -+ } -+ -+ glXUseXFont(fi->fid, 32, 96, gl_font_base); -+ XFreeFont(mDisplay, fi); -+ return 0; -+} -+ -+static void gl_printf(const char *format, ...) -+{ -+ va_list args; -+ char *text; -+ int textlen; -+ -+ va_start(args, format); -+ textlen = vsnprintf(NULL, 0, format, args); -+ va_end(args); -+ -+ text = malloc(textlen + 1); -+ if (!text) -+ return; -+ -+ va_start(args, format); -+ vsprintf(text, format, args); -+ va_end(args); -+ -+ glPushAttrib(GL_LIST_BIT); -+ glListBase(gl_font_base - 32); -+ glCallLists(textlen, GL_UNSIGNED_BYTE, text); -+ glPopAttrib(); -+ free(text); -+} -+ -+static void gl_draw_rectangle(int x, int y, int w, int h, unsigned int rgba) -+{ -+ glColor4f((GLfloat)((rgba >> 24) & 0xff) / 255.0, -+ (GLfloat)((rgba >> 16) & 0xff) / 255.0, -+ (GLfloat)((rgba >> 8) & 0xff) / 255.0, -+ (GLfloat)(rgba & 0xff) / 255.0); -+ -+ glTranslatef((GLfloat)x, (GLfloat)y, 0.0f); -+ glBegin(GL_QUADS); -+ { -+ glVertex2i(0, 0); -+ glVertex2i(w, 0); -+ glVertex2i(w, h); -+ glVertex2i(0, h); -+ } -+ glEnd(); -+} -+#endif -+ -+#if CONFIG_XRENDER -+static int init_xrender(void) -+{ -+ int dummy; -+ -+ return XRenderQueryExtension(mDisplay, &dummy, &dummy); -+} -+ -+static void uninit_xrender(void) -+{ -+} -+#endif -+ -+static inline unsigned char *get_osd_image_data(int x0, int y0) -+{ -+ return (va_osd_image_data + -+ va_osd_image.offsets[0] + -+ va_osd_image.pitches[0] * y0 + -+ x0 * ((va_osd_image.format.bits_per_pixel + 7) / 8)); -+} -+ -+static void draw_alpha_rgb32(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride, src += stride, srca += stride) -+ for (x = 0; x < w; x++) { -+ const unsigned char c = src[x]; -+ dst[4*x + 0] = c; -+ dst[4*x + 1] = c; -+ dst[4*x + 2] = c; -+ dst[4*x + 3] = -srca[x]; -+ } -+} -+ -+#if USE_VAAPI_IA44_FORMATS -+static void draw_alpha_IA44(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) -+ dst[x] = (src[y*stride + x] & 0xf0) | (-srca[y*stride + x] >> 4); -+} -+ -+static void draw_alpha_AI44(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) -+ dst[x] = (src[y*stride + x] >> 4) | (-srca[y*stride + x] & 0xf0); -+} -+#endif -+ -+static void draw_alpha_IA88(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) { -+ dst[2*x + 0] = src [y*stride + x]; -+ dst[2*x + 1] = -srca[y*stride + x]; -+ } -+} -+ -+static void draw_alpha_AI88(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) { -+ dst[2*x + 0] = -srca[y*stride + x]; -+ dst[2*x + 1] = src [y*stride + x]; -+ } -+} -+ -+///< List of subpicture formats in preferred order -+static const struct { -+ uint32_t format; -+ draw_alpha_func draw_alpha; -+} -+va_osd_info[] = { -+#if USE_VAAPI_IA44_FORMATS -+ { VA_FOURCC('I','A','4','4'), draw_alpha_IA44 }, -+ { VA_FOURCC('A','I','4','4'), draw_alpha_AI44 }, -+#endif -+ { VA_FOURCC('I','A','8','8'), draw_alpha_IA88 }, -+ { VA_FOURCC('A','I','8','8'), draw_alpha_AI88 }, -+ { VA_FOURCC('B','G','R','A'), draw_alpha_rgb32 }, -+ { VA_FOURCC('R','G','B','A'), draw_alpha_rgb32 }, -+ { 0, NULL } -+}; -+ -+static uint8_t *gen_osd_palette(const VAImage *image) -+{ -+ uint8_t *palette; -+ int i, is_rgb; -+ int r_idx = -1, g_idx = -1, b_idx = -1; -+ int y_idx = -1, u_idx = -1, v_idx = -1; -+ int i_idx = -1, a_idx = -1; -+ -+ if (image->num_palette_entries < 1) -+ return NULL; -+ -+ palette = malloc(image->num_palette_entries * image->entry_bytes); -+ if (!palette) -+ return NULL; -+ -+ for (i = 0; i < image->entry_bytes; i++) { -+ switch (image->component_order[i]) { -+ case 'R': r_idx = i; is_rgb = 1; break; -+ case 'G': g_idx = i; is_rgb = 1; break; -+ case 'B': b_idx = i; is_rgb = 1; break; -+ case 'Y': y_idx = i; is_rgb = 0; break; -+ case 'U': u_idx = i; is_rgb = 0; break; -+ case 'V': v_idx = i; is_rgb = 0; break; -+ case 'I': i_idx = i; break; -+ case 'A': a_idx = i; break; -+ } -+ } -+ -+ if (r_idx != -1 && g_idx != -1 && b_idx != -1) { /* RGB format */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + r_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + g_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + b_idx] = i * 0xff / (image->num_palette_entries - 1); -+ } -+ } -+ else if (y_idx != -1 && u_idx != -1 && v_idx != -1) { /* YUV format */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + y_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + u_idx] = 0x80; -+ palette[n + v_idx] = 0x80; -+ } -+ } -+ else if (i_idx != -1 && a_idx != -1) {/* AYUV format (GMA500 "psb" bug) */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + 0] = 0x80; -+ palette[n + 1] = 0x80; -+ palette[n + 2] = 16 + i * 220 / (image->num_palette_entries - 1); -+ palette[n + 3] = 0; -+ } -+ } -+ else { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not set up subpicture palette\n"); -+ free(palette); -+ palette = NULL; -+ } -+ return palette; -+} -+ -+static void disable_osd(void) -+{ -+ if (!va_osd_associated) -+ return; -+ -+ vaDeassociateSubpicture(va_context->display, -+ va_osd_subpicture, -+ va_surface_ids, va_num_surfaces); -+ -+ va_osd_associated = 0; -+} -+ -+static int enable_osd(void) -+{ -+ VAStatus status; -+ -+ disable_osd(); -+ -+ status = vaAssociateSubpicture2(va_context->display, -+ va_osd_subpicture, -+ va_surface_ids, va_num_surfaces, -+ 0, 0, -+ va_osd_image.width, va_osd_image.height, -+ 0, 0, -+ g_image_width, g_image_height, -+ 0); -+ if (!check_status(status, "vaAssociateSubpicture()")) -+ return -1; -+ -+ va_osd_associated = 1; -+ return 0; -+} -+ -+static void destroy_osd(void) -+{ -+ disable_osd(); -+ -+ if (va_osd_subpicture != VA_INVALID_ID) { -+ vaDestroySubpicture(va_context->display, va_osd_subpicture); -+ va_osd_subpicture = VA_INVALID_ID; -+ } -+ -+ if (va_osd_image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, va_osd_image.image_id); -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_osd_image.width = 0; -+ va_osd_image.height = 0; -+ } -+} -+ -+static void create_osd(void) -+{ -+ VAStatus status; -+ int i, j; -+ -+ for (i = 0; va_osd_info[i].format; i++) { -+ for (j = 0; j < va_num_subpic_formats; j++) -+ if (va_subpic_formats[j].fourcc == va_osd_info[i].format) -+ break; -+ if (j < va_num_subpic_formats && -+ vaCreateImage(va_context->display, &va_subpic_formats[j], -+ g_output_rect.width, g_output_rect.height, -+ &va_osd_image) == VA_STATUS_SUCCESS) { -+ va_osd_palette = gen_osd_palette(&va_osd_image); -+ if (((!va_osd_image.num_palette_entries) ^ (!va_osd_palette)) == 0) -+ break; -+ vaDestroyImage(va_context->display, va_osd_image.image_id); -+ va_osd_image.image_id = VA_INVALID_ID; -+ } -+ } -+ -+ if (va_osd_info[i].format && -+ vaCreateSubpicture(va_context->display, va_osd_image.image_id, -+ &va_osd_subpicture) == VA_STATUS_SUCCESS) { -+ va_osd_draw_alpha = va_osd_info[i].draw_alpha; -+ if (va_osd_palette) { -+ status = vaSetImagePalette(va_context->display, -+ va_osd_image.image_id, va_osd_palette); -+ check_status(status, "vaSetImagePalette()"); -+ } -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using %s surface for OSD\n", -+ string_of_VAImageFormat(&va_osd_image.format)); -+ } -+} -+ -+static void ensure_osd(void) -+{ -+ if (g_output_rect.width == va_osd_image.width && -+ g_output_rect.height == va_osd_image.height) -+ return; -+ -+ destroy_osd(); -+ create_osd(); -+} -+ -+static inline unsigned char *get_eosd_image_data(int x0, int y0) -+{ -+ return (va_eosd_image_data + -+ va_eosd_image.offsets[0] + -+ va_eosd_image.pitches[0] * y0 + -+ x0 * ((va_eosd_image.format.bits_per_pixel + 7) / 8)); -+} -+ -+static void eosd_draw_alpha_bgra(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color) -+{ -+ int x, y; -+ const unsigned int dst_stride = va_eosd_image.pitches[0]; -+ unsigned char *dst = get_eosd_image_data(dst_x, dst_y); -+ const unsigned int r = (color >> 24) & 0xff; -+ const unsigned int g = (color >> 16) & 0xff; -+ const unsigned int b = (color >> 8) & 0xff; -+ const unsigned int a = 0xff - (color & 0xff); -+ -+ for (y = 0; y < src_h; y++, dst += dst_stride, src += src_stride) -+ for (x = 0; x < src_w; x++) { -+ const unsigned int v = src[x]; -+ dst[4*x + 0] = (b * v + dst[4*x + 0] * (0xff - v)) / 255; -+ dst[4*x + 1] = (g * v + dst[4*x + 1] * (0xff - v)) / 255; -+ dst[4*x + 2] = (r * v + dst[4*x + 2] * (0xff - v)) / 255; -+ dst[4*x + 3] = (a * v + dst[4*x + 3] * (0xff - v)) / 255; -+ } -+} -+ -+static void eosd_draw_alpha_rgba(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color) -+{ -+ int x, y; -+ const unsigned int dst_stride = va_eosd_image.pitches[0]; -+ unsigned char *dst = get_eosd_image_data(dst_x, dst_y); -+ const unsigned int r = (color >> 24) & 0xff; -+ const unsigned int g = (color >> 16) & 0xff; -+ const unsigned int b = (color >> 8) & 0xff; -+ const unsigned int a = 0xff - (color & 0xff); -+ -+ for (y = 0; y < src_h; y++, dst += dst_stride, src += src_stride) -+ for (x = 0; x < src_w; x++) { -+ const unsigned int v = src[x]; -+ dst[4*x + 0] = (r * v + dst[4*x + 0] * (0xff - v)) / 255; -+ dst[4*x + 1] = (g * v + dst[4*x + 1] * (0xff - v)) / 255; -+ dst[4*x + 2] = (b * v + dst[4*x + 2] * (0xff - v)) / 255; -+ dst[4*x + 3] = (a * v + dst[4*x + 3] * (0xff - v)) / 255; -+ } -+} -+ -+static void disable_eosd(void) -+{ -+ if (!va_eosd_associated) -+ return; -+ -+ vaDeassociateSubpicture(va_context->display, -+ va_eosd_subpicture, -+ va_surface_ids, va_num_surfaces); -+ -+ va_eosd_associated = 0; -+} -+ -+static int enable_eosd(void) -+{ -+ VAStatus status; -+ -+ if (va_eosd_associated) -+ return 0; -+ -+ status = vaAssociateSubpicture2(va_context->display, -+ va_eosd_subpicture, -+ va_surface_ids, va_num_surfaces, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_image_width, g_image_height, -+ 0); -+ if (!check_status(status, "vaAssociateSubpicture()")) -+ return -1; -+ -+ va_eosd_associated = 1; -+ return 0; -+} -+ -+///< List of subpicture formats in preferred order -+static const struct { -+ uint32_t format; -+ eosd_draw_alpha_func draw_alpha; -+} -+va_eosd_info[] = { -+ { VA_FOURCC('B','G','R','A'), eosd_draw_alpha_bgra }, -+ { VA_FOURCC('R','G','B','A'), eosd_draw_alpha_rgba }, -+ { 0, NULL } -+}; -+ -+static int is_direct_mapping_init(void) -+{ -+ VADisplayAttribute attr; -+ VAStatus status; -+ -+ if (va_dm < 2) -+ return va_dm; -+ -+ /* If the driver doesn't make a copy of the VA surface for -+ display, then we have to retain it until it's no longer the -+ visible surface. In other words, if the driver is using -+ DirectSurface mode, we don't want to decode the new surface -+ into the previous one that was used for display. */ -+ attr.type = VADisplayAttribDirectSurface; -+ attr.flags = VA_DISPLAY_ATTRIB_GETTABLE; -+ -+ status = vaGetDisplayAttributes(va_context->display, &attr, 1); -+ if (status == VA_STATUS_SUCCESS) -+ return !attr.value; -+ return 0; -+} -+ -+static inline int is_direct_mapping(void) -+{ -+ static int dm = -1; -+ if (dm < 0) { -+ dm = is_direct_mapping_init(); -+ if (dm) -+ mp_msg(MSGT_VO, MSGL_INFO, -+ "[vo_vaapi] Using 1:1 VA surface mapping\n"); -+ } -+ return dm; -+} -+ -+static int int_012(int *n) -+{ -+ return *n >= 0 && *n <= 2; -+} -+ -+static const opt_t subopts[] = { -+ { "dm", OPT_ARG_INT, &va_dm, (opt_test_f)int_012 }, -+ { "stats", OPT_ARG_BOOL, &cpu_stats, NULL }, -+ { "deint", OPT_ARG_INT, &g_deint, (opt_test_f)int_012 }, -+#if USE_VAAPI_COLORSPACE -+ { "colorspace", OPT_ARG_INT, &g_colorspace, (opt_test_f)int_012 }, -+#endif -+#if CONFIG_GL -+ { "gl", OPT_ARG_BOOL, &gl_enabled, NULL }, -+ { "glfinish", OPT_ARG_BOOL, &gl_finish, NULL }, -+#if USE_VAAPI_GLX_BIND -+ { "bind", OPT_ARG_BOOL, &gl_binding, NULL }, -+#endif -+ { "reflect", OPT_ARG_BOOL, &gl_reflect, NULL }, -+ { "tfp", OPT_ARG_BOOL, &gl_use_tfp, NULL }, -+#endif -+#if CONFIG_XRENDER -+ { "xrender", OPT_ARG_BOOL, &xr_enabled, NULL }, -+#endif -+ { NULL, } -+}; -+ -+static int preinit(const char *arg) -+{ -+ VADisplayAttribute *display_attrs; -+ VAStatus status; -+ int va_major_version, va_minor_version; -+ int i, max_image_formats, max_subpic_formats, max_profiles; -+ int num_display_attrs, max_display_attrs; -+ -+ va_dm = 2; -+ g_deint = 0; -+ g_deint_type = 2; -+ g_colorspace = 1; -+ if (subopt_parse(arg, subopts) != 0) { -+ mp_msg(MSGT_VO, MSGL_FATAL, -+ "\n-vo vaapi command line help:\n" -+ "Example: mplayer -vo vaapi:gl\n" -+ "\nOptions:\n" -+ " dm\n" -+ " 0: use least-recently-used VA surface\n" -+ " 1: identify VA surface with MPI index\n" -+ " 2: auto-detect use of direct surface mapping (default)\n" -+ " deint (all modes > 0 respect -field-dominance)\n" -+ " 0: no deinterlacing (default)\n" -+ " 1: only show first field\n" -+ " 2: bob deinterlacing\n" -+ " colorspace\n" -+ " 0: guess based on video resolution\n" -+ " 1: ITU-R BT.601 (default)\n" -+ " 2: ITU-R BT.709\n" -+#if CONFIG_GL -+ " gl\n" -+ " Enable OpenGL rendering\n" -+ " glfinish\n" -+ " Call glFinish() before swapping buffers\n" -+ " tfp\n" -+ " Use GLX texture-from-pixmap instead of VA/GLX extensions\n" -+#if USE_VAAPI_GLX_BIND -+ " bind\n" -+ " Use VA surface binding instead of copy\n" -+#endif -+ " reflect\n" -+ " Enable OpenGL reflection effects\n" -+#endif -+#if CONFIG_XRENDER -+ " xrender\n" -+ " Enable Xrender rendering, thus vaPutSurface() to a Pixmap\n" -+#endif -+ "\n" ); -+ return -1; -+ } -+ if (gl_enabled && xr_enabled) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] User requested both Xrender and OpenGL rendering\n"); -+ return -1; -+ } -+ if (g_deint) -+ g_deint_type = g_deint; -+#if CONFIG_GL -+ if (gl_enabled) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using OpenGL rendering%s\n", -+ gl_reflect ? ", with reflection effects" : ""); -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using Xrender rendering\n"); -+#endif -+ -+ stats_init(); -+ -+#if CONFIG_GL -+ if (gl_enabled && !init_mpglcontext(&gl_context, GLTYPE_X11)) -+ return -1; -+ else -+#endif -+ if (!vo_init()) -+ return -1; -+#if CONFIG_XRENDER -+ if (xr_enabled && !init_xrender()) -+ return -1; -+#endif -+ -+ va_context = calloc(1, sizeof(*va_context)); -+ if (!va_context) -+ return -1; -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_enabled) -+ va_context->display = vaGetDisplayGLX(mDisplay); -+ else -+#endif -+ va_context->display = vaGetDisplay(mDisplay); -+ if (!va_context->display) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): VA display %p\n", va_context->display); -+ -+ status = vaInitialize(va_context->display, &va_major_version, &va_minor_version); -+ if (!check_status(status, "vaInitialize()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): VA API version %d.%d\n", -+ va_major_version, va_minor_version); -+ -+ max_image_formats = vaMaxNumImageFormats(va_context->display); -+ va_image_formats = calloc(max_image_formats, sizeof(*va_image_formats)); -+ if (!va_image_formats) -+ return -1; -+ status = vaQueryImageFormats(va_context->display, va_image_formats, &va_num_image_formats); -+ if (!check_status(status, "vaQueryImageFormats()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d image formats available\n", -+ va_num_image_formats); -+ for (i = 0; i < va_num_image_formats; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAImageFormat(&va_image_formats[i])); -+ -+ max_subpic_formats = vaMaxNumSubpictureFormats(va_context->display); -+ va_subpic_formats = calloc(max_subpic_formats, sizeof(*va_subpic_formats)); -+ if (!va_subpic_formats) -+ return -1; -+ va_subpic_flags = calloc(max_subpic_formats, sizeof(*va_subpic_flags)); -+ if (!va_subpic_flags) -+ return -1; -+ status = vaQuerySubpictureFormats(va_context->display, va_subpic_formats, va_subpic_flags, &va_num_subpic_formats); -+ if (!check_status(status, "vaQuerySubpictureFormats()")) -+ va_num_subpic_formats = 0; /* XXX: don't error out for IEGD */ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d subpicture formats available\n", -+ va_num_subpic_formats); -+ for (i = 0; i < va_num_subpic_formats; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s, flags 0x%x\n", string_of_VAImageFormat(&va_subpic_formats[i]), va_subpic_flags[i]); -+ -+ max_profiles = vaMaxNumProfiles(va_context->display); -+ va_profiles = calloc(max_profiles, sizeof(*va_profiles)); -+ if (!va_profiles) -+ return -1; -+ status = vaQueryConfigProfiles(va_context->display, va_profiles, &va_num_profiles); -+ if (!check_status(status, "vaQueryConfigProfiles()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d profiles available\n", -+ va_num_profiles); -+ for (i = 0; i < va_num_profiles; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAProfile(va_profiles[i])); -+ -+ va_osd_subpicture = VA_INVALID_ID; -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_eosd_subpicture = VA_INVALID_ID; -+ va_eosd_image.image_id = VA_INVALID_ID; -+ -+ max_display_attrs = vaMaxNumDisplayAttributes(va_context->display); -+ display_attrs = calloc(max_display_attrs, sizeof(*display_attrs)); -+ if (display_attrs) { -+ num_display_attrs = 0; -+ status = vaQueryDisplayAttributes(va_context->display, -+ display_attrs, &num_display_attrs); -+ if (check_status(status, "vaQueryDisplayAttributes()")) { -+ for (i = 0; i < num_display_attrs; i++) { -+ VADisplayAttribute *attr; -+ switch (display_attrs[i].type) { -+ case VADisplayAttribBrightness: -+ attr = &va_equalizer.brightness; -+ break; -+ case VADisplayAttribContrast: -+ attr = &va_equalizer.contrast; -+ break; -+ case VADisplayAttribHue: -+ attr = &va_equalizer.hue; -+ break; -+ case VADisplayAttribSaturation: -+ attr = &va_equalizer.saturation; -+ break; -+ default: -+ attr = NULL; -+ break; -+ } -+ if (attr) -+ *attr = display_attrs[i]; -+ } -+ } -+ free(display_attrs); -+ } -+ return 0; -+} -+ -+static void free_video_specific(void) -+{ -+ int i; -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_surface) { -+ VAStatus status; -+ status = vaDestroySurfaceGLX(va_context->display, gl_surface); -+ check_status(status, "vaDestroySurfaceGLX()"); -+ gl_surface = NULL; -+ } -+#endif -+ -+ if (va_context && va_context->context_id) { -+ vaDestroyContext(va_context->display, va_context->context_id); -+ va_context->context_id = 0; -+ } -+ -+ if (va_free_surfaces) { -+ for (i = 0; i < va_num_surfaces; i++) { -+ if (!va_free_surfaces[i]) -+ continue; -+ if (va_free_surfaces[i]->image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, -+ va_free_surfaces[i]->image.image_id); -+ va_free_surfaces[i]->image.image_id = VA_INVALID_ID; -+ } -+ free(va_free_surfaces[i]); -+ va_free_surfaces[i] = NULL; -+ } -+ free(va_free_surfaces); -+ va_free_surfaces = NULL; -+ va_free_surfaces_head_index = 0; -+ va_free_surfaces_tail_index = 0; -+ } -+ -+ g_output_surface = 0; -+ memset(g_output_surfaces, 0, sizeof(g_output_surfaces)); -+ -+ if (va_osd_palette) { -+ free(va_osd_palette); -+ va_osd_palette = NULL; -+ } -+ -+ disable_eosd(); -+ disable_osd(); -+ -+ if (va_eosd_subpicture != VA_INVALID_ID) { -+ vaDestroySubpicture(va_context->display, va_eosd_subpicture); -+ va_eosd_subpicture = VA_INVALID_ID; -+ } -+ -+ if (va_eosd_image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, va_eosd_image.image_id); -+ va_eosd_image.image_id = VA_INVALID_ID; -+ } -+ -+ destroy_osd(); -+ -+ if (va_surface_ids) { -+ vaDestroySurfaces(va_context->display, va_surface_ids, va_num_surfaces); -+ free(va_surface_ids); -+ va_surface_ids = NULL; -+ va_num_surfaces = 0; -+ } -+ -+ if (va_context && va_context->config_id) { -+ vaDestroyConfig(va_context->display, va_context->config_id); -+ va_context->config_id = 0; -+ } -+ -+ if (va_entrypoints) { -+ free(va_entrypoints); -+ va_entrypoints = NULL; -+ } -+ -+#if CONFIG_GL -+ if (gl_pixmap) { -+ x11_trap_errors(); -+ mpglXDestroyPixmap(mDisplay, gl_pixmap); -+ XSync(mDisplay, False); -+ x11_untrap_errors(); -+ gl_pixmap = None; -+ } -+ -+ if (g_image_pixmap) { -+ XFreePixmap(mDisplay, g_image_pixmap); -+ g_image_pixmap = None; -+ } -+ -+ if (gl_texture) { -+ glDeleteTextures(1, &gl_texture); -+ gl_texture = GL_NONE; -+ } -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_window_picture) { -+ XRenderFreePicture(mDisplay, xr_window_picture); -+ xr_window_picture = None; -+ } -+#endif -+ -+ g_is_visible = 0; -+} -+ -+static void uninit(void) -+{ -+ if (!vo_config_count) -+ return; -+ -+ free_video_specific(); -+ -+ if (va_profiles) { -+ free(va_profiles); -+ va_profiles = NULL; -+ } -+ -+ if (va_subpic_flags) { -+ free(va_subpic_flags); -+ va_subpic_flags = NULL; -+ } -+ -+ if (va_subpic_formats) { -+ free(va_subpic_formats); -+ va_subpic_formats = NULL; -+ } -+ -+ if (va_image_formats) { -+ free(va_image_formats); -+ va_image_formats = NULL; -+ } -+ -+ if (va_context && va_context->display) { -+ vaTerminate(va_context->display); -+ va_context->display = NULL; -+ } -+ -+ if (va_context) { -+ free(va_context); -+ va_context = NULL; -+ } -+ -+#ifdef CONFIG_XF86VM -+ vo_vm_close(); -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ uninit_xrender(); -+#endif -+#if CONFIG_GL -+ if (gl_enabled) -+ uninit_mpglcontext(&gl_context); -+ else -+#endif -+ vo_x11_uninit(); -+ -+ stats_exit(); -+} -+ -+static int config_x11(uint32_t width, uint32_t height, -+ uint32_t display_width, uint32_t display_height, -+ uint32_t flags, char *title) -+{ -+ Colormap cmap; -+ XVisualInfo visualInfo; -+ XVisualInfo *vi; -+ XSetWindowAttributes xswa; -+ unsigned long xswa_mask; -+ XWindowAttributes wattr; -+ int depth; -+ -+#ifdef CONFIG_GUI -+ if (use_gui) -+ guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize our window -+ else -+#endif -+ { -+#ifdef CONFIG_XF86VM -+ if (flags & VOFLAG_MODESWITCHING) -+ vo_vm_switch(); -+#endif -+ XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &wattr); -+ depth = wattr.depth; -+ if (depth != 15 && depth != 16 && depth != 24 && depth != 32) -+ depth = 24; -+ XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &visualInfo); -+ -+#if CONFIG_GL -+ if (gl_enabled) { -+ vi = glXChooseVisual(mDisplay, mScreen, gl_visual_attr); -+ if (!vi) -+ return -1; -+ cmap = XCreateColormap(mDisplay, mRootWin, vi->visual, AllocNone); -+ if (cmap == None) -+ return -1; -+ } -+ else -+#endif -+ { -+ vi = &visualInfo; -+ XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, vi); -+ cmap = CopyFromParent; -+ } -+ -+ vo_x11_create_vo_window(vi, -+ vo_dx, vo_dy, display_width, display_height, -+ flags, cmap, "vaapi", title); -+ -+ if (vi != &visualInfo) -+ XFree(vi); -+ -+ xswa_mask = CWBorderPixel | CWBackPixel; -+ xswa.border_pixel = 0; -+ xswa.background_pixel = 0; -+ XChangeWindowAttributes(mDisplay, vo_window, xswa_mask, &xswa); -+ -+#ifdef CONFIG_XF86VM -+ if (flags & VOFLAG_MODESWITCHING) { -+ /* Grab the mouse pointer in our window */ -+ if (vo_grabpointer) -+ XGrabPointer(mDisplay, vo_window, True, 0, -+ GrabModeAsync, GrabModeAsync, -+ vo_window, None, CurrentTime); -+ XSetInputFocus(mDisplay, vo_window, RevertToNone, CurrentTime); -+ } -+#endif -+ } -+ return 0; -+} -+ -+#if CONFIG_GL -+static GLXFBConfig *get_fbconfig_for_depth(int depth) -+{ -+ GLXFBConfig *fbconfigs, *ret = NULL; -+ int n_elements, i, found; -+ int db, stencil, alpha, mipmap, rgba, value; -+ -+ static GLXFBConfig *cached_config = NULL; -+ static int have_cached_config = 0; -+ -+ if (have_cached_config) -+ return cached_config; -+ -+ fbconfigs = glXGetFBConfigs(mDisplay, mScreen, &n_elements); -+ -+ db = SHRT_MAX; -+ stencil = SHRT_MAX; -+ mipmap = 0; -+ rgba = 0; -+ -+ found = n_elements; -+ -+ for (i = 0; i < n_elements; i++) { -+ XVisualInfo *vi; -+ int visual_depth; -+ -+ vi = glXGetVisualFromFBConfig(mDisplay, fbconfigs[i]); -+ if (!vi) -+ continue; -+ -+ visual_depth = vi->depth; -+ XFree(vi); -+ -+ if (visual_depth != depth) -+ continue; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_ALPHA_SIZE, &alpha); -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_BUFFER_SIZE, &value); -+ if (value != depth && (value - alpha) != depth) -+ continue; -+ -+ value = 0; -+ if (depth == 32) { -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], -+ GLX_BIND_TO_TEXTURE_RGBA_EXT, &value); -+ if (value) -+ rgba = 1; -+ } -+ -+ if (!value) { -+ if (rgba) -+ continue; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], -+ GLX_BIND_TO_TEXTURE_RGB_EXT, &value); -+ if (!value) -+ continue; -+ } -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_DOUBLEBUFFER, &value); -+ if (value > db) -+ continue; -+ db = value; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_STENCIL_SIZE, &value); -+ if (value > stencil) -+ continue; -+ stencil = value; -+ -+ found = i; -+ } -+ -+ if (found != n_elements) { -+ ret = malloc(sizeof(*ret)); -+ *ret = fbconfigs[found]; -+ } -+ -+ if (n_elements) -+ XFree(fbconfigs); -+ -+ have_cached_config = 1; -+ cached_config = ret; -+ return ret; -+} -+ -+static int config_tfp(unsigned int width, unsigned int height) -+{ -+ GLXFBConfig *fbconfig; -+ int attribs[7], i = 0; -+ const int depth = 24; -+ -+ if (!mpglXBindTexImage || !mpglXReleaseTexImage) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] No GLX texture-from-pixmap extension available\n"); -+ return -1; -+ } -+ -+ if (depth != 24 && depth != 32) -+ return -1; -+ -+ g_image_pixmap = XCreatePixmap(mDisplay, vo_window, width, height, depth); -+ if (!g_image_pixmap) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not create X11 pixmap\n"); -+ return -1; -+ } -+ -+ fbconfig = get_fbconfig_for_depth(depth); -+ if (!fbconfig) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not find an FBConfig for 32-bit pixmap\n"); -+ return -1; -+ } -+ -+ attribs[i++] = GLX_TEXTURE_TARGET_EXT; -+ attribs[i++] = GLX_TEXTURE_2D_EXT; -+ attribs[i++] = GLX_TEXTURE_FORMAT_EXT; -+ if (depth == 24) -+ attribs[i++] = GLX_TEXTURE_FORMAT_RGB_EXT; -+ else if (depth == 32) -+ attribs[i++] = GLX_TEXTURE_FORMAT_RGBA_EXT; -+ attribs[i++] = GLX_MIPMAP_TEXTURE_EXT; -+ attribs[i++] = GL_FALSE; -+ attribs[i++] = None; -+ -+ x11_trap_errors(); -+ gl_pixmap = mpglXCreatePixmap(mDisplay, *fbconfig, g_image_pixmap, attribs); -+ XSync(mDisplay, False); -+ if (x11_untrap_errors()) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not create GLX pixmap\n"); -+ return -1; -+ } -+ return 0; -+} -+ -+static int config_glx(unsigned int width, unsigned int height) -+{ -+ if (gl_context.setGlWindow(&gl_context) == SET_WINDOW_FAILED) -+ return -1; -+ -+ glDisable(GL_DEPTH_TEST); -+ glDepthMask(GL_FALSE); -+ glDisable(GL_CULL_FACE); -+ glEnable(GL_TEXTURE_2D); -+ glDrawBuffer(vo_doublebuffering ? GL_BACK : GL_FRONT); -+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -+ glEnable(GL_BLEND); -+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -+ -+ /* Create TFP resources */ -+ if (gl_use_tfp && config_tfp(width, height) == 0) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using GLX texture-from-pixmap extension\n"); -+ else -+ gl_use_tfp = 0; -+ -+ /* Create OpenGL texture */ -+ /* XXX: assume GL_ARB_texture_non_power_of_two is available */ -+ glEnable(GL_TEXTURE_2D); -+ glGenTextures(1, &gl_texture); -+ mpglBindTexture(GL_TEXTURE_2D, gl_texture); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -+ if (!gl_use_tfp) { -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4); -+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, -+ GL_BGRA, GL_UNSIGNED_BYTE, NULL); -+ } -+ mpglBindTexture(GL_TEXTURE_2D, 0); -+ glDisable(GL_TEXTURE_2D); -+ -+ glClearColor(0.0, 0.0, 0.0, 1.0); -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ if (gl_build_font() < 0) -+ return -1; -+ return 0; -+} -+#endif -+ -+#if CONFIG_XRENDER -+static XRenderPictFormat *get_xrender_argb32_format(void) -+{ -+ static XRenderPictFormat *pictformat = NULL; -+ XRenderPictFormat templ; -+ -+ const unsigned long mask = -+ PictFormatType | -+ PictFormatDepth | -+ PictFormatRed | -+ PictFormatRedMask | -+ PictFormatGreen | -+ PictFormatGreenMask | -+ PictFormatBlue | -+ PictFormatBlueMask | -+ PictFormatAlphaMask; -+ -+ if (pictformat) -+ return pictformat; -+ -+ /* First, look for a 32-bit format which ignores the alpha component */ -+ templ.depth = 32; -+ templ.type = PictTypeDirect; -+ templ.direct.red = 16; -+ templ.direct.green = 8; -+ templ.direct.blue = 0; -+ templ.direct.redMask = 0xff; -+ templ.direct.greenMask = 0xff; -+ templ.direct.blueMask = 0xff; -+ templ.direct.alphaMask = 0; -+ -+ pictformat = XRenderFindFormat(mDisplay, mask, &templ, 0); -+ -+ if (!pictformat) { -+ /* Not all X servers support xRGB32 formats. However, the -+ * XRENDER spec says that they must support an ARGB32 format, -+ * so we can always return that. -+ */ -+ pictformat = XRenderFindStandardFormat(mDisplay, PictStandardARGB32); -+ if (!pictformat) -+ mp_msg(MSGT_VO, MSGL_ERR, "XRENDER ARGB32 format not supported\n"); -+ } -+ return pictformat; -+} -+ -+static int create_xrender_specific(void) -+{ -+ XRenderPictFormat *pictformat; -+ -+ if (g_output_rect.width == 0 && g_output_rect.height == 0) -+ return 0; -+ -+ g_image_pixmap = XCreatePixmap(mDisplay, vo_window, g_output_rect.width, -+ g_output_rect.height, 32); -+ if (!g_image_pixmap) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create video pixmap\n"); -+ return -1; -+ } -+ -+ pictformat = get_xrender_argb32_format(); -+ if (!pictformat) -+ return -1; -+ xr_video_picture = XRenderCreatePicture(mDisplay, g_image_pixmap, -+ pictformat, 0, NULL); -+ if (!xr_video_picture) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create XRENDER backing picture for Pixmap\n"); -+ return -1; -+ } -+ return 0; -+} -+ -+static void free_xrender_specific(void) -+{ -+ if (xr_video_picture) { -+ XRenderFreePicture(mDisplay, xr_video_picture); -+ xr_video_picture = None; -+ } -+ -+ if (g_image_pixmap) { -+ XFreePixmap(mDisplay, g_image_pixmap); -+ g_image_pixmap = None; -+ } -+} -+ -+static int reset_xrender_specific(void) -+{ -+ free_xrender_specific(); -+ return create_xrender_specific(); -+} -+ -+/* XXX: create a Pixmap as large as the display rect */ -+static int config_xrender(unsigned int width, unsigned int height) -+{ -+ XWindowAttributes wattr; -+ XRenderPictFormat *pictformat; -+ -+ XGetWindowAttributes(mDisplay, vo_window, &wattr); -+ pictformat = XRenderFindVisualFormat(mDisplay, wattr.visual); -+ if (!pictformat) { -+ mp_msg(MSGT_VO, MSGL_ERR, "XRENDER does not support Window visual\n"); -+ return -1; -+ } -+ -+ xr_window_picture = XRenderCreatePicture(mDisplay, vo_window, pictformat, -+ 0, NULL); -+ if (!xr_window_picture) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create XRENDER backing picture for Window\n"); -+ return -1; -+ } -+ return reset_xrender_specific(); -+} -+#endif -+ -+static int config_vaapi(uint32_t width, uint32_t height, uint32_t format) -+{ -+ VAConfigAttrib attrib; -+ VAStatus status; -+ int i, j, profile, entrypoint, max_entrypoints, num_surfaces; -+ -+ /* Create video surfaces */ -+ if (!IMGFMT_IS_VAAPI(format)) -+ num_surfaces = MAX_OUTPUT_SURFACES; -+ else { -+ switch (IMGFMT_VAAPI_CODEC(format)) { -+ case IMGFMT_VAAPI_CODEC_MPEG2: -+ num_surfaces = NUM_VIDEO_SURFACES_MPEG2; -+ break; -+ case IMGFMT_VAAPI_CODEC_MPEG4: -+ num_surfaces = NUM_VIDEO_SURFACES_MPEG4; -+ break; -+ case IMGFMT_VAAPI_CODEC_H264: -+ num_surfaces = NUM_VIDEO_SURFACES_H264; -+ break; -+ case IMGFMT_VAAPI_CODEC_VC1: -+ num_surfaces = NUM_VIDEO_SURFACES_VC1; -+ break; -+ default: -+ num_surfaces = 0; -+ break; -+ } -+ if (num_surfaces == 0) -+ return -1; -+ if (!is_direct_mapping()) -+ num_surfaces = FFMIN(2 * num_surfaces, MAX_VIDEO_SURFACES); -+ } -+ for (i = 0; i < num_surfaces; i++) { -+ struct vaapi_surface *surface; -+ surface = alloc_vaapi_surface(width, height, VA_RT_FORMAT_YUV420); -+ if (!surface) -+ return -1; -+ } -+ assert(va_num_surfaces == num_surfaces); -+ -+#if CONFIG_VAAPI_GLX -+ /* Create GLX surfaces */ -+ if (gl_enabled && !gl_use_tfp) { -+ status = vaCreateSurfaceGLX(va_context->display, -+ GL_TEXTURE_2D, gl_texture, -+ &gl_surface); -+ if (!check_status(status, "vaCreateSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ -+ /* Create OSD data */ -+ va_osd_draw_alpha = NULL; -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_osd_image.buf = VA_INVALID_ID; -+ va_osd_subpicture = VA_INVALID_ID; -+ ensure_osd(); -+ -+ /* Create EOSD data */ -+ va_eosd_draw_alpha = NULL; -+ va_eosd_image.image_id = VA_INVALID_ID; -+ va_eosd_image.buf = VA_INVALID_ID; -+ va_eosd_subpicture = VA_INVALID_ID; -+ for (i = 0; va_eosd_info[i].format; i++) { -+ for (j = 0; j < va_num_subpic_formats; j++) -+ if (va_subpic_formats[j].fourcc == va_eosd_info[i].format) -+ break; -+ if (j < va_num_subpic_formats && -+ vaCreateImage(va_context->display, &va_subpic_formats[j], -+ width, height, &va_eosd_image) == VA_STATUS_SUCCESS) -+ break; -+ } -+ if (va_eosd_info[i].format && -+ vaCreateSubpicture(va_context->display, va_eosd_image.image_id, -+ &va_eosd_subpicture) == VA_STATUS_SUCCESS) { -+ va_eosd_draw_alpha = va_eosd_info[i].draw_alpha; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using %s surface for EOSD\n", -+ string_of_VAImageFormat(&va_eosd_image.format)); -+ } -+ -+ /* Allocate VA images */ -+ if (!IMGFMT_IS_VAAPI(format)) { -+ VAImageFormat *image_format = VAImageFormat_from_imgfmt(format); -+ if (!image_format) -+ return -1; -+ for (i = 0; i < va_num_surfaces; i++) { -+ struct vaapi_surface * const s = va_free_surfaces[i]; -+ s->is_bound = 0; -+ status = vaDeriveImage(va_context->display, s->id, &s->image); -+ if (status == VA_STATUS_SUCCESS) { -+ /* vaDeriveImage() is supported, check format */ -+ if (s->image.format.fourcc != image_format->fourcc) { -+ vaDestroyImage(va_context->display, s->image.image_id); -+ return -1; -+ } -+ if (s->image.width == width && s->image.height == height) { -+ s->is_bound = 1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using vaDeriveImage()\n"); -+ } -+ else { -+ vaDestroyImage(va_context->display, s->image.image_id); -+ status = VA_STATUS_ERROR_OPERATION_FAILED; -+ } -+ -+ } -+ if (status != VA_STATUS_SUCCESS) { -+ status = vaCreateImage(va_context->display, image_format, -+ width, height, &s->image); -+ if (!check_status(status, "vaCreateImage()")) -+ return -1; -+ } -+ } -+ return 0; -+ } -+ -+ /* Check profile */ -+ profile = VAProfile_from_imgfmt(format); -+ if (profile < 0) -+ return -1; -+ -+ /* Check entry-point (only VLD for now) */ -+ max_entrypoints = vaMaxNumEntrypoints(va_context->display); -+ va_entrypoints = calloc(max_entrypoints, sizeof(*va_entrypoints)); -+ if (!va_entrypoints) -+ return -1; -+ -+ status = vaQueryConfigEntrypoints(va_context->display, profile, -+ va_entrypoints, &va_num_entrypoints); -+ if (!check_status(status, "vaQueryConfigEntrypoints()")) -+ return -1; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] config_vaapi(%s): %d entrypoints available\n", -+ string_of_VAProfile(profile), va_num_entrypoints); -+ for (i = 0; i < va_num_entrypoints; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAEntrypoint(va_entrypoints[i])); -+ -+ entrypoint = VAEntrypoint_from_imgfmt(format); -+ if (entrypoint != VAEntrypointVLD) -+ return -1; -+ -+ /* Check chroma format (only 4:2:0 for now) */ -+ attrib.type = VAConfigAttribRTFormat; -+ status = vaGetConfigAttributes(va_context->display, profile, entrypoint, &attrib, 1); -+ if (!check_status(status, "vaGetConfigAttributes()")) -+ return -1; -+ if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) -+ return -1; -+ -+ /* Create a configuration for the decode pipeline */ -+ status = vaCreateConfig(va_context->display, profile, entrypoint, &attrib, 1, &va_context->config_id); -+ if (!check_status(status, "vaCreateConfig()")) -+ return -1; -+ -+ /* Create a context for the decode pipeline */ -+ status = vaCreateContext(va_context->display, va_context->config_id, -+ width, height, VA_PROGRESSIVE, -+ va_surface_ids, va_num_surfaces, -+ &va_context->context_id); -+ if (!check_status(status, "vaCreateContext()")) -+ return -1; -+ return 0; -+} -+ -+static int config(uint32_t width, uint32_t height, -+ uint32_t display_width, uint32_t display_height, -+ uint32_t flags, char *title, uint32_t format) -+{ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] config(): size %dx%d, display size %dx%d, flags %x, title '%s', format %x (%s)\n", -+ width, height, display_width, display_height, flags, title, format, vo_format_name(format)); -+ -+ free_video_specific(); -+ -+ if (config_x11(width, height, display_width, display_height, flags, title) < 0) -+ return -1; -+ -+#if CONFIG_GL -+ if (gl_enabled && config_glx(width, height) < 0) -+ return -1; -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_enabled && config_xrender(width, height) < 0) -+ return -1; -+#endif -+ -+ if (config_vaapi(width, height, format) < 0) -+ return -1; -+ -+ g_is_visible = 0; -+ g_is_paused = 0; -+ g_image_width = width; -+ g_image_height = height; -+ g_image_format = format; -+ resize(); -+ return 0; -+} -+ -+static int query_format(uint32_t format) -+{ -+ const int default_caps = (VFCAP_CSP_SUPPORTED | -+ VFCAP_CSP_SUPPORTED_BY_HW | -+ VFCAP_HWSCALE_UP | -+ VFCAP_HWSCALE_DOWN | -+ VFCAP_OSD | -+ VFCAP_EOSD); -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] query_format(): format %x (%s)\n", -+ format, vo_format_name(format)); -+ -+ switch (format) { -+ case IMGFMT_VAAPI_MPEG2: -+ case IMGFMT_VAAPI_MPEG4: -+ case IMGFMT_VAAPI_H263: -+ case IMGFMT_VAAPI_H264: -+ case IMGFMT_VAAPI_WMV3: -+ case IMGFMT_VAAPI_VC1: -+ return default_caps | VOCAP_NOSLICES; -+ case IMGFMT_NV12: -+ case IMGFMT_YV12: -+ case IMGFMT_I420: -+ case IMGFMT_IYUV: -+ if (VAImageFormat_from_imgfmt(format)) -+ return default_caps; -+ break; -+ } -+ return 0; -+} -+ -+static inline int get_field_flags(int i) -+{ -+ return (g_deint && (g_image_fields & MP_IMGFIELD_INTERLACED) ? -+ (((!!(g_image_fields & MP_IMGFIELD_TOP_FIRST)) ^ i) == 0 ? -+ VA_BOTTOM_FIELD : VA_TOP_FIELD) : VA_FRAME_PICTURE); -+} -+ -+static inline int get_colorspace_flags(void) -+{ -+ int csp = 0; -+#if USE_VAAPI_COLORSPACE -+ switch (g_colorspace) { -+ case 0: -+ csp = ((g_image_width >= 1280 || g_image_height > 576) ? -+ VA_SRC_BT709 : VA_SRC_BT601); -+ break; -+ case 1: -+ csp = VA_SRC_BT601; -+ break; -+ case 2: -+ csp = VA_SRC_BT709; -+ break; -+ default: -+ assert(0); -+ break; -+ } -+#endif -+ return csp; -+} -+ -+static void put_surface_x11(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ vo_window, -+ 0, 0, g_image_width, g_image_height, -+ g_output_rect.left, -+ g_output_rect.top, -+ g_output_rect.width, -+ g_output_rect.height, -+ NULL, 0, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ } -+} -+ -+#if CONFIG_GL -+static void put_surface_glx(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ if (gl_use_tfp) { -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ g_image_pixmap, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_image_width, g_image_height, -+ NULL, 0, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ } -+ g_output_surfaces[g_output_surface] = surface; -+ return; -+ } -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_binding) { -+#if USE_VAAPI_GLX_BIND -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaAssociateSurfaceGLX(va_context->display, -+ gl_surface, -+ surface->id, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaAssociateSurfaceGLX()")) -+ return; -+ } -+#else -+ mp_msg(MSGT_VO, MSGL_WARN, "vaAssociateSurfaceGLX() is not implemented\n"); -+ gl_binding = 0; -+#endif -+ } -+ -+ if (!gl_binding) { -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaCopySurfaceGLX(va_context->display, -+ gl_surface, -+ surface->id, -+ get_field_flags(i) | get_colorspace_flags()); -+ -+ if (status == VA_STATUS_ERROR_UNIMPLEMENTED) { -+ mp_msg(MSGT_VO, MSGL_WARN, -+ "[vo_vaapi] vaCopySurfaceGLX() is not implemented\n"); -+ gl_binding = 1; -+ } -+ else { -+ if (!check_status(status, "vaCopySurfaceGLX()")) -+ return; -+ } -+ } -+ } -+#endif -+ g_output_surfaces[g_output_surface] = surface; -+} -+ -+static int glx_bind_texture(void) -+{ -+ glEnable(GL_TEXTURE_2D); -+ mpglBindTexture(GL_TEXTURE_2D, gl_texture); -+ -+ if (gl_use_tfp) { -+ x11_trap_errors(); -+ mpglXBindTexImage(mDisplay, gl_pixmap, GLX_FRONT_LEFT_EXT, NULL); -+ XSync(mDisplay, False); -+ if (x11_untrap_errors()) -+ mp_msg(MSGT_VO, MSGL_WARN, "[vo_vaapi] Update bind_tex_image failed\n"); -+ } -+ -+#if USE_VAAPI_GLX_BIND -+ if (gl_binding) { -+ VAStatus status; -+ status = vaBeginRenderSurfaceGLX(va_context->display, gl_surface); -+ if (!check_status(status, "vaBeginRenderSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ return 0; -+} -+ -+static int glx_unbind_texture(void) -+{ -+ if (gl_use_tfp) { -+ x11_trap_errors(); -+ mpglXReleaseTexImage(mDisplay, gl_pixmap, GLX_FRONT_LEFT_EXT); -+ if (x11_untrap_errors()) -+ mp_msg(MSGT_VO, MSGL_WARN, "[vo_vaapi] Failed to release?\n"); -+ } -+ -+#if USE_VAAPI_GLX_BIND -+ if (gl_binding) { -+ VAStatus status; -+ status = vaEndRenderSurfaceGLX(va_context->display, gl_surface); -+ if (!check_status(status, "vaEndRenderSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ -+ mpglBindTexture(GL_TEXTURE_2D, 0); -+ glDisable(GL_TEXTURE_2D); -+ return 0; -+} -+ -+static void render_background(void) -+{ -+ /* Original code from Mirco Muller (MacSlow): -+ */ -+ GLfloat fStartX = 0.0f; -+ GLfloat fStartY = 0.0f; -+ GLfloat fWidth = (GLfloat)vo_dwidth; -+ GLfloat fHeight = (GLfloat)vo_dheight; -+ -+ glBegin(GL_QUADS); -+ { -+ /* top third, darker grey to white */ -+ glColor3f(0.85f, 0.85f, 0.85f); -+ glVertex3f(fStartX, fStartY, 0.0f); -+ glColor3f(0.85f, 0.85f, 0.85f); -+ glVertex3f(fStartX + fWidth, fStartY, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight / 3.0f, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + fHeight / 3.0f, 0.0f); -+ -+ /* middle third, just plain white */ -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX + fWidth, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ -+ /* bottom third, white to lighter grey */ -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX + fWidth, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glColor3f(0.62f, 0.66f, 0.69f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight, 0.0f); -+ glColor3f(0.62f, 0.66f, 0.69f); -+ glVertex3f(fStartX, fStartY + fHeight, 0.0f); -+ } -+ glEnd(); -+} -+ -+static void render_frame(void) -+{ -+ struct vo_rect * const r = &g_output_rect; -+ -+ if (glx_bind_texture() < 0) -+ return; -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glBegin(GL_QUADS); -+ { -+ glTexCoord2f(0.0f, 0.0f); glVertex2i(r->left, r->top); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(r->left, r->bottom); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(r->right, r->bottom); -+ glTexCoord2f(1.0f, 0.0f); glVertex2i(r->right, r->top); -+ } -+ glEnd(); -+ if (glx_unbind_texture() < 0) -+ return; -+} -+ -+static void render_reflection(void) -+{ -+ struct vo_rect * const r = &g_output_rect; -+ const unsigned int rh = g_output_rect.height / 5; -+ GLfloat ry = 1.0f - (GLfloat)rh / (GLfloat)r->height; -+ -+ if (glx_bind_texture() < 0) -+ return; -+ glBegin(GL_QUADS); -+ { -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(r->left, r->top); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(r->right, r->top); -+ -+ glColor4f(1.0f, 1.0f, 1.0f, 0.0f); -+ glTexCoord2f(1.0f, ry); glVertex2i(r->right, r->top + rh); -+ glTexCoord2f(0.0f, ry); glVertex2i(r->left, r->top + rh); -+ } -+ glEnd(); -+ if (glx_unbind_texture() < 0) -+ return; -+} -+ -+static void flip_page_glx(void) -+{ -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ if (gl_reflect) { -+ render_background(); -+ -+ glPushMatrix(); -+ glRotatef(20.0f, 0.0f, 1.0f, 0.0f); -+ glTranslatef(50.0f, 0.0f, 0.0f); -+ } -+ -+ render_frame(); -+ -+ if (gl_reflect) { -+ glPushMatrix(); -+ glTranslatef(0.0, (GLfloat)g_output_rect.height + 5.0f, 0.0f); -+ render_reflection(); -+ glPopMatrix(); -+ glPopMatrix(); -+ } -+ -+ if (cpu_stats) { -+ gl_draw_rectangle(0, 0, vo_dwidth, 32, 0x000000ff); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glRasterPos2i(16, 20); -+ gl_printf("MPlayer: %.1f%% of CPU @ %u MHz", cpu_usage, cpu_frequency); -+ } -+ -+ if (gl_finish) -+ mpglFinish(); -+ gl_context.swapGlBuffers(&gl_context); -+ -+ if (vo_fs) /* avoid flickering borders in fullscreen mode */ -+ glClear(GL_COLOR_BUFFER_BIT); -+} -+#endif -+ -+#if CONFIG_XRENDER -+static void put_surface_xrender(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ g_image_pixmap, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_output_rect.width, g_output_rect.height, -+ NULL, 0, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ XRenderComposite(mDisplay, -+ PictOpSrc, xr_video_picture, 0, xr_window_picture, -+ 0, 0, -+ 0, 0, -+ g_output_rect.left, g_output_rect.top, -+ g_output_rect.width, g_output_rect.height); -+ } -+} -+#endif -+ -+static void put_surface(struct vaapi_surface *surface) -+{ -+ if (!surface || surface->id == VA_INVALID_SURFACE) -+ return; -+ -+#if CONFIG_GL -+ if (gl_enabled) -+ put_surface_glx(surface); -+ else -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ put_surface_xrender(surface); -+ else -+#endif -+ put_surface_x11(surface); -+} -+ -+static int draw_slice(uint8_t * image[], int stride[], -+ int w, int h, int x, int y) -+{ -+ struct vaapi_surface * const surface = va_free_surfaces[g_output_surface]; -+ VAImage * const va_image = &surface->image; -+ VAStatus status; -+ uint8_t *image_data = NULL; -+ uint8_t *dst[3] = { 0, }; -+ unsigned int dst_stride[3]; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] draw_slice(): location (%d,%d), size %dx%d\n", x, y, w, h); -+ -+ status = vaMapBuffer(va_context->display, va_image->buf, -+ (void *)&image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return VO_FALSE; -+ -+ dst_stride[0] = va_image->pitches[0]; -+ dst[0] = image_data + va_image->offsets[0] + y * dst_stride[0] + x; -+ -+ memcpy_pic(dst[0], image[0], w, h, dst_stride[0], stride[0]); -+ -+ x /= 2; -+ y /= 2; -+ w /= 2; -+ h /= 2; -+ -+ if (g_image_format == IMGFMT_YV12) { -+ /* MPlayer's YV12 is actually I420, so swap U/V components */ -+ dst_stride[1] = va_image->pitches[2]; -+ dst[1] = image_data + va_image->offsets[2] + y * dst_stride[1] + x; -+ dst_stride[2] = va_image->pitches[1]; -+ dst[2] = image_data + va_image->offsets[1] + y * dst_stride[2] + x; -+ } -+ else { -+ if (image[1]) { -+ dst_stride[1] = va_image->pitches[1]; -+ dst[1] = image_data + va_image->offsets[1] + y * dst_stride[1] + x; -+ } -+ if (image[2]) { -+ dst_stride[2] = va_image->pitches[2]; -+ dst[2] = image_data + va_image->offsets[2] + y * dst_stride[2] + x; -+ } -+ } -+ -+ if (image[1]) /* RGBA only has a single plane */ -+ memcpy_pic(dst[1], image[1], w, h, dst_stride[1], stride[1]); -+ -+ if (image[2]) /* NV12 only has two planes */ -+ memcpy_pic(dst[2], image[2], w, h, dst_stride[2], stride[2]); -+ -+ status = vaUnmapBuffer(va_context->display, surface->image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return VO_FALSE; -+ -+ return VO_TRUE; -+} -+ -+static int draw_frame(uint8_t * src[]) -+{ -+ mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_X11_DrawFrameCalled); -+ -+ return -1; -+} -+ -+static void draw_osd(void) -+{ -+ VAStatus status; -+ const int osd_width = va_osd_image.width; -+ const int osd_height = va_osd_image.height; -+ -+ ensure_osd(); -+ if (va_osd_image.image_id == VA_INVALID_ID) -+ return; -+ -+ if (!va_osd_draw_alpha) -+ return; -+ -+ if (!vo_update_osd(osd_width, osd_height)) -+ return; -+ -+ if (!vo_osd_check_range_update(0, 0, osd_width, osd_height)) { -+ disable_osd(); -+ return; -+ } -+ -+ status = vaMapBuffer(va_context->display, va_osd_image.buf, -+ (void *)&va_osd_image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return; -+ -+ memset(va_osd_image_data, 0, va_osd_image.data_size); -+ -+ vo_draw_text(osd_width, osd_height, va_osd_draw_alpha); -+ -+ status = vaUnmapBuffer(va_context->display, va_osd_image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return; -+ va_osd_image_data = NULL; -+ -+ enable_osd(); -+} -+ -+static void draw_eosd(EOSD_ImageList *imgs) -+{ -+ ASS_Image *img = imgs->imgs; -+ ASS_Image *i; -+ VAStatus status; -+ -+ if (!va_eosd_draw_alpha) -+ return; -+ -+ // Nothing changed, no need to redraw -+ if (imgs->changed == 0) -+ return; -+ -+ // There's nothing to render! -+ if (!img) { -+ disable_eosd(); -+ return; -+ } -+ -+ if (imgs->changed == 1) -+ goto eosd_skip_upload; -+ -+ status = vaMapBuffer(va_context->display, va_eosd_image.buf, -+ (void *)&va_eosd_image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return; -+ -+ memset(va_eosd_image_data, 0, va_eosd_image.data_size); -+ -+ for (i = img; i; i = i->next) -+ va_eosd_draw_alpha(i->bitmap, i->w, i->h, i->stride, -+ i->dst_x, i->dst_y, i->color); -+ -+ status = vaUnmapBuffer(va_context->display, va_eosd_image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return; -+ va_eosd_image_data = NULL; -+ -+eosd_skip_upload: -+ enable_eosd(); -+} -+ -+static void flip_page(void) -+{ -+ struct vaapi_surface *surface; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] flip_page()\n"); -+ -+ surface = g_output_surfaces[g_output_surface]; -+ if (!surface) -+ return; -+ -+ put_surface(surface); -+ g_output_surface = (g_output_surface + 1) % MAX_OUTPUT_SURFACES; -+ g_is_visible = 1; -+ -+#if CONFIG_GL -+ if (gl_enabled) -+ flip_page_glx(); -+#endif -+} -+ -+static struct vaapi_surface *get_surface(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface; -+ -+ if (mpi->type == MP_IMGTYPE_NUMBERED && is_direct_mapping()) { -+ assert(mpi->number < va_num_surfaces); -+ surface = va_free_surfaces[mpi->number]; -+ return surface; -+ } -+ -+ /* Push current surface to a free slot */ -+ if (mpi->priv) { -+ assert(!va_free_surfaces[va_free_surfaces_tail_index]); -+ va_free_surfaces[va_free_surfaces_tail_index] = mpi->priv; -+ va_free_surfaces_tail_index = (va_free_surfaces_tail_index + 1) % va_num_surfaces; -+ } -+ -+ /* Pop the least recently used free surface */ -+ assert(va_free_surfaces[va_free_surfaces_head_index]); -+ surface = va_free_surfaces[va_free_surfaces_head_index]; -+ va_free_surfaces[va_free_surfaces_head_index] = NULL; -+ va_free_surfaces_head_index = (va_free_surfaces_head_index + 1) % va_num_surfaces; -+ return surface; -+} -+ -+static uint32_t get_image(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface; -+ -+ if (mpi->type != MP_IMGTYPE_NUMBERED) -+ return VO_FALSE; -+ -+ if (!IMGFMT_IS_VAAPI(g_image_format)) -+ return VO_FALSE; -+ -+ surface = get_surface(mpi); -+ if (!surface) -+ return VO_FALSE; -+ -+ mpi->flags |= MP_IMGFLAG_DIRECT; -+ mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = mpi->stride[3] = 0; -+ mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = mpi->planes[3] = NULL; -+ mpi->planes[0] = (char *)surface; -+ mpi->planes[3] = (char *)(uintptr_t)surface->id; -+ mpi->num_planes = 1; -+ mpi->priv = surface; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] get_image(): surface 0x%08x\n", surface->id); -+ -+ return VO_TRUE; -+} -+ -+static int put_image(mp_image_t *mpi, struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ -+ if ((mpi->flags & (MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV)) != (MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV)) -+ return VO_FALSE; -+ -+ if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { -+ if (!draw_slice(mpi->planes, mpi->stride, mpi->w, mpi->h, 0, 0)) -+ return VO_FALSE; -+ } -+ -+ if (!surface->is_bound) { -+ status = vaPutImage2(va_context->display, -+ surface->id, -+ surface->image.image_id, -+ mpi->x, mpi->y, mpi->w, mpi->h, -+ mpi->x, mpi->y, mpi->w, mpi->h); -+ if (!check_status(status, "vaPutImage()")) -+ return VO_FALSE; -+ } -+ -+ return VO_TRUE; -+} -+ -+static uint32_t draw_image(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface = (struct vaapi_surface *)mpi->priv; -+ -+ g_image_fields = mpi->fields; -+ -+ if (!IMGFMT_IS_VAAPI(mpi->imgfmt)) { -+ /* XXX: no direct rendering in non-accelerated mode */ -+ surface = va_free_surfaces[g_output_surface]; -+ if (!put_image(mpi, surface)) -+ return VO_FALSE; -+ } -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] draw_image(): surface 0x%08x\n", surface->id); -+ -+ g_output_surfaces[g_output_surface] = surface; -+ -+ if (cpu_stats) { -+ static uint64_t ticks; -+ if ((ticks++ % 30) == 0) { -+ cpu_frequency = get_cpu_frequency(); -+ cpu_usage = get_cpu_usage(CPU_USAGE_QUANTUM); -+ } -+ } -+ return VO_TRUE; -+} -+ -+static void check_events(void) -+{ -+ int events = vo_x11_check_events(mDisplay); -+ -+ if (events & VO_EVENT_RESIZE) -+ resize(); -+ -+ if ((events & (VO_EVENT_EXPOSE|VO_EVENT_RESIZE)) && g_is_paused) { -+ /* Redraw the last visible buffer */ -+ if (g_is_visible) { -+ struct vaapi_surface *surface = g_output_surfaces[g_output_surface]; -+ if (surface) -+ put_surface(surface); -+ } -+ } -+} -+ -+static VADisplayAttribute *get_display_attribute(const char *name) -+{ -+ VADisplayAttribute *attr; -+ if (!strcasecmp(name, "brightness")) -+ attr = &va_equalizer.brightness; -+ else if (!strcasecmp(name, "contrast")) -+ attr = &va_equalizer.contrast; -+ else if (!strcasecmp(name, "saturation")) -+ attr = &va_equalizer.saturation; -+ else if (!strcasecmp(name, "hue")) -+ attr = &va_equalizer.hue; -+ else -+ attr = NULL; -+ return attr; -+} -+ -+static int get_equalizer(const char *name, int *value) -+{ -+ VADisplayAttribute * const attr = get_display_attribute(name); -+ int r; -+ -+ if (!attr || !(attr->flags & VA_DISPLAY_ATTRIB_GETTABLE)) -+ return VO_NOTIMPL; -+ -+ /* normalize to -100 .. 100 range */ -+ r = attr->max_value - attr->min_value; -+ if (r == 0) -+ return VO_NOTIMPL; -+ *value = ((attr->value - attr->min_value) * 200) / r - 100; -+ return VO_TRUE; -+} -+ -+static int set_equalizer(const char *name, int value) -+{ -+ VADisplayAttribute * const attr = get_display_attribute(name); -+ VAStatus status; -+ int r; -+ -+ if (!attr || !(attr->flags & VA_DISPLAY_ATTRIB_SETTABLE)) -+ return VO_NOTIMPL; -+ -+ /* normalize to attribute value range */ -+ r = attr->max_value - attr->min_value; -+ if (r == 0) -+ return VO_NOTIMPL; -+ attr->value = ((value + 100) * r) / 200 + attr->min_value; -+ -+ status = vaSetDisplayAttributes(va_context->display, attr, 1); -+ if (!check_status(status, "vaSetDisplayAttributes()")) -+ return VO_FALSE; -+ return VO_TRUE; -+} -+ -+static int control(uint32_t request, void *data, ...) -+{ -+ switch (request) { -+ case VOCTRL_GET_DEINTERLACE: -+ *(int*)data = g_deint; -+ return VO_TRUE; -+ case VOCTRL_SET_DEINTERLACE: -+ g_deint = *(int*)data; -+ if (g_deint) -+ g_deint = g_deint_type; -+ return VO_TRUE; -+ case VOCTRL_PAUSE: -+ return (g_is_paused = 1); -+ case VOCTRL_RESUME: -+ return (g_is_paused = 0); -+ case VOCTRL_QUERY_FORMAT: -+ return query_format(*((uint32_t *)data)); -+ case VOCTRL_GET_IMAGE: -+ return get_image(data); -+ case VOCTRL_DRAW_IMAGE: -+ return draw_image(data); -+ case VOCTRL_GUISUPPORT: -+ return VO_TRUE; -+ case VOCTRL_BORDER: -+ vo_x11_border(); -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_FULLSCREEN: -+ vo_x11_fullscreen(); -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_SET_EQUALIZER: { -+ va_list ap; -+ int value; -+ -+ va_start(ap, data); -+ value = va_arg(ap, int); -+ -+ va_end(ap); -+ return set_equalizer(data, value); -+ } -+ case VOCTRL_GET_EQUALIZER: { -+ va_list ap; -+ int *value; -+ -+ va_start(ap, data); -+ value = va_arg(ap, int *); -+ -+ va_end(ap); -+ return get_equalizer(data, value); -+ } -+ case VOCTRL_ONTOP: -+ vo_x11_ontop(); -+ return VO_TRUE; -+ case VOCTRL_UPDATE_SCREENINFO: -+ update_xinerama_info(); -+ return VO_TRUE; -+ case VOCTRL_GET_PANSCAN: -+ return VO_TRUE; -+ case VOCTRL_SET_PANSCAN: -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_GET_HWACCEL_CONTEXT: -+ *((void **)data) = va_context; -+ return VO_TRUE; -+ case VOCTRL_DRAW_EOSD: -+ if (!data) -+ return VO_FALSE; -+ draw_eosd(data); -+ return VO_TRUE; -+ case VOCTRL_GET_EOSD_RES: { -+ struct mp_eosd_settings *r = data; -+ r->mt = r->mb = r->ml = r->mr = 0; -+ r->srcw = g_image_width; -+ r->srch = g_image_height; -+ r->w = g_image_width; -+ r->h = g_image_height; -+ return VO_TRUE; -+ } -+ } -+ return VO_NOTIMPL; -+} diff --git a/media-video/mplayer/files/vaapi-take2/02-mplayer-vaapi-gma500-workaround.patch b/media-video/mplayer/files/vaapi-take2/02-mplayer-vaapi-gma500-workaround.patch deleted file mode 100644 index 7fba6144c..000000000 --- a/media-video/mplayer/files/vaapi-take2/02-mplayer-vaapi-gma500-workaround.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit 7d70d28f190e37cfa3a9a827877ddd6bb81408d3 -Author: Gwenole Beauchesne -Date: Mon Dec 28 08:52:56 2009 +0000 - - Add GMA500 workaround for H.264 DPB. This is disabled by default. Enable with GMA500_WORKAROUND=yes environment variable. - -diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c -index 9f440c0..0139d64 100644 ---- a/ffmpeg/libavcodec/vaapi_h264.c -+++ b/ffmpeg/libavcodec/vaapi_h264.c -@@ -28,6 +28,60 @@ - * structures for H.264 decoding. - */ - -+/** Parses ENV environment variable expecting "yes" | "no" values. */ -+static int getenv_yesno(const char *env, int *pval) -+{ -+ int val; -+ const char *env_str; -+ -+ env_str = getenv(env); -+ if (!env_str) -+ return -1; -+ -+ if (strcmp(env_str, "1") == 0 || strcmp(env_str, "yes") == 0) -+ val = 1; -+ else if (strcmp(env_str, "0") == 0 || strcmp(env_str, "no") == 0) -+ val = 0; -+ else -+ return -1; -+ -+ if (pval) -+ *pval = val; -+ return 0; -+} -+ -+/** -+ * Use old GMA500 workaround for DPB. It requires other pictures than -+ * those marked as "used for reference". -+ */ -+static int get_use_gma500_workaround(struct vaapi_context *vactx) -+{ -+ int gma500_workaround_env; -+ const char *vendor_string; -+ -+ if (getenv_yesno("GMA500_WORKAROUND", &gma500_workaround_env) < 0) -+ return 0; -+ if (!gma500_workaround_env) -+ return 0; -+ -+ vendor_string = vaQueryVendorString(vactx->display); -+ if (vendor_string && strstr(vendor_string, "Intel")) { -+ if (strstr(vendor_string, "GMA500")) -+ return 1; -+ if (strstr(vendor_string, "Embedded Graphics Driver")) -+ return 1; -+ } -+ return 0; -+} -+ -+static inline int use_gma500_workaround(struct vaapi_context *vactx) -+{ -+ static int gma500_workaround = -1; -+ if (gma500_workaround < 0) -+ gma500_workaround = get_use_gma500_workaround(vactx); -+ return gma500_workaround; -+} -+ - /** - * Initializes an empty VA API picture. - * -@@ -123,6 +177,7 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, - { - DPB dpb; - int i; -+ unsigned int list; - - dpb.size = 0; - dpb.max_size = FF_ARRAY_ELEMS(pic_param->ReferenceFrames); -@@ -130,6 +185,17 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, - for (i = 0; i < dpb.max_size; i++) - init_vaapi_pic(&dpb.va_pics[i]); - -+ if (use_gma500_workaround(h->s.avctx->hwaccel_context)) { -+ /* XXX: this is really wrong */ -+ for (list = 0; list < h->list_count; list++) -+ for (i = 0; i < (int)h->ref_count[list]; i++) { -+ Picture * const pic = &h->ref_list[list][i]; -+ if (pic->reference && dpb_add(&dpb, pic) < 0) -+ return -1; -+ } -+ return 0; -+ } -+ - for (i = 0; i < h->short_ref_count; i++) { - Picture * const pic = h->short_ref[i]; - if (pic && pic->reference && dpb_add(&dpb, pic) < 0) diff --git a/media-video/mplayer/files/vaapi-take2/03-mplayer-vaapi-0.29.patch b/media-video/mplayer/files/vaapi-take2/03-mplayer-vaapi-0.29.patch deleted file mode 100644 index 93f72d2b9..000000000 --- a/media-video/mplayer/files/vaapi-take2/03-mplayer-vaapi-0.29.patch +++ /dev/null @@ -1,675 +0,0 @@ -commit 5fbfa3b77f6b3f55cc61df16533324ebcf8e0b70 -Author: Gwenole Beauchesne -Date: Fri Feb 12 11:03:00 2010 +0000 - - Add compatibility with original VA-API 0.29. - -diff --git a/configure b/configure -index 8011680..f7ce215 100755 ---- a/configure -+++ b/configure -@@ -6167,20 +6167,35 @@ fi #if os2 - echocheck "VA-API" - if test "$_vaapi" = yes -o "$_vaapi" = auto; then - _vaapi=no -+ _vaapi_old=no - cat > $TMPC < - int main(void) { (void) vaGetDisplay(0); return 0; } - EOF -- cc_check -lva-x11 && _vaapi=yes -+ cc_check -lva-x11 && _vaapi=yes || { -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplay(0); return 0; } -+EOF -+ cc_check -lva && _vaapi=yes _vaapi_old=yes -+ } - fi - - if test "$_vaapi" = yes ; then - def_vaapi='#define CONFIG_VAAPI 1' -- libs_mencoder="$libs_mencoder -lva" -- libs_mplayer="$libs_mplayer -lva-x11 -lva" -+ if test "$_vaapi_old" = no ; then -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 0' -+ libs_mencoder="$libs_mencoder -lva" -+ libs_mplayer="$libs_mplayer -lva-x11 -lva" -+ else -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 1' -+ _mencoder="no" -+ libs_mplayer="$libs_mplayer -lva" -+ fi - vomodules="vaapi $vomodules" - else - def_vaapi='#define CONFIG_VAAPI 0' -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 0' - novomodules="vaapi $novomodules" - _libavhwaccels=`echo $_libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VAAPI_HWACCEL//g"` - fi -@@ -8862,6 +8877,7 @@ CONFIG_MLIB = $_mlib - CONFIG_MUXERS = $_mencoder - CONFIG_POSTPROC = yes - CONFIG_VAAPI = $_vaapi -+CONFIG_VAAPI_OLD= $_vaapi_old - CONFIG_VDPAU = $_vdpau - CONFIG_XVMC = $_xvmc - CONFIG_ZLIB = $_zlib -@@ -9241,6 +9257,7 @@ $def_tdfxvid - $def_tga - $def_v4l2 - $def_vaapi -+$def_vaapi_old - $def_vaapi_glx - $def_vdpau - $def_vesa -diff --git a/libavcodec/vaapi_compat.h b/libavcodec/vaapi_compat.h -new file mode 100644 -index 0000000..f463118 ---- /dev/null -+++ b/ffmpeg/libavcodec/vaapi_compat.h -@@ -0,0 +1,92 @@ -+/* -+ * Video Acceleration API (video decoding) -+ * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 -+ * -+ * Copyright (C) 2008-2009 Splitted-Desktop Systems -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_VAAPI_COMPAT_H -+#define AVCODEC_VAAPI_COMPAT_H -+ -+/* Compatibility glue with original VA-API 0.29 */ -+#if CONFIG_VAAPI_OLD -+typedef struct _VASliceParameterBufferBase { -+ unsigned int slice_data_size; -+ unsigned int slice_data_offset; -+ unsigned int slice_data_flag; -+} VASliceParameterBufferBase; -+#endif -+ -+#ifndef VA_CHECK_VERSION -+#define VA_MAJOR_VERSION 0 -+#define VA_MINOR_VERSION 29 -+#define VA_CHECK_VERSION(major,minor,micro) \ -+ (VA_MAJOR_VERSION > (major) || \ -+ (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \ -+ (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro))) -+#endif -+ -+#ifndef VA_FOURCC -+#define VA_FOURCC(ch0, ch1, ch2, ch3) \ -+ ((uint32_t)(uint8_t)(ch0) | \ -+ ((uint32_t)(uint8_t)(ch1) << 8) | \ -+ ((uint32_t)(uint8_t)(ch2) << 16) | \ -+ ((uint32_t)(uint8_t)(ch3) << 24 )) -+#endif -+ -+#ifndef VA_INVALID_ID -+#define VA_INVALID_ID 0xffffffff -+#endif -+#ifndef VA_INVALID_SURFACE -+#define VA_INVALID_SURFACE VA_INVALID_ID -+#endif -+ -+/* Compatibility glue with VA-API >= 0.31 */ -+#if VA_CHECK_VERSION(0,31,0) -+#define vaSyncSurface(dpy, context, surface) (vaSyncSurface)((dpy), (surface)) -+#define vaPutImage2 vaPutImage -+#define vaAssociateSubpicture2 vaAssociateSubpicture -+#endif -+ -+/* Used in codec implementation to set up the right bit-fields */ -+#if CONFIG_VAAPI_OLD -+# define BFV(a, b) a -+# define BFM(a, b, c) c -+# define BFMP(p, a, b, c) p##_##c -+# define NEW(x) /* nothing */ -+#else -+# define BFV(a, b) a.b -+# define BFM(a, b, c) a.b.c -+# define BFMP(p, a, b, c) a.b.c -+# define NEW(x) x -+#endif -+ -+#if CONFIG_VAAPI_OLD -+# define V_raw_coding raw_coding_flag -+# define M_raw_coding raw_coding -+# define V_bitplane_present bitplane_present_flag -+# define M_bitplane_present bitplane_present -+#else -+# define V_raw_coding raw_coding -+# define M_raw_coding raw_coding -+# define V_bitplane_present bitplane_present -+# define M_bitplane_present bitplane_present -+#endif -+ -+#endif /* AVCODEC_VAAPI_COMPAT_H */ -diff --git a/ffmpeg/libavcodec/vaapi_h264.c b/ffmpeg/libavcodec/vaapi_h264.c -index b61a9ca..cab6e41 100644 ---- a/ffmpeg/libavcodec/vaapi_h264.c -+++ b/ffmpeg/libavcodec/vaapi_h264.c -@@ -123,8 +123,8 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic, - if (pic_structure == 0) - pic_structure = pic->reference; - -- va_pic->picture_id = ff_vaapi_get_surface_id(pic); -- va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -+ va_pic->picture_id = ff_vaapi_get_surface_id(pic); -+ NEW(va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num); - - va_pic->flags = 0; - if (pic_structure != PICT_FRAME) -@@ -317,42 +317,42 @@ static int start_frame(AVCodecContext *avctx, - fill_vaapi_pic(&pic_param->CurrPic, s->current_picture_ptr, s->picture_structure); - if (fill_vaapi_ReferenceFrames(pic_param, h) < 0) - return -1; -- pic_param->picture_width_in_mbs_minus1 = s->mb_width - 1; -- pic_param->picture_height_in_mbs_minus1 = s->mb_height - 1; -- pic_param->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; -- pic_param->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; -- pic_param->num_ref_frames = h->sps.ref_frame_count; -- pic_param->seq_fields.value = 0; /* reset all bits */ -- pic_param->seq_fields.bits.chroma_format_idc = h->sps.chroma_format_idc; -- pic_param->seq_fields.bits.residual_colour_transform_flag = h->sps.residual_color_transform_flag; /* XXX: only for 4:4:4 high profile? */ -- pic_param->seq_fields.bits.gaps_in_frame_num_value_allowed_flag = h->sps.gaps_in_frame_num_allowed_flag; -- pic_param->seq_fields.bits.frame_mbs_only_flag = h->sps.frame_mbs_only_flag; -- pic_param->seq_fields.bits.mb_adaptive_frame_field_flag = h->sps.mb_aff; -- pic_param->seq_fields.bits.direct_8x8_inference_flag = h->sps.direct_8x8_inference_flag; -- pic_param->seq_fields.bits.MinLumaBiPredSize8x8 = h->sps.level_idc >= 31; /* A.3.3.2 */ -- pic_param->seq_fields.bits.log2_max_frame_num_minus4 = h->sps.log2_max_frame_num - 4; -- pic_param->seq_fields.bits.pic_order_cnt_type = h->sps.poc_type; -- pic_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 = h->sps.log2_max_poc_lsb - 4; -- pic_param->seq_fields.bits.delta_pic_order_always_zero_flag = h->sps.delta_pic_order_always_zero_flag; -- pic_param->num_slice_groups_minus1 = h->pps.slice_group_count - 1; -- pic_param->slice_group_map_type = h->pps.mb_slice_group_map_type; -- pic_param->slice_group_change_rate_minus1 = 0; /* XXX: unimplemented in FFmpeg */ -- pic_param->pic_init_qp_minus26 = h->pps.init_qp - 26; -- pic_param->pic_init_qs_minus26 = h->pps.init_qs - 26; -- pic_param->chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; -- pic_param->second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; -- pic_param->pic_fields.value = 0; /* reset all bits */ -- pic_param->pic_fields.bits.entropy_coding_mode_flag = h->pps.cabac; -- pic_param->pic_fields.bits.weighted_pred_flag = h->pps.weighted_pred; -- pic_param->pic_fields.bits.weighted_bipred_idc = h->pps.weighted_bipred_idc; -- pic_param->pic_fields.bits.transform_8x8_mode_flag = h->pps.transform_8x8_mode; -- pic_param->pic_fields.bits.field_pic_flag = s->picture_structure != PICT_FRAME; -- pic_param->pic_fields.bits.constrained_intra_pred_flag = h->pps.constrained_intra_pred; -- pic_param->pic_fields.bits.pic_order_present_flag = h->pps.pic_order_present; -- pic_param->pic_fields.bits.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present; -- pic_param->pic_fields.bits.redundant_pic_cnt_present_flag = h->pps.redundant_pic_cnt_present; -- pic_param->pic_fields.bits.reference_pic_flag = h->nal_ref_idc != 0; -- pic_param->frame_num = h->frame_num; -+ pic_param->picture_width_in_mbs_minus1 = s->mb_width - 1; -+ pic_param->picture_height_in_mbs_minus1 = s->mb_height - 1; -+ pic_param->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; -+ pic_param->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; -+ pic_param->num_ref_frames = h->sps.ref_frame_count; -+ pic_param->BFV(seq_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(seq_fields,bits,chroma_format_idc) = h->sps.chroma_format_idc; -+ pic_param->BFM(seq_fields,bits,residual_colour_transform_flag) = h->sps.residual_color_transform_flag; /* XXX: only for 4:4:4 high profile? */ -+ NEW(pic_param->BFM(seq_fields,bits,gaps_in_frame_num_value_allowed_flag) = h->sps.gaps_in_frame_num_allowed_flag); -+ pic_param->BFM(seq_fields,bits,frame_mbs_only_flag) = h->sps.frame_mbs_only_flag; -+ pic_param->BFM(seq_fields,bits,mb_adaptive_frame_field_flag) = h->sps.mb_aff; -+ pic_param->BFM(seq_fields,bits,direct_8x8_inference_flag) = h->sps.direct_8x8_inference_flag; -+ pic_param->BFM(seq_fields,bits,MinLumaBiPredSize8x8) = h->sps.level_idc >= 31; /* A.3.3.2 */ -+ NEW(pic_param->BFM(seq_fields,bits,log2_max_frame_num_minus4) = h->sps.log2_max_frame_num - 4); -+ NEW(pic_param->BFM(seq_fields,bits,pic_order_cnt_type) = h->sps.poc_type); -+ NEW(pic_param->BFM(seq_fields,bits,log2_max_pic_order_cnt_lsb_minus4) = h->sps.log2_max_poc_lsb - 4); -+ NEW(pic_param->BFM(seq_fields,bits,delta_pic_order_always_zero_flag) = h->sps.delta_pic_order_always_zero_flag); -+ pic_param->num_slice_groups_minus1 = h->pps.slice_group_count - 1; -+ pic_param->slice_group_map_type = h->pps.mb_slice_group_map_type; -+ NEW(pic_param->slice_group_change_rate_minus1 = 0); /* XXX: unimplemented in FFmpeg */ -+ pic_param->pic_init_qp_minus26 = h->pps.init_qp - 26; -+ NEW(pic_param->pic_init_qs_minus26 = h->pps.init_qs - 26); -+ pic_param->chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; -+ pic_param->second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; -+ pic_param->BFV(pic_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(pic_fields,bits,entropy_coding_mode_flag) = h->pps.cabac; -+ pic_param->BFM(pic_fields,bits,weighted_pred_flag) = h->pps.weighted_pred; -+ pic_param->BFM(pic_fields,bits,weighted_bipred_idc) = h->pps.weighted_bipred_idc; -+ pic_param->BFM(pic_fields,bits,transform_8x8_mode_flag) = h->pps.transform_8x8_mode; -+ pic_param->BFM(pic_fields,bits,field_pic_flag) = s->picture_structure != PICT_FRAME; -+ pic_param->BFM(pic_fields,bits,constrained_intra_pred_flag) = h->pps.constrained_intra_pred; -+ NEW(pic_param->BFM(pic_fields,bits,pic_order_present_flag) = h->pps.pic_order_present); -+ NEW(pic_param->BFM(pic_fields,bits,deblocking_filter_control_present_flag) = h->pps.deblocking_filter_parameters_present); -+ NEW(pic_param->BFM(pic_fields,bits,redundant_pic_cnt_present_flag) = h->pps.redundant_pic_cnt_present); -+ NEW(pic_param->BFM(pic_fields,bits,reference_pic_flag) = h->nal_ref_idc != 0); -+ pic_param->frame_num = h->frame_num; - - /* Fill in VAIQMatrixBufferH264. */ - iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferH264)); -diff --git a/ffmpeg/libavcodec/vaapi_internal.h b/ffmpeg/libavcodec/vaapi_internal.h -index 2c0fdf9..ff83b96 100644 ---- a/ffmpeg/libavcodec/vaapi_internal.h -+++ b/ffmpeg/libavcodec/vaapi_internal.h -@@ -24,8 +24,14 @@ - #ifndef AVCODEC_VAAPI_INTERNAL_H - #define AVCODEC_VAAPI_INTERNAL_H - -+#include "config.h" -+#if CONFIG_VAAPI_OLD -+#include -+#else - #include -+#endif - #include "vaapi.h" -+#include "vaapi_compat.h" - #include "avcodec.h" - #include "mpegvideo.h" - -diff --git a/ffmpeg/libavcodec/vaapi_mpeg2.c b/ffmpeg/libavcodec/vaapi_mpeg2.c -index 2e870dc..637546a 100644 ---- a/ffmpeg/libavcodec/vaapi_mpeg2.c -+++ b/ffmpeg/libavcodec/vaapi_mpeg2.c -@@ -52,24 +52,24 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferMPEG2)); - if (!pic_param) - return -1; -- pic_param->horizontal_size = s->width; -- pic_param->vertical_size = s->height; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->picture_coding_type = s->pict_type; -- pic_param->f_code = mpeg2_get_f_code(s); -- pic_param->picture_coding_extension.value = 0; /* reset all bits */ -- pic_param->picture_coding_extension.bits.intra_dc_precision = s->intra_dc_precision; -- pic_param->picture_coding_extension.bits.picture_structure = s->picture_structure; -- pic_param->picture_coding_extension.bits.top_field_first = s->top_field_first; -- pic_param->picture_coding_extension.bits.frame_pred_frame_dct = s->frame_pred_frame_dct; -- pic_param->picture_coding_extension.bits.concealment_motion_vectors = s->concealment_motion_vectors; -- pic_param->picture_coding_extension.bits.q_scale_type = s->q_scale_type; -- pic_param->picture_coding_extension.bits.intra_vlc_format = s->intra_vlc_format; -- pic_param->picture_coding_extension.bits.alternate_scan = s->alternate_scan; -- pic_param->picture_coding_extension.bits.repeat_first_field = s->repeat_first_field; -- pic_param->picture_coding_extension.bits.progressive_frame = s->progressive_frame; -- pic_param->picture_coding_extension.bits.is_first_field = mpeg2_get_is_frame_start(s); -+ pic_param->horizontal_size = s->width; -+ pic_param->vertical_size = s->height; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->picture_coding_type = s->pict_type; -+ pic_param->f_code = mpeg2_get_f_code(s); -+ pic_param->BFV(picture_coding_extension,value) = 0; /* reset all bits */ -+ pic_param->BFM(picture_coding_extension,bits,intra_dc_precision) = s->intra_dc_precision; -+ pic_param->BFM(picture_coding_extension,bits,picture_structure) = s->picture_structure; -+ pic_param->BFM(picture_coding_extension,bits,top_field_first) = s->top_field_first; -+ pic_param->BFM(picture_coding_extension,bits,frame_pred_frame_dct) = s->frame_pred_frame_dct; -+ pic_param->BFM(picture_coding_extension,bits,concealment_motion_vectors) = s->concealment_motion_vectors; -+ pic_param->BFM(picture_coding_extension,bits,q_scale_type) = s->q_scale_type; -+ pic_param->BFM(picture_coding_extension,bits,intra_vlc_format) = s->intra_vlc_format; -+ pic_param->BFM(picture_coding_extension,bits,alternate_scan) = s->alternate_scan; -+ pic_param->BFM(picture_coding_extension,bits,repeat_first_field) = s->repeat_first_field; -+ pic_param->BFM(picture_coding_extension,bits,progressive_frame) = s->progressive_frame; -+ pic_param->BFM(picture_coding_extension,bits,is_first_field) = mpeg2_get_is_frame_start(s); - - switch (s->pict_type) { - case FF_B_TYPE: -@@ -131,7 +131,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - if (!slice_param) - return -1; - slice_param->macroblock_offset = macroblock_offset; -- slice_param->slice_horizontal_position = s->mb_x; -+ NEW(slice_param->slice_horizontal_position = s->mb_x); - slice_param->slice_vertical_position = s->mb_y; - slice_param->quantiser_scale_code = quantiser_scale_code; - slice_param->intra_slice_flag = intra_slice_flag; -diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c -index 466ce2f..ea306a4 100644 ---- a/ffmpeg/libavcodec/vaapi_mpeg4.c -+++ b/ffmpeg/libavcodec/vaapi_mpeg4.c -@@ -54,42 +54,42 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferMPEG4)); - if (!pic_param) - return -1; -- pic_param->vop_width = s->width; -- pic_param->vop_height = s->height; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->vol_fields.value = 0; /* reset all bits */ -- pic_param->vol_fields.bits.short_video_header = avctx->codec->id == CODEC_ID_H263; -- pic_param->vol_fields.bits.chroma_format = CHROMA_420; -- pic_param->vol_fields.bits.interlaced = !s->progressive_sequence; -- pic_param->vol_fields.bits.obmc_disable = 1; -- pic_param->vol_fields.bits.sprite_enable = s->vol_sprite_usage; -- pic_param->vol_fields.bits.sprite_warping_accuracy = s->sprite_warping_accuracy; -- pic_param->vol_fields.bits.quant_type = s->mpeg_quant; -- pic_param->vol_fields.bits.quarter_sample = s->quarter_sample; -- pic_param->vol_fields.bits.data_partitioned = s->data_partitioning; -- pic_param->vol_fields.bits.reversible_vlc = s->rvlc; -- pic_param->vol_fields.bits.resync_marker_disable = !s->resync_marker; -- pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points; -+ pic_param->vop_width = s->width; -+ pic_param->vop_height = s->height; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->BFV(vol_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(vol_fields,bits,short_video_header) = avctx->codec->id == CODEC_ID_H263; -+ pic_param->BFM(vol_fields,bits,chroma_format) = CHROMA_420; -+ pic_param->BFM(vol_fields,bits,interlaced) = !s->progressive_sequence; -+ pic_param->BFM(vol_fields,bits,obmc_disable) = 1; -+ pic_param->BFM(vol_fields,bits,sprite_enable) = s->vol_sprite_usage; -+ pic_param->BFM(vol_fields,bits,sprite_warping_accuracy) = s->sprite_warping_accuracy; -+ pic_param->BFM(vol_fields,bits,quant_type) = s->mpeg_quant; -+ pic_param->BFM(vol_fields,bits,quarter_sample) = s->quarter_sample; -+ pic_param->BFM(vol_fields,bits,data_partitioned) = s->data_partitioning; -+ pic_param->BFM(vol_fields,bits,reversible_vlc) = s->rvlc; -+ NEW(pic_param->BFM(vol_fields,bits,resync_marker_disable) = !s->resync_marker); -+ pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points; - for (i = 0; i < s->num_sprite_warping_points && i < 3; i++) { -- pic_param->sprite_trajectory_du[i] = s->sprite_traj[i][0]; -- pic_param->sprite_trajectory_dv[i] = s->sprite_traj[i][1]; -+ pic_param->sprite_trajectory_du[i] = s->sprite_traj[i][0]; -+ pic_param->sprite_trajectory_dv[i] = s->sprite_traj[i][1]; - } -- pic_param->quant_precision = s->quant_precision; -- pic_param->vop_fields.value = 0; /* reset all bits */ -- pic_param->vop_fields.bits.vop_coding_type = s->pict_type - FF_I_TYPE; -- pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0; -- pic_param->vop_fields.bits.vop_rounding_type = s->no_rounding; -- pic_param->vop_fields.bits.intra_dc_vlc_thr = mpeg4_get_intra_dc_vlc_thr(s); -- pic_param->vop_fields.bits.top_field_first = s->top_field_first; -- pic_param->vop_fields.bits.alternate_vertical_scan_flag = s->alternate_scan; -- pic_param->vop_fcode_forward = s->f_code; -- pic_param->vop_fcode_backward = s->b_code; -- pic_param->vop_time_increment_resolution = avctx->time_base.den; -- pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s); -- pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob; -- pic_param->TRB = s->pb_time; -- pic_param->TRD = s->pp_time; -+ pic_param->quant_precision = s->quant_precision; -+ pic_param->BFV(vop_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(vop_fields,bits,vop_coding_type) = s->pict_type - FF_I_TYPE; -+ pic_param->BFM(vop_fields,bits,backward_reference_vop_coding_type) = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0; -+ pic_param->BFM(vop_fields,bits,vop_rounding_type) = s->no_rounding; -+ pic_param->BFM(vop_fields,bits,intra_dc_vlc_thr) = mpeg4_get_intra_dc_vlc_thr(s); -+ pic_param->BFM(vop_fields,bits,top_field_first) = s->top_field_first; -+ pic_param->BFM(vop_fields,bits,alternate_vertical_scan_flag) = s->alternate_scan; -+ pic_param->vop_fcode_forward = s->f_code; -+ pic_param->vop_fcode_backward = s->b_code; -+ NEW(pic_param->vop_time_increment_resolution = avctx->time_base.den); -+ pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s); -+ pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob; -+ pic_param->TRB = s->pb_time; -+ pic_param->TRD = s->pp_time; - - if (s->pict_type == FF_B_TYPE) - pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture); -@@ -98,7 +98,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ - - /* Fill in VAIQMatrixBufferMPEG4 */ - /* Only the first inverse quantisation method uses the weighthing matrices */ -- if (pic_param->vol_fields.bits.quant_type) { -+ if (pic_param->BFM(vol_fields,bits,quant_type)) { - iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferMPEG4)); - if (!iq_matrix) - return -1; -diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c -index 992e1da..8264dd9 100644 ---- a/ffmpeg/libavcodec/vaapi_vc1.c -+++ b/ffmpeg/libavcodec/vaapi_vc1.c -@@ -146,100 +146,100 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferVC1)); - if (!pic_param) - return -1; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->inloop_decoded_picture = VA_INVALID_ID; -- pic_param->sequence_fields.value = 0; /* reset all bits */ -- pic_param->sequence_fields.bits.pulldown = v->broadcast; -- pic_param->sequence_fields.bits.interlace = v->interlace; -- pic_param->sequence_fields.bits.tfcntrflag = v->tfcntrflag; -- pic_param->sequence_fields.bits.finterpflag = v->finterpflag; -- pic_param->sequence_fields.bits.psf = v->psf; -- pic_param->sequence_fields.bits.multires = v->multires; -- pic_param->sequence_fields.bits.overlap = v->overlap; -- pic_param->sequence_fields.bits.syncmarker = s->resync_marker; -- pic_param->sequence_fields.bits.rangered = v->rangered; -- pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames; -- pic_param->coded_width = s->avctx->coded_width; -- pic_param->coded_height = s->avctx->coded_height; -- pic_param->entrypoint_fields.value = 0; /* reset all bits */ -- pic_param->entrypoint_fields.bits.broken_link = v->broken_link; -- pic_param->entrypoint_fields.bits.closed_entry = v->closed_entry; -- pic_param->entrypoint_fields.bits.panscan_flag = v->panscanflag; -- pic_param->entrypoint_fields.bits.loopfilter = s->loop_filter; -- pic_param->conditional_overlap_flag = v->condover; -- pic_param->fast_uvmc_flag = v->fastuvmc; -- pic_param->range_mapping_fields.value = 0; /* reset all bits */ -- pic_param->range_mapping_fields.bits.luma_flag = v->range_mapy_flag; -- pic_param->range_mapping_fields.bits.luma = v->range_mapy; -- pic_param->range_mapping_fields.bits.chroma_flag = v->range_mapuv_flag; -- pic_param->range_mapping_fields.bits.chroma = v->range_mapuv; -- pic_param->b_picture_fraction = v->bfraction_lut_index; -- pic_param->cbp_table = v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -- pic_param->mb_mode_table = 0; /* XXX: interlaced frame */ -- pic_param->range_reduction_frame = v->rangeredfrm; -- pic_param->rounding_control = v->rnd; -- pic_param->post_processing = v->postproc; -- pic_param->picture_resolution_index = v->respic; -- pic_param->luma_scale = v->lumscale; -- pic_param->luma_shift = v->lumshift; -- pic_param->picture_fields.value = 0; /* reset all bits */ -- pic_param->picture_fields.bits.picture_type = vc1_get_PTYPE(v); -- pic_param->picture_fields.bits.frame_coding_mode = v->fcm; -- pic_param->picture_fields.bits.top_field_first = v->tff; -- pic_param->picture_fields.bits.is_first_field = v->fcm == 0; /* XXX: interlaced frame */ -- pic_param->picture_fields.bits.intensity_compensation = v->mv_mode == MV_PMODE_INTENSITY_COMP; -- pic_param->raw_coding.value = 0; /* reset all bits */ -- pic_param->raw_coding.flags.mv_type_mb = v->mv_type_is_raw; -- pic_param->raw_coding.flags.direct_mb = v->dmb_is_raw; -- pic_param->raw_coding.flags.skip_mb = v->skip_is_raw; -- pic_param->raw_coding.flags.field_tx = 0; /* XXX: interlaced frame */ -- pic_param->raw_coding.flags.forward_mb = 0; /* XXX: interlaced frame */ -- pic_param->raw_coding.flags.ac_pred = v->acpred_is_raw; -- pic_param->raw_coding.flags.overflags = v->overflg_is_raw; -- pic_param->bitplane_present.value = 0; /* reset all bits */ -- pic_param->bitplane_present.flags.bp_mv_type_mb = vc1_has_MVTYPEMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_direct_mb = vc1_has_DIRECTMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_skip_mb = vc1_has_SKIPMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_field_tx = 0; /* XXX: interlaced frame */ -- pic_param->bitplane_present.flags.bp_forward_mb = 0; /* XXX: interlaced frame */ -- pic_param->bitplane_present.flags.bp_ac_pred = vc1_has_ACPRED_bitplane(v); -- pic_param->bitplane_present.flags.bp_overflags = vc1_has_OVERFLAGS_bitplane(v); -- pic_param->reference_fields.value = 0; /* reset all bits */ -- pic_param->reference_fields.bits.reference_distance_flag = v->refdist_flag; -- pic_param->reference_fields.bits.reference_distance = 0; /* XXX: interlaced frame */ -- pic_param->reference_fields.bits.num_reference_pictures = 0; /* XXX: interlaced frame */ -- pic_param->reference_fields.bits.reference_field_pic_indicator = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.value = 0; /* reset all bits */ -- pic_param->mv_fields.bits.mv_mode = vc1_get_MVMODE(v); -- pic_param->mv_fields.bits.mv_mode2 = vc1_get_MVMODE2(v); -- pic_param->mv_fields.bits.mv_table = s->mv_table_index; -- pic_param->mv_fields.bits.two_mv_block_pattern_table = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.four_mv_switch = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.four_mv_block_pattern_table = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.extended_mv_flag = v->extended_mv; -- pic_param->mv_fields.bits.extended_mv_range = v->mvrange; -- pic_param->mv_fields.bits.extended_dmv_flag = v->extended_dmv; -- pic_param->mv_fields.bits.extended_dmv_range = 0; /* XXX: interlaced frame */ -- pic_param->pic_quantizer_fields.value = 0; /* reset all bits */ -- pic_param->pic_quantizer_fields.bits.dquant = v->dquant; -- pic_param->pic_quantizer_fields.bits.quantizer = v->quantizer_mode; -- pic_param->pic_quantizer_fields.bits.half_qp = v->halfpq; -- pic_param->pic_quantizer_fields.bits.pic_quantizer_scale = v->pq; -- pic_param->pic_quantizer_fields.bits.pic_quantizer_type = v->pquantizer; -- pic_param->pic_quantizer_fields.bits.dq_frame = v->dquantfrm; -- pic_param->pic_quantizer_fields.bits.dq_profile = v->dqprofile; -- pic_param->pic_quantizer_fields.bits.dq_sb_edge = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0; -- pic_param->pic_quantizer_fields.bits.dq_db_edge = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0; -- pic_param->pic_quantizer_fields.bits.dq_binary_level = v->dqbilevel; -- pic_param->pic_quantizer_fields.bits.alt_pic_quantizer = v->altpq; -- pic_param->transform_fields.value = 0; /* reset all bits */ -- pic_param->transform_fields.bits.variable_sized_transform_flag = v->vstransform; -- pic_param->transform_fields.bits.mb_level_transform_type_flag = v->ttmbf; -- pic_param->transform_fields.bits.frame_level_transform_type = v->ttfrm; -- pic_param->transform_fields.bits.transform_ac_codingset_idx1 = v->c_ac_table_index; -- pic_param->transform_fields.bits.transform_ac_codingset_idx2 = v->y_ac_table_index; -- pic_param->transform_fields.bits.intra_transform_dc_table = v->s.dc_table_index; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->inloop_decoded_picture = VA_INVALID_ID; -+ pic_param->BFV(sequence_fields,value) = 0; /* reset all bits */ -+ NEW(pic_param->BFM(sequence_fields,bits,pulldown) = v->broadcast); -+ pic_param->BFM(sequence_fields,bits,interlace) = v->interlace; -+ NEW(pic_param->BFM(sequence_fields,bits,tfcntrflag) = v->tfcntrflag); -+ NEW(pic_param->BFM(sequence_fields,bits,finterpflag) = v->finterpflag); -+ NEW(pic_param->BFM(sequence_fields,bits,psf) = v->psf); -+ NEW(pic_param->BFM(sequence_fields,bits,multires) = v->multires); -+ pic_param->BFM(sequence_fields,bits,overlap) = v->overlap; -+ pic_param->BFM(sequence_fields,bits,syncmarker) = s->resync_marker; -+ NEW(pic_param->BFM(sequence_fields,bits,rangered) = v->rangered); -+ NEW(pic_param->BFM(sequence_fields,bits,max_b_frames) = s->avctx->max_b_frames); -+ pic_param->coded_width = s->avctx->coded_width; -+ pic_param->coded_height = s->avctx->coded_height; -+ NEW(pic_param->BFV(entrypoint_fields,value) = 0); /* reset all bits */ -+ pic_param->BFM(entrypoint_fields,bits,broken_link) = v->broken_link; -+ pic_param->BFM(entrypoint_fields,bits,closed_entry) = v->closed_entry; -+ NEW(pic_param->BFM(entrypoint_fields,bits,panscan_flag) = v->panscanflag); -+ pic_param->BFM(entrypoint_fields,bits,loopfilter) = s->loop_filter; -+ pic_param->conditional_overlap_flag = v->condover; -+ pic_param->fast_uvmc_flag = v->fastuvmc; -+ pic_param->BFV(range_mapping_fields,value) = 0; /* reset all bits */ -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,luma_flag) = v->range_mapy_flag; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,luma) = v->range_mapy; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,chroma_flag) = v->range_mapuv_flag; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,chroma) = v->range_mapuv; -+ pic_param->b_picture_fraction = v->bfraction_lut_index; -+ pic_param->cbp_table = v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -+ pic_param->mb_mode_table = 0; /* XXX: interlaced frame */ -+ pic_param->range_reduction_frame = v->rangeredfrm; -+ pic_param->rounding_control = v->rnd; -+ pic_param->post_processing = v->postproc; -+ pic_param->picture_resolution_index = v->respic; -+ pic_param->luma_scale = v->lumscale; -+ pic_param->luma_shift = v->lumshift; -+ pic_param->BFV(picture_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(picture_fields,bits,picture_type) = vc1_get_PTYPE(v); -+ pic_param->BFM(picture_fields,bits,frame_coding_mode) = v->fcm; -+ pic_param->BFM(picture_fields,bits,top_field_first) = v->tff; -+ pic_param->BFM(picture_fields,bits,is_first_field) = v->fcm == 0; /* XXX: interlaced frame */ -+ pic_param->BFM(picture_fields,bits,intensity_compensation) = v->mv_mode == MV_PMODE_INTENSITY_COMP; -+ pic_param->BFV(V_raw_coding,value) = 0; /* reset all bits */ -+ pic_param->BFM(M_raw_coding,flags,mv_type_mb) = v->mv_type_is_raw; -+ pic_param->BFM(M_raw_coding,flags,direct_mb) = v->dmb_is_raw; -+ pic_param->BFM(M_raw_coding,flags,skip_mb) = v->skip_is_raw; -+ pic_param->BFM(M_raw_coding,flags,field_tx) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_raw_coding,flags,forward_mb) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_raw_coding,flags,ac_pred) = v->acpred_is_raw; -+ pic_param->BFM(M_raw_coding,flags,overflags) = v->overflg_is_raw; -+ pic_param->BFV(V_bitplane_present,value) = 0; /* reset all bits */ -+ pic_param->BFM(M_bitplane_present,flags,bp_mv_type_mb) = vc1_has_MVTYPEMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) = vc1_has_DIRECTMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) = vc1_has_SKIPMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_field_tx) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_bitplane_present,flags,bp_forward_mb) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_bitplane_present,flags,bp_ac_pred) = vc1_has_ACPRED_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_overflags) = vc1_has_OVERFLAGS_bitplane(v); -+ pic_param->BFV(reference_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(reference_fields,bits,reference_distance_flag) = v->refdist_flag; -+ pic_param->BFM(reference_fields,bits,reference_distance) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(reference_fields,bits,num_reference_pictures) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(reference_fields,bits,reference_field_pic_indicator) = 0; /* XXX: interlaced frame */ -+ pic_param->BFV(mv_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(mv_fields,bits,mv_mode) = vc1_get_MVMODE(v); -+ pic_param->BFM(mv_fields,bits,mv_mode2) = vc1_get_MVMODE2(v); -+ pic_param->BFM(mv_fields,bits,mv_table) = s->mv_table_index; -+ pic_param->BFM(mv_fields,bits,two_mv_block_pattern_table) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,four_mv_switch) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,four_mv_block_pattern_table) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,extended_mv_flag) = v->extended_mv; -+ pic_param->BFM(mv_fields,bits,extended_mv_range) = v->mvrange; -+ pic_param->BFM(mv_fields,bits,extended_dmv_flag) = v->extended_dmv; -+ pic_param->BFM(mv_fields,bits,extended_dmv_range) = 0; /* XXX: interlaced frame */ -+ pic_param->BFV(pic_quantizer_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(pic_quantizer_fields,bits,dquant) = v->dquant; -+ pic_param->BFM(pic_quantizer_fields,bits,quantizer) = v->quantizer_mode; -+ pic_param->BFM(pic_quantizer_fields,bits,half_qp) = v->halfpq; -+ pic_param->BFM(pic_quantizer_fields,bits,pic_quantizer_scale) = v->pq; -+ pic_param->BFM(pic_quantizer_fields,bits,pic_quantizer_type) = v->pquantizer; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_frame) = v->dquantfrm; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_profile) = v->dqprofile; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_sb_edge) = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_db_edge) = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_binary_level) = v->dqbilevel; -+ pic_param->BFM(pic_quantizer_fields,bits,alt_pic_quantizer) = v->altpq; -+ pic_param->BFV(transform_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(transform_fields,bits,variable_sized_transform_flag) = v->vstransform; -+ pic_param->BFM(transform_fields,bits,mb_level_transform_type_flag) = v->ttmbf; -+ pic_param->BFM(transform_fields,bits,frame_level_transform_type) = v->ttfrm; -+ pic_param->BFM(transform_fields,bits,transform_ac_codingset_idx1) = v->c_ac_table_index; -+ pic_param->BFM(transform_fields,bits,transform_ac_codingset_idx2) = v->y_ac_table_index; -+ pic_param->BFM(transform_fields,bits,intra_transform_dc_table) = v->s.dc_table_index; - - switch (s->pict_type) { - case FF_B_TYPE: -@@ -250,29 +250,29 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - break; - } - -- if (pic_param->bitplane_present.value) { -+ if (pic_param->BFV(V_bitplane_present,value)) { - uint8_t *bitplane; - const uint8_t *ff_bp[3]; - int x, y, n; - - switch (s->pict_type) { - case FF_P_TYPE: -- ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL; -- ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL; -- ff_bp[2] = pic_param->bitplane_present.flags.bp_mv_type_mb ? v->mv_type_mb_plane : NULL; -+ ff_bp[0] = pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) ? v->direct_mb_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) ? s->mbskip_table : NULL; -+ ff_bp[2] = pic_param->BFM(M_bitplane_present,flags,bp_mv_type_mb) ? v->mv_type_mb_plane : NULL; - break; - case FF_B_TYPE: - if (!v->bi_type) { -- ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL; -- ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL; -+ ff_bp[0] = pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) ? v->direct_mb_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) ? s->mbskip_table : NULL; - ff_bp[2] = NULL; /* XXX: interlaced frame (FORWARD plane) */ - break; - } - /* fall-through (BI-type) */ - case FF_I_TYPE: - ff_bp[0] = NULL; /* XXX: interlaced frame (FIELDTX plane) */ -- ff_bp[1] = pic_param->bitplane_present.flags.bp_ac_pred ? v->acpred_plane : NULL; -- ff_bp[2] = pic_param->bitplane_present.flags.bp_overflags ? v->over_flags_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_ac_pred) ? v->acpred_plane : NULL; -+ ff_bp[2] = pic_param->BFM(M_bitplane_present,flags,bp_overflags) ? v->over_flags_plane : NULL; - break; - default: - ff_bp[0] = NULL; -diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c -index 5f75b09..bbc95ff 100644 ---- a/libvo/vo_vaapi.c -+++ b/libvo/vo_vaapi.c -@@ -45,7 +45,11 @@ - #include - #include - #include -+#if CONFIG_VAAPI_OLD -+#include -+#else - #include -+#endif - #if CONFIG_VAAPI_GLX - #include - #endif diff --git a/media-video/mplayer/files/vaapi-take2/04-mplayer-vdpau.patch b/media-video/mplayer/files/vaapi-take2/04-mplayer-vdpau.patch deleted file mode 100644 index ac69b66db..000000000 --- a/media-video/mplayer/files/vaapi-take2/04-mplayer-vdpau.patch +++ /dev/null @@ -1,1243 +0,0 @@ -diff --git a/configure b/configure -index 89a0a9a..c325521 100755 ---- a/configure -+++ b/configure -@@ -586,7 +586,7 @@ libavparsers=$libavparsers_all - libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') - libavbsfs=$libavbsfs_all - libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') --libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL) echo $h;; esac; done) -+libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL|*_VDPAU_HWACCEL) echo $h;; esac; done) - libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') - libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//) - libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') -@@ -4593,7 +4593,7 @@ if test "$_vdpau" = yes ; then - else - def_vdpau='#define CONFIG_VDPAU 0' - novomodules="vdpau $novomodules" -- libavdecoders=$(echo $libavdecoders | sed -e "s/\(MPEG\|MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_DECODER//g") -+ libavhwaccels=$(echo $libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_HWACCEL//g") - fi - echores "$_vdpau" - -diff --git a/etc/codecs.conf b/etc/codecs.conf -index 8eece64..2db98e4 100644 ---- a/etc/codecs.conf -+++ b/etc/codecs.conf -@@ -176,6 +176,7 @@ - fourcc m1v1 - driver ffmpeg - dll "mpeg1video" -+ out VDPAU_MPEG1 - out YV12,I420,IYUV - - videocodec ffmpeg2 -@@ -213,6 +214,7 @@ - driver ffmpeg - dll "mpeg2video" - out VAAPI_MPEG2 -+ out VDPAU_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -253,6 +255,7 @@ - fourcc slif ; SoftLab MPEG-2 I-frames Codec - driver ffmpeg - dll "mpegvideo" -+ out VDPAU_MPEG1,VDPAU_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -332,41 +335,6 @@ - out IDCT_MPEG2 - out MOCO_MPEG2 - --videocodec ffmpeg12vdpau -- info "FFmpeg MPEG-1/2 (VDPAU)" -- status working -- format 0x10000001 ; MPEG-1 -- format 0x10000002 ; MPEG-2 -- fourcc mpg1,mpg2,MPG2 -- fourcc PIM1 ; Pinnacle hardware-MPEG-1 -- fourcc PIM2 ; Pinnacle hardware-MPEG-2 -- fourcc "DVR " -- fourcc hdv2 -- fourcc MPEG -- fourcc hdv1 -- fourcc hdv3 ; HDV 1080i50 -- fourcc hdv5 ; HDV 720p25 -- fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) -- fourcc hdv6,hdv7,hdv8 -- fourcc xdv1,xdv2,xdv3 -- fourcc xdv4,xdv5,xdv6 -- fourcc xdv7,xdv8,xdv9 -- fourcc xdva,xdvb,xdvc -- fourcc xdvd,xdve,xdvf -- fourcc xd5a,xd5b,xd5c -- fourcc xd5d,xd5e,xd5f -- fourcc xd59,xd54 -- fourcc mx5n,mx4n,mx4p -- fourcc mx3n,mx3p -- fourcc AVmp -- fourcc mp2v,mpgv -- fourcc LMP2 ; Lead mpeg2 in avi -- fourcc m2v1,m1v1 -- driver ffmpeg -- dll "mpegvideo_vdpau" -- out VDPAU_MPEG1 -- out VDPAU_MPEG2 -- - videocodec mpegpes - info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)" - comment "for hardware decoding" -@@ -943,6 +911,7 @@ - driver ffmpeg - dll wmv3 - out VAAPI_WMV3 -+ out VDPAU_WMV3 - out YV12,I420,IYUV - - videocodec ffwmvp -@@ -954,14 +923,6 @@ - dll wmv3 - out YV12,I420,IYUV - --videocodec ffwmv3vdpau -- info "FFmpeg WMV3/WMV9 (VDPAU)" -- status buggy -- fourcc WMV3,wmv3 -- driver ffmpeg -- dll wmv3_vdpau -- out VDPAU_WMV3 -- - videocodec ffvc1 - info "FFmpeg WVC1" - status buggy -@@ -970,16 +931,8 @@ - driver ffmpeg - dll vc1 - out VAAPI_VC1 -- out YV12,I420,IYUV -- --videocodec ffvc1vdpau -- info "FFmpeg WVC1 (VDPAU)" -- status buggy -- fourcc WVC1,wvc1,WMVA -- fourcc vc-1,VC-1 -- driver ffmpeg -- dll vc1_vdpau - out VDPAU_VC1 -+ out YV12,I420,IYUV - - videocodec ffh264 - info "FFmpeg H.264" -@@ -993,19 +946,8 @@ - driver ffmpeg - dll h264 - out VAAPI_H264 -- out YV12,I420,IYUV -- --videocodec ffh264vdpau -- info "FFmpeg H.264 (VDPAU)" -- status working -- fourcc H264,h264 -- fourcc X264,x264 -- fourcc avc1,AVC1 -- fourcc davc,DAVC -- format 0x10000005 -- driver ffmpeg -- dll h264_vdpau - out VDPAU_H264 -+ out YV12,I420,IYUV - - videocodec coreavcwindows - info "CoreAVC H.264 for x86 - http://corecodec.org/" -@@ -1063,40 +1005,8 @@ - driver ffmpeg - dll mpeg4 ;opendivx - out VAAPI_MPEG4 -- out YV12,I420,IYUV -- --videocodec ffodivxvdpau -- info "FFmpeg MPEG-4,DIVX-4/5 (VDPAU)" -- status working -- fourcc FMP4,fmp4 -- fourcc DIVX,divx -- fourcc DIV1,div1 divx -- fourcc MP4S,mp4s ; ISO MPEG-4 Video V1 -- fourcc M4S2,m4s2 -- fourcc xvid,XVID,XviD,XVIX -- fourcc DX50,dx50,BLZ0 DX50 -- fourcc mp4v,MP4V -- format 0x4 -- fourcc UMP4 -- fourcc RMP4 -- fourcc 3IV2,3iv2 ; 3ivx Delta 4 -- fourcc DXGM -- fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110 -- fourcc SMP4,smp4 ; Samsung SMP4 video codec -- fourcc VIDM ; vidm 4.01 codec -- format 0x10000004 ; mpeg 4 es -- fourcc m4cc,M4CC -- fourcc hdx4,HDX4 -- fourcc FVFW,fvfw -- fourcc FFDS -- fourcc DCOD,MVXM,EM4A,PM4V -- fourcc M4T3,DMK2,DIGI,INMC -- fourcc EPHV,SN40,WAWV -- fourcc uldx,ULDX,VSPX -- fourcc SIPP ; Samsung SHR-6040 -- driver ffmpeg -- dll mpeg4_vdpau - out VDPAU_MPEG4 -+ out YV12,I420,IYUV - - videocodec ffwv1f - info "WV1F MPEG-4" -diff --git a/fmt-conversion.c b/fmt-conversion.c -index bd32ce8..8994caa 100644 ---- a/fmt-conversion.c -+++ b/fmt-conversion.c -@@ -91,12 +91,6 @@ static const struct { - - {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC}, - {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT}, -- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1}, -- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2}, -- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264}, -- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, -- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, -- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, - - /* VA-API formats */ - {IMGFMT_VAAPI_MPEG2, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG2VIDEO}, -@@ -108,6 +102,14 @@ static const struct { - {IMGFMT_VAAPI_WMV3, PIX_FMT_VAAPI_VLD, CODEC_ID_WMV3}, - {IMGFMT_VAAPI_VC1, PIX_FMT_VAAPI_VLD, CODEC_ID_VC1}, - -+ /* VDPAU formats */ -+ {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU, CODEC_ID_MPEG1VIDEO}, -+ {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU, CODEC_ID_MPEG4}, -+ {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU, CODEC_ID_H264}, -+ {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU, CODEC_ID_WMV3}, -+ {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU, CODEC_ID_VC1}, -+ - {0, PIX_FMT_NONE} - }; - -diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c -index f17d03a..185541e 100644 ---- a/ffmpeg/libavcodec/allcodecs.c -+++ b/ffmpeg/libavcodec/allcodecs.c -@@ -65,6 +65,13 @@ void avcodec_register_all(void) - REGISTER_HWACCEL (WMV3_DXVA2, wmv3_dxva2); - REGISTER_HWACCEL (WMV3_VAAPI, wmv3_vaapi); - -+ REGISTER_HWACCEL (H264_VDPAU, h264_vdpau); -+ REGISTER_HWACCEL (MPEG1_VDPAU, mpeg1_vdpau); -+ REGISTER_HWACCEL (MPEG2_VDPAU, mpeg2_vdpau); -+ REGISTER_HWACCEL (MPEG4_VDPAU, mpeg4_vdpau); -+ REGISTER_HWACCEL (VC1_VDPAU, vc1_vdpau); -+ REGISTER_HWACCEL (WMV3_VDPAU, wmv3_vdpau); -+ - /* video codecs */ - REGISTER_DECODER (AASC, aasc); - REGISTER_DECODER (AMV, amv); -@@ -113,7 +120,6 @@ void avcodec_register_all(void) - REGISTER_DECODER (H263I, h263i); - REGISTER_ENCODER (H263P, h263p); - REGISTER_DECODER (H264, h264); -- REGISTER_DECODER (H264_VDPAU, h264_vdpau); - REGISTER_ENCDEC (HUFFYUV, huffyuv); - REGISTER_DECODER (IDCIN, idcin); - REGISTER_DECODER (IFF_BYTERUN1, iff_byterun1); -@@ -137,10 +143,7 @@ void avcodec_register_all(void) - REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); - REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); - REGISTER_ENCDEC (MPEG4, mpeg4); -- REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau); - REGISTER_DECODER (MPEGVIDEO, mpegvideo); -- REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau); -- REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau); - REGISTER_ENCDEC (MSMPEG4V1, msmpeg4v1); - REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2); - REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3); -@@ -192,7 +195,6 @@ void avcodec_register_all(void) - REGISTER_DECODER (V210X, v210x); - REGISTER_DECODER (VB, vb); - REGISTER_DECODER (VC1, vc1); -- REGISTER_DECODER (VC1_VDPAU, vc1_vdpau); - REGISTER_DECODER (VCR1, vcr1); - REGISTER_DECODER (VMDVIDEO, vmdvideo); - REGISTER_DECODER (VMNC, vmnc); -@@ -206,7 +208,6 @@ void avcodec_register_all(void) - REGISTER_ENCDEC (WMV1, wmv1); - REGISTER_ENCDEC (WMV2, wmv2); - REGISTER_DECODER (WMV3, wmv3); -- REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau); - REGISTER_DECODER (WNV1, wnv1); - REGISTER_DECODER (XAN_WC3, xan_wc3); - REGISTER_DECODER (XL, xl); -diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h -index 48666f9..7635cf8 100644 ---- a/ffmpeg/libavcodec/avcodec.h -+++ b/ffmpeg/libavcodec/avcodec.h -@@ -643,10 +643,6 @@ typedef struct RcOverride{ - */ - #define CODEC_CAP_SMALL_LAST_FRAME 0x0040 - /** -- * Codec can export data for HW decoding (VDPAU). -- */ --#define CODEC_CAP_HWACCEL_VDPAU 0x0080 --/** - * Codec can output multiple frames per AVPacket - * Normally demuxers return one frame at a time, demuxers which do not do - * are connected to a parser to split what they return into proper frames. -diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c -index dc015b9..a36f7ac 100644 ---- a/ffmpeg/libavcodec/error_resilience.c -+++ b/ffmpeg/libavcodec/error_resilience.c -@@ -759,7 +759,6 @@ void ff_er_frame_end(MpegEncContext *s){ - - if(!s->error_recognition || s->error_count==0 || s->avctx->lowres || - s->avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || - s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled - s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return; - -diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c -index d9d6f7e..f7a21ed 100644 ---- a/ffmpeg/libavcodec/h263dec.c -+++ b/ffmpeg/libavcodec/h263dec.c -@@ -33,7 +33,6 @@ - #include "h263_parser.h" - #include "mpeg4video_parser.h" - #include "msmpeg4.h" --#include "vdpau_internal.h" - #include "flv.h" - #include "mpeg4video.h" - -@@ -619,11 +618,6 @@ retry: - if(MPV_frame_start(s, avctx) < 0) - return -1; - -- if (CONFIG_MPEG4_VDPAU_DECODER && (s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)) { -- ff_vdpau_mpeg4_decode_picture(s, s->gb.buffer, s->gb.buffer_end - s->gb.buffer); -- goto frame_end; -- } -- - if (avctx->hwaccel) { - if (avctx->hwaccel->start_frame(avctx, s->gb.buffer, s->gb.buffer_end - s->gb.buffer) < 0) - return -1; -diff --git a/libavcodec/h264.c b/libavcodec/h264.c -index d1662fc..72e00b6 100644 ---- a/ffmpeg/libavcodec/h264.c -+++ b/ffmpeg/libavcodec/h264.c -@@ -36,7 +36,6 @@ - #include "golomb.h" - #include "mathops.h" - #include "rectangle.h" --#include "vdpau_internal.h" - #include "libavutil/avassert.h" - - #include "cabac.h" -@@ -1650,9 +1649,6 @@ static void field_end(H264Context *h){ - s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264; - s->current_picture_ptr->pict_type= s->pict_type; - -- if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_set_reference_frames(s); -- - if(!s->dropable) { - ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); - h->prev_poc_msb= h->poc_msb; -@@ -1666,9 +1662,6 @@ static void field_end(H264Context *h){ - av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); - } - -- if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_picture_complete(s); -- - /* - * FIXME: Error handling code does not seem to support interlaced - * when slices span multiple rows -@@ -2710,8 +2703,6 @@ static void execute_decode_slices(H264Context *h, int context_count){ - - if (s->avctx->hwaccel) - return; -- if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- return; - if(context_count == 1) { - decode_slice(avctx, &h); - } else { -@@ -2847,8 +2838,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ - if (h->current_slice == 1) { - if (s->avctx->hwaccel && s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0) - return -1; -- if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_picture_start(s); - } - - s->current_picture_ptr->key_frame |= -@@ -2863,11 +2852,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ - if (avctx->hwaccel->decode_slice(avctx, &buf[buf_index - consumed], consumed) < 0) - return -1; - }else -- if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- static const uint8_t start_code[] = {0x00, 0x00, 0x01}; -- ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code)); -- ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed ); -- }else - context_count++; - } - break; -@@ -3396,20 +3380,3 @@ AVCodec h264_decoder = { - .flush= flush_dpb, - .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - }; -- --#if CONFIG_H264_VDPAU_DECODER --AVCodec h264_vdpau_decoder = { -- "h264_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_H264, -- sizeof(H264Context), -- ff_h264_decode_init, -- NULL, -- ff_h264_decode_end, -- decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- .flush= flush_dpb, -- .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE}, --}; --#endif -diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c -index 0af24ad..8a2e93c 100644 ---- a/ffmpeg/libavcodec/mpeg12.c -+++ b/ffmpeg/libavcodec/mpeg12.c -@@ -35,7 +35,6 @@ - #include "mpeg12data.h" - #include "mpeg12decdata.h" - #include "bytestream.h" --#include "vdpau_internal.h" - #include "xvmc_internal.h" - - //#undef NDEBUG -@@ -1226,12 +1225,7 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx){ - - if(avctx->xvmc_acceleration) - return avctx->get_format(avctx,pixfmt_xvmc_mpg2_420); -- else if(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- if(avctx->codec_id == CODEC_ID_MPEG1VIDEO) -- return PIX_FMT_VDPAU_MPEG1; -- else -- return PIX_FMT_VDPAU_MPEG2; -- }else{ -+ else{ - if(s->chroma_format < 2) - return avctx->get_format(avctx,ff_hwaccel_pixfmt_list_420); - else if(s->chroma_format == 2) -@@ -1324,9 +1318,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ - avctx->pix_fmt = mpeg_get_pixelformat(avctx); - avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - //until then pix_fmt may be changed right after codec init -- if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || -- avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -+ if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel ) - if( avctx->idct_algo == FF_IDCT_AUTO ) - avctx->idct_algo = FF_IDCT_SIMPLE; - -@@ -2065,8 +2057,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) - avctx->pix_fmt = mpeg_get_pixelformat(avctx); - avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - -- if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -+ if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel ) - if( avctx->idct_algo == FF_IDCT_AUTO ) - avctx->idct_algo = FF_IDCT_SIMPLE; - -@@ -2297,9 +2288,6 @@ static int decode_chunks(AVCodecContext *avctx, - s2->error_count += s2->thread_context[i]->error_count; - } - -- if (CONFIG_MPEG_VDPAU_DECODER && avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count); -- - if (slice_end(avctx, picture)) { - if(s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice - *data_size = sizeof(AVPicture); -@@ -2446,11 +2434,6 @@ static int decode_chunks(AVCodecContext *avctx, - return -1; - } - -- if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) { -- s->slice_count++; -- break; -- } -- - if(avctx->thread_count > 1){ - int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count; - if(threshold <= mb_y){ -@@ -2578,36 +2561,3 @@ AVCodec mpeg_xvmc_decoder = { - }; - - #endif -- --#if CONFIG_MPEG_VDPAU_DECODER --AVCodec mpeg_vdpau_decoder = { -- "mpegvideo_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG2VIDEO, -- sizeof(Mpeg1Context), -- mpeg_decode_init, -- NULL, -- mpeg_decode_end, -- mpeg_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, -- .flush= flush, -- .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"), --}; --#endif -- --#if CONFIG_MPEG1_VDPAU_DECODER --AVCodec mpeg1_vdpau_decoder = { -- "mpeg1video_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG1VIDEO, -- sizeof(Mpeg1Context), -- mpeg_decode_init, -- NULL, -- mpeg_decode_end, -- mpeg_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, -- .flush= flush, -- .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), --}; --#endif -- -diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c -index b339f78..1928d03 100644 ---- a/ffmpeg/libavcodec/mpeg4videodec.c -+++ b/ffmpeg/libavcodec/mpeg4videodec.c -@@ -2249,20 +2249,3 @@ AVCodec mpeg4_decoder = { - .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), - .pix_fmts= ff_hwaccel_pixfmt_list_420, - }; -- -- --#if CONFIG_MPEG4_VDPAU_DECODER --AVCodec mpeg4_vdpau_decoder = { -- "mpeg4_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG4, -- sizeof(MpegEncContext), -- decode_init, -- NULL, -- ff_h263_decode_end, -- ff_h263_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), -- .pix_fmts= (const enum PixelFormat[]){PIX_FMT_VDPAU_MPEG4, PIX_FMT_NONE}, --}; --#endif -diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c -index 684bdfe..1bd9d5c 100644 ---- a/ffmpeg/libavcodec/mpegvideo.c -+++ b/ffmpeg/libavcodec/mpegvideo.c -@@ -116,6 +116,7 @@ const enum PixelFormat ff_pixfmt_list_420[] = { - const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = { - PIX_FMT_DXVA2_VLD, - PIX_FMT_VAAPI_VLD, -+ PIX_FMT_VDPAU, - PIX_FMT_YUV420P, - PIX_FMT_NONE - }; -@@ -1056,7 +1057,6 @@ void MPV_frame_end(MpegEncContext *s) - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){ - ff_xvmc_field_end(s); - }else if(!s->avctx->hwaccel -- && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) - && s->unrestricted_mv - && s->current_picture.reference - && !s->intra_only -diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c -index 8c9cbcd..dbf2ded 100644 ---- a/ffmpeg/libavcodec/vc1dec.c -+++ b/ffmpeg/libavcodec/vc1dec.c -@@ -37,7 +37,6 @@ - #include "unary.h" - #include "simple_idct.h" - #include "mathops.h" --#include "vdpau_internal.h" - - #undef NDEBUG - #include -@@ -3167,13 +3166,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, - s->current_picture_ptr= &s->picture[i]; - } - -- if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- if (v->profile < PROFILE_ADVANCED) -- avctx->pix_fmt = PIX_FMT_VDPAU_WMV3; -- else -- avctx->pix_fmt = PIX_FMT_VDPAU_VC1; -- } -- - //for advanced profile we may need to parse and unescape data - if (avctx->codec_id == CODEC_ID_VC1) { - int buf_size2 = 0; -@@ -3190,8 +3182,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, - if(size <= 0) continue; - switch(AV_RB32(start)){ - case VC1_CODE_FRAME: -- if (avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -+ if (avctx->hwaccel) - buf_start = start; - buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); - break; -@@ -3278,10 +3269,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, - s->me.qpel_put= s->dsp.put_qpel_pixels_tab; - s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab; - -- if ((CONFIG_VC1_VDPAU_DECODER) -- &&s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_vc1_decode_picture(s, buf_start, (buf + buf_size) - buf_start); -- else if (avctx->hwaccel) { -+ if (avctx->hwaccel) { - if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0) - return -1; - if (avctx->hwaccel->decode_slice(avctx, buf_start, (buf + buf_size) - buf_start) < 0) -@@ -3371,37 +3359,3 @@ AVCodec wmv3_decoder = { - .pix_fmts = ff_hwaccel_pixfmt_list_420 - }; - #endif -- --#if CONFIG_WMV3_VDPAU_DECODER --AVCodec wmv3_vdpau_decoder = { -- "wmv3_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_WMV3, -- sizeof(VC1Context), -- vc1_decode_init, -- NULL, -- vc1_decode_end, -- vc1_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- NULL, -- .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE} --}; --#endif -- --#if CONFIG_VC1_VDPAU_DECODER --AVCodec vc1_vdpau_decoder = { -- "vc1_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_VC1, -- sizeof(VC1Context), -- vc1_decode_init, -- NULL, -- vc1_decode_end, -- vc1_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- NULL, -- .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE} --}; --#endif -diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c -index bd721e8..09ca45e 100644 ---- a/ffmpeg/libavcodec/vdpau.c -+++ b/ffmpeg/libavcodec/vdpau.c -@@ -30,7 +30,6 @@ - #include - - #include "vdpau.h" --#include "vdpau_internal.h" - - /** - * \addtogroup VDPAU_Decoding -@@ -38,15 +37,57 @@ - * @{ - */ - --void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) -+static void vdpau_h264_fill_field_order_cnt(int32_t field_order_cnt[2], Picture *pic, int pic_structure) - { -- H264Context *h = s->avctx->priv_data; -+ int i; -+ for (i = 0; i < 2; i++) { -+ const int poc = pic->field_poc[i]; -+ field_order_cnt[i] = poc != INT_MAX ? poc : 0; -+ } -+} -+ -+static void vdpau_h264_init_picture(VdpReferenceFrameH264 *rf) -+{ -+ rf->surface = VDP_INVALID_HANDLE; -+ rf->is_long_term = 0; -+ rf->top_is_reference = 0; -+ rf->bottom_is_reference = 0; -+ rf->field_order_cnt[0] = 0; -+ rf->field_order_cnt[1] = 0; -+ rf->frame_idx = 0; -+} -+ -+static void vdpau_h264_fill_picture(VdpReferenceFrameH264 *rf, Picture *pic, int pic_structure) -+{ -+ struct vdpau_render_state *render; -+ -+ assert(rf); -+ assert(pic); -+ -+ if (pic_structure == 0) -+ pic_structure = pic->reference; -+ -+ render = (struct vdpau_render_state *)pic->data[3]; -+ assert(render); -+ -+ rf->surface = render->surface; -+ rf->is_long_term = pic->reference && pic->long_ref; -+ rf->top_is_reference = (pic_structure & PICT_TOP_FIELD) != 0; -+ rf->bottom_is_reference = (pic_structure & PICT_BOTTOM_FIELD) != 0; -+ rf->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -+ -+ vdpau_h264_fill_field_order_cnt(rf->field_order_cnt, pic, pic_structure); -+} -+ -+static void vdpau_h264_set_reference_frames(H264Context *h) -+{ -+ MpegEncContext * const s = &h->s; - struct vdpau_render_state *render, *render_ref; - VdpReferenceFrameH264 *rf, *rf2; - Picture *pic; - int i, list, pic_frame_idx; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - rf = &render->info.h264.referenceFrames[0]; -@@ -62,7 +103,7 @@ void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) - continue; - pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; - -- render_ref = (struct vdpau_render_state *)pic->data[0]; -+ render_ref = (struct vdpau_render_state *)pic->data[3]; - assert(render_ref); - - rf2 = &render->info.h264.referenceFrames[0]; -@@ -84,81 +125,93 @@ void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) - if (rf >= &render->info.h264.referenceFrames[H264_RF_COUNT]) - continue; - -- rf->surface = render_ref->surface; -- rf->is_long_term = pic->long_ref; -- rf->top_is_reference = (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; -- rf->bottom_is_reference = (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; -- rf->field_order_cnt[0] = pic->field_poc[0]; -- rf->field_order_cnt[1] = pic->field_poc[1]; -- rf->frame_idx = pic_frame_idx; -+ vdpau_h264_fill_picture(rf, pic, pic->reference); - - ++rf; - } - } - -- for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) { -- rf->surface = VDP_INVALID_HANDLE; -- rf->is_long_term = 0; -- rf->top_is_reference = 0; -- rf->bottom_is_reference = 0; -- rf->field_order_cnt[0] = 0; -- rf->field_order_cnt[1] = 0; -- rf->frame_idx = 0; -- } -+ for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) -+ vdpau_h264_init_picture(rf); - } - --void ff_vdpau_add_data_chunk(MpegEncContext *s, -- const uint8_t *buf, int buf_size) -+static int vdpau_ensure_bitstream_buffers(struct vdpau_render_state *render) - { -- struct vdpau_render_state *render; -- -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -- assert(render); -- - render->bitstream_buffers= av_fast_realloc( - render->bitstream_buffers, - &render->bitstream_buffers_allocated, - sizeof(*render->bitstream_buffers)*(render->bitstream_buffers_used + 1) - ); - -- render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -- render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; -- render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; -- render->bitstream_buffers_used++; -+ if (!render->bitstream_buffers) -+ return -1; -+ -+ return 0; - } - --void ff_vdpau_h264_picture_start(MpegEncContext *s) -+static int vdpau_common_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) - { -- H264Context *h = s->avctx->priv_data; -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render; -- int i; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- for (i = 0; i < 2; ++i) { -- int foc = s->current_picture_ptr->field_poc[i]; -- if (foc == INT_MAX) -- foc = 0; -- render->info.h264.field_order_cnt[i] = foc; -+ render->bitstream_buffers_used = 0; -+ return 0; -+} -+ -+static int vdpau_common_end_frame(AVCodecContext *avctx) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (render->bitstream_buffers_used) { -+ ff_draw_horiz_band(s, 0, s->avctx->height); -+ render->bitstream_buffers_used = 0; - } -+ return 0; -+} - -- render->info.h264.frame_num = h->frame_num; -+static int vdpau_common_decode_slice(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_ensure_bitstream_buffers(render) < 0) -+ return -1; -+ -+ render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; -+ render->bitstream_buffers_used++; -+ return 0; - } - --void ff_vdpau_h264_picture_complete(MpegEncContext *s) -+static int vdpau_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -- H264Context *h = s->avctx->priv_data; -+ H264Context * const h = avctx->priv_data; -+ MpegEncContext * const s = &h->s; - struct vdpau_render_state *render; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- render->info.h264.slice_count = h->slice_num; -- if (render->info.h264.slice_count < 1) -- return; -+ vdpau_h264_set_reference_frames(h); - -- render->info.h264.is_reference = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE; -+ vdpau_h264_fill_field_order_cnt(render->info.h264.field_order_cnt, -+ s->current_picture_ptr, -+ s->picture_structure); -+ -+ /* fill VdpPictureInfoH264 struct */ -+ render->info.h264.is_reference = h->nal_ref_idc != 0; -+ render->info.h264.frame_num = h->frame_num; - render->info.h264.field_pic_flag = s->picture_structure != PICT_FRAME; - render->info.h264.bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD; - render->info.h264.num_ref_frames = h->sps.ref_frame_count; -@@ -185,19 +238,44 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s) - memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4)); - memcpy(render->info.h264.scaling_lists_8x8, h->pps.scaling_matrix8, sizeof(render->info.h264.scaling_lists_8x8)); - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+ render->info.h264.slice_count = 0; -+ -+ return vdpau_common_start_frame(avctx, buffer, size); - } - --void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, -- int buf_size, int slice_count) -+static int vdpau_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ static const uint8_t start_code_prefix_one_3byte[3] = { 0x00, 0x00, 0x01 }; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_ensure_bitstream_buffers(render) < 0) -+ return -1; -+ -+ render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream = start_code_prefix_one_3byte; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = sizeof(start_code_prefix_one_3byte); -+ render->bitstream_buffers_used++; -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.h264.slice_count; -+ return 0; -+} -+ -+static int vdpau_mpeg2_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render, *last, *next; - int i; - -- if (!s->current_picture_ptr) return; -+ if (!s->current_picture_ptr) return 0; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - /* fill VdpPictureInfoMPEG1Or2 struct */ -@@ -226,36 +304,47 @@ void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, - - switch(s->pict_type){ - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.mpeg.backward_reference = next->surface; - // no return here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - if (!last) // FIXME: Does this test make sense? - last = render; // predict second field from the first - render->info.mpeg.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ render->info.mpeg.slice_count = 0; - -- render->info.mpeg.slice_count = slice_count; -+ return vdpau_common_start_frame(avctx, buffer, size); -+} - -- if (slice_count) -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+static int vdpau_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.mpeg.slice_count; -+ return 0; - } - --void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, -- int buf_size) -+static int vdpau_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -- VC1Context *v = s->avctx->priv_data; -+ VC1Context * const v = avctx->priv_data; -+ MpegEncContext * const s = &v->s; - struct vdpau_render_state *render, *last, *next; - -- render = (struct vdpau_render_state *)s->current_picture.data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- /* fill LvPictureInfoVC1 struct */ -+ /* fill VdpPictureInfoVC1 struct */ - render->info.vc1.frame_coding_mode = v->fcm; - render->info.vc1.postprocflag = v->postprocflag; - render->info.vc1.pulldown = v->broadcast; -@@ -296,34 +385,47 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, - - switch(s->pict_type){ - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.vc1.backward_reference = next->surface; - // no break here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - if (!last) // FIXME: Does this test make sense? - last = render; // predict second field from the first - render->info.vc1.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ render->info.vc1.slice_count = 0; - -- render->info.vc1.slice_count = 1; -+ return vdpau_common_start_frame(avctx, buffer, size); -+} - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+static int vdpau_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ VC1Context * const v = avctx->priv_data; -+ MpegEncContext * const s = &v->s; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.vc1.slice_count; -+ return 0; - } - --void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, -- int buf_size) -+static int vdpau_mpeg4_decode_picture(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render, *last, *next; - int i; - -- if (!s->current_picture_ptr) return; -+ if (!s->current_picture_ptr) return 0; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - /* fill VdpPictureInfoMPEG4Part2 struct */ -@@ -352,21 +454,122 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, - - switch (s->pict_type) { - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.mpeg4.backward_reference = next->surface; - render->info.mpeg4.vop_coding_type = 2; - // no break here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - assert(last); - render->info.mpeg4.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ if (vdpau_common_start_frame(avctx, buffer, size) < 0) -+ return -1; - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ return vdpau_common_end_frame(avctx); -+} -+ -+static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ /* The `buffer' can be modified beyond this point so we pass the -+ * whole picture now to the decoder and let user-applications catch -+ * up immediately */ -+ return vdpau_mpeg4_decode_picture(avctx, buffer, size); - } - -+static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) -+{ -+ /* SKIP: everything is done in vdpau_mpeg4_start_frame() */ -+ return 0; -+} -+ -+static int vdpau_mpeg4_end_frame(av_unused AVCodecContext *avctx) -+{ -+ /* SKIP: everything is done in vdpau_mpeg4_start_frame() */ -+ return 0; -+} -+ -+#if CONFIG_MPEG1_VDPAU_HWACCEL -+AVHWAccel mpeg1_vdpau_hwaccel = { -+ .name = "mpeg1_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG1VIDEO, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg2_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_mpeg2_decode_slice, -+}; -+#endif -+ -+#if CONFIG_MPEG2_VDPAU_HWACCEL -+AVHWAccel mpeg2_vdpau_hwaccel = { -+ .name = "mpeg2_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG2VIDEO, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg2_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_mpeg2_decode_slice, -+}; -+#endif -+ -+#if CONFIG_H264_VDPAU_HWACCEL -+AVHWAccel h264_vdpau_hwaccel = { -+ .name = "h264_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_H264, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_h264_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_h264_decode_slice, -+}; -+#endif -+ -+#if CONFIG_WMV3_VDPAU_HWACCEL -+AVHWAccel wmv3_vdpau_hwaccel = { -+ .name = "wmv3_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_WMV3, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_vc1_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_vc1_decode_slice, -+}; -+#endif -+ -+#if CONFIG_VC1_VDPAU_HWACCEL -+AVHWAccel vc1_vdpau_hwaccel = { -+ .name = "vc1_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_VC1, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_vc1_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_vc1_decode_slice, -+}; -+#endif -+ -+#if CONFIG_MPEG4_VDPAU_HWACCEL -+AVHWAccel mpeg4_vdpau_hwaccel = { -+ .name = "mpeg4_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG4, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg4_start_frame, -+ .end_frame = vdpau_mpeg4_end_frame, -+ .decode_slice = vdpau_mpeg4_decode_slice, -+}; -+#endif -+ - /* @}*/ -diff --git a/ffmpeg/ffmpeg/libavutil/pixdesc.c b/ffmpeg/ffmpeg/libavutil/pixdesc.c -index e2bc649..1c2b773 100644 ---- a/ffmpeg/libavutil/pixdesc.c -+++ b/ffmpeg/libavutil/pixdesc.c -@@ -787,7 +787,13 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { - .comp = { - {0,1,1,0,7}, /* Y */ - {0,1,2,0,7}, /* A */ -- }, -+ } -+ }, -+ [PIX_FMT_VDPAU] = { -+ .name = "vdpau", -+ .log2_chroma_w = 1, -+ .log2_chroma_h = 1, -+ .flags = PIX_FMT_HWACCEL, - }, - }; - -diff --git a/ffmpeg/libavutil/pixfmt.h b/ffmpeg/libavutil/pixfmt.h -index 8ec91c8..2386a81 100644 ---- a/ffmpeg/libavutil/pixfmt.h -+++ b/ffmpeg/libavutil/pixfmt.h -@@ -133,6 +133,7 @@ enum PixelFormat { - PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1 - PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1 - PIX_FMT_Y400A, ///< 8bit gray, 8bit alpha -+ PIX_FMT_VDPAU, ///< HW decoding with VDPAU, Picture.data[3] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions - }; - -diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c -index 5b003fa..150e82c 100644 ---- a/libmpcodecs/vd_ffmpeg.c -+++ b/libmpcodecs/vd_ffmpeg.c -@@ -294,7 +294,7 @@ static int init(sh_video_t *sh){ - } - #endif /* CONFIG_VAAPI */ - #if CONFIG_VDPAU -- if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ -+ if(get_video_hwaccel() == HWACCEL_VDPAU){ - avctx->get_format = get_format; - } - #endif /* CONFIG_VDPAU */ -diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c -index 490644d..31c8064 100644 ---- a/libvo/vo_vdpau.c -+++ b/libvo/vo_vdpau.c -@@ -971,7 +971,7 @@ static int draw_slice(uint8_t *image[], int stride[], int w, int h, - int x, int y) - { - VdpStatus vdp_st; -- struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[0]; -+ struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[3]; - int max_refs = image_format == IMGFMT_VDPAU_H264 ? rndr->info.h264.num_ref_frames : 2; - - if (handle_preemption() < 0) -@@ -1074,10 +1074,10 @@ static uint32_t get_image(mp_image_t *mpi) - return VO_FALSE; - } - mpi->flags |= MP_IMGFLAG_DIRECT; -- mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = 0; -- mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = NULL; -+ mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = mpi->stride[3] = 0; -+ mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = mpi->planes[3] = NULL; - // hack to get around a check and to avoid a special-case in vd_ffmpeg.c -- mpi->planes[0] = (void *)rndr; -+ mpi->planes[0] = mpi->planes[3] = (void *)rndr; - mpi->num_planes = 1; - mpi->priv = rndr; - return VO_TRUE; ---- etc/codecs.conf.orig 2010-12-16 20:12:54.150000023 +0100 -+++ etc/codecs.conf 2010-12-16 20:28:00.636000024 +0100 - diff --git a/media-video/mplayer/files/vaapi-take3/01-mplayer-vaapi.patch b/media-video/mplayer/files/vaapi-take3/01-mplayer-vaapi.patch deleted file mode 100644 index 74939c763..000000000 --- a/media-video/mplayer/files/vaapi-take3/01-mplayer-vaapi.patch +++ /dev/null @@ -1,4012 +0,0 @@ -diff --git a/Makefile b/Makefile -index 2de75fb..fd4e503 100644 ---- a/Makefile -+++ b/Makefile -@@ -590,6 +590,7 @@ SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c - SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c - SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c - SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c -+SRCS_MPLAYER-$(VAAPI) += libvo/vo_vaapi.c - SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c - SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c - SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \ -@@ -643,6 +644,7 @@ SRCS_MPLAYER = command.c \ - libao2/audio_out.c \ - libvo/aspect.c \ - libvo/geometry.c \ -+ libvo/stats.c \ - libvo/video_out.c \ - libvo/vo_mpegpes.c \ - libvo/vo_null.c \ -diff --git a/cfg-common.h b/cfg-common.h -index c6dfef0..a280890 100644 ---- a/cfg-common.h -+++ b/cfg-common.h -@@ -521,6 +521,7 @@ const m_option_t common_opts[] = { - {"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, - {"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, - {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -+ {"va", &video_hwaccel_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, - - // postprocessing: - #ifdef CONFIG_FFMPEG -diff --git a/codec-cfg.c b/codec-cfg.c -index 4db74c5..2f160fb 100644 ---- a/codec-cfg.c -+++ b/codec-cfg.c -@@ -224,6 +224,13 @@ static const struct { - {"VDPAU_VC1",IMGFMT_VDPAU_VC1}, - {"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4}, - -+ {"VAAPI_MPEG2", IMGFMT_VAAPI_MPEG2}, -+ {"VAAPI_MPEG4", IMGFMT_VAAPI_MPEG4}, -+ {"VAAPI_H263", IMGFMT_VAAPI_H263}, -+ {"VAAPI_H264", IMGFMT_VAAPI_H264}, -+ {"VAAPI_WMV3", IMGFMT_VAAPI_WMV3}, -+ {"VAAPI_VC1", IMGFMT_VAAPI_VC1}, -+ - {NULL, 0} - }; - -diff --git a/configure b/configure -index 1e0f7fc..45e4574 100755 ---- a/configure -+++ b/configure -@@ -421,6 +421,9 @@ Codecs: - --disable-muxer=MUXER disable specified FFmpeg muxer - --enable-muxer=MUXER enable specified FFmpeg muxer - -+Hardware acceleration: -+ --enable-vaapi enable VA-API acceleration [disable] -+ - Video output: - --disable-vidix disable VIDIX [for x86 *nix] - --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in -@@ -450,6 +453,7 @@ Video output: - --enable-dvb enable DVB video output [autodetect] - --enable-mga enable mga_vid video output [autodetect] - --enable-xmga enable mga_vid X11 video output [autodetect] -+ --enable-xrender enable Xrender video output [autodetect] - --enable-xv enable Xv video output [autodetect] - --enable-xvmc enable XvMC acceleration [disable] - --enable-vdpau enable VDPAU acceleration [autodetect] -@@ -555,6 +559,7 @@ Use these options if autodetection fails: - --extra-libs-mencoder=FLAGS extra linker flags for MEncoder - --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA) - -+ --with-vaapi-prefix=PATH prefix to VA-API include and lib directories - --with-freetype-config=PATH path to freetype-config - --with-glib-config=PATH path to glib*-config - --with-gtk-config=PATH path to gtk*-config -@@ -618,8 +623,7 @@ libavparsers=$libavparsers_all - libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') - libavbsfs=$libavbsfs_all - libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') --# Disable all hardware accelerators for now. --libavhwaccels= -+libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL) echo $h;; esac; done) - libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') - libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//) - libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') -@@ -628,11 +632,15 @@ libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ff - libavprotocols=$libavprotocols_all - _mencoder=yes - _mplayer=yes -+_vaapi=auto -+_vaapi_glx=no -+_libgtop=auto - _x11=auto - _xshape=auto - _xss=auto - _dga1=auto - _dga2=auto -+_xrender=auto - _xv=auto - _xvmc=no #auto when complete - _vdpau=auto -@@ -855,6 +863,9 @@ for ac_option do - _xvmclib=$(echo $ac_option | cut -d '=' -f 2) - ;; - -+ --with-vaapi-prefix=*) -+ _vaapiprefix=$(echo $ac_option | cut -d '=' -f 2) -+ ;; - --with-sdl-config=*) - _sdlconfig=$(echo $ac_option | cut -d '=' -f 2) - ;; -@@ -970,10 +981,14 @@ for ac_option do - --disable-xshape) _xshape=no ;; - --enable-xss) _xss=yes ;; - --disable-xss) _xss=no ;; -+ --enable-xrender) _xrender=yes ;; -+ --disable-xrender) _xrender=no ;; - --enable-xv) _xv=yes ;; - --disable-xv) _xv=no ;; - --enable-xvmc) _xvmc=yes ;; - --disable-xvmc) _xvmc=no ;; -+ --enable-vaapi) _vaapi=yes ;; -+ --disable-vaapi) _vaapi=no ;; - --enable-vdpau) _vdpau=yes ;; - --disable-vdpau) _vdpau=no ;; - --enable-sdl) _sdl=yes ;; -@@ -1068,6 +1083,8 @@ for ac_option do - --disable-twolame) _twolame=no ;; - --enable-libcdio) _libcdio=yes ;; - --disable-libcdio) _libcdio=no ;; -+ --enable-libgtop) _libgtop=yes ;; -+ --disable-libgtop) _libgtop=no ;; - --enable-liblzo) _liblzo=yes ;; - --disable-liblzo) _liblzo=no ;; - --enable-libvorbis) _libvorbis=yes ;; -@@ -3895,6 +3912,28 @@ fi - echores "$_gettimeofday" - - -+echocheck "clock_gettime()" -+cat > $TMPC << EOF -+#include -+int main(void) { -+ struct timespec t; -+ clock_gettime(CLOCK_REALTIME, &t); -+ return 0; -+} -+EOF -+_clock_gettime=no -+cc_check -lrt && _clock_gettime=yes -+if test "$_clock_gettime" = yes ; then -+ def_clock_gettime='#define HAVE_CLOCK_GETTIME 1' -+ extra_ldflags="$extra_ldflags -lrt" -+ _need_clock_gettime=no -+else -+ def_clock_gettime='#undef HAVE_CLOCK_GETTIME' -+ _need_clock_gettime=yes -+fi -+echores "$_clock_gettime" -+ -+ - echocheck "glob()" - _glob=no - statement_check glob.h 'glob("filename", 0, 0, 0)' && _glob=yes -@@ -4265,7 +4304,7 @@ else - novomodules="x11 $novomodules" - res_comment="check if the dev(el) packages are installed" - # disable stuff that depends on X -- _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no -+ _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vaapi=no ; _vdpau=no - fi - echores "$_x11" - -@@ -4312,6 +4351,30 @@ else - fi - - -+echocheck "Xrender" -+if test "$_xrender" = auto ; then -+ cat > $TMPC < -+#include -+int main(void) { -+ (void) XRenderCreatePicture(0, 0, 0, 0, 0); -+ return 0; } -+EOF -+ _xrender=no -+ cc_check -lXrender && _xrender=yes -+fi -+ -+if test "$_xrender" = yes ; then -+ def_xrender='#define CONFIG_XRENDER 1' -+ libs_mplayer="$libs_mplayer -lXrender" -+ vomodules="xrender $vomodules" -+else -+ def_xrender='#undef CONFIG_XRENDER' -+ novomodules="xrender $novomodules" -+fi -+echores "$_xrender" -+ -+ - echocheck "Xv" - if test "$_xv" = auto ; then - _xv=no -@@ -4791,6 +4854,31 @@ echores "$_corevideo" - fi #if darwin - - -+echocheck "libgtop" -+if test "$_libgtop" = auto ; then -+ _libgtop=no -+ if $_pkg_config --exists 'libgtop-2.0' ; then -+ -+cat > $TMPC << EOF -+#include -+#include -+int main(void) { return 0; } -+EOF -+cc_check $($_pkg_config --libs --cflags libgtop-2.0) && tmp_run && _libgtop=yes -+ -+ fi -+fi -+echores "$_libgtop" -+ -+if test "$_libgtop" = yes ; then -+ def_libgtop='#define CONFIG_LIBGTOP 1' -+ libs_mplayer="$libs_mplayer $($_pkg_config --libs libgtop-2.0)" -+ extra_cflags="$extra_cflags $($_pkg_config --cflags libgtop-2.0)" -+else -+ def_libgtop='#define CONFIG_LIBGTOP 0' -+fi -+ -+ - echocheck "PNG support" - if test "$_png" = auto ; then - _png=no -@@ -5152,6 +5240,23 @@ else - fi - echores "$_gl" - -+echocheck "OpenGL utilities (GLU)" -+_glu=no -+if test "$_gl" = yes; then -+ cat > $TMPC << EOF -+#include -+int main(void) { -+ gluPerspective(0.0, 0.0, 0.0, 0.0); -+ return 0; -+} -+EOF -+ cc_check -lGLU && _glu=yes -+fi -+if test "$_glu" = yes; then -+ libs_mplayer="$libs_mplayer -lGLU" -+fi -+echores "$_glu" -+ - - echocheck "MatrixView" - if test "$_gl" = no ; then -@@ -5719,6 +5824,57 @@ echores "$_dart" - fi #if os2 - - -+######################### -+# HARDWARE ACCELERATORS # -+######################### -+ -+echocheck "VA-API" -+if test -n "$_vaapiprefix"; then -+ _vaapiinc="-I$_vaapiprefix/include" -+ _vaapilib="-L$_vaapiprefix/lib" -+fi -+if test "$_vaapi" = yes -o "$_vaapi" = auto; then -+ _vaapi=no -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplay(0); return 0; } -+EOF -+ cc_check $_vaapiinc $_vaapilib -lva-x11 && _vaapi=yes -+fi -+ -+if test "$_vaapi" = yes ; then -+ def_vaapi='#define CONFIG_VAAPI 1' -+ extra_cflags="$extra_cflags $_vaapiinc" -+ libs_mencoder="$libs_mencoder $_vaapilib -lva" -+ libs_mplayer="$libs_mplayer $_vaapilib -lva -lva-x11" -+ vomodules="vaapi $vomodules" -+else -+ def_vaapi='#define CONFIG_VAAPI 0' -+ novomodules="vaapi $novomodules" -+ libavhwaccels=`echo $libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VAAPI_HWACCEL//g"` -+fi -+echores "$_vaapi" -+ -+echocheck "VA-API (with GLX support)" -+if test "$_vaapi" = yes; then -+ _vaapi_glx=no -+ if test "$_gl" = "yes" -a "$_glu" = yes; then -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplayGLX(0); return 0; } -+EOF -+ cc_check $_vaapiinc $_vaapilib -lva-glx && _vaapi_glx=yes -+ fi -+fi -+if test "$_vaapi_glx" = yes; then -+ def_vaapi_glx='#define CONFIG_VAAPI_GLX 1' -+ libs_mplayer="$libs_mplayer -lva-glx" -+else -+ def_vaapi_glx='#define CONFIG_VAAPI_GLX 0' -+fi -+echores "$_vaapi_glx" -+ -+ - # set default CD/DVD devices - if win32 || os2 ; then - default_cdrom_device="D:" -@@ -8051,6 +8207,7 @@ TV_V4L2 = $_tv_v4l2 - TWOLAME=$_twolame - UNRAR_EXEC = $_unrar_exec - V4L2 = $_v4l2 -+VAAPI = $_vaapi - VCD = $_vcd - VDPAU = $_vdpau - VESA = $_vesa -@@ -8140,7 +8297,9 @@ CONFIG_MLIB = $_mlib - CONFIG_MUXERS = $_mencoder - CONFIG_POSTPROC = yes - CONFIG_RTPDEC = $networking -+CONFIG_VAAPI = $_vaapi - CONFIG_VDPAU = $_vdpau -+CONFIG_XRENDER = $_xrender - CONFIG_XVMC = $_xvmc - CONFIG_ZLIB = $_zlib - -@@ -8254,6 +8413,7 @@ $def_winsock2_h - - - /* system functions */ -+$def_clock_gettime - $def_gethostbyname2 - $def_gettimeofday - $def_glob -@@ -8284,6 +8444,7 @@ $def_extern_asm - $def_extern_prefix - $def_iconv - $def_kstat -+$def_libgtop - $def_macosx_bundle - $def_macosx_finder - $def_maemo -@@ -8513,6 +8674,8 @@ $def_tdfxfb - $def_tdfxvid - $def_tga - $def_v4l2 -+$def_vaapi -+$def_vaapi_glx - $def_vdpau - $def_vesa - $def_vidix -@@ -8538,6 +8701,7 @@ $def_xf86keysym - $def_xinerama - $def_xmga - $def_xss -+$def_xrender - $def_xv - $def_xvmc - $def_xvr100 -diff --git a/etc/codecs.conf b/etc/codecs.conf -index d353bb5..e39a926 100644 ---- a/etc/codecs.conf -+++ b/etc/codecs.conf -@@ -212,6 +212,7 @@ videocodec ffmpeg2 - fourcc slif ; SoftLab MPEG-2 I-frames Codec - driver ffmpeg - dll "mpeg2video" -+ out VAAPI_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -941,6 +942,7 @@ videocodec ffwmv3 - fourcc WMV3,wmv3 - driver ffmpeg - dll wmv3 -+ out VAAPI_WMV3 - out YV12,I420,IYUV - - videocodec ffwmvp -@@ -967,6 +969,7 @@ videocodec ffvc1 - fourcc vc-1,VC-1 - driver ffmpeg - dll vc1 -+ out VAAPI_VC1 - out YV12,I420,IYUV - - videocodec ffvc1vdpau -@@ -989,6 +992,7 @@ videocodec ffh264 - format 0x10000005 - driver ffmpeg - dll h264 -+ out VAAPI_H264 - out YV12,I420,IYUV - - videocodec ffh264vdpau -@@ -1058,6 +1062,7 @@ videocodec ffodivx - fourcc SIPP ; Samsung SHR-6040 - driver ffmpeg - dll mpeg4 ;opendivx -+ out VAAPI_MPEG4 - out YV12,I420,IYUV - - videocodec ffodivxvdpau -@@ -1646,6 +1651,7 @@ videocodec ffh263 - fourcc VX1K ; Agora Labs VX1000S H263 - driver ffmpeg - dll h263 -+ out VAAPI_H263 - out YV12,I420,IYUV - - videocodec ffzygo -diff --git a/ffmpeg/libavcodec/vaapi_vc1.c b/ffmpeg/libavcodec/vaapi_vc1.c -index 2c24042..34e9056 100644 ---- a/ffmpeg/libavcodec/vaapi_vc1.c -+++ b/ffmpeg/libavcodec/vaapi_vc1.c -@@ -160,6 +160,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - pic_param->sequence_fields.bits.syncmarker = s->resync_marker; - pic_param->sequence_fields.bits.rangered = v->rangered; - pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames; -+ pic_param->sequence_fields.bits.profile = v->profile; - pic_param->coded_width = s->avctx->coded_width; - pic_param->coded_height = s->avctx->coded_height; - pic_param->entrypoint_fields.value = 0; /* reset all bits */ -diff --git a/fmt-conversion.c b/fmt-conversion.c -index 9e88100..bd32ce8 100644 ---- a/fmt-conversion.c -+++ b/fmt-conversion.c -@@ -18,14 +18,16 @@ - - #include "mp_msg.h" - #include "libavutil/avutil.h" -+#include "libavcodec/avcodec.h" - #include "libmpcodecs/img_format.h" - #include "libavutil/samplefmt.h" - #include "libaf/af_format.h" - #include "fmt-conversion.h" - - static const struct { - int fmt; - enum PixelFormat pix_fmt; -+ enum CodecID codec_id; - } conversion_map[] = { - {IMGFMT_ARGB, PIX_FMT_ARGB}, - {IMGFMT_BGRA, PIX_FMT_BGRA}, -@@ -95,6 +97,17 @@ static const struct { - {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, - {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, - {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, -+ -+ /* VA-API formats */ -+ {IMGFMT_VAAPI_MPEG2, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG2_IDCT,PIX_FMT_VAAPI_IDCT, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG2_MOCO,PIX_FMT_VAAPI_MOCO, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG4, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG4}, -+ {IMGFMT_VAAPI_H263, PIX_FMT_VAAPI_VLD, CODEC_ID_H263}, -+ {IMGFMT_VAAPI_H264, PIX_FMT_VAAPI_VLD, CODEC_ID_H264}, -+ {IMGFMT_VAAPI_WMV3, PIX_FMT_VAAPI_VLD, CODEC_ID_WMV3}, -+ {IMGFMT_VAAPI_VC1, PIX_FMT_VAAPI_VLD, CODEC_ID_VC1}, -+ - {0, PIX_FMT_NONE} - }; - -@@ -111,12 +124,14 @@ enum PixelFormat imgfmt2pixfmt(int fmt) - return pix_fmt; - } - --int pixfmt2imgfmt(enum PixelFormat pix_fmt) -+int pixfmt2imgfmt(enum PixelFormat pix_fmt, int codec_id) - { - int i; - int fmt; - for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++) -- if (conversion_map[i].pix_fmt == pix_fmt) -+ if (conversion_map[i].pix_fmt == pix_fmt && -+ (conversion_map[i].codec_id == 0 || -+ conversion_map[i].codec_id == codec_id)) - break; - fmt = conversion_map[i].fmt; - if (!fmt) ---- a/fmt-conversion.h 2011-03-22 16:20:04.000000000 +0100 -+++ b/fmt-conversion.h 2011-04-06 21:00:34.561717643 +0200 -@@ -24,7 +24,7 @@ - #include "libavutil/samplefmt.h" - - enum PixelFormat imgfmt2pixfmt(int fmt); --int pixfmt2imgfmt(enum PixelFormat pix_fmt); -+int pixfmt2imgfmt(enum PixelFormat pix_fmt, int codec_id); - enum AVSampleFormat affmt2samplefmt(int fmt); - int samplefmt2affmt(enum AVSampleFormat sample_fmt); - diff --git a/fmt-conversion.h b/fmt-conversion.h -index 9e133a8..962ca4e 100644 -diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c -index 4f7ffb2..0da5434 100644 ---- a/gui/mplayer/gtk/opts.c -+++ b/gui/mplayer/gtk/opts.c -@@ -66,9 +66,11 @@ static GtkWidget * CLVDrivers; - GtkWidget * prEFontName; - GtkWidget * prEDVDDevice; - GtkWidget * prECDRomDevice; -+static GtkWidget * EVHW; - static GtkWidget * EVFM; - static GtkWidget * EAFM; - -+static GtkWidget * CBVHW; - static GtkWidget * CBVFM; - static GtkWidget * CBAFM; - static GtkWidget * CBAudioEqualizer; -@@ -354,6 +356,26 @@ void ShowPreferences( void ) - // -- 5. page - gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); - if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 ); -+ -+ { -+ int i; -+ GList * Items = NULL; -+ char * name = NULL; -+ -+ Items = g_list_append(Items, MSGTR_PREFERENCES_None); -+ for (i = 0; i < HWACCEL_COUNT; i++) { -+ const char *hwaccel_name = get_video_hwaccel_name(i); -+ if (!hwaccel_name) -+ continue; -+ Items = g_list_append(Items, hwaccel_name); -+ if (video_hwaccel_name && !gstrcmp(video_hwaccel_name, get_video_hwaccel_short_name(i) ) ) name = hwaccel_name; -+ } -+ gtk_combo_set_popdown_strings(GTK_COMBO(CBVHW), Items); -+ g_list_free(Items); -+ if (name) -+ gtk_entry_set_text(GTK_ENTRY(EVHW), name); -+ } -+ - { - int i; - GList * Items = NULL; -@@ -600,6 +622,17 @@ static void prButton( GtkButton * button, gpointer user_data ) - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1; - - { -+ int i; -+ const char *tmp = gtk_entry_get_text(GTK_ENTRY(EVHW)); -+ for (i = 0; i < HWACCEL_COUNT; i++) { -+ if (!gstrcmp(tmp, get_video_hwaccel_name(i))) { -+ video_hwaccel_name = get_video_hwaccel_short_name(i); -+ break; -+ } -+ } -+ } -+ -+ { - int i; - const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); - for( i=0;mpcodecs_vd_drivers[i];i++ ) -@@ -1201,6 +1234,20 @@ GtkWidget * create_Preferences( void ) - - hbox5=AddHBox( vbox602,1 ); - -+ AddLabel( MSGTR_PREFERENCES_VideoHardwareAcceleration,hbox5 ); -+ -+ CBVHW=gtk_combo_new(); -+ gtk_widget_set_name( CBVHW,"CBVHW" ); -+ gtk_widget_show( CBVHW ); -+ gtk_box_pack_start( GTK_BOX( hbox5 ),CBVHW,TRUE,TRUE,0 ); -+ -+ EVHW=GTK_COMBO( CBVHW )->entry; -+ gtk_widget_set_name( EVHW,"CEVHW" ); -+ gtk_entry_set_editable( GTK_ENTRY( EVHW ),FALSE ); -+ gtk_widget_show( EVHW ); -+ -+ hbox5=AddHBox( vbox602,1 ); -+ - AddLabel( MSGTR_PREFERENCES_VideoCodecFamily,hbox5 ); - - CBVFM=gtk_combo_new(); -diff --git a/help/help_mp-en.h b/help/help_mp-en.h -index d9d8166..bd2c99c 100644 ---- a/help/help_mp-en.h -+++ b/help/help_mp-en.h -@@ -721,6 +721,7 @@ static const char help_text[]= - #define MSGTR_PREFERENCES_IDX "Rebuild index table, if needed" - #define MSGTR_PREFERENCES_VideoCodecFamily "Video codec family:" - #define MSGTR_PREFERENCES_AudioCodecFamily "Audio codec family:" -+#define MSGTR_PREFERENCES_VideoHardwareAcceleration "Video hardware acceleration:" - #define MSGTR_PREFERENCES_FRAME_OSD_Level "OSD level" - #define MSGTR_PREFERENCES_FRAME_Subtitle "Subtitle" - #define MSGTR_PREFERENCES_FRAME_Font "Font" -@@ -1656,6 +1657,7 @@ static const char help_text[]= - #define MSGTR_MPCODECS_UnexpectedInitVoError "[VD_FFMPEG] Unexpected init_vo error.\n" - #define MSGTR_MPCODECS_UnrecoverableErrorRenderBuffersNotTaken "[VD_FFMPEG] Unrecoverable error, render buffers not taken.\n" - #define MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed "[VD_FFMPEG] Only buffers allocated by vo_xvmc allowed.\n" -+#define MSGTR_MPCODECS_VAAPIAcceleratedCodec "[VD_FFMPEG] VA API accelerated codec.\n" - - // libmpcodecs/ve_lavc.c - #define MSGTR_MPCODECS_HighQualityEncodingSelected "[VE_LAVC] High quality encoding selected (non-realtime)!\n" -diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c -index 95249c5..172864b 100644 ---- a/libmpcodecs/dec_video.c -+++ b/libmpcodecs/dec_video.c -@@ -53,9 +53,47 @@ - int field_dominance = -1; - - int divx_quality = 0; -+char *video_hwaccel_name=NULL; - - const vd_functions_t *mpvdec = NULL; - -+int get_video_hwaccel(void) -+{ -+ static int video_hwaccel = -1; -+ if (video_hwaccel < 0) { -+ video_hwaccel = HWACCEL_NONE; -+ if (video_hwaccel_name) { -+ if (!strcmp(video_hwaccel_name,"xvmc")) -+ video_hwaccel = HWACCEL_XVMC; -+ else if (!strcmp(video_hwaccel_name,"vaapi")) -+ video_hwaccel = HWACCEL_VAAPI; -+ else if (!strcmp(video_hwaccel_name,"vdpau")) -+ video_hwaccel = HWACCEL_VDPAU; -+ } -+ } -+ return video_hwaccel; -+} -+ -+const char *get_video_hwaccel_name(int hwaccel) -+{ -+ switch (hwaccel) { -+ case HWACCEL_XVMC: return "XvMC"; -+ case HWACCEL_VAAPI: return "VA API"; -+ case HWACCEL_VDPAU: return "VDPAU"; -+ } -+ return NULL; -+} -+ -+const char *get_video_hwaccel_short_name(int hwaccel) -+{ -+ switch (hwaccel) { -+ case HWACCEL_XVMC: return "xvmc"; -+ case HWACCEL_VAAPI: return "vaapi"; -+ case HWACCEL_VDPAU: return "vdpau"; -+ } -+ return NULL; -+} -+ - int get_video_quality_max(sh_video_t *sh_video) - { - vf_instance_t *vf = sh_video->vfilter; -diff --git a/libmpcodecs/dec_video.h b/libmpcodecs/dec_video.h -index 4be4205..1a51635 100644 ---- a/libmpcodecs/dec_video.h -+++ b/libmpcodecs/dec_video.h -@@ -21,6 +21,14 @@ - - #include "libmpdemux/stheader.h" - -+enum { -+ HWACCEL_NONE = 0, -+ HWACCEL_XVMC, -+ HWACCEL_VAAPI, -+ HWACCEL_VDPAU, -+ HWACCEL_COUNT -+}; -+ - extern int field_dominance; - - // dec_video.c: -@@ -41,6 +49,11 @@ int set_rectangle(sh_video_t *sh_video, int param, int value); - void resync_video_stream(sh_video_t *sh_video); - int get_current_video_decoder_lag(sh_video_t *sh_video); - -+int get_video_hwaccel(void); -+const char *get_video_hwaccel_name(int hwaccel); -+const char *get_video_hwaccel_short_name(int hwaccel); -+ - extern int divx_quality; -+extern char *video_hwaccel_name; - - #endif /* MPLAYER_DEC_VIDEO_H */ -diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c -index ba87042..641b61e 100644 ---- a/libmpcodecs/img_format.c -+++ b/libmpcodecs/img_format.c -@@ -96,6 +96,14 @@ const char *vo_format_name(int format) - case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first"; - case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation"; - case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT"; -+ case IMGFMT_VAAPI_MPEG2: return "MPEG-2 VA-API Acceleration"; -+ case IMGFMT_VAAPI_MPEG2_IDCT: return "MPEG-2 VA-API Acceleration (Motion Compensation and IDCT)"; -+ case IMGFMT_VAAPI_MPEG2_MOCO: return "MPEG-2 VA-API Acceleration (Motion Compensation)"; -+ case IMGFMT_VAAPI_MPEG4: return "MPEG-4 VA-API Acceleration"; -+ case IMGFMT_VAAPI_H263: return "H.263 VA-API Acceleration"; -+ case IMGFMT_VAAPI_H264: return "H.264 VA-API Acceleration"; -+ case IMGFMT_VAAPI_WMV3: return "WMV3 VA-API Acceleration"; -+ case IMGFMT_VAAPI_VC1: return "VC-1 VA-API Acceleration"; - case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration"; - case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration"; - case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration"; -diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h -index c95ed4d..403690e 100644 ---- a/libmpcodecs/img_format.h -+++ b/libmpcodecs/img_format.h -@@ -182,6 +182,26 @@ - #define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02) - #define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82) - -+/* VA-API Formats */ -+ -+#define IMGFMT_VAAPI 0x56410000 /* 'VA'00 */ -+#define IMGFMT_VAAPI_MASK 0xFFFF0000 -+#define IMGFMT_IS_VAAPI(fmt) (((fmt) & IMGFMT_VAAPI_MASK) == IMGFMT_VAAPI) -+#define IMGFMT_VAAPI_CODEC_MASK 0x000000F0 -+#define IMGFMT_VAAPI_CODEC(fmt) ((fmt) & IMGFMT_VAAPI_CODEC_MASK) -+#define IMGFMT_VAAPI_CODEC_MPEG2 (0x10) -+#define IMGFMT_VAAPI_CODEC_MPEG4 (0x20) -+#define IMGFMT_VAAPI_CODEC_H264 (0x30) -+#define IMGFMT_VAAPI_CODEC_VC1 (0x40) -+#define IMGFMT_VAAPI_MPEG2 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2) -+#define IMGFMT_VAAPI_MPEG2_IDCT (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2|1) -+#define IMGFMT_VAAPI_MPEG2_MOCO (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2|2) -+#define IMGFMT_VAAPI_MPEG4 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG4) -+#define IMGFMT_VAAPI_H263 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG4|1) -+#define IMGFMT_VAAPI_H264 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_H264) -+#define IMGFMT_VAAPI_VC1 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_VC1) -+#define IMGFMT_VAAPI_WMV3 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_VC1|1) -+ - // VDPAU specific format. - #define IMGFMT_VDPAU 0x1DC80000 - #define IMGFMT_VDPAU_MASK 0xFFFF0000 -@@ -193,7 +213,9 @@ - #define IMGFMT_VDPAU_VC1 (IMGFMT_VDPAU|0x05) - #define IMGFMT_VDPAU_MPEG4 (IMGFMT_VDPAU|0x06) - --#define IMGFMT_IS_HWACCEL(fmt) (IMGFMT_IS_VDPAU(fmt) || IMGFMT_IS_XVMC(fmt)) -+#define IMGFMT_IS_HWACCEL(fmt) (IMGFMT_IS_VAAPI(fmt) || \ -+ IMGFMT_IS_VDPAU(fmt) || \ -+ IMGFMT_IS_XVMC(fmt)) - - typedef struct { - void* data; -diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c -index bdec830..63a7df8 100644 ---- a/libmpcodecs/vd.c -+++ b/libmpcodecs/vd.c -@@ -403,3 +403,12 @@ void mpcodecs_draw_slice(sh_video_t *sh, unsigned char **src, int *stride, - if (vf->draw_slice) - vf->draw_slice(vf, src, stride, w, h, x, y); - } -+ -+void *mpcodecs_get_hwaccel_context(sh_video_t *sh) -+{ -+ void *ctx = NULL; -+ struct vf_instance *vf = sh->vfilter; -+ if (vf->control(vf, VFCTRL_GET_HWACCEL_CONTEXT, &ctx) == CONTROL_TRUE) -+ return ctx; -+ return NULL; -+} -diff --git a/libmpcodecs/vd.h b/libmpcodecs/vd.h -index 8f7c238..e655d60 100644 ---- a/libmpcodecs/vd.h -+++ b/libmpcodecs/vd.h -@@ -64,6 +64,7 @@ extern const m_option_t xvid_dec_opts[]; - int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt); - mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); - void mpcodecs_draw_slice(sh_video_t *sh, unsigned char** src, int* stride, int w,int h, int x, int y); -+void *mpcodecs_get_hwaccel_context(sh_video_t *sh); - - #define VDFLAGS_DROPFRAME 3 - -diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c -index 7c68a20..609ac41 100644 ---- a/libmpcodecs/vd_ffmpeg.c -+++ b/libmpcodecs/vd_ffmpeg.c -@@ -33,6 +33,7 @@ - - #include "vd_internal.h" - #include "vd_ffmpeg.h" -+#include "dec_video.h" - - static const vd_info_t info = { - "FFmpeg's libavcodec codec family", -@@ -232,7 +233,7 @@ static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt - int imgfmt; - if (fmt == PIX_FMT_NONE) - return; -- imgfmt = pixfmt2imgfmt(fmt); -+ imgfmt = pixfmt2imgfmt(fmt, avctx->codec_id); - if (IMGFMT_IS_HWACCEL(imgfmt)) { - sh_video_t *sh = avctx->opaque; - vd_ffmpeg_ctx *ctx = sh->context; -@@ -295,6 +296,12 @@ static int init(sh_video_t *sh){ - avctx->codec_type = CODEC_TYPE_VIDEO; - avctx->codec_id = lavc_codec->id; - -+#if CONFIG_VAAPI -+ if(get_video_hwaccel() == HWACCEL_VAAPI){ -+ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_VAAPIAcceleratedCodec); -+ avctx->get_format = get_format; -+ } -+#endif /* CONFIG_VAAPI */ - #if CONFIG_VDPAU - if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ - avctx->get_format = get_format; -@@ -487,7 +494,7 @@ static void draw_slice(struct AVCodecContext *s, - const AVFrame *src, int offset[4], - int y, int type, int height){ - sh_video_t *sh = s->opaque; -- uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]}; -+ uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2], src->data[3] + offset[3]}; - int strides[MP_MAX_PLANES] = {src->linesize[0], src->linesize[1], src->linesize[2]}; - #if 0 - int start=0, i; -@@ -571,9 +578,10 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ - sh->disp_w = width; - sh->disp_h = height; - ctx->pix_fmt = pix_fmt; -- ctx->best_csp = pixfmt2imgfmt(pix_fmt); -+ ctx->best_csp = pixfmt2imgfmt(pix_fmt, avctx->codec_id); - if (!mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, ctx->best_csp)) - return -1; -+ avctx->hwaccel_context = mpcodecs_get_hwaccel_context(sh); - ctx->vo_initialized = 1; - } - return 0; -@@ -972,24 +980,62 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ - return mpi; - } - --#if CONFIG_XVMC || CONFIG_VDPAU -+#if CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU -+static inline int is_hwaccel_format(int imgfmt) -+{ -+ switch (get_video_hwaccel()) { -+ case HWACCEL_VAAPI: return IMGFMT_IS_VAAPI(imgfmt) != 0; -+ case HWACCEL_VDPAU: return IMGFMT_IS_VDPAU(imgfmt) != 0; -+ case HWACCEL_XVMC: return IMGFMT_IS_XVMC(imgfmt) != 0; -+ } -+ return 0; -+} -+ -+static int query_format(sh_video_t *sh, int fmt) -+{ -+ vd_ffmpeg_ctx * const ctx = sh->context; -+ AVCodecContext * const avctx = ctx->avctx; -+ int r, width, height; -+ /* XXX: some codecs have not initialized width and height yet at -+ this point, so we are faking the dimensions so that init_vo() -+ doesn't fail because of 0x0 size */ -+ if ((width = avctx->width) == 0) -+ avctx->width = 64; -+ if ((height = avctx->height) == 0) -+ avctx->height = 64; -+ r = init_vo(sh, fmt); -+ avctx->width = width; -+ avctx->height = height; -+ return r; -+} -+ - static enum PixelFormat get_format(struct AVCodecContext *avctx, -- const enum PixelFormat *fmt){ -- enum PixelFormat selected_format; -+ const enum PixelFormat *fmt){ -+ enum PixelFormat selected_format = PIX_FMT_NONE; - int imgfmt; - sh_video_t *sh = avctx->opaque; -- int i; -- -- for(i=0;fmt[i]!=PIX_FMT_NONE;i++){ -- imgfmt = pixfmt2imgfmt(fmt[i]); -- if(!IMGFMT_IS_HWACCEL(imgfmt)) continue; -- mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); -- if(init_vo(sh, fmt[i]) >= 0) { -- break; -+ int i, try_hwaccel; -+ -+ for (try_hwaccel = 1; try_hwaccel >= 0; --try_hwaccel) { -+ for (i = 0; fmt[i] != PIX_FMT_NONE; i++) { -+ imgfmt = pixfmt2imgfmt(fmt[i], avctx->codec_id); -+ if ((try_hwaccel ^ is_hwaccel_format(imgfmt)) != 0) -+ continue; -+ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); -+ if (query_format(sh, fmt[i]) >= 0) { -+ if (try_hwaccel) { -+ /* don't allow format conversion for HW acceleration */ -+ if (sh->codec->outfmt[sh->outfmtidx] != imgfmt) -+ continue; -+ } -+ selected_format = fmt[i]; -+ break; -+ } - } -+ if (selected_format != PIX_FMT_NONE) -+ break; - } -- selected_format = fmt[i]; - set_format_params(avctx, selected_format); - return selected_format; - } --#endif /* CONFIG_XVMC || CONFIG_VDPAU */ -+#endif /* CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU */ -diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h -index 3619e69..fd869b7 100644 ---- a/libmpcodecs/vf.h -+++ b/libmpcodecs/vf.h -@@ -111,6 +111,7 @@ typedef struct vf_seteq_s - #define VFCTRL_GET_PTS 17 /* Return last pts value that reached vf_vo*/ - #define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */ - #define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */ -+#define VFCTRL_GET_HWACCEL_CONTEXT 20 /* Get HW accelerator context */ - - #include "vfcap.h" - -diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c -index b598214..da9e930 100644 ---- a/libmpcodecs/vf_vo.c -+++ b/libmpcodecs/vf_vo.c -@@ -138,6 +138,12 @@ static int control(struct vf_instance *vf, int request, void* data) - *(double *)data = vf->priv->pts; - return CONTROL_TRUE; - } -+ case VFCTRL_GET_HWACCEL_CONTEXT: -+ { -+ if(!video_out) return CONTROL_FALSE; // vo not configured? -+ return(video_out->control(VOCTRL_GET_HWACCEL_CONTEXT, data) -+ == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE; -+ } - } - // return video_out->control(request,data); - return CONTROL_UNKNOWN; -diff --git a/libvo/gl_common.c b/libvo/gl_common.c -index 116cebb..8f344f6 100644 ---- a/libvo/gl_common.c -+++ b/libvo/gl_common.c -@@ -141,6 +141,11 @@ void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, fl - void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); - /** \} */ // end of glextfunctions group - -+void (GLAPIENTRY *mpglXBindTexImage)(Display *, GLXDrawable, int, const int *); -+void (GLAPIENTRY *mpglXReleaseTexImage)(Display *, GLXDrawable, int); -+GLXPixmap (GLAPIENTRY *mpglXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *); -+void (GLAPIENTRY *mpglXDestroyPixmap)(Display *, GLXPixmap); -+ - //! \defgroup glgeneral OpenGL general helper functions - - //! \defgroup glcontext OpenGL context management helper functions -@@ -470,6 +475,10 @@ static const extfunc_desc_t extfuncs[] = { - {&mpglTexImage3D, NULL, {"glTexImage3D", NULL}}, - {&mpglAllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}}, - {&mpglFreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}}, -+ {&mpglXBindTexImage, "GLX_EXT_texture_from_pixmap", {"glXBindTexImageEXT", NULL}}, -+ {&mpglXReleaseTexImage, "GLX_EXT_texture_from_pixmap", {"glXReleaseTexImageEXT", NULL}}, -+ {&mpglXCreatePixmap, "GLX_EXT_texture_from_pixmap", {"glXCreatePixmap", NULL}}, -+ {&mpglXDestroyPixmap, "GLX_EXT_texture_from_pixmap", {"glXDestroyPixmap", NULL}}, - {NULL} - }; - -diff --git a/libvo/gl_common.h b/libvo/gl_common.h -index d44e96f..fd8677b 100644 ---- a/libvo/gl_common.h -+++ b/libvo/gl_common.h -@@ -510,4 +510,9 @@ extern void (GLAPIENTRY *mpglTexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei - extern void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, float); - extern void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); - -+extern void (GLAPIENTRY *mpglXBindTexImage)(Display *, GLXDrawable, int, const int *); -+extern void (GLAPIENTRY *mpglXReleaseTexImage)(Display *, GLXDrawable, int); -+extern GLXPixmap (GLAPIENTRY *mpglXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *); -+extern void (GLAPIENTRY *mpglXDestroyPixmap)(Display *, GLXPixmap); -+ - #endif /* MPLAYER_GL_COMMON_H */ -diff --git a/libvo/stats.c b/libvo/stats.c -new file mode 100644 -index 0000000..c4ff0ca ---- /dev/null -+++ b/libvo/stats.c -@@ -0,0 +1,217 @@ -+#include "config.h" -+#include "stats.h" -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if CONFIG_LIBGTOP -+#include -+#include -+#include -+#endif -+ -+// Process statistics -+struct proc_stats { -+ uint64_t utime; -+ uint64_t stime; -+ uint64_t cutime; -+ uint64_t cstime; -+ uint64_t frequency; -+ uint64_t cpu_time; -+ uint64_t start_time; -+ uint64_t current_time; -+}; -+ -+// Get current process stats -+static int get_proc_stats(struct proc_stats *pstats); -+ -+void stats_init(void) -+{ -+#if CONFIG_LIBGTOP -+ glibtop_init(); -+#endif -+} -+ -+void stats_exit(void) -+{ -+#if CONFIG_LIBGTOP -+ glibtop_close(); -+#endif -+} -+ -+// Get CPU frequency -+unsigned int get_cpu_frequency(void) -+{ -+ unsigned int freq = 0; -+#if defined __linux__ -+ { -+ FILE *proc_file = fopen("/proc/cpuinfo", "r"); -+ if (proc_file) { -+ char line[256]; -+ char *old_locale = setlocale(LC_NUMERIC, NULL); -+ setlocale(LC_NUMERIC, "C"); -+ while(fgets(line, sizeof(line), proc_file)) { -+ float f; -+ int len = strlen(line); -+ if (len == 0) -+ continue; -+ line[len - 1] = 0; -+ if (sscanf(line, "cpu MHz : %f", &f) == 1) -+ freq = (unsigned int)f; -+ } -+ setlocale(LC_NUMERIC, old_locale); -+ fclose(proc_file); -+ } -+ } -+#endif -+ return freq; -+} -+ -+// Get CPU usage in percent -+static float get_cpu_usage_1(void) -+{ -+ static struct proc_stats prev_stats; -+ struct proc_stats curr_stats; -+ uint64_t prev_proc_time = 0, curr_proc_time = 0; -+ float pcpu = 0.0f; -+ -+ if (get_proc_stats(&curr_stats) == 0) { -+ prev_proc_time += prev_stats.utime; -+ prev_proc_time += prev_stats.stime; -+ prev_proc_time += prev_stats.cutime; -+ prev_proc_time += prev_stats.cstime; -+ curr_proc_time += curr_stats.utime; -+ curr_proc_time += curr_stats.stime; -+ curr_proc_time += curr_stats.cutime; -+ curr_proc_time += curr_stats.cstime; -+ if (prev_stats.start_time > 0) -+ pcpu = 100.0 * ((float)(curr_proc_time - prev_proc_time) / -+ (float)(curr_stats.cpu_time - prev_stats.cpu_time)); -+ prev_stats = curr_stats; -+ } -+ return pcpu; -+} -+ -+float get_cpu_usage(enum CpuUsageType type) -+{ -+ static float pcpu_total = 0.0; -+ static unsigned int n_samples; -+ float pcpu; -+ -+ pcpu = get_cpu_usage_1(); -+ pcpu_total += pcpu / 100.0; -+ ++n_samples; -+ -+ if (type == CPU_USAGE_AVERAGE) -+ pcpu = 100.0 * (pcpu_total / n_samples); -+ return pcpu; -+} -+ -+// For ELF executable, notes are pushed before environment and args -+static int find_elf_note(unsigned long match, unsigned long *pval) -+{ -+ unsigned long *ep = (unsigned long *)__environ; -+ while (*ep++); -+ for (; *ep != 0; ep += 2) { -+ if (ep[0] == match) { -+ *pval = ep[1]; -+ return 0; -+ } -+ } -+ return -1; -+} -+ -+#ifndef AT_CLKTCK -+#define AT_CLKTCK 17 -+#endif -+ -+// Get current process stats -+int get_proc_stats(struct proc_stats *pstats) -+{ -+ int error = -1; -+ char line[256], *str, *end; -+ char vc; -+ int vi; -+ unsigned long vul; -+ unsigned long long vull; -+ float vf; -+#if defined __linux__ -+ { -+ FILE *proc_file = fopen("/proc/self/stat", "r"); -+ if (proc_file) { -+ if (fgets(line, sizeof(line), proc_file)) { -+ unsigned long utime, stime, cutime, cstime, start_time; -+ str = strrchr(line, ')'); -+ if (str && sscanf(str + 2, -+ "%c " -+ "%d %d %d %d %d " -+ "%lu %lu %lu %lu %lu %lu %lu " -+ "%ld %ld %ld %ld %ld %ld " -+ "%lu %lu ", -+ &vc, -+ &vi, &vi, &vi, &vi, &vi, -+ &vul, &vul, &vul, &vul, &vul, &utime, &stime, -+ &cutime, &cstime, &vul, &vul, &vul, &vul, -+ &start_time, &vul) == 21) { -+ pstats->utime = utime; -+ pstats->stime = stime; -+ pstats->cutime = cutime; -+ pstats->cstime = cstime; -+ pstats->start_time = start_time; -+ error = 0; -+ } -+ } -+ fclose(proc_file); -+ } -+ if (error) -+ return error; -+ error = -1; -+ -+ if (find_elf_note(AT_CLKTCK, &vul) == 0) { -+ pstats->frequency = vul; -+ error = 0; -+ } -+ if (error) -+ return error; -+ error = -1; -+ -+ proc_file = fopen("/proc/uptime", "r"); -+ if (proc_file) { -+ if (fgets(line, sizeof(line), proc_file)) { -+ char *old_locale = setlocale(LC_NUMERIC, NULL); -+ setlocale(LC_NUMERIC, "C"); -+ if (sscanf(line, "%f", &vf) == 1) { -+ pstats->cpu_time = (uint64_t)(vf * (float)pstats->frequency); -+ error = 0; -+ } -+ setlocale(LC_NUMERIC, old_locale); -+ } -+ fclose(proc_file); -+ } -+ } -+#elif CONFIG_LIBGTOP -+ { -+ glibtop_cpu cpu; -+ glibtop_proc_time proc_time; -+ glibtop_proc_state proc_state; -+ -+ glibtop_get_cpu(&cpu); -+ glibtop_get_proc_state(&proc_state, getpid()); -+ pstats->cpu_time = cpu.xcpu_total[proc_state.processor]; -+ -+ glibtop_get_proc_time(&proc_time, getpid()); -+ pstats->utime = proc_time.utime; -+ pstats->stime = proc_time.stime; -+ pstats->cutime = proc_time.cutime; -+ pstats->cstime = proc_time.cstime; -+ pstats->start_time = proc_time.start_time; -+ pstats->frequency = proc_time.frequency; -+ -+ error = 0; -+ } -+#endif -+ return error; -+} -diff --git a/libvo/stats.h b/libvo/stats.h -new file mode 100644 -index 0000000..62e7412 ---- /dev/null -+++ b/libvo/stats.h -@@ -0,0 +1,21 @@ -+#ifndef MPLAYER_STATS_H -+#define MPLAYER_STATS_H -+ -+#include -+ -+void stats_init(void); -+void stats_exit(void); -+ -+/// CPU usage model -+enum CpuUsageType { -+ CPU_USAGE_QUANTUM = 1, ///< CPU usage since the last call to cpu_get_usage() -+ CPU_USAGE_AVERAGE ///< CPU usage average'd since program start -+}; -+ -+/// Get CPU frequency -+unsigned int get_cpu_frequency(void); -+ -+/// Get CPU usage in percent -+float get_cpu_usage(enum CpuUsageType type); -+ -+#endif /* MPLAYER_STATS_H */ -diff --git a/libvo/video_out.c b/libvo/video_out.c -index 83f2a24..d22d214 100644 ---- a/libvo/video_out.c -+++ b/libvo/video_out.c -@@ -94,6 +94,7 @@ extern const vo_functions_t video_out_mga; - extern const vo_functions_t video_out_xmga; - extern const vo_functions_t video_out_x11; - extern const vo_functions_t video_out_xvmc; -+extern const vo_functions_t video_out_vaapi; - extern const vo_functions_t video_out_vdpau; - extern const vo_functions_t video_out_xv; - extern const vo_functions_t video_out_gl_nosw; -@@ -291,6 +292,9 @@ const vo_functions_t* const video_out_drivers[] = - #ifdef CONFIG_MD5SUM - &video_out_md5sum, - #endif -+#if CONFIG_VAAPI -+ &video_out_vaapi, -+#endif - NULL - }; - -diff --git a/libvo/video_out.h b/libvo/video_out.h -index cbbea66..7bd3006 100644 ---- a/libvo/video_out.h -+++ b/libvo/video_out.h -@@ -80,6 +80,10 @@ - - #define VOCTRL_UPDATE_SCREENINFO 32 - -+// Return current HW acceleration context -+// void *get_hwaccel_context(void); -+#define VOCTRL_GET_HWACCEL_CONTEXT 33 -+ - // Vo can be used by xover - #define VOCTRL_XOVERLAY_SUPPORT 22 - -diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c -new file mode 100644 -index 0000000..9d46485 ---- /dev/null -+++ b/libvo/vo_vaapi.c -@@ -0,0 +1,2737 @@ -+/* -+ * VA API output module -+ * -+ * Copyright (C) 2008-2009 Splitted-Desktop Systems -+ * -+ * This file is part of MPlayer. -+ * -+ * MPlayer is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * MPlayer is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with MPlayer; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#include "config.h" -+#include "mp_msg.h" -+#include "help_mp.h" -+#include "subopt-helper.h" -+#include "video_out.h" -+#include "video_out_internal.h" -+#include "fastmemcpy.h" -+#include "sub/sub.h" -+#include "sub/eosd.h" -+#include "x11_common.h" -+#include "libavutil/common.h" -+#include "libavcodec/vaapi.h" -+#include "gui/interface.h" -+#include "stats.h" -+#include -+ -+#if CONFIG_GL -+#include "gl_common.h" -+#include -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#if CONFIG_VAAPI_GLX -+#include -+#endif -+ -+#if CONFIG_XRENDER -+#include -+#endif -+ -+/* Compatibility glue with upstream libva */ -+#ifndef VA_SDS_VERSION -+#define VA_SDS_VERSION 0 -+#endif -+ -+/* Compatibility glue with VA-API >= 0.30 */ -+#ifndef VA_INVALID_ID -+#define VA_INVALID_ID 0xffffffff -+#endif -+#ifndef VA_FOURCC -+#define VA_FOURCC(ch0, ch1, ch2, ch3) \ -+ ((uint32_t)(uint8_t)(ch0) | \ -+ ((uint32_t)(uint8_t)(ch1) << 8) | \ -+ ((uint32_t)(uint8_t)(ch2) << 16) | \ -+ ((uint32_t)(uint8_t)(ch3) << 24 )) -+#endif -+#if defined VA_SRC_BT601 && defined VA_SRC_BT709 -+# define USE_VAAPI_COLORSPACE 1 -+#else -+# define USE_VAAPI_COLORSPACE 0 -+#endif -+ -+/* Defined to 1 if VA/GLX 'bind' API is available */ -+#define USE_VAAPI_GLX_BIND \ -+ (VA_MAJOR_VERSION == 0 && \ -+ ((VA_MINOR_VERSION == 30 && \ -+ VA_MICRO_VERSION == 4 && VA_SDS_VERSION >= 5) || \ -+ (VA_MINOR_VERSION == 31 && \ -+ VA_MICRO_VERSION == 0 && VA_SDS_VERSION >= 1 && VA_SDS_VERSION < 5))) -+ -+/* Compatibility glue with VA-API >= 0.31 */ -+#if defined VA_CHECK_VERSION -+#if VA_CHECK_VERSION(0,31,0) -+#define vaPutImage2 vaPutImage -+#define vaAssociateSubpicture2 vaAssociateSubpicture -+#endif -+#endif -+ -+/* Compatibility glue with VA-API >= 0.31.1 */ -+#ifndef VA_SRC_SMPTE_240 -+#define VA_SRC_SMPTE_240 0x00000040 -+#endif -+#if defined VA_FILTER_SCALING_MASK -+# define USE_VAAPI_SCALING 1 -+#else -+# define USE_VAAPI_SCALING 0 -+#endif -+ -+static vo_info_t info = { -+ "VA API with X11", -+ "vaapi", -+ "Gwenole Beauchesne ", -+ "" -+}; -+ -+const LIBVO_EXTERN(vaapi) -+ -+/* Numbers of video surfaces */ -+#define MAX_OUTPUT_SURFACES 2 /* Maintain synchronisation points in flip_page() */ -+#define MAX_VIDEO_SURFACES 21 /* Maintain free surfaces in a queue (use least-recently-used) */ -+#define NUM_VIDEO_SURFACES_MPEG2 3 /* 1 decode frame, up to 2 references */ -+#define NUM_VIDEO_SURFACES_MPEG4 3 /* 1 decode frame, up to 2 references */ -+#define NUM_VIDEO_SURFACES_H264 21 /* 1 decode frame, up to 20 references */ -+#define NUM_VIDEO_SURFACES_VC1 3 /* 1 decode frame, up to 2 references */ -+ -+static void ensure_osd(void); -+static int reset_xrender_specific(void); -+ -+typedef void (*draw_alpha_func)(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride); -+ -+typedef void (*eosd_draw_alpha_func)(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color); -+ -+struct vaapi_surface { -+ VASurfaceID id; -+ VAImage image; -+ int is_bound; /* Flag: image bound to the surface? */ -+}; -+ -+struct vaapi_equalizer { -+ VADisplayAttribute brightness; -+ VADisplayAttribute contrast; -+ VADisplayAttribute hue; -+ VADisplayAttribute saturation; -+}; -+ -+static int g_is_visible; -+static int g_is_paused; -+static uint32_t g_image_width; -+static uint32_t g_image_height; -+static uint32_t g_image_format; -+static uint32_t g_image_fields; -+static Pixmap g_image_pixmap; -+static struct vo_rect g_output_rect; -+static struct vaapi_surface *g_output_surfaces[MAX_OUTPUT_SURFACES]; -+static unsigned int g_output_surface; -+static int g_deint; -+static int g_deint_type; -+static int g_colorspace; -+static unsigned int g_scaling; -+ -+static int gl_enabled; -+static int gl_use_tfp; -+#if CONFIG_GL -+static MPGLContext gl_context; -+static int gl_binding; -+static int gl_reflect; -+static int gl_finish; -+static GLuint gl_texture; -+static GLuint gl_font_base; -+static Pixmap gl_pixmap; -+static int gl_visual_attr[] = { -+ GLX_RGBA, -+ GLX_RED_SIZE, 1, -+ GLX_GREEN_SIZE, 1, -+ GLX_BLUE_SIZE, 1, -+ GLX_DOUBLEBUFFER, -+ GL_NONE -+}; -+#endif -+ -+#if CONFIG_VAAPI_GLX -+static void *gl_surface; -+#endif -+ -+static int xr_enabled; -+#if CONFIG_XRENDER -+static Picture xr_video_picture; -+static Picture xr_window_picture; -+#endif -+ -+static struct vaapi_context *va_context; -+static VAProfile *va_profiles; -+static int va_num_profiles; -+static VAEntrypoint *va_entrypoints; -+static int va_num_entrypoints; -+static VASurfaceID *va_surface_ids; -+static int va_num_surfaces; -+static struct vaapi_surface **va_free_surfaces; -+static int va_free_surfaces_head_index; -+static int va_free_surfaces_tail_index; -+static VAImageFormat *va_image_formats; -+static int va_num_image_formats; -+static VAImageFormat *va_subpic_formats; -+static unsigned int *va_subpic_flags; -+static int va_num_subpic_formats; -+static VAImage va_osd_image; -+static uint8_t *va_osd_image_data; -+static VASubpictureID va_osd_subpicture; -+static int va_osd_associated; -+static draw_alpha_func va_osd_draw_alpha; -+static uint8_t *va_osd_palette; -+static struct vaapi_equalizer va_equalizer; -+static VAImage va_eosd_image; -+static uint8_t *va_eosd_image_data; -+static VASubpictureID va_eosd_subpicture; -+static int va_eosd_associated; -+static eosd_draw_alpha_func va_eosd_draw_alpha; -+ -+///< Flag: direct surface mapping: use mpi->number to select free VA surface? -+static int va_dm; -+ -+///< Flag: gather run-time statistics (CPU usage, frequency) -+static int cpu_stats; -+static unsigned int cpu_frequency; -+static float cpu_usage; -+ -+// X error trap -+static int x11_error_code = 0; -+static int (*old_error_handler)(Display *, XErrorEvent *); -+ -+static int error_handler(Display *dpy, XErrorEvent *error) -+{ -+ x11_error_code = error->error_code; -+ return 0; -+} -+ -+static void x11_trap_errors(void) -+{ -+ x11_error_code = 0; -+ old_error_handler = XSetErrorHandler(error_handler); -+} -+ -+static int x11_untrap_errors(void) -+{ -+ XSetErrorHandler(old_error_handler); -+ return x11_error_code; -+} -+ -+static int check_status(VAStatus status, const char *msg) -+{ -+ if (status != VA_STATUS_SUCCESS) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] %s: %s\n", msg, vaErrorStr(status)); -+ return 0; -+ } -+ return 1; -+} -+ -+static const char *string_of_VAImageFormat(VAImageFormat *imgfmt) -+{ -+ static char str[5]; -+ str[0] = imgfmt->fourcc; -+ str[1] = imgfmt->fourcc >> 8; -+ str[2] = imgfmt->fourcc >> 16; -+ str[3] = imgfmt->fourcc >> 24; -+ str[4] = '\0'; -+ return str; -+} -+ -+static const char *string_of_VAProfile(VAProfile profile) -+{ -+ switch (profile) { -+#define PROFILE(profile) \ -+ case VAProfile##profile: return "VAProfile" #profile -+ PROFILE(MPEG2Simple); -+ PROFILE(MPEG2Main); -+ PROFILE(MPEG4Simple); -+ PROFILE(MPEG4AdvancedSimple); -+ PROFILE(MPEG4Main); -+ PROFILE(H264Baseline); -+ PROFILE(H264Main); -+ PROFILE(H264High); -+ PROFILE(VC1Simple); -+ PROFILE(VC1Main); -+ PROFILE(VC1Advanced); -+#undef PROFILE -+ } -+ return ""; -+} -+ -+static const char *string_of_VAEntrypoint(VAEntrypoint entrypoint) -+{ -+ switch (entrypoint) { -+#define ENTRYPOINT(entrypoint) \ -+ case VAEntrypoint##entrypoint: return "VAEntrypoint" #entrypoint -+ ENTRYPOINT(VLD); -+ ENTRYPOINT(IZZ); -+ ENTRYPOINT(IDCT); -+ ENTRYPOINT(MoComp); -+ ENTRYPOINT(Deblocking); -+#undef ENTRYPOINT -+ } -+ return ""; -+} -+ -+static int has_profile(VAProfile profile) -+{ -+ if (va_profiles && va_num_profiles > 0) { -+ int i; -+ for (i = 0; i < va_num_profiles; i++) { -+ if (va_profiles[i] == profile) -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int VAProfile_from_imgfmt(uint32_t format) -+{ -+ static const int mpeg2_profiles[] = -+ { VAProfileMPEG2Main, VAProfileMPEG2Simple, -1 }; -+ static const int mpeg4_profiles[] = -+ { VAProfileMPEG4Main, VAProfileMPEG4AdvancedSimple, VAProfileMPEG4Simple, -1 }; -+ static const int h264_profiles[] = -+ { VAProfileH264High, VAProfileH264Main, VAProfileH264Baseline, -1 }; -+ static const int wmv3_profiles[] = -+ { VAProfileVC1Main, VAProfileVC1Simple, -1 }; -+ static const int vc1_profiles[] = -+ { VAProfileVC1Advanced, -1 }; -+ -+ const int *profiles = NULL; -+ switch (IMGFMT_VAAPI_CODEC(format)) { -+ case IMGFMT_VAAPI_CODEC_MPEG2: -+ profiles = mpeg2_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_MPEG4: -+ profiles = mpeg4_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_H264: -+ profiles = h264_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_VC1: -+ switch (format) { -+ case IMGFMT_VAAPI_WMV3: -+ profiles = wmv3_profiles; -+ break; -+ case IMGFMT_VAAPI_VC1: -+ profiles = vc1_profiles; -+ break; -+ } -+ break; -+ } -+ -+ if (profiles) { -+ for (int i = 0; profiles[i] != -1; i++) { -+ if (has_profile(profiles[i])) -+ return profiles[i]; -+ } -+ } -+ return -1; -+} -+ -+static int has_entrypoint(VAEntrypoint entrypoint) -+{ -+ if (va_entrypoints && va_num_entrypoints > 0) { -+ int i; -+ for (i = 0; i < va_num_entrypoints; i++) { -+ if (va_entrypoints[i] == entrypoint) -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int VAEntrypoint_from_imgfmt(uint32_t format) -+{ -+ int entrypoint = 0; -+ switch (format) { -+ case IMGFMT_VAAPI_MPEG2: -+ case IMGFMT_VAAPI_MPEG4: -+ case IMGFMT_VAAPI_H263: -+ case IMGFMT_VAAPI_H264: -+ case IMGFMT_VAAPI_WMV3: -+ case IMGFMT_VAAPI_VC1: -+ entrypoint = VAEntrypointVLD; -+ break; -+ case IMGFMT_VAAPI_MPEG2_IDCT: -+ entrypoint = VAEntrypointIDCT; -+ break; -+ case IMGFMT_VAAPI_MPEG2_MOCO: -+ entrypoint = VAEntrypointMoComp; -+ break; -+ } -+ -+ if (entrypoint) -+ return has_entrypoint(entrypoint); -+ -+ return -1; -+} -+ -+static VAImageFormat *find_image_format(uint32_t fourcc) -+{ -+ if (va_image_formats && va_num_image_formats > 0) { -+ int i; -+ for (i = 0; i < va_num_image_formats; i++) { -+ if (va_image_formats[i].fourcc == fourcc) -+ return &va_image_formats[i]; -+ } -+ } -+ return NULL; -+} -+ -+static VAImageFormat *VAImageFormat_from_imgfmt(uint32_t format) -+{ -+ uint32_t fourcc = 0; -+ -+ switch (format) { -+ case IMGFMT_NV12: fourcc = VA_FOURCC('N','V','1','2'); break; -+ case IMGFMT_YV12: fourcc = VA_FOURCC('Y','V','1','2'); break; -+ case IMGFMT_I420: fourcc = VA_FOURCC('I','4','2','0'); break; -+ case IMGFMT_IYUV: fourcc = VA_FOURCC('I','Y','U','V'); break; -+ } -+ -+ if (fourcc) -+ return find_image_format(fourcc); -+ -+ return NULL; -+} -+ -+static struct vaapi_surface *alloc_vaapi_surface(unsigned int width, -+ unsigned int height, -+ unsigned int format) -+{ -+ struct vaapi_surface *surface = NULL; -+ struct vaapi_surface **surfaces; -+ VASurfaceID *surface_ids; -+ VAStatus status; -+ -+ surface = calloc(1, sizeof(*surface)); -+ if (!surface) -+ goto error; -+ -+ surfaces = realloc(va_free_surfaces, -+ (1 + va_num_surfaces) * sizeof(surfaces[0])); -+ if (!surfaces) -+ goto error; -+ -+ surface_ids = realloc(va_surface_ids, -+ (1 + va_num_surfaces) * sizeof(surface_ids[0])); -+ if (!surface_ids) -+ goto error; -+ -+ status = vaCreateSurfaces(va_context->display, width, height, format, -+ 1, &surface->id); -+ if (!check_status(status, "vaCreateSurfaces()")) -+ goto error; -+ -+ va_surface_ids = surface_ids; -+ va_surface_ids[va_num_surfaces] = surface->id; -+ va_free_surfaces = surfaces; -+ va_free_surfaces[va_num_surfaces] = surface; -+ surface->image.image_id = VA_INVALID_ID; -+ surface->image.buf = VA_INVALID_ID; -+ ++va_num_surfaces; -+ return surface; -+error: -+ free(surface); -+ return NULL; -+} -+ -+static void resize(void) -+{ -+ struct vo_rect src; -+ -+ calc_src_dst_rects(g_image_width, g_image_height, -+ &src, &g_output_rect, NULL, NULL); -+ -+ ensure_osd(); -+ -+ vo_x11_clearwindow(mDisplay, vo_window); -+ -+#if CONFIG_GL -+#define FOVY 60.0f -+#define ASPECT 1.0f -+#define Z_NEAR 0.1f -+#define Z_FAR 100.0f -+#define Z_CAMERA 0.869f -+ -+ if (gl_enabled) { -+ glViewport(0, 0, vo_dwidth, vo_dheight); -+ glMatrixMode(GL_PROJECTION); -+ glLoadIdentity(); -+ gluPerspective(FOVY, ASPECT, Z_NEAR, Z_FAR); -+ glMatrixMode(GL_MODELVIEW); -+ glLoadIdentity(); -+ -+ glTranslatef(-0.5f, -0.5f, -Z_CAMERA); -+ glScalef(1.0f / (GLfloat)vo_dwidth, -+ -1.0f / (GLfloat)vo_dheight, -+ 1.0f / (GLfloat)vo_dwidth); -+ glTranslatef(0.0f, -1.0f * (GLfloat)vo_dheight, 0.0f); -+ } -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ reset_xrender_specific(); -+#endif -+ -+ if (g_is_visible) -+ flip_page(); -+} -+ -+#if CONFIG_GL -+static int gl_build_font(void) -+{ -+ XFontStruct *fi; -+ -+ gl_font_base = glGenLists(96); -+ -+ fi = XLoadQueryFont(mDisplay, "-adobe-helvetica-medium-r-normal--16-*-*-*-p-*-iso8859-1" ); -+ if (!fi) { -+ fi = XLoadQueryFont(mDisplay, "fixed"); -+ if (!fi) -+ return -1; -+ } -+ -+ glXUseXFont(fi->fid, 32, 96, gl_font_base); -+ XFreeFont(mDisplay, fi); -+ return 0; -+} -+ -+static void gl_printf(const char *format, ...) -+{ -+ va_list args; -+ char *text; -+ int textlen; -+ -+ va_start(args, format); -+ textlen = vsnprintf(NULL, 0, format, args); -+ va_end(args); -+ -+ text = malloc(textlen + 1); -+ if (!text) -+ return; -+ -+ va_start(args, format); -+ vsprintf(text, format, args); -+ va_end(args); -+ -+ glPushAttrib(GL_LIST_BIT); -+ glListBase(gl_font_base - 32); -+ glCallLists(textlen, GL_UNSIGNED_BYTE, text); -+ glPopAttrib(); -+ free(text); -+} -+ -+static void gl_draw_rectangle(int x, int y, int w, int h, unsigned int rgba) -+{ -+ glColor4f((GLfloat)((rgba >> 24) & 0xff) / 255.0, -+ (GLfloat)((rgba >> 16) & 0xff) / 255.0, -+ (GLfloat)((rgba >> 8) & 0xff) / 255.0, -+ (GLfloat)(rgba & 0xff) / 255.0); -+ -+ glTranslatef((GLfloat)x, (GLfloat)y, 0.0f); -+ glBegin(GL_QUADS); -+ { -+ glVertex2i(0, 0); -+ glVertex2i(w, 0); -+ glVertex2i(w, h); -+ glVertex2i(0, h); -+ } -+ glEnd(); -+} -+#endif -+ -+#if CONFIG_XRENDER -+static int init_xrender(void) -+{ -+ int dummy; -+ -+ return XRenderQueryExtension(mDisplay, &dummy, &dummy); -+} -+ -+static void uninit_xrender(void) -+{ -+} -+#endif -+ -+static inline unsigned char *get_osd_image_data(int x0, int y0) -+{ -+ return (va_osd_image_data + -+ va_osd_image.offsets[0] + -+ va_osd_image.pitches[0] * y0 + -+ x0 * ((va_osd_image.format.bits_per_pixel + 7) / 8)); -+} -+ -+static void draw_alpha_rgb32(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride, src += stride, srca += stride) -+ for (x = 0; x < w; x++) { -+ const unsigned char c = src[x]; -+ dst[4*x + 0] = c; -+ dst[4*x + 1] = c; -+ dst[4*x + 2] = c; -+ dst[4*x + 3] = -srca[x]; -+ } -+} -+ -+static void draw_alpha_IA44(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) -+ dst[x] = (src[y*stride + x] >> 4) | (-srca[y*stride + x] & 0xf0); -+} -+ -+static void draw_alpha_AI44(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) -+ dst[x] = (src[y*stride + x] & 0xf0) | (-srca[y*stride + x] >> 4); -+} -+ -+static void draw_alpha_IA88(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) { -+ dst[2*x + 0] = src [y*stride + x]; -+ dst[2*x + 1] = -srca[y*stride + x]; -+ } -+} -+ -+static void draw_alpha_AI88(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) { -+ dst[2*x + 0] = -srca[y*stride + x]; -+ dst[2*x + 1] = src [y*stride + x]; -+ } -+} -+ -+///< List of subpicture formats in preferred order -+static const struct { -+ uint32_t format; -+ draw_alpha_func draw_alpha; -+} -+va_osd_info[] = { -+ { VA_FOURCC('I','A','4','4'), draw_alpha_IA44 }, -+ { VA_FOURCC('A','I','4','4'), draw_alpha_AI44 }, -+ { VA_FOURCC('I','A','8','8'), draw_alpha_IA88 }, -+ { VA_FOURCC('A','I','8','8'), draw_alpha_AI88 }, -+ { VA_FOURCC('B','G','R','A'), draw_alpha_rgb32 }, -+ { VA_FOURCC('R','G','B','A'), draw_alpha_rgb32 }, -+ { 0, NULL } -+}; -+ -+static uint8_t *gen_osd_palette(const VAImage *image) -+{ -+ uint8_t *palette; -+ int i, is_rgb; -+ int r_idx = -1, g_idx = -1, b_idx = -1; -+ int y_idx = -1, u_idx = -1, v_idx = -1; -+ int i_idx = -1, a_idx = -1; -+ -+ if (image->num_palette_entries < 1) -+ return NULL; -+ -+ palette = malloc(image->num_palette_entries * image->entry_bytes); -+ if (!palette) -+ return NULL; -+ -+ for (i = 0; i < image->entry_bytes; i++) { -+ switch (image->component_order[i]) { -+ case 'R': r_idx = i; is_rgb = 1; break; -+ case 'G': g_idx = i; is_rgb = 1; break; -+ case 'B': b_idx = i; is_rgb = 1; break; -+ case 'Y': y_idx = i; is_rgb = 0; break; -+ case 'U': u_idx = i; is_rgb = 0; break; -+ case 'V': v_idx = i; is_rgb = 0; break; -+ case 'I': i_idx = i; break; -+ case 'A': a_idx = i; break; -+ } -+ } -+ -+ if (r_idx != -1 && g_idx != -1 && b_idx != -1) { /* RGB format */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + r_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + g_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + b_idx] = i * 0xff / (image->num_palette_entries - 1); -+ } -+ } -+ else if (y_idx != -1 && u_idx != -1 && v_idx != -1) { /* YUV format */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + y_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + u_idx] = 0x80; -+ palette[n + v_idx] = 0x80; -+ } -+ } -+ else if (i_idx != -1 && a_idx != -1) {/* AYUV format (GMA500 "psb" bug) */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + 0] = 0x80; -+ palette[n + 1] = 0x80; -+ palette[n + 2] = 16 + i * 220 / (image->num_palette_entries - 1); -+ palette[n + 3] = 0; -+ } -+ } -+ else { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not set up subpicture palette\n"); -+ free(palette); -+ palette = NULL; -+ } -+ return palette; -+} -+ -+static void disable_osd(void) -+{ -+ if (!va_osd_associated) -+ return; -+ -+ vaDeassociateSubpicture(va_context->display, -+ va_osd_subpicture, -+ va_surface_ids, va_num_surfaces); -+ -+ va_osd_associated = 0; -+} -+ -+static int enable_osd(void) -+{ -+ VAStatus status; -+ -+ disable_osd(); -+ -+ status = vaAssociateSubpicture2(va_context->display, -+ va_osd_subpicture, -+ va_surface_ids, va_num_surfaces, -+ 0, 0, -+ va_osd_image.width, va_osd_image.height, -+ 0, 0, -+ g_image_width, g_image_height, -+ 0); -+ if (!check_status(status, "vaAssociateSubpicture()")) -+ return -1; -+ -+ va_osd_associated = 1; -+ return 0; -+} -+ -+static void destroy_osd(void) -+{ -+ disable_osd(); -+ -+ if (va_osd_subpicture != VA_INVALID_ID) { -+ vaDestroySubpicture(va_context->display, va_osd_subpicture); -+ va_osd_subpicture = VA_INVALID_ID; -+ } -+ -+ if (va_osd_image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, va_osd_image.image_id); -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_osd_image.width = 0; -+ va_osd_image.height = 0; -+ } -+} -+ -+static void create_osd(void) -+{ -+ VAStatus status; -+ int i, j; -+ -+ for (i = 0; va_osd_info[i].format; i++) { -+ for (j = 0; j < va_num_subpic_formats; j++) -+ if (va_subpic_formats[j].fourcc == va_osd_info[i].format) -+ break; -+ if (j < va_num_subpic_formats && -+ vaCreateImage(va_context->display, &va_subpic_formats[j], -+ g_output_rect.width, g_output_rect.height, -+ &va_osd_image) == VA_STATUS_SUCCESS) { -+ va_osd_palette = gen_osd_palette(&va_osd_image); -+ if (((!va_osd_image.num_palette_entries) ^ (!va_osd_palette)) == 0) -+ break; -+ vaDestroyImage(va_context->display, va_osd_image.image_id); -+ va_osd_image.image_id = VA_INVALID_ID; -+ } -+ } -+ -+ if (va_osd_info[i].format && -+ vaCreateSubpicture(va_context->display, va_osd_image.image_id, -+ &va_osd_subpicture) == VA_STATUS_SUCCESS) { -+ va_osd_draw_alpha = va_osd_info[i].draw_alpha; -+ if (va_osd_palette) { -+ status = vaSetImagePalette(va_context->display, -+ va_osd_image.image_id, va_osd_palette); -+ check_status(status, "vaSetImagePalette()"); -+ } -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using %s surface for OSD\n", -+ string_of_VAImageFormat(&va_osd_image.format)); -+ } -+} -+ -+static void ensure_osd(void) -+{ -+ if (g_output_rect.width == va_osd_image.width && -+ g_output_rect.height == va_osd_image.height) -+ return; -+ -+ destroy_osd(); -+ create_osd(); -+} -+ -+static inline unsigned char *get_eosd_image_data(int x0, int y0) -+{ -+ return (va_eosd_image_data + -+ va_eosd_image.offsets[0] + -+ va_eosd_image.pitches[0] * y0 + -+ x0 * ((va_eosd_image.format.bits_per_pixel + 7) / 8)); -+} -+ -+static void eosd_draw_alpha_bgra(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color) -+{ -+ int x, y; -+ const unsigned int dst_stride = va_eosd_image.pitches[0]; -+ unsigned char *dst = get_eosd_image_data(dst_x, dst_y); -+ const unsigned int r = (color >> 24) & 0xff; -+ const unsigned int g = (color >> 16) & 0xff; -+ const unsigned int b = (color >> 8) & 0xff; -+ const unsigned int a = 0xff - (color & 0xff); -+ -+ for (y = 0; y < src_h; y++, dst += dst_stride, src += src_stride) -+ for (x = 0; x < src_w; x++) { -+ const unsigned int v = src[x]; -+ dst[4*x + 0] = (b * v + dst[4*x + 0] * (0xff - v)) / 255; -+ dst[4*x + 1] = (g * v + dst[4*x + 1] * (0xff - v)) / 255; -+ dst[4*x + 2] = (r * v + dst[4*x + 2] * (0xff - v)) / 255; -+ dst[4*x + 3] = (a * v + dst[4*x + 3] * (0xff - v)) / 255; -+ } -+} -+ -+static void eosd_draw_alpha_rgba(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color) -+{ -+ int x, y; -+ const unsigned int dst_stride = va_eosd_image.pitches[0]; -+ unsigned char *dst = get_eosd_image_data(dst_x, dst_y); -+ const unsigned int r = (color >> 24) & 0xff; -+ const unsigned int g = (color >> 16) & 0xff; -+ const unsigned int b = (color >> 8) & 0xff; -+ const unsigned int a = 0xff - (color & 0xff); -+ -+ for (y = 0; y < src_h; y++, dst += dst_stride, src += src_stride) -+ for (x = 0; x < src_w; x++) { -+ const unsigned int v = src[x]; -+ dst[4*x + 0] = (r * v + dst[4*x + 0] * (0xff - v)) / 255; -+ dst[4*x + 1] = (g * v + dst[4*x + 1] * (0xff - v)) / 255; -+ dst[4*x + 2] = (b * v + dst[4*x + 2] * (0xff - v)) / 255; -+ dst[4*x + 3] = (a * v + dst[4*x + 3] * (0xff - v)) / 255; -+ } -+} -+ -+static void disable_eosd(void) -+{ -+ if (!va_eosd_associated) -+ return; -+ -+ vaDeassociateSubpicture(va_context->display, -+ va_eosd_subpicture, -+ va_surface_ids, va_num_surfaces); -+ -+ va_eosd_associated = 0; -+} -+ -+static int enable_eosd(void) -+{ -+ VAStatus status; -+ -+ if (va_eosd_associated) -+ return 0; -+ -+ status = vaAssociateSubpicture2(va_context->display, -+ va_eosd_subpicture, -+ va_surface_ids, va_num_surfaces, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_image_width, g_image_height, -+ 0); -+ if (!check_status(status, "vaAssociateSubpicture()")) -+ return -1; -+ -+ va_eosd_associated = 1; -+ return 0; -+} -+ -+///< List of subpicture formats in preferred order -+static const struct { -+ uint32_t format; -+ eosd_draw_alpha_func draw_alpha; -+} -+va_eosd_info[] = { -+ { VA_FOURCC('B','G','R','A'), eosd_draw_alpha_bgra }, -+ { VA_FOURCC('R','G','B','A'), eosd_draw_alpha_rgba }, -+ { 0, NULL } -+}; -+ -+static int is_direct_mapping_init(void) -+{ -+ VADisplayAttribute attr; -+ VAStatus status; -+ -+ if (va_dm < 2) -+ return va_dm; -+ -+ /* If the driver doesn't make a copy of the VA surface for -+ display, then we have to retain it until it's no longer the -+ visible surface. In other words, if the driver is using -+ DirectSurface mode, we don't want to decode the new surface -+ into the previous one that was used for display. */ -+ attr.type = VADisplayAttribDirectSurface; -+ attr.flags = VA_DISPLAY_ATTRIB_GETTABLE; -+ -+ status = vaGetDisplayAttributes(va_context->display, &attr, 1); -+ if (status == VA_STATUS_SUCCESS) -+ return !attr.value; -+ return 0; -+} -+ -+static inline int is_direct_mapping(void) -+{ -+ static int dm = -1; -+ if (dm < 0) { -+ dm = is_direct_mapping_init(); -+ if (dm) -+ mp_msg(MSGT_VO, MSGL_INFO, -+ "[vo_vaapi] Using 1:1 VA surface mapping\n"); -+ } -+ return dm; -+} -+ -+static int int_012(int *n) -+{ -+ return *n >= 0 && *n <= 2; -+} -+ -+#if USE_VAAPI_SCALING -+static strarg_t g_scaling_arg = { 0, NULL }; -+ -+static int test_scaling_arg(void *arg) -+{ -+ strarg_t * const strarg = arg; -+ -+ return (strargcmp(strarg, "default") == 0 || -+ strargcmp(strarg, "fast") == 0 || -+ strargcmp(strarg, "hq") == 0); -+} -+ -+static void setup_scaling(const char *scaling) -+{ -+ if (strcmp(scaling, "default") == 0) -+ g_scaling = VA_FILTER_SCALING_DEFAULT; -+ else if (strcmp(scaling, "fast") == 0) -+ g_scaling = VA_FILTER_SCALING_FAST; -+ else if (strcmp(scaling, "hq") == 0) -+ g_scaling = VA_FILTER_SCALING_HQ; -+ else if (strcmp(scaling, "nla") == 0) -+ g_scaling = VA_FILTER_SCALING_NL_ANAMORPHIC; -+} -+#endif -+ -+static const opt_t subopts[] = { -+ { "dm", OPT_ARG_INT, &va_dm, (opt_test_f)int_012 }, -+ { "stats", OPT_ARG_BOOL, &cpu_stats, NULL }, -+ { "deint", OPT_ARG_INT, &g_deint, (opt_test_f)int_012 }, -+#if USE_VAAPI_COLORSPACE -+ { "colorspace", OPT_ARG_INT, &g_colorspace, (opt_test_f)int_012 }, -+#endif -+#if USE_VAAPI_SCALING -+ { "scaling", OPT_ARG_STR, &g_scaling_arg, test_scaling_arg }, -+#endif -+#if CONFIG_GL -+ { "gl", OPT_ARG_BOOL, &gl_enabled, NULL }, -+ { "glfinish", OPT_ARG_BOOL, &gl_finish, NULL }, -+#if USE_VAAPI_GLX_BIND -+ { "bind", OPT_ARG_BOOL, &gl_binding, NULL }, -+#endif -+ { "reflect", OPT_ARG_BOOL, &gl_reflect, NULL }, -+ { "tfp", OPT_ARG_BOOL, &gl_use_tfp, NULL }, -+#endif -+#if CONFIG_XRENDER -+ { "xrender", OPT_ARG_BOOL, &xr_enabled, NULL }, -+#endif -+ { NULL, } -+}; -+ -+static int preinit(const char *arg) -+{ -+ VADisplayAttribute *display_attrs; -+ VAStatus status; -+ int va_major_version, va_minor_version; -+ int i, max_image_formats, max_subpic_formats, max_profiles; -+ int num_display_attrs, max_display_attrs; -+ -+ va_dm = 2; -+ g_deint = 0; -+ g_deint_type = 2; -+ g_colorspace = 1; -+ g_scaling = 0; -+ if (subopt_parse(arg, subopts) != 0) { -+ mp_msg(MSGT_VO, MSGL_FATAL, -+ "\n-vo vaapi command line help:\n" -+ "Example: mplayer -vo vaapi:gl\n" -+ "\nOptions:\n" -+ " dm\n" -+ " 0: use least-recently-used VA surface\n" -+ " 1: identify VA surface with MPI index\n" -+ " 2: auto-detect use of direct surface mapping (default)\n" -+ " deint (all modes > 0 respect -field-dominance)\n" -+ " 0: no deinterlacing (default)\n" -+ " 1: only show first field\n" -+ " 2: bob deinterlacing\n" -+#if USE_VAAPI_COLORSPACE -+ " colorspace\n" -+ " 0: guess based on video resolution\n" -+ " 1: ITU-R BT.601 (default)\n" -+ " 2: ITU-R BT.709\n" -+ " 3: SMPTE-240M\n" -+#endif -+#if USE_VAAPI_SCALING -+ " scaling\n" -+ " default: use implementation default (default)\n" -+ " fast: use fast scaling, but possibly with less quality\n" -+ " hq: use high-quality scaling, but possibly slower\n" -+ " nla: use non-linear anamorphic scaling\n" -+#endif -+#if CONFIG_GL -+ " gl\n" -+ " Enable OpenGL rendering\n" -+ " glfinish\n" -+ " Call glFinish() before swapping buffers\n" -+ " tfp\n" -+ " Use GLX texture-from-pixmap instead of VA/GLX extensions\n" -+#if USE_VAAPI_GLX_BIND -+ " bind\n" -+ " Use VA surface binding instead of copy\n" -+#endif -+ " reflect\n" -+ " Enable OpenGL reflection effects\n" -+#endif -+#if CONFIG_XRENDER -+ " xrender\n" -+ " Enable Xrender rendering, thus vaPutSurface() to a Pixmap\n" -+#endif -+ "\n" ); -+ return -1; -+ } -+ if (gl_enabled && xr_enabled) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] User requested both Xrender and OpenGL rendering\n"); -+ return -1; -+ } -+ if (g_deint) -+ g_deint_type = g_deint; -+#if CONFIG_GL -+ if (gl_enabled) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using OpenGL rendering%s\n", -+ gl_reflect ? ", with reflection effects" : ""); -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using Xrender rendering\n"); -+#endif -+#if USE_VAAPI_SCALING -+ if (g_scaling_arg.str) { -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using '%s' scaling\n", g_scaling_arg.str); -+ setup_scaling(g_scaling_arg.str); -+ } -+#endif -+ -+ stats_init(); -+ -+#if CONFIG_GL -+ if (gl_enabled && !init_mpglcontext(&gl_context, GLTYPE_X11)) -+ return -1; -+ else -+#endif -+ if (!vo_init()) -+ return -1; -+#if CONFIG_XRENDER -+ if (xr_enabled && !init_xrender()) -+ return -1; -+#endif -+ -+ va_context = calloc(1, sizeof(*va_context)); -+ if (!va_context) -+ return -1; -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_enabled) -+ va_context->display = vaGetDisplayGLX(mDisplay); -+ else -+#endif -+ va_context->display = vaGetDisplay(mDisplay); -+ if (!va_context->display) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): VA display %p\n", va_context->display); -+ -+ status = vaInitialize(va_context->display, &va_major_version, &va_minor_version); -+ if (!check_status(status, "vaInitialize()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): VA API version %d.%d\n", -+ va_major_version, va_minor_version); -+ -+ max_image_formats = vaMaxNumImageFormats(va_context->display); -+ va_image_formats = calloc(max_image_formats, sizeof(*va_image_formats)); -+ if (!va_image_formats) -+ return -1; -+ status = vaQueryImageFormats(va_context->display, va_image_formats, &va_num_image_formats); -+ if (!check_status(status, "vaQueryImageFormats()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d image formats available\n", -+ va_num_image_formats); -+ for (i = 0; i < va_num_image_formats; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAImageFormat(&va_image_formats[i])); -+ -+ max_subpic_formats = vaMaxNumSubpictureFormats(va_context->display); -+ va_subpic_formats = calloc(max_subpic_formats, sizeof(*va_subpic_formats)); -+ if (!va_subpic_formats) -+ return -1; -+ va_subpic_flags = calloc(max_subpic_formats, sizeof(*va_subpic_flags)); -+ if (!va_subpic_flags) -+ return -1; -+ status = vaQuerySubpictureFormats(va_context->display, va_subpic_formats, va_subpic_flags, &va_num_subpic_formats); -+ if (!check_status(status, "vaQuerySubpictureFormats()")) -+ va_num_subpic_formats = 0; /* XXX: don't error out for IEGD */ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d subpicture formats available\n", -+ va_num_subpic_formats); -+ for (i = 0; i < va_num_subpic_formats; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s, flags 0x%x\n", string_of_VAImageFormat(&va_subpic_formats[i]), va_subpic_flags[i]); -+ -+ max_profiles = vaMaxNumProfiles(va_context->display); -+ va_profiles = calloc(max_profiles, sizeof(*va_profiles)); -+ if (!va_profiles) -+ return -1; -+ status = vaQueryConfigProfiles(va_context->display, va_profiles, &va_num_profiles); -+ if (!check_status(status, "vaQueryConfigProfiles()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d profiles available\n", -+ va_num_profiles); -+ for (i = 0; i < va_num_profiles; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAProfile(va_profiles[i])); -+ -+ va_osd_subpicture = VA_INVALID_ID; -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_eosd_subpicture = VA_INVALID_ID; -+ va_eosd_image.image_id = VA_INVALID_ID; -+ -+ max_display_attrs = vaMaxNumDisplayAttributes(va_context->display); -+ display_attrs = calloc(max_display_attrs, sizeof(*display_attrs)); -+ if (display_attrs) { -+ num_display_attrs = 0; -+ status = vaQueryDisplayAttributes(va_context->display, -+ display_attrs, &num_display_attrs); -+ if (check_status(status, "vaQueryDisplayAttributes()")) { -+ for (i = 0; i < num_display_attrs; i++) { -+ VADisplayAttribute *attr; -+ switch (display_attrs[i].type) { -+ case VADisplayAttribBrightness: -+ attr = &va_equalizer.brightness; -+ break; -+ case VADisplayAttribContrast: -+ attr = &va_equalizer.contrast; -+ break; -+ case VADisplayAttribHue: -+ attr = &va_equalizer.hue; -+ break; -+ case VADisplayAttribSaturation: -+ attr = &va_equalizer.saturation; -+ break; -+ default: -+ attr = NULL; -+ break; -+ } -+ if (attr) -+ *attr = display_attrs[i]; -+ } -+ } -+ free(display_attrs); -+ } -+ return 0; -+} -+ -+static void free_video_specific(void) -+{ -+ int i; -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_surface) { -+ VAStatus status; -+ status = vaDestroySurfaceGLX(va_context->display, gl_surface); -+ check_status(status, "vaDestroySurfaceGLX()"); -+ gl_surface = NULL; -+ } -+#endif -+ -+ if (va_context && va_context->context_id) { -+ vaDestroyContext(va_context->display, va_context->context_id); -+ va_context->context_id = 0; -+ } -+ -+ if (va_free_surfaces) { -+ for (i = 0; i < va_num_surfaces; i++) { -+ if (!va_free_surfaces[i]) -+ continue; -+ if (va_free_surfaces[i]->image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, -+ va_free_surfaces[i]->image.image_id); -+ va_free_surfaces[i]->image.image_id = VA_INVALID_ID; -+ } -+ free(va_free_surfaces[i]); -+ va_free_surfaces[i] = NULL; -+ } -+ free(va_free_surfaces); -+ va_free_surfaces = NULL; -+ va_free_surfaces_head_index = 0; -+ va_free_surfaces_tail_index = 0; -+ } -+ -+ g_output_surface = 0; -+ memset(g_output_surfaces, 0, sizeof(g_output_surfaces)); -+ -+ if (va_osd_palette) { -+ free(va_osd_palette); -+ va_osd_palette = NULL; -+ } -+ -+ disable_eosd(); -+ disable_osd(); -+ -+ if (va_eosd_subpicture != VA_INVALID_ID) { -+ vaDestroySubpicture(va_context->display, va_eosd_subpicture); -+ va_eosd_subpicture = VA_INVALID_ID; -+ } -+ -+ if (va_eosd_image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, va_eosd_image.image_id); -+ va_eosd_image.image_id = VA_INVALID_ID; -+ } -+ -+ destroy_osd(); -+ -+ if (va_surface_ids) { -+ vaDestroySurfaces(va_context->display, va_surface_ids, va_num_surfaces); -+ free(va_surface_ids); -+ va_surface_ids = NULL; -+ va_num_surfaces = 0; -+ } -+ -+ if (va_context && va_context->config_id) { -+ vaDestroyConfig(va_context->display, va_context->config_id); -+ va_context->config_id = 0; -+ } -+ -+ if (va_entrypoints) { -+ free(va_entrypoints); -+ va_entrypoints = NULL; -+ } -+ -+#if CONFIG_GL -+ if (gl_pixmap) { -+ x11_trap_errors(); -+ mpglXDestroyPixmap(mDisplay, gl_pixmap); -+ XSync(mDisplay, False); -+ x11_untrap_errors(); -+ gl_pixmap = None; -+ } -+ -+ if (g_image_pixmap) { -+ XFreePixmap(mDisplay, g_image_pixmap); -+ g_image_pixmap = None; -+ } -+ -+ if (gl_texture) { -+ glDeleteTextures(1, &gl_texture); -+ gl_texture = GL_NONE; -+ } -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_window_picture) { -+ XRenderFreePicture(mDisplay, xr_window_picture); -+ xr_window_picture = None; -+ } -+#endif -+ -+ g_is_visible = 0; -+} -+ -+static void uninit(void) -+{ -+ if (!vo_config_count) -+ return; -+ -+ free_video_specific(); -+ -+ if (va_profiles) { -+ free(va_profiles); -+ va_profiles = NULL; -+ } -+ -+ if (va_subpic_flags) { -+ free(va_subpic_flags); -+ va_subpic_flags = NULL; -+ } -+ -+ if (va_subpic_formats) { -+ free(va_subpic_formats); -+ va_subpic_formats = NULL; -+ } -+ -+ if (va_image_formats) { -+ free(va_image_formats); -+ va_image_formats = NULL; -+ } -+ -+ if (va_context && va_context->display) { -+ vaTerminate(va_context->display); -+ va_context->display = NULL; -+ } -+ -+ if (va_context) { -+ free(va_context); -+ va_context = NULL; -+ } -+ -+#ifdef CONFIG_XF86VM -+ vo_vm_close(); -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ uninit_xrender(); -+#endif -+#if CONFIG_GL -+ if (gl_enabled) -+ uninit_mpglcontext(&gl_context); -+ else -+#endif -+ vo_x11_uninit(); -+ -+ stats_exit(); -+} -+ -+static int config_x11(uint32_t width, uint32_t height, -+ uint32_t display_width, uint32_t display_height, -+ uint32_t flags, char *title) -+{ -+ Colormap cmap; -+ XVisualInfo visualInfo; -+ XVisualInfo *vi; -+ XSetWindowAttributes xswa; -+ unsigned long xswa_mask; -+ XWindowAttributes wattr; -+ int depth; -+ -+#ifdef CONFIG_GUI -+ if (use_gui) -+ guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize our window -+ else -+#endif -+ { -+#ifdef CONFIG_XF86VM -+ if (flags & VOFLAG_MODESWITCHING) -+ vo_vm_switch(); -+#endif -+ XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &wattr); -+ depth = wattr.depth; -+ if (depth != 15 && depth != 16 && depth != 24 && depth != 32) -+ depth = 24; -+ XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &visualInfo); -+ -+#if CONFIG_GL -+ if (gl_enabled) { -+ vi = glXChooseVisual(mDisplay, mScreen, gl_visual_attr); -+ if (!vi) -+ return -1; -+ cmap = XCreateColormap(mDisplay, mRootWin, vi->visual, AllocNone); -+ if (cmap == None) -+ return -1; -+ } -+ else -+#endif -+ { -+ vi = &visualInfo; -+ XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, vi); -+ cmap = CopyFromParent; -+ } -+ -+ vo_x11_create_vo_window(vi, -+ vo_dx, vo_dy, display_width, display_height, -+ flags, cmap, "vaapi", title); -+ -+ if (vi != &visualInfo) -+ XFree(vi); -+ -+ xswa_mask = CWBorderPixel | CWBackPixel; -+ xswa.border_pixel = 0; -+ xswa.background_pixel = 0; -+ XChangeWindowAttributes(mDisplay, vo_window, xswa_mask, &xswa); -+ -+#ifdef CONFIG_XF86VM -+ if (flags & VOFLAG_MODESWITCHING) { -+ /* Grab the mouse pointer in our window */ -+ if (vo_grabpointer) -+ XGrabPointer(mDisplay, vo_window, True, 0, -+ GrabModeAsync, GrabModeAsync, -+ vo_window, None, CurrentTime); -+ XSetInputFocus(mDisplay, vo_window, RevertToNone, CurrentTime); -+ } -+#endif -+ } -+ return 0; -+} -+ -+#if CONFIG_GL -+static GLXFBConfig *get_fbconfig_for_depth(int depth) -+{ -+ GLXFBConfig *fbconfigs, *ret = NULL; -+ int n_elements, i, found; -+ int db, stencil, alpha, mipmap, rgba, value; -+ -+ static GLXFBConfig *cached_config = NULL; -+ static int have_cached_config = 0; -+ -+ if (have_cached_config) -+ return cached_config; -+ -+ fbconfigs = glXGetFBConfigs(mDisplay, mScreen, &n_elements); -+ -+ db = SHRT_MAX; -+ stencil = SHRT_MAX; -+ mipmap = 0; -+ rgba = 0; -+ -+ found = n_elements; -+ -+ for (i = 0; i < n_elements; i++) { -+ XVisualInfo *vi; -+ int visual_depth; -+ -+ vi = glXGetVisualFromFBConfig(mDisplay, fbconfigs[i]); -+ if (!vi) -+ continue; -+ -+ visual_depth = vi->depth; -+ XFree(vi); -+ -+ if (visual_depth != depth) -+ continue; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_ALPHA_SIZE, &alpha); -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_BUFFER_SIZE, &value); -+ if (value != depth && (value - alpha) != depth) -+ continue; -+ -+ value = 0; -+ if (depth == 32) { -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], -+ GLX_BIND_TO_TEXTURE_RGBA_EXT, &value); -+ if (value) -+ rgba = 1; -+ } -+ -+ if (!value) { -+ if (rgba) -+ continue; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], -+ GLX_BIND_TO_TEXTURE_RGB_EXT, &value); -+ if (!value) -+ continue; -+ } -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_DOUBLEBUFFER, &value); -+ if (value > db) -+ continue; -+ db = value; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_STENCIL_SIZE, &value); -+ if (value > stencil) -+ continue; -+ stencil = value; -+ -+ found = i; -+ } -+ -+ if (found != n_elements) { -+ ret = malloc(sizeof(*ret)); -+ *ret = fbconfigs[found]; -+ } -+ -+ if (n_elements) -+ XFree(fbconfigs); -+ -+ have_cached_config = 1; -+ cached_config = ret; -+ return ret; -+} -+ -+static int config_tfp(unsigned int width, unsigned int height) -+{ -+ GLXFBConfig *fbconfig; -+ int attribs[7], i = 0; -+ const int depth = 24; -+ -+ if (!mpglXBindTexImage || !mpglXReleaseTexImage) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] No GLX texture-from-pixmap extension available\n"); -+ return -1; -+ } -+ -+ if (depth != 24 && depth != 32) -+ return -1; -+ -+ g_image_pixmap = XCreatePixmap(mDisplay, vo_window, width, height, depth); -+ if (!g_image_pixmap) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not create X11 pixmap\n"); -+ return -1; -+ } -+ -+ fbconfig = get_fbconfig_for_depth(depth); -+ if (!fbconfig) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not find an FBConfig for 32-bit pixmap\n"); -+ return -1; -+ } -+ -+ attribs[i++] = GLX_TEXTURE_TARGET_EXT; -+ attribs[i++] = GLX_TEXTURE_2D_EXT; -+ attribs[i++] = GLX_TEXTURE_FORMAT_EXT; -+ if (depth == 24) -+ attribs[i++] = GLX_TEXTURE_FORMAT_RGB_EXT; -+ else if (depth == 32) -+ attribs[i++] = GLX_TEXTURE_FORMAT_RGBA_EXT; -+ attribs[i++] = GLX_MIPMAP_TEXTURE_EXT; -+ attribs[i++] = GL_FALSE; -+ attribs[i++] = None; -+ -+ x11_trap_errors(); -+ gl_pixmap = mpglXCreatePixmap(mDisplay, *fbconfig, g_image_pixmap, attribs); -+ XSync(mDisplay, False); -+ if (x11_untrap_errors()) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not create GLX pixmap\n"); -+ return -1; -+ } -+ return 0; -+} -+ -+static int config_glx(unsigned int width, unsigned int height) -+{ -+ if (gl_context.setGlWindow(&gl_context) == SET_WINDOW_FAILED) -+ return -1; -+ -+ glDisable(GL_DEPTH_TEST); -+ glDepthMask(GL_FALSE); -+ glDisable(GL_CULL_FACE); -+ glEnable(GL_TEXTURE_2D); -+ glDrawBuffer(vo_doublebuffering ? GL_BACK : GL_FRONT); -+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -+ glEnable(GL_BLEND); -+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -+ -+ /* Create TFP resources */ -+ if (gl_use_tfp && config_tfp(width, height) == 0) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using GLX texture-from-pixmap extension\n"); -+ else -+ gl_use_tfp = 0; -+ -+ /* Create OpenGL texture */ -+ /* XXX: assume GL_ARB_texture_non_power_of_two is available */ -+ glEnable(GL_TEXTURE_2D); -+ glGenTextures(1, &gl_texture); -+ mpglBindTexture(GL_TEXTURE_2D, gl_texture); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -+ if (!gl_use_tfp) { -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4); -+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, -+ GL_BGRA, GL_UNSIGNED_BYTE, NULL); -+ } -+ mpglBindTexture(GL_TEXTURE_2D, 0); -+ glDisable(GL_TEXTURE_2D); -+ -+ glClearColor(0.0, 0.0, 0.0, 1.0); -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ if (gl_build_font() < 0) -+ return -1; -+ return 0; -+} -+#endif -+ -+#if CONFIG_XRENDER -+static XRenderPictFormat *get_xrender_argb32_format(void) -+{ -+ static XRenderPictFormat *pictformat = NULL; -+ XRenderPictFormat templ; -+ -+ const unsigned long mask = -+ PictFormatType | -+ PictFormatDepth | -+ PictFormatRed | -+ PictFormatRedMask | -+ PictFormatGreen | -+ PictFormatGreenMask | -+ PictFormatBlue | -+ PictFormatBlueMask | -+ PictFormatAlphaMask; -+ -+ if (pictformat) -+ return pictformat; -+ -+ /* First, look for a 32-bit format which ignores the alpha component */ -+ templ.depth = 32; -+ templ.type = PictTypeDirect; -+ templ.direct.red = 16; -+ templ.direct.green = 8; -+ templ.direct.blue = 0; -+ templ.direct.redMask = 0xff; -+ templ.direct.greenMask = 0xff; -+ templ.direct.blueMask = 0xff; -+ templ.direct.alphaMask = 0; -+ -+ pictformat = XRenderFindFormat(mDisplay, mask, &templ, 0); -+ -+ if (!pictformat) { -+ /* Not all X servers support xRGB32 formats. However, the -+ * XRENDER spec says that they must support an ARGB32 format, -+ * so we can always return that. -+ */ -+ pictformat = XRenderFindStandardFormat(mDisplay, PictStandardARGB32); -+ if (!pictformat) -+ mp_msg(MSGT_VO, MSGL_ERR, "XRENDER ARGB32 format not supported\n"); -+ } -+ return pictformat; -+} -+ -+static int create_xrender_specific(void) -+{ -+ XRenderPictFormat *pictformat; -+ -+ if (g_output_rect.width == 0 && g_output_rect.height == 0) -+ return 0; -+ -+ g_image_pixmap = XCreatePixmap(mDisplay, vo_window, g_output_rect.width, -+ g_output_rect.height, 32); -+ if (!g_image_pixmap) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create video pixmap\n"); -+ return -1; -+ } -+ -+ pictformat = get_xrender_argb32_format(); -+ if (!pictformat) -+ return -1; -+ xr_video_picture = XRenderCreatePicture(mDisplay, g_image_pixmap, -+ pictformat, 0, NULL); -+ if (!xr_video_picture) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create XRENDER backing picture for Pixmap\n"); -+ return -1; -+ } -+ return 0; -+} -+ -+static void free_xrender_specific(void) -+{ -+ if (xr_video_picture) { -+ XRenderFreePicture(mDisplay, xr_video_picture); -+ xr_video_picture = None; -+ } -+ -+ if (g_image_pixmap) { -+ XFreePixmap(mDisplay, g_image_pixmap); -+ g_image_pixmap = None; -+ } -+} -+ -+static int reset_xrender_specific(void) -+{ -+ free_xrender_specific(); -+ return create_xrender_specific(); -+} -+ -+/* XXX: create a Pixmap as large as the display rect */ -+static int config_xrender(unsigned int width, unsigned int height) -+{ -+ XWindowAttributes wattr; -+ XRenderPictFormat *pictformat; -+ -+ XGetWindowAttributes(mDisplay, vo_window, &wattr); -+ pictformat = XRenderFindVisualFormat(mDisplay, wattr.visual); -+ if (!pictformat) { -+ mp_msg(MSGT_VO, MSGL_ERR, "XRENDER does not support Window visual\n"); -+ return -1; -+ } -+ -+ xr_window_picture = XRenderCreatePicture(mDisplay, vo_window, pictformat, -+ 0, NULL); -+ if (!xr_window_picture) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create XRENDER backing picture for Window\n"); -+ return -1; -+ } -+ return reset_xrender_specific(); -+} -+#endif -+ -+static int config_vaapi(uint32_t width, uint32_t height, uint32_t format) -+{ -+ VAConfigAttrib attrib; -+ VAStatus status; -+ int i, j, profile, entrypoint, max_entrypoints, num_surfaces; -+ -+ /* Create video surfaces */ -+ if (!IMGFMT_IS_VAAPI(format)) -+ num_surfaces = MAX_OUTPUT_SURFACES; -+ else { -+ switch (IMGFMT_VAAPI_CODEC(format)) { -+ case IMGFMT_VAAPI_CODEC_MPEG2: -+ num_surfaces = NUM_VIDEO_SURFACES_MPEG2; -+ break; -+ case IMGFMT_VAAPI_CODEC_MPEG4: -+ num_surfaces = NUM_VIDEO_SURFACES_MPEG4; -+ break; -+ case IMGFMT_VAAPI_CODEC_H264: -+ num_surfaces = NUM_VIDEO_SURFACES_H264; -+ break; -+ case IMGFMT_VAAPI_CODEC_VC1: -+ num_surfaces = NUM_VIDEO_SURFACES_VC1; -+ break; -+ default: -+ num_surfaces = 0; -+ break; -+ } -+ if (num_surfaces == 0) -+ return -1; -+ if (!is_direct_mapping()) -+ num_surfaces = FFMIN(2 * num_surfaces, MAX_VIDEO_SURFACES); -+ } -+ for (i = 0; i < num_surfaces; i++) { -+ struct vaapi_surface *surface; -+ surface = alloc_vaapi_surface(width, height, VA_RT_FORMAT_YUV420); -+ if (!surface) -+ return -1; -+ } -+ assert(va_num_surfaces == num_surfaces); -+ -+#if CONFIG_VAAPI_GLX -+ /* Create GLX surfaces */ -+ if (gl_enabled && !gl_use_tfp) { -+ status = vaCreateSurfaceGLX(va_context->display, -+ GL_TEXTURE_2D, gl_texture, -+ &gl_surface); -+ if (!check_status(status, "vaCreateSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ -+ /* Create OSD data */ -+ va_osd_draw_alpha = NULL; -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_osd_image.buf = VA_INVALID_ID; -+ va_osd_subpicture = VA_INVALID_ID; -+ ensure_osd(); -+ -+ /* Create EOSD data */ -+ va_eosd_draw_alpha = NULL; -+ va_eosd_image.image_id = VA_INVALID_ID; -+ va_eosd_image.buf = VA_INVALID_ID; -+ va_eosd_subpicture = VA_INVALID_ID; -+ for (i = 0; va_eosd_info[i].format; i++) { -+ for (j = 0; j < va_num_subpic_formats; j++) -+ if (va_subpic_formats[j].fourcc == va_eosd_info[i].format) -+ break; -+ if (j < va_num_subpic_formats && -+ vaCreateImage(va_context->display, &va_subpic_formats[j], -+ width, height, &va_eosd_image) == VA_STATUS_SUCCESS) -+ break; -+ } -+ if (va_eosd_info[i].format && -+ vaCreateSubpicture(va_context->display, va_eosd_image.image_id, -+ &va_eosd_subpicture) == VA_STATUS_SUCCESS) { -+ va_eosd_draw_alpha = va_eosd_info[i].draw_alpha; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using %s surface for EOSD\n", -+ string_of_VAImageFormat(&va_eosd_image.format)); -+ } -+ -+ /* Allocate VA images */ -+ if (!IMGFMT_IS_VAAPI(format)) { -+ VAImageFormat *image_format = VAImageFormat_from_imgfmt(format); -+ if (!image_format) -+ return -1; -+ for (i = 0; i < va_num_surfaces; i++) { -+ struct vaapi_surface * const s = va_free_surfaces[i]; -+ s->is_bound = 0; -+ status = vaDeriveImage(va_context->display, s->id, &s->image); -+ if (status == VA_STATUS_SUCCESS) { -+ /* vaDeriveImage() is supported, check format */ -+ if (s->image.format.fourcc != image_format->fourcc) { -+ vaDestroyImage(va_context->display, s->image.image_id); -+ return -1; -+ } -+ if (s->image.width == width && s->image.height == height) { -+ s->is_bound = 1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using vaDeriveImage()\n"); -+ } -+ else { -+ vaDestroyImage(va_context->display, s->image.image_id); -+ status = VA_STATUS_ERROR_OPERATION_FAILED; -+ } -+ -+ } -+ if (status != VA_STATUS_SUCCESS) { -+ status = vaCreateImage(va_context->display, image_format, -+ width, height, &s->image); -+ if (!check_status(status, "vaCreateImage()")) -+ return -1; -+ } -+ } -+ return 0; -+ } -+ -+ /* Check profile */ -+ profile = VAProfile_from_imgfmt(format); -+ if (profile < 0) -+ return -1; -+ -+ /* Check entry-point (only VLD for now) */ -+ max_entrypoints = vaMaxNumEntrypoints(va_context->display); -+ va_entrypoints = calloc(max_entrypoints, sizeof(*va_entrypoints)); -+ if (!va_entrypoints) -+ return -1; -+ -+ status = vaQueryConfigEntrypoints(va_context->display, profile, -+ va_entrypoints, &va_num_entrypoints); -+ if (!check_status(status, "vaQueryConfigEntrypoints()")) -+ return -1; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] config_vaapi(%s): %d entrypoints available\n", -+ string_of_VAProfile(profile), va_num_entrypoints); -+ for (i = 0; i < va_num_entrypoints; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAEntrypoint(va_entrypoints[i])); -+ -+ entrypoint = VAEntrypoint_from_imgfmt(format); -+ if (entrypoint != VAEntrypointVLD) -+ return -1; -+ -+ /* Check chroma format (only 4:2:0 for now) */ -+ attrib.type = VAConfigAttribRTFormat; -+ status = vaGetConfigAttributes(va_context->display, profile, entrypoint, &attrib, 1); -+ if (!check_status(status, "vaGetConfigAttributes()")) -+ return -1; -+ if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) -+ return -1; -+ -+ /* Create a configuration for the decode pipeline */ -+ status = vaCreateConfig(va_context->display, profile, entrypoint, &attrib, 1, &va_context->config_id); -+ if (!check_status(status, "vaCreateConfig()")) -+ return -1; -+ -+ /* Create a context for the decode pipeline */ -+ status = vaCreateContext(va_context->display, va_context->config_id, -+ width, height, VA_PROGRESSIVE, -+ va_surface_ids, va_num_surfaces, -+ &va_context->context_id); -+ if (!check_status(status, "vaCreateContext()")) -+ return -1; -+ return 0; -+} -+ -+static int config(uint32_t width, uint32_t height, -+ uint32_t display_width, uint32_t display_height, -+ uint32_t flags, char *title, uint32_t format) -+{ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] config(): size %dx%d, display size %dx%d, flags %x, title '%s', format %x (%s)\n", -+ width, height, display_width, display_height, flags, title, format, vo_format_name(format)); -+ -+ free_video_specific(); -+ -+ if (config_x11(width, height, display_width, display_height, flags, title) < 0) -+ return -1; -+ -+#if CONFIG_GL -+ if (gl_enabled && config_glx(width, height) < 0) -+ return -1; -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_enabled && config_xrender(width, height) < 0) -+ return -1; -+#endif -+ -+ if (config_vaapi(width, height, format) < 0) -+ return -1; -+ -+ g_is_visible = 0; -+ g_is_paused = 0; -+ g_image_width = width; -+ g_image_height = height; -+ g_image_format = format; -+ resize(); -+ return 0; -+} -+ -+static int query_format(uint32_t format) -+{ -+ const int default_caps = (VFCAP_CSP_SUPPORTED | -+ VFCAP_CSP_SUPPORTED_BY_HW | -+ VFCAP_HWSCALE_UP | -+ VFCAP_HWSCALE_DOWN | -+ VFCAP_OSD | -+ VFCAP_EOSD); -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] query_format(): format %x (%s)\n", -+ format, vo_format_name(format)); -+ -+ switch (format) { -+ case IMGFMT_VAAPI_MPEG2: -+ case IMGFMT_VAAPI_MPEG4: -+ case IMGFMT_VAAPI_H263: -+ case IMGFMT_VAAPI_H264: -+ case IMGFMT_VAAPI_WMV3: -+ case IMGFMT_VAAPI_VC1: -+ return default_caps | VOCAP_NOSLICES; -+ case IMGFMT_NV12: -+ case IMGFMT_YV12: -+ case IMGFMT_I420: -+ case IMGFMT_IYUV: -+ if (VAImageFormat_from_imgfmt(format)) -+ return default_caps; -+ break; -+ } -+ return 0; -+} -+ -+static inline int get_field_flags(int i) -+{ -+ return (g_deint && (g_image_fields & MP_IMGFIELD_INTERLACED) ? -+ (((!!(g_image_fields & MP_IMGFIELD_TOP_FIRST)) ^ i) == 0 ? -+ VA_BOTTOM_FIELD : VA_TOP_FIELD) : VA_FRAME_PICTURE); -+} -+ -+static inline int get_colorspace_flags(void) -+{ -+ int csp = 0; -+#if USE_VAAPI_COLORSPACE -+ switch (g_colorspace) { -+ case 0: -+ csp = ((g_image_width >= 1280 || g_image_height > 576) ? -+ VA_SRC_BT709 : VA_SRC_BT601); -+ break; -+ case 1: -+ csp = VA_SRC_BT601; -+ break; -+ case 2: -+ csp = VA_SRC_BT709; -+ break; -+ case 3: -+ csp = VA_SRC_SMPTE_240; -+ break; -+ default: -+ assert(0); -+ break; -+ } -+#endif -+ return csp; -+} -+ -+static void put_surface_x11(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ const unsigned int flags = (get_field_flags(i) | -+ get_colorspace_flags() | -+ g_scaling); -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ vo_window, -+ 0, 0, g_image_width, g_image_height, -+ g_output_rect.left, -+ g_output_rect.top, -+ g_output_rect.width, -+ g_output_rect.height, -+ NULL, 0, -+ flags); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ } -+} -+ -+#if CONFIG_GL -+static void put_surface_glx(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ if (gl_use_tfp) { -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ const unsigned int flags = (get_field_flags(i) | -+ get_colorspace_flags() | -+ g_scaling); -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ g_image_pixmap, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_image_width, g_image_height, -+ NULL, 0, -+ flags); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ } -+ g_output_surfaces[g_output_surface] = surface; -+ return; -+ } -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_binding) { -+#if USE_VAAPI_GLX_BIND -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ const unsigned int flags = (get_field_flags(i) | -+ get_colorspace_flags() | -+ g_scaling); -+ status = vaAssociateSurfaceGLX(va_context->display, -+ gl_surface, -+ surface->id, -+ flags); -+ if (!check_status(status, "vaAssociateSurfaceGLX()")) -+ return; -+ } -+#else -+ mp_msg(MSGT_VO, MSGL_WARN, "vaAssociateSurfaceGLX() is not implemented\n"); -+ gl_binding = 0; -+#endif -+ } -+ -+ if (!gl_binding) { -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ const unsigned int flags = (get_field_flags(i) | -+ get_colorspace_flags() | -+ g_scaling); -+ status = vaCopySurfaceGLX(va_context->display, -+ gl_surface, -+ surface->id, -+ flags); -+ -+ if (status == VA_STATUS_ERROR_UNIMPLEMENTED) { -+ mp_msg(MSGT_VO, MSGL_WARN, -+ "[vo_vaapi] vaCopySurfaceGLX() is not implemented\n"); -+ gl_binding = 1; -+ } -+ else { -+ if (!check_status(status, "vaCopySurfaceGLX()")) -+ return; -+ } -+ } -+ } -+#endif -+ g_output_surfaces[g_output_surface] = surface; -+} -+ -+static int glx_bind_texture(void) -+{ -+ glEnable(GL_TEXTURE_2D); -+ mpglBindTexture(GL_TEXTURE_2D, gl_texture); -+ -+ if (gl_use_tfp) { -+ x11_trap_errors(); -+ mpglXBindTexImage(mDisplay, gl_pixmap, GLX_FRONT_LEFT_EXT, NULL); -+ XSync(mDisplay, False); -+ if (x11_untrap_errors()) -+ mp_msg(MSGT_VO, MSGL_WARN, "[vo_vaapi] Update bind_tex_image failed\n"); -+ } -+ -+#if USE_VAAPI_GLX_BIND -+ if (gl_binding) { -+ VAStatus status; -+ status = vaBeginRenderSurfaceGLX(va_context->display, gl_surface); -+ if (!check_status(status, "vaBeginRenderSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ return 0; -+} -+ -+static int glx_unbind_texture(void) -+{ -+ if (gl_use_tfp) { -+ x11_trap_errors(); -+ mpglXReleaseTexImage(mDisplay, gl_pixmap, GLX_FRONT_LEFT_EXT); -+ if (x11_untrap_errors()) -+ mp_msg(MSGT_VO, MSGL_WARN, "[vo_vaapi] Failed to release?\n"); -+ } -+ -+#if USE_VAAPI_GLX_BIND -+ if (gl_binding) { -+ VAStatus status; -+ status = vaEndRenderSurfaceGLX(va_context->display, gl_surface); -+ if (!check_status(status, "vaEndRenderSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ -+ mpglBindTexture(GL_TEXTURE_2D, 0); -+ glDisable(GL_TEXTURE_2D); -+ return 0; -+} -+ -+static void render_background(void) -+{ -+ /* Original code from Mirco Muller (MacSlow): -+ */ -+ GLfloat fStartX = 0.0f; -+ GLfloat fStartY = 0.0f; -+ GLfloat fWidth = (GLfloat)vo_dwidth; -+ GLfloat fHeight = (GLfloat)vo_dheight; -+ -+ glBegin(GL_QUADS); -+ { -+ /* top third, darker grey to white */ -+ glColor3f(0.85f, 0.85f, 0.85f); -+ glVertex3f(fStartX, fStartY, 0.0f); -+ glColor3f(0.85f, 0.85f, 0.85f); -+ glVertex3f(fStartX + fWidth, fStartY, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight / 3.0f, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + fHeight / 3.0f, 0.0f); -+ -+ /* middle third, just plain white */ -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX + fWidth, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ -+ /* bottom third, white to lighter grey */ -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX + fWidth, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glColor3f(0.62f, 0.66f, 0.69f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight, 0.0f); -+ glColor3f(0.62f, 0.66f, 0.69f); -+ glVertex3f(fStartX, fStartY + fHeight, 0.0f); -+ } -+ glEnd(); -+} -+ -+static void render_frame(void) -+{ -+ struct vo_rect * const r = &g_output_rect; -+ -+ if (glx_bind_texture() < 0) -+ return; -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glBegin(GL_QUADS); -+ { -+ glTexCoord2f(0.0f, 0.0f); glVertex2i(r->left, r->top); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(r->left, r->bottom); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(r->right, r->bottom); -+ glTexCoord2f(1.0f, 0.0f); glVertex2i(r->right, r->top); -+ } -+ glEnd(); -+ if (glx_unbind_texture() < 0) -+ return; -+} -+ -+static void render_reflection(void) -+{ -+ struct vo_rect * const r = &g_output_rect; -+ const unsigned int rh = g_output_rect.height / 5; -+ GLfloat ry = 1.0f - (GLfloat)rh / (GLfloat)r->height; -+ -+ if (glx_bind_texture() < 0) -+ return; -+ glBegin(GL_QUADS); -+ { -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(r->left, r->top); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(r->right, r->top); -+ -+ glColor4f(1.0f, 1.0f, 1.0f, 0.0f); -+ glTexCoord2f(1.0f, ry); glVertex2i(r->right, r->top + rh); -+ glTexCoord2f(0.0f, ry); glVertex2i(r->left, r->top + rh); -+ } -+ glEnd(); -+ if (glx_unbind_texture() < 0) -+ return; -+} -+ -+static void flip_page_glx(void) -+{ -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ if (gl_reflect) { -+ render_background(); -+ -+ glPushMatrix(); -+ glRotatef(20.0f, 0.0f, 1.0f, 0.0f); -+ glTranslatef(50.0f, 0.0f, 0.0f); -+ } -+ -+ render_frame(); -+ -+ if (gl_reflect) { -+ glPushMatrix(); -+ glTranslatef(0.0, (GLfloat)g_output_rect.height + 5.0f, 0.0f); -+ render_reflection(); -+ glPopMatrix(); -+ glPopMatrix(); -+ } -+ -+ if (cpu_stats) { -+ gl_draw_rectangle(0, 0, vo_dwidth, 32, 0x000000ff); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glRasterPos2i(16, 20); -+ gl_printf("MPlayer: %.1f%% of CPU @ %u MHz", cpu_usage, cpu_frequency); -+ } -+ -+ if (gl_finish) -+ mpglFinish(); -+ gl_context.swapGlBuffers(&gl_context); -+ -+ if (vo_fs) /* avoid flickering borders in fullscreen mode */ -+ glClear(GL_COLOR_BUFFER_BIT); -+} -+#endif -+ -+#if CONFIG_XRENDER -+static void put_surface_xrender(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ const unsigned int flags = (get_field_flags(i) | -+ get_colorspace_flags() | -+ g_scaling); -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ g_image_pixmap, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_output_rect.width, g_output_rect.height, -+ NULL, 0, -+ flags); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ XRenderComposite(mDisplay, -+ PictOpSrc, xr_video_picture, 0, xr_window_picture, -+ 0, 0, -+ 0, 0, -+ g_output_rect.left, g_output_rect.top, -+ g_output_rect.width, g_output_rect.height); -+ } -+} -+#endif -+ -+static void put_surface(struct vaapi_surface *surface) -+{ -+ if (!surface || surface->id == VA_INVALID_SURFACE) -+ return; -+ -+#if CONFIG_GL -+ if (gl_enabled) -+ put_surface_glx(surface); -+ else -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ put_surface_xrender(surface); -+ else -+#endif -+ put_surface_x11(surface); -+} -+ -+static int draw_slice(uint8_t * image[], int stride[], -+ int w, int h, int x, int y) -+{ -+ struct vaapi_surface * const surface = va_free_surfaces[g_output_surface]; -+ VAImage * const va_image = &surface->image; -+ VAStatus status; -+ uint8_t *image_data = NULL; -+ uint8_t *dst[3] = { 0, }; -+ unsigned int dst_stride[3]; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] draw_slice(): location (%d,%d), size %dx%d\n", x, y, w, h); -+ -+ status = vaMapBuffer(va_context->display, va_image->buf, -+ (void *)&image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return VO_FALSE; -+ -+ dst_stride[0] = va_image->pitches[0]; -+ dst[0] = image_data + va_image->offsets[0] + y * dst_stride[0] + x; -+ -+ memcpy_pic(dst[0], image[0], w, h, dst_stride[0], stride[0]); -+ -+ x /= 2; -+ y /= 2; -+ w /= 2; -+ h /= 2; -+ -+ if (g_image_format == IMGFMT_YV12) { -+ /* MPlayer's YV12 is actually I420, so swap U/V components */ -+ dst_stride[1] = va_image->pitches[2]; -+ dst[1] = image_data + va_image->offsets[2] + y * dst_stride[1] + x; -+ dst_stride[2] = va_image->pitches[1]; -+ dst[2] = image_data + va_image->offsets[1] + y * dst_stride[2] + x; -+ } -+ else { -+ if (image[1]) { -+ dst_stride[1] = va_image->pitches[1]; -+ dst[1] = image_data + va_image->offsets[1] + y * dst_stride[1] + x; -+ } -+ if (image[2]) { -+ dst_stride[2] = va_image->pitches[2]; -+ dst[2] = image_data + va_image->offsets[2] + y * dst_stride[2] + x; -+ } -+ } -+ -+ if (image[1]) /* RGBA only has a single plane */ -+ memcpy_pic(dst[1], image[1], w, h, dst_stride[1], stride[1]); -+ -+ if (image[2]) /* NV12 only has two planes */ -+ memcpy_pic(dst[2], image[2], w, h, dst_stride[2], stride[2]); -+ -+ status = vaUnmapBuffer(va_context->display, surface->image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return VO_FALSE; -+ -+ return VO_TRUE; -+} -+ -+static int draw_frame(uint8_t * src[]) -+{ -+ mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_X11_DrawFrameCalled); -+ -+ return -1; -+} -+ -+static void draw_osd(void) -+{ -+ VAStatus status; -+ const int osd_width = va_osd_image.width; -+ const int osd_height = va_osd_image.height; -+ -+ ensure_osd(); -+ if (va_osd_image.image_id == VA_INVALID_ID) -+ return; -+ -+ if (!va_osd_draw_alpha) -+ return; -+ -+ if (!vo_update_osd(osd_width, osd_height)) -+ return; -+ -+ if (!vo_osd_check_range_update(0, 0, osd_width, osd_height)) { -+ disable_osd(); -+ return; -+ } -+ -+ status = vaMapBuffer(va_context->display, va_osd_image.buf, -+ (void *)&va_osd_image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return; -+ -+ memset(va_osd_image_data, 0, va_osd_image.data_size); -+ -+ vo_draw_text(osd_width, osd_height, va_osd_draw_alpha); -+ -+ status = vaUnmapBuffer(va_context->display, va_osd_image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return; -+ va_osd_image_data = NULL; -+ -+ enable_osd(); -+} -+ -+static void draw_eosd(struct mp_eosd_image_list *imgs) -+{ -+ struct mp_eosd_image *img = eosd_image_first(imgs); -+ struct mp_eosd_image *i; -+ VAStatus status; -+ -+ if (!va_eosd_draw_alpha) -+ return; -+ -+ // Nothing changed, no need to redraw -+ if (imgs->changed == 0) -+ return; -+ -+ // There's nothing to render! -+ if (!img) { -+ disable_eosd(); -+ return; -+ } -+ -+ if (imgs->changed == 1) -+ goto eosd_skip_upload; -+ -+ status = vaMapBuffer(va_context->display, va_eosd_image.buf, -+ (void *)&va_eosd_image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return; -+ -+ memset(va_eosd_image_data, 0, va_eosd_image.data_size); -+ -+ for (i = img; i; i = i->next) -+ va_eosd_draw_alpha(i->bitmap, i->w, i->h, i->stride, -+ i->dst_x, i->dst_y, i->color); -+ -+ status = vaUnmapBuffer(va_context->display, va_eosd_image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return; -+ va_eosd_image_data = NULL; -+ -+eosd_skip_upload: -+ enable_eosd(); -+} -+ -+static void flip_page(void) -+{ -+ struct vaapi_surface *surface; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] flip_page()\n"); -+ -+ surface = g_output_surfaces[g_output_surface]; -+ if (!surface) -+ return; -+ -+ put_surface(surface); -+ g_output_surface = (g_output_surface + 1) % MAX_OUTPUT_SURFACES; -+ g_is_visible = 1; -+ -+#if CONFIG_GL -+ if (gl_enabled) -+ flip_page_glx(); -+#endif -+} -+ -+static struct vaapi_surface *get_surface(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface; -+ -+ if (mpi->type == MP_IMGTYPE_NUMBERED && is_direct_mapping()) { -+ assert(mpi->number < va_num_surfaces); -+ surface = va_free_surfaces[mpi->number]; -+ return surface; -+ } -+ -+ /* Push current surface to a free slot */ -+ if (mpi->priv) { -+ assert(!va_free_surfaces[va_free_surfaces_tail_index]); -+ va_free_surfaces[va_free_surfaces_tail_index] = mpi->priv; -+ va_free_surfaces_tail_index = (va_free_surfaces_tail_index + 1) % va_num_surfaces; -+ } -+ -+ /* Pop the least recently used free surface */ -+ assert(va_free_surfaces[va_free_surfaces_head_index]); -+ surface = va_free_surfaces[va_free_surfaces_head_index]; -+ va_free_surfaces[va_free_surfaces_head_index] = NULL; -+ va_free_surfaces_head_index = (va_free_surfaces_head_index + 1) % va_num_surfaces; -+ return surface; -+} -+ -+static uint32_t get_image(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface; -+ -+ if (mpi->type != MP_IMGTYPE_NUMBERED) -+ return VO_FALSE; -+ -+ if (!IMGFMT_IS_VAAPI(g_image_format)) -+ return VO_FALSE; -+ -+ surface = get_surface(mpi); -+ if (!surface) -+ return VO_FALSE; -+ -+ mpi->flags |= MP_IMGFLAG_DIRECT; -+ mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = mpi->stride[3] = 0; -+ mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = mpi->planes[3] = NULL; -+ mpi->planes[0] = (char *)surface; -+ mpi->planes[3] = (char *)(uintptr_t)surface->id; -+ mpi->num_planes = 1; -+ mpi->priv = surface; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] get_image(): surface 0x%08x\n", surface->id); -+ -+ return VO_TRUE; -+} -+ -+static int put_image(mp_image_t *mpi, struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ -+ if ((mpi->flags & (MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV)) != (MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV)) -+ return VO_FALSE; -+ -+ if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { -+ if (!draw_slice(mpi->planes, mpi->stride, mpi->w, mpi->h, 0, 0)) -+ return VO_FALSE; -+ } -+ -+ if (!surface->is_bound) { -+ status = vaPutImage2(va_context->display, -+ surface->id, -+ surface->image.image_id, -+ mpi->x, mpi->y, mpi->w, mpi->h, -+ mpi->x, mpi->y, mpi->w, mpi->h); -+ if (!check_status(status, "vaPutImage()")) -+ return VO_FALSE; -+ } -+ -+ return VO_TRUE; -+} -+ -+static uint32_t draw_image(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface = (struct vaapi_surface *)mpi->priv; -+ -+ g_image_fields = mpi->fields; -+ -+ if (!IMGFMT_IS_VAAPI(mpi->imgfmt)) { -+ /* XXX: no direct rendering in non-accelerated mode */ -+ surface = va_free_surfaces[g_output_surface]; -+ if (!put_image(mpi, surface)) -+ return VO_FALSE; -+ } -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] draw_image(): surface 0x%08x\n", surface->id); -+ -+ g_output_surfaces[g_output_surface] = surface; -+ -+ if (cpu_stats) { -+ static uint64_t ticks; -+ if ((ticks++ % 30) == 0) { -+ cpu_frequency = get_cpu_frequency(); -+ cpu_usage = get_cpu_usage(CPU_USAGE_QUANTUM); -+ } -+ } -+ return VO_TRUE; -+} -+ -+static void check_events(void) -+{ -+ int events = vo_x11_check_events(mDisplay); -+ -+ if (events & VO_EVENT_RESIZE) -+ resize(); -+ -+ if ((events & (VO_EVENT_EXPOSE|VO_EVENT_RESIZE)) && g_is_paused) { -+ /* Redraw the last visible buffer */ -+ if (g_is_visible) { -+ struct vaapi_surface *surface = g_output_surfaces[g_output_surface]; -+ if (surface) -+ put_surface(surface); -+ } -+ } -+} -+ -+static VADisplayAttribute *get_display_attribute(const char *name) -+{ -+ VADisplayAttribute *attr; -+ if (!strcasecmp(name, "brightness")) -+ attr = &va_equalizer.brightness; -+ else if (!strcasecmp(name, "contrast")) -+ attr = &va_equalizer.contrast; -+ else if (!strcasecmp(name, "saturation")) -+ attr = &va_equalizer.saturation; -+ else if (!strcasecmp(name, "hue")) -+ attr = &va_equalizer.hue; -+ else -+ attr = NULL; -+ return attr; -+} -+ -+static int get_equalizer(const char *name, int *value) -+{ -+ VADisplayAttribute * const attr = get_display_attribute(name); -+ int r; -+ -+ if (!attr || !(attr->flags & VA_DISPLAY_ATTRIB_GETTABLE)) -+ return VO_NOTIMPL; -+ -+ /* normalize to -100 .. 100 range */ -+ r = attr->max_value - attr->min_value; -+ if (r == 0) -+ return VO_NOTIMPL; -+ *value = ((attr->value - attr->min_value) * 200) / r - 100; -+ return VO_TRUE; -+} -+ -+static int set_equalizer(const char *name, int value) -+{ -+ VADisplayAttribute * const attr = get_display_attribute(name); -+ VAStatus status; -+ int r; -+ -+ if (!attr || !(attr->flags & VA_DISPLAY_ATTRIB_SETTABLE)) -+ return VO_NOTIMPL; -+ -+ /* normalize to attribute value range */ -+ r = attr->max_value - attr->min_value; -+ if (r == 0) -+ return VO_NOTIMPL; -+ attr->value = ((value + 100) * r) / 200 + attr->min_value; -+ -+ status = vaSetDisplayAttributes(va_context->display, attr, 1); -+ if (!check_status(status, "vaSetDisplayAttributes()")) -+ return VO_FALSE; -+ return VO_TRUE; -+} -+ -+static int control(uint32_t request, void *data, ...) -+{ -+ switch (request) { -+ case VOCTRL_GET_DEINTERLACE: -+ *(int*)data = g_deint; -+ return VO_TRUE; -+ case VOCTRL_SET_DEINTERLACE: -+ g_deint = *(int*)data; -+ if (g_deint) -+ g_deint = g_deint_type; -+ return VO_TRUE; -+ case VOCTRL_PAUSE: -+ return (g_is_paused = 1); -+ case VOCTRL_RESUME: -+ return (g_is_paused = 0); -+ case VOCTRL_QUERY_FORMAT: -+ return query_format(*((uint32_t *)data)); -+ case VOCTRL_GET_IMAGE: -+ return get_image(data); -+ case VOCTRL_DRAW_IMAGE: -+ return draw_image(data); -+ case VOCTRL_GUISUPPORT: -+ return VO_TRUE; -+ case VOCTRL_BORDER: -+ vo_x11_border(); -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_FULLSCREEN: -+ vo_x11_fullscreen(); -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_SET_EQUALIZER: { -+ va_list ap; -+ int value; -+ -+ va_start(ap, data); -+ value = va_arg(ap, int); -+ -+ va_end(ap); -+ return set_equalizer(data, value); -+ } -+ case VOCTRL_GET_EQUALIZER: { -+ va_list ap; -+ int *value; -+ -+ va_start(ap, data); -+ value = va_arg(ap, int *); -+ -+ va_end(ap); -+ return get_equalizer(data, value); -+ } -+ case VOCTRL_ONTOP: -+ vo_x11_ontop(); -+ return VO_TRUE; -+ case VOCTRL_UPDATE_SCREENINFO: -+ update_xinerama_info(); -+ return VO_TRUE; -+ case VOCTRL_GET_PANSCAN: -+ return VO_TRUE; -+ case VOCTRL_SET_PANSCAN: -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_GET_HWACCEL_CONTEXT: -+ *((void **)data) = va_context; -+ return VO_TRUE; -+ case VOCTRL_DRAW_EOSD: -+ if (!data) -+ return VO_FALSE; -+ draw_eosd(data); -+ return VO_TRUE; -+ case VOCTRL_GET_EOSD_RES: { -+ struct mp_eosd_settings *r = data; -+ r->mt = r->mb = r->ml = r->mr = 0; -+ r->srcw = g_image_width; -+ r->srch = g_image_height; -+ r->w = g_image_width; -+ r->h = g_image_height; -+ return VO_TRUE; -+ } -+ } -+ return VO_NOTIMPL; -+} diff --git a/media-video/mplayer/files/vaapi-take3/02-mplayer-vaapi-gma500-workaround.patch b/media-video/mplayer/files/vaapi-take3/02-mplayer-vaapi-gma500-workaround.patch deleted file mode 100644 index 0fb43c408..000000000 --- a/media-video/mplayer/files/vaapi-take3/02-mplayer-vaapi-gma500-workaround.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit b46788e0ed28de261a20b9cef3e41ed53909547b -Author: Gwenole Beauchesne -Date: Mon Dec 28 08:52:56 2009 +0000 - - Add GMA500 workaround for H.264 DPB. This is disabled by default. Enable with GMA500_WORKAROUND=yes environment variable. - -diff --git a/ffmpeg/libavcodec/vaapi_h264.c b/ffmpeg/libavcodec/vaapi_h264.c -index 29f3a81..739bce7 100644 ---- a/ffmpeg/libavcodec/vaapi_h264.c -+++ b/ffmpeg/libavcodec/vaapi_h264.c -@@ -28,6 +28,60 @@ - * structures for H.264 decoding. - */ - -+/** Parses ENV environment variable expecting "yes" | "no" values. */ -+static int getenv_yesno(const char *env, int *pval) -+{ -+ int val; -+ const char *env_str; -+ -+ env_str = getenv(env); -+ if (!env_str) -+ return -1; -+ -+ if (strcmp(env_str, "1") == 0 || strcmp(env_str, "yes") == 0) -+ val = 1; -+ else if (strcmp(env_str, "0") == 0 || strcmp(env_str, "no") == 0) -+ val = 0; -+ else -+ return -1; -+ -+ if (pval) -+ *pval = val; -+ return 0; -+} -+ -+/** -+ * Use old GMA500 workaround for DPB. It requires other pictures than -+ * those marked as "used for reference". -+ */ -+static int get_use_gma500_workaround(struct vaapi_context *vactx) -+{ -+ int gma500_workaround_env; -+ const char *vendor_string; -+ -+ if (getenv_yesno("GMA500_WORKAROUND", &gma500_workaround_env) < 0) -+ return 0; -+ if (!gma500_workaround_env) -+ return 0; -+ -+ vendor_string = vaQueryVendorString(vactx->display); -+ if (vendor_string && strstr(vendor_string, "Intel")) { -+ if (strstr(vendor_string, "GMA500")) -+ return 1; -+ if (strstr(vendor_string, "Embedded Graphics Driver")) -+ return 1; -+ } -+ return 0; -+} -+ -+static inline int use_gma500_workaround(struct vaapi_context *vactx) -+{ -+ static int gma500_workaround = -1; -+ if (gma500_workaround < 0) -+ gma500_workaround = get_use_gma500_workaround(vactx); -+ return gma500_workaround; -+} -+ - /** - * Initialize an empty VA API picture. - * -@@ -123,6 +177,7 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, - { - DPB dpb; - int i; -+ unsigned int list; - - dpb.size = 0; - dpb.max_size = FF_ARRAY_ELEMS(pic_param->ReferenceFrames); -@@ -130,6 +185,17 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, - for (i = 0; i < dpb.max_size; i++) - init_vaapi_pic(&dpb.va_pics[i]); - -+ if (use_gma500_workaround(h->s.avctx->hwaccel_context)) { -+ /* XXX: this is really wrong */ -+ for (list = 0; list < h->list_count; list++) -+ for (i = 0; i < (int)h->ref_count[list]; i++) { -+ Picture * const pic = &h->ref_list[list][i]; -+ if (pic->reference && dpb_add(&dpb, pic) < 0) -+ return -1; -+ } -+ return 0; -+ } -+ - for (i = 0; i < h->short_ref_count; i++) { - Picture * const pic = h->short_ref[i]; - if (pic && pic->reference && dpb_add(&dpb, pic) < 0) diff --git a/media-video/mplayer/files/vaapi-take3/03-mplayer-vaapi-0.29.patch b/media-video/mplayer/files/vaapi-take3/03-mplayer-vaapi-0.29.patch deleted file mode 100644 index 5e43dbbb0..000000000 --- a/media-video/mplayer/files/vaapi-take3/03-mplayer-vaapi-0.29.patch +++ /dev/null @@ -1,689 +0,0 @@ -commit 9d15e003b4a981dbe21f197e7ee91f7d86f5b818 -Author: Gwenole Beauchesne -Date: Fri Feb 12 11:03:00 2010 +0000 - - Add compatibility with original VA-API 0.29. - -diff --git a/configure b/configure -index 45e4574..b1ff778 100755 ---- a/configure -+++ b/configure -@@ -5835,21 +5835,36 @@ if test -n "$_vaapiprefix"; then - fi - if test "$_vaapi" = yes -o "$_vaapi" = auto; then - _vaapi=no -+ _vaapi_old=no - cat > $TMPC < - int main(void) { (void) vaGetDisplay(0); return 0; } - EOF -- cc_check $_vaapiinc $_vaapilib -lva-x11 && _vaapi=yes -+ cc_check $_vaapiinc $_vaapilib -lva-x11 && _vaapi=yes || { -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplay(0); return 0; } -+EOF -+ cc_check $_vaapiinc $_vaapilib -lva && _vaapi=yes _vaapi_old=yes -+ } - fi - - if test "$_vaapi" = yes ; then - def_vaapi='#define CONFIG_VAAPI 1' - extra_cflags="$extra_cflags $_vaapiinc" -- libs_mencoder="$libs_mencoder $_vaapilib -lva" -- libs_mplayer="$libs_mplayer $_vaapilib -lva -lva-x11" -+ if test "$_vaapi_old" = no ; then -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 0' -+ libs_mencoder="$libs_mencoder $_vaapilib -lva" -+ libs_mplayer="$libs_mplayer $_vaapilib -lva -lva-x11" -+ else -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 1' -+ _mencoder="no" -+ libs_mplayer="$libs_mplayer $_vaapilib -lva" -+ fi - vomodules="vaapi $vomodules" - else - def_vaapi='#define CONFIG_VAAPI 0' -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 0' - novomodules="vaapi $novomodules" - libavhwaccels=`echo $libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VAAPI_HWACCEL//g"` - fi -@@ -8298,6 +8313,7 @@ CONFIG_MUXERS = $_mencoder - CONFIG_POSTPROC = yes - CONFIG_RTPDEC = $networking - CONFIG_VAAPI = $_vaapi -+CONFIG_VAAPI_OLD= $_vaapi_old - CONFIG_VDPAU = $_vdpau - CONFIG_XRENDER = $_xrender - CONFIG_XVMC = $_xvmc -@@ -8675,6 +8691,7 @@ $def_tdfxvid - $def_tga - $def_v4l2 - $def_vaapi -+$def_vaapi_old - $def_vaapi_glx - $def_vdpau - $def_vesa -diff --git a/ffmpeg/libavcodec/vaapi_compat.h b/ffmpeg/libavcodec/vaapi_compat.h -new file mode 100644 -index 0000000..2f7ece8 ---- /dev/null -+++ b/ffmpeg/libavcodec/vaapi_compat.h -@@ -0,0 +1,96 @@ -+/* -+ * Video Acceleration API (video decoding) -+ * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 -+ * -+ * Copyright (C) 2008-2009 Splitted-Desktop Systems -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_VAAPI_COMPAT_H -+#define AVCODEC_VAAPI_COMPAT_H -+ -+/* Compatibility glue with original VA-API 0.29 */ -+#if CONFIG_VAAPI_OLD -+typedef struct _VASliceParameterBufferBase { -+ unsigned int slice_data_size; -+ unsigned int slice_data_offset; -+ unsigned int slice_data_flag; -+} VASliceParameterBufferBase; -+#endif -+ -+#ifndef VA_SDS_VERSION -+#define VA_SDS_VERSION 0 -+#endif -+ -+#ifndef VA_CHECK_VERSION -+#define VA_MAJOR_VERSION 0 -+#define VA_MINOR_VERSION 29 -+#define VA_CHECK_VERSION(major,minor,micro) \ -+ (VA_MAJOR_VERSION > (major) || \ -+ (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \ -+ (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro))) -+#endif -+ -+#ifndef VA_FOURCC -+#define VA_FOURCC(ch0, ch1, ch2, ch3) \ -+ ((uint32_t)(uint8_t)(ch0) | \ -+ ((uint32_t)(uint8_t)(ch1) << 8) | \ -+ ((uint32_t)(uint8_t)(ch2) << 16) | \ -+ ((uint32_t)(uint8_t)(ch3) << 24 )) -+#endif -+ -+#ifndef VA_INVALID_ID -+#define VA_INVALID_ID 0xffffffff -+#endif -+#ifndef VA_INVALID_SURFACE -+#define VA_INVALID_SURFACE VA_INVALID_ID -+#endif -+ -+/* Compatibility glue with VA-API >= 0.31 */ -+#if VA_CHECK_VERSION(0,31,0) -+#define vaSyncSurface(dpy, context, surface) (vaSyncSurface)((dpy), (surface)) -+#define vaPutImage2 vaPutImage -+#define vaAssociateSubpicture2 vaAssociateSubpicture -+#endif -+ -+/* Used in codec implementation to set up the right bit-fields */ -+#if CONFIG_VAAPI_OLD -+# define BFV(a, b) a -+# define BFM(a, b, c) c -+# define BFMP(p, a, b, c) p##_##c -+# define NEW(x) /* nothing */ -+#else -+# define BFV(a, b) a.b -+# define BFM(a, b, c) a.b.c -+# define BFMP(p, a, b, c) a.b.c -+# define NEW(x) x -+#endif -+ -+#if CONFIG_VAAPI_OLD -+# define V_raw_coding raw_coding_flag -+# define M_raw_coding raw_coding -+# define V_bitplane_present bitplane_present_flag -+# define M_bitplane_present bitplane_present -+#else -+# define V_raw_coding raw_coding -+# define M_raw_coding raw_coding -+# define V_bitplane_present bitplane_present -+# define M_bitplane_present bitplane_present -+#endif -+ -+#endif /* AVCODEC_VAAPI_COMPAT_H */ -diff --git a/ffmpeg/libavcodec/vaapi_h264.c b/ffmpeg/libavcodec/vaapi_h264.c -index 739bce7..27a0ee4 100644 ---- a/ffmpeg/libavcodec/vaapi_h264.c -+++ b/ffmpeg/libavcodec/vaapi_h264.c -@@ -110,8 +110,8 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic, - if (pic_structure == 0) - pic_structure = pic->reference; - -- va_pic->picture_id = ff_vaapi_get_surface_id(pic); -- va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -+ va_pic->picture_id = ff_vaapi_get_surface_id(pic); -+ NEW(va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num); - - va_pic->flags = 0; - if (pic_structure != PICT_FRAME) -@@ -304,42 +304,42 @@ static int start_frame(AVCodecContext *avctx, - fill_vaapi_pic(&pic_param->CurrPic, s->current_picture_ptr, s->picture_structure); - if (fill_vaapi_ReferenceFrames(pic_param, h) < 0) - return -1; -- pic_param->picture_width_in_mbs_minus1 = s->mb_width - 1; -- pic_param->picture_height_in_mbs_minus1 = s->mb_height - 1; -- pic_param->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; -- pic_param->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; -- pic_param->num_ref_frames = h->sps.ref_frame_count; -- pic_param->seq_fields.value = 0; /* reset all bits */ -- pic_param->seq_fields.bits.chroma_format_idc = h->sps.chroma_format_idc; -- pic_param->seq_fields.bits.residual_colour_transform_flag = h->sps.residual_color_transform_flag; /* XXX: only for 4:4:4 high profile? */ -- pic_param->seq_fields.bits.gaps_in_frame_num_value_allowed_flag = h->sps.gaps_in_frame_num_allowed_flag; -- pic_param->seq_fields.bits.frame_mbs_only_flag = h->sps.frame_mbs_only_flag; -- pic_param->seq_fields.bits.mb_adaptive_frame_field_flag = h->sps.mb_aff; -- pic_param->seq_fields.bits.direct_8x8_inference_flag = h->sps.direct_8x8_inference_flag; -- pic_param->seq_fields.bits.MinLumaBiPredSize8x8 = h->sps.level_idc >= 31; /* A.3.3.2 */ -- pic_param->seq_fields.bits.log2_max_frame_num_minus4 = h->sps.log2_max_frame_num - 4; -- pic_param->seq_fields.bits.pic_order_cnt_type = h->sps.poc_type; -- pic_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 = h->sps.log2_max_poc_lsb - 4; -- pic_param->seq_fields.bits.delta_pic_order_always_zero_flag = h->sps.delta_pic_order_always_zero_flag; -- pic_param->num_slice_groups_minus1 = h->pps.slice_group_count - 1; -- pic_param->slice_group_map_type = h->pps.mb_slice_group_map_type; -- pic_param->slice_group_change_rate_minus1 = 0; /* XXX: unimplemented in FFmpeg */ -- pic_param->pic_init_qp_minus26 = h->pps.init_qp - 26; -- pic_param->pic_init_qs_minus26 = h->pps.init_qs - 26; -- pic_param->chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; -- pic_param->second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; -- pic_param->pic_fields.value = 0; /* reset all bits */ -- pic_param->pic_fields.bits.entropy_coding_mode_flag = h->pps.cabac; -- pic_param->pic_fields.bits.weighted_pred_flag = h->pps.weighted_pred; -- pic_param->pic_fields.bits.weighted_bipred_idc = h->pps.weighted_bipred_idc; -- pic_param->pic_fields.bits.transform_8x8_mode_flag = h->pps.transform_8x8_mode; -- pic_param->pic_fields.bits.field_pic_flag = s->picture_structure != PICT_FRAME; -- pic_param->pic_fields.bits.constrained_intra_pred_flag = h->pps.constrained_intra_pred; -- pic_param->pic_fields.bits.pic_order_present_flag = h->pps.pic_order_present; -- pic_param->pic_fields.bits.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present; -- pic_param->pic_fields.bits.redundant_pic_cnt_present_flag = h->pps.redundant_pic_cnt_present; -- pic_param->pic_fields.bits.reference_pic_flag = h->nal_ref_idc != 0; -- pic_param->frame_num = h->frame_num; -+ pic_param->picture_width_in_mbs_minus1 = s->mb_width - 1; -+ pic_param->picture_height_in_mbs_minus1 = s->mb_height - 1; -+ pic_param->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; -+ pic_param->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; -+ pic_param->num_ref_frames = h->sps.ref_frame_count; -+ pic_param->BFV(seq_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(seq_fields,bits,chroma_format_idc) = h->sps.chroma_format_idc; -+ pic_param->BFM(seq_fields,bits,residual_colour_transform_flag) = h->sps.residual_color_transform_flag; /* XXX: only for 4:4:4 high profile? */ -+ NEW(pic_param->BFM(seq_fields,bits,gaps_in_frame_num_value_allowed_flag) = h->sps.gaps_in_frame_num_allowed_flag); -+ pic_param->BFM(seq_fields,bits,frame_mbs_only_flag) = h->sps.frame_mbs_only_flag; -+ pic_param->BFM(seq_fields,bits,mb_adaptive_frame_field_flag) = h->sps.mb_aff; -+ pic_param->BFM(seq_fields,bits,direct_8x8_inference_flag) = h->sps.direct_8x8_inference_flag; -+ pic_param->BFM(seq_fields,bits,MinLumaBiPredSize8x8) = h->sps.level_idc >= 31; /* A.3.3.2 */ -+ NEW(pic_param->BFM(seq_fields,bits,log2_max_frame_num_minus4) = h->sps.log2_max_frame_num - 4); -+ NEW(pic_param->BFM(seq_fields,bits,pic_order_cnt_type) = h->sps.poc_type); -+ NEW(pic_param->BFM(seq_fields,bits,log2_max_pic_order_cnt_lsb_minus4) = h->sps.log2_max_poc_lsb - 4); -+ NEW(pic_param->BFM(seq_fields,bits,delta_pic_order_always_zero_flag) = h->sps.delta_pic_order_always_zero_flag); -+ pic_param->num_slice_groups_minus1 = h->pps.slice_group_count - 1; -+ pic_param->slice_group_map_type = h->pps.mb_slice_group_map_type; -+ NEW(pic_param->slice_group_change_rate_minus1 = 0); /* XXX: unimplemented in FFmpeg */ -+ pic_param->pic_init_qp_minus26 = h->pps.init_qp - 26; -+ NEW(pic_param->pic_init_qs_minus26 = h->pps.init_qs - 26); -+ pic_param->chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; -+ pic_param->second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; -+ pic_param->BFV(pic_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(pic_fields,bits,entropy_coding_mode_flag) = h->pps.cabac; -+ pic_param->BFM(pic_fields,bits,weighted_pred_flag) = h->pps.weighted_pred; -+ pic_param->BFM(pic_fields,bits,weighted_bipred_idc) = h->pps.weighted_bipred_idc; -+ pic_param->BFM(pic_fields,bits,transform_8x8_mode_flag) = h->pps.transform_8x8_mode; -+ pic_param->BFM(pic_fields,bits,field_pic_flag) = s->picture_structure != PICT_FRAME; -+ pic_param->BFM(pic_fields,bits,constrained_intra_pred_flag) = h->pps.constrained_intra_pred; -+ NEW(pic_param->BFM(pic_fields,bits,pic_order_present_flag) = h->pps.pic_order_present); -+ NEW(pic_param->BFM(pic_fields,bits,deblocking_filter_control_present_flag) = h->pps.deblocking_filter_parameters_present); -+ NEW(pic_param->BFM(pic_fields,bits,redundant_pic_cnt_present_flag) = h->pps.redundant_pic_cnt_present); -+ NEW(pic_param->BFM(pic_fields,bits,reference_pic_flag) = h->nal_ref_idc != 0); -+ pic_param->frame_num = h->frame_num; - - /* Fill in VAIQMatrixBufferH264. */ - iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferH264)); -diff --git a/ffmpeg/libavcodec/vaapi_internal.h b/ffmpeg/libavcodec/vaapi_internal.h -index 2c0fdf9..ff83b96 100644 ---- a/ffmpeg/libavcodec/vaapi_internal.h -+++ b/ffmpeg/libavcodec/vaapi_internal.h -@@ -24,8 +24,14 @@ - #ifndef AVCODEC_VAAPI_INTERNAL_H - #define AVCODEC_VAAPI_INTERNAL_H - -+#include "config.h" -+#if CONFIG_VAAPI_OLD -+#include -+#else - #include -+#endif - #include "vaapi.h" -+#include "vaapi_compat.h" - #include "avcodec.h" - #include "mpegvideo.h" - -diff --git a/ffmpeg/libavcodec/vaapi_mpeg2.c b/ffmpeg/libavcodec/vaapi_mpeg2.c -index 2e870dc..277c7a5 100644 ---- a/ffmpeg/libavcodec/vaapi_mpeg2.c -+++ b/ffmpeg/libavcodec/vaapi_mpeg2.c -@@ -52,24 +52,24 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferMPEG2)); - if (!pic_param) - return -1; -- pic_param->horizontal_size = s->width; -- pic_param->vertical_size = s->height; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->picture_coding_type = s->pict_type; -- pic_param->f_code = mpeg2_get_f_code(s); -- pic_param->picture_coding_extension.value = 0; /* reset all bits */ -- pic_param->picture_coding_extension.bits.intra_dc_precision = s->intra_dc_precision; -- pic_param->picture_coding_extension.bits.picture_structure = s->picture_structure; -- pic_param->picture_coding_extension.bits.top_field_first = s->top_field_first; -- pic_param->picture_coding_extension.bits.frame_pred_frame_dct = s->frame_pred_frame_dct; -- pic_param->picture_coding_extension.bits.concealment_motion_vectors = s->concealment_motion_vectors; -- pic_param->picture_coding_extension.bits.q_scale_type = s->q_scale_type; -- pic_param->picture_coding_extension.bits.intra_vlc_format = s->intra_vlc_format; -- pic_param->picture_coding_extension.bits.alternate_scan = s->alternate_scan; -- pic_param->picture_coding_extension.bits.repeat_first_field = s->repeat_first_field; -- pic_param->picture_coding_extension.bits.progressive_frame = s->progressive_frame; -- pic_param->picture_coding_extension.bits.is_first_field = mpeg2_get_is_frame_start(s); -+ pic_param->horizontal_size = s->width; -+ pic_param->vertical_size = s->height; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->picture_coding_type = s->pict_type; -+ pic_param->f_code = mpeg2_get_f_code(s); -+ pic_param->BFV(picture_coding_extension,value) = 0; /* reset all bits */ -+ pic_param->BFM(picture_coding_extension,bits,intra_dc_precision) = s->intra_dc_precision; -+ pic_param->BFM(picture_coding_extension,bits,picture_structure) = s->picture_structure; -+ pic_param->BFM(picture_coding_extension,bits,top_field_first) = s->top_field_first; -+ pic_param->BFM(picture_coding_extension,bits,frame_pred_frame_dct) = s->frame_pred_frame_dct; -+ pic_param->BFM(picture_coding_extension,bits,concealment_motion_vectors) = s->concealment_motion_vectors; -+ pic_param->BFM(picture_coding_extension,bits,q_scale_type) = s->q_scale_type; -+ pic_param->BFM(picture_coding_extension,bits,intra_vlc_format) = s->intra_vlc_format; -+ pic_param->BFM(picture_coding_extension,bits,alternate_scan) = s->alternate_scan; -+ pic_param->BFM(picture_coding_extension,bits,repeat_first_field) = s->repeat_first_field; -+ pic_param->BFM(picture_coding_extension,bits,progressive_frame) = s->progressive_frame; -+ pic_param->BFM(picture_coding_extension,bits,is_first_field) = mpeg2_get_is_frame_start(s); - - switch (s->pict_type) { - case FF_B_TYPE: -@@ -131,7 +131,9 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - if (!slice_param) - return -1; - slice_param->macroblock_offset = macroblock_offset; -+#if VA_CHECK_VERSION(0,31,1) || (VA_CHECK_VERSION(0,31,0) && VA_SDS_VERSION >= 3) - slice_param->slice_horizontal_position = s->mb_x; -+#endif - slice_param->slice_vertical_position = s->mb_y; - slice_param->quantiser_scale_code = quantiser_scale_code; - slice_param->intra_slice_flag = intra_slice_flag; -diff --git a/ffmpeg/libavcodec/vaapi_mpeg4.c b/ffmpeg/libavcodec/vaapi_mpeg4.c -index 8f02e91..557ae6c 100644 ---- a/ffmpeg/libavcodec/vaapi_mpeg4.c -+++ b/ffmpeg/libavcodec/vaapi_mpeg4.c -@@ -55,42 +55,46 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferMPEG4)); - if (!pic_param) - return -1; -- pic_param->vop_width = s->width; -- pic_param->vop_height = s->height; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->vol_fields.value = 0; /* reset all bits */ -- pic_param->vol_fields.bits.short_video_header = avctx->codec->id == CODEC_ID_H263; -- pic_param->vol_fields.bits.chroma_format = CHROMA_420; -- pic_param->vol_fields.bits.interlaced = !s->progressive_sequence; -- pic_param->vol_fields.bits.obmc_disable = 1; -- pic_param->vol_fields.bits.sprite_enable = s->vol_sprite_usage; -- pic_param->vol_fields.bits.sprite_warping_accuracy = s->sprite_warping_accuracy; -- pic_param->vol_fields.bits.quant_type = s->mpeg_quant; -- pic_param->vol_fields.bits.quarter_sample = s->quarter_sample; -- pic_param->vol_fields.bits.data_partitioned = s->data_partitioning; -- pic_param->vol_fields.bits.reversible_vlc = s->rvlc; -- pic_param->vol_fields.bits.resync_marker_disable = !s->resync_marker; -- pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points; -+ pic_param->vop_width = s->width; -+ pic_param->vop_height = s->height; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->BFV(vol_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(vol_fields,bits,short_video_header) = avctx->codec->id == CODEC_ID_H263; -+ pic_param->BFM(vol_fields,bits,chroma_format) = CHROMA_420; -+ pic_param->BFM(vol_fields,bits,interlaced) = !s->progressive_sequence; -+ pic_param->BFM(vol_fields,bits,obmc_disable) = 1; -+ pic_param->BFM(vol_fields,bits,sprite_enable) = s->vol_sprite_usage; -+ pic_param->BFM(vol_fields,bits,sprite_warping_accuracy) = s->sprite_warping_accuracy; -+ pic_param->BFM(vol_fields,bits,quant_type) = s->mpeg_quant; -+ pic_param->BFM(vol_fields,bits,quarter_sample) = s->quarter_sample; -+ pic_param->BFM(vol_fields,bits,data_partitioned) = s->data_partitioning; -+ pic_param->BFM(vol_fields,bits,reversible_vlc) = s->rvlc; -+#if VA_CHECK_VERSION(0,31,1) || (VA_CHECK_VERSION(0,31,0) && VA_SDS_VERSION >= 4) -+ pic_param->BFM(vol_fields,bits,resync_marker_disable) = !s->resync_marker; -+#endif -+ pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points; - for (i = 0; i < s->num_sprite_warping_points && i < 3; i++) { -- pic_param->sprite_trajectory_du[i] = s->sprite_traj[i][0]; -- pic_param->sprite_trajectory_dv[i] = s->sprite_traj[i][1]; -+ pic_param->sprite_trajectory_du[i] = s->sprite_traj[i][0]; -+ pic_param->sprite_trajectory_dv[i] = s->sprite_traj[i][1]; - } -- pic_param->quant_precision = s->quant_precision; -- pic_param->vop_fields.value = 0; /* reset all bits */ -- pic_param->vop_fields.bits.vop_coding_type = s->pict_type - FF_I_TYPE; -- pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0; -- pic_param->vop_fields.bits.vop_rounding_type = s->no_rounding; -- pic_param->vop_fields.bits.intra_dc_vlc_thr = mpeg4_get_intra_dc_vlc_thr(s); -- pic_param->vop_fields.bits.top_field_first = s->top_field_first; -- pic_param->vop_fields.bits.alternate_vertical_scan_flag = s->alternate_scan; -- pic_param->vop_fcode_forward = s->f_code; -- pic_param->vop_fcode_backward = s->b_code; -- pic_param->vop_time_increment_resolution = avctx->time_base.den; -- pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s); -- pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob; -- pic_param->TRB = s->pb_time; -- pic_param->TRD = s->pp_time; -+ pic_param->quant_precision = s->quant_precision; -+ pic_param->BFV(vop_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(vop_fields,bits,vop_coding_type) = s->pict_type - FF_I_TYPE; -+ pic_param->BFM(vop_fields,bits,backward_reference_vop_coding_type) = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0; -+ pic_param->BFM(vop_fields,bits,vop_rounding_type) = s->no_rounding; -+ pic_param->BFM(vop_fields,bits,intra_dc_vlc_thr) = mpeg4_get_intra_dc_vlc_thr(s); -+ pic_param->BFM(vop_fields,bits,top_field_first) = s->top_field_first; -+ pic_param->BFM(vop_fields,bits,alternate_vertical_scan_flag) = s->alternate_scan; -+ pic_param->vop_fcode_forward = s->f_code; -+ pic_param->vop_fcode_backward = s->b_code; -+#if VA_CHECK_VERSION(0,31,1) || (VA_CHECK_VERSION(0,31,0) && VA_SDS_VERSION >= 4) -+ pic_param->vop_time_increment_resolution = avctx->time_base.den; -+#endif -+ pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s); -+ pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob; -+ pic_param->TRB = s->pb_time; -+ pic_param->TRD = s->pp_time; - - if (s->pict_type == FF_B_TYPE) - pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture); -@@ -99,7 +103,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ - - /* Fill in VAIQMatrixBufferMPEG4 */ - /* Only the first inverse quantisation method uses the weighthing matrices */ -- if (pic_param->vol_fields.bits.quant_type) { -+ if (pic_param->BFM(vol_fields,bits,quant_type)) { - iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferMPEG4)); - if (!iq_matrix) - return -1; -diff --git a/ffmpeg/libavcodec/vaapi_vc1.c b/ffmpeg/libavcodec/vaapi_vc1.c -index 34e9056..b29e50e 100644 ---- a/ffmpeg/libavcodec/vaapi_vc1.c -+++ b/ffmpeg/libavcodec/vaapi_vc1.c -@@ -146,101 +146,103 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferVC1)); - if (!pic_param) - return -1; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->inloop_decoded_picture = VA_INVALID_ID; -- pic_param->sequence_fields.value = 0; /* reset all bits */ -- pic_param->sequence_fields.bits.pulldown = v->broadcast; -- pic_param->sequence_fields.bits.interlace = v->interlace; -- pic_param->sequence_fields.bits.tfcntrflag = v->tfcntrflag; -- pic_param->sequence_fields.bits.finterpflag = v->finterpflag; -- pic_param->sequence_fields.bits.psf = v->psf; -- pic_param->sequence_fields.bits.multires = v->multires; -- pic_param->sequence_fields.bits.overlap = v->overlap; -- pic_param->sequence_fields.bits.syncmarker = s->resync_marker; -- pic_param->sequence_fields.bits.rangered = v->rangered; -- pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames; -- pic_param->sequence_fields.bits.profile = v->profile; -- pic_param->coded_width = s->avctx->coded_width; -- pic_param->coded_height = s->avctx->coded_height; -- pic_param->entrypoint_fields.value = 0; /* reset all bits */ -- pic_param->entrypoint_fields.bits.broken_link = v->broken_link; -- pic_param->entrypoint_fields.bits.closed_entry = v->closed_entry; -- pic_param->entrypoint_fields.bits.panscan_flag = v->panscanflag; -- pic_param->entrypoint_fields.bits.loopfilter = s->loop_filter; -- pic_param->conditional_overlap_flag = v->condover; -- pic_param->fast_uvmc_flag = v->fastuvmc; -- pic_param->range_mapping_fields.value = 0; /* reset all bits */ -- pic_param->range_mapping_fields.bits.luma_flag = v->range_mapy_flag; -- pic_param->range_mapping_fields.bits.luma = v->range_mapy; -- pic_param->range_mapping_fields.bits.chroma_flag = v->range_mapuv_flag; -- pic_param->range_mapping_fields.bits.chroma = v->range_mapuv; -- pic_param->b_picture_fraction = v->bfraction_lut_index; -- pic_param->cbp_table = v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -- pic_param->mb_mode_table = 0; /* XXX: interlaced frame */ -- pic_param->range_reduction_frame = v->rangeredfrm; -- pic_param->rounding_control = v->rnd; -- pic_param->post_processing = v->postproc; -- pic_param->picture_resolution_index = v->respic; -- pic_param->luma_scale = v->lumscale; -- pic_param->luma_shift = v->lumshift; -- pic_param->picture_fields.value = 0; /* reset all bits */ -- pic_param->picture_fields.bits.picture_type = vc1_get_PTYPE(v); -- pic_param->picture_fields.bits.frame_coding_mode = v->fcm; -- pic_param->picture_fields.bits.top_field_first = v->tff; -- pic_param->picture_fields.bits.is_first_field = v->fcm == 0; /* XXX: interlaced frame */ -- pic_param->picture_fields.bits.intensity_compensation = v->mv_mode == MV_PMODE_INTENSITY_COMP; -- pic_param->raw_coding.value = 0; /* reset all bits */ -- pic_param->raw_coding.flags.mv_type_mb = v->mv_type_is_raw; -- pic_param->raw_coding.flags.direct_mb = v->dmb_is_raw; -- pic_param->raw_coding.flags.skip_mb = v->skip_is_raw; -- pic_param->raw_coding.flags.field_tx = 0; /* XXX: interlaced frame */ -- pic_param->raw_coding.flags.forward_mb = 0; /* XXX: interlaced frame */ -- pic_param->raw_coding.flags.ac_pred = v->acpred_is_raw; -- pic_param->raw_coding.flags.overflags = v->overflg_is_raw; -- pic_param->bitplane_present.value = 0; /* reset all bits */ -- pic_param->bitplane_present.flags.bp_mv_type_mb = vc1_has_MVTYPEMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_direct_mb = vc1_has_DIRECTMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_skip_mb = vc1_has_SKIPMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_field_tx = 0; /* XXX: interlaced frame */ -- pic_param->bitplane_present.flags.bp_forward_mb = 0; /* XXX: interlaced frame */ -- pic_param->bitplane_present.flags.bp_ac_pred = vc1_has_ACPRED_bitplane(v); -- pic_param->bitplane_present.flags.bp_overflags = vc1_has_OVERFLAGS_bitplane(v); -- pic_param->reference_fields.value = 0; /* reset all bits */ -- pic_param->reference_fields.bits.reference_distance_flag = v->refdist_flag; -- pic_param->reference_fields.bits.reference_distance = 0; /* XXX: interlaced frame */ -- pic_param->reference_fields.bits.num_reference_pictures = 0; /* XXX: interlaced frame */ -- pic_param->reference_fields.bits.reference_field_pic_indicator = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.value = 0; /* reset all bits */ -- pic_param->mv_fields.bits.mv_mode = vc1_get_MVMODE(v); -- pic_param->mv_fields.bits.mv_mode2 = vc1_get_MVMODE2(v); -- pic_param->mv_fields.bits.mv_table = s->mv_table_index; -- pic_param->mv_fields.bits.two_mv_block_pattern_table = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.four_mv_switch = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.four_mv_block_pattern_table = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.extended_mv_flag = v->extended_mv; -- pic_param->mv_fields.bits.extended_mv_range = v->mvrange; -- pic_param->mv_fields.bits.extended_dmv_flag = v->extended_dmv; -- pic_param->mv_fields.bits.extended_dmv_range = 0; /* XXX: interlaced frame */ -- pic_param->pic_quantizer_fields.value = 0; /* reset all bits */ -- pic_param->pic_quantizer_fields.bits.dquant = v->dquant; -- pic_param->pic_quantizer_fields.bits.quantizer = v->quantizer_mode; -- pic_param->pic_quantizer_fields.bits.half_qp = v->halfpq; -- pic_param->pic_quantizer_fields.bits.pic_quantizer_scale = v->pq; -- pic_param->pic_quantizer_fields.bits.pic_quantizer_type = v->pquantizer; -- pic_param->pic_quantizer_fields.bits.dq_frame = v->dquantfrm; -- pic_param->pic_quantizer_fields.bits.dq_profile = v->dqprofile; -- pic_param->pic_quantizer_fields.bits.dq_sb_edge = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0; -- pic_param->pic_quantizer_fields.bits.dq_db_edge = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0; -- pic_param->pic_quantizer_fields.bits.dq_binary_level = v->dqbilevel; -- pic_param->pic_quantizer_fields.bits.alt_pic_quantizer = v->altpq; -- pic_param->transform_fields.value = 0; /* reset all bits */ -- pic_param->transform_fields.bits.variable_sized_transform_flag = v->vstransform; -- pic_param->transform_fields.bits.mb_level_transform_type_flag = v->ttmbf; -- pic_param->transform_fields.bits.frame_level_transform_type = v->ttfrm; -- pic_param->transform_fields.bits.transform_ac_codingset_idx1 = v->c_ac_table_index; -- pic_param->transform_fields.bits.transform_ac_codingset_idx2 = v->y_ac_table_index; -- pic_param->transform_fields.bits.intra_transform_dc_table = v->s.dc_table_index; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->inloop_decoded_picture = VA_INVALID_ID; -+ pic_param->BFV(sequence_fields,value) = 0; /* reset all bits */ -+ NEW(pic_param->BFM(sequence_fields,bits,pulldown) = v->broadcast); -+ pic_param->BFM(sequence_fields,bits,interlace) = v->interlace; -+ NEW(pic_param->BFM(sequence_fields,bits,tfcntrflag) = v->tfcntrflag); -+ NEW(pic_param->BFM(sequence_fields,bits,finterpflag) = v->finterpflag); -+ NEW(pic_param->BFM(sequence_fields,bits,psf) = v->psf); -+ NEW(pic_param->BFM(sequence_fields,bits,multires) = v->multires); -+ pic_param->BFM(sequence_fields,bits,overlap) = v->overlap; -+ pic_param->BFM(sequence_fields,bits,syncmarker) = s->resync_marker; -+ NEW(pic_param->BFM(sequence_fields,bits,rangered) = v->rangered); -+ NEW(pic_param->BFM(sequence_fields,bits,max_b_frames) = s->avctx->max_b_frames); -+#if VA_CHECK_VERSION(0,32,0) -+ NEW(pic_param->BFM(sequence_fields,bits,profile) = v->profile); -+#endif -+ pic_param->coded_width = s->avctx->coded_width; -+ pic_param->coded_height = s->avctx->coded_height; -+ NEW(pic_param->BFV(entrypoint_fields,value) = 0); /* reset all bits */ -+ pic_param->BFM(entrypoint_fields,bits,broken_link) = v->broken_link; -+ pic_param->BFM(entrypoint_fields,bits,closed_entry) = v->closed_entry; -+ NEW(pic_param->BFM(entrypoint_fields,bits,panscan_flag) = v->panscanflag); -+ pic_param->BFM(entrypoint_fields,bits,loopfilter) = s->loop_filter; -+ pic_param->conditional_overlap_flag = v->condover; -+ pic_param->fast_uvmc_flag = v->fastuvmc; -+ pic_param->BFV(range_mapping_fields,value) = 0; /* reset all bits */ -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,luma_flag) = v->range_mapy_flag; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,luma) = v->range_mapy; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,chroma_flag) = v->range_mapuv_flag; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,chroma) = v->range_mapuv; -+ pic_param->b_picture_fraction = v->bfraction_lut_index; -+ pic_param->cbp_table = v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -+ pic_param->mb_mode_table = 0; /* XXX: interlaced frame */ -+ pic_param->range_reduction_frame = v->rangeredfrm; -+ pic_param->rounding_control = v->rnd; -+ pic_param->post_processing = v->postproc; -+ pic_param->picture_resolution_index = v->respic; -+ pic_param->luma_scale = v->lumscale; -+ pic_param->luma_shift = v->lumshift; -+ pic_param->BFV(picture_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(picture_fields,bits,picture_type) = vc1_get_PTYPE(v); -+ pic_param->BFM(picture_fields,bits,frame_coding_mode) = v->fcm; -+ pic_param->BFM(picture_fields,bits,top_field_first) = v->tff; -+ pic_param->BFM(picture_fields,bits,is_first_field) = v->fcm == 0; /* XXX: interlaced frame */ -+ pic_param->BFM(picture_fields,bits,intensity_compensation) = v->mv_mode == MV_PMODE_INTENSITY_COMP; -+ pic_param->BFV(V_raw_coding,value) = 0; /* reset all bits */ -+ pic_param->BFM(M_raw_coding,flags,mv_type_mb) = v->mv_type_is_raw; -+ pic_param->BFM(M_raw_coding,flags,direct_mb) = v->dmb_is_raw; -+ pic_param->BFM(M_raw_coding,flags,skip_mb) = v->skip_is_raw; -+ pic_param->BFM(M_raw_coding,flags,field_tx) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_raw_coding,flags,forward_mb) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_raw_coding,flags,ac_pred) = v->acpred_is_raw; -+ pic_param->BFM(M_raw_coding,flags,overflags) = v->overflg_is_raw; -+ pic_param->BFV(V_bitplane_present,value) = 0; /* reset all bits */ -+ pic_param->BFM(M_bitplane_present,flags,bp_mv_type_mb) = vc1_has_MVTYPEMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) = vc1_has_DIRECTMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) = vc1_has_SKIPMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_field_tx) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_bitplane_present,flags,bp_forward_mb) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_bitplane_present,flags,bp_ac_pred) = vc1_has_ACPRED_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_overflags) = vc1_has_OVERFLAGS_bitplane(v); -+ pic_param->BFV(reference_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(reference_fields,bits,reference_distance_flag) = v->refdist_flag; -+ pic_param->BFM(reference_fields,bits,reference_distance) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(reference_fields,bits,num_reference_pictures) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(reference_fields,bits,reference_field_pic_indicator) = 0; /* XXX: interlaced frame */ -+ pic_param->BFV(mv_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(mv_fields,bits,mv_mode) = vc1_get_MVMODE(v); -+ pic_param->BFM(mv_fields,bits,mv_mode2) = vc1_get_MVMODE2(v); -+ pic_param->BFM(mv_fields,bits,mv_table) = s->mv_table_index; -+ pic_param->BFM(mv_fields,bits,two_mv_block_pattern_table) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,four_mv_switch) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,four_mv_block_pattern_table) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,extended_mv_flag) = v->extended_mv; -+ pic_param->BFM(mv_fields,bits,extended_mv_range) = v->mvrange; -+ pic_param->BFM(mv_fields,bits,extended_dmv_flag) = v->extended_dmv; -+ pic_param->BFM(mv_fields,bits,extended_dmv_range) = 0; /* XXX: interlaced frame */ -+ pic_param->BFV(pic_quantizer_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(pic_quantizer_fields,bits,dquant) = v->dquant; -+ pic_param->BFM(pic_quantizer_fields,bits,quantizer) = v->quantizer_mode; -+ pic_param->BFM(pic_quantizer_fields,bits,half_qp) = v->halfpq; -+ pic_param->BFM(pic_quantizer_fields,bits,pic_quantizer_scale) = v->pq; -+ pic_param->BFM(pic_quantizer_fields,bits,pic_quantizer_type) = v->pquantizer; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_frame) = v->dquantfrm; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_profile) = v->dqprofile; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_sb_edge) = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_db_edge) = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_binary_level) = v->dqbilevel; -+ pic_param->BFM(pic_quantizer_fields,bits,alt_pic_quantizer) = v->altpq; -+ pic_param->BFV(transform_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(transform_fields,bits,variable_sized_transform_flag) = v->vstransform; -+ pic_param->BFM(transform_fields,bits,mb_level_transform_type_flag) = v->ttmbf; -+ pic_param->BFM(transform_fields,bits,frame_level_transform_type) = v->ttfrm; -+ pic_param->BFM(transform_fields,bits,transform_ac_codingset_idx1) = v->c_ac_table_index; -+ pic_param->BFM(transform_fields,bits,transform_ac_codingset_idx2) = v->y_ac_table_index; -+ pic_param->BFM(transform_fields,bits,intra_transform_dc_table) = v->s.dc_table_index; - - switch (s->pict_type) { - case FF_B_TYPE: -@@ -251,29 +253,29 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - break; - } - -- if (pic_param->bitplane_present.value) { -+ if (pic_param->BFV(V_bitplane_present,value)) { - uint8_t *bitplane; - const uint8_t *ff_bp[3]; - int x, y, n; - - switch (s->pict_type) { - case FF_P_TYPE: -- ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL; -- ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL; -- ff_bp[2] = pic_param->bitplane_present.flags.bp_mv_type_mb ? v->mv_type_mb_plane : NULL; -+ ff_bp[0] = pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) ? v->direct_mb_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) ? s->mbskip_table : NULL; -+ ff_bp[2] = pic_param->BFM(M_bitplane_present,flags,bp_mv_type_mb) ? v->mv_type_mb_plane : NULL; - break; - case FF_B_TYPE: - if (!v->bi_type) { -- ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL; -- ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL; -+ ff_bp[0] = pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) ? v->direct_mb_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) ? s->mbskip_table : NULL; - ff_bp[2] = NULL; /* XXX: interlaced frame (FORWARD plane) */ - break; - } - /* fall-through (BI-type) */ - case FF_I_TYPE: - ff_bp[0] = NULL; /* XXX: interlaced frame (FIELDTX plane) */ -- ff_bp[1] = pic_param->bitplane_present.flags.bp_ac_pred ? v->acpred_plane : NULL; -- ff_bp[2] = pic_param->bitplane_present.flags.bp_overflags ? v->over_flags_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_ac_pred) ? v->acpred_plane : NULL; -+ ff_bp[2] = pic_param->BFM(M_bitplane_present,flags,bp_overflags) ? v->over_flags_plane : NULL; - break; - default: - ff_bp[0] = NULL; -diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c -index 9d46485..1ab47b3 100644 ---- a/libvo/vo_vaapi.c -+++ b/libvo/vo_vaapi.c -@@ -45,7 +45,11 @@ - #include - #include - #include -+#if CONFIG_VAAPI_OLD -+#include -+#else - #include -+#endif - #if CONFIG_VAAPI_GLX - #include - #endif diff --git a/media-video/mplayer/files/vaapi-take3/04-mplayer-vdpau.patch b/media-video/mplayer/files/vaapi-take3/04-mplayer-vdpau.patch deleted file mode 100644 index 5e91da0cb..000000000 --- a/media-video/mplayer/files/vaapi-take3/04-mplayer-vdpau.patch +++ /dev/null @@ -1,1231 +0,0 @@ -diff --git a/configure b/configure -index 91fd164..1f4434e 100755 ---- a/configure -+++ b/configure -@@ -597,7 +597,7 @@ libavparsers=$libavparsers_all - libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') - libavbsfs=$libavbsfs_all - libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') --libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL) echo $h;; esac; done) -+libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL|*_VDPAU_HWACCEL) echo $h;; esac; done) - libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') - libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//) - libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') -@@ -4466,7 +4466,7 @@ if test "$_vdpau" = yes ; then - else - def_vdpau='#define CONFIG_VDPAU 0' - novomodules="vdpau $novomodules" -- libavdecoders=$(echo $libavdecoders | sed -e 's/[A-Z0-9]*_VDPAU_DECODER//g') -+ libavhwaccels=$(echo $libavhwaccels | sed -e 's/[A-Z0-9]*_VDPAU_DECODER//g') - fi - echores "$_vdpau" - -diff --git a/etc/codecs.conf b/etc/codecs.conf -index b0d00f4..745d3e4 100644 ---- a/etc/codecs.conf -+++ b/etc/codecs.conf -@@ -176,6 +176,7 @@ videocodec ffmpeg1 - fourcc m1v1 - driver ffmpeg - dll "mpeg1video" -+ out VDPAU_MPEG1 - out YV12,I420,IYUV - - videocodec ffmpeg2 -@@ -213,6 +214,7 @@ videocodec ffmpeg2 - driver ffmpeg - dll "mpeg2video" - out VAAPI_MPEG2 -+ out VDPAU_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -253,6 +255,7 @@ videocodec ffmpeg12 - fourcc slif ; SoftLab MPEG-2 I-frames Codec - driver ffmpeg - dll "mpegvideo" -+ out VDPAU_MPEG1,VDPAU_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -332,41 +335,6 @@ videocodec ffmpeg12mc - out IDCT_MPEG2 - out MOCO_MPEG2 - --videocodec ffmpeg12vdpau -- info "FFmpeg MPEG-1/2 (VDPAU)" -- status working -- format 0x10000001 ; MPEG-1 -- format 0x10000002 ; MPEG-2 -- fourcc mpg1,mpg2,MPG2 -- fourcc PIM1 ; Pinnacle hardware-MPEG-1 -- fourcc PIM2 ; Pinnacle hardware-MPEG-2 -- fourcc "DVR " -- fourcc hdv2 -- fourcc MPEG -- fourcc hdv1 -- fourcc hdv3 ; HDV 1080i50 -- fourcc hdv5 ; HDV 720p25 -- fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) -- fourcc hdv6,hdv7,hdv8 -- fourcc xdv1,xdv2,xdv3 -- fourcc xdv4,xdv5,xdv6 -- fourcc xdv7,xdv8,xdv9 -- fourcc xdva,xdvb,xdvc -- fourcc xdvd,xdve,xdvf -- fourcc xd5a,xd5b,xd5c -- fourcc xd5d,xd5e,xd5f -- fourcc xd59,xd54,xd55 -- fourcc mx5n,mx4n,mx4p -- fourcc mx3n,mx3p -- fourcc AVmp -- fourcc mp2v,mpgv -- fourcc LMP2 ; Lead mpeg2 in avi -- fourcc m2v1,m1v1 -- driver ffmpeg -- dll "mpegvideo_vdpau" -- out VDPAU_MPEG1 -- out VDPAU_MPEG2 -- - videocodec mpegpes - info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)" - comment "for hardware decoding" -@@ -943,6 +911,7 @@ videocodec ffwmv3 - driver ffmpeg - dll wmv3 - out VAAPI_WMV3 -+ out VDPAU_WMV3 - out YV12,I420,IYUV - - videocodec ffwmvp -@@ -952,15 +921,8 @@ videocodec ffwmvp - fourcc wmvp,WMVP - driver ffmpeg - dll wmv3 -- out YV12,I420,IYUV -- --videocodec ffwmv3vdpau -- info "FFmpeg WMV3/WMV9 (VDPAU)" -- status buggy -- fourcc WMV3,wmv3 -- driver ffmpeg -- dll wmv3_vdpau - out VDPAU_WMV3 -+ out YV12,I420,IYUV - - videocodec ffvc1 - info "FFmpeg WVC1" -@@ -970,16 +932,8 @@ videocodec ffvc1 - driver ffmpeg - dll vc1 - out VAAPI_VC1 -- out YV12,I420,IYUV -- --videocodec ffvc1vdpau -- info "FFmpeg WVC1 (VDPAU)" -- status buggy -- fourcc WVC1,wvc1,WMVA -- fourcc vc-1,VC-1 -- driver ffmpeg -- dll vc1_vdpau - out VDPAU_VC1 -+ out YV12,I420,IYUV - - videocodec ffh264 - info "FFmpeg H.264" -@@ -993,21 +947,8 @@ videocodec ffh264 - driver ffmpeg - dll h264 - out VAAPI_H264 -- out YV12,I420,IYUV -- --videocodec ffh264vdpau -- info "FFmpeg H.264 (VDPAU)" -- status working -- fourcc H264,h264 -- fourcc X264,x264 -- fourcc avc1,AVC1 -- fourcc davc,DAVC -- fourcc ai55,ai15 ; flip4mac avc intra -- fourcc ai1q,ai5q ; flip4mac avc intra -- format 0x10000005 -- driver ffmpeg -- dll h264_vdpau - out VDPAU_H264 -+ out YV12,I420,IYUV - - videocodec coreavcwindows - info "CoreAVC H.264 for x86 - http://corecodec.org/" -@@ -1063,40 +1006,8 @@ videocodec ffodivx - driver ffmpeg - dll mpeg4 ;opendivx - out VAAPI_MPEG4 -- out YV12,I420,IYUV -- --videocodec ffodivxvdpau -- info "FFmpeg MPEG-4,DIVX-4/5 (VDPAU)" -- status working -- fourcc FMP4,fmp4 -- fourcc DIVX,divx -- fourcc DIV1,div1 divx -- fourcc MP4S,mp4s ; ISO MPEG-4 Video V1 -- fourcc M4S2,m4s2 -- fourcc xvid,XVID,XviD,XVIX -- fourcc DX50,dx50,BLZ0 DX50 -- fourcc mp4v,MP4V -- format 0x4 -- fourcc UMP4 -- fourcc RMP4 -- fourcc 3IV2,3iv2 ; 3ivx Delta 4 -- fourcc DXGM -- fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110 -- fourcc SMP4,smp4 ; Samsung SMP4 video codec -- fourcc VIDM ; vidm 4.01 codec -- format 0x10000004 ; mpeg 4 es -- fourcc m4cc,M4CC -- fourcc hdx4,HDX4 -- fourcc FVFW,fvfw -- fourcc FFDS -- fourcc DCOD,MVXM,EM4A,PM4V -- fourcc M4T3,DMK2,DIGI,INMC -- fourcc EPHV,SN40,WAWV -- fourcc uldx,ULDX,VSPX -- fourcc SIPP ; Samsung SHR-6040 -- driver ffmpeg -- dll mpeg4_vdpau - out VDPAU_MPEG4 -+ out YV12,I420,IYUV - - videocodec ffwv1f - info "WV1F MPEG-4" -diff --git a/ffmpeg/libavcodec/allcodecs.c b/ffmpeg/libavcodec/allcodecs.c -index fbae0f6..4b6d2e9 100644 ---- a/ffmpeg/libavcodec/allcodecs.c -+++ b/ffmpeg/libavcodec/allcodecs.c -@@ -116,7 +123,6 @@ void avcodec_register_all(void) - REGISTER_DECODER (H263I, h263i); - REGISTER_ENCODER (H263P, h263p); - REGISTER_DECODER (H264, h264); -- REGISTER_DECODER (H264_VDPAU, h264_vdpau); - REGISTER_ENCDEC (HUFFYUV, huffyuv); - REGISTER_DECODER (IDCIN, idcin); - REGISTER_DECODER (IFF_BYTERUN1, iff_byterun1); -@@ -140,10 +146,7 @@ void avcodec_register_all(void) - REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); - REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); - REGISTER_ENCDEC (MPEG4, mpeg4); -- REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau); - REGISTER_DECODER (MPEGVIDEO, mpegvideo); -- REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau); -- REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau); - REGISTER_ENCDEC (MSMPEG4V1, msmpeg4v1); - REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2); - REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3); -@@ -196,7 +199,6 @@ void avcodec_register_all(void) - REGISTER_DECODER (V210X, v210x); - REGISTER_DECODER (VB, vb); - REGISTER_DECODER (VC1, vc1); -- REGISTER_DECODER (VC1_VDPAU, vc1_vdpau); - REGISTER_DECODER (VCR1, vcr1); - REGISTER_DECODER (VMDVIDEO, vmdvideo); - REGISTER_DECODER (VMNC, vmnc); -@@ -210,7 +212,6 @@ void avcodec_register_all(void) - REGISTER_ENCDEC (WMV1, wmv1); - REGISTER_ENCDEC (WMV2, wmv2); - REGISTER_DECODER (WMV3, wmv3); -- REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau); - REGISTER_DECODER (WNV1, wnv1); - REGISTER_DECODER (XAN_WC3, xan_wc3); - REGISTER_DECODER (XL, xl); -diff --git a/ffmpeg/libavcodec/avcodec.h b/ffmpeg/libavcodec/avcodec.h -index bff9477..1e77fa6 100644 ---- a/ffmpeg/libavcodec/avcodec.h -+++ b/ffmpeg/libavcodec/avcodec.h -@@ -687,10 +687,6 @@ typedef struct RcOverride{ - */ - #define CODEC_CAP_SMALL_LAST_FRAME 0x0040 - /** -- * Codec can export data for HW decoding (VDPAU). -- */ --#define CODEC_CAP_HWACCEL_VDPAU 0x0080 --/** - * Codec can output multiple frames per AVPacket - * Normally demuxers return one frame at a time, demuxers which do not do - * are connected to a parser to split what they return into proper frames. -diff --git a/ffmpeg/libavcodec/error_resilience.c b/ffmpeg/libavcodec/error_resilience.c -index dc015b9..a36f7ac 100644 ---- a/ffmpeg/libavcodec/error_resilience.c -+++ b/ffmpeg/libavcodec/error_resilience.c -@@ -759,7 +759,6 @@ void ff_er_frame_end(MpegEncContext *s){ - - if(!s->error_recognition || s->error_count==0 || s->avctx->lowres || - s->avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || - s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled - s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return; - -diff --git a/ffmpeg/libavcodec/h263dec.c b/ffmpeg/libavcodec/h263dec.c -index b0a3a8a..b5b9026 100644 ---- a/ffmpeg/libavcodec/h263dec.c -+++ b/ffmpeg/libavcodec/h263dec.c -@@ -34,7 +34,6 @@ - #include "h263_parser.h" - #include "mpeg4video_parser.h" - #include "msmpeg4.h" --#include "vdpau_internal.h" - #include "flv.h" - #include "mpeg4video.h" - -@@ -620,11 +619,6 @@ retry: - if(MPV_frame_start(s, avctx) < 0) - return -1; - -- if (CONFIG_MPEG4_VDPAU_DECODER && (s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)) { -- ff_vdpau_mpeg4_decode_picture(s, s->gb.buffer, s->gb.buffer_end - s->gb.buffer); -- goto frame_end; -- } -- - if (avctx->hwaccel) { - if (avctx->hwaccel->start_frame(avctx, s->gb.buffer, s->gb.buffer_end - s->gb.buffer) < 0) - return -1; -diff --git a/ffmpeg/libavcodec/h264.c b/ffmpeg/libavcodec/h264.c -index f99f7ea..faafa97 100644 ---- a/ffmpeg/libavcodec/h264.c -+++ b/ffmpeg/libavcodec/h264.c -@@ -37,7 +37,6 @@ - #include "golomb.h" - #include "mathops.h" - #include "rectangle.h" --#include "vdpau_internal.h" - #include "libavutil/avassert.h" - - #include "cabac.h" -@@ -1647,9 +1646,6 @@ static void field_end(H264Context *h){ - s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264; - s->current_picture_ptr->pict_type= s->pict_type; - -- if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_set_reference_frames(s); -- - if(!s->dropable) { - ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); - h->prev_poc_msb= h->poc_msb; -@@ -1663,9 +1659,6 @@ static void field_end(H264Context *h){ - av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); - } - -- if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_picture_complete(s); -- - /* - * FIXME: Error handling code does not seem to support interlaced - * when slices span multiple rows -@@ -2722,8 +2715,6 @@ static void execute_decode_slices(H264Context *h, int context_count){ - - if (s->avctx->hwaccel) - return; -- if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- return; - if(context_count == 1) { - decode_slice(avctx, &h); - } else { -@@ -2859,8 +2850,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ - if (h->current_slice == 1) { - if (s->avctx->hwaccel && s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0) - return -1; -- if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_picture_start(s); - } - - s->current_picture_ptr->key_frame |= -@@ -2875,11 +2864,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ - if (avctx->hwaccel->decode_slice(avctx, &buf[buf_index - consumed], consumed) < 0) - return -1; - }else -- if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- static const uint8_t start_code[] = {0x00, 0x00, 0x01}; -- ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code)); -- ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed ); -- }else - context_count++; - } - break; -@@ -3409,21 +3393,3 @@ AVCodec h264_decoder = { - .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - .profiles = NULL_IF_CONFIG_SMALL(profiles), - }; -- --#if CONFIG_H264_VDPAU_DECODER --AVCodec ff_h264_vdpau_decoder = { -- "h264_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_H264, -- sizeof(H264Context), -- ff_h264_decode_init, -- NULL, -- ff_h264_decode_end, -- decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- .flush= flush_dpb, -- .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE}, -- .profiles = NULL_IF_CONFIG_SMALL(profiles), --}; --#endif -diff --git a/ffmpeg/libavcodec/mpeg12.c b/ffmpeg/libavcodec/mpeg12.c -index 6a331eb..c226797 100644 ---- a/ffmpeg/libavcodec/mpeg12.c -+++ b/ffmpeg/libavcodec/mpeg12.c -@@ -35,7 +35,6 @@ - #include "mpeg12data.h" - #include "mpeg12decdata.h" - #include "bytestream.h" --#include "vdpau_internal.h" - #include "xvmc_internal.h" - - //#undef NDEBUG -@@ -1226,12 +1225,7 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx){ - - if(avctx->xvmc_acceleration) - return avctx->get_format(avctx,pixfmt_xvmc_mpg2_420); -- else if(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- if(avctx->codec_id == CODEC_ID_MPEG1VIDEO) -- return PIX_FMT_VDPAU_MPEG1; -- else -- return PIX_FMT_VDPAU_MPEG2; -- }else{ -+ else{ - if(s->chroma_format < 2) - return avctx->get_format(avctx,ff_hwaccel_pixfmt_list_420); - else if(s->chroma_format == 2) -@@ -1324,9 +1318,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ - avctx->pix_fmt = mpeg_get_pixelformat(avctx); - avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - //until then pix_fmt may be changed right after codec init -- if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || -- avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -+ if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel ) - if( avctx->idct_algo == FF_IDCT_AUTO ) - avctx->idct_algo = FF_IDCT_SIMPLE; - -@@ -2065,8 +2057,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) - avctx->pix_fmt = mpeg_get_pixelformat(avctx); - avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - -- if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -+ if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel ) - if( avctx->idct_algo == FF_IDCT_AUTO ) - avctx->idct_algo = FF_IDCT_SIMPLE; - -@@ -2297,9 +2288,6 @@ static int decode_chunks(AVCodecContext *avctx, - s2->error_count += s2->thread_context[i]->error_count; - } - -- if (CONFIG_MPEG_VDPAU_DECODER && avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count); -- - if (slice_end(avctx, picture)) { - if(s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice - *data_size = sizeof(AVPicture); -@@ -2446,11 +2434,6 @@ static int decode_chunks(AVCodecContext *avctx, - return -1; - } - -- if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) { -- s->slice_count++; -- break; -- } -- - if(avctx->thread_count > 1){ - int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count; - if(threshold <= mb_y){ -@@ -2578,36 +2561,3 @@ AVCodec mpeg_xvmc_decoder = { - }; - - #endif -- --#if CONFIG_MPEG_VDPAU_DECODER --AVCodec ff_mpeg_vdpau_decoder = { -- "mpegvideo_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG2VIDEO, -- sizeof(Mpeg1Context), -- mpeg_decode_init, -- NULL, -- mpeg_decode_end, -- mpeg_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, -- .flush= flush, -- .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"), --}; --#endif -- --#if CONFIG_MPEG1_VDPAU_DECODER --AVCodec ff_mpeg1_vdpau_decoder = { -- "mpeg1video_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG1VIDEO, -- sizeof(Mpeg1Context), -- mpeg_decode_init, -- NULL, -- mpeg_decode_end, -- mpeg_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, -- .flush= flush, -- .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), --}; --#endif -- -diff --git a/ffmpeg/libavcodec/mpeg4videodec.c b/ffmpeg/libavcodec/mpeg4videodec.c -index b339f78..1928d03 100644 ---- a/ffmpeg/libavcodec/mpeg4videodec.c -+++ b/ffmpeg/libavcodec/mpeg4videodec.c -@@ -2249,20 +2249,3 @@ AVCodec mpeg4_decoder = { - .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), - .pix_fmts= ff_hwaccel_pixfmt_list_420, - }; -- -- --#if CONFIG_MPEG4_VDPAU_DECODER --AVCodec ff_mpeg4_vdpau_decoder = { -- "mpeg4_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG4, -- sizeof(MpegEncContext), -- decode_init, -- NULL, -- ff_h263_decode_end, -- ff_h263_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), -- .pix_fmts= (const enum PixelFormat[]){PIX_FMT_VDPAU_MPEG4, PIX_FMT_NONE}, --}; --#endif -diff --git a/ffmpeg/libavcodec/mpegvideo.c b/ffmpeg/libavcodec/mpegvideo.c -index 9650066..5f8440b 100644 ---- a/ffmpeg/libavcodec/mpegvideo.c -+++ b/ffmpeg/libavcodec/mpegvideo.c -@@ -117,6 +117,7 @@ const enum PixelFormat ff_pixfmt_list_420[] = { - const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = { - PIX_FMT_DXVA2_VLD, - PIX_FMT_VAAPI_VLD, -+ PIX_FMT_VDPAU, - PIX_FMT_YUV420P, - PIX_FMT_NONE - }; -@@ -1064,7 +1065,6 @@ void MPV_frame_end(MpegEncContext *s) - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){ - ff_xvmc_field_end(s); - }else if(!s->avctx->hwaccel -- && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) - && s->unrestricted_mv - && s->current_picture.reference - && !s->intra_only -diff --git a/ffmpeg/libavcodec/vc1dec.c b/ffmpeg/libavcodec/vc1dec.c -index c9a547b..71c50e7 100644 ---- a/ffmpeg/libavcodec/vc1dec.c -+++ b/ffmpeg/libavcodec/vc1dec.c -@@ -37,7 +37,6 @@ - #include "unary.h" - #include "simple_idct.h" - #include "mathops.h" --#include "vdpau_internal.h" - - #undef NDEBUG - #include -@@ -3167,13 +3166,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, - s->current_picture_ptr= &s->picture[i]; - } - -- if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- if (v->profile < PROFILE_ADVANCED) -- avctx->pix_fmt = PIX_FMT_VDPAU_WMV3; -- else -- avctx->pix_fmt = PIX_FMT_VDPAU_VC1; -- } -- - //for advanced profile we may need to parse and unescape data - if (avctx->codec_id == CODEC_ID_VC1) { - int buf_size2 = 0; -@@ -3190,8 +3182,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, - if(size <= 0) continue; - switch(AV_RB32(start)){ - case VC1_CODE_FRAME: -- if (avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -+ if (avctx->hwaccel) - buf_start = start; - buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); - break; -@@ -3283,10 +3274,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, - s->me.qpel_put= s->dsp.put_qpel_pixels_tab; - s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab; - -- if ((CONFIG_VC1_VDPAU_DECODER) -- &&s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_vc1_decode_picture(s, buf_start, (buf + buf_size) - buf_start); -- else if (avctx->hwaccel) { -+ if (avctx->hwaccel) { - if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0) - return -1; - if (avctx->hwaccel->decode_slice(avctx, buf_start, (buf + buf_size) - buf_start) < 0) -@@ -3377,39 +3365,3 @@ AVCodec wmv3_decoder = { - .profiles = NULL_IF_CONFIG_SMALL(profiles), - }; - #endif -- --#if CONFIG_WMV3_VDPAU_DECODER --AVCodec ff_wmv3_vdpau_decoder = { -- "wmv3_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_WMV3, -- sizeof(VC1Context), -- vc1_decode_init, -- NULL, -- vc1_decode_end, -- vc1_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- NULL, -- .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE}, -- .profiles = NULL_IF_CONFIG_SMALL(profiles) --}; --#endif -- --#if CONFIG_VC1_VDPAU_DECODER --AVCodec ff_vc1_vdpau_decoder = { -- "vc1_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_VC1, -- sizeof(VC1Context), -- vc1_decode_init, -- NULL, -- vc1_decode_end, -- vc1_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- NULL, -- .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE}, -- .profiles = NULL_IF_CONFIG_SMALL(profiles) --}; --#endif -diff --git a/ffmpeg/libavcodec/vdpau.c b/ffmpeg/libavcodec/vdpau.c -index bd721e8..09ca45e 100644 ---- a/ffmpeg/libavcodec/vdpau.c -+++ b/ffmpeg/libavcodec/vdpau.c -@@ -30,7 +30,6 @@ - #include - - #include "vdpau.h" --#include "vdpau_internal.h" - - /** - * \addtogroup VDPAU_Decoding -@@ -38,15 +37,57 @@ - * @{ - */ - --void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) -+static void vdpau_h264_fill_field_order_cnt(int32_t field_order_cnt[2], Picture *pic, int pic_structure) - { -- H264Context *h = s->avctx->priv_data; -+ int i; -+ for (i = 0; i < 2; i++) { -+ const int poc = pic->field_poc[i]; -+ field_order_cnt[i] = poc != INT_MAX ? poc : 0; -+ } -+} -+ -+static void vdpau_h264_init_picture(VdpReferenceFrameH264 *rf) -+{ -+ rf->surface = VDP_INVALID_HANDLE; -+ rf->is_long_term = 0; -+ rf->top_is_reference = 0; -+ rf->bottom_is_reference = 0; -+ rf->field_order_cnt[0] = 0; -+ rf->field_order_cnt[1] = 0; -+ rf->frame_idx = 0; -+} -+ -+static void vdpau_h264_fill_picture(VdpReferenceFrameH264 *rf, Picture *pic, int pic_structure) -+{ -+ struct vdpau_render_state *render; -+ -+ assert(rf); -+ assert(pic); -+ -+ if (pic_structure == 0) -+ pic_structure = pic->reference; -+ -+ render = (struct vdpau_render_state *)pic->data[3]; -+ assert(render); -+ -+ rf->surface = render->surface; -+ rf->is_long_term = pic->reference && pic->long_ref; -+ rf->top_is_reference = (pic_structure & PICT_TOP_FIELD) != 0; -+ rf->bottom_is_reference = (pic_structure & PICT_BOTTOM_FIELD) != 0; -+ rf->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -+ -+ vdpau_h264_fill_field_order_cnt(rf->field_order_cnt, pic, pic_structure); -+} -+ -+static void vdpau_h264_set_reference_frames(H264Context *h) -+{ -+ MpegEncContext * const s = &h->s; - struct vdpau_render_state *render, *render_ref; - VdpReferenceFrameH264 *rf, *rf2; - Picture *pic; - int i, list, pic_frame_idx; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - rf = &render->info.h264.referenceFrames[0]; -@@ -62,7 +103,7 @@ void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) - continue; - pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; - -- render_ref = (struct vdpau_render_state *)pic->data[0]; -+ render_ref = (struct vdpau_render_state *)pic->data[3]; - assert(render_ref); - - rf2 = &render->info.h264.referenceFrames[0]; -@@ -84,81 +125,93 @@ void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) - if (rf >= &render->info.h264.referenceFrames[H264_RF_COUNT]) - continue; - -- rf->surface = render_ref->surface; -- rf->is_long_term = pic->long_ref; -- rf->top_is_reference = (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; -- rf->bottom_is_reference = (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; -- rf->field_order_cnt[0] = pic->field_poc[0]; -- rf->field_order_cnt[1] = pic->field_poc[1]; -- rf->frame_idx = pic_frame_idx; -+ vdpau_h264_fill_picture(rf, pic, pic->reference); - - ++rf; - } - } - -- for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) { -- rf->surface = VDP_INVALID_HANDLE; -- rf->is_long_term = 0; -- rf->top_is_reference = 0; -- rf->bottom_is_reference = 0; -- rf->field_order_cnt[0] = 0; -- rf->field_order_cnt[1] = 0; -- rf->frame_idx = 0; -- } -+ for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) -+ vdpau_h264_init_picture(rf); - } - --void ff_vdpau_add_data_chunk(MpegEncContext *s, -- const uint8_t *buf, int buf_size) -+static int vdpau_ensure_bitstream_buffers(struct vdpau_render_state *render) - { -- struct vdpau_render_state *render; -- -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -- assert(render); -- - render->bitstream_buffers= av_fast_realloc( - render->bitstream_buffers, - &render->bitstream_buffers_allocated, - sizeof(*render->bitstream_buffers)*(render->bitstream_buffers_used + 1) - ); - -- render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -- render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; -- render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; -- render->bitstream_buffers_used++; -+ if (!render->bitstream_buffers) -+ return -1; -+ -+ return 0; - } - --void ff_vdpau_h264_picture_start(MpegEncContext *s) -+static int vdpau_common_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) - { -- H264Context *h = s->avctx->priv_data; -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render; -- int i; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- for (i = 0; i < 2; ++i) { -- int foc = s->current_picture_ptr->field_poc[i]; -- if (foc == INT_MAX) -- foc = 0; -- render->info.h264.field_order_cnt[i] = foc; -+ render->bitstream_buffers_used = 0; -+ return 0; -+} -+ -+static int vdpau_common_end_frame(AVCodecContext *avctx) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (render->bitstream_buffers_used) { -+ ff_draw_horiz_band(s, 0, s->avctx->height); -+ render->bitstream_buffers_used = 0; - } -+ return 0; -+} - -- render->info.h264.frame_num = h->frame_num; -+static int vdpau_common_decode_slice(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_ensure_bitstream_buffers(render) < 0) -+ return -1; -+ -+ render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; -+ render->bitstream_buffers_used++; -+ return 0; - } - --void ff_vdpau_h264_picture_complete(MpegEncContext *s) -+static int vdpau_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -- H264Context *h = s->avctx->priv_data; -+ H264Context * const h = avctx->priv_data; -+ MpegEncContext * const s = &h->s; - struct vdpau_render_state *render; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- render->info.h264.slice_count = h->slice_num; -- if (render->info.h264.slice_count < 1) -- return; -+ vdpau_h264_set_reference_frames(h); - -- render->info.h264.is_reference = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE; -+ vdpau_h264_fill_field_order_cnt(render->info.h264.field_order_cnt, -+ s->current_picture_ptr, -+ s->picture_structure); -+ -+ /* fill VdpPictureInfoH264 struct */ -+ render->info.h264.is_reference = h->nal_ref_idc != 0; -+ render->info.h264.frame_num = h->frame_num; - render->info.h264.field_pic_flag = s->picture_structure != PICT_FRAME; - render->info.h264.bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD; - render->info.h264.num_ref_frames = h->sps.ref_frame_count; -@@ -185,19 +238,44 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s) - memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4)); - memcpy(render->info.h264.scaling_lists_8x8, h->pps.scaling_matrix8, sizeof(render->info.h264.scaling_lists_8x8)); - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+ render->info.h264.slice_count = 0; -+ -+ return vdpau_common_start_frame(avctx, buffer, size); - } - --void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, -- int buf_size, int slice_count) -+static int vdpau_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ static const uint8_t start_code_prefix_one_3byte[3] = { 0x00, 0x00, 0x01 }; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_ensure_bitstream_buffers(render) < 0) -+ return -1; -+ -+ render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream = start_code_prefix_one_3byte; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = sizeof(start_code_prefix_one_3byte); -+ render->bitstream_buffers_used++; -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.h264.slice_count; -+ return 0; -+} -+ -+static int vdpau_mpeg2_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render, *last, *next; - int i; - -- if (!s->current_picture_ptr) return; -+ if (!s->current_picture_ptr) return 0; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - /* fill VdpPictureInfoMPEG1Or2 struct */ -@@ -226,36 +304,47 @@ void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, - - switch(s->pict_type){ - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.mpeg.backward_reference = next->surface; - // no return here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - if (!last) // FIXME: Does this test make sense? - last = render; // predict second field from the first - render->info.mpeg.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ render->info.mpeg.slice_count = 0; - -- render->info.mpeg.slice_count = slice_count; -+ return vdpau_common_start_frame(avctx, buffer, size); -+} - -- if (slice_count) -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+static int vdpau_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.mpeg.slice_count; -+ return 0; - } - --void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, -- int buf_size) -+static int vdpau_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -- VC1Context *v = s->avctx->priv_data; -+ VC1Context * const v = avctx->priv_data; -+ MpegEncContext * const s = &v->s; - struct vdpau_render_state *render, *last, *next; - -- render = (struct vdpau_render_state *)s->current_picture.data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- /* fill LvPictureInfoVC1 struct */ -+ /* fill VdpPictureInfoVC1 struct */ - render->info.vc1.frame_coding_mode = v->fcm; - render->info.vc1.postprocflag = v->postprocflag; - render->info.vc1.pulldown = v->broadcast; -@@ -296,34 +385,47 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, - - switch(s->pict_type){ - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.vc1.backward_reference = next->surface; - // no break here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - if (!last) // FIXME: Does this test make sense? - last = render; // predict second field from the first - render->info.vc1.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ render->info.vc1.slice_count = 0; - -- render->info.vc1.slice_count = 1; -+ return vdpau_common_start_frame(avctx, buffer, size); -+} - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+static int vdpau_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ VC1Context * const v = avctx->priv_data; -+ MpegEncContext * const s = &v->s; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.vc1.slice_count; -+ return 0; - } - --void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, -- int buf_size) -+static int vdpau_mpeg4_decode_picture(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render, *last, *next; - int i; - -- if (!s->current_picture_ptr) return; -+ if (!s->current_picture_ptr) return 0; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - /* fill VdpPictureInfoMPEG4Part2 struct */ -@@ -352,21 +454,122 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, - - switch (s->pict_type) { - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.mpeg4.backward_reference = next->surface; - render->info.mpeg4.vop_coding_type = 2; - // no break here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - assert(last); - render->info.mpeg4.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ if (vdpau_common_start_frame(avctx, buffer, size) < 0) -+ return -1; - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ return vdpau_common_end_frame(avctx); -+} -+ -+static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ /* The `buffer' can be modified beyond this point so we pass the -+ * whole picture now to the decoder and let user-applications catch -+ * up immediately */ -+ return vdpau_mpeg4_decode_picture(avctx, buffer, size); - } - -+static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) -+{ -+ /* SKIP: everything is done in vdpau_mpeg4_start_frame() */ -+ return 0; -+} -+ -+static int vdpau_mpeg4_end_frame(av_unused AVCodecContext *avctx) -+{ -+ /* SKIP: everything is done in vdpau_mpeg4_start_frame() */ -+ return 0; -+} -+ -+#if CONFIG_MPEG1_VDPAU_HWACCEL -+AVHWAccel mpeg1_vdpau_hwaccel = { -+ .name = "mpeg1_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG1VIDEO, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg2_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_mpeg2_decode_slice, -+}; -+#endif -+ -+#if CONFIG_MPEG2_VDPAU_HWACCEL -+AVHWAccel mpeg2_vdpau_hwaccel = { -+ .name = "mpeg2_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG2VIDEO, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg2_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_mpeg2_decode_slice, -+}; -+#endif -+ -+#if CONFIG_H264_VDPAU_HWACCEL -+AVHWAccel h264_vdpau_hwaccel = { -+ .name = "h264_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_H264, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_h264_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_h264_decode_slice, -+}; -+#endif -+ -+#if CONFIG_WMV3_VDPAU_HWACCEL -+AVHWAccel wmv3_vdpau_hwaccel = { -+ .name = "wmv3_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_WMV3, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_vc1_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_vc1_decode_slice, -+}; -+#endif -+ -+#if CONFIG_VC1_VDPAU_HWACCEL -+AVHWAccel vc1_vdpau_hwaccel = { -+ .name = "vc1_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_VC1, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_vc1_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_vc1_decode_slice, -+}; -+#endif -+ -+#if CONFIG_MPEG4_VDPAU_HWACCEL -+AVHWAccel mpeg4_vdpau_hwaccel = { -+ .name = "mpeg4_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG4, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg4_start_frame, -+ .end_frame = vdpau_mpeg4_end_frame, -+ .decode_slice = vdpau_mpeg4_decode_slice, -+}; -+#endif -+ - /* @}*/ -diff --git a/ffmpeg/libavutil/pixdesc.c b/ffmpeg/libavutil/pixdesc.c -index 54f1d74..f01d16c 100644 ---- a/ffmpeg/libavutil/pixdesc.c -+++ b/ffmpeg/libavutil/pixdesc.c -@@ -800,6 +800,12 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { - {0,1,2,0,7}, /* A */ - }, - }, -+ [PIX_FMT_VDPAU] = { -+ .name = "vdpau", -+ .log2_chroma_w = 1, -+ .log2_chroma_h = 1, -+ .flags = PIX_FMT_HWACCEL, -+ }, - }; - - static enum PixelFormat get_pix_fmt_internal(const char *name) -diff --git a/ffmpeg/libavutil/pixfmt.h b/ffmpeg/libavutil/pixfmt.h -index 8ec91c8..2386a81 100644 ---- a/ffmpeg/libavutil/pixfmt.h -+++ b/ffmpeg/libavutil/pixfmt.h -@@ -133,6 +133,7 @@ enum PixelFormat { - PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1 - PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1 - PIX_FMT_Y400A, ///< 8bit gray, 8bit alpha -+ PIX_FMT_VDPAU, ///< HW decoding with VDPAU, Picture.data[3] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions - }; - -diff --git a/fmt-conversion.c b/fmt-conversion.c -index bd32ce8..8994caa 100644 ---- a/fmt-conversion.c -+++ b/fmt-conversion.c -@@ -91,12 +91,6 @@ static const struct { - - {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC}, - {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT}, -- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1}, -- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2}, -- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264}, -- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, -- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, -- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, - - /* VA-API formats */ - {IMGFMT_VAAPI_MPEG2, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG2VIDEO}, -@@ -108,6 +102,14 @@ static const struct { - {IMGFMT_VAAPI_WMV3, PIX_FMT_VAAPI_VLD, CODEC_ID_WMV3}, - {IMGFMT_VAAPI_VC1, PIX_FMT_VAAPI_VLD, CODEC_ID_VC1}, - -+ /* VDPAU formats */ -+ {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU, CODEC_ID_MPEG1VIDEO}, -+ {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU, CODEC_ID_MPEG4}, -+ {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU, CODEC_ID_H264}, -+ {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU, CODEC_ID_WMV3}, -+ {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU, CODEC_ID_VC1}, -+ - {0, PIX_FMT_NONE} - }; - -diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c -index 84b5430..aef79e9 100644 ---- a/libmpcodecs/vd_ffmpeg.c -+++ b/libmpcodecs/vd_ffmpeg.c -@@ -303,7 +303,7 @@ static int init(sh_video_t *sh){ - } - #endif /* CONFIG_VAAPI */ - #if CONFIG_VDPAU -- if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ -+ if(get_video_hwaccel() == HWACCEL_VDPAU){ - avctx->get_format = get_format; - } - #endif /* CONFIG_VDPAU */ -diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c -index 5133b66..0ce6104 100644 ---- a/libvo/vo_vdpau.c -+++ b/libvo/vo_vdpau.c -@@ -979,7 +979,7 @@ static int draw_slice(uint8_t *image[], int stride[], int w, int h, - int x, int y) - { - VdpStatus vdp_st; -- struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[0]; -+ struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[3]; - int max_refs = image_format == IMGFMT_VDPAU_H264 ? rndr->info.h264.num_ref_frames : 2; - - if (handle_preemption() < 0) -@@ -1082,10 +1082,10 @@ static uint32_t get_image(mp_image_t *mpi) - return VO_FALSE; - } - mpi->flags |= MP_IMGFLAG_DIRECT; -- mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = 0; -- mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = NULL; -+ mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = mpi->stride[3] = 0; -+ mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = mpi->planes[3] = NULL; - // hack to get around a check and to avoid a special-case in vd_ffmpeg.c -- mpi->planes[0] = (void *)rndr; -+ mpi->planes[0] = mpi->planes[3] = (void *)rndr; - mpi->num_planes = 1; - mpi->priv = rndr; - return VO_TRUE; diff --git a/media-video/mplayer/files/vaapi/01-mplayer-vaapi.patch b/media-video/mplayer/files/vaapi/01-mplayer-vaapi.patch deleted file mode 100644 index 6ae6c6ec1..000000000 --- a/media-video/mplayer/files/vaapi/01-mplayer-vaapi.patch +++ /dev/null @@ -1,3939 +0,0 @@ -diff --git a/Makefile b/Makefile -index 9d1bca1..c593ba2 100644 ---- a/Makefile -+++ b/Makefile -@@ -624,6 +624,7 @@ SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c - SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c - SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c - SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c -+SRCS_MPLAYER-$(VAAPI) += libvo/vo_vaapi.c - SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c - SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c - SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \ -@@ -677,6 +678,7 @@ SRCS_MPLAYER = command.c \ - libvo/aspect.c \ - libvo/geometry.c \ - libvo/spuenc.c \ -+ libvo/stats.c \ - libvo/video_out.c \ - libvo/vo_mpegpes.c \ - libvo/vo_null.c \ -diff --git a/cfg-common.h b/cfg-common.h -index 4f8c7ba..c2cbbf1 100644 ---- a/cfg-common-opts.h -+++ b/cfg-common-opts.h -@@ -244,6 +244,7 @@ const m_option_t common_opts[] = { - {"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, - {"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, - {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -+ {"va", &video_hwaccel_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, - - // postprocessing: - #ifdef CONFIG_LIBAVCODEC -diff --git a/codec-cfg.c b/codec-cfg.c -index b8ca998..6a75293 100644 ---- a/codec-cfg.c -+++ b/codec-cfg.c -@@ -224,6 +224,13 @@ static const struct { - {"VDPAU_VC1",IMGFMT_VDPAU_VC1}, - {"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4}, - -+ {"VAAPI_MPEG2", IMGFMT_VAAPI_MPEG2}, -+ {"VAAPI_MPEG4", IMGFMT_VAAPI_MPEG4}, -+ {"VAAPI_H263", IMGFMT_VAAPI_H263}, -+ {"VAAPI_H264", IMGFMT_VAAPI_H264}, -+ {"VAAPI_WMV3", IMGFMT_VAAPI_WMV3}, -+ {"VAAPI_VC1", IMGFMT_VAAPI_VC1}, -+ - {NULL, 0} - }; - -diff --git a/configure b/configure -index 55ff660..89a0a9a 100755 ---- a/configure -+++ b/configure -@@ -385,6 +385,9 @@ Codecs: - --disable-muxer=MUXER disable specified FFmpeg muxer - --enable-muxer=MUXER enable specified FFmpeg muxer - -+Hardware acceleration: -+ --enable-vaapi enable VA-API acceleration [disable] -+ - Video output: - --disable-vidix disable VIDIX [for x86 *nix] - --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in -@@ -414,6 +417,7 @@ Video output: - --enable-dvb enable DVB video output [autodetect] - --enable-mga enable mga_vid video output [autodetect] - --enable-xmga enable mga_vid X11 video output [autodetect] -+ --enable-xrender enable Xrender video output [autodetect] - --enable-xv enable Xv video output [autodetect] - --enable-xvmc enable XvMC acceleration [disable] - --enable-vdpau enable VDPAU acceleration [autodetect] -@@ -582,8 +586,7 @@ _libavparsers=$libavparsers_all - _libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') - _libavbsfs=$libavbsfs_all - _libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') --# Disable all hardware accelerators for now. --_libavhwaccels= -+_libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL) echo $h;; esac; done) - _libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') - _libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//) - _libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') -@@ -600,11 +603,15 @@ _libswscale_so=auto - _libavcodec_mpegaudio_hp=yes - _mencoder=yes - _mplayer=yes -+_vaapi=auto -+_vaapi_glx=no -+_libgtop=auto - _x11=auto - _xshape=auto - _xss=auto - _dga1=auto - _dga2=auto -+_xrender=auto - _xv=auto - _xvmc=no #auto when complete - _vdpau=auto -@@ -944,10 +951,14 @@ for ac_option do - --disable-xshape) _xshape=no ;; - --enable-xss) _xss=yes ;; - --disable-xss) _xss=no ;; -+ --enable-xrender) _xrender=yes ;; -+ --disable-xrender) _xrender=no ;; - --enable-xv) _xv=yes ;; - --disable-xv) _xv=no ;; - --enable-xvmc) _xvmc=yes ;; - --disable-xvmc) _xvmc=no ;; -+ --enable-vaapi) _vaapi=yes ;; -+ --disable-vaapi) _vaapi=no ;; - --enable-vdpau) _vdpau=yes ;; - --disable-vdpau) _vdpau=no ;; - --enable-sdl) _sdl=yes ;; -@@ -3966,6 +3977,28 @@ fi - echores "$_gettimeofday" - - -+echocheck "clock_gettime()" -+cat > $TMPC << EOF -+#include -+int main(void) { -+ struct timespec t; -+ clock_gettime(CLOCK_REALTIME, &t); -+ return 0; -+} -+EOF -+_clock_gettime=no -+cc_check -lrt && _clock_gettime=yes -+if test "$_clock_gettime" = yes ; then -+ def_clock_gettime='#define HAVE_CLOCK_GETTIME 1' -+ extra_ldflags="$extra_ldflags -lrt" -+ _need_clock_gettime=no -+else -+ def_clock_gettime='#undef HAVE_CLOCK_GETTIME' -+ _need_clock_gettime=yes -+fi -+echores "$_clock_gettime" -+ -+ - echocheck "glob()" - cat > $TMPC << EOF - #include -@@ -4405,7 +4438,7 @@ else - novomodules="x11 $novomodules" - res_comment="check if the dev(el) packages are installed" - # disable stuff that depends on X -- _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no -+ _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vaapi=no ; _vdpau=no - fi - echores "$_x11" - -@@ -4462,6 +4495,30 @@ else - fi - - -+echocheck "Xrender" -+if test "$_xrender" = auto ; then -+ cat > $TMPC < -+#include -+int main(void) { -+ (void) XRenderCreatePicture(0, 0, 0, 0, 0); -+ return 0; } -+EOF -+ _xrender=no -+ cc_check -lXrender && _xrender=yes -+fi -+ -+if test "$_xrender" = yes ; then -+ def_xrender='#define CONFIG_XRENDER 1' -+ libs_mplayer="$libs_mplayer -lXrender" -+ vomodules="xrender $vomodules" -+else -+ def_xrender='#undef CONFIG_XRENDER' -+ novomodules="xrender $novomodules" -+fi -+echores "$_xrender" -+ -+ - echocheck "Xv" - if test "$_xv" = auto ; then - cat > $TMPC < $TMPC << EOF -+#include -+#include -+int main(void) { return 0; } -+EOF -+cc_check $($_pkg_config --libs --cflags libgtop-2.0) && tmp_run && _libgtop=yes -+ -+ fi -+fi -+echores "$_libgtop" -+ -+if test "$_libgtop" = yes ; then -+ def_libgtop='#define CONFIG_LIBGTOP 1' -+ libs_mplayer="$libs_mplayer $($_pkg_config --libs libgtop-2.0)" -+ extra_cflags="$extra_cflags $($_pkg_config --cflags libgtop-2.0)" -+else -+ def_libgtop='#define CONFIG_LIBGTOP 0' -+fi -+ -+ - echocheck "PNG support" - if test "$_png" = auto ; then - _png=no -@@ -5375,6 +5457,23 @@ else - fi - echores "$_gl" - -+echocheck "OpenGL utilities (GLU)" -+_glu=no -+if test "$_gl" = yes; then -+ cat > $TMPC << EOF -+#include -+int main(void) { -+ gluPerspective(0.0, 0.0, 0.0, 0.0); -+ return 0; -+} -+EOF -+ cc_check -lGLU && _glu=yes -+fi -+if test "$_glu" = yes; then -+ libs_mplayer="$libs_mplayer -lGLU" -+fi -+echores "$_glu" -+ - - echocheck "MatrixView" - if test "$_gl" = no ; then -@@ -5995,6 +6094,52 @@ echores "$_dart" - fi #if os2 - - -+######################### -+# HARDWARE ACCELERATORS # -+######################### -+ -+echocheck "VA-API" -+if test "$_vaapi" = yes -o "$_vaapi" = auto; then -+ _vaapi=no -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplay(0); return 0; } -+EOF -+ cc_check -lva-x11 && _vaapi=yes -+fi -+ -+if test "$_vaapi" = yes ; then -+ def_vaapi='#define CONFIG_VAAPI 1' -+ libs_mencoder="$libs_mencoder -lva" -+ libs_mplayer="$libs_mplayer -lva-x11 -lva" -+ vomodules="vaapi $vomodules" -+else -+ def_vaapi='#define CONFIG_VAAPI 0' -+ novomodules="vaapi $novomodules" -+ _libavhwaccels=`echo $_libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VAAPI_HWACCEL//g"` -+fi -+echores "$_vaapi" -+ -+echocheck "VA-API (with GLX support)" -+if test "$_vaapi" = yes; then -+ _vaapi_glx=no -+ if test "$_gl" = "yes" -a "$_glu" = yes; then -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplayGLX(0); return 0; } -+EOF -+ cc_check -lva-glx && _vaapi_glx=yes -+ fi -+fi -+if test "$_vaapi_glx" = yes; then -+ def_vaapi_glx='#define CONFIG_VAAPI_GLX 1' -+ libs_mplayer="$libs_mplayer -lva-glx" -+else -+ def_vaapi_glx='#define CONFIG_VAAPI_GLX 0' -+fi -+echores "$_vaapi_glx" -+ -+ - # set default CD/DVD devices - if win32 || os2 ; then - default_cdrom_device="D:" -@@ -8677,6 +8822,7 @@ TV_V4L2 = $_tv_v4l2 - TWOLAME=$_twolame - UNRAR_EXEC = $_unrar_exec - V4L2 = $_v4l2 -+VAAPI = $_vaapi - VCD = $_vcd - VDPAU = $_vdpau - VESA = $_vesa -@@ -8774,7 +8920,9 @@ CONFIG_GPL = yes - CONFIG_MLIB = $_mlib - CONFIG_MUXERS = $_mencoder - CONFIG_POSTPROC = yes -+CONFIG_VAAPI = $_vaapi - CONFIG_VDPAU = $_vdpau -+CONFIG_XRENDER = $_xrender - CONFIG_XVMC = $_xvmc - CONFIG_ZLIB = $_zlib - -@@ -8893,6 +9041,7 @@ $def_winsock2_h - - - /* system functions */ -+$def_clock_gettime - $def_gethostbyname2 - $def_gettimeofday - $def_glob -@@ -8924,6 +9073,7 @@ $def_extern_asm - $def_extern_prefix - $def_iconv - $def_kstat -+$def_libgtop - $def_macosx_bundle - $def_macosx_finder - $def_maemo -@@ -9155,6 +9305,8 @@ $def_tdfxfb - $def_tdfxvid - $def_tga - $def_v4l2 -+$def_vaapi -+$def_vaapi_glx - $def_vdpau - $def_vesa - $def_vidix -@@ -9180,6 +9332,7 @@ $def_xf86keysym - $def_xinerama - $def_xmga - $def_xss -+$def_xrender - $def_xv - $def_xvmc - $def_xvr100 -diff --git a/etc/codecs.conf b/etc/codecs.conf -index a8d2ae0..8eece64 100644 ---- a/etc/codecs.conf -+++ b/etc/codecs.conf -@@ -172,6 +172,7 @@ videocodec ffmpeg2 - fourcc slif ; SoftLab MPEG-2 I-frames Codec - driver ffmpeg - dll "mpeg2video" -+ out VAAPI_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -901,6 +902,7 @@ videocodec ffwmv3 - fourcc WMV3,wmv3 - driver ffmpeg - dll wmv3 -+ out VAAPI_WMV3 - out YV12,I420,IYUV - - videocodec ffwmv3vdpau -@@ -918,6 +920,7 @@ videocodec ffvc1 - fourcc vc-1,VC-1 - driver ffmpeg - dll vc1 -+ out VAAPI_VC1 - out YV12,I420,IYUV - - videocodec ffvc1vdpau -@@ -939,6 +942,7 @@ videocodec ffh264 - format 0x10000005 - driver ffmpeg - dll h264 -+ out VAAPI_H264 - out YV12,I420,IYUV - - videocodec ffh264vdpau -@@ -1008,6 +1012,7 @@ videocodec ffodivx - fourcc SIPP ; Samsung SHR-6040 - driver ffmpeg - dll mpeg4 ;opendivx -+ out VAAPI_MPEG4 - out YV12,I420,IYUV - - videocodec ffodivxvdpau -@@ -1577,6 +1582,7 @@ videocodec ffh263 - fourcc VX1K ; Agora Labs VX1000S H263 - driver ffmpeg - dll h263 -+ out VAAPI_H263 - out YV12,I420,IYUV - - videocodec ffzygo -diff --git a/fmt-conversion.c b/fmt-conversion.c -index 9e88100..bd32ce8 100644 ---- a/fmt-conversion.c -+++ b/fmt-conversion.c -@@ -18,12 +18,14 @@ - - #include "mp_msg.h" - #include "libavutil/avutil.h" -+#include "libavcodec/avcodec.h" - #include "libmpcodecs/img_format.h" - #include "fmt-conversion.h" - - static const struct { - int fmt; - enum PixelFormat pix_fmt; -+ enum CodecID codec_id; - } conversion_map[] = { - {IMGFMT_ARGB, PIX_FMT_ARGB}, - {IMGFMT_BGRA, PIX_FMT_BGRA}, -@@ -95,6 +97,17 @@ static const struct { - {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, - {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, - {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, -+ -+ /* VA-API formats */ -+ {IMGFMT_VAAPI_MPEG2, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG2_IDCT,PIX_FMT_VAAPI_IDCT, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG2_MOCO,PIX_FMT_VAAPI_MOCO, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VAAPI_MPEG4, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG4}, -+ {IMGFMT_VAAPI_H263, PIX_FMT_VAAPI_VLD, CODEC_ID_H263}, -+ {IMGFMT_VAAPI_H264, PIX_FMT_VAAPI_VLD, CODEC_ID_H264}, -+ {IMGFMT_VAAPI_WMV3, PIX_FMT_VAAPI_VLD, CODEC_ID_WMV3}, -+ {IMGFMT_VAAPI_VC1, PIX_FMT_VAAPI_VLD, CODEC_ID_VC1}, -+ - {0, PIX_FMT_NONE} - }; - -@@ -111,12 +124,14 @@ enum PixelFormat imgfmt2pixfmt(int fmt) - return pix_fmt; - } - --int pixfmt2imgfmt(enum PixelFormat pix_fmt) -+int pixfmt2imgfmt(enum PixelFormat pix_fmt, int codec_id) - { - int i; - int fmt; - for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++) -- if (conversion_map[i].pix_fmt == pix_fmt) -+ if (conversion_map[i].pix_fmt == pix_fmt && -+ (conversion_map[i].codec_id == 0 || -+ conversion_map[i].codec_id == codec_id)) - break; - fmt = conversion_map[i].fmt; - if (!fmt) -diff --git a/fmt-conversion.h b/fmt-conversion.h -index 9e133a8..962ca4e 100644 ---- a/fmt-conversion.h -+++ b/fmt-conversion.h -@@ -23,6 +23,6 @@ - #include "libavutil/avutil.h" - - enum PixelFormat imgfmt2pixfmt(int fmt); --int pixfmt2imgfmt(enum PixelFormat pix_fmt); -+int pixfmt2imgfmt(enum PixelFormat pix_fmt, int codec_id); - - #endif /* MPLAYER_FMT_CONVERSION_H */ -diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c -index 0a26245..e66e263 100644 ---- a/gui/mplayer/gtk/opts.c -+++ b/gui/mplayer/gtk/opts.c -@@ -66,9 +66,11 @@ static GtkWidget * CLVDrivers; - GtkWidget * prEFontName; - GtkWidget * prEDVDDevice; - GtkWidget * prECDRomDevice; -+static GtkWidget * EVHW; - static GtkWidget * EVFM; - static GtkWidget * EAFM; - -+static GtkWidget * CBVHW; - static GtkWidget * CBVFM; - static GtkWidget * CBAFM; - static GtkWidget * CBAudioEqualizer; -@@ -354,6 +356,26 @@ void ShowPreferences( void ) - // -- 5. page - gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); - if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 ); -+ -+ { -+ int i; -+ GList * Items = NULL; -+ char * name = NULL; -+ -+ Items = g_list_append(Items, MSGTR_PREFERENCES_None); -+ for (i = 0; i < HWACCEL_COUNT; i++) { -+ const char *hwaccel_name = get_video_hwaccel_name(i); -+ if (!hwaccel_name) -+ continue; -+ Items = g_list_append(Items, hwaccel_name); -+ if (video_hwaccel_name && !gstrcmp(video_hwaccel_name, get_video_hwaccel_short_name(i) ) ) name = hwaccel_name; -+ } -+ gtk_combo_set_popdown_strings(GTK_COMBO(CBVHW), Items); -+ g_list_free(Items); -+ if (name) -+ gtk_entry_set_text(GTK_ENTRY(EVHW), name); -+ } -+ - { - int i; - GList * Items = NULL; -@@ -600,6 +622,17 @@ static void prButton( GtkButton * button, gpointer user_data ) - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1; - - { -+ int i; -+ const char *tmp = gtk_entry_get_text(GTK_ENTRY(EVHW)); -+ for (i = 0; i < HWACCEL_COUNT; i++) { -+ if (!gstrcmp(tmp, get_video_hwaccel_name(i))) { -+ video_hwaccel_name = get_video_hwaccel_short_name(i); -+ break; -+ } -+ } -+ } -+ -+ { - int i; - const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); - for( i=0;mpcodecs_vd_drivers[i];i++ ) -@@ -1199,6 +1232,20 @@ GtkWidget * create_Preferences( void ) - - hbox5=AddHBox( vbox602,1 ); - -+ AddLabel( MSGTR_PREFERENCES_VideoHardwareAcceleration,hbox5 ); -+ -+ CBVHW=gtk_combo_new(); -+ gtk_widget_set_name( CBVHW,"CBVHW" ); -+ gtk_widget_show( CBVHW ); -+ gtk_box_pack_start( GTK_BOX( hbox5 ),CBVHW,TRUE,TRUE,0 ); -+ -+ EVHW=GTK_COMBO( CBVHW )->entry; -+ gtk_widget_set_name( EVHW,"CEVHW" ); -+ gtk_entry_set_editable( GTK_ENTRY( EVHW ),FALSE ); -+ gtk_widget_show( EVHW ); -+ -+ hbox5=AddHBox( vbox602,1 ); -+ - AddLabel( MSGTR_PREFERENCES_VideoCodecFamily,hbox5 ); - - CBVFM=gtk_combo_new(); -diff --git a/help/help_mp-en.h b/help/help_mp-en.h -index a112418..121eac9 100644 ---- a/help/help_mp-en.h -+++ b/help/help_mp-en.h -@@ -717,6 +717,7 @@ static const char help_text[]= - #define MSGTR_PREFERENCES_IDX "Rebuild index table, if needed" - #define MSGTR_PREFERENCES_VideoCodecFamily "Video codec family:" - #define MSGTR_PREFERENCES_AudioCodecFamily "Audio codec family:" -+#define MSGTR_PREFERENCES_VideoHardwareAcceleration "Video hardware acceleration:" - #define MSGTR_PREFERENCES_FRAME_OSD_Level "OSD level" - #define MSGTR_PREFERENCES_FRAME_Subtitle "Subtitle" - #define MSGTR_PREFERENCES_FRAME_Font "Font" -@@ -1653,6 +1654,7 @@ static const char help_text[]= - #define MSGTR_MPCODECS_UnexpectedInitVoError "[VD_FFMPEG] Unexpected init_vo error.\n" - #define MSGTR_MPCODECS_UnrecoverableErrorRenderBuffersNotTaken "[VD_FFMPEG] Unrecoverable error, render buffers not taken.\n" - #define MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed "[VD_FFMPEG] Only buffers allocated by vo_xvmc allowed.\n" -+#define MSGTR_MPCODECS_VAAPIAcceleratedCodec "[VD_FFMPEG] VA API accelerated codec.\n" - - // libmpcodecs/ve_lavc.c - #define MSGTR_MPCODECS_HighQualityEncodingSelected "[VE_LAVC] High quality encoding selected (non-realtime)!\n" -diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c -index 1dd6e42..ce9facc 100644 ---- a/libmpcodecs/dec_video.c -+++ b/libmpcodecs/dec_video.c -@@ -56,9 +56,47 @@ extern double vout_time_usage; - int field_dominance = -1; - - int divx_quality = 0; -+char *video_hwaccel_name=NULL; - - const vd_functions_t *mpvdec = NULL; - -+int get_video_hwaccel(void) -+{ -+ static int video_hwaccel = -1; -+ if (video_hwaccel < 0) { -+ video_hwaccel = HWACCEL_NONE; -+ if (video_hwaccel_name) { -+ if (!strcmp(video_hwaccel_name,"xvmc")) -+ video_hwaccel = HWACCEL_XVMC; -+ else if (!strcmp(video_hwaccel_name,"vaapi")) -+ video_hwaccel = HWACCEL_VAAPI; -+ else if (!strcmp(video_hwaccel_name,"vdpau")) -+ video_hwaccel = HWACCEL_VDPAU; -+ } -+ } -+ return video_hwaccel; -+} -+ -+const char *get_video_hwaccel_name(int hwaccel) -+{ -+ switch (hwaccel) { -+ case HWACCEL_XVMC: return "XvMC"; -+ case HWACCEL_VAAPI: return "VA API"; -+ case HWACCEL_VDPAU: return "VDPAU"; -+ } -+ return NULL; -+} -+ -+const char *get_video_hwaccel_short_name(int hwaccel) -+{ -+ switch (hwaccel) { -+ case HWACCEL_XVMC: return "xvmc"; -+ case HWACCEL_VAAPI: return "vaapi"; -+ case HWACCEL_VDPAU: return "vdpau"; -+ } -+ return NULL; -+} -+ - int get_video_quality_max(sh_video_t *sh_video) - { - vf_instance_t *vf = sh_video->vfilter; -diff --git a/libmpcodecs/dec_video.h b/libmpcodecs/dec_video.h -index 04fc8f4..a9bedb0 100644 ---- a/libmpcodecs/dec_video.h -+++ b/libmpcodecs/dec_video.h -@@ -21,6 +21,14 @@ - - #include "libmpdemux/stheader.h" - -+enum { -+ HWACCEL_NONE = 0, -+ HWACCEL_XVMC, -+ HWACCEL_VAAPI, -+ HWACCEL_VDPAU, -+ HWACCEL_COUNT -+}; -+ - // dec_video.c: - void vfm_help(void); - -@@ -41,6 +49,11 @@ int set_rectangle(sh_video_t *sh_video, int param, int value); - void resync_video_stream(sh_video_t *sh_video); - int get_current_video_decoder_lag(sh_video_t *sh_video); - -+int get_video_hwaccel(void); -+const char *get_video_hwaccel_name(int hwaccel); -+const char *get_video_hwaccel_short_name(int hwaccel); -+ - extern int divx_quality; -+extern char *video_hwaccel_name; - - #endif /* MPLAYER_DEC_VIDEO_H */ -diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c -index bdf4d2f..65f0bd1 100644 ---- a/libmpcodecs/img_format.c -+++ b/libmpcodecs/img_format.c -@@ -96,6 +96,14 @@ const char *vo_format_name(int format) - case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first"; - case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation"; - case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT"; -+ case IMGFMT_VAAPI_MPEG2: return "MPEG-2 VA-API Acceleration"; -+ case IMGFMT_VAAPI_MPEG2_IDCT: return "MPEG-2 VA-API Acceleration (Motion Compensation and IDCT)"; -+ case IMGFMT_VAAPI_MPEG2_MOCO: return "MPEG-2 VA-API Acceleration (Motion Compensation)"; -+ case IMGFMT_VAAPI_MPEG4: return "MPEG-4 VA-API Acceleration"; -+ case IMGFMT_VAAPI_H263: return "H.263 VA-API Acceleration"; -+ case IMGFMT_VAAPI_H264: return "H.264 VA-API Acceleration"; -+ case IMGFMT_VAAPI_WMV3: return "WMV3 VA-API Acceleration"; -+ case IMGFMT_VAAPI_VC1: return "VC-1 VA-API Acceleration"; - case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration"; - case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration"; - case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration"; -diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h -index e580082..d0aaa45 100644 ---- a/libmpcodecs/img_format.h -+++ b/libmpcodecs/img_format.h -@@ -182,6 +182,26 @@ - #define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02) - #define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82) - -+/* VA-API Formats */ -+ -+#define IMGFMT_VAAPI 0x56410000 /* 'VA'00 */ -+#define IMGFMT_VAAPI_MASK 0xFFFF0000 -+#define IMGFMT_IS_VAAPI(fmt) (((fmt) & IMGFMT_VAAPI_MASK) == IMGFMT_VAAPI) -+#define IMGFMT_VAAPI_CODEC_MASK 0x000000F0 -+#define IMGFMT_VAAPI_CODEC(fmt) ((fmt) & IMGFMT_VAAPI_CODEC_MASK) -+#define IMGFMT_VAAPI_CODEC_MPEG2 (0x10) -+#define IMGFMT_VAAPI_CODEC_MPEG4 (0x20) -+#define IMGFMT_VAAPI_CODEC_H264 (0x30) -+#define IMGFMT_VAAPI_CODEC_VC1 (0x40) -+#define IMGFMT_VAAPI_MPEG2 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2) -+#define IMGFMT_VAAPI_MPEG2_IDCT (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2|1) -+#define IMGFMT_VAAPI_MPEG2_MOCO (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG2|2) -+#define IMGFMT_VAAPI_MPEG4 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG4) -+#define IMGFMT_VAAPI_H263 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_MPEG4|1) -+#define IMGFMT_VAAPI_H264 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_H264) -+#define IMGFMT_VAAPI_VC1 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_VC1) -+#define IMGFMT_VAAPI_WMV3 (IMGFMT_VAAPI|IMGFMT_VAAPI_CODEC_VC1|1) -+ - // VDPAU specific format. - #define IMGFMT_VDPAU 0x1DC80000 - #define IMGFMT_VDPAU_MASK 0xFFFF0000 -diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c -index f239181..35438c9 100644 ---- a/libmpcodecs/mp_image.c -+++ b/libmpcodecs/mp_image.c -@@ -101,6 +101,7 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ - // compressed formats - if(out_fmt == IMGFMT_MPEGPES || - out_fmt == IMGFMT_ZRMJPEGNI || out_fmt == IMGFMT_ZRMJPEGIT || out_fmt == IMGFMT_ZRMJPEGIB || -+ IMGFMT_IS_VAAPI(out_fmt) || - IMGFMT_IS_VDPAU(out_fmt) || IMGFMT_IS_XVMC(out_fmt)){ - mpi->bpp=0; - return; -diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c -index ea6b6b2..dad5eb6 100644 ---- a/libmpcodecs/vd.c -+++ b/libmpcodecs/vd.c -@@ -403,3 +403,12 @@ void mpcodecs_draw_slice(sh_video_t *sh, unsigned char **src, int *stride, - if (vf->draw_slice) - vf->draw_slice(vf, src, stride, w, h, x, y); - } -+ -+void *mpcodecs_get_hwaccel_context(sh_video_t *sh) -+{ -+ void *ctx = NULL; -+ struct vf_instance *vf = sh->vfilter; -+ if (vf->control(vf, VFCTRL_GET_HWACCEL_CONTEXT, &ctx) == CONTROL_TRUE) -+ return ctx; -+ return NULL; -+} -diff --git a/libmpcodecs/vd.h b/libmpcodecs/vd.h -index 8f7c238..e655d60 100644 ---- a/libmpcodecs/vd.h -+++ b/libmpcodecs/vd.h -@@ -64,6 +64,7 @@ extern const m_option_t xvid_dec_opts[]; - int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt); - mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); - void mpcodecs_draw_slice(sh_video_t *sh, unsigned char** src, int* stride, int w,int h, int x, int y); -+void *mpcodecs_get_hwaccel_context(sh_video_t *sh); - - #define VDFLAGS_DROPFRAME 3 - -diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c -index 38f1fbd..5b003fa 100644 ---- a/libmpcodecs/vd_ffmpeg.c -+++ b/libmpcodecs/vd_ffmpeg.c -@@ -32,6 +32,7 @@ - #include "fmt-conversion.h" - - #include "vd_internal.h" -+#include "dec_video.h" - - static const vd_info_t info = { - "FFmpeg's libavcodec codec family", -@@ -228,8 +229,8 @@ static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt - int imgfmt; - if (fmt == PIX_FMT_NONE) - return; -- imgfmt = pixfmt2imgfmt(fmt); -- if (IMGFMT_IS_XVMC(imgfmt) || IMGFMT_IS_VDPAU(imgfmt)) { -+ imgfmt = pixfmt2imgfmt(fmt, avctx->codec_id); -+ if (IMGFMT_IS_XVMC(imgfmt) || IMGFMT_IS_VDPAU(imgfmt) || IMGFMT_IS_VAAPI(imgfmt)) { - sh_video_t *sh = avctx->opaque; - vd_ffmpeg_ctx *ctx = sh->context; - ctx->do_dr1 = 1; -@@ -286,6 +287,12 @@ static int init(sh_video_t *sh){ - avctx->codec_type = CODEC_TYPE_VIDEO; - avctx->codec_id = lavc_codec->id; - -+#if CONFIG_VAAPI -+ if(get_video_hwaccel() == HWACCEL_VAAPI){ -+ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_VAAPIAcceleratedCodec); -+ avctx->get_format = get_format; -+ } -+#endif /* CONFIG_VAAPI */ - #if CONFIG_VDPAU - if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ - avctx->get_format = get_format; -@@ -479,7 +486,7 @@ static void draw_slice(struct AVCodecContext *s, - const AVFrame *src, int offset[4], - int y, int type, int height){ - sh_video_t *sh = s->opaque; -- uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]}; -+ uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2], src->data[3] + offset[3]}; - int strides[MP_MAX_PLANES] = {src->linesize[0], src->linesize[1], src->linesize[2]}; - #if 0 - int start=0, i; -@@ -558,9 +565,10 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ - sh->disp_w = width; - sh->disp_h = height; - ctx->pix_fmt = pix_fmt; -- ctx->best_csp = pixfmt2imgfmt(pix_fmt); -+ ctx->best_csp = pixfmt2imgfmt(pix_fmt, avctx->codec_id); - if (!mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, ctx->best_csp)) - return -1; -+ avctx->hwaccel_context = mpcodecs_get_hwaccel_context(sh); - ctx->vo_initialized = 1; - } - return 0; -@@ -611,7 +619,9 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ - return avctx->get_buffer(avctx, pic); - } - -- if (IMGFMT_IS_XVMC(ctx->best_csp) || IMGFMT_IS_VDPAU(ctx->best_csp)) { -+ if (IMGFMT_IS_XVMC(ctx->best_csp) || -+ IMGFMT_IS_VAAPI(ctx->best_csp) || -+ IMGFMT_IS_VDPAU(ctx->best_csp)) { - type = MP_IMGTYPE_NUMBERED | (0xffff << 16); - } else - if (!pic->buffer_hints) { -@@ -643,6 +653,11 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ - avctx->draw_horiz_band= draw_slice; - } else - avctx->draw_horiz_band= NULL; -+#if CONFIG_VAAPI -+ if(IMGFMT_IS_VAAPI(mpi->imgfmt)) { -+ avctx->draw_horiz_band= draw_slice; -+ } -+#endif - if(IMGFMT_IS_VDPAU(mpi->imgfmt)) { - avctx->draw_horiz_band= draw_slice; - } -@@ -955,24 +970,62 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ - return mpi; - } - --#if CONFIG_XVMC || CONFIG_VDPAU -+#if CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU -+static inline int is_hwaccel_format(int imgfmt) -+{ -+ switch (get_video_hwaccel()) { -+ case HWACCEL_VAAPI: return IMGFMT_IS_VAAPI(imgfmt) != 0; -+ case HWACCEL_VDPAU: return IMGFMT_IS_VDPAU(imgfmt) != 0; -+ case HWACCEL_XVMC: return IMGFMT_IS_XVMC(imgfmt) != 0; -+ } -+ return 0; -+} -+ -+static int query_format(sh_video_t *sh, int fmt) -+{ -+ vd_ffmpeg_ctx * const ctx = sh->context; -+ AVCodecContext * const avctx = ctx->avctx; -+ int r, width, height; -+ /* XXX: some codecs have not initialized width and height yet at -+ this point, so we are faking the dimensions so that init_vo() -+ doesn't fail because of 0x0 size */ -+ if ((width = avctx->width) == 0) -+ avctx->width = 64; -+ if ((height = avctx->height) == 0) -+ avctx->height = 64; -+ r = init_vo(sh, fmt); -+ avctx->width = width; -+ avctx->height = height; -+ return r; -+} -+ - static enum PixelFormat get_format(struct AVCodecContext *avctx, -- const enum PixelFormat *fmt){ -- enum PixelFormat selected_format; -+ const enum PixelFormat *fmt){ -+ enum PixelFormat selected_format = PIX_FMT_NONE; - int imgfmt; - sh_video_t *sh = avctx->opaque; -- int i; -- -- for(i=0;fmt[i]!=PIX_FMT_NONE;i++){ -- imgfmt = pixfmt2imgfmt(fmt[i]); -- if(!IMGFMT_IS_XVMC(imgfmt) && !IMGFMT_IS_VDPAU(imgfmt)) continue; -- mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); -- if(init_vo(sh, fmt[i]) >= 0) { -- break; -+ int i, try_hwaccel; -+ -+ for (try_hwaccel = 1; try_hwaccel >= 0; --try_hwaccel) { -+ for (i = 0; fmt[i] != PIX_FMT_NONE; i++){ -+ imgfmt = pixfmt2imgfmt(fmt[i], avctx->codec_id); -+ if ((try_hwaccel ^ is_hwaccel_format(imgfmt)) != 0) -+ continue; -+ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); -+ if (query_format(sh, fmt[i]) >= 0) { -+ if (try_hwaccel) { -+ /* don't allow format conversion for HW acceleration */ -+ if (sh->codec->outfmt[sh->outfmtidx] != imgfmt) -+ continue; -+ } -+ selected_format = fmt[i]; -+ break; -+ } - } -+ if (selected_format != PIX_FMT_NONE) -+ break; - } -- selected_format = fmt[i]; - set_format_params(avctx, selected_format); - return selected_format; - } --#endif /* CONFIG_XVMC || CONFIG_VDPAU */ -+#endif /* CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU */ -diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h -index 945fbc1..44e308a 100644 ---- a/libmpcodecs/vf.h -+++ b/libmpcodecs/vf.h -@@ -111,6 +111,7 @@ typedef struct vf_seteq_s - #define VFCTRL_GET_PTS 17 /* Return last pts value that reached vf_vo*/ - #define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */ - #define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */ -+#define VFCTRL_GET_HWACCEL_CONTEXT 20 /* Get HW accelerator context */ - - #include "vfcap.h" - -diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c -index 061a34b..a11c2b7 100644 ---- a/libmpcodecs/vf_vo.c -+++ b/libmpcodecs/vf_vo.c -@@ -170,6 +170,12 @@ static int control(struct vf_instance *vf, int request, void* data) - *(double *)data = vf->priv->pts; - return CONTROL_TRUE; - } -+ case VFCTRL_GET_HWACCEL_CONTEXT: -+ { -+ if(!video_out) return CONTROL_FALSE; // vo not configured? -+ return(video_out->control(VOCTRL_GET_HWACCEL_CONTEXT, data) -+ == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE; -+ } - } - // return video_out->control(request,data); - return CONTROL_UNKNOWN; -@@ -189,6 +195,7 @@ static void get_image(struct vf_instance *vf, - if(!vo_config_count) return; - // GET_IMAGE is required for hardware-accelerated formats - if(vo_directrendering || -+ IMGFMT_IS_VAAPI(mpi->imgfmt) || - IMGFMT_IS_XVMC(mpi->imgfmt) || IMGFMT_IS_VDPAU(mpi->imgfmt)) - video_out->control(VOCTRL_GET_IMAGE,mpi); - } -diff --git a/libvo/gl_common.c b/libvo/gl_common.c -index 9862dd9..638bd78 100644 ---- a/libvo/gl_common.c -+++ b/libvo/gl_common.c -@@ -140,6 +140,11 @@ void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, fl - void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); - /** \} */ // end of glextfunctions group - -+void (GLAPIENTRY *mpglXBindTexImage)(Display *, GLXDrawable, int, const int *); -+void (GLAPIENTRY *mpglXReleaseTexImage)(Display *, GLXDrawable, int); -+GLXPixmap (GLAPIENTRY *mpglXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *); -+void (GLAPIENTRY *mpglXDestroyPixmap)(Display *, GLXPixmap); -+ - //! \defgroup glgeneral OpenGL general helper functions - - //! \defgroup glcontext OpenGL context management helper functions -@@ -469,6 +474,10 @@ static const extfunc_desc_t extfuncs[] = { - {&mpglTexImage3D, NULL, {"glTexImage3D", NULL}}, - {&mpglAllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}}, - {&mpglFreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}}, -+ {&mpglXBindTexImage, "GLX_EXT_texture_from_pixmap", {"glXBindTexImageEXT", NULL}}, -+ {&mpglXReleaseTexImage, "GLX_EXT_texture_from_pixmap", {"glXReleaseTexImageEXT", NULL}}, -+ {&mpglXCreatePixmap, "GLX_EXT_texture_from_pixmap", {"glXCreatePixmap", NULL}}, -+ {&mpglXDestroyPixmap, "GLX_EXT_texture_from_pixmap", {"glXDestroyPixmap", NULL}}, - {NULL} - }; - -diff --git a/libvo/gl_common.h b/libvo/gl_common.h -index c4fb9bd..5614ac7 100644 ---- a/libvo/gl_common.h -+++ b/libvo/gl_common.h -@@ -507,4 +507,9 @@ extern void (GLAPIENTRY *mpglTexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei - extern void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, float); - extern void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); - -+extern void (GLAPIENTRY *mpglXBindTexImage)(Display *, GLXDrawable, int, const int *); -+extern void (GLAPIENTRY *mpglXReleaseTexImage)(Display *, GLXDrawable, int); -+extern GLXPixmap (GLAPIENTRY *mpglXCreatePixmap)(Display *, GLXFBConfig, Pixmap, const int *); -+extern void (GLAPIENTRY *mpglXDestroyPixmap)(Display *, GLXPixmap); -+ - #endif /* MPLAYER_GL_COMMON_H */ -diff --git a/libvo/stats.c b/libvo/stats.c -new file mode 100644 -index 0000000..c4ff0ca ---- /dev/null -+++ b/libvo/stats.c -@@ -0,0 +1,217 @@ -+#include "config.h" -+#include "stats.h" -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if CONFIG_LIBGTOP -+#include -+#include -+#include -+#endif -+ -+// Process statistics -+struct proc_stats { -+ uint64_t utime; -+ uint64_t stime; -+ uint64_t cutime; -+ uint64_t cstime; -+ uint64_t frequency; -+ uint64_t cpu_time; -+ uint64_t start_time; -+ uint64_t current_time; -+}; -+ -+// Get current process stats -+static int get_proc_stats(struct proc_stats *pstats); -+ -+void stats_init(void) -+{ -+#if CONFIG_LIBGTOP -+ glibtop_init(); -+#endif -+} -+ -+void stats_exit(void) -+{ -+#if CONFIG_LIBGTOP -+ glibtop_close(); -+#endif -+} -+ -+// Get CPU frequency -+unsigned int get_cpu_frequency(void) -+{ -+ unsigned int freq = 0; -+#if defined __linux__ -+ { -+ FILE *proc_file = fopen("/proc/cpuinfo", "r"); -+ if (proc_file) { -+ char line[256]; -+ char *old_locale = setlocale(LC_NUMERIC, NULL); -+ setlocale(LC_NUMERIC, "C"); -+ while(fgets(line, sizeof(line), proc_file)) { -+ float f; -+ int len = strlen(line); -+ if (len == 0) -+ continue; -+ line[len - 1] = 0; -+ if (sscanf(line, "cpu MHz : %f", &f) == 1) -+ freq = (unsigned int)f; -+ } -+ setlocale(LC_NUMERIC, old_locale); -+ fclose(proc_file); -+ } -+ } -+#endif -+ return freq; -+} -+ -+// Get CPU usage in percent -+static float get_cpu_usage_1(void) -+{ -+ static struct proc_stats prev_stats; -+ struct proc_stats curr_stats; -+ uint64_t prev_proc_time = 0, curr_proc_time = 0; -+ float pcpu = 0.0f; -+ -+ if (get_proc_stats(&curr_stats) == 0) { -+ prev_proc_time += prev_stats.utime; -+ prev_proc_time += prev_stats.stime; -+ prev_proc_time += prev_stats.cutime; -+ prev_proc_time += prev_stats.cstime; -+ curr_proc_time += curr_stats.utime; -+ curr_proc_time += curr_stats.stime; -+ curr_proc_time += curr_stats.cutime; -+ curr_proc_time += curr_stats.cstime; -+ if (prev_stats.start_time > 0) -+ pcpu = 100.0 * ((float)(curr_proc_time - prev_proc_time) / -+ (float)(curr_stats.cpu_time - prev_stats.cpu_time)); -+ prev_stats = curr_stats; -+ } -+ return pcpu; -+} -+ -+float get_cpu_usage(enum CpuUsageType type) -+{ -+ static float pcpu_total = 0.0; -+ static unsigned int n_samples; -+ float pcpu; -+ -+ pcpu = get_cpu_usage_1(); -+ pcpu_total += pcpu / 100.0; -+ ++n_samples; -+ -+ if (type == CPU_USAGE_AVERAGE) -+ pcpu = 100.0 * (pcpu_total / n_samples); -+ return pcpu; -+} -+ -+// For ELF executable, notes are pushed before environment and args -+static int find_elf_note(unsigned long match, unsigned long *pval) -+{ -+ unsigned long *ep = (unsigned long *)__environ; -+ while (*ep++); -+ for (; *ep != 0; ep += 2) { -+ if (ep[0] == match) { -+ *pval = ep[1]; -+ return 0; -+ } -+ } -+ return -1; -+} -+ -+#ifndef AT_CLKTCK -+#define AT_CLKTCK 17 -+#endif -+ -+// Get current process stats -+int get_proc_stats(struct proc_stats *pstats) -+{ -+ int error = -1; -+ char line[256], *str, *end; -+ char vc; -+ int vi; -+ unsigned long vul; -+ unsigned long long vull; -+ float vf; -+#if defined __linux__ -+ { -+ FILE *proc_file = fopen("/proc/self/stat", "r"); -+ if (proc_file) { -+ if (fgets(line, sizeof(line), proc_file)) { -+ unsigned long utime, stime, cutime, cstime, start_time; -+ str = strrchr(line, ')'); -+ if (str && sscanf(str + 2, -+ "%c " -+ "%d %d %d %d %d " -+ "%lu %lu %lu %lu %lu %lu %lu " -+ "%ld %ld %ld %ld %ld %ld " -+ "%lu %lu ", -+ &vc, -+ &vi, &vi, &vi, &vi, &vi, -+ &vul, &vul, &vul, &vul, &vul, &utime, &stime, -+ &cutime, &cstime, &vul, &vul, &vul, &vul, -+ &start_time, &vul) == 21) { -+ pstats->utime = utime; -+ pstats->stime = stime; -+ pstats->cutime = cutime; -+ pstats->cstime = cstime; -+ pstats->start_time = start_time; -+ error = 0; -+ } -+ } -+ fclose(proc_file); -+ } -+ if (error) -+ return error; -+ error = -1; -+ -+ if (find_elf_note(AT_CLKTCK, &vul) == 0) { -+ pstats->frequency = vul; -+ error = 0; -+ } -+ if (error) -+ return error; -+ error = -1; -+ -+ proc_file = fopen("/proc/uptime", "r"); -+ if (proc_file) { -+ if (fgets(line, sizeof(line), proc_file)) { -+ char *old_locale = setlocale(LC_NUMERIC, NULL); -+ setlocale(LC_NUMERIC, "C"); -+ if (sscanf(line, "%f", &vf) == 1) { -+ pstats->cpu_time = (uint64_t)(vf * (float)pstats->frequency); -+ error = 0; -+ } -+ setlocale(LC_NUMERIC, old_locale); -+ } -+ fclose(proc_file); -+ } -+ } -+#elif CONFIG_LIBGTOP -+ { -+ glibtop_cpu cpu; -+ glibtop_proc_time proc_time; -+ glibtop_proc_state proc_state; -+ -+ glibtop_get_cpu(&cpu); -+ glibtop_get_proc_state(&proc_state, getpid()); -+ pstats->cpu_time = cpu.xcpu_total[proc_state.processor]; -+ -+ glibtop_get_proc_time(&proc_time, getpid()); -+ pstats->utime = proc_time.utime; -+ pstats->stime = proc_time.stime; -+ pstats->cutime = proc_time.cutime; -+ pstats->cstime = proc_time.cstime; -+ pstats->start_time = proc_time.start_time; -+ pstats->frequency = proc_time.frequency; -+ -+ error = 0; -+ } -+#endif -+ return error; -+} -diff --git a/libvo/stats.h b/libvo/stats.h -new file mode 100644 -index 0000000..62e7412 ---- /dev/null -+++ b/libvo/stats.h -@@ -0,0 +1,21 @@ -+#ifndef MPLAYER_STATS_H -+#define MPLAYER_STATS_H -+ -+#include -+ -+void stats_init(void); -+void stats_exit(void); -+ -+/// CPU usage model -+enum CpuUsageType { -+ CPU_USAGE_QUANTUM = 1, ///< CPU usage since the last call to cpu_get_usage() -+ CPU_USAGE_AVERAGE ///< CPU usage average'd since program start -+}; -+ -+/// Get CPU frequency -+unsigned int get_cpu_frequency(void); -+ -+/// Get CPU usage in percent -+float get_cpu_usage(enum CpuUsageType type); -+ -+#endif /* MPLAYER_STATS_H */ -diff --git a/libvo/video_out.c b/libvo/video_out.c -index 0318867..3373475 100644 ---- a/libvo/video_out.c -+++ b/libvo/video_out.c -@@ -95,6 +95,7 @@ extern const vo_functions_t video_out_xmga; - extern const vo_functions_t video_out_x11; - extern vo_functions_t video_out_xover; - extern const vo_functions_t video_out_xvmc; -+extern const vo_functions_t video_out_vaapi; - extern const vo_functions_t video_out_vdpau; - extern const vo_functions_t video_out_xv; - extern const vo_functions_t video_out_gl_nosw; -@@ -290,6 +291,9 @@ const vo_functions_t* const video_out_drivers[] = - #ifdef CONFIG_MD5SUM - &video_out_md5sum, - #endif -+#if CONFIG_VAAPI -+ &video_out_vaapi, -+#endif - NULL - }; - -diff --git a/libvo/video_out.h b/libvo/video_out.h -index 5e64b0e..785c6d2 100644 ---- a/libvo/video_out.h -+++ b/libvo/video_out.h -@@ -99,6 +99,10 @@ typedef struct { - int w,h; - } mp_win_t; - -+// Return current HW acceleration context -+// void *get_hwaccel_context(void); -+#define VOCTRL_GET_HWACCEL_CONTEXT 33 -+ - #define VO_TRUE 1 - #define VO_FALSE 0 - #define VO_ERROR -1 -diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c -new file mode 100644 -index 0000000..c888656 ---- /dev/null -+++ b/libvo/vo_vaapi.c -@@ -0,0 +1,2667 @@ -+/* -+ * VA API output module -+ * -+ * Copyright (C) 2008-2009 Splitted-Desktop Systems -+ * -+ * This file is part of MPlayer. -+ * -+ * MPlayer is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * MPlayer is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with MPlayer; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#include "config.h" -+#include "mp_msg.h" -+#include "help_mp.h" -+#include "subopt-helper.h" -+#include "video_out.h" -+#include "video_out_internal.h" -+#include "fastmemcpy.h" -+#include "sub.h" -+#include "x11_common.h" -+#include "libavutil/common.h" -+#include "libavcodec/vaapi.h" -+#include "gui/interface.h" -+#include "stats.h" -+#include "libass/ass_mp.h" -+#include -+ -+#if CONFIG_GL -+#include "gl_common.h" -+#include -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#if CONFIG_VAAPI_GLX -+#include -+#endif -+ -+#if CONFIG_XRENDER -+#include -+#endif -+ -+/* Compatibility glue with VA-API >= 0.30 */ -+#ifndef VA_INVALID_ID -+#define VA_INVALID_ID 0xffffffff -+#endif -+#ifndef VA_FOURCC -+#define VA_FOURCC(ch0, ch1, ch2, ch3) \ -+ ((uint32_t)(uint8_t)(ch0) | \ -+ ((uint32_t)(uint8_t)(ch1) << 8) | \ -+ ((uint32_t)(uint8_t)(ch2) << 16) | \ -+ ((uint32_t)(uint8_t)(ch3) << 24 )) -+#endif -+#if defined VA_SRC_BT601 && defined VA_SRC_BT709 -+#define USE_VAAPI_COLORSPACE 1 -+#else -+#define USE_VAAPI_COLORSPACE 0 -+#endif -+ -+/* Defined to 1 if IA44/AI44 subpicture formats are allowed */ -+/* XXX: they are not visually attractive... */ -+#define USE_VAAPI_IA44_FORMATS 0 -+ -+/* Defined to 1 if VA/GLX 'bind' API is available */ -+#define USE_VAAPI_GLX_BIND \ -+ (VA_MAJOR_VERSION == 0 && \ -+ ((VA_MINOR_VERSION == 30 && \ -+ VA_MICRO_VERSION == 4 && VA_SDS_VERSION >= 5) || \ -+ (VA_MINOR_VERSION == 31 && \ -+ VA_MICRO_VERSION == 0 && VA_SDS_VERSION < 5))) -+ -+/* Compatibility glue with VA-API >= 0.31 */ -+#if defined VA_CHECK_VERSION -+#if VA_CHECK_VERSION(0,31,0) -+#define vaPutImage2 vaPutImage -+#define vaAssociateSubpicture2 vaAssociateSubpicture -+#endif -+#endif -+ -+static vo_info_t info = { -+ "VA API with X11", -+ "vaapi", -+ "Gwenole Beauchesne ", -+ "" -+}; -+ -+const LIBVO_EXTERN(vaapi) -+ -+/* Numbers of video surfaces */ -+#define MAX_OUTPUT_SURFACES 2 /* Maintain synchronisation points in flip_page() */ -+#define MAX_VIDEO_SURFACES 21 /* Maintain free surfaces in a queue (use least-recently-used) */ -+#define NUM_VIDEO_SURFACES_MPEG2 3 /* 1 decode frame, up to 2 references */ -+#define NUM_VIDEO_SURFACES_MPEG4 3 /* 1 decode frame, up to 2 references */ -+#define NUM_VIDEO_SURFACES_H264 21 /* 1 decode frame, up to 20 references */ -+#define NUM_VIDEO_SURFACES_VC1 3 /* 1 decode frame, up to 2 references */ -+ -+static void ensure_osd(void); -+static int reset_xrender_specific(void); -+ -+typedef void (*draw_alpha_func)(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride); -+ -+typedef void (*eosd_draw_alpha_func)(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color); -+ -+struct vaapi_surface { -+ VASurfaceID id; -+ VAImage image; -+ int is_bound; /* Flag: image bound to the surface? */ -+}; -+ -+struct vaapi_equalizer { -+ VADisplayAttribute brightness; -+ VADisplayAttribute contrast; -+ VADisplayAttribute hue; -+ VADisplayAttribute saturation; -+}; -+ -+static int g_is_visible; -+static int g_is_paused; -+static uint32_t g_image_width; -+static uint32_t g_image_height; -+static uint32_t g_image_format; -+static uint32_t g_image_fields; -+static Pixmap g_image_pixmap; -+static struct vo_rect g_output_rect; -+static struct vaapi_surface *g_output_surfaces[MAX_OUTPUT_SURFACES]; -+static unsigned int g_output_surface; -+static int g_deint; -+static int g_deint_type; -+static int g_colorspace; -+ -+static int gl_enabled; -+static int gl_use_tfp; -+#if CONFIG_GL -+static MPGLContext gl_context; -+static int gl_binding; -+static int gl_reflect; -+static int gl_finish; -+static GLuint gl_texture; -+static GLuint gl_font_base; -+static Pixmap gl_pixmap; -+static int gl_visual_attr[] = { -+ GLX_RGBA, -+ GLX_RED_SIZE, 1, -+ GLX_GREEN_SIZE, 1, -+ GLX_BLUE_SIZE, 1, -+ GLX_DOUBLEBUFFER, -+ GL_NONE -+}; -+#endif -+ -+#if CONFIG_VAAPI_GLX -+static void *gl_surface; -+#endif -+ -+static int xr_enabled; -+#if CONFIG_XRENDER -+static Pixmap g_image_pixmap; -+static Picture xr_video_picture; -+static Picture xr_window_picture; -+#endif -+ -+static struct vaapi_context *va_context; -+static VAProfile *va_profiles; -+static int va_num_profiles; -+static VAEntrypoint *va_entrypoints; -+static int va_num_entrypoints; -+static VASurfaceID *va_surface_ids; -+static int va_num_surfaces; -+static struct vaapi_surface **va_free_surfaces; -+static int va_free_surfaces_head_index; -+static int va_free_surfaces_tail_index; -+static VAImageFormat *va_image_formats; -+static int va_num_image_formats; -+static VAImageFormat *va_subpic_formats; -+static unsigned int *va_subpic_flags; -+static int va_num_subpic_formats; -+static VAImage va_osd_image; -+static uint8_t *va_osd_image_data; -+static VASubpictureID va_osd_subpicture; -+static int va_osd_associated; -+static draw_alpha_func va_osd_draw_alpha; -+static uint8_t *va_osd_palette; -+static struct vaapi_equalizer va_equalizer; -+static VAImage va_eosd_image; -+static uint8_t *va_eosd_image_data; -+static VASubpictureID va_eosd_subpicture; -+static int va_eosd_associated; -+static eosd_draw_alpha_func va_eosd_draw_alpha; -+ -+///< Flag: direct surface mapping: use mpi->number to select free VA surface? -+static int va_dm; -+ -+///< Flag: gather run-time statistics (CPU usage, frequency) -+static int cpu_stats; -+static unsigned int cpu_frequency; -+static float cpu_usage; -+ -+// X error trap -+static int x11_error_code = 0; -+static int (*old_error_handler)(Display *, XErrorEvent *); -+ -+static int error_handler(Display *dpy, XErrorEvent *error) -+{ -+ x11_error_code = error->error_code; -+ return 0; -+} -+ -+static void x11_trap_errors(void) -+{ -+ x11_error_code = 0; -+ old_error_handler = XSetErrorHandler(error_handler); -+} -+ -+static int x11_untrap_errors(void) -+{ -+ XSetErrorHandler(old_error_handler); -+ return x11_error_code; -+} -+ -+static int check_status(VAStatus status, const char *msg) -+{ -+ if (status != VA_STATUS_SUCCESS) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] %s: %s\n", msg, vaErrorStr(status)); -+ return 0; -+ } -+ return 1; -+} -+ -+static const char *string_of_VAImageFormat(VAImageFormat *imgfmt) -+{ -+ static char str[5]; -+ str[0] = imgfmt->fourcc; -+ str[1] = imgfmt->fourcc >> 8; -+ str[2] = imgfmt->fourcc >> 16; -+ str[3] = imgfmt->fourcc >> 24; -+ str[4] = '\0'; -+ return str; -+} -+ -+static const char *string_of_VAProfile(VAProfile profile) -+{ -+ switch (profile) { -+#define PROFILE(profile) \ -+ case VAProfile##profile: return "VAProfile" #profile -+ PROFILE(MPEG2Simple); -+ PROFILE(MPEG2Main); -+ PROFILE(MPEG4Simple); -+ PROFILE(MPEG4AdvancedSimple); -+ PROFILE(MPEG4Main); -+ PROFILE(H264Baseline); -+ PROFILE(H264Main); -+ PROFILE(H264High); -+ PROFILE(VC1Simple); -+ PROFILE(VC1Main); -+ PROFILE(VC1Advanced); -+#undef PROFILE -+ } -+ return ""; -+} -+ -+static const char *string_of_VAEntrypoint(VAEntrypoint entrypoint) -+{ -+ switch (entrypoint) { -+#define ENTRYPOINT(entrypoint) \ -+ case VAEntrypoint##entrypoint: return "VAEntrypoint" #entrypoint -+ ENTRYPOINT(VLD); -+ ENTRYPOINT(IZZ); -+ ENTRYPOINT(IDCT); -+ ENTRYPOINT(MoComp); -+ ENTRYPOINT(Deblocking); -+#undef ENTRYPOINT -+ } -+ return ""; -+} -+ -+static int has_profile(VAProfile profile) -+{ -+ if (va_profiles && va_num_profiles > 0) { -+ int i; -+ for (i = 0; i < va_num_profiles; i++) { -+ if (va_profiles[i] == profile) -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int VAProfile_from_imgfmt(uint32_t format) -+{ -+ static const int mpeg2_profiles[] = -+ { VAProfileMPEG2Main, VAProfileMPEG2Simple, -1 }; -+ static const int mpeg4_profiles[] = -+ { VAProfileMPEG4Main, VAProfileMPEG4AdvancedSimple, VAProfileMPEG4Simple, -1 }; -+ static const int h264_profiles[] = -+ { VAProfileH264High, VAProfileH264Main, VAProfileH264Baseline, -1 }; -+ static const int wmv3_profiles[] = -+ { VAProfileVC1Main, VAProfileVC1Simple, -1 }; -+ static const int vc1_profiles[] = -+ { VAProfileVC1Advanced, -1 }; -+ -+ const int *profiles = NULL; -+ switch (IMGFMT_VAAPI_CODEC(format)) { -+ case IMGFMT_VAAPI_CODEC_MPEG2: -+ profiles = mpeg2_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_MPEG4: -+ profiles = mpeg4_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_H264: -+ profiles = h264_profiles; -+ break; -+ case IMGFMT_VAAPI_CODEC_VC1: -+ switch (format) { -+ case IMGFMT_VAAPI_WMV3: -+ profiles = wmv3_profiles; -+ break; -+ case IMGFMT_VAAPI_VC1: -+ profiles = vc1_profiles; -+ break; -+ } -+ break; -+ } -+ -+ if (profiles) { -+ for (int i = 0; profiles[i] != -1; i++) { -+ if (has_profile(profiles[i])) -+ return profiles[i]; -+ } -+ } -+ return -1; -+} -+ -+static int has_entrypoint(VAEntrypoint entrypoint) -+{ -+ if (va_entrypoints && va_num_entrypoints > 0) { -+ int i; -+ for (i = 0; i < va_num_entrypoints; i++) { -+ if (va_entrypoints[i] == entrypoint) -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int VAEntrypoint_from_imgfmt(uint32_t format) -+{ -+ int entrypoint = 0; -+ switch (format) { -+ case IMGFMT_VAAPI_MPEG2: -+ case IMGFMT_VAAPI_MPEG4: -+ case IMGFMT_VAAPI_H263: -+ case IMGFMT_VAAPI_H264: -+ case IMGFMT_VAAPI_WMV3: -+ case IMGFMT_VAAPI_VC1: -+ entrypoint = VAEntrypointVLD; -+ break; -+ case IMGFMT_VAAPI_MPEG2_IDCT: -+ entrypoint = VAEntrypointIDCT; -+ break; -+ case IMGFMT_VAAPI_MPEG2_MOCO: -+ entrypoint = VAEntrypointMoComp; -+ break; -+ } -+ -+ if (entrypoint) -+ return has_entrypoint(entrypoint); -+ -+ return -1; -+} -+ -+static VAImageFormat *find_image_format(uint32_t fourcc) -+{ -+ if (va_image_formats && va_num_image_formats > 0) { -+ int i; -+ for (i = 0; i < va_num_image_formats; i++) { -+ if (va_image_formats[i].fourcc == fourcc) -+ return &va_image_formats[i]; -+ } -+ } -+ return NULL; -+} -+ -+static VAImageFormat *VAImageFormat_from_imgfmt(uint32_t format) -+{ -+ uint32_t fourcc = 0; -+ -+ switch (format) { -+ case IMGFMT_NV12: fourcc = VA_FOURCC('N','V','1','2'); break; -+ case IMGFMT_YV12: fourcc = VA_FOURCC('Y','V','1','2'); break; -+ case IMGFMT_I420: fourcc = VA_FOURCC('I','4','2','0'); break; -+ case IMGFMT_IYUV: fourcc = VA_FOURCC('I','Y','U','V'); break; -+ } -+ -+ if (fourcc) -+ return find_image_format(fourcc); -+ -+ return NULL; -+} -+ -+static struct vaapi_surface *alloc_vaapi_surface(unsigned int width, -+ unsigned int height, -+ unsigned int format) -+{ -+ struct vaapi_surface *surface = NULL; -+ struct vaapi_surface **surfaces; -+ VASurfaceID *surface_ids; -+ VAStatus status; -+ -+ surface = calloc(1, sizeof(*surface)); -+ if (!surface) -+ goto error; -+ -+ surfaces = realloc(va_free_surfaces, -+ (1 + va_num_surfaces) * sizeof(surfaces[0])); -+ if (!surfaces) -+ goto error; -+ -+ surface_ids = realloc(va_surface_ids, -+ (1 + va_num_surfaces) * sizeof(surface_ids[0])); -+ if (!surface_ids) -+ goto error; -+ -+ status = vaCreateSurfaces(va_context->display, width, height, format, -+ 1, &surface->id); -+ if (!check_status(status, "vaCreateSurfaces()")) -+ goto error; -+ -+ va_surface_ids = surface_ids; -+ va_surface_ids[va_num_surfaces] = surface->id; -+ va_free_surfaces = surfaces; -+ va_free_surfaces[va_num_surfaces] = surface; -+ surface->image.image_id = VA_INVALID_ID; -+ surface->image.buf = VA_INVALID_ID; -+ ++va_num_surfaces; -+ return surface; -+error: -+ free(surface); -+ return NULL; -+} -+ -+static void resize(void) -+{ -+ struct vo_rect src; -+ -+ calc_src_dst_rects(g_image_width, g_image_height, -+ &src, &g_output_rect, NULL, NULL); -+ -+ ensure_osd(); -+ -+ vo_x11_clearwindow(mDisplay, vo_window); -+ -+#if CONFIG_GL -+#define FOVY 60.0f -+#define ASPECT 1.0f -+#define Z_NEAR 0.1f -+#define Z_FAR 100.0f -+#define Z_CAMERA 0.869f -+ -+ if (gl_enabled) { -+ glViewport(0, 0, vo_dwidth, vo_dheight); -+ glMatrixMode(GL_PROJECTION); -+ glLoadIdentity(); -+ gluPerspective(FOVY, ASPECT, Z_NEAR, Z_FAR); -+ glMatrixMode(GL_MODELVIEW); -+ glLoadIdentity(); -+ -+ glTranslatef(-0.5f, -0.5f, -Z_CAMERA); -+ glScalef(1.0f / (GLfloat)vo_dwidth, -+ -1.0f / (GLfloat)vo_dheight, -+ 1.0f / (GLfloat)vo_dwidth); -+ glTranslatef(0.0f, -1.0f * (GLfloat)vo_dheight, 0.0f); -+ } -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ reset_xrender_specific(); -+#endif -+ -+ if (g_is_visible) -+ flip_page(); -+} -+ -+#if CONFIG_GL -+static int gl_build_font(void) -+{ -+ XFontStruct *fi; -+ -+ gl_font_base = glGenLists(96); -+ -+ fi = XLoadQueryFont(mDisplay, "-adobe-helvetica-medium-r-normal--16-*-*-*-p-*-iso8859-1" ); -+ if (!fi) { -+ fi = XLoadQueryFont(mDisplay, "fixed"); -+ if (!fi) -+ return -1; -+ } -+ -+ glXUseXFont(fi->fid, 32, 96, gl_font_base); -+ XFreeFont(mDisplay, fi); -+ return 0; -+} -+ -+static void gl_printf(const char *format, ...) -+{ -+ va_list args; -+ char *text; -+ int textlen; -+ -+ va_start(args, format); -+ textlen = vsnprintf(NULL, 0, format, args); -+ va_end(args); -+ -+ text = malloc(textlen + 1); -+ if (!text) -+ return; -+ -+ va_start(args, format); -+ vsprintf(text, format, args); -+ va_end(args); -+ -+ glPushAttrib(GL_LIST_BIT); -+ glListBase(gl_font_base - 32); -+ glCallLists(textlen, GL_UNSIGNED_BYTE, text); -+ glPopAttrib(); -+ free(text); -+} -+ -+static void gl_draw_rectangle(int x, int y, int w, int h, unsigned int rgba) -+{ -+ glColor4f((GLfloat)((rgba >> 24) & 0xff) / 255.0, -+ (GLfloat)((rgba >> 16) & 0xff) / 255.0, -+ (GLfloat)((rgba >> 8) & 0xff) / 255.0, -+ (GLfloat)(rgba & 0xff) / 255.0); -+ -+ glTranslatef((GLfloat)x, (GLfloat)y, 0.0f); -+ glBegin(GL_QUADS); -+ { -+ glVertex2i(0, 0); -+ glVertex2i(w, 0); -+ glVertex2i(w, h); -+ glVertex2i(0, h); -+ } -+ glEnd(); -+} -+#endif -+ -+#if CONFIG_XRENDER -+static int init_xrender(void) -+{ -+ int dummy; -+ -+ return XRenderQueryExtension(mDisplay, &dummy, &dummy); -+} -+ -+static void uninit_xrender(void) -+{ -+} -+#endif -+ -+static inline unsigned char *get_osd_image_data(int x0, int y0) -+{ -+ return (va_osd_image_data + -+ va_osd_image.offsets[0] + -+ va_osd_image.pitches[0] * y0 + -+ x0 * ((va_osd_image.format.bits_per_pixel + 7) / 8)); -+} -+ -+static void draw_alpha_rgb32(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride, src += stride, srca += stride) -+ for (x = 0; x < w; x++) { -+ const unsigned char c = src[x]; -+ dst[4*x + 0] = c; -+ dst[4*x + 1] = c; -+ dst[4*x + 2] = c; -+ dst[4*x + 3] = -srca[x]; -+ } -+} -+ -+#if USE_VAAPI_IA44_FORMATS -+static void draw_alpha_IA44(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) -+ dst[x] = (src[y*stride + x] & 0xf0) | (-srca[y*stride + x] >> 4); -+} -+ -+static void draw_alpha_AI44(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) -+ dst[x] = (src[y*stride + x] >> 4) | (-srca[y*stride + x] & 0xf0); -+} -+#endif -+ -+static void draw_alpha_IA88(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) { -+ dst[2*x + 0] = src [y*stride + x]; -+ dst[2*x + 1] = -srca[y*stride + x]; -+ } -+} -+ -+static void draw_alpha_AI88(int x0, int y0, int w, int h, -+ unsigned char *src, unsigned char *srca, -+ int stride) -+{ -+ int x, y; -+ const unsigned int dststride = va_osd_image.pitches[0]; -+ unsigned char *dst = get_osd_image_data(x0, y0); -+ -+ for (y = 0; y < h; y++, dst += dststride) -+ for (x = 0; x < w; x++) { -+ dst[2*x + 0] = -srca[y*stride + x]; -+ dst[2*x + 1] = src [y*stride + x]; -+ } -+} -+ -+///< List of subpicture formats in preferred order -+static const struct { -+ uint32_t format; -+ draw_alpha_func draw_alpha; -+} -+va_osd_info[] = { -+#if USE_VAAPI_IA44_FORMATS -+ { VA_FOURCC('I','A','4','4'), draw_alpha_IA44 }, -+ { VA_FOURCC('A','I','4','4'), draw_alpha_AI44 }, -+#endif -+ { VA_FOURCC('I','A','8','8'), draw_alpha_IA88 }, -+ { VA_FOURCC('A','I','8','8'), draw_alpha_AI88 }, -+ { VA_FOURCC('B','G','R','A'), draw_alpha_rgb32 }, -+ { VA_FOURCC('R','G','B','A'), draw_alpha_rgb32 }, -+ { 0, NULL } -+}; -+ -+static uint8_t *gen_osd_palette(const VAImage *image) -+{ -+ uint8_t *palette; -+ int i, is_rgb; -+ int r_idx = -1, g_idx = -1, b_idx = -1; -+ int y_idx = -1, u_idx = -1, v_idx = -1; -+ int i_idx = -1, a_idx = -1; -+ -+ if (image->num_palette_entries < 1) -+ return NULL; -+ -+ palette = malloc(image->num_palette_entries * image->entry_bytes); -+ if (!palette) -+ return NULL; -+ -+ for (i = 0; i < image->entry_bytes; i++) { -+ switch (image->component_order[i]) { -+ case 'R': r_idx = i; is_rgb = 1; break; -+ case 'G': g_idx = i; is_rgb = 1; break; -+ case 'B': b_idx = i; is_rgb = 1; break; -+ case 'Y': y_idx = i; is_rgb = 0; break; -+ case 'U': u_idx = i; is_rgb = 0; break; -+ case 'V': v_idx = i; is_rgb = 0; break; -+ case 'I': i_idx = i; break; -+ case 'A': a_idx = i; break; -+ } -+ } -+ -+ if (r_idx != -1 && g_idx != -1 && b_idx != -1) { /* RGB format */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + r_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + g_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + b_idx] = i * 0xff / (image->num_palette_entries - 1); -+ } -+ } -+ else if (y_idx != -1 && u_idx != -1 && v_idx != -1) { /* YUV format */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + y_idx] = i * 0xff / (image->num_palette_entries - 1); -+ palette[n + u_idx] = 0x80; -+ palette[n + v_idx] = 0x80; -+ } -+ } -+ else if (i_idx != -1 && a_idx != -1) {/* AYUV format (GMA500 "psb" bug) */ -+ for (i = 0; i < image->num_palette_entries; i++) { -+ const int n = i * image->entry_bytes; -+ palette[n + 0] = 0x80; -+ palette[n + 1] = 0x80; -+ palette[n + 2] = 16 + i * 220 / (image->num_palette_entries - 1); -+ palette[n + 3] = 0; -+ } -+ } -+ else { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not set up subpicture palette\n"); -+ free(palette); -+ palette = NULL; -+ } -+ return palette; -+} -+ -+static void disable_osd(void) -+{ -+ if (!va_osd_associated) -+ return; -+ -+ vaDeassociateSubpicture(va_context->display, -+ va_osd_subpicture, -+ va_surface_ids, va_num_surfaces); -+ -+ va_osd_associated = 0; -+} -+ -+static int enable_osd(void) -+{ -+ VAStatus status; -+ -+ disable_osd(); -+ -+ status = vaAssociateSubpicture2(va_context->display, -+ va_osd_subpicture, -+ va_surface_ids, va_num_surfaces, -+ 0, 0, -+ va_osd_image.width, va_osd_image.height, -+ 0, 0, -+ g_image_width, g_image_height, -+ 0); -+ if (!check_status(status, "vaAssociateSubpicture()")) -+ return -1; -+ -+ va_osd_associated = 1; -+ return 0; -+} -+ -+static void destroy_osd(void) -+{ -+ disable_osd(); -+ -+ if (va_osd_subpicture != VA_INVALID_ID) { -+ vaDestroySubpicture(va_context->display, va_osd_subpicture); -+ va_osd_subpicture = VA_INVALID_ID; -+ } -+ -+ if (va_osd_image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, va_osd_image.image_id); -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_osd_image.width = 0; -+ va_osd_image.height = 0; -+ } -+} -+ -+static void create_osd(void) -+{ -+ VAStatus status; -+ int i, j; -+ -+ for (i = 0; va_osd_info[i].format; i++) { -+ for (j = 0; j < va_num_subpic_formats; j++) -+ if (va_subpic_formats[j].fourcc == va_osd_info[i].format) -+ break; -+ if (j < va_num_subpic_formats && -+ vaCreateImage(va_context->display, &va_subpic_formats[j], -+ g_output_rect.width, g_output_rect.height, -+ &va_osd_image) == VA_STATUS_SUCCESS) { -+ va_osd_palette = gen_osd_palette(&va_osd_image); -+ if (((!va_osd_image.num_palette_entries) ^ (!va_osd_palette)) == 0) -+ break; -+ vaDestroyImage(va_context->display, va_osd_image.image_id); -+ va_osd_image.image_id = VA_INVALID_ID; -+ } -+ } -+ -+ if (va_osd_info[i].format && -+ vaCreateSubpicture(va_context->display, va_osd_image.image_id, -+ &va_osd_subpicture) == VA_STATUS_SUCCESS) { -+ va_osd_draw_alpha = va_osd_info[i].draw_alpha; -+ if (va_osd_palette) { -+ status = vaSetImagePalette(va_context->display, -+ va_osd_image.image_id, va_osd_palette); -+ check_status(status, "vaSetImagePalette()"); -+ } -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using %s surface for OSD\n", -+ string_of_VAImageFormat(&va_osd_image.format)); -+ } -+} -+ -+static void ensure_osd(void) -+{ -+ if (g_output_rect.width == va_osd_image.width && -+ g_output_rect.height == va_osd_image.height) -+ return; -+ -+ destroy_osd(); -+ create_osd(); -+} -+ -+static inline unsigned char *get_eosd_image_data(int x0, int y0) -+{ -+ return (va_eosd_image_data + -+ va_eosd_image.offsets[0] + -+ va_eosd_image.pitches[0] * y0 + -+ x0 * ((va_eosd_image.format.bits_per_pixel + 7) / 8)); -+} -+ -+static void eosd_draw_alpha_bgra(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color) -+{ -+ int x, y; -+ const unsigned int dst_stride = va_eosd_image.pitches[0]; -+ unsigned char *dst = get_eosd_image_data(dst_x, dst_y); -+ const unsigned int r = (color >> 24) & 0xff; -+ const unsigned int g = (color >> 16) & 0xff; -+ const unsigned int b = (color >> 8) & 0xff; -+ const unsigned int a = 0xff - (color & 0xff); -+ -+ for (y = 0; y < src_h; y++, dst += dst_stride, src += src_stride) -+ for (x = 0; x < src_w; x++) { -+ const unsigned int v = src[x]; -+ dst[4*x + 0] = (b * v + dst[4*x + 0] * (0xff - v)) / 255; -+ dst[4*x + 1] = (g * v + dst[4*x + 1] * (0xff - v)) / 255; -+ dst[4*x + 2] = (r * v + dst[4*x + 2] * (0xff - v)) / 255; -+ dst[4*x + 3] = (a * v + dst[4*x + 3] * (0xff - v)) / 255; -+ } -+} -+ -+static void eosd_draw_alpha_rgba(unsigned char *src, -+ int src_w, int src_h, int src_stride, -+ int dst_x, int dst_y, -+ uint32_t color) -+{ -+ int x, y; -+ const unsigned int dst_stride = va_eosd_image.pitches[0]; -+ unsigned char *dst = get_eosd_image_data(dst_x, dst_y); -+ const unsigned int r = (color >> 24) & 0xff; -+ const unsigned int g = (color >> 16) & 0xff; -+ const unsigned int b = (color >> 8) & 0xff; -+ const unsigned int a = 0xff - (color & 0xff); -+ -+ for (y = 0; y < src_h; y++, dst += dst_stride, src += src_stride) -+ for (x = 0; x < src_w; x++) { -+ const unsigned int v = src[x]; -+ dst[4*x + 0] = (r * v + dst[4*x + 0] * (0xff - v)) / 255; -+ dst[4*x + 1] = (g * v + dst[4*x + 1] * (0xff - v)) / 255; -+ dst[4*x + 2] = (b * v + dst[4*x + 2] * (0xff - v)) / 255; -+ dst[4*x + 3] = (a * v + dst[4*x + 3] * (0xff - v)) / 255; -+ } -+} -+ -+static void disable_eosd(void) -+{ -+ if (!va_eosd_associated) -+ return; -+ -+ vaDeassociateSubpicture(va_context->display, -+ va_eosd_subpicture, -+ va_surface_ids, va_num_surfaces); -+ -+ va_eosd_associated = 0; -+} -+ -+static int enable_eosd(void) -+{ -+ VAStatus status; -+ -+ if (va_eosd_associated) -+ return 0; -+ -+ status = vaAssociateSubpicture2(va_context->display, -+ va_eosd_subpicture, -+ va_surface_ids, va_num_surfaces, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_image_width, g_image_height, -+ 0); -+ if (!check_status(status, "vaAssociateSubpicture()")) -+ return -1; -+ -+ va_eosd_associated = 1; -+ return 0; -+} -+ -+///< List of subpicture formats in preferred order -+static const struct { -+ uint32_t format; -+ eosd_draw_alpha_func draw_alpha; -+} -+va_eosd_info[] = { -+ { VA_FOURCC('B','G','R','A'), eosd_draw_alpha_bgra }, -+ { VA_FOURCC('R','G','B','A'), eosd_draw_alpha_rgba }, -+ { 0, NULL } -+}; -+ -+static int is_direct_mapping_init(void) -+{ -+ VADisplayAttribute attr; -+ VAStatus status; -+ -+ if (va_dm < 2) -+ return va_dm; -+ -+ /* If the driver doesn't make a copy of the VA surface for -+ display, then we have to retain it until it's no longer the -+ visible surface. In other words, if the driver is using -+ DirectSurface mode, we don't want to decode the new surface -+ into the previous one that was used for display. */ -+ attr.type = VADisplayAttribDirectSurface; -+ attr.flags = VA_DISPLAY_ATTRIB_GETTABLE; -+ -+ status = vaGetDisplayAttributes(va_context->display, &attr, 1); -+ if (status == VA_STATUS_SUCCESS) -+ return !attr.value; -+ return 0; -+} -+ -+static inline int is_direct_mapping(void) -+{ -+ static int dm = -1; -+ if (dm < 0) { -+ dm = is_direct_mapping_init(); -+ if (dm) -+ mp_msg(MSGT_VO, MSGL_INFO, -+ "[vo_vaapi] Using 1:1 VA surface mapping\n"); -+ } -+ return dm; -+} -+ -+static int int_012(int *n) -+{ -+ return *n >= 0 && *n <= 2; -+} -+ -+static const opt_t subopts[] = { -+ { "dm", OPT_ARG_INT, &va_dm, (opt_test_f)int_012 }, -+ { "stats", OPT_ARG_BOOL, &cpu_stats, NULL }, -+ { "deint", OPT_ARG_INT, &g_deint, (opt_test_f)int_012 }, -+#if USE_VAAPI_COLORSPACE -+ { "colorspace", OPT_ARG_INT, &g_colorspace, (opt_test_f)int_012 }, -+#endif -+#if CONFIG_GL -+ { "gl", OPT_ARG_BOOL, &gl_enabled, NULL }, -+ { "glfinish", OPT_ARG_BOOL, &gl_finish, NULL }, -+#if USE_VAAPI_GLX_BIND -+ { "bind", OPT_ARG_BOOL, &gl_binding, NULL }, -+#endif -+ { "reflect", OPT_ARG_BOOL, &gl_reflect, NULL }, -+ { "tfp", OPT_ARG_BOOL, &gl_use_tfp, NULL }, -+#endif -+#if CONFIG_XRENDER -+ { "xrender", OPT_ARG_BOOL, &xr_enabled, NULL }, -+#endif -+ { NULL, } -+}; -+ -+static int preinit(const char *arg) -+{ -+ VADisplayAttribute *display_attrs; -+ VAStatus status; -+ int va_major_version, va_minor_version; -+ int i, max_image_formats, max_subpic_formats, max_profiles; -+ int num_display_attrs, max_display_attrs; -+ -+ va_dm = 2; -+ g_deint = 0; -+ g_deint_type = 2; -+ g_colorspace = 1; -+ if (subopt_parse(arg, subopts) != 0) { -+ mp_msg(MSGT_VO, MSGL_FATAL, -+ "\n-vo vaapi command line help:\n" -+ "Example: mplayer -vo vaapi:gl\n" -+ "\nOptions:\n" -+ " dm\n" -+ " 0: use least-recently-used VA surface\n" -+ " 1: identify VA surface with MPI index\n" -+ " 2: auto-detect use of direct surface mapping (default)\n" -+ " deint (all modes > 0 respect -field-dominance)\n" -+ " 0: no deinterlacing (default)\n" -+ " 1: only show first field\n" -+ " 2: bob deinterlacing\n" -+ " colorspace\n" -+ " 0: guess based on video resolution\n" -+ " 1: ITU-R BT.601 (default)\n" -+ " 2: ITU-R BT.709\n" -+#if CONFIG_GL -+ " gl\n" -+ " Enable OpenGL rendering\n" -+ " glfinish\n" -+ " Call glFinish() before swapping buffers\n" -+ " tfp\n" -+ " Use GLX texture-from-pixmap instead of VA/GLX extensions\n" -+#if USE_VAAPI_GLX_BIND -+ " bind\n" -+ " Use VA surface binding instead of copy\n" -+#endif -+ " reflect\n" -+ " Enable OpenGL reflection effects\n" -+#endif -+#if CONFIG_XRENDER -+ " xrender\n" -+ " Enable Xrender rendering, thus vaPutSurface() to a Pixmap\n" -+#endif -+ "\n" ); -+ return -1; -+ } -+ if (gl_enabled && xr_enabled) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] User requested both Xrender and OpenGL rendering\n"); -+ return -1; -+ } -+ if (g_deint) -+ g_deint_type = g_deint; -+#if CONFIG_GL -+ if (gl_enabled) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using OpenGL rendering%s\n", -+ gl_reflect ? ", with reflection effects" : ""); -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using Xrender rendering\n"); -+#endif -+ -+ stats_init(); -+ -+#if CONFIG_GL -+ if (gl_enabled && !init_mpglcontext(&gl_context, GLTYPE_X11)) -+ return -1; -+ else -+#endif -+ if (!vo_init()) -+ return -1; -+#if CONFIG_XRENDER -+ if (xr_enabled && !init_xrender()) -+ return -1; -+#endif -+ -+ va_context = calloc(1, sizeof(*va_context)); -+ if (!va_context) -+ return -1; -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_enabled) -+ va_context->display = vaGetDisplayGLX(mDisplay); -+ else -+#endif -+ va_context->display = vaGetDisplay(mDisplay); -+ if (!va_context->display) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): VA display %p\n", va_context->display); -+ -+ status = vaInitialize(va_context->display, &va_major_version, &va_minor_version); -+ if (!check_status(status, "vaInitialize()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): VA API version %d.%d\n", -+ va_major_version, va_minor_version); -+ -+ max_image_formats = vaMaxNumImageFormats(va_context->display); -+ va_image_formats = calloc(max_image_formats, sizeof(*va_image_formats)); -+ if (!va_image_formats) -+ return -1; -+ status = vaQueryImageFormats(va_context->display, va_image_formats, &va_num_image_formats); -+ if (!check_status(status, "vaQueryImageFormats()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d image formats available\n", -+ va_num_image_formats); -+ for (i = 0; i < va_num_image_formats; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAImageFormat(&va_image_formats[i])); -+ -+ max_subpic_formats = vaMaxNumSubpictureFormats(va_context->display); -+ va_subpic_formats = calloc(max_subpic_formats, sizeof(*va_subpic_formats)); -+ if (!va_subpic_formats) -+ return -1; -+ va_subpic_flags = calloc(max_subpic_formats, sizeof(*va_subpic_flags)); -+ if (!va_subpic_flags) -+ return -1; -+ status = vaQuerySubpictureFormats(va_context->display, va_subpic_formats, va_subpic_flags, &va_num_subpic_formats); -+ if (!check_status(status, "vaQuerySubpictureFormats()")) -+ va_num_subpic_formats = 0; /* XXX: don't error out for IEGD */ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d subpicture formats available\n", -+ va_num_subpic_formats); -+ for (i = 0; i < va_num_subpic_formats; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s, flags 0x%x\n", string_of_VAImageFormat(&va_subpic_formats[i]), va_subpic_flags[i]); -+ -+ max_profiles = vaMaxNumProfiles(va_context->display); -+ va_profiles = calloc(max_profiles, sizeof(*va_profiles)); -+ if (!va_profiles) -+ return -1; -+ status = vaQueryConfigProfiles(va_context->display, va_profiles, &va_num_profiles); -+ if (!check_status(status, "vaQueryConfigProfiles()")) -+ return -1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] preinit(): %d profiles available\n", -+ va_num_profiles); -+ for (i = 0; i < va_num_profiles; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAProfile(va_profiles[i])); -+ -+ va_osd_subpicture = VA_INVALID_ID; -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_eosd_subpicture = VA_INVALID_ID; -+ va_eosd_image.image_id = VA_INVALID_ID; -+ -+ max_display_attrs = vaMaxNumDisplayAttributes(va_context->display); -+ display_attrs = calloc(max_display_attrs, sizeof(*display_attrs)); -+ if (display_attrs) { -+ num_display_attrs = 0; -+ status = vaQueryDisplayAttributes(va_context->display, -+ display_attrs, &num_display_attrs); -+ if (check_status(status, "vaQueryDisplayAttributes()")) { -+ for (i = 0; i < num_display_attrs; i++) { -+ VADisplayAttribute *attr; -+ switch (display_attrs[i].type) { -+ case VADisplayAttribBrightness: -+ attr = &va_equalizer.brightness; -+ break; -+ case VADisplayAttribContrast: -+ attr = &va_equalizer.contrast; -+ break; -+ case VADisplayAttribHue: -+ attr = &va_equalizer.hue; -+ break; -+ case VADisplayAttribSaturation: -+ attr = &va_equalizer.saturation; -+ break; -+ default: -+ attr = NULL; -+ break; -+ } -+ if (attr) -+ *attr = display_attrs[i]; -+ } -+ } -+ free(display_attrs); -+ } -+ return 0; -+} -+ -+static void free_video_specific(void) -+{ -+ int i; -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_surface) { -+ VAStatus status; -+ status = vaDestroySurfaceGLX(va_context->display, gl_surface); -+ check_status(status, "vaDestroySurfaceGLX()"); -+ gl_surface = NULL; -+ } -+#endif -+ -+ if (va_context && va_context->context_id) { -+ vaDestroyContext(va_context->display, va_context->context_id); -+ va_context->context_id = 0; -+ } -+ -+ if (va_free_surfaces) { -+ for (i = 0; i < va_num_surfaces; i++) { -+ if (!va_free_surfaces[i]) -+ continue; -+ if (va_free_surfaces[i]->image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, -+ va_free_surfaces[i]->image.image_id); -+ va_free_surfaces[i]->image.image_id = VA_INVALID_ID; -+ } -+ free(va_free_surfaces[i]); -+ va_free_surfaces[i] = NULL; -+ } -+ free(va_free_surfaces); -+ va_free_surfaces = NULL; -+ va_free_surfaces_head_index = 0; -+ va_free_surfaces_tail_index = 0; -+ } -+ -+ g_output_surface = 0; -+ memset(g_output_surfaces, 0, sizeof(g_output_surfaces)); -+ -+ if (va_osd_palette) { -+ free(va_osd_palette); -+ va_osd_palette = NULL; -+ } -+ -+ disable_eosd(); -+ disable_osd(); -+ -+ if (va_eosd_subpicture != VA_INVALID_ID) { -+ vaDestroySubpicture(va_context->display, va_eosd_subpicture); -+ va_eosd_subpicture = VA_INVALID_ID; -+ } -+ -+ if (va_eosd_image.image_id != VA_INVALID_ID) { -+ vaDestroyImage(va_context->display, va_eosd_image.image_id); -+ va_eosd_image.image_id = VA_INVALID_ID; -+ } -+ -+ destroy_osd(); -+ -+ if (va_surface_ids) { -+ vaDestroySurfaces(va_context->display, va_surface_ids, va_num_surfaces); -+ free(va_surface_ids); -+ va_surface_ids = NULL; -+ va_num_surfaces = 0; -+ } -+ -+ if (va_context && va_context->config_id) { -+ vaDestroyConfig(va_context->display, va_context->config_id); -+ va_context->config_id = 0; -+ } -+ -+ if (va_entrypoints) { -+ free(va_entrypoints); -+ va_entrypoints = NULL; -+ } -+ -+#if CONFIG_GL -+ if (gl_pixmap) { -+ x11_trap_errors(); -+ mpglXDestroyPixmap(mDisplay, gl_pixmap); -+ XSync(mDisplay, False); -+ x11_untrap_errors(); -+ gl_pixmap = None; -+ } -+ -+ if (g_image_pixmap) { -+ XFreePixmap(mDisplay, g_image_pixmap); -+ g_image_pixmap = None; -+ } -+ -+ if (gl_texture) { -+ glDeleteTextures(1, &gl_texture); -+ gl_texture = GL_NONE; -+ } -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_window_picture) { -+ XRenderFreePicture(mDisplay, xr_window_picture); -+ xr_window_picture = None; -+ } -+#endif -+ -+ g_is_visible = 0; -+} -+ -+static void uninit(void) -+{ -+ if (!vo_config_count) -+ return; -+ -+ free_video_specific(); -+ -+ if (va_profiles) { -+ free(va_profiles); -+ va_profiles = NULL; -+ } -+ -+ if (va_subpic_flags) { -+ free(va_subpic_flags); -+ va_subpic_flags = NULL; -+ } -+ -+ if (va_subpic_formats) { -+ free(va_subpic_formats); -+ va_subpic_formats = NULL; -+ } -+ -+ if (va_image_formats) { -+ free(va_image_formats); -+ va_image_formats = NULL; -+ } -+ -+ if (va_context && va_context->display) { -+ vaTerminate(va_context->display); -+ va_context->display = NULL; -+ } -+ -+ if (va_context) { -+ free(va_context); -+ va_context = NULL; -+ } -+ -+#ifdef CONFIG_XF86VM -+ vo_vm_close(); -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ uninit_xrender(); -+#endif -+#if CONFIG_GL -+ if (gl_enabled) -+ uninit_mpglcontext(&gl_context); -+ else -+#endif -+ vo_x11_uninit(); -+ -+ stats_exit(); -+} -+ -+static int config_x11(uint32_t width, uint32_t height, -+ uint32_t display_width, uint32_t display_height, -+ uint32_t flags, char *title) -+{ -+ Colormap cmap; -+ XVisualInfo visualInfo; -+ XVisualInfo *vi; -+ XSetWindowAttributes xswa; -+ unsigned long xswa_mask; -+ XWindowAttributes wattr; -+ int depth; -+ -+#ifdef CONFIG_GUI -+ if (use_gui) -+ guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize our window -+ else -+#endif -+ { -+#ifdef CONFIG_XF86VM -+ if (flags & VOFLAG_MODESWITCHING) -+ vo_vm_switch(); -+#endif -+ XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &wattr); -+ depth = wattr.depth; -+ if (depth != 15 && depth != 16 && depth != 24 && depth != 32) -+ depth = 24; -+ XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &visualInfo); -+ -+#if CONFIG_GL -+ if (gl_enabled) { -+ vi = glXChooseVisual(mDisplay, mScreen, gl_visual_attr); -+ if (!vi) -+ return -1; -+ cmap = XCreateColormap(mDisplay, mRootWin, vi->visual, AllocNone); -+ if (cmap == None) -+ return -1; -+ } -+ else -+#endif -+ { -+ vi = &visualInfo; -+ XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, vi); -+ cmap = CopyFromParent; -+ } -+ -+ vo_x11_create_vo_window(vi, -+ vo_dx, vo_dy, display_width, display_height, -+ flags, cmap, "vaapi", title); -+ -+ if (vi != &visualInfo) -+ XFree(vi); -+ -+ xswa_mask = CWBorderPixel | CWBackPixel; -+ xswa.border_pixel = 0; -+ xswa.background_pixel = 0; -+ XChangeWindowAttributes(mDisplay, vo_window, xswa_mask, &xswa); -+ -+#ifdef CONFIG_XF86VM -+ if (flags & VOFLAG_MODESWITCHING) { -+ /* Grab the mouse pointer in our window */ -+ if (vo_grabpointer) -+ XGrabPointer(mDisplay, vo_window, True, 0, -+ GrabModeAsync, GrabModeAsync, -+ vo_window, None, CurrentTime); -+ XSetInputFocus(mDisplay, vo_window, RevertToNone, CurrentTime); -+ } -+#endif -+ } -+ return 0; -+} -+ -+#if CONFIG_GL -+static GLXFBConfig *get_fbconfig_for_depth(int depth) -+{ -+ GLXFBConfig *fbconfigs, *ret = NULL; -+ int n_elements, i, found; -+ int db, stencil, alpha, mipmap, rgba, value; -+ -+ static GLXFBConfig *cached_config = NULL; -+ static int have_cached_config = 0; -+ -+ if (have_cached_config) -+ return cached_config; -+ -+ fbconfigs = glXGetFBConfigs(mDisplay, mScreen, &n_elements); -+ -+ db = SHRT_MAX; -+ stencil = SHRT_MAX; -+ mipmap = 0; -+ rgba = 0; -+ -+ found = n_elements; -+ -+ for (i = 0; i < n_elements; i++) { -+ XVisualInfo *vi; -+ int visual_depth; -+ -+ vi = glXGetVisualFromFBConfig(mDisplay, fbconfigs[i]); -+ if (!vi) -+ continue; -+ -+ visual_depth = vi->depth; -+ XFree(vi); -+ -+ if (visual_depth != depth) -+ continue; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_ALPHA_SIZE, &alpha); -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_BUFFER_SIZE, &value); -+ if (value != depth && (value - alpha) != depth) -+ continue; -+ -+ value = 0; -+ if (depth == 32) { -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], -+ GLX_BIND_TO_TEXTURE_RGBA_EXT, &value); -+ if (value) -+ rgba = 1; -+ } -+ -+ if (!value) { -+ if (rgba) -+ continue; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], -+ GLX_BIND_TO_TEXTURE_RGB_EXT, &value); -+ if (!value) -+ continue; -+ } -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_DOUBLEBUFFER, &value); -+ if (value > db) -+ continue; -+ db = value; -+ -+ glXGetFBConfigAttrib(mDisplay, fbconfigs[i], GLX_STENCIL_SIZE, &value); -+ if (value > stencil) -+ continue; -+ stencil = value; -+ -+ found = i; -+ } -+ -+ if (found != n_elements) { -+ ret = malloc(sizeof(*ret)); -+ *ret = fbconfigs[found]; -+ } -+ -+ if (n_elements) -+ XFree(fbconfigs); -+ -+ have_cached_config = 1; -+ cached_config = ret; -+ return ret; -+} -+ -+static int config_tfp(unsigned int width, unsigned int height) -+{ -+ GLXFBConfig *fbconfig; -+ int attribs[7], i = 0; -+ const int depth = 24; -+ -+ if (!mpglXBindTexImage || !mpglXReleaseTexImage) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] No GLX texture-from-pixmap extension available\n"); -+ return -1; -+ } -+ -+ if (depth != 24 && depth != 32) -+ return -1; -+ -+ g_image_pixmap = XCreatePixmap(mDisplay, vo_window, width, height, depth); -+ if (!g_image_pixmap) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not create X11 pixmap\n"); -+ return -1; -+ } -+ -+ fbconfig = get_fbconfig_for_depth(depth); -+ if (!fbconfig) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not find an FBConfig for 32-bit pixmap\n"); -+ return -1; -+ } -+ -+ attribs[i++] = GLX_TEXTURE_TARGET_EXT; -+ attribs[i++] = GLX_TEXTURE_2D_EXT; -+ attribs[i++] = GLX_TEXTURE_FORMAT_EXT; -+ if (depth == 24) -+ attribs[i++] = GLX_TEXTURE_FORMAT_RGB_EXT; -+ else if (depth == 32) -+ attribs[i++] = GLX_TEXTURE_FORMAT_RGBA_EXT; -+ attribs[i++] = GLX_MIPMAP_TEXTURE_EXT; -+ attribs[i++] = GL_FALSE; -+ attribs[i++] = None; -+ -+ x11_trap_errors(); -+ gl_pixmap = mpglXCreatePixmap(mDisplay, *fbconfig, g_image_pixmap, attribs); -+ XSync(mDisplay, False); -+ if (x11_untrap_errors()) { -+ mp_msg(MSGT_VO, MSGL_ERR, "[vo_vaapi] Could not create GLX pixmap\n"); -+ return -1; -+ } -+ return 0; -+} -+ -+static int config_glx(unsigned int width, unsigned int height) -+{ -+ if (gl_context.setGlWindow(&gl_context) == SET_WINDOW_FAILED) -+ return -1; -+ -+ glDisable(GL_DEPTH_TEST); -+ glDepthMask(GL_FALSE); -+ glDisable(GL_CULL_FACE); -+ glEnable(GL_TEXTURE_2D); -+ glDrawBuffer(vo_doublebuffering ? GL_BACK : GL_FRONT); -+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); -+ glEnable(GL_BLEND); -+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -+ -+ /* Create TFP resources */ -+ if (gl_use_tfp && config_tfp(width, height) == 0) -+ mp_msg(MSGT_VO, MSGL_INFO, "[vo_vaapi] Using GLX texture-from-pixmap extension\n"); -+ else -+ gl_use_tfp = 0; -+ -+ /* Create OpenGL texture */ -+ /* XXX: assume GL_ARB_texture_non_power_of_two is available */ -+ glEnable(GL_TEXTURE_2D); -+ glGenTextures(1, &gl_texture); -+ mpglBindTexture(GL_TEXTURE_2D, gl_texture); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -+ if (!gl_use_tfp) { -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4); -+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, -+ GL_BGRA, GL_UNSIGNED_BYTE, NULL); -+ } -+ mpglBindTexture(GL_TEXTURE_2D, 0); -+ glDisable(GL_TEXTURE_2D); -+ -+ glClearColor(0.0, 0.0, 0.0, 1.0); -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ if (gl_build_font() < 0) -+ return -1; -+ return 0; -+} -+#endif -+ -+#if CONFIG_XRENDER -+static XRenderPictFormat *get_xrender_argb32_format(void) -+{ -+ static XRenderPictFormat *pictformat = NULL; -+ XRenderPictFormat templ; -+ -+ const unsigned long mask = -+ PictFormatType | -+ PictFormatDepth | -+ PictFormatRed | -+ PictFormatRedMask | -+ PictFormatGreen | -+ PictFormatGreenMask | -+ PictFormatBlue | -+ PictFormatBlueMask | -+ PictFormatAlphaMask; -+ -+ if (pictformat) -+ return pictformat; -+ -+ /* First, look for a 32-bit format which ignores the alpha component */ -+ templ.depth = 32; -+ templ.type = PictTypeDirect; -+ templ.direct.red = 16; -+ templ.direct.green = 8; -+ templ.direct.blue = 0; -+ templ.direct.redMask = 0xff; -+ templ.direct.greenMask = 0xff; -+ templ.direct.blueMask = 0xff; -+ templ.direct.alphaMask = 0; -+ -+ pictformat = XRenderFindFormat(mDisplay, mask, &templ, 0); -+ -+ if (!pictformat) { -+ /* Not all X servers support xRGB32 formats. However, the -+ * XRENDER spec says that they must support an ARGB32 format, -+ * so we can always return that. -+ */ -+ pictformat = XRenderFindStandardFormat(mDisplay, PictStandardARGB32); -+ if (!pictformat) -+ mp_msg(MSGT_VO, MSGL_ERR, "XRENDER ARGB32 format not supported\n"); -+ } -+ return pictformat; -+} -+ -+static int create_xrender_specific(void) -+{ -+ XRenderPictFormat *pictformat; -+ -+ if (g_output_rect.width == 0 && g_output_rect.height == 0) -+ return 0; -+ -+ g_image_pixmap = XCreatePixmap(mDisplay, vo_window, g_output_rect.width, -+ g_output_rect.height, 32); -+ if (!g_image_pixmap) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create video pixmap\n"); -+ return -1; -+ } -+ -+ pictformat = get_xrender_argb32_format(); -+ if (!pictformat) -+ return -1; -+ xr_video_picture = XRenderCreatePicture(mDisplay, g_image_pixmap, -+ pictformat, 0, NULL); -+ if (!xr_video_picture) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create XRENDER backing picture for Pixmap\n"); -+ return -1; -+ } -+ return 0; -+} -+ -+static void free_xrender_specific(void) -+{ -+ if (xr_video_picture) { -+ XRenderFreePicture(mDisplay, xr_video_picture); -+ xr_video_picture = None; -+ } -+ -+ if (g_image_pixmap) { -+ XFreePixmap(mDisplay, g_image_pixmap); -+ g_image_pixmap = None; -+ } -+} -+ -+static int reset_xrender_specific(void) -+{ -+ free_xrender_specific(); -+ return create_xrender_specific(); -+} -+ -+/* XXX: create a Pixmap as large as the display rect */ -+static int config_xrender(unsigned int width, unsigned int height) -+{ -+ XWindowAttributes wattr; -+ XRenderPictFormat *pictformat; -+ -+ XGetWindowAttributes(mDisplay, vo_window, &wattr); -+ pictformat = XRenderFindVisualFormat(mDisplay, wattr.visual); -+ if (!pictformat) { -+ mp_msg(MSGT_VO, MSGL_ERR, "XRENDER does not support Window visual\n"); -+ return -1; -+ } -+ -+ xr_window_picture = XRenderCreatePicture(mDisplay, vo_window, pictformat, -+ 0, NULL); -+ if (!xr_window_picture) { -+ mp_msg(MSGT_VO, MSGL_ERR, "Could not create XRENDER backing picture for Window\n"); -+ return -1; -+ } -+ return reset_xrender_specific(); -+} -+#endif -+ -+static int config_vaapi(uint32_t width, uint32_t height, uint32_t format) -+{ -+ VAConfigAttrib attrib; -+ VAStatus status; -+ int i, j, profile, entrypoint, max_entrypoints, num_surfaces; -+ -+ /* Create video surfaces */ -+ if (!IMGFMT_IS_VAAPI(format)) -+ num_surfaces = MAX_OUTPUT_SURFACES; -+ else { -+ switch (IMGFMT_VAAPI_CODEC(format)) { -+ case IMGFMT_VAAPI_CODEC_MPEG2: -+ num_surfaces = NUM_VIDEO_SURFACES_MPEG2; -+ break; -+ case IMGFMT_VAAPI_CODEC_MPEG4: -+ num_surfaces = NUM_VIDEO_SURFACES_MPEG4; -+ break; -+ case IMGFMT_VAAPI_CODEC_H264: -+ num_surfaces = NUM_VIDEO_SURFACES_H264; -+ break; -+ case IMGFMT_VAAPI_CODEC_VC1: -+ num_surfaces = NUM_VIDEO_SURFACES_VC1; -+ break; -+ default: -+ num_surfaces = 0; -+ break; -+ } -+ if (num_surfaces == 0) -+ return -1; -+ if (!is_direct_mapping()) -+ num_surfaces = FFMIN(2 * num_surfaces, MAX_VIDEO_SURFACES); -+ } -+ for (i = 0; i < num_surfaces; i++) { -+ struct vaapi_surface *surface; -+ surface = alloc_vaapi_surface(width, height, VA_RT_FORMAT_YUV420); -+ if (!surface) -+ return -1; -+ } -+ assert(va_num_surfaces == num_surfaces); -+ -+#if CONFIG_VAAPI_GLX -+ /* Create GLX surfaces */ -+ if (gl_enabled && !gl_use_tfp) { -+ status = vaCreateSurfaceGLX(va_context->display, -+ GL_TEXTURE_2D, gl_texture, -+ &gl_surface); -+ if (!check_status(status, "vaCreateSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ -+ /* Create OSD data */ -+ va_osd_draw_alpha = NULL; -+ va_osd_image.image_id = VA_INVALID_ID; -+ va_osd_image.buf = VA_INVALID_ID; -+ va_osd_subpicture = VA_INVALID_ID; -+ ensure_osd(); -+ -+ /* Create EOSD data */ -+ va_eosd_draw_alpha = NULL; -+ va_eosd_image.image_id = VA_INVALID_ID; -+ va_eosd_image.buf = VA_INVALID_ID; -+ va_eosd_subpicture = VA_INVALID_ID; -+ for (i = 0; va_eosd_info[i].format; i++) { -+ for (j = 0; j < va_num_subpic_formats; j++) -+ if (va_subpic_formats[j].fourcc == va_eosd_info[i].format) -+ break; -+ if (j < va_num_subpic_formats && -+ vaCreateImage(va_context->display, &va_subpic_formats[j], -+ width, height, &va_eosd_image) == VA_STATUS_SUCCESS) -+ break; -+ } -+ if (va_eosd_info[i].format && -+ vaCreateSubpicture(va_context->display, va_eosd_image.image_id, -+ &va_eosd_subpicture) == VA_STATUS_SUCCESS) { -+ va_eosd_draw_alpha = va_eosd_info[i].draw_alpha; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using %s surface for EOSD\n", -+ string_of_VAImageFormat(&va_eosd_image.format)); -+ } -+ -+ /* Allocate VA images */ -+ if (!IMGFMT_IS_VAAPI(format)) { -+ VAImageFormat *image_format = VAImageFormat_from_imgfmt(format); -+ if (!image_format) -+ return -1; -+ for (i = 0; i < va_num_surfaces; i++) { -+ struct vaapi_surface * const s = va_free_surfaces[i]; -+ s->is_bound = 0; -+ status = vaDeriveImage(va_context->display, s->id, &s->image); -+ if (status == VA_STATUS_SUCCESS) { -+ /* vaDeriveImage() is supported, check format */ -+ if (s->image.format.fourcc != image_format->fourcc) { -+ vaDestroyImage(va_context->display, s->image.image_id); -+ return -1; -+ } -+ if (s->image.width == width && s->image.height == height) { -+ s->is_bound = 1; -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] Using vaDeriveImage()\n"); -+ } -+ else { -+ vaDestroyImage(va_context->display, s->image.image_id); -+ status = VA_STATUS_ERROR_OPERATION_FAILED; -+ } -+ -+ } -+ if (status != VA_STATUS_SUCCESS) { -+ status = vaCreateImage(va_context->display, image_format, -+ width, height, &s->image); -+ if (!check_status(status, "vaCreateImage()")) -+ return -1; -+ } -+ } -+ return 0; -+ } -+ -+ /* Check profile */ -+ profile = VAProfile_from_imgfmt(format); -+ if (profile < 0) -+ return -1; -+ -+ /* Check entry-point (only VLD for now) */ -+ max_entrypoints = vaMaxNumEntrypoints(va_context->display); -+ va_entrypoints = calloc(max_entrypoints, sizeof(*va_entrypoints)); -+ if (!va_entrypoints) -+ return -1; -+ -+ status = vaQueryConfigEntrypoints(va_context->display, profile, -+ va_entrypoints, &va_num_entrypoints); -+ if (!check_status(status, "vaQueryConfigEntrypoints()")) -+ return -1; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] config_vaapi(%s): %d entrypoints available\n", -+ string_of_VAProfile(profile), va_num_entrypoints); -+ for (i = 0; i < va_num_entrypoints; i++) -+ mp_msg(MSGT_VO, MSGL_DBG2, " %s\n", string_of_VAEntrypoint(va_entrypoints[i])); -+ -+ entrypoint = VAEntrypoint_from_imgfmt(format); -+ if (entrypoint != VAEntrypointVLD) -+ return -1; -+ -+ /* Check chroma format (only 4:2:0 for now) */ -+ attrib.type = VAConfigAttribRTFormat; -+ status = vaGetConfigAttributes(va_context->display, profile, entrypoint, &attrib, 1); -+ if (!check_status(status, "vaGetConfigAttributes()")) -+ return -1; -+ if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) -+ return -1; -+ -+ /* Create a configuration for the decode pipeline */ -+ status = vaCreateConfig(va_context->display, profile, entrypoint, &attrib, 1, &va_context->config_id); -+ if (!check_status(status, "vaCreateConfig()")) -+ return -1; -+ -+ /* Create a context for the decode pipeline */ -+ status = vaCreateContext(va_context->display, va_context->config_id, -+ width, height, VA_PROGRESSIVE, -+ va_surface_ids, va_num_surfaces, -+ &va_context->context_id); -+ if (!check_status(status, "vaCreateContext()")) -+ return -1; -+ return 0; -+} -+ -+static int config(uint32_t width, uint32_t height, -+ uint32_t display_width, uint32_t display_height, -+ uint32_t flags, char *title, uint32_t format) -+{ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] config(): size %dx%d, display size %dx%d, flags %x, title '%s', format %x (%s)\n", -+ width, height, display_width, display_height, flags, title, format, vo_format_name(format)); -+ -+ free_video_specific(); -+ -+ if (config_x11(width, height, display_width, display_height, flags, title) < 0) -+ return -1; -+ -+#if CONFIG_GL -+ if (gl_enabled && config_glx(width, height) < 0) -+ return -1; -+#endif -+ -+#if CONFIG_XRENDER -+ if (xr_enabled && config_xrender(width, height) < 0) -+ return -1; -+#endif -+ -+ if (config_vaapi(width, height, format) < 0) -+ return -1; -+ -+ g_is_visible = 0; -+ g_is_paused = 0; -+ g_image_width = width; -+ g_image_height = height; -+ g_image_format = format; -+ resize(); -+ return 0; -+} -+ -+static int query_format(uint32_t format) -+{ -+ const int default_caps = (VFCAP_CSP_SUPPORTED | -+ VFCAP_CSP_SUPPORTED_BY_HW | -+ VFCAP_HWSCALE_UP | -+ VFCAP_HWSCALE_DOWN | -+ VFCAP_OSD | -+ VFCAP_EOSD); -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] query_format(): format %x (%s)\n", -+ format, vo_format_name(format)); -+ -+ switch (format) { -+ case IMGFMT_VAAPI_MPEG2: -+ case IMGFMT_VAAPI_MPEG4: -+ case IMGFMT_VAAPI_H263: -+ case IMGFMT_VAAPI_H264: -+ case IMGFMT_VAAPI_WMV3: -+ case IMGFMT_VAAPI_VC1: -+ return default_caps | VOCAP_NOSLICES; -+ case IMGFMT_NV12: -+ case IMGFMT_YV12: -+ case IMGFMT_I420: -+ case IMGFMT_IYUV: -+ if (VAImageFormat_from_imgfmt(format)) -+ return default_caps; -+ break; -+ } -+ return 0; -+} -+ -+static inline int get_field_flags(int i) -+{ -+ return (g_deint && (g_image_fields & MP_IMGFIELD_INTERLACED) ? -+ (((!!(g_image_fields & MP_IMGFIELD_TOP_FIRST)) ^ i) == 0 ? -+ VA_BOTTOM_FIELD : VA_TOP_FIELD) : VA_FRAME_PICTURE); -+} -+ -+static inline int get_colorspace_flags(void) -+{ -+ int csp = 0; -+#if USE_VAAPI_COLORSPACE -+ switch (g_colorspace) { -+ case 0: -+ csp = ((g_image_width >= 1280 || g_image_height > 576) ? -+ VA_SRC_BT709 : VA_SRC_BT601); -+ break; -+ case 1: -+ csp = VA_SRC_BT601; -+ break; -+ case 2: -+ csp = VA_SRC_BT709; -+ break; -+ default: -+ assert(0); -+ break; -+ } -+#endif -+ return csp; -+} -+ -+static void put_surface_x11(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ vo_window, -+ 0, 0, g_image_width, g_image_height, -+ g_output_rect.left, -+ g_output_rect.top, -+ g_output_rect.width, -+ g_output_rect.height, -+ NULL, 0, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ } -+} -+ -+#if CONFIG_GL -+static void put_surface_glx(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ if (gl_use_tfp) { -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ g_image_pixmap, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_image_width, g_image_height, -+ NULL, 0, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ } -+ g_output_surfaces[g_output_surface] = surface; -+ return; -+ } -+ -+#if CONFIG_VAAPI_GLX -+ if (gl_binding) { -+#if USE_VAAPI_GLX_BIND -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaAssociateSurfaceGLX(va_context->display, -+ gl_surface, -+ surface->id, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaAssociateSurfaceGLX()")) -+ return; -+ } -+#else -+ mp_msg(MSGT_VO, MSGL_WARN, "vaAssociateSurfaceGLX() is not implemented\n"); -+ gl_binding = 0; -+#endif -+ } -+ -+ if (!gl_binding) { -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaCopySurfaceGLX(va_context->display, -+ gl_surface, -+ surface->id, -+ get_field_flags(i) | get_colorspace_flags()); -+ -+ if (status == VA_STATUS_ERROR_UNIMPLEMENTED) { -+ mp_msg(MSGT_VO, MSGL_WARN, -+ "[vo_vaapi] vaCopySurfaceGLX() is not implemented\n"); -+ gl_binding = 1; -+ } -+ else { -+ if (!check_status(status, "vaCopySurfaceGLX()")) -+ return; -+ } -+ } -+ } -+#endif -+ g_output_surfaces[g_output_surface] = surface; -+} -+ -+static int glx_bind_texture(void) -+{ -+ glEnable(GL_TEXTURE_2D); -+ mpglBindTexture(GL_TEXTURE_2D, gl_texture); -+ -+ if (gl_use_tfp) { -+ x11_trap_errors(); -+ mpglXBindTexImage(mDisplay, gl_pixmap, GLX_FRONT_LEFT_EXT, NULL); -+ XSync(mDisplay, False); -+ if (x11_untrap_errors()) -+ mp_msg(MSGT_VO, MSGL_WARN, "[vo_vaapi] Update bind_tex_image failed\n"); -+ } -+ -+#if USE_VAAPI_GLX_BIND -+ if (gl_binding) { -+ VAStatus status; -+ status = vaBeginRenderSurfaceGLX(va_context->display, gl_surface); -+ if (!check_status(status, "vaBeginRenderSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ return 0; -+} -+ -+static int glx_unbind_texture(void) -+{ -+ if (gl_use_tfp) { -+ x11_trap_errors(); -+ mpglXReleaseTexImage(mDisplay, gl_pixmap, GLX_FRONT_LEFT_EXT); -+ if (x11_untrap_errors()) -+ mp_msg(MSGT_VO, MSGL_WARN, "[vo_vaapi] Failed to release?\n"); -+ } -+ -+#if USE_VAAPI_GLX_BIND -+ if (gl_binding) { -+ VAStatus status; -+ status = vaEndRenderSurfaceGLX(va_context->display, gl_surface); -+ if (!check_status(status, "vaEndRenderSurfaceGLX()")) -+ return -1; -+ } -+#endif -+ -+ mpglBindTexture(GL_TEXTURE_2D, 0); -+ glDisable(GL_TEXTURE_2D); -+ return 0; -+} -+ -+static void render_background(void) -+{ -+ /* Original code from Mirco Muller (MacSlow): -+ */ -+ GLfloat fStartX = 0.0f; -+ GLfloat fStartY = 0.0f; -+ GLfloat fWidth = (GLfloat)vo_dwidth; -+ GLfloat fHeight = (GLfloat)vo_dheight; -+ -+ glBegin(GL_QUADS); -+ { -+ /* top third, darker grey to white */ -+ glColor3f(0.85f, 0.85f, 0.85f); -+ glVertex3f(fStartX, fStartY, 0.0f); -+ glColor3f(0.85f, 0.85f, 0.85f); -+ glVertex3f(fStartX + fWidth, fStartY, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight / 3.0f, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + fHeight / 3.0f, 0.0f); -+ -+ /* middle third, just plain white */ -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX + fWidth, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glVertex3f(fStartX, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ -+ /* bottom third, white to lighter grey */ -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glVertex3f(fStartX + fWidth, fStartY + 2.0f * fHeight / 3.0f, 0.0f); -+ glColor3f(0.62f, 0.66f, 0.69f); -+ glVertex3f(fStartX + fWidth, fStartY + fHeight, 0.0f); -+ glColor3f(0.62f, 0.66f, 0.69f); -+ glVertex3f(fStartX, fStartY + fHeight, 0.0f); -+ } -+ glEnd(); -+} -+ -+static void render_frame(void) -+{ -+ struct vo_rect * const r = &g_output_rect; -+ -+ if (glx_bind_texture() < 0) -+ return; -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glBegin(GL_QUADS); -+ { -+ glTexCoord2f(0.0f, 0.0f); glVertex2i(r->left, r->top); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(r->left, r->bottom); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(r->right, r->bottom); -+ glTexCoord2f(1.0f, 0.0f); glVertex2i(r->right, r->top); -+ } -+ glEnd(); -+ if (glx_unbind_texture() < 0) -+ return; -+} -+ -+static void render_reflection(void) -+{ -+ struct vo_rect * const r = &g_output_rect; -+ const unsigned int rh = g_output_rect.height / 5; -+ GLfloat ry = 1.0f - (GLfloat)rh / (GLfloat)r->height; -+ -+ if (glx_bind_texture() < 0) -+ return; -+ glBegin(GL_QUADS); -+ { -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(r->left, r->top); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(r->right, r->top); -+ -+ glColor4f(1.0f, 1.0f, 1.0f, 0.0f); -+ glTexCoord2f(1.0f, ry); glVertex2i(r->right, r->top + rh); -+ glTexCoord2f(0.0f, ry); glVertex2i(r->left, r->top + rh); -+ } -+ glEnd(); -+ if (glx_unbind_texture() < 0) -+ return; -+} -+ -+static void flip_page_glx(void) -+{ -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ if (gl_reflect) { -+ render_background(); -+ -+ glPushMatrix(); -+ glRotatef(20.0f, 0.0f, 1.0f, 0.0f); -+ glTranslatef(50.0f, 0.0f, 0.0f); -+ } -+ -+ render_frame(); -+ -+ if (gl_reflect) { -+ glPushMatrix(); -+ glTranslatef(0.0, (GLfloat)g_output_rect.height + 5.0f, 0.0f); -+ render_reflection(); -+ glPopMatrix(); -+ glPopMatrix(); -+ } -+ -+ if (cpu_stats) { -+ gl_draw_rectangle(0, 0, vo_dwidth, 32, 0x000000ff); -+ glColor3f(1.0f, 1.0f, 1.0f); -+ glRasterPos2i(16, 20); -+ gl_printf("MPlayer: %.1f%% of CPU @ %u MHz", cpu_usage, cpu_frequency); -+ } -+ -+ if (gl_finish) -+ mpglFinish(); -+ gl_context.swapGlBuffers(&gl_context); -+ -+ if (vo_fs) /* avoid flickering borders in fullscreen mode */ -+ glClear(GL_COLOR_BUFFER_BIT); -+} -+#endif -+ -+#if CONFIG_XRENDER -+static void put_surface_xrender(struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ int i; -+ -+ for (i = 0; i <= !!(g_deint > 1); i++) { -+ status = vaPutSurface(va_context->display, -+ surface->id, -+ g_image_pixmap, -+ 0, 0, g_image_width, g_image_height, -+ 0, 0, g_output_rect.width, g_output_rect.height, -+ NULL, 0, -+ get_field_flags(i) | get_colorspace_flags()); -+ if (!check_status(status, "vaPutSurface()")) -+ return; -+ XRenderComposite(mDisplay, -+ PictOpSrc, xr_video_picture, 0, xr_window_picture, -+ 0, 0, -+ 0, 0, -+ g_output_rect.left, g_output_rect.top, -+ g_output_rect.width, g_output_rect.height); -+ } -+} -+#endif -+ -+static void put_surface(struct vaapi_surface *surface) -+{ -+ if (!surface || surface->id == VA_INVALID_SURFACE) -+ return; -+ -+#if CONFIG_GL -+ if (gl_enabled) -+ put_surface_glx(surface); -+ else -+#endif -+#if CONFIG_XRENDER -+ if (xr_enabled) -+ put_surface_xrender(surface); -+ else -+#endif -+ put_surface_x11(surface); -+} -+ -+static int draw_slice(uint8_t * image[], int stride[], -+ int w, int h, int x, int y) -+{ -+ struct vaapi_surface * const surface = va_free_surfaces[g_output_surface]; -+ VAImage * const va_image = &surface->image; -+ VAStatus status; -+ uint8_t *image_data = NULL; -+ uint8_t *dst[3] = { 0, }; -+ unsigned int dst_stride[3]; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] draw_slice(): location (%d,%d), size %dx%d\n", x, y, w, h); -+ -+ status = vaMapBuffer(va_context->display, va_image->buf, -+ (void *)&image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return VO_FALSE; -+ -+ dst_stride[0] = va_image->pitches[0]; -+ dst[0] = image_data + va_image->offsets[0] + y * dst_stride[0] + x; -+ -+ memcpy_pic(dst[0], image[0], w, h, dst_stride[0], stride[0]); -+ -+ x /= 2; -+ y /= 2; -+ w /= 2; -+ h /= 2; -+ -+ if (g_image_format == IMGFMT_YV12) { -+ /* MPlayer's YV12 is actually I420, so swap U/V components */ -+ dst_stride[1] = va_image->pitches[2]; -+ dst[1] = image_data + va_image->offsets[2] + y * dst_stride[1] + x; -+ dst_stride[2] = va_image->pitches[1]; -+ dst[2] = image_data + va_image->offsets[1] + y * dst_stride[2] + x; -+ } -+ else { -+ if (image[1]) { -+ dst_stride[1] = va_image->pitches[1]; -+ dst[1] = image_data + va_image->offsets[1] + y * dst_stride[1] + x; -+ } -+ if (image[2]) { -+ dst_stride[2] = va_image->pitches[2]; -+ dst[2] = image_data + va_image->offsets[2] + y * dst_stride[2] + x; -+ } -+ } -+ -+ if (image[1]) /* RGBA only has a single plane */ -+ memcpy_pic(dst[1], image[1], w, h, dst_stride[1], stride[1]); -+ -+ if (image[2]) /* NV12 only has two planes */ -+ memcpy_pic(dst[2], image[2], w, h, dst_stride[2], stride[2]); -+ -+ status = vaUnmapBuffer(va_context->display, surface->image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return VO_FALSE; -+ -+ return VO_TRUE; -+} -+ -+static int draw_frame(uint8_t * src[]) -+{ -+ mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_X11_DrawFrameCalled); -+ -+ return -1; -+} -+ -+static void draw_osd(void) -+{ -+ VAStatus status; -+ const int osd_width = va_osd_image.width; -+ const int osd_height = va_osd_image.height; -+ -+ ensure_osd(); -+ if (va_osd_image.image_id == VA_INVALID_ID) -+ return; -+ -+ if (!va_osd_draw_alpha) -+ return; -+ -+ if (!vo_update_osd(osd_width, osd_height)) -+ return; -+ -+ if (!vo_osd_check_range_update(0, 0, osd_width, osd_height)) { -+ disable_osd(); -+ return; -+ } -+ -+ status = vaMapBuffer(va_context->display, va_osd_image.buf, -+ (void *)&va_osd_image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return; -+ -+ memset(va_osd_image_data, 0, va_osd_image.data_size); -+ -+ vo_draw_text(osd_width, osd_height, va_osd_draw_alpha); -+ -+ status = vaUnmapBuffer(va_context->display, va_osd_image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return; -+ va_osd_image_data = NULL; -+ -+ enable_osd(); -+} -+ -+static void draw_eosd(mp_eosd_images_t *imgs) -+{ -+ ass_image_t *img = imgs->imgs; -+ ass_image_t *i; -+ VAStatus status; -+ -+ if (!va_eosd_draw_alpha) -+ return; -+ -+ // Nothing changed, no need to redraw -+ if (imgs->changed == 0) -+ return; -+ -+ // There's nothing to render! -+ if (!img) { -+ disable_eosd(); -+ return; -+ } -+ -+ if (imgs->changed == 1) -+ goto eosd_skip_upload; -+ -+ status = vaMapBuffer(va_context->display, va_eosd_image.buf, -+ (void *)&va_eosd_image_data); -+ if (!check_status(status, "vaMapBuffer()")) -+ return; -+ -+ memset(va_eosd_image_data, 0, va_eosd_image.data_size); -+ -+ for (i = img; i; i = i->next) -+ va_eosd_draw_alpha(i->bitmap, i->w, i->h, i->stride, -+ i->dst_x, i->dst_y, i->color); -+ -+ status = vaUnmapBuffer(va_context->display, va_eosd_image.buf); -+ if (!check_status(status, "vaUnmapBuffer()")) -+ return; -+ va_eosd_image_data = NULL; -+ -+eosd_skip_upload: -+ enable_eosd(); -+} -+ -+static void flip_page(void) -+{ -+ struct vaapi_surface *surface; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] flip_page()\n"); -+ -+ surface = g_output_surfaces[g_output_surface]; -+ if (!surface) -+ return; -+ -+ put_surface(surface); -+ g_output_surface = (g_output_surface + 1) % MAX_OUTPUT_SURFACES; -+ g_is_visible = 1; -+ -+#if CONFIG_GL -+ if (gl_enabled) -+ flip_page_glx(); -+#endif -+} -+ -+static struct vaapi_surface *get_surface(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface; -+ -+ if (mpi->type == MP_IMGTYPE_NUMBERED && is_direct_mapping()) { -+ assert(mpi->number < va_num_surfaces); -+ surface = va_free_surfaces[mpi->number]; -+ return surface; -+ } -+ -+ /* Push current surface to a free slot */ -+ if (mpi->priv) { -+ assert(!va_free_surfaces[va_free_surfaces_tail_index]); -+ va_free_surfaces[va_free_surfaces_tail_index] = mpi->priv; -+ va_free_surfaces_tail_index = (va_free_surfaces_tail_index + 1) % va_num_surfaces; -+ } -+ -+ /* Pop the least recently used free surface */ -+ assert(va_free_surfaces[va_free_surfaces_head_index]); -+ surface = va_free_surfaces[va_free_surfaces_head_index]; -+ va_free_surfaces[va_free_surfaces_head_index] = NULL; -+ va_free_surfaces_head_index = (va_free_surfaces_head_index + 1) % va_num_surfaces; -+ return surface; -+} -+ -+static uint32_t get_image(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface; -+ -+ if (mpi->type != MP_IMGTYPE_NUMBERED) -+ return VO_FALSE; -+ -+ if (!IMGFMT_IS_VAAPI(g_image_format)) -+ return VO_FALSE; -+ -+ surface = get_surface(mpi); -+ if (!surface) -+ return VO_FALSE; -+ -+ mpi->flags |= MP_IMGFLAG_DIRECT; -+ mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = mpi->stride[3] = 0; -+ mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = mpi->planes[3] = NULL; -+ mpi->planes[0] = (char *)surface; -+ mpi->planes[3] = (char *)(uintptr_t)surface->id; -+ mpi->num_planes = 1; -+ mpi->priv = surface; -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] get_image(): surface 0x%08x\n", surface->id); -+ -+ return VO_TRUE; -+} -+ -+static int put_image(mp_image_t *mpi, struct vaapi_surface *surface) -+{ -+ VAStatus status; -+ -+ if ((mpi->flags & (MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV)) != (MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV)) -+ return VO_FALSE; -+ -+ if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { -+ if (!draw_slice(mpi->planes, mpi->stride, mpi->w, mpi->h, 0, 0)) -+ return VO_FALSE; -+ } -+ -+ if (!surface->is_bound) { -+ status = vaPutImage2(va_context->display, -+ surface->id, -+ surface->image.image_id, -+ mpi->x, mpi->y, mpi->w, mpi->h, -+ mpi->x, mpi->y, mpi->w, mpi->h); -+ if (!check_status(status, "vaPutImage()")) -+ return VO_FALSE; -+ } -+ -+ return VO_TRUE; -+} -+ -+static uint32_t draw_image(mp_image_t *mpi) -+{ -+ struct vaapi_surface *surface = (struct vaapi_surface *)mpi->priv; -+ -+ g_image_fields = mpi->fields; -+ -+ if (!IMGFMT_IS_VAAPI(mpi->imgfmt)) { -+ /* XXX: no direct rendering in non-accelerated mode */ -+ surface = va_free_surfaces[g_output_surface]; -+ if (!put_image(mpi, surface)) -+ return VO_FALSE; -+ } -+ -+ mp_msg(MSGT_VO, MSGL_DBG2, "[vo_vaapi] draw_image(): surface 0x%08x\n", surface->id); -+ -+ g_output_surfaces[g_output_surface] = surface; -+ -+ if (cpu_stats) { -+ static uint64_t ticks; -+ if ((ticks++ % 30) == 0) { -+ cpu_frequency = get_cpu_frequency(); -+ cpu_usage = get_cpu_usage(CPU_USAGE_QUANTUM); -+ } -+ } -+ return VO_TRUE; -+} -+ -+static void check_events(void) -+{ -+ int events = vo_x11_check_events(mDisplay); -+ -+ if (events & VO_EVENT_RESIZE) -+ resize(); -+ -+ if ((events & (VO_EVENT_EXPOSE|VO_EVENT_RESIZE)) && g_is_paused) { -+ /* Redraw the last visible buffer */ -+ if (g_is_visible) { -+ struct vaapi_surface *surface = g_output_surfaces[g_output_surface]; -+ if (surface) -+ put_surface(surface); -+ } -+ } -+} -+ -+static VADisplayAttribute *get_display_attribute(const char *name) -+{ -+ VADisplayAttribute *attr; -+ if (!strcasecmp(name, "brightness")) -+ attr = &va_equalizer.brightness; -+ else if (!strcasecmp(name, "contrast")) -+ attr = &va_equalizer.contrast; -+ else if (!strcasecmp(name, "saturation")) -+ attr = &va_equalizer.saturation; -+ else if (!strcasecmp(name, "hue")) -+ attr = &va_equalizer.hue; -+ else -+ attr = NULL; -+ return attr; -+} -+ -+static int get_equalizer(const char *name, int *value) -+{ -+ VADisplayAttribute * const attr = get_display_attribute(name); -+ int r; -+ -+ if (!attr || !(attr->flags & VA_DISPLAY_ATTRIB_GETTABLE)) -+ return VO_NOTIMPL; -+ -+ /* normalize to -100 .. 100 range */ -+ r = attr->max_value - attr->min_value; -+ if (r == 0) -+ return VO_NOTIMPL; -+ *value = ((attr->value - attr->min_value) * 200) / r - 100; -+ return VO_TRUE; -+} -+ -+static int set_equalizer(const char *name, int value) -+{ -+ VADisplayAttribute * const attr = get_display_attribute(name); -+ VAStatus status; -+ int r; -+ -+ if (!attr || !(attr->flags & VA_DISPLAY_ATTRIB_SETTABLE)) -+ return VO_NOTIMPL; -+ -+ /* normalize to attribute value range */ -+ r = attr->max_value - attr->min_value; -+ if (r == 0) -+ return VO_NOTIMPL; -+ attr->value = ((value + 100) * r) / 200 + attr->min_value; -+ -+ status = vaSetDisplayAttributes(va_context->display, attr, 1); -+ if (!check_status(status, "vaSetDisplayAttributes()")) -+ return VO_FALSE; -+ return VO_TRUE; -+} -+ -+static int control(uint32_t request, void *data, ...) -+{ -+ switch (request) { -+ case VOCTRL_GET_DEINTERLACE: -+ *(int*)data = g_deint; -+ return VO_TRUE; -+ case VOCTRL_SET_DEINTERLACE: -+ g_deint = *(int*)data; -+ if (g_deint) -+ g_deint = g_deint_type; -+ return VO_TRUE; -+ case VOCTRL_PAUSE: -+ return (g_is_paused = 1); -+ case VOCTRL_RESUME: -+ return (g_is_paused = 0); -+ case VOCTRL_QUERY_FORMAT: -+ return query_format(*((uint32_t *)data)); -+ case VOCTRL_GET_IMAGE: -+ return get_image(data); -+ case VOCTRL_DRAW_IMAGE: -+ return draw_image(data); -+ case VOCTRL_GUISUPPORT: -+ return VO_TRUE; -+ case VOCTRL_BORDER: -+ vo_x11_border(); -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_FULLSCREEN: -+ vo_x11_fullscreen(); -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_SET_EQUALIZER: { -+ va_list ap; -+ int value; -+ -+ va_start(ap, data); -+ value = va_arg(ap, int); -+ -+ va_end(ap); -+ return set_equalizer(data, value); -+ } -+ case VOCTRL_GET_EQUALIZER: { -+ va_list ap; -+ int *value; -+ -+ va_start(ap, data); -+ value = va_arg(ap, int *); -+ -+ va_end(ap); -+ return get_equalizer(data, value); -+ } -+ case VOCTRL_ONTOP: -+ vo_x11_ontop(); -+ return VO_TRUE; -+ case VOCTRL_UPDATE_SCREENINFO: -+ update_xinerama_info(); -+ return VO_TRUE; -+ case VOCTRL_GET_PANSCAN: -+ return VO_TRUE; -+ case VOCTRL_SET_PANSCAN: -+ resize(); -+ return VO_TRUE; -+ case VOCTRL_GET_HWACCEL_CONTEXT: -+ *((void **)data) = va_context; -+ return VO_TRUE; -+ case VOCTRL_DRAW_EOSD: -+ if (!data) -+ return VO_FALSE; -+ draw_eosd(data); -+ return VO_TRUE; -+ case VOCTRL_GET_EOSD_RES: { -+ mp_eosd_res_t *r = data; -+ r->mt = r->mb = r->ml = r->mr = 0; -+ r->srcw = g_image_width; -+ r->srch = g_image_height; -+ r->w = g_image_width; -+ r->h = g_image_height; -+ return VO_TRUE; -+ } -+ } -+ return VO_NOTIMPL; -+} diff --git a/media-video/mplayer/files/vaapi/02-mplayer-vaapi-gma500-workaround.patch b/media-video/mplayer/files/vaapi/02-mplayer-vaapi-gma500-workaround.patch deleted file mode 100644 index 88ca8da38..000000000 --- a/media-video/mplayer/files/vaapi/02-mplayer-vaapi-gma500-workaround.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit 7d70d28f190e37cfa3a9a827877ddd6bb81408d3 -Author: Gwenole Beauchesne -Date: Mon Dec 28 08:52:56 2009 +0000 - - Add GMA500 workaround for H.264 DPB. This is disabled by default. Enable with GMA500_WORKAROUND=yes environment variable. - -diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c -index 9f440c0..0139d64 100644 ---- a/libavcodec/vaapi_h264.c -+++ b/libavcodec/vaapi_h264.c -@@ -28,6 +28,60 @@ - * structures for H.264 decoding. - */ - -+/** Parses ENV environment variable expecting "yes" | "no" values. */ -+static int getenv_yesno(const char *env, int *pval) -+{ -+ int val; -+ const char *env_str; -+ -+ env_str = getenv(env); -+ if (!env_str) -+ return -1; -+ -+ if (strcmp(env_str, "1") == 0 || strcmp(env_str, "yes") == 0) -+ val = 1; -+ else if (strcmp(env_str, "0") == 0 || strcmp(env_str, "no") == 0) -+ val = 0; -+ else -+ return -1; -+ -+ if (pval) -+ *pval = val; -+ return 0; -+} -+ -+/** -+ * Use old GMA500 workaround for DPB. It requires other pictures than -+ * those marked as "used for reference". -+ */ -+static int get_use_gma500_workaround(struct vaapi_context *vactx) -+{ -+ int gma500_workaround_env; -+ const char *vendor_string; -+ -+ if (getenv_yesno("GMA500_WORKAROUND", &gma500_workaround_env) < 0) -+ return 0; -+ if (!gma500_workaround_env) -+ return 0; -+ -+ vendor_string = vaQueryVendorString(vactx->display); -+ if (vendor_string && strstr(vendor_string, "Intel")) { -+ if (strstr(vendor_string, "GMA500")) -+ return 1; -+ if (strstr(vendor_string, "Embedded Graphics Driver")) -+ return 1; -+ } -+ return 0; -+} -+ -+static inline int use_gma500_workaround(struct vaapi_context *vactx) -+{ -+ static int gma500_workaround = -1; -+ if (gma500_workaround < 0) -+ gma500_workaround = get_use_gma500_workaround(vactx); -+ return gma500_workaround; -+} -+ - /** - * Initializes an empty VA API picture. - * -@@ -123,6 +177,7 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, - { - DPB dpb; - int i; -+ unsigned int list; - - dpb.size = 0; - dpb.max_size = FF_ARRAY_ELEMS(pic_param->ReferenceFrames); -@@ -130,6 +185,17 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, - for (i = 0; i < dpb.max_size; i++) - init_vaapi_pic(&dpb.va_pics[i]); - -+ if (use_gma500_workaround(h->s.avctx->hwaccel_context)) { -+ /* XXX: this is really wrong */ -+ for (list = 0; list < h->list_count; list++) -+ for (i = 0; i < (int)h->ref_count[list]; i++) { -+ Picture * const pic = &h->ref_list[list][i]; -+ if (pic->reference && dpb_add(&dpb, pic) < 0) -+ return -1; -+ } -+ return 0; -+ } -+ - for (i = 0; i < h->short_ref_count; i++) { - Picture * const pic = h->short_ref[i]; - if (pic && pic->reference && dpb_add(&dpb, pic) < 0) diff --git a/media-video/mplayer/files/vaapi/03-mplayer-vaapi-0.29.patch b/media-video/mplayer/files/vaapi/03-mplayer-vaapi-0.29.patch deleted file mode 100644 index ec483af08..000000000 --- a/media-video/mplayer/files/vaapi/03-mplayer-vaapi-0.29.patch +++ /dev/null @@ -1,675 +0,0 @@ -commit 5fbfa3b77f6b3f55cc61df16533324ebcf8e0b70 -Author: Gwenole Beauchesne -Date: Fri Feb 12 11:03:00 2010 +0000 - - Add compatibility with original VA-API 0.29. - -diff --git a/configure b/configure -index 8011680..f7ce215 100755 ---- a/configure -+++ b/configure -@@ -6167,20 +6167,35 @@ fi #if os2 - echocheck "VA-API" - if test "$_vaapi" = yes -o "$_vaapi" = auto; then - _vaapi=no -+ _vaapi_old=no - cat > $TMPC < - int main(void) { (void) vaGetDisplay(0); return 0; } - EOF -- cc_check -lva-x11 && _vaapi=yes -+ cc_check -lva-x11 && _vaapi=yes || { -+ cat > $TMPC < -+int main(void) { (void) vaGetDisplay(0); return 0; } -+EOF -+ cc_check -lva && _vaapi=yes _vaapi_old=yes -+ } - fi - - if test "$_vaapi" = yes ; then - def_vaapi='#define CONFIG_VAAPI 1' -- libs_mencoder="$libs_mencoder -lva" -- libs_mplayer="$libs_mplayer -lva-x11 -lva" -+ if test "$_vaapi_old" = no ; then -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 0' -+ libs_mencoder="$libs_mencoder -lva" -+ libs_mplayer="$libs_mplayer -lva-x11 -lva" -+ else -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 1' -+ _mencoder="no" -+ libs_mplayer="$libs_mplayer -lva" -+ fi - vomodules="vaapi $vomodules" - else - def_vaapi='#define CONFIG_VAAPI 0' -+ def_vaapi_old='#define CONFIG_VAAPI_OLD 0' - novomodules="vaapi $novomodules" - _libavhwaccels=`echo $_libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VAAPI_HWACCEL//g"` - fi -@@ -8862,6 +8877,7 @@ CONFIG_MLIB = $_mlib - CONFIG_MUXERS = $_mencoder - CONFIG_POSTPROC = yes - CONFIG_VAAPI = $_vaapi -+CONFIG_VAAPI_OLD= $_vaapi_old - CONFIG_VDPAU = $_vdpau - CONFIG_XVMC = $_xvmc - CONFIG_ZLIB = $_zlib -@@ -9241,6 +9257,7 @@ $def_tdfxvid - $def_tga - $def_v4l2 - $def_vaapi -+$def_vaapi_old - $def_vaapi_glx - $def_vdpau - $def_vesa -diff --git a/libavcodec/vaapi_compat.h b/libavcodec/vaapi_compat.h -new file mode 100644 -index 0000000..f463118 ---- /dev/null -+++ b/libavcodec/vaapi_compat.h -@@ -0,0 +1,92 @@ -+/* -+ * Video Acceleration API (video decoding) -+ * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 -+ * -+ * Copyright (C) 2008-2009 Splitted-Desktop Systems -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_VAAPI_COMPAT_H -+#define AVCODEC_VAAPI_COMPAT_H -+ -+/* Compatibility glue with original VA-API 0.29 */ -+#if CONFIG_VAAPI_OLD -+typedef struct _VASliceParameterBufferBase { -+ unsigned int slice_data_size; -+ unsigned int slice_data_offset; -+ unsigned int slice_data_flag; -+} VASliceParameterBufferBase; -+#endif -+ -+#ifndef VA_CHECK_VERSION -+#define VA_MAJOR_VERSION 0 -+#define VA_MINOR_VERSION 29 -+#define VA_CHECK_VERSION(major,minor,micro) \ -+ (VA_MAJOR_VERSION > (major) || \ -+ (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \ -+ (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro))) -+#endif -+ -+#ifndef VA_FOURCC -+#define VA_FOURCC(ch0, ch1, ch2, ch3) \ -+ ((uint32_t)(uint8_t)(ch0) | \ -+ ((uint32_t)(uint8_t)(ch1) << 8) | \ -+ ((uint32_t)(uint8_t)(ch2) << 16) | \ -+ ((uint32_t)(uint8_t)(ch3) << 24 )) -+#endif -+ -+#ifndef VA_INVALID_ID -+#define VA_INVALID_ID 0xffffffff -+#endif -+#ifndef VA_INVALID_SURFACE -+#define VA_INVALID_SURFACE VA_INVALID_ID -+#endif -+ -+/* Compatibility glue with VA-API >= 0.31 */ -+#if VA_CHECK_VERSION(0,31,0) -+#define vaSyncSurface(dpy, context, surface) (vaSyncSurface)((dpy), (surface)) -+#define vaPutImage2 vaPutImage -+#define vaAssociateSubpicture2 vaAssociateSubpicture -+#endif -+ -+/* Used in codec implementation to set up the right bit-fields */ -+#if CONFIG_VAAPI_OLD -+# define BFV(a, b) a -+# define BFM(a, b, c) c -+# define BFMP(p, a, b, c) p##_##c -+# define NEW(x) /* nothing */ -+#else -+# define BFV(a, b) a.b -+# define BFM(a, b, c) a.b.c -+# define BFMP(p, a, b, c) a.b.c -+# define NEW(x) x -+#endif -+ -+#if CONFIG_VAAPI_OLD -+# define V_raw_coding raw_coding_flag -+# define M_raw_coding raw_coding -+# define V_bitplane_present bitplane_present_flag -+# define M_bitplane_present bitplane_present -+#else -+# define V_raw_coding raw_coding -+# define M_raw_coding raw_coding -+# define V_bitplane_present bitplane_present -+# define M_bitplane_present bitplane_present -+#endif -+ -+#endif /* AVCODEC_VAAPI_COMPAT_H */ -diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c -index b61a9ca..cab6e41 100644 ---- a/libavcodec/vaapi_h264.c -+++ b/libavcodec/vaapi_h264.c -@@ -123,8 +123,8 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic, - if (pic_structure == 0) - pic_structure = pic->reference; - -- va_pic->picture_id = ff_vaapi_get_surface_id(pic); -- va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -+ va_pic->picture_id = ff_vaapi_get_surface_id(pic); -+ NEW(va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num); - - va_pic->flags = 0; - if (pic_structure != PICT_FRAME) -@@ -317,42 +317,42 @@ static int start_frame(AVCodecContext *avctx, - fill_vaapi_pic(&pic_param->CurrPic, s->current_picture_ptr, s->picture_structure); - if (fill_vaapi_ReferenceFrames(pic_param, h) < 0) - return -1; -- pic_param->picture_width_in_mbs_minus1 = s->mb_width - 1; -- pic_param->picture_height_in_mbs_minus1 = s->mb_height - 1; -- pic_param->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; -- pic_param->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; -- pic_param->num_ref_frames = h->sps.ref_frame_count; -- pic_param->seq_fields.value = 0; /* reset all bits */ -- pic_param->seq_fields.bits.chroma_format_idc = h->sps.chroma_format_idc; -- pic_param->seq_fields.bits.residual_colour_transform_flag = h->sps.residual_color_transform_flag; /* XXX: only for 4:4:4 high profile? */ -- pic_param->seq_fields.bits.gaps_in_frame_num_value_allowed_flag = h->sps.gaps_in_frame_num_allowed_flag; -- pic_param->seq_fields.bits.frame_mbs_only_flag = h->sps.frame_mbs_only_flag; -- pic_param->seq_fields.bits.mb_adaptive_frame_field_flag = h->sps.mb_aff; -- pic_param->seq_fields.bits.direct_8x8_inference_flag = h->sps.direct_8x8_inference_flag; -- pic_param->seq_fields.bits.MinLumaBiPredSize8x8 = h->sps.level_idc >= 31; /* A.3.3.2 */ -- pic_param->seq_fields.bits.log2_max_frame_num_minus4 = h->sps.log2_max_frame_num - 4; -- pic_param->seq_fields.bits.pic_order_cnt_type = h->sps.poc_type; -- pic_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 = h->sps.log2_max_poc_lsb - 4; -- pic_param->seq_fields.bits.delta_pic_order_always_zero_flag = h->sps.delta_pic_order_always_zero_flag; -- pic_param->num_slice_groups_minus1 = h->pps.slice_group_count - 1; -- pic_param->slice_group_map_type = h->pps.mb_slice_group_map_type; -- pic_param->slice_group_change_rate_minus1 = 0; /* XXX: unimplemented in FFmpeg */ -- pic_param->pic_init_qp_minus26 = h->pps.init_qp - 26; -- pic_param->pic_init_qs_minus26 = h->pps.init_qs - 26; -- pic_param->chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; -- pic_param->second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; -- pic_param->pic_fields.value = 0; /* reset all bits */ -- pic_param->pic_fields.bits.entropy_coding_mode_flag = h->pps.cabac; -- pic_param->pic_fields.bits.weighted_pred_flag = h->pps.weighted_pred; -- pic_param->pic_fields.bits.weighted_bipred_idc = h->pps.weighted_bipred_idc; -- pic_param->pic_fields.bits.transform_8x8_mode_flag = h->pps.transform_8x8_mode; -- pic_param->pic_fields.bits.field_pic_flag = s->picture_structure != PICT_FRAME; -- pic_param->pic_fields.bits.constrained_intra_pred_flag = h->pps.constrained_intra_pred; -- pic_param->pic_fields.bits.pic_order_present_flag = h->pps.pic_order_present; -- pic_param->pic_fields.bits.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present; -- pic_param->pic_fields.bits.redundant_pic_cnt_present_flag = h->pps.redundant_pic_cnt_present; -- pic_param->pic_fields.bits.reference_pic_flag = h->nal_ref_idc != 0; -- pic_param->frame_num = h->frame_num; -+ pic_param->picture_width_in_mbs_minus1 = s->mb_width - 1; -+ pic_param->picture_height_in_mbs_minus1 = s->mb_height - 1; -+ pic_param->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; -+ pic_param->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; -+ pic_param->num_ref_frames = h->sps.ref_frame_count; -+ pic_param->BFV(seq_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(seq_fields,bits,chroma_format_idc) = h->sps.chroma_format_idc; -+ pic_param->BFM(seq_fields,bits,residual_colour_transform_flag) = h->sps.residual_color_transform_flag; /* XXX: only for 4:4:4 high profile? */ -+ NEW(pic_param->BFM(seq_fields,bits,gaps_in_frame_num_value_allowed_flag) = h->sps.gaps_in_frame_num_allowed_flag); -+ pic_param->BFM(seq_fields,bits,frame_mbs_only_flag) = h->sps.frame_mbs_only_flag; -+ pic_param->BFM(seq_fields,bits,mb_adaptive_frame_field_flag) = h->sps.mb_aff; -+ pic_param->BFM(seq_fields,bits,direct_8x8_inference_flag) = h->sps.direct_8x8_inference_flag; -+ pic_param->BFM(seq_fields,bits,MinLumaBiPredSize8x8) = h->sps.level_idc >= 31; /* A.3.3.2 */ -+ NEW(pic_param->BFM(seq_fields,bits,log2_max_frame_num_minus4) = h->sps.log2_max_frame_num - 4); -+ NEW(pic_param->BFM(seq_fields,bits,pic_order_cnt_type) = h->sps.poc_type); -+ NEW(pic_param->BFM(seq_fields,bits,log2_max_pic_order_cnt_lsb_minus4) = h->sps.log2_max_poc_lsb - 4); -+ NEW(pic_param->BFM(seq_fields,bits,delta_pic_order_always_zero_flag) = h->sps.delta_pic_order_always_zero_flag); -+ pic_param->num_slice_groups_minus1 = h->pps.slice_group_count - 1; -+ pic_param->slice_group_map_type = h->pps.mb_slice_group_map_type; -+ NEW(pic_param->slice_group_change_rate_minus1 = 0); /* XXX: unimplemented in FFmpeg */ -+ pic_param->pic_init_qp_minus26 = h->pps.init_qp - 26; -+ NEW(pic_param->pic_init_qs_minus26 = h->pps.init_qs - 26); -+ pic_param->chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; -+ pic_param->second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; -+ pic_param->BFV(pic_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(pic_fields,bits,entropy_coding_mode_flag) = h->pps.cabac; -+ pic_param->BFM(pic_fields,bits,weighted_pred_flag) = h->pps.weighted_pred; -+ pic_param->BFM(pic_fields,bits,weighted_bipred_idc) = h->pps.weighted_bipred_idc; -+ pic_param->BFM(pic_fields,bits,transform_8x8_mode_flag) = h->pps.transform_8x8_mode; -+ pic_param->BFM(pic_fields,bits,field_pic_flag) = s->picture_structure != PICT_FRAME; -+ pic_param->BFM(pic_fields,bits,constrained_intra_pred_flag) = h->pps.constrained_intra_pred; -+ NEW(pic_param->BFM(pic_fields,bits,pic_order_present_flag) = h->pps.pic_order_present); -+ NEW(pic_param->BFM(pic_fields,bits,deblocking_filter_control_present_flag) = h->pps.deblocking_filter_parameters_present); -+ NEW(pic_param->BFM(pic_fields,bits,redundant_pic_cnt_present_flag) = h->pps.redundant_pic_cnt_present); -+ NEW(pic_param->BFM(pic_fields,bits,reference_pic_flag) = h->nal_ref_idc != 0); -+ pic_param->frame_num = h->frame_num; - - /* Fill in VAIQMatrixBufferH264. */ - iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferH264)); -diff --git a/libavcodec/vaapi_internal.h b/libavcodec/vaapi_internal.h -index 2c0fdf9..ff83b96 100644 ---- a/libavcodec/vaapi_internal.h -+++ b/libavcodec/vaapi_internal.h -@@ -24,8 +24,14 @@ - #ifndef AVCODEC_VAAPI_INTERNAL_H - #define AVCODEC_VAAPI_INTERNAL_H - -+#include "config.h" -+#if CONFIG_VAAPI_OLD -+#include -+#else - #include -+#endif - #include "vaapi.h" -+#include "vaapi_compat.h" - #include "avcodec.h" - #include "mpegvideo.h" - -diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c -index 2e870dc..637546a 100644 ---- a/libavcodec/vaapi_mpeg2.c -+++ b/libavcodec/vaapi_mpeg2.c -@@ -52,24 +52,24 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferMPEG2)); - if (!pic_param) - return -1; -- pic_param->horizontal_size = s->width; -- pic_param->vertical_size = s->height; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->picture_coding_type = s->pict_type; -- pic_param->f_code = mpeg2_get_f_code(s); -- pic_param->picture_coding_extension.value = 0; /* reset all bits */ -- pic_param->picture_coding_extension.bits.intra_dc_precision = s->intra_dc_precision; -- pic_param->picture_coding_extension.bits.picture_structure = s->picture_structure; -- pic_param->picture_coding_extension.bits.top_field_first = s->top_field_first; -- pic_param->picture_coding_extension.bits.frame_pred_frame_dct = s->frame_pred_frame_dct; -- pic_param->picture_coding_extension.bits.concealment_motion_vectors = s->concealment_motion_vectors; -- pic_param->picture_coding_extension.bits.q_scale_type = s->q_scale_type; -- pic_param->picture_coding_extension.bits.intra_vlc_format = s->intra_vlc_format; -- pic_param->picture_coding_extension.bits.alternate_scan = s->alternate_scan; -- pic_param->picture_coding_extension.bits.repeat_first_field = s->repeat_first_field; -- pic_param->picture_coding_extension.bits.progressive_frame = s->progressive_frame; -- pic_param->picture_coding_extension.bits.is_first_field = mpeg2_get_is_frame_start(s); -+ pic_param->horizontal_size = s->width; -+ pic_param->vertical_size = s->height; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->picture_coding_type = s->pict_type; -+ pic_param->f_code = mpeg2_get_f_code(s); -+ pic_param->BFV(picture_coding_extension,value) = 0; /* reset all bits */ -+ pic_param->BFM(picture_coding_extension,bits,intra_dc_precision) = s->intra_dc_precision; -+ pic_param->BFM(picture_coding_extension,bits,picture_structure) = s->picture_structure; -+ pic_param->BFM(picture_coding_extension,bits,top_field_first) = s->top_field_first; -+ pic_param->BFM(picture_coding_extension,bits,frame_pred_frame_dct) = s->frame_pred_frame_dct; -+ pic_param->BFM(picture_coding_extension,bits,concealment_motion_vectors) = s->concealment_motion_vectors; -+ pic_param->BFM(picture_coding_extension,bits,q_scale_type) = s->q_scale_type; -+ pic_param->BFM(picture_coding_extension,bits,intra_vlc_format) = s->intra_vlc_format; -+ pic_param->BFM(picture_coding_extension,bits,alternate_scan) = s->alternate_scan; -+ pic_param->BFM(picture_coding_extension,bits,repeat_first_field) = s->repeat_first_field; -+ pic_param->BFM(picture_coding_extension,bits,progressive_frame) = s->progressive_frame; -+ pic_param->BFM(picture_coding_extension,bits,is_first_field) = mpeg2_get_is_frame_start(s); - - switch (s->pict_type) { - case FF_B_TYPE: -@@ -131,7 +131,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - if (!slice_param) - return -1; - slice_param->macroblock_offset = macroblock_offset; -- slice_param->slice_horizontal_position = s->mb_x; -+ NEW(slice_param->slice_horizontal_position = s->mb_x); - slice_param->slice_vertical_position = s->mb_y; - slice_param->quantiser_scale_code = quantiser_scale_code; - slice_param->intra_slice_flag = intra_slice_flag; -diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c -index 466ce2f..ea306a4 100644 ---- a/libavcodec/vaapi_mpeg4.c -+++ b/libavcodec/vaapi_mpeg4.c -@@ -54,42 +54,42 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferMPEG4)); - if (!pic_param) - return -1; -- pic_param->vop_width = s->width; -- pic_param->vop_height = s->height; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->vol_fields.value = 0; /* reset all bits */ -- pic_param->vol_fields.bits.short_video_header = avctx->codec->id == CODEC_ID_H263; -- pic_param->vol_fields.bits.chroma_format = CHROMA_420; -- pic_param->vol_fields.bits.interlaced = !s->progressive_sequence; -- pic_param->vol_fields.bits.obmc_disable = 1; -- pic_param->vol_fields.bits.sprite_enable = s->vol_sprite_usage; -- pic_param->vol_fields.bits.sprite_warping_accuracy = s->sprite_warping_accuracy; -- pic_param->vol_fields.bits.quant_type = s->mpeg_quant; -- pic_param->vol_fields.bits.quarter_sample = s->quarter_sample; -- pic_param->vol_fields.bits.data_partitioned = s->data_partitioning; -- pic_param->vol_fields.bits.reversible_vlc = s->rvlc; -- pic_param->vol_fields.bits.resync_marker_disable = !s->resync_marker; -- pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points; -+ pic_param->vop_width = s->width; -+ pic_param->vop_height = s->height; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->BFV(vol_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(vol_fields,bits,short_video_header) = avctx->codec->id == CODEC_ID_H263; -+ pic_param->BFM(vol_fields,bits,chroma_format) = CHROMA_420; -+ pic_param->BFM(vol_fields,bits,interlaced) = !s->progressive_sequence; -+ pic_param->BFM(vol_fields,bits,obmc_disable) = 1; -+ pic_param->BFM(vol_fields,bits,sprite_enable) = s->vol_sprite_usage; -+ pic_param->BFM(vol_fields,bits,sprite_warping_accuracy) = s->sprite_warping_accuracy; -+ pic_param->BFM(vol_fields,bits,quant_type) = s->mpeg_quant; -+ pic_param->BFM(vol_fields,bits,quarter_sample) = s->quarter_sample; -+ pic_param->BFM(vol_fields,bits,data_partitioned) = s->data_partitioning; -+ pic_param->BFM(vol_fields,bits,reversible_vlc) = s->rvlc; -+ NEW(pic_param->BFM(vol_fields,bits,resync_marker_disable) = !s->resync_marker); -+ pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points; - for (i = 0; i < s->num_sprite_warping_points && i < 3; i++) { -- pic_param->sprite_trajectory_du[i] = s->sprite_traj[i][0]; -- pic_param->sprite_trajectory_dv[i] = s->sprite_traj[i][1]; -+ pic_param->sprite_trajectory_du[i] = s->sprite_traj[i][0]; -+ pic_param->sprite_trajectory_dv[i] = s->sprite_traj[i][1]; - } -- pic_param->quant_precision = s->quant_precision; -- pic_param->vop_fields.value = 0; /* reset all bits */ -- pic_param->vop_fields.bits.vop_coding_type = s->pict_type - FF_I_TYPE; -- pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0; -- pic_param->vop_fields.bits.vop_rounding_type = s->no_rounding; -- pic_param->vop_fields.bits.intra_dc_vlc_thr = mpeg4_get_intra_dc_vlc_thr(s); -- pic_param->vop_fields.bits.top_field_first = s->top_field_first; -- pic_param->vop_fields.bits.alternate_vertical_scan_flag = s->alternate_scan; -- pic_param->vop_fcode_forward = s->f_code; -- pic_param->vop_fcode_backward = s->b_code; -- pic_param->vop_time_increment_resolution = avctx->time_base.den; -- pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s); -- pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob; -- pic_param->TRB = s->pb_time; -- pic_param->TRD = s->pp_time; -+ pic_param->quant_precision = s->quant_precision; -+ pic_param->BFV(vop_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(vop_fields,bits,vop_coding_type) = s->pict_type - FF_I_TYPE; -+ pic_param->BFM(vop_fields,bits,backward_reference_vop_coding_type) = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0; -+ pic_param->BFM(vop_fields,bits,vop_rounding_type) = s->no_rounding; -+ pic_param->BFM(vop_fields,bits,intra_dc_vlc_thr) = mpeg4_get_intra_dc_vlc_thr(s); -+ pic_param->BFM(vop_fields,bits,top_field_first) = s->top_field_first; -+ pic_param->BFM(vop_fields,bits,alternate_vertical_scan_flag) = s->alternate_scan; -+ pic_param->vop_fcode_forward = s->f_code; -+ pic_param->vop_fcode_backward = s->b_code; -+ NEW(pic_param->vop_time_increment_resolution = avctx->time_base.den); -+ pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s); -+ pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob; -+ pic_param->TRB = s->pb_time; -+ pic_param->TRD = s->pp_time; - - if (s->pict_type == FF_B_TYPE) - pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture); -@@ -98,7 +98,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ - - /* Fill in VAIQMatrixBufferMPEG4 */ - /* Only the first inverse quantisation method uses the weighthing matrices */ -- if (pic_param->vol_fields.bits.quant_type) { -+ if (pic_param->BFM(vol_fields,bits,quant_type)) { - iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferMPEG4)); - if (!iq_matrix) - return -1; -diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c -index 992e1da..8264dd9 100644 ---- a/libavcodec/vaapi_vc1.c -+++ b/libavcodec/vaapi_vc1.c -@@ -146,100 +146,100 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferVC1)); - if (!pic_param) - return -1; -- pic_param->forward_reference_picture = VA_INVALID_ID; -- pic_param->backward_reference_picture = VA_INVALID_ID; -- pic_param->inloop_decoded_picture = VA_INVALID_ID; -- pic_param->sequence_fields.value = 0; /* reset all bits */ -- pic_param->sequence_fields.bits.pulldown = v->broadcast; -- pic_param->sequence_fields.bits.interlace = v->interlace; -- pic_param->sequence_fields.bits.tfcntrflag = v->tfcntrflag; -- pic_param->sequence_fields.bits.finterpflag = v->finterpflag; -- pic_param->sequence_fields.bits.psf = v->psf; -- pic_param->sequence_fields.bits.multires = v->multires; -- pic_param->sequence_fields.bits.overlap = v->overlap; -- pic_param->sequence_fields.bits.syncmarker = s->resync_marker; -- pic_param->sequence_fields.bits.rangered = v->rangered; -- pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames; -- pic_param->coded_width = s->avctx->coded_width; -- pic_param->coded_height = s->avctx->coded_height; -- pic_param->entrypoint_fields.value = 0; /* reset all bits */ -- pic_param->entrypoint_fields.bits.broken_link = v->broken_link; -- pic_param->entrypoint_fields.bits.closed_entry = v->closed_entry; -- pic_param->entrypoint_fields.bits.panscan_flag = v->panscanflag; -- pic_param->entrypoint_fields.bits.loopfilter = s->loop_filter; -- pic_param->conditional_overlap_flag = v->condover; -- pic_param->fast_uvmc_flag = v->fastuvmc; -- pic_param->range_mapping_fields.value = 0; /* reset all bits */ -- pic_param->range_mapping_fields.bits.luma_flag = v->range_mapy_flag; -- pic_param->range_mapping_fields.bits.luma = v->range_mapy; -- pic_param->range_mapping_fields.bits.chroma_flag = v->range_mapuv_flag; -- pic_param->range_mapping_fields.bits.chroma = v->range_mapuv; -- pic_param->b_picture_fraction = v->bfraction_lut_index; -- pic_param->cbp_table = v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -- pic_param->mb_mode_table = 0; /* XXX: interlaced frame */ -- pic_param->range_reduction_frame = v->rangeredfrm; -- pic_param->rounding_control = v->rnd; -- pic_param->post_processing = v->postproc; -- pic_param->picture_resolution_index = v->respic; -- pic_param->luma_scale = v->lumscale; -- pic_param->luma_shift = v->lumshift; -- pic_param->picture_fields.value = 0; /* reset all bits */ -- pic_param->picture_fields.bits.picture_type = vc1_get_PTYPE(v); -- pic_param->picture_fields.bits.frame_coding_mode = v->fcm; -- pic_param->picture_fields.bits.top_field_first = v->tff; -- pic_param->picture_fields.bits.is_first_field = v->fcm == 0; /* XXX: interlaced frame */ -- pic_param->picture_fields.bits.intensity_compensation = v->mv_mode == MV_PMODE_INTENSITY_COMP; -- pic_param->raw_coding.value = 0; /* reset all bits */ -- pic_param->raw_coding.flags.mv_type_mb = v->mv_type_is_raw; -- pic_param->raw_coding.flags.direct_mb = v->dmb_is_raw; -- pic_param->raw_coding.flags.skip_mb = v->skip_is_raw; -- pic_param->raw_coding.flags.field_tx = 0; /* XXX: interlaced frame */ -- pic_param->raw_coding.flags.forward_mb = 0; /* XXX: interlaced frame */ -- pic_param->raw_coding.flags.ac_pred = v->acpred_is_raw; -- pic_param->raw_coding.flags.overflags = v->overflg_is_raw; -- pic_param->bitplane_present.value = 0; /* reset all bits */ -- pic_param->bitplane_present.flags.bp_mv_type_mb = vc1_has_MVTYPEMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_direct_mb = vc1_has_DIRECTMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_skip_mb = vc1_has_SKIPMB_bitplane(v); -- pic_param->bitplane_present.flags.bp_field_tx = 0; /* XXX: interlaced frame */ -- pic_param->bitplane_present.flags.bp_forward_mb = 0; /* XXX: interlaced frame */ -- pic_param->bitplane_present.flags.bp_ac_pred = vc1_has_ACPRED_bitplane(v); -- pic_param->bitplane_present.flags.bp_overflags = vc1_has_OVERFLAGS_bitplane(v); -- pic_param->reference_fields.value = 0; /* reset all bits */ -- pic_param->reference_fields.bits.reference_distance_flag = v->refdist_flag; -- pic_param->reference_fields.bits.reference_distance = 0; /* XXX: interlaced frame */ -- pic_param->reference_fields.bits.num_reference_pictures = 0; /* XXX: interlaced frame */ -- pic_param->reference_fields.bits.reference_field_pic_indicator = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.value = 0; /* reset all bits */ -- pic_param->mv_fields.bits.mv_mode = vc1_get_MVMODE(v); -- pic_param->mv_fields.bits.mv_mode2 = vc1_get_MVMODE2(v); -- pic_param->mv_fields.bits.mv_table = s->mv_table_index; -- pic_param->mv_fields.bits.two_mv_block_pattern_table = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.four_mv_switch = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.four_mv_block_pattern_table = 0; /* XXX: interlaced frame */ -- pic_param->mv_fields.bits.extended_mv_flag = v->extended_mv; -- pic_param->mv_fields.bits.extended_mv_range = v->mvrange; -- pic_param->mv_fields.bits.extended_dmv_flag = v->extended_dmv; -- pic_param->mv_fields.bits.extended_dmv_range = 0; /* XXX: interlaced frame */ -- pic_param->pic_quantizer_fields.value = 0; /* reset all bits */ -- pic_param->pic_quantizer_fields.bits.dquant = v->dquant; -- pic_param->pic_quantizer_fields.bits.quantizer = v->quantizer_mode; -- pic_param->pic_quantizer_fields.bits.half_qp = v->halfpq; -- pic_param->pic_quantizer_fields.bits.pic_quantizer_scale = v->pq; -- pic_param->pic_quantizer_fields.bits.pic_quantizer_type = v->pquantizer; -- pic_param->pic_quantizer_fields.bits.dq_frame = v->dquantfrm; -- pic_param->pic_quantizer_fields.bits.dq_profile = v->dqprofile; -- pic_param->pic_quantizer_fields.bits.dq_sb_edge = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0; -- pic_param->pic_quantizer_fields.bits.dq_db_edge = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0; -- pic_param->pic_quantizer_fields.bits.dq_binary_level = v->dqbilevel; -- pic_param->pic_quantizer_fields.bits.alt_pic_quantizer = v->altpq; -- pic_param->transform_fields.value = 0; /* reset all bits */ -- pic_param->transform_fields.bits.variable_sized_transform_flag = v->vstransform; -- pic_param->transform_fields.bits.mb_level_transform_type_flag = v->ttmbf; -- pic_param->transform_fields.bits.frame_level_transform_type = v->ttfrm; -- pic_param->transform_fields.bits.transform_ac_codingset_idx1 = v->c_ac_table_index; -- pic_param->transform_fields.bits.transform_ac_codingset_idx2 = v->y_ac_table_index; -- pic_param->transform_fields.bits.intra_transform_dc_table = v->s.dc_table_index; -+ pic_param->forward_reference_picture = VA_INVALID_ID; -+ pic_param->backward_reference_picture = VA_INVALID_ID; -+ pic_param->inloop_decoded_picture = VA_INVALID_ID; -+ pic_param->BFV(sequence_fields,value) = 0; /* reset all bits */ -+ NEW(pic_param->BFM(sequence_fields,bits,pulldown) = v->broadcast); -+ pic_param->BFM(sequence_fields,bits,interlace) = v->interlace; -+ NEW(pic_param->BFM(sequence_fields,bits,tfcntrflag) = v->tfcntrflag); -+ NEW(pic_param->BFM(sequence_fields,bits,finterpflag) = v->finterpflag); -+ NEW(pic_param->BFM(sequence_fields,bits,psf) = v->psf); -+ NEW(pic_param->BFM(sequence_fields,bits,multires) = v->multires); -+ pic_param->BFM(sequence_fields,bits,overlap) = v->overlap; -+ pic_param->BFM(sequence_fields,bits,syncmarker) = s->resync_marker; -+ NEW(pic_param->BFM(sequence_fields,bits,rangered) = v->rangered); -+ NEW(pic_param->BFM(sequence_fields,bits,max_b_frames) = s->avctx->max_b_frames); -+ pic_param->coded_width = s->avctx->coded_width; -+ pic_param->coded_height = s->avctx->coded_height; -+ NEW(pic_param->BFV(entrypoint_fields,value) = 0); /* reset all bits */ -+ pic_param->BFM(entrypoint_fields,bits,broken_link) = v->broken_link; -+ pic_param->BFM(entrypoint_fields,bits,closed_entry) = v->closed_entry; -+ NEW(pic_param->BFM(entrypoint_fields,bits,panscan_flag) = v->panscanflag); -+ pic_param->BFM(entrypoint_fields,bits,loopfilter) = s->loop_filter; -+ pic_param->conditional_overlap_flag = v->condover; -+ pic_param->fast_uvmc_flag = v->fastuvmc; -+ pic_param->BFV(range_mapping_fields,value) = 0; /* reset all bits */ -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,luma_flag) = v->range_mapy_flag; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,luma) = v->range_mapy; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,chroma_flag) = v->range_mapuv_flag; -+ pic_param->BFMP(range_mapping,range_mapping_fields,bits,chroma) = v->range_mapuv; -+ pic_param->b_picture_fraction = v->bfraction_lut_index; -+ pic_param->cbp_table = v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -+ pic_param->mb_mode_table = 0; /* XXX: interlaced frame */ -+ pic_param->range_reduction_frame = v->rangeredfrm; -+ pic_param->rounding_control = v->rnd; -+ pic_param->post_processing = v->postproc; -+ pic_param->picture_resolution_index = v->respic; -+ pic_param->luma_scale = v->lumscale; -+ pic_param->luma_shift = v->lumshift; -+ pic_param->BFV(picture_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(picture_fields,bits,picture_type) = vc1_get_PTYPE(v); -+ pic_param->BFM(picture_fields,bits,frame_coding_mode) = v->fcm; -+ pic_param->BFM(picture_fields,bits,top_field_first) = v->tff; -+ pic_param->BFM(picture_fields,bits,is_first_field) = v->fcm == 0; /* XXX: interlaced frame */ -+ pic_param->BFM(picture_fields,bits,intensity_compensation) = v->mv_mode == MV_PMODE_INTENSITY_COMP; -+ pic_param->BFV(V_raw_coding,value) = 0; /* reset all bits */ -+ pic_param->BFM(M_raw_coding,flags,mv_type_mb) = v->mv_type_is_raw; -+ pic_param->BFM(M_raw_coding,flags,direct_mb) = v->dmb_is_raw; -+ pic_param->BFM(M_raw_coding,flags,skip_mb) = v->skip_is_raw; -+ pic_param->BFM(M_raw_coding,flags,field_tx) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_raw_coding,flags,forward_mb) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_raw_coding,flags,ac_pred) = v->acpred_is_raw; -+ pic_param->BFM(M_raw_coding,flags,overflags) = v->overflg_is_raw; -+ pic_param->BFV(V_bitplane_present,value) = 0; /* reset all bits */ -+ pic_param->BFM(M_bitplane_present,flags,bp_mv_type_mb) = vc1_has_MVTYPEMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) = vc1_has_DIRECTMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) = vc1_has_SKIPMB_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_field_tx) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_bitplane_present,flags,bp_forward_mb) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(M_bitplane_present,flags,bp_ac_pred) = vc1_has_ACPRED_bitplane(v); -+ pic_param->BFM(M_bitplane_present,flags,bp_overflags) = vc1_has_OVERFLAGS_bitplane(v); -+ pic_param->BFV(reference_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(reference_fields,bits,reference_distance_flag) = v->refdist_flag; -+ pic_param->BFM(reference_fields,bits,reference_distance) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(reference_fields,bits,num_reference_pictures) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(reference_fields,bits,reference_field_pic_indicator) = 0; /* XXX: interlaced frame */ -+ pic_param->BFV(mv_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(mv_fields,bits,mv_mode) = vc1_get_MVMODE(v); -+ pic_param->BFM(mv_fields,bits,mv_mode2) = vc1_get_MVMODE2(v); -+ pic_param->BFM(mv_fields,bits,mv_table) = s->mv_table_index; -+ pic_param->BFM(mv_fields,bits,two_mv_block_pattern_table) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,four_mv_switch) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,four_mv_block_pattern_table) = 0; /* XXX: interlaced frame */ -+ pic_param->BFM(mv_fields,bits,extended_mv_flag) = v->extended_mv; -+ pic_param->BFM(mv_fields,bits,extended_mv_range) = v->mvrange; -+ pic_param->BFM(mv_fields,bits,extended_dmv_flag) = v->extended_dmv; -+ pic_param->BFM(mv_fields,bits,extended_dmv_range) = 0; /* XXX: interlaced frame */ -+ pic_param->BFV(pic_quantizer_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(pic_quantizer_fields,bits,dquant) = v->dquant; -+ pic_param->BFM(pic_quantizer_fields,bits,quantizer) = v->quantizer_mode; -+ pic_param->BFM(pic_quantizer_fields,bits,half_qp) = v->halfpq; -+ pic_param->BFM(pic_quantizer_fields,bits,pic_quantizer_scale) = v->pq; -+ pic_param->BFM(pic_quantizer_fields,bits,pic_quantizer_type) = v->pquantizer; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_frame) = v->dquantfrm; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_profile) = v->dqprofile; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_sb_edge) = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_db_edge) = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0; -+ pic_param->BFM(pic_quantizer_fields,bits,dq_binary_level) = v->dqbilevel; -+ pic_param->BFM(pic_quantizer_fields,bits,alt_pic_quantizer) = v->altpq; -+ pic_param->BFV(transform_fields,value) = 0; /* reset all bits */ -+ pic_param->BFM(transform_fields,bits,variable_sized_transform_flag) = v->vstransform; -+ pic_param->BFM(transform_fields,bits,mb_level_transform_type_flag) = v->ttmbf; -+ pic_param->BFM(transform_fields,bits,frame_level_transform_type) = v->ttfrm; -+ pic_param->BFM(transform_fields,bits,transform_ac_codingset_idx1) = v->c_ac_table_index; -+ pic_param->BFM(transform_fields,bits,transform_ac_codingset_idx2) = v->y_ac_table_index; -+ pic_param->BFM(transform_fields,bits,intra_transform_dc_table) = v->s.dc_table_index; - - switch (s->pict_type) { - case FF_B_TYPE: -@@ -250,29 +250,29 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t - break; - } - -- if (pic_param->bitplane_present.value) { -+ if (pic_param->BFV(V_bitplane_present,value)) { - uint8_t *bitplane; - const uint8_t *ff_bp[3]; - int x, y, n; - - switch (s->pict_type) { - case FF_P_TYPE: -- ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL; -- ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL; -- ff_bp[2] = pic_param->bitplane_present.flags.bp_mv_type_mb ? v->mv_type_mb_plane : NULL; -+ ff_bp[0] = pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) ? v->direct_mb_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) ? s->mbskip_table : NULL; -+ ff_bp[2] = pic_param->BFM(M_bitplane_present,flags,bp_mv_type_mb) ? v->mv_type_mb_plane : NULL; - break; - case FF_B_TYPE: - if (!v->bi_type) { -- ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL; -- ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL; -+ ff_bp[0] = pic_param->BFM(M_bitplane_present,flags,bp_direct_mb) ? v->direct_mb_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_skip_mb) ? s->mbskip_table : NULL; - ff_bp[2] = NULL; /* XXX: interlaced frame (FORWARD plane) */ - break; - } - /* fall-through (BI-type) */ - case FF_I_TYPE: - ff_bp[0] = NULL; /* XXX: interlaced frame (FIELDTX plane) */ -- ff_bp[1] = pic_param->bitplane_present.flags.bp_ac_pred ? v->acpred_plane : NULL; -- ff_bp[2] = pic_param->bitplane_present.flags.bp_overflags ? v->over_flags_plane : NULL; -+ ff_bp[1] = pic_param->BFM(M_bitplane_present,flags,bp_ac_pred) ? v->acpred_plane : NULL; -+ ff_bp[2] = pic_param->BFM(M_bitplane_present,flags,bp_overflags) ? v->over_flags_plane : NULL; - break; - default: - ff_bp[0] = NULL; -diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c -index 5f75b09..bbc95ff 100644 ---- a/libvo/vo_vaapi.c -+++ b/libvo/vo_vaapi.c -@@ -45,7 +45,11 @@ - #include - #include - #include -+#if CONFIG_VAAPI_OLD -+#include -+#else - #include -+#endif - #if CONFIG_VAAPI_GLX - #include - #endif diff --git a/media-video/mplayer/files/vaapi/04-mplayer-vdpau.patch b/media-video/mplayer/files/vaapi/04-mplayer-vdpau.patch deleted file mode 100644 index 083ca3b2d..000000000 --- a/media-video/mplayer/files/vaapi/04-mplayer-vdpau.patch +++ /dev/null @@ -1,1234 +0,0 @@ -diff --git a/configure b/configure -index 89a0a9a..c325521 100755 ---- a/configure -+++ b/configure -@@ -586,7 +586,7 @@ _libavparsers=$libavparsers_all - _libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') - _libavbsfs=$libavbsfs_all - _libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') --_libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL) echo $h;; esac; done) -+_libavhwaccels=$(for h in $libavhwaccels_all; do case $h in (*_VAAPI_HWACCEL|*_VDPAU_HWACCEL) echo $h;; esac; done) - _libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') - _libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//) - _libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]') -@@ -4593,7 +4593,7 @@ if test "$_vdpau" = yes ; then - else - def_vdpau='#define CONFIG_VDPAU 0' - novomodules="vdpau $novomodules" -- _libavdecoders=$(echo $_libavdecoders | sed -e "s/\(MPEG\|MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_DECODER//g") -+ _libavhwaccels=$(echo $_libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_HWACCEL//g") - fi - echores "$_vdpau" - -diff --git a/etc/codecs.conf b/etc/codecs.conf -index 8eece64..2db98e4 100644 ---- a/etc/codecs.conf -+++ b/etc/codecs.conf -@@ -136,6 +136,7 @@ videocodec ffmpeg1 - fourcc m1v1 - driver ffmpeg - dll "mpeg1video" -+ out VDPAU_MPEG1 - out YV12,I420,IYUV - - videocodec ffmpeg2 -@@ -173,6 +174,7 @@ videocodec ffmpeg2 - driver ffmpeg - dll "mpeg2video" - out VAAPI_MPEG2 -+ out VDPAU_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -213,6 +215,7 @@ videocodec ffmpeg12 - fourcc slif ; SoftLab MPEG-2 I-frames Codec - driver ffmpeg - dll "mpegvideo" -+ out VDPAU_MPEG1,VDPAU_MPEG2 - out YV12,I420,IYUV - out 422P,444P - -@@ -292,41 +295,6 @@ videocodec ffmpeg12mc - out IDCT_MPEG2 - out MOCO_MPEG2 - --videocodec ffmpeg12vdpau -- info "FFmpeg MPEG-1/2 (VDPAU)" -- status working -- format 0x10000001 ; MPEG-1 -- format 0x10000002 ; MPEG-2 -- fourcc mpg1,mpg2,MPG2 -- fourcc PIM1 ; Pinnacle hardware-MPEG-1 -- fourcc PIM2 ; Pinnacle hardware-MPEG-2 -- fourcc "DVR " -- fourcc hdv2 -- fourcc MPEG -- fourcc hdv1 -- fourcc hdv3 ; HDV 1080i50 -- fourcc hdv5 ; HDV 720p25 -- fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) -- fourcc hdv6,hdv7,hdv8 -- fourcc xdv1,xdv2,xdv3 -- fourcc xdv4,xdv5,xdv6 -- fourcc xdv7,xdv8,xdv9 -- fourcc xdva,xdvb,xdvc -- fourcc xdvd,xdve,xdvf -- fourcc xd5a,xd5b,xd5c -- fourcc xd5d,xd5e,xd5f -- fourcc xd59 -- fourcc mx5n,mx4n,mx4p -- fourcc mx3n,mx3p -- fourcc AVmp -- fourcc mp2v,mpgv -- fourcc LMP2 ; Lead mpeg2 in avi -- fourcc m2v1,m1v1 -- driver ffmpeg -- dll "mpegvideo_vdpau" -- out VDPAU_MPEG1 -- out VDPAU_MPEG2 -- - ; we have only native open source codecs for these: - - videocodec ffnuv -@@ -903,15 +871,8 @@ videocodec ffwmv3 - driver ffmpeg - dll wmv3 - out VAAPI_WMV3 -- out YV12,I420,IYUV -- --videocodec ffwmv3vdpau -- info "FFmpeg WMV3/WMV9 (VDPAU)" -- status buggy -- fourcc WMV3,wmv3 -- driver ffmpeg -- dll wmv3_vdpau - out VDPAU_WMV3 -+ out YV12,I420,IYUV - - videocodec ffvc1 - info "FFmpeg WVC1" -@@ -921,16 +882,8 @@ videocodec ffvc1 - driver ffmpeg - dll vc1 - out VAAPI_VC1 -- out YV12,I420,IYUV -- --videocodec ffvc1vdpau -- info "FFmpeg WVC1 (VDPAU)" -- status buggy -- fourcc WVC1,wvc1,WMVA -- fourcc vc-1,VC-1 -- driver ffmpeg -- dll vc1_vdpau - out VDPAU_VC1 -+ out YV12,I420,IYUV - - videocodec ffh264 - info "FFmpeg H.264" -@@ -943,19 +896,8 @@ videocodec ffh264 - driver ffmpeg - dll h264 - out VAAPI_H264 -- out YV12,I420,IYUV -- --videocodec ffh264vdpau -- info "FFmpeg H.264 (VDPAU)" -- status working -- fourcc H264,h264 -- fourcc X264,x264 -- fourcc avc1,AVC1 -- fourcc davc,DAVC -- format 0x10000005 -- driver ffmpeg -- dll h264_vdpau - out VDPAU_H264 -+ out YV12,I420,IYUV - - videocodec coreavcwindows - info "CoreAVC H.264 for x86 - http://corecodec.org/" -@@ -1013,40 +955,8 @@ videocodec ffodivx - driver ffmpeg - dll mpeg4 ;opendivx - out VAAPI_MPEG4 -- out YV12,I420,IYUV -- --videocodec ffodivxvdpau -- info "FFmpeg MPEG-4,DIVX-4/5 (VDPAU)" -- status working -- fourcc FMP4,fmp4 -- fourcc DIVX,divx -- fourcc DIV1,div1 divx -- fourcc MP4S,mp4s ; ISO MPEG-4 Video V1 -- fourcc M4S2,m4s2 -- fourcc xvid,XVID,XviD,XVIX -- fourcc DX50,dx50,BLZ0 DX50 -- fourcc mp4v,MP4V -- format 0x4 -- fourcc UMP4 -- fourcc RMP4 -- fourcc 3IV2,3iv2 ; 3ivx Delta 4 -- fourcc DXGM -- fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110 -- fourcc SMP4,smp4 ; Samsung SMP4 video codec -- fourcc VIDM ; vidm 4.01 codec -- format 0x10000004 ; mpeg 4 es -- fourcc m4cc,M4CC -- fourcc hdx4,HDX4 -- fourcc FVFW,fvfw -- fourcc FFDS -- fourcc DCOD,MVXM,EM4A,PM4V -- fourcc M4T3,DMK2,DIGI,INMC -- fourcc EPHV,SN40 -- fourcc uldx,ULDX,VSPX -- fourcc SIPP ; Samsung SHR-6040 -- driver ffmpeg -- dll mpeg4_vdpau - out VDPAU_MPEG4 -+ out YV12,I420,IYUV - - videocodec ffwv1f - info "WV1F MPEG-4" -diff --git a/fmt-conversion.c b/fmt-conversion.c -index bd32ce8..8994caa 100644 ---- a/fmt-conversion.c -+++ b/fmt-conversion.c -@@ -91,12 +91,6 @@ static const struct { - - {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC}, - {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT}, -- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1}, -- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2}, -- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264}, -- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, -- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, -- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, - - /* VA-API formats */ - {IMGFMT_VAAPI_MPEG2, PIX_FMT_VAAPI_VLD, CODEC_ID_MPEG2VIDEO}, -@@ -108,6 +102,14 @@ static const struct { - {IMGFMT_VAAPI_WMV3, PIX_FMT_VAAPI_VLD, CODEC_ID_WMV3}, - {IMGFMT_VAAPI_VC1, PIX_FMT_VAAPI_VLD, CODEC_ID_VC1}, - -+ /* VDPAU formats */ -+ {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU, CODEC_ID_MPEG1VIDEO}, -+ {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU, CODEC_ID_MPEG2VIDEO}, -+ {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU, CODEC_ID_MPEG4}, -+ {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU, CODEC_ID_H264}, -+ {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU, CODEC_ID_WMV3}, -+ {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU, CODEC_ID_VC1}, -+ - {0, PIX_FMT_NONE} - }; - -diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c -index f17d03a..185541e 100644 ---- a/libavcodec/allcodecs.c -+++ b/libavcodec/allcodecs.c -@@ -65,6 +65,13 @@ void avcodec_register_all(void) - REGISTER_HWACCEL (WMV3_DXVA2, wmv3_dxva2); - REGISTER_HWACCEL (WMV3_VAAPI, wmv3_vaapi); - -+ REGISTER_HWACCEL (H264_VDPAU, h264_vdpau); -+ REGISTER_HWACCEL (MPEG1_VDPAU, mpeg1_vdpau); -+ REGISTER_HWACCEL (MPEG2_VDPAU, mpeg2_vdpau); -+ REGISTER_HWACCEL (MPEG4_VDPAU, mpeg4_vdpau); -+ REGISTER_HWACCEL (VC1_VDPAU, vc1_vdpau); -+ REGISTER_HWACCEL (WMV3_VDPAU, wmv3_vdpau); -+ - /* video codecs */ - REGISTER_DECODER (AASC, aasc); - REGISTER_DECODER (AMV, amv); -@@ -113,7 +120,6 @@ void avcodec_register_all(void) - REGISTER_DECODER (H263I, h263i); - REGISTER_ENCODER (H263P, h263p); - REGISTER_DECODER (H264, h264); -- REGISTER_DECODER (H264_VDPAU, h264_vdpau); - REGISTER_ENCDEC (HUFFYUV, huffyuv); - REGISTER_DECODER (IDCIN, idcin); - REGISTER_DECODER (IFF_BYTERUN1, iff_byterun1); -@@ -137,10 +143,7 @@ void avcodec_register_all(void) - REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); - REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); - REGISTER_ENCDEC (MPEG4, mpeg4); -- REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau); - REGISTER_DECODER (MPEGVIDEO, mpegvideo); -- REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau); -- REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau); - REGISTER_ENCDEC (MSMPEG4V1, msmpeg4v1); - REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2); - REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3); -@@ -192,7 +195,6 @@ void avcodec_register_all(void) - REGISTER_DECODER (V210X, v210x); - REGISTER_DECODER (VB, vb); - REGISTER_DECODER (VC1, vc1); -- REGISTER_DECODER (VC1_VDPAU, vc1_vdpau); - REGISTER_DECODER (VCR1, vcr1); - REGISTER_DECODER (VMDVIDEO, vmdvideo); - REGISTER_DECODER (VMNC, vmnc); -@@ -206,7 +208,6 @@ void avcodec_register_all(void) - REGISTER_ENCDEC (WMV1, wmv1); - REGISTER_ENCDEC (WMV2, wmv2); - REGISTER_DECODER (WMV3, wmv3); -- REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau); - REGISTER_DECODER (WNV1, wnv1); - REGISTER_DECODER (XAN_WC3, xan_wc3); - REGISTER_DECODER (XL, xl); -diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h -index 48666f9..7635cf8 100644 ---- a/libavcodec/avcodec.h -+++ b/libavcodec/avcodec.h -@@ -643,10 +643,6 @@ typedef struct RcOverride{ - */ - #define CODEC_CAP_SMALL_LAST_FRAME 0x0040 - /** -- * Codec can export data for HW decoding (VDPAU). -- */ --#define CODEC_CAP_HWACCEL_VDPAU 0x0080 --/** - * Codec can output multiple frames per AVPacket - * Normally demuxers return one frame at a time, demuxers which do not do - * are connected to a parser to split what they return into proper frames. -diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c -index dc015b9..a36f7ac 100644 ---- a/libavcodec/error_resilience.c -+++ b/libavcodec/error_resilience.c -@@ -759,7 +759,6 @@ void ff_er_frame_end(MpegEncContext *s){ - - if(!s->error_recognition || s->error_count==0 || s->avctx->lowres || - s->avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || - s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled - s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return; - -diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c -index d9d6f7e..f7a21ed 100644 ---- a/libavcodec/h263dec.c -+++ b/libavcodec/h263dec.c -@@ -33,7 +33,6 @@ - #include "h263_parser.h" - #include "mpeg4video_parser.h" - #include "msmpeg4.h" --#include "vdpau_internal.h" - #include "flv.h" - #include "mpeg4video.h" - -@@ -619,11 +618,6 @@ retry: - if(MPV_frame_start(s, avctx) < 0) - return -1; - -- if (CONFIG_MPEG4_VDPAU_DECODER && (s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)) { -- ff_vdpau_mpeg4_decode_picture(s, s->gb.buffer, s->gb.buffer_end - s->gb.buffer); -- goto frame_end; -- } -- - if (avctx->hwaccel) { - if (avctx->hwaccel->start_frame(avctx, s->gb.buffer, s->gb.buffer_end - s->gb.buffer) < 0) - return -1; -diff --git a/libavcodec/h264.c b/libavcodec/h264.c -index d1662fc..72e00b6 100644 ---- a/libavcodec/h264.c -+++ b/libavcodec/h264.c -@@ -36,7 +36,6 @@ - #include "golomb.h" - #include "mathops.h" - #include "rectangle.h" --#include "vdpau_internal.h" - - #include "cabac.h" - -@@ -1650,9 +1649,6 @@ static void field_end(H264Context *h){ - s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264; - s->current_picture_ptr->pict_type= s->pict_type; - -- if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_set_reference_frames(s); -- - if(!s->dropable) { - ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); - h->prev_poc_msb= h->poc_msb; -@@ -1666,9 +1662,6 @@ static void field_end(H264Context *h){ - av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); - } - -- if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_picture_complete(s); -- - /* - * FIXME: Error handling code does not seem to support interlaced - * when slices span multiple rows -@@ -2710,8 +2703,6 @@ static void execute_decode_slices(H264Context *h, int context_count){ - - if (s->avctx->hwaccel) - return; -- if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- return; - if(context_count == 1) { - decode_slice(avctx, &h); - } else { -@@ -2847,8 +2838,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ - if (h->current_slice == 1) { - if (s->avctx->hwaccel && s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0) - return -1; -- if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_h264_picture_start(s); - } - - s->current_picture_ptr->key_frame |= -@@ -2863,11 +2852,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ - if (avctx->hwaccel->decode_slice(avctx, &buf[buf_index - consumed], consumed) < 0) - return -1; - }else -- if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- static const uint8_t start_code[] = {0x00, 0x00, 0x01}; -- ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code)); -- ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed ); -- }else - context_count++; - } - break; -@@ -3396,20 +3380,3 @@ AVCodec h264_decoder = { - .flush= flush_dpb, - .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - }; -- --#if CONFIG_H264_VDPAU_DECODER --AVCodec h264_vdpau_decoder = { -- "h264_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_H264, -- sizeof(H264Context), -- ff_h264_decode_init, -- NULL, -- ff_h264_decode_end, -- decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- .flush= flush_dpb, -- .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE}, --}; --#endif -diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c -index 0af24ad..8a2e93c 100644 ---- a/libavcodec/mpeg12.c -+++ b/libavcodec/mpeg12.c -@@ -35,7 +35,6 @@ - #include "mpeg12data.h" - #include "mpeg12decdata.h" - #include "bytestream.h" --#include "vdpau_internal.h" - #include "xvmc_internal.h" - - //#undef NDEBUG -@@ -1226,12 +1225,7 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx){ - - if(avctx->xvmc_acceleration) - return avctx->get_format(avctx,pixfmt_xvmc_mpg2_420); -- else if(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- if(avctx->codec_id == CODEC_ID_MPEG1VIDEO) -- return PIX_FMT_VDPAU_MPEG1; -- else -- return PIX_FMT_VDPAU_MPEG2; -- }else{ -+ else{ - if(s->chroma_format < 2) - return avctx->get_format(avctx,ff_hwaccel_pixfmt_list_420); - else if(s->chroma_format == 2) -@@ -1324,9 +1318,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ - avctx->pix_fmt = mpeg_get_pixelformat(avctx); - avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - //until then pix_fmt may be changed right after codec init -- if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || -- avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -+ if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel ) - if( avctx->idct_algo == FF_IDCT_AUTO ) - avctx->idct_algo = FF_IDCT_SIMPLE; - -@@ -2065,8 +2057,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) - avctx->pix_fmt = mpeg_get_pixelformat(avctx); - avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - -- if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -+ if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel ) - if( avctx->idct_algo == FF_IDCT_AUTO ) - avctx->idct_algo = FF_IDCT_SIMPLE; - -@@ -2297,9 +2288,6 @@ static int decode_chunks(AVCodecContext *avctx, - s2->error_count += s2->thread_context[i]->error_count; - } - -- if (CONFIG_MPEG_VDPAU_DECODER && avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count); -- - if (slice_end(avctx, picture)) { - if(s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice - *data_size = sizeof(AVPicture); -@@ -2446,11 +2434,6 @@ static int decode_chunks(AVCodecContext *avctx, - return -1; - } - -- if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) { -- s->slice_count++; -- break; -- } -- - if(avctx->thread_count > 1){ - int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count; - if(threshold <= mb_y){ -@@ -2578,36 +2561,3 @@ AVCodec mpeg_xvmc_decoder = { - }; - - #endif -- --#if CONFIG_MPEG_VDPAU_DECODER --AVCodec mpeg_vdpau_decoder = { -- "mpegvideo_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG2VIDEO, -- sizeof(Mpeg1Context), -- mpeg_decode_init, -- NULL, -- mpeg_decode_end, -- mpeg_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, -- .flush= flush, -- .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"), --}; --#endif -- --#if CONFIG_MPEG1_VDPAU_DECODER --AVCodec mpeg1_vdpau_decoder = { -- "mpeg1video_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG1VIDEO, -- sizeof(Mpeg1Context), -- mpeg_decode_init, -- NULL, -- mpeg_decode_end, -- mpeg_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, -- .flush= flush, -- .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), --}; --#endif -- -diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c -index b339f78..1928d03 100644 ---- a/libavcodec/mpeg4videodec.c -+++ b/libavcodec/mpeg4videodec.c -@@ -2249,20 +2249,3 @@ AVCodec mpeg4_decoder = { - .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), - .pix_fmts= ff_hwaccel_pixfmt_list_420, - }; -- -- --#if CONFIG_MPEG4_VDPAU_DECODER --AVCodec mpeg4_vdpau_decoder = { -- "mpeg4_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_MPEG4, -- sizeof(MpegEncContext), -- decode_init, -- NULL, -- ff_h263_decode_end, -- ff_h263_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), -- .pix_fmts= (const enum PixelFormat[]){PIX_FMT_VDPAU_MPEG4, PIX_FMT_NONE}, --}; --#endif -diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c -index 684bdfe..1bd9d5c 100644 ---- a/libavcodec/mpegvideo.c -+++ b/libavcodec/mpegvideo.c -@@ -116,6 +116,7 @@ const enum PixelFormat ff_pixfmt_list_420[] = { - const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = { - PIX_FMT_DXVA2_VLD, - PIX_FMT_VAAPI_VLD, -+ PIX_FMT_VDPAU, - PIX_FMT_YUV420P, - PIX_FMT_NONE - }; -@@ -1056,7 +1057,6 @@ void MPV_frame_end(MpegEncContext *s) - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){ - ff_xvmc_field_end(s); - }else if(!s->avctx->hwaccel -- && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) - && s->unrestricted_mv - && s->current_picture.reference - && !s->intra_only -diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c -index 8c9cbcd..dbf2ded 100644 ---- a/libavcodec/vc1dec.c -+++ b/libavcodec/vc1dec.c -@@ -37,7 +37,6 @@ - #include "unary.h" - #include "simple_idct.h" - #include "mathops.h" --#include "vdpau_internal.h" - - #undef NDEBUG - #include -@@ -3167,13 +3166,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, - s->current_picture_ptr= &s->picture[i]; - } - -- if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ -- if (v->profile < PROFILE_ADVANCED) -- avctx->pix_fmt = PIX_FMT_VDPAU_WMV3; -- else -- avctx->pix_fmt = PIX_FMT_VDPAU_VC1; -- } -- - //for advanced profile we may need to parse and unescape data - if (avctx->codec_id == CODEC_ID_VC1) { - int buf_size2 = 0; -@@ -3190,8 +3182,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, - if(size <= 0) continue; - switch(AV_RB32(start)){ - case VC1_CODE_FRAME: -- if (avctx->hwaccel || -- s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -+ if (avctx->hwaccel) - buf_start = start; - buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); - break; -@@ -3278,10 +3269,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, - s->me.qpel_put= s->dsp.put_qpel_pixels_tab; - s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab; - -- if ((CONFIG_VC1_VDPAU_DECODER) -- &&s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) -- ff_vdpau_vc1_decode_picture(s, buf_start, (buf + buf_size) - buf_start); -- else if (avctx->hwaccel) { -+ if (avctx->hwaccel) { - if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0) - return -1; - if (avctx->hwaccel->decode_slice(avctx, buf_start, (buf + buf_size) - buf_start) < 0) -@@ -3371,37 +3359,3 @@ AVCodec wmv3_decoder = { - .pix_fmts = ff_hwaccel_pixfmt_list_420 - }; - #endif -- --#if CONFIG_WMV3_VDPAU_DECODER --AVCodec wmv3_vdpau_decoder = { -- "wmv3_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_WMV3, -- sizeof(VC1Context), -- vc1_decode_init, -- NULL, -- vc1_decode_end, -- vc1_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- NULL, -- .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE} --}; --#endif -- --#if CONFIG_VC1_VDPAU_DECODER --AVCodec vc1_vdpau_decoder = { -- "vc1_vdpau", -- AVMEDIA_TYPE_VIDEO, -- CODEC_ID_VC1, -- sizeof(VC1Context), -- vc1_decode_init, -- NULL, -- vc1_decode_end, -- vc1_decode_frame, -- CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, -- NULL, -- .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), -- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE} --}; --#endif -diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c -index bd721e8..09ca45e 100644 ---- a/libavcodec/vdpau.c -+++ b/libavcodec/vdpau.c -@@ -30,7 +30,6 @@ - #include - - #include "vdpau.h" --#include "vdpau_internal.h" - - /** - * \addtogroup VDPAU_Decoding -@@ -38,15 +37,57 @@ - * @{ - */ - --void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) -+static void vdpau_h264_fill_field_order_cnt(int32_t field_order_cnt[2], Picture *pic, int pic_structure) - { -- H264Context *h = s->avctx->priv_data; -+ int i; -+ for (i = 0; i < 2; i++) { -+ const int poc = pic->field_poc[i]; -+ field_order_cnt[i] = poc != INT_MAX ? poc : 0; -+ } -+} -+ -+static void vdpau_h264_init_picture(VdpReferenceFrameH264 *rf) -+{ -+ rf->surface = VDP_INVALID_HANDLE; -+ rf->is_long_term = 0; -+ rf->top_is_reference = 0; -+ rf->bottom_is_reference = 0; -+ rf->field_order_cnt[0] = 0; -+ rf->field_order_cnt[1] = 0; -+ rf->frame_idx = 0; -+} -+ -+static void vdpau_h264_fill_picture(VdpReferenceFrameH264 *rf, Picture *pic, int pic_structure) -+{ -+ struct vdpau_render_state *render; -+ -+ assert(rf); -+ assert(pic); -+ -+ if (pic_structure == 0) -+ pic_structure = pic->reference; -+ -+ render = (struct vdpau_render_state *)pic->data[3]; -+ assert(render); -+ -+ rf->surface = render->surface; -+ rf->is_long_term = pic->reference && pic->long_ref; -+ rf->top_is_reference = (pic_structure & PICT_TOP_FIELD) != 0; -+ rf->bottom_is_reference = (pic_structure & PICT_BOTTOM_FIELD) != 0; -+ rf->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -+ -+ vdpau_h264_fill_field_order_cnt(rf->field_order_cnt, pic, pic_structure); -+} -+ -+static void vdpau_h264_set_reference_frames(H264Context *h) -+{ -+ MpegEncContext * const s = &h->s; - struct vdpau_render_state *render, *render_ref; - VdpReferenceFrameH264 *rf, *rf2; - Picture *pic; - int i, list, pic_frame_idx; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - rf = &render->info.h264.referenceFrames[0]; -@@ -62,7 +103,7 @@ void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) - continue; - pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; - -- render_ref = (struct vdpau_render_state *)pic->data[0]; -+ render_ref = (struct vdpau_render_state *)pic->data[3]; - assert(render_ref); - - rf2 = &render->info.h264.referenceFrames[0]; -@@ -84,81 +125,93 @@ void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) - if (rf >= &render->info.h264.referenceFrames[H264_RF_COUNT]) - continue; - -- rf->surface = render_ref->surface; -- rf->is_long_term = pic->long_ref; -- rf->top_is_reference = (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; -- rf->bottom_is_reference = (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; -- rf->field_order_cnt[0] = pic->field_poc[0]; -- rf->field_order_cnt[1] = pic->field_poc[1]; -- rf->frame_idx = pic_frame_idx; -+ vdpau_h264_fill_picture(rf, pic, pic->reference); - - ++rf; - } - } - -- for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) { -- rf->surface = VDP_INVALID_HANDLE; -- rf->is_long_term = 0; -- rf->top_is_reference = 0; -- rf->bottom_is_reference = 0; -- rf->field_order_cnt[0] = 0; -- rf->field_order_cnt[1] = 0; -- rf->frame_idx = 0; -- } -+ for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) -+ vdpau_h264_init_picture(rf); - } - --void ff_vdpau_add_data_chunk(MpegEncContext *s, -- const uint8_t *buf, int buf_size) -+static int vdpau_ensure_bitstream_buffers(struct vdpau_render_state *render) - { -- struct vdpau_render_state *render; -- -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -- assert(render); -- - render->bitstream_buffers= av_fast_realloc( - render->bitstream_buffers, - &render->bitstream_buffers_allocated, - sizeof(*render->bitstream_buffers)*(render->bitstream_buffers_used + 1) - ); - -- render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -- render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; -- render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; -- render->bitstream_buffers_used++; -+ if (!render->bitstream_buffers) -+ return -1; -+ -+ return 0; - } - --void ff_vdpau_h264_picture_start(MpegEncContext *s) -+static int vdpau_common_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) - { -- H264Context *h = s->avctx->priv_data; -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render; -- int i; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- for (i = 0; i < 2; ++i) { -- int foc = s->current_picture_ptr->field_poc[i]; -- if (foc == INT_MAX) -- foc = 0; -- render->info.h264.field_order_cnt[i] = foc; -+ render->bitstream_buffers_used = 0; -+ return 0; -+} -+ -+static int vdpau_common_end_frame(AVCodecContext *avctx) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (render->bitstream_buffers_used) { -+ ff_draw_horiz_band(s, 0, s->avctx->height); -+ render->bitstream_buffers_used = 0; - } -+ return 0; -+} - -- render->info.h264.frame_num = h->frame_num; -+static int vdpau_common_decode_slice(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_ensure_bitstream_buffers(render) < 0) -+ return -1; -+ -+ render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; -+ render->bitstream_buffers_used++; -+ return 0; - } - --void ff_vdpau_h264_picture_complete(MpegEncContext *s) -+static int vdpau_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -- H264Context *h = s->avctx->priv_data; -+ H264Context * const h = avctx->priv_data; -+ MpegEncContext * const s = &h->s; - struct vdpau_render_state *render; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- render->info.h264.slice_count = h->slice_num; -- if (render->info.h264.slice_count < 1) -- return; -+ vdpau_h264_set_reference_frames(h); - -- render->info.h264.is_reference = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE; -+ vdpau_h264_fill_field_order_cnt(render->info.h264.field_order_cnt, -+ s->current_picture_ptr, -+ s->picture_structure); -+ -+ /* fill VdpPictureInfoH264 struct */ -+ render->info.h264.is_reference = h->nal_ref_idc != 0; -+ render->info.h264.frame_num = h->frame_num; - render->info.h264.field_pic_flag = s->picture_structure != PICT_FRAME; - render->info.h264.bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD; - render->info.h264.num_ref_frames = h->sps.ref_frame_count; -@@ -185,19 +238,44 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s) - memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4)); - memcpy(render->info.h264.scaling_lists_8x8, h->pps.scaling_matrix8, sizeof(render->info.h264.scaling_lists_8x8)); - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+ render->info.h264.slice_count = 0; -+ -+ return vdpau_common_start_frame(avctx, buffer, size); - } - --void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, -- int buf_size, int slice_count) -+static int vdpau_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ static const uint8_t start_code_prefix_one_3byte[3] = { 0x00, 0x00, 0x01 }; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_ensure_bitstream_buffers(render) < 0) -+ return -1; -+ -+ render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream = start_code_prefix_one_3byte; -+ render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = sizeof(start_code_prefix_one_3byte); -+ render->bitstream_buffers_used++; -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.h264.slice_count; -+ return 0; -+} -+ -+static int vdpau_mpeg2_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render, *last, *next; - int i; - -- if (!s->current_picture_ptr) return; -+ if (!s->current_picture_ptr) return 0; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - /* fill VdpPictureInfoMPEG1Or2 struct */ -@@ -226,36 +304,47 @@ void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, - - switch(s->pict_type){ - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.mpeg.backward_reference = next->surface; - // no return here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - if (!last) // FIXME: Does this test make sense? - last = render; // predict second field from the first - render->info.mpeg.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ render->info.mpeg.slice_count = 0; - -- render->info.mpeg.slice_count = slice_count; -+ return vdpau_common_start_frame(avctx, buffer, size); -+} - -- if (slice_count) -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+static int vdpau_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ MpegEncContext * const s = avctx->priv_data; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.mpeg.slice_count; -+ return 0; - } - --void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, -- int buf_size) -+static int vdpau_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -- VC1Context *v = s->avctx->priv_data; -+ VC1Context * const v = avctx->priv_data; -+ MpegEncContext * const s = &v->s; - struct vdpau_render_state *render, *last, *next; - -- render = (struct vdpau_render_state *)s->current_picture.data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - -- /* fill LvPictureInfoVC1 struct */ -+ /* fill VdpPictureInfoVC1 struct */ - render->info.vc1.frame_coding_mode = v->fcm; - render->info.vc1.postprocflag = v->postprocflag; - render->info.vc1.pulldown = v->broadcast; -@@ -296,34 +385,47 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, - - switch(s->pict_type){ - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.vc1.backward_reference = next->surface; - // no break here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - if (!last) // FIXME: Does this test make sense? - last = render; // predict second field from the first - render->info.vc1.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ render->info.vc1.slice_count = 0; - -- render->info.vc1.slice_count = 1; -+ return vdpau_common_start_frame(avctx, buffer, size); -+} - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+static int vdpau_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ VC1Context * const v = avctx->priv_data; -+ MpegEncContext * const s = &v->s; -+ struct vdpau_render_state *render; -+ -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; -+ assert(render); -+ -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ ++render->info.vc1.slice_count; -+ return 0; - } - --void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, -- int buf_size) -+static int vdpau_mpeg4_decode_picture(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) - { -+ MpegEncContext * const s = avctx->priv_data; - struct vdpau_render_state *render, *last, *next; - int i; - -- if (!s->current_picture_ptr) return; -+ if (!s->current_picture_ptr) return 0; - -- render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; -+ render = (struct vdpau_render_state *)s->current_picture_ptr->data[3]; - assert(render); - - /* fill VdpPictureInfoMPEG4Part2 struct */ -@@ -352,21 +454,122 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, - - switch (s->pict_type) { - case FF_B_TYPE: -- next = (struct vdpau_render_state *)s->next_picture.data[0]; -+ next = (struct vdpau_render_state *)s->next_picture.data[3]; - assert(next); - render->info.mpeg4.backward_reference = next->surface; - render->info.mpeg4.vop_coding_type = 2; - // no break here, going to set forward prediction - case FF_P_TYPE: -- last = (struct vdpau_render_state *)s->last_picture.data[0]; -+ last = (struct vdpau_render_state *)s->last_picture.data[3]; - assert(last); - render->info.mpeg4.forward_reference = last->surface; - } - -- ff_vdpau_add_data_chunk(s, buf, buf_size); -+ if (vdpau_common_start_frame(avctx, buffer, size) < 0) -+ return -1; - -- ff_draw_horiz_band(s, 0, s->avctx->height); -- render->bitstream_buffers_used = 0; -+ if (vdpau_common_decode_slice(avctx, buffer, size) < 0) -+ return -1; -+ -+ return vdpau_common_end_frame(avctx); -+} -+ -+static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ /* The `buffer' can be modified beyond this point so we pass the -+ * whole picture now to the decoder and let user-applications catch -+ * up immediately */ -+ return vdpau_mpeg4_decode_picture(avctx, buffer, size); - } - -+static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) -+{ -+ /* SKIP: everything is done in vdpau_mpeg4_start_frame() */ -+ return 0; -+} -+ -+static int vdpau_mpeg4_end_frame(av_unused AVCodecContext *avctx) -+{ -+ /* SKIP: everything is done in vdpau_mpeg4_start_frame() */ -+ return 0; -+} -+ -+#if CONFIG_MPEG1_VDPAU_HWACCEL -+AVHWAccel mpeg1_vdpau_hwaccel = { -+ .name = "mpeg1_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG1VIDEO, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg2_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_mpeg2_decode_slice, -+}; -+#endif -+ -+#if CONFIG_MPEG2_VDPAU_HWACCEL -+AVHWAccel mpeg2_vdpau_hwaccel = { -+ .name = "mpeg2_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG2VIDEO, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg2_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_mpeg2_decode_slice, -+}; -+#endif -+ -+#if CONFIG_H264_VDPAU_HWACCEL -+AVHWAccel h264_vdpau_hwaccel = { -+ .name = "h264_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_H264, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_h264_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_h264_decode_slice, -+}; -+#endif -+ -+#if CONFIG_WMV3_VDPAU_HWACCEL -+AVHWAccel wmv3_vdpau_hwaccel = { -+ .name = "wmv3_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_WMV3, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_vc1_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_vc1_decode_slice, -+}; -+#endif -+ -+#if CONFIG_VC1_VDPAU_HWACCEL -+AVHWAccel vc1_vdpau_hwaccel = { -+ .name = "vc1_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_VC1, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_vc1_start_frame, -+ .end_frame = vdpau_common_end_frame, -+ .decode_slice = vdpau_vc1_decode_slice, -+}; -+#endif -+ -+#if CONFIG_MPEG4_VDPAU_HWACCEL -+AVHWAccel mpeg4_vdpau_hwaccel = { -+ .name = "mpeg4_vdpau", -+ .type = CODEC_TYPE_VIDEO, -+ .id = CODEC_ID_MPEG4, -+ .pix_fmt = PIX_FMT_VDPAU, -+ .capabilities = 0, -+ .start_frame = vdpau_mpeg4_start_frame, -+ .end_frame = vdpau_mpeg4_end_frame, -+ .decode_slice = vdpau_mpeg4_decode_slice, -+}; -+#endif -+ - /* @}*/ -diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c -index e2bc649..1c2b773 100644 ---- a/libavutil/pixdesc.c -+++ b/libavutil/pixdesc.c -@@ -787,7 +787,13 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { - .comp = { - {0,1,1,0,7}, /* Y */ - {0,1,2,0,7}, /* A */ -- }, -+ } -+ }, -+ [PIX_FMT_VDPAU] = { -+ .name = "vdpau", -+ .log2_chroma_w = 1, -+ .log2_chroma_h = 1, -+ .flags = PIX_FMT_HWACCEL, - }, - }; - -diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h -index 8ec91c8..2386a81 100644 ---- a/libavutil/pixfmt.h -+++ b/libavutil/pixfmt.h -@@ -133,6 +133,7 @@ enum PixelFormat { - PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1 - PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1 - PIX_FMT_Y400A, ///< 8bit gray, 8bit alpha -+ PIX_FMT_VDPAU, ///< HW decoding with VDPAU, Picture.data[3] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions - }; - -diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c -index 5b003fa..150e82c 100644 ---- a/libmpcodecs/vd_ffmpeg.c -+++ b/libmpcodecs/vd_ffmpeg.c -@@ -294,7 +294,7 @@ static int init(sh_video_t *sh){ - } - #endif /* CONFIG_VAAPI */ - #if CONFIG_VDPAU -- if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ -+ if(get_video_hwaccel() == HWACCEL_VDPAU){ - avctx->get_format = get_format; - } - #endif /* CONFIG_VDPAU */ -diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c -index 490644d..31c8064 100644 ---- a/libvo/vo_vdpau.c -+++ b/libvo/vo_vdpau.c -@@ -971,7 +971,7 @@ static int draw_slice(uint8_t *image[], int stride[], int w, int h, - int x, int y) - { - VdpStatus vdp_st; -- struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[0]; -+ struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[3]; - int max_refs = image_format == IMGFMT_VDPAU_H264 ? rndr->info.h264.num_ref_frames : 2; - - if (handle_preemption() < 0) -@@ -1074,10 +1074,10 @@ static uint32_t get_image(mp_image_t *mpi) - return VO_FALSE; - } - mpi->flags |= MP_IMGFLAG_DIRECT; -- mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = 0; -- mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = NULL; -+ mpi->stride[0] = mpi->stride[1] = mpi->stride[2] = mpi->stride[3] = 0; -+ mpi->planes[0] = mpi->planes[1] = mpi->planes[2] = mpi->planes[3] = NULL; - // hack to get around a check and to avoid a special-case in vd_ffmpeg.c -- mpi->planes[0] = (void *)rndr; -+ mpi->planes[0] = mpi->planes[3] = (void *)rndr; - mpi->num_planes = 1; - mpi->priv = rndr; - return VO_TRUE; diff --git a/media-video/mplayer/metadata.xml b/media-video/mplayer/metadata.xml deleted file mode 100644 index a9f41f045..000000000 --- a/media-video/mplayer/metadata.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - video - - media-video@gentoo.org - - - Enable 3dnowext cpu instructions - Internal SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support - Blinkenlights video output - Enable Bauer stereophonic-to-binaural headphone filter - Use libcdio for CD support (instead of cdparanoia) - Enables runtime cpudetection (useful for bindist, compatability on other CPUs) - Fine-tune custom CPU optimizations (UNSUPPORTED) - Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac. - Use forked libdvdnav, navigate menus in GUIs - Enable DXR3/H+ video output - Enables support for charset discovery and conversion - Use shared FFmpeg libraries instead of static bundled ones. Discouraged by upstream. - Use external faac library for AAC encoding - Use external faad library for AAC decoding - Build gmplayer, a GTK+ MPlayer gui (UNSUPPORTED) - Enables live.com streaming media support - Enables md5sum video output - Enables mmx2 support - MNG input support - Enables network streaming support - Enables support for the NUT container format - Enables Adaptive Multi-Rate format support - Enables support for on-screen display (OSD) menus - Add PNM video output option, to create PPM/PGM/PGMYUV images - Enable Video4Linux2 MPEG PVR - Enable V4L2 radio interface and support - Enable Unique RAR File Library - Adds real audo/video support - Enables usage of the linux real time clock. The alternative is software emulation of rtc - Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec). - Enable support for shm - faster floating point optimization for SSSE3 capable chips (Intel Core 2 and later chips) - Support for TV teletext interface - Enables Targa video output - Enable toolame MPEG-2 encoding - Enable internal support for Vorbis - Enable twolame MPEG-2 encoding - Enables experimental VDPAU support (requires nVidia video cards) to offload MPEG2/MPEG4/VC1/WMV CPU processing to video card - Support for vidix video output - Enables support for xanim based codecs - Enables X-Video Motion Compensation support - Enables ZR360[56]7/ZR36060 video output - - diff --git a/media-video/mplayer/mplayer-1.0_rc4_p20100612-r50.ebuild b/media-video/mplayer/mplayer-1.0_rc4_p20100612-r50.ebuild deleted file mode 100644 index 60885b420..000000000 --- a/media-video/mplayer/mplayer-1.0_rc4_p20100612-r50.ebuild +++ /dev/null @@ -1,755 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20100612.ebuild,v 1.7 2010/11/07 19:37:38 anarchy Exp $ - -EAPI="2" - -ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" -[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion" || SVN_ECLASS="" - -inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS} - -[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r30554 - -IUSE="3dnow 3dnowext +a52 aalib +alsa altivec +ass bidi bindist bl bs2b -+cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac directfb -doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon ftp -gif ggi -gmplayer +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa -libcaca lirc +live lzo mad md5sum +mmx mmxext mng +mp3 nas +network nut openal -amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime radio +rar +real +rtc -samba +shm +schroedinger sdl +speex sse sse2 ssse3 svga tga +theora +tremor -+truetype +toolame +twolame +unicode v4l v4l2 vaapi vdpau vidix +vorbis vpx -win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc zoran" -[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg" - -VIDEO_CARDS="s3virge mga tdfx vesa" -for x in ${VIDEO_CARDS}; do - IUSE+=" video_cards_${x}" -done - -BLUV="1.7" -SVGV="1.9.17" -AMR_URI="http://www.3gpp.org/ftp/Specs/archive" -FONT_URI=" - mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 -" -if [[ ${PV} == *9999* ]]; then - RELEASE_URI="" -else - RELEASE_URI="mirror://gentoo/${P}.tbz2" -fi -SRC_URI="${RELEASE_URI} - !truetype? ( ${FONT_URI} ) - gmplayer? ( mirror://mplayer/skins/Blue-${BLUV}.tar.bz2 ) - svga? ( mirror://gentoo/svgalib_helper-${SVGV}-mplayer.tar.gz )" - -DESCRIPTION="Media Player for Linux" -HOMEPAGE="http://www.mplayerhq.hu/" - -FONT_RDEPS=" - virtual/ttf-fonts - media-libs/fontconfig - >=media-libs/freetype-2.2.1:2 -" -X_RDEPS=" - x11-libs/libXext - x11-libs/libXxf86vm -" -[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )" -# Rar: althrought -gpl version is nice, it cant do most functions normal rars can -# nemesi? ( net-libs/libnemesi ) -RDEPEND+=" - sys-libs/ncurses - app-arch/bzip2 - sys-libs/zlib - !bindist? ( - x86? ( - win32codecs? ( media-libs/win32codecs ) - ) - ) - X? ( - ${X_RDEPS} - dga? ( x11-libs/libXxf86dga ) - ggi? ( - media-libs/libggi - media-libs/libggiwmh - ) - gmplayer? ( - media-libs/libpng - x11-libs/gtk+:2 - x11-libs/libXi - ) - opengl? ( virtual/opengl ) - vdpau? ( || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 ) ) - xinerama? ( x11-libs/libXinerama ) - xscreensaver? ( x11-libs/libXScrnSaver ) - xv? ( - x11-libs/libXv - xvmc? ( x11-libs/libXvMC ) - ) - ) - a52? ( media-libs/a52dec ) - aalib? ( media-libs/aalib ) - alsa? ( media-libs/alsa-lib ) - amr? ( !bindist? ( media-libs/opencore-amr ) ) - ass? ( ${FONT_RDEPS} media-libs/libass ) - bidi? ( dev-libs/fribidi ) - bs2b? ( media-libs/libbs2b ) - cdio? ( dev-libs/libcdio ) - cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) - dirac? ( media-video/dirac ) - directfb? ( dev-libs/DirectFB ) - dts? ( media-libs/libdca ) - dv? ( media-libs/libdv ) - dvb? ( media-tv/linuxtv-dvb-headers ) - encode? ( - !twolame? ( toolame? ( media-sound/toolame ) ) - twolame? ( media-sound/twolame ) - faac? ( media-libs/faac ) - mp3? ( media-sound/lame ) - x264? ( >=media-libs/x264-0.0.20100423 ) - xvid? ( media-libs/xvid ) - ) - esd? ( media-sound/esound ) - enca? ( app-i18n/enca ) - faad? ( media-libs/faad2 ) - gif? ( media-libs/giflib ) - iconv? ( virtual/libiconv ) - jack? ( media-sound/jack-audio-connection-kit ) - jpeg? ( virtual/jpeg ) - jpeg2k? ( media-libs/openjpeg ) - ladspa? ( media-libs/ladspa-sdk ) - libcaca? ( media-libs/libcaca ) - lirc? ( app-misc/lirc ) - live? ( media-plugins/live ) - lzo? ( >=dev-libs/lzo-2 ) - mad? ( media-libs/libmad ) - mng? ( media-libs/libmng ) - nas? ( media-libs/nas ) - nut? ( >=media-libs/libnut-661 ) - openal? ( media-libs/openal ) - png? ( media-libs/libpng ) - pnm? ( media-libs/netpbm ) - pulseaudio? ( media-sound/pulseaudio ) - rar? ( - || ( - app-arch/unrar - app-arch/rar - ) - ) - samba? ( net-fs/samba ) - schroedinger? ( media-libs/schroedinger ) - sdl? ( media-libs/libsdl ) - speex? ( media-libs/speex ) - svga? ( media-libs/svgalib ) - theora? ( media-libs/libtheora[encode?] ) - truetype? ( ${FONT_RDEPS} ) - vaapi? ( x11-libs/libva ) - vorbis? ( media-libs/libvorbis ) - vpx? ( media-libs/libvpx ) - xanim? ( media-video/xanim ) -" - -X_DEPS=" - x11-proto/videoproto - x11-proto/xf86vidmodeproto -" -ASM_DEP="dev-lang/yasm" -DEPEND="${RDEPEND} - dev-util/pkgconfig - X? ( - ${X_DEPS} - dga? ( x11-proto/xf86dgaproto ) - dxr3? ( media-video/em8300-libraries ) - gmplayer? ( x11-proto/xextproto ) - xinerama? ( x11-proto/xineramaproto ) - xscreensaver? ( x11-proto/scrnsaverproto ) - ) - amd64? ( ${ASM_DEP} ) - doc? ( - dev-libs/libxslt app-text/docbook-xml-dtd - app-text/docbook-xsl-stylesheets - ) - x86? ( ${ASM_DEP} ) - x86-fbsd? ( ${ASM_DEP} ) -" - -SLOT="0" -LICENSE="GPL-2" -if [[ ${PV} != *9999* ]]; then - KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~sparc ~x86" -else - KEYWORDS="" -fi - -PATCHES=( "${FILESDIR}"/vaapi/*.patch) - -pkg_setup() { - if [[ ${PV} == *9999* ]]; then - elog "" - elog "This is a live ebuild which installs the latest from upstream's" - elog "subversion repository, and is unsupported by Gentoo." - elog "Everything but bugs in the ebuild itself will be ignored." - elog "" - fi - - if use gmplayer; then - ewarn "" - ewarn "GMPlayer is no longer actively developed upstream" - ewarn "and is not supported by Gentoo. There are alternatives" - ewarn "for a GUI frontend: smplayer, gnome-mplayer or kmplayer." - fi - - if use cpudetection; then - ewarn "" - ewarn "You've enabled the cpudetection flag. This feature is" - ewarn "included mainly for people who want to use the same" - ewarn "binary on another system with a different CPU architecture." - ewarn "MPlayer will already detect your CPU settings by default at" - ewarn "buildtime; this flag is used for runtime detection." - ewarn "You won't need this turned on if you are only building" - ewarn "mplayer for this system. Also, if your compile fails, try" - ewarn "disabling this use flag." - fi - - if use custom-cpuopts; then - ewarn "" - ewarn "You are using the custom-cpuopts flag which will" - ewarn "specifically allow you to enable / disable certain" - ewarn "CPU optimizations." - ewarn "" - ewarn "Most desktop users won't need this functionality, but it" - ewarn "is included for corner cases like cross-compiling and" - ewarn "certain profiles. If unsure, disable this flag and MPlayer" - ewarn "will automatically detect and use your available CPU" - ewarn "optimizations." - ewarn "" - ewarn "Using this flag means your build is unsupported, so" - ewarn "please make sure your CPU optimization use flags (3dnow" - ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." - fi -} - -src_unpack() { - if [[ ${PV} = *9999* ]]; then - subversion_src_unpack - - cd "${WORKDIR}" - else - unpack ${A} - fi - - if ! use truetype; then - unpack font-arial-iso-8859-1.tar.bz2 \ - font-arial-iso-8859-2.tar.bz2 \ - font-arial-cp1250.tar.bz2 - fi - - use gmplayer && unpack "Blue-${BLUV}.tar.bz2" - use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.gz" -} - -src_prepare() { - if [[ ${PV} = *9999* ]]; then - # Set SVN version manually - subversion_wc_info - sed -i -e "s/UNKNOWN/${ESVN_WC_REVISION}/" "${S}/version.sh" || die - else - # Set version # - sed -i -e "s/UNKNOWN/${MPLAYER_REVISION}/" "${S}/version.sh" || die - fi - - if use svga; then - echo - einfo "Enabling vidix non-root mode." - einfo "(You need a proper svgalib_helper.o module for your kernel" - einfo "to actually use this)" - echo - - mv "${WORKDIR}/svgalib_helper" "${S}/libdha" - fi - - base_src_prepare -} - -src_configure() { - local myconf="" - local uses i - - # set LINGUAS - [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" - - # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable - # compilation in almost every situation. The reason for this is - # because if --enable is used, it will force the build of that option, - # regardless of whether the dependency is available or not. - - ################### - #Optional features# - ################### - myconf+=" - --disable-arts - --disable-kai - $(use_enable network) - $(use_enable joystick) - " - uses="ass bl enca ftp rtc" # nemesi <- not working with in-tree ebuild - myconf+=" --disable-nemesi" # nemesi automagic disable - myconf+=" --disable-ass-internal" # always use system libass - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use bidi || myconf+=" --disable-fribidi" - use ipv6 || myconf+=" --disable-inet6" - use nut || myconf+=" --disable-libnut" - use rar || myconf+=" --disable-unrarexec" - use samba || myconf+=" --disable-smb" - use svga || myconf+=" --disable-svga --disable-svgalib_helper" - if ! use lirc; then - myconf+=" - --disable-lirc - --disable-lircc - --disable-apple-ir - " - fi - - # libcdio support: prefer libcdio over cdparanoia - # don't check for cddb w/cdio - if use cdio; then - myconf+=" --disable-cdparanoia" - else - myconf+=" --disable-libcdio" - use cdparanoia || myconf+=" --disable-cdparanoia" - use cddb || myconf+=" --disable-cddb" - fi - - ################################ - # DVD read, navigation support # - ################################ - # - # dvdread - accessing a DVD - # dvdnav - navigation of menus - # - # internal dvdread and dvdnav use flags enable internal - # versions of the libraries, which are snapshots of the fork. - - if use dvd; then - use dvdnav || myconf+=" --disable-dvdnav" - else - myconf+=" - --disable-dvdnav - --disable-dvdread - --disable-dvdread-internal - --disable-libdvdcss-internal - " - fi - - ############# - # Subtitles # - ############# - # - # SRT/ASS/SSA (subtitles) requires freetype support - # freetype support requires iconv - # iconv optionally can use unicode - - if ! use ass; then - if ! use truetype; then - myconf+=" --disable-freetype" - if ! use iconv; then - myconf+=" - --disable-iconv - --charset=noconv - " - fi - fi - fi - use iconv && use unicode && myconf+=" --charset=UTF-8" - - ##################################### - # DVB / Video4Linux / Radio support # - ##################################### - myconf+=" --disable-tv-bsdbt848" - # broken upstream, won't work with recent kernels - myconf+=" --disable-ivtv" - if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then - use dvb || myconf+=" --disable-dvb" - use pvr || myconf+=" --disable-pvr" - use v4l || myconf+=" --disable-tv-v4l1" - use v4l2 || myconf+=" --disable-tv-v4l2" - if use radio && { use dvb || use v4l || use v4l2; }; then - myconf+=" - --enable-radio - $(use_enable encode radio-capture) - " - else - myconf+=" - --disable-radio-v4l2 - --disable-radio-bsdbt848 - " - fi - else - myconf+=" - --disable-tv - --disable-tv-v4l1 - --disable-tv-v4l2 - --disable-radio - --disable-radio-v4l2 - --disable-radio-bsdbt848 - --disable-dvb - --disable-v4l2 - --disable-pvr" - fi - - ########## - # Codecs # - ########## - myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support - myconf+=" --disable-faad-internal" # always use system media-libs/faad2 - use dirac || myconf+=" --disable-libdirac-lavc" - use dts || myconf+=" --disable-libdca" - if ! use mp3; then - myconf+=" - --disable-mp3lame - --disable-mp3lame-lavc - --disable-mp3lib - " - fi - uses="a52 bs2b dv lzo" - for i in ${uses}; do - use ${i} || myconf+=" --disable-lib${i}" - done - use schroedinger || myconf+=" --disable-libschroedinger-lavc" - # Disable opencore-amr with bindist - # https://bugs.gentoo.org/show_bug.cgi?id=299405#c6 - { use amr && use !bindist ; } || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb" - if ! use png && ! use gmplayer; then - myconf+=" --disable-png" - fi - - uses="faad gif jpeg live mad mng pnm speex tga theora xanim" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use jpeg2k || myconf+=" --disable-libopenjpeg" - if use vorbis || use tremor; then - use tremor || myconf+=" --disable-tremor-internal" - use vorbis || myconf+=" --disable-libvorbis" - else - myconf+=" - --disable-tremor-internal - --disable-tremor - --disable-libvorbis - " - fi - use vaapi && myconf+=" --enable-vaapi" - use vpx || myconf+=" --disable-libvpx-lavc" - # Encoding - uses="faac x264 xvid toolame twolame" - if use encode; then - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use faac || myconf+=" --disable-faac-lavc" - else - myconf+=" --disable-mencoder" - myconf+=" --disable-faac-lavc" - for i in ${uses}; do - myconf+=" --disable-${i}" - use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work." - done - fi - - ################# - # Binary codecs # - ################# - # bug 213836 - if ! use x86 || ! use win32codecs; then - use quicktime || myconf+=" --disable-qtx" - fi - - ###################### - # RealPlayer support # - ###################### - # Realplayer support shows up in four places: - # - libavcodec (internal) - # - win32codecs - # - realcodecs (win32codecs libs) - # - realcodecs (realplayer libs) - - # internal - use real || myconf+=" --disable-real" - - # Real binary codec support only available on x86, amd64 - if use real; then - use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" - use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" - elif ! use bindist; then - myconf+=" $(use_enable win32codecs win32dll)" - fi - - ################ - # Video Output # - ################ - uses="directfb md5sum sdl" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use aalib || myconf+=" --disable-aa" - use fbcon || myconf+=" --disable-fbdev" - use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" - use libcaca || myconf+=" --disable-caca" - use zoran || myconf+=" --disable-zr" - - if ! use kernel_linux && ! use video_cards_mga; then - myconf+=" --disable-mga --disable-xmga" - fi - - if use video_cards_tdfx; then - myconf+=" - $(use_enable video_cards_tdfx tdfxvid) - $(use_enable fbcon tdfxfb) - " - else - myconf+=" - --disable-3dfx - --disable-tdfxvid - --disable-tdfxfb - " - fi - - ################ - # Audio Output # - ################ - uses="alsa esd jack ladspa nas openal" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use pulseaudio || myconf+=" --disable-pulse" - if ! use radio; then - use oss || myconf+=" --disable-ossaudio" - fi - - #################### - # Advanced Options # - #################### - # Platform specific flags, hardcoded on amd64 (see below) - if use cpudetection; then - myconf+=" --enable-runtime-cpudetection" - fi - - # Turning off CPU optimizations usually will break the build. - # However, this use flag, if enabled, will allow users to completely - # specify which ones to use. If disabled, mplayer will automatically - # enable all CPU optimizations that the host build supports. - if use custom-cpuopts; then - uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" - for i in ${uses}; do - myconf+=" $(use_enable ${i})" - done - fi - - use debug && myconf+=" --enable-debug=3" - - if use x86 && gcc-specs-pie; then - filter-flags -fPIC -fPIE - append-ldflags -nopie - fi - - is-flag -O? || append-flags -O2 - if use x86 || use x86-fbsd; then - use debug || append-flags -fomit-frame-pointer - fi - - ########################### - # X enabled configuration # - ########################### - if use X; then - uses="dxr3 ggi xinerama" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use dga || myconf+=" --disable-dga1 --disable-dga2" - use opengl || myconf+=" --disable-gl" - use osdmenu && myconf+=" --enable-menu" - use vdpau || myconf+=" --disable-vdpau" - use video_cards_vesa || myconf+=" --disable-vesa" - use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" - use xscreensaver || myconf+=" --disable-xss" - - # GTK gmplayer gui - # Unsupported by Gentoo, upstream has dropped development - myconf+=" $(use_enable gmplayer gui)" - - if use xv; then - if use xvmc; then - myconf+=" --enable-xvmc --with-xvmclib=XvMCW" - else - myconf+=" --disable-xvmc" - fi - else - myconf+=" - --disable-xv - --disable-xvmc - " - use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled." - fi - else - myconf+=" - --disable-dga1 - --disable-dga2 - --disable-dxr3 - --disable-ggi - --disable-gl - --disable-vdpau - --disable-vidix - --disable-vidix-pcidb - --disable-xinerama - --disable-xss - --disable-xv - --disable-xvmc - --disable-x11 - " - uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv" - for i in ${uses}; do - use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work." - done - fi - - if [[ ${PV} == *9999* ]]; then - ################### - # External FFmpeg # - ################### - use external-ffmpeg && myconf+=" --disable-libavutil_a --disable-libavcodec_a --disable-libavformat_a --disable-libpostproc_a --disable-libswscale_a" - fi - - myconf="--cc=$(tc-getCC) \ - --host-cc=$(tc-getBUILD_CC) \ - --prefix=/usr \ - --confdir=/etc/mplayer \ - --datadir=/usr/share/mplayer \ - --libdir=/usr/$(get_libdir) \ - ${myconf}" - - CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" -} - -src_compile() { - base_src_compile - # Build only user-requested docs if they're available. - if use doc ; then - # select available languages from $LINGUAS - LINGUAS=${LINGUAS/zh/zh_CN} - local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" - local BUILT_DOCS="" - for i in ${LINGUAS} ; do - hasq ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" - done - if [[ -z $BUILT_DOCS ]] - then - emake -j1 -C DOCS/xml html-chunked || die "Failed to generate html docs" - else - for i in ${BUILT_DOCS} ; do - emake -j1 -C DOCS/xml html-chunked-${i} || die "Failed to generate html docs for ${i}" - done - fi - fi -} - -src_install() { - local i - - emake prefix="${D}/usr" \ - BINDIR="${D}/usr/bin" \ - LIBDIR="${D}/usr/$(get_libdir)" \ - CONFDIR="${D}/etc/mplayer" \ - DATADIR="${D}/usr/share/mplayer" \ - MANDIR="${D}/usr/share/man" \ - INSTALLSTRIP="" \ - install || die "emake install failed" - - dodoc AUTHORS Changelog Copyright README etc/codecs.conf || die - - docinto tech/ - dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} || die - docinto TOOLS/ - dodoc TOOLS/* || die - if use real; then - docinto tech/realcodecs/ - dodoc DOCS/tech/realcodecs/* || die - docinto TOOLS/realcodecs/ - dodoc TOOLS/realcodecs/* || die - fi - docinto tech/mirrors/ - dodoc DOCS/tech/mirrors/* || die - - if use doc; then - docinto html/ - dohtml -r "${S}"/DOCS/HTML/* || die - fi - - # Install the default Skin and Gnome menu entry - if use gmplayer; then - dodir /usr/share/mplayer/skins - cp -r "${WORKDIR}/Blue" \ - "${D}/usr/share/mplayer/skins/default" || die "cp skins died" - - # Fix the symlink - rm -rf "${D}/usr/bin/gmplayer" - dosym mplayer /usr/bin/gmplayer - fi - - if ! use ass && ! use truetype; then - dodir /usr/share/mplayer/fonts - # Do this generic, as the mplayer people like to change the structure - # of their zips ... - for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do - cp -pPR "${i}" "${D}/usr/share/mplayer/fonts" - done - # Fix the font symlink ... - rm -rf "${D}/usr/share/mplayer/font" - dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font - fi - - insinto /etc/mplayer - newins "${S}/etc/example.conf" mplayer.conf || die - doins "${S}/etc/input.conf" || die - if use osdmenu; then - doins "${S}/etc/menu.conf" || die - fi - - if use ass || use truetype; then - cat >> "${D}/etc/mplayer/mplayer.conf" << _EOF_ -fontconfig=1 -subfont-osd-scale=4 -subfont-text-scale=3 -_EOF_ - fi - - # bug 256203 - if use rar; then - cat >> "${D}/etc/mplayer/mplayer.conf" << _EOF_ -unrarexec=/usr/bin/unrar -_EOF_ - fi - - dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf - newbin "${S}/TOOLS/midentify.sh" midentify || die -} - -pkg_preinst() { - [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]] && \ - rm -rf "${ROOT}/usr/share/mplayer/Skin/default" -} - -pkg_postrm() { - # Cleanup stale symlinks - [ -L "${ROOT}/usr/share/mplayer/font" -a \ - ! -e "${ROOT}/usr/share/mplayer/font" ] && \ - rm -f "${ROOT}/usr/share/mplayer/font" - - [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \ - ! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ] && \ - rm -f "${ROOT}/usr/share/mplayer/subfont.ttf" -} diff --git a/media-video/mplayer/mplayer-1.0_rc4_p20101114-r50.ebuild b/media-video/mplayer/mplayer-1.0_rc4_p20101114-r50.ebuild deleted file mode 100644 index 6dce32644..000000000 --- a/media-video/mplayer/mplayer-1.0_rc4_p20101114-r50.ebuild +++ /dev/null @@ -1,740 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20101114.ebuild,v 1.1 2010/11/14 15:13:00 polynomial-c Exp $ - -EAPI=3 - -ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" -[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion" || SVN_ECLASS="" - -inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS} - -# BUMP ME PLZ, NO COOKIES OTHERWISE -[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r32624 - -IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl bluray -bs2b +cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac -directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon -ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa -libcaca libmpeg2 lirc +live lzo mad md5sum +mmx mmxext mng +mp3 mpg123 nas -+network nut openal amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime -radio +rar +real +rtc rtmp samba +shm +schroedinger sdl +speex sse sse2 ssse3 -tga +theora +tremor +truetype +toolame +twolame +unicode v4l v4l2 vaapi vdpau vidix -+vorbis vpx win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc -zoran" -[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg" - -VIDEO_CARDS="s3virge mga tdfx vesa" -for x in ${VIDEO_CARDS}; do - IUSE+=" video_cards_${x}" -done - -FONT_URI=" - mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 -" -if [[ ${PV} == *9999* ]]; then - RELEASE_URI="" -else - RELEASE_URI="mirror://gentoo/${P}.tar.xz" -fi -SRC_URI="${RELEASE_URI} - !truetype? ( ${FONT_URI} )" - -DESCRIPTION="Media Player for Linux" -HOMEPAGE="http://www.mplayerhq.hu/" - -FONT_RDEPS=" - virtual/ttf-fonts - media-libs/fontconfig - >=media-libs/freetype-2.2.1:2 -" -X_RDEPS=" - x11-libs/libXext - x11-libs/libXxf86vm -" -[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )" -# Rar: althrought -gpl version is nice, it cant do most functions normal rars can -# nemesi? ( net-libs/libnemesi ) -RDEPEND+=" - sys-libs/ncurses - app-arch/bzip2 - sys-libs/zlib - !bindist? ( - x86? ( - win32codecs? ( media-libs/win32codecs ) - ) - ) - X? ( - ${X_RDEPS} - dga? ( x11-libs/libXxf86dga ) - ggi? ( - media-libs/libggi - media-libs/libggiwmh - ) - opengl? ( virtual/opengl ) - vdpau? ( || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 ) ) - xinerama? ( x11-libs/libXinerama ) - xscreensaver? ( x11-libs/libXScrnSaver ) - xv? ( - x11-libs/libXv - xvmc? ( x11-libs/libXvMC ) - ) - ) - a52? ( media-libs/a52dec ) - aalib? ( media-libs/aalib ) - alsa? ( media-libs/alsa-lib ) - amr? ( !bindist? ( media-libs/opencore-amr ) ) - ass? ( ${FONT_RDEPS} >=media-libs/libass-0.9.10[enca?] ) - bidi? ( dev-libs/fribidi ) - bluray? ( media-libs/libbluray ) - bs2b? ( media-libs/libbs2b ) - cdio? ( dev-libs/libcdio ) - cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) - dirac? ( media-video/dirac ) - directfb? ( dev-libs/DirectFB ) - dts? ( media-libs/libdca ) - dv? ( media-libs/libdv ) - dvb? ( media-tv/linuxtv-dvb-headers ) - dvd? ( - >=media-libs/libdvdread-4.1.3 - dvdnav? ( >=media-libs/libdvdnav-4.1.3 ) - ) - encode? ( - !twolame? ( toolame? ( media-sound/toolame ) ) - twolame? ( media-sound/twolame ) - faac? ( !bindist? ( media-libs/faac ) ) - mp3? ( media-sound/lame ) - x264? ( >=media-libs/x264-0.0.20100423 ) - xvid? ( media-libs/xvid ) - ) - esd? ( media-sound/esound ) - enca? ( app-i18n/enca ) - faad? ( media-libs/faad2 ) - gif? ( media-libs/giflib ) - gsm? ( media-sound/gsm ) - iconv? ( virtual/libiconv ) - jack? ( media-sound/jack-audio-connection-kit ) - jpeg? ( virtual/jpeg ) - jpeg2k? ( media-libs/openjpeg ) - ladspa? ( media-libs/ladspa-sdk ) - libcaca? ( media-libs/libcaca ) - libmpeg2? ( media-libs/libmpeg2 ) - lirc? ( app-misc/lirc ) - live? ( media-plugins/live ) - lzo? ( >=dev-libs/lzo-2 ) - mad? ( media-libs/libmad ) - mng? ( media-libs/libmng ) - mpg123? ( media-sound/mpg123 ) - nas? ( media-libs/nas ) - nut? ( >=media-libs/libnut-661 ) - openal? ( media-libs/openal ) - png? ( media-libs/libpng ) - pnm? ( media-libs/netpbm ) - pulseaudio? ( media-sound/pulseaudio ) - rar? ( - || ( - app-arch/unrar - app-arch/rar - ) - ) - rtmp? ( media-video/rtmpdump ) - samba? ( net-fs/samba ) - schroedinger? ( media-libs/schroedinger ) - sdl? ( media-libs/libsdl ) - speex? ( media-libs/speex ) - theora? ( media-libs/libtheora[encode?] ) - truetype? ( ${FONT_RDEPS} ) - vaapi? ( x11-libs/libva ) - vorbis? ( media-libs/libvorbis ) - vpx? ( media-libs/libvpx ) - xanim? ( media-video/xanim ) -" - -X_DEPS=" - x11-proto/videoproto - x11-proto/xf86vidmodeproto -" -ASM_DEP="dev-lang/yasm" -DEPEND="${RDEPEND} - dev-util/pkgconfig - X? ( - ${X_DEPS} - dga? ( x11-proto/xf86dgaproto ) - dxr3? ( media-video/em8300-libraries ) - xinerama? ( x11-proto/xineramaproto ) - xscreensaver? ( x11-proto/scrnsaverproto ) - ) - amd64? ( ${ASM_DEP} ) - doc? ( - dev-libs/libxslt app-text/docbook-xml-dtd - app-text/docbook-xsl-stylesheets - ) - x86? ( ${ASM_DEP} ) - x86-fbsd? ( ${ASM_DEP} ) -" - -SLOT="0" -LICENSE="GPL-2" -if [[ ${PV} != *9999* ]]; then - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -else - KEYWORDS="" -fi - -PATCHES=( "${FILESDIR}"/vaapi-take2/*.patch ) - -pkg_setup() { - if [[ ${PV} == *9999* ]]; then - elog - elog "This is a live ebuild which installs the latest from upstream's" - elog "subversion repository, and is unsupported by Gentoo." - elog "Everything but bugs in the ebuild itself will be ignored." - elog - fi - - if use cpudetection; then - ewarn - ewarn "You've enabled the cpudetection flag. This feature is" - ewarn "included mainly for people who want to use the same" - ewarn "binary on another system with a different CPU architecture." - ewarn "MPlayer will already detect your CPU settings by default at" - ewarn "buildtime; this flag is used for runtime detection." - ewarn "You won't need this turned on if you are only building" - ewarn "mplayer for this system. Also, if your compile fails, try" - ewarn "disabling this use flag." - fi - - if use custom-cpuopts; then - ewarn - ewarn "You are using the custom-cpuopts flag which will" - ewarn "specifically allow you to enable / disable certain" - ewarn "CPU optimizations." - ewarn - ewarn "Most desktop users won't need this functionality, but it" - ewarn "is included for corner cases like cross-compiling and" - ewarn "certain profiles. If unsure, disable this flag and MPlayer" - ewarn "will automatically detect and use your available CPU" - ewarn "optimizations." - ewarn - ewarn "Using this flag means your build is unsupported, so" - ewarn "please make sure your CPU optimization use flags (3dnow" - ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." - fi -} - -src_unpack() { - if [[ ${PV} = *9999* ]]; then - subversion_src_unpack - - cd "${WORKDIR}" - else - unpack ${A} - fi - - if ! use truetype; then - unpack font-arial-iso-8859-1.tar.bz2 \ - font-arial-iso-8859-2.tar.bz2 \ - font-arial-cp1250.tar.bz2 - fi -} - -src_prepare() { - if [[ ${PV} = *9999* ]]; then - # Set SVN version manually - subversion_wc_info - sed -i -e "s/UNKNOWN/${ESVN_WC_REVISION}/" "${S}/version.sh" || die - else - # Set version # - sed -i -e "s/UNKNOWN/${MPLAYER_REVISION}/" "${S}/version.sh" || die - fi - - # fix path to bash executable in configure scripts - sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die - - base_src_prepare -} - -src_configure() { - local myconf="" - local uses i - - # set LINGUAS - [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" - - # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable - # compilation in almost every situation. The reason for this is - # because if --enable is used, it will force the build of that option, - # regardless of whether the dependency is available or not. - - ################### - #Optional features# - ################### - # disable svga since we don't want it - # disable arts since we don't have kde3 - # always disable internal ass - myconf+=" - --disable-svga --disable-svgalib_helper - --disable-ass-internal - --disable-arts - --disable-kai - $(use_enable network networking) - $(use_enable joystick) - " - uses="ass bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild - myconf+=" --disable-nemesi" # nemesi automagic disable - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use bidi || myconf+=" --disable-fribidi" - use ipv6 || myconf+=" --disable-inet6" - use nut || myconf+=" --disable-libnut" - use rar || myconf+=" --disable-unrarexec" - use samba || myconf+=" --disable-smb" - if ! use lirc; then - myconf+=" - --disable-lirc - --disable-lircc - --disable-apple-ir - " - fi - - # libcdio support: prefer libcdio over cdparanoia - # don't check for cddb w/cdio - if use cdio; then - myconf+=" --disable-cdparanoia" - else - myconf+=" --disable-libcdio" - use cdparanoia || myconf+=" --disable-cdparanoia" - use cddb || myconf+=" --disable-cddb" - fi - - ################################ - # DVD read, navigation support # - ################################ - # - # dvdread - accessing a DVD - # dvdnav - navigation of menus - # - # use external libdvdcss, dvdread and dvdnav - myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal" - - if use dvd; then - use dvdnav || myconf+=" --disable-dvdnav" - else - myconf+=" - --disable-dvdnav - --disable-dvdread - " - fi - - ############# - # Subtitles # - ############# - # - # SRT/ASS/SSA (subtitles) requires freetype support - # freetype support requires iconv - # iconv optionally can use unicode - if ! use ass && ! use truetype; then - myconf+=" --disable-freetype" - if ! use iconv; then - myconf+=" - --disable-iconv - --charset=noconv - " - fi - fi - use iconv && use unicode && myconf+=" --charset=UTF-8" - - ##################################### - # DVB / Video4Linux / Radio support # - ##################################### - myconf+=" --disable-tv-bsdbt848" - # broken upstream, won't work with recent kernels - myconf+=" --disable-ivtv" - if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then - use dvb || myconf+=" --disable-dvb" - use pvr || myconf+=" --disable-pvr" - use v4l || myconf+=" --disable-tv-v4l1" - use v4l2 || myconf+=" --disable-tv-v4l2" - if use radio && { use dvb || use v4l || use v4l2; }; then - myconf+=" - --enable-radio - $(use_enable encode radio-capture) - " - else - myconf+=" - --disable-radio-v4l2 - --disable-radio-bsdbt848 - " - fi - else - myconf+=" - --disable-tv - --disable-tv-v4l1 - --disable-tv-v4l2 - --disable-radio - --disable-radio-v4l2 - --disable-radio-bsdbt848 - --disable-dvb - --disable-v4l2 - --disable-pvr" - fi - - ########## - # Codecs # - ########## - myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support - myconf+=" --disable-faad-internal" # always use system media-libs/faad2 - myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2 - use dirac || myconf+=" --disable-libdirac-lavc" - use dts || myconf+=" --disable-libdca" - if ! use mp3; then - myconf+=" - --disable-mp3lame - --disable-mp3lame-lavc - --disable-mp3lib - " - fi - uses="a52 bs2b dv gsm lzo rtmp" - for i in ${uses}; do - use ${i} || myconf+=" --disable-lib${i}" - done - use schroedinger || myconf+=" --disable-libschroedinger-lavc" - # Disable opencore-amr with bindist - # https://bugs.gentoo.org/show_bug.cgi?id=299405#c6 - { use amr && use !bindist ; } || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb" - - uses="faad gif jpeg libmpeg2 live mad mng mpg123 png pnm speex tga theora xanim" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use jpeg2k || myconf+=" --disable-libopenjpeg" - if use vorbis || use tremor; then - use tremor || myconf+=" --disable-tremor-internal" - use vorbis || myconf+=" --disable-libvorbis" - else - myconf+=" - --disable-tremor-internal - --disable-tremor - --disable-libvorbis - " - fi - use vaapi && myconf+=" --enable-vaapi" - use vpx || myconf+=" --disable-libvpx-lavc" - # Encoding - uses="faac x264 xvid toolame twolame" - if use encode; then - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use faac || myconf+=" --disable-faac-lavc" - if use bindist && use faac; then - ewarn "faac is nonfree and cannot be distributed; disabling faac support." - myconf+=" --disable-faac --disable-faac-lavc" - fi - else - myconf+=" --disable-mencoder" - myconf+=" --disable-faac-lavc" - for i in ${uses}; do - myconf+=" --disable-${i}" - use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work." - done - fi - - ################# - # Binary codecs # - ################# - # bug 213836 - if ! use x86 || ! use win32codecs; then - use quicktime || myconf+=" --disable-qtx" - fi - - ###################### - # RealPlayer support # - ###################### - # Realplayer support shows up in four places: - # - libavcodec (internal) - # - win32codecs - # - realcodecs (win32codecs libs) - # - realcodecs (realplayer libs) - - # internal - use real || myconf+=" --disable-real" - - # Real binary codec support only available on x86, amd64 - if use real; then - use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" - use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" - elif ! use bindist; then - myconf+=" $(use_enable win32codecs win32dll)" - fi - - ################ - # Video Output # - ################ - uses="directfb md5sum sdl" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use aalib || myconf+=" --disable-aa" - use fbcon || myconf+=" --disable-fbdev" - use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" - use libcaca || myconf+=" --disable-caca" - use zoran || myconf+=" --disable-zr" - - if ! use kernel_linux || ! use video_cards_mga; then - myconf+=" --disable-mga --disable-xmga" - fi - - if use video_cards_tdfx; then - myconf+=" - $(use_enable video_cards_tdfx tdfxvid) - $(use_enable fbcon tdfxfb) - " - else - myconf+=" - --disable-3dfx - --disable-tdfxvid - --disable-tdfxfb - " - fi - - # sun card, disable by default, see bug #258729 - myconf+=" --disable-xvr100" - - ################ - # Audio Output # - ################ - uses="alsa esd jack ladspa nas openal" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use pulseaudio || myconf+=" --disable-pulse" - if ! use radio; then - use oss || myconf+=" --disable-ossaudio" - fi - - #################### - # Advanced Options # - #################### - # Platform specific flags, hardcoded on amd64 (see below) - if use cpudetection; then - myconf+=" --enable-runtime-cpudetection" - fi - - # Turning off CPU optimizations usually will break the build. - # However, this use flag, if enabled, will allow users to completely - # specify which ones to use. If disabled, mplayer will automatically - # enable all CPU optimizations that the host build supports. - if use custom-cpuopts; then - uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" - for i in ${uses}; do - myconf+=" $(use_enable ${i})" - done - fi - - use debug && myconf+=" --enable-debug=3" - - if use x86 && gcc-specs-pie; then - filter-flags -fPIC -fPIE - append-ldflags -nopie - fi - - is-flag -O? || append-flags -O2 - if use x86 || use x86-fbsd; then - use debug || append-flags -fomit-frame-pointer - fi - - # workaround bug, x86 just has too few registers, see c.f. - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44 - # and 32b osx, bug 329861 - [[ ${CHOST} == i?86-*solaris* || ${CHOST} == i?86-*darwin* ]] && append-flags -fomit-frame-pointer - - ########################### - # X enabled configuration # - ########################### - myconf+=" --disable-gui" - if use X; then - uses="dxr3 ggi xinerama" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use dga || myconf+=" --disable-dga1 --disable-dga2" - use opengl || myconf+=" --disable-gl" - use osdmenu && myconf+=" --enable-menu" - use vdpau || myconf+=" --disable-vdpau" - use video_cards_vesa || myconf+=" --disable-vesa" - use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" - use xscreensaver || myconf+=" --disable-xss" - - if use xv; then - if use xvmc; then - myconf+=" --enable-xvmc --with-xvmclib=XvMCW" - else - myconf+=" --disable-xvmc" - fi - else - myconf+=" - --disable-xv - --disable-xvmc - " - use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled." - fi - else - myconf+=" - --disable-dga1 - --disable-dga2 - --disable-dxr3 - --disable-ggi - --disable-gl - --disable-vdpau - --disable-vidix - --disable-vidix-pcidb - --disable-xinerama - --disable-xss - --disable-xv - --disable-xvmc - --disable-x11 - " - uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv" - for i in ${uses}; do - use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work." - done - fi - - ############################ - # OSX (aqua) configuration # - ############################ - if use aqua; then - myconf+=" - --enable-macosx-finder - --enable-macosx-bundle - " - fi - - ################### - # External FFmpeg # - ################### - if [[ ${PV} == *9999* ]]; then - use external-ffmpeg && myconf+=" --disable-ffmpeg_a" - fi - - myconf="--cc=$(tc-getCC) - --host-cc=$(tc-getBUILD_CC) - --prefix=${EPREFIX}/usr - --confdir=${EPREFIX}/etc/mplayer - --datadir=${EPREFIX}/usr/share/mplayer - --libdir=${EPREFIX}/usr/$(get_libdir) - ${myconf}" - - CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" -} - -src_compile() { - base_src_compile - # Build only user-requested docs if they're available. - if use doc ; then - # select available languages from $LINGUAS - LINGUAS=${LINGUAS/zh/zh_CN} - local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" - local BUILT_DOCS="" - for i in ${LINGUAS} ; do - hasq ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" - done - if [[ -z $BUILT_DOCS ]]; then - emake -j1 -C DOCS/xml html-chunked || die "Failed to generate html docs" - else - for i in ${BUILT_DOCS}; do - emake -j1 -C DOCS/xml html-chunked-${i} || die "Failed to generate html docs for ${i}" - done - fi - fi -} - -src_install() { - local i - - emake prefix="${ED}/usr" \ - BINDIR="${ED}/usr/bin" \ - LIBDIR="${ED}/usr/$(get_libdir)" \ - CONFDIR="${ED}/etc/mplayer" \ - DATADIR="${ED}/usr/share/mplayer" \ - MANDIR="${ED}/usr/share/man" \ - INSTALLSTRIP="" \ - install || die "emake install failed" - - dodoc AUTHORS Changelog Copyright README etc/codecs.conf || die - - docinto tech/ - dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} || die - docinto TOOLS/ - dodoc TOOLS/* || die - if use real; then - docinto tech/realcodecs/ - dodoc DOCS/tech/realcodecs/* || die - docinto TOOLS/realcodecs/ - dodoc TOOLS/realcodecs/* || die - fi - docinto tech/mirrors/ - dodoc DOCS/tech/mirrors/* || die - - if use doc; then - docinto html/ - dohtml -r "${S}"/DOCS/HTML/* || die - fi - - if ! use ass && ! use truetype; then - dodir /usr/share/mplayer/fonts - # Do this generic, as the mplayer people like to change the structure - # of their zips ... - for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do - cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts" - done - # Fix the font symlink ... - rm -rf "${ED}/usr/share/mplayer/font" - dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font - fi - - insinto /etc/mplayer - newins "${S}/etc/example.conf" mplayer.conf || die - doins "${S}/etc/input.conf" || die - if use osdmenu; then - doins "${S}/etc/menu.conf" || die - fi - - if use ass || use truetype; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -fontconfig=1 -subfont-osd-scale=4 -subfont-text-scale=3 -_EOF_ - fi - - # bug 256203 - if use rar; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -unrarexec=${EPREFIX}/usr/bin/unrar -_EOF_ - fi - - dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf - newbin "${S}/TOOLS/midentify.sh" midentify || die -} - -pkg_preinst() { - [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \ - rm -rf "${EROOT}/usr/share/mplayer/Skin/default" -} - -pkg_postrm() { - # Cleanup stale symlinks - [ -L "${EROOT}/usr/share/mplayer/font" -a \ - ! -e "${EROOT}/usr/share/mplayer/font" ] && \ - rm -f "${EROOT}/usr/share/mplayer/font" - - [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \ - ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \ - rm -f "${EROOT}/usr/share/mplayer/subfont.ttf" -} diff --git a/media-video/mplayer/mplayer-1.0_rc4_p20101219-r50.ebuild b/media-video/mplayer/mplayer-1.0_rc4_p20101219-r50.ebuild deleted file mode 100644 index 10f56a97e..000000000 --- a/media-video/mplayer/mplayer-1.0_rc4_p20101219-r50.ebuild +++ /dev/null @@ -1,740 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20101114.ebuild,v 1.1 2010/11/14 15:13:00 polynomial-c Exp $ - -EAPI=3 - -ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" -[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion" || SVN_ECLASS="" - -inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS} - -# BUMP ME PLZ, NO COOKIES OTHERWISE -[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r32719 - -IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl bluray -bs2b +cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac -directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon -ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa -libcaca libmpeg2 lirc +live lzo mad md5sum +mmx mmxext mng +mp3 mpg123 nas -+network nut openal amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime -radio +rar +real +rtc rtmp samba +shm +schroedinger sdl +speex sse sse2 ssse3 -tga +theora +tremor +truetype +toolame +twolame +unicode v4l v4l2 vaapi vdpau vidix -+vorbis vpx win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc -zoran" -[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg" - -VIDEO_CARDS="s3virge mga tdfx vesa" -for x in ${VIDEO_CARDS}; do - IUSE+=" video_cards_${x}" -done - -FONT_URI=" - mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 -" -if [[ ${PV} == *9999* ]]; then - RELEASE_URI="" -else - RELEASE_URI="mirror://gentoo/${P}.tar.xz" -fi -SRC_URI="${RELEASE_URI} - !truetype? ( ${FONT_URI} )" - -DESCRIPTION="Media Player for Linux" -HOMEPAGE="http://www.mplayerhq.hu/" - -FONT_RDEPS=" - virtual/ttf-fonts - media-libs/fontconfig - >=media-libs/freetype-2.2.1:2 -" -X_RDEPS=" - x11-libs/libXext - x11-libs/libXxf86vm -" -[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )" -# Rar: althrought -gpl version is nice, it cant do most functions normal rars can -# nemesi? ( net-libs/libnemesi ) -RDEPEND+=" - sys-libs/ncurses - app-arch/bzip2 - sys-libs/zlib - !bindist? ( - x86? ( - win32codecs? ( media-libs/win32codecs ) - ) - ) - X? ( - ${X_RDEPS} - dga? ( x11-libs/libXxf86dga ) - ggi? ( - media-libs/libggi - media-libs/libggiwmh - ) - opengl? ( virtual/opengl ) - vdpau? ( || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 ) ) - xinerama? ( x11-libs/libXinerama ) - xscreensaver? ( x11-libs/libXScrnSaver ) - xv? ( - x11-libs/libXv - xvmc? ( x11-libs/libXvMC ) - ) - ) - a52? ( media-libs/a52dec ) - aalib? ( media-libs/aalib ) - alsa? ( media-libs/alsa-lib ) - amr? ( !bindist? ( media-libs/opencore-amr ) ) - ass? ( ${FONT_RDEPS} >=media-libs/libass-0.9.10[enca?] ) - bidi? ( dev-libs/fribidi ) - bluray? ( media-libs/libbluray ) - bs2b? ( media-libs/libbs2b ) - cdio? ( dev-libs/libcdio ) - cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) - dirac? ( media-video/dirac ) - directfb? ( dev-libs/DirectFB ) - dts? ( media-libs/libdca ) - dv? ( media-libs/libdv ) - dvb? ( media-tv/linuxtv-dvb-headers ) - dvd? ( - >=media-libs/libdvdread-4.1.3 - dvdnav? ( >=media-libs/libdvdnav-4.1.3 ) - ) - encode? ( - !twolame? ( toolame? ( media-sound/toolame ) ) - twolame? ( media-sound/twolame ) - faac? ( !bindist? ( media-libs/faac ) ) - mp3? ( media-sound/lame ) - x264? ( >=media-libs/x264-0.0.20100423 ) - xvid? ( media-libs/xvid ) - ) - esd? ( media-sound/esound ) - enca? ( app-i18n/enca ) - faad? ( media-libs/faad2 ) - gif? ( media-libs/giflib ) - gsm? ( media-sound/gsm ) - iconv? ( virtual/libiconv ) - jack? ( media-sound/jack-audio-connection-kit ) - jpeg? ( virtual/jpeg ) - jpeg2k? ( media-libs/openjpeg ) - ladspa? ( media-libs/ladspa-sdk ) - libcaca? ( media-libs/libcaca ) - libmpeg2? ( media-libs/libmpeg2 ) - lirc? ( app-misc/lirc ) - live? ( media-plugins/live ) - lzo? ( >=dev-libs/lzo-2 ) - mad? ( media-libs/libmad ) - mng? ( media-libs/libmng ) - mpg123? ( media-sound/mpg123 ) - nas? ( media-libs/nas ) - nut? ( >=media-libs/libnut-661 ) - openal? ( media-libs/openal ) - png? ( media-libs/libpng ) - pnm? ( media-libs/netpbm ) - pulseaudio? ( media-sound/pulseaudio ) - rar? ( - || ( - app-arch/unrar - app-arch/rar - ) - ) - rtmp? ( media-video/rtmpdump ) - samba? ( net-fs/samba ) - schroedinger? ( media-libs/schroedinger ) - sdl? ( media-libs/libsdl ) - speex? ( media-libs/speex ) - theora? ( media-libs/libtheora[encode?] ) - truetype? ( ${FONT_RDEPS} ) - vaapi? ( x11-libs/libva ) - vorbis? ( media-libs/libvorbis ) - vpx? ( media-libs/libvpx ) - xanim? ( media-video/xanim ) -" - -X_DEPS=" - x11-proto/videoproto - x11-proto/xf86vidmodeproto -" -ASM_DEP="dev-lang/yasm" -DEPEND="${RDEPEND} - dev-util/pkgconfig - X? ( - ${X_DEPS} - dga? ( x11-proto/xf86dgaproto ) - dxr3? ( media-video/em8300-libraries ) - xinerama? ( x11-proto/xineramaproto ) - xscreensaver? ( x11-proto/scrnsaverproto ) - ) - amd64? ( ${ASM_DEP} ) - doc? ( - dev-libs/libxslt app-text/docbook-xml-dtd - app-text/docbook-xsl-stylesheets - ) - x86? ( ${ASM_DEP} ) - x86-fbsd? ( ${ASM_DEP} ) -" - -SLOT="0" -LICENSE="GPL-2" -if [[ ${PV} != *9999* ]]; then - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -else - KEYWORDS="" -fi - -PATCHES=( "${FILESDIR}"/vaapi-take2/*.patch ) - -pkg_setup() { - if [[ ${PV} == *9999* ]]; then - elog - elog "This is a live ebuild which installs the latest from upstream's" - elog "subversion repository, and is unsupported by Gentoo." - elog "Everything but bugs in the ebuild itself will be ignored." - elog - fi - - if use cpudetection; then - ewarn - ewarn "You've enabled the cpudetection flag. This feature is" - ewarn "included mainly for people who want to use the same" - ewarn "binary on another system with a different CPU architecture." - ewarn "MPlayer will already detect your CPU settings by default at" - ewarn "buildtime; this flag is used for runtime detection." - ewarn "You won't need this turned on if you are only building" - ewarn "mplayer for this system. Also, if your compile fails, try" - ewarn "disabling this use flag." - fi - - if use custom-cpuopts; then - ewarn - ewarn "You are using the custom-cpuopts flag which will" - ewarn "specifically allow you to enable / disable certain" - ewarn "CPU optimizations." - ewarn - ewarn "Most desktop users won't need this functionality, but it" - ewarn "is included for corner cases like cross-compiling and" - ewarn "certain profiles. If unsure, disable this flag and MPlayer" - ewarn "will automatically detect and use your available CPU" - ewarn "optimizations." - ewarn - ewarn "Using this flag means your build is unsupported, so" - ewarn "please make sure your CPU optimization use flags (3dnow" - ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." - fi -} - -src_unpack() { - if [[ ${PV} = *9999* ]]; then - subversion_src_unpack - - cd "${WORKDIR}" - else - unpack ${A} - fi - - if ! use truetype; then - unpack font-arial-iso-8859-1.tar.bz2 \ - font-arial-iso-8859-2.tar.bz2 \ - font-arial-cp1250.tar.bz2 - fi -} - -src_prepare() { - if [[ ${PV} = *9999* ]]; then - # Set SVN version manually - subversion_wc_info - sed -i -e "s/UNKNOWN/${ESVN_WC_REVISION}/" "${S}/version.sh" || die - else - # Set version # - sed -i -e "s/UNKNOWN/${MPLAYER_REVISION}/" "${S}/version.sh" || die - fi - - # fix path to bash executable in configure scripts - sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die - - base_src_prepare -} - -src_configure() { - local myconf="" - local uses i - - # set LINGUAS - [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" - - # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable - # compilation in almost every situation. The reason for this is - # because if --enable is used, it will force the build of that option, - # regardless of whether the dependency is available or not. - - ################### - #Optional features# - ################### - # disable svga since we don't want it - # disable arts since we don't have kde3 - # always disable internal ass - myconf+=" - --disable-svga --disable-svgalib_helper - --disable-ass-internal - --disable-arts - --disable-kai - $(use_enable network networking) - $(use_enable joystick) - " - uses="ass bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild - myconf+=" --disable-nemesi" # nemesi automagic disable - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use bidi || myconf+=" --disable-fribidi" - use ipv6 || myconf+=" --disable-inet6" - use nut || myconf+=" --disable-libnut" - use rar || myconf+=" --disable-unrarexec" - use samba || myconf+=" --disable-smb" - if ! use lirc; then - myconf+=" - --disable-lirc - --disable-lircc - --disable-apple-ir - " - fi - - # libcdio support: prefer libcdio over cdparanoia - # don't check for cddb w/cdio - if use cdio; then - myconf+=" --disable-cdparanoia" - else - myconf+=" --disable-libcdio" - use cdparanoia || myconf+=" --disable-cdparanoia" - use cddb || myconf+=" --disable-cddb" - fi - - ################################ - # DVD read, navigation support # - ################################ - # - # dvdread - accessing a DVD - # dvdnav - navigation of menus - # - # use external libdvdcss, dvdread and dvdnav - myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal" - - if use dvd; then - use dvdnav || myconf+=" --disable-dvdnav" - else - myconf+=" - --disable-dvdnav - --disable-dvdread - " - fi - - ############# - # Subtitles # - ############# - # - # SRT/ASS/SSA (subtitles) requires freetype support - # freetype support requires iconv - # iconv optionally can use unicode - if ! use ass && ! use truetype; then - myconf+=" --disable-freetype" - if ! use iconv; then - myconf+=" - --disable-iconv - --charset=noconv - " - fi - fi - use iconv && use unicode && myconf+=" --charset=UTF-8" - - ##################################### - # DVB / Video4Linux / Radio support # - ##################################### - myconf+=" --disable-tv-bsdbt848" - # broken upstream, won't work with recent kernels - myconf+=" --disable-ivtv" - if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then - use dvb || myconf+=" --disable-dvb" - use pvr || myconf+=" --disable-pvr" - use v4l || myconf+=" --disable-tv-v4l1" - use v4l2 || myconf+=" --disable-tv-v4l2" - if use radio && { use dvb || use v4l || use v4l2; }; then - myconf+=" - --enable-radio - $(use_enable encode radio-capture) - " - else - myconf+=" - --disable-radio-v4l2 - --disable-radio-bsdbt848 - " - fi - else - myconf+=" - --disable-tv - --disable-tv-v4l1 - --disable-tv-v4l2 - --disable-radio - --disable-radio-v4l2 - --disable-radio-bsdbt848 - --disable-dvb - --disable-v4l2 - --disable-pvr" - fi - - ########## - # Codecs # - ########## - myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support - myconf+=" --disable-faad-internal" # always use system media-libs/faad2 - myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2 - use dirac || myconf+=" --disable-libdirac-lavc" - use dts || myconf+=" --disable-libdca" - if ! use mp3; then - myconf+=" - --disable-mp3lame - --disable-mp3lame-lavc - --disable-mp3lib - " - fi - uses="a52 bs2b dv gsm lzo rtmp" - for i in ${uses}; do - use ${i} || myconf+=" --disable-lib${i}" - done - use schroedinger || myconf+=" --disable-libschroedinger-lavc" - # Disable opencore-amr with bindist - # https://bugs.gentoo.org/show_bug.cgi?id=299405#c6 - { use amr && use !bindist ; } || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb" - - uses="faad gif jpeg libmpeg2 live mad mng mpg123 png pnm speex tga theora xanim" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use jpeg2k || myconf+=" --disable-libopenjpeg" - if use vorbis || use tremor; then - use tremor || myconf+=" --disable-tremor-internal" - use vorbis || myconf+=" --disable-libvorbis" - else - myconf+=" - --disable-tremor-internal - --disable-tremor - --disable-libvorbis - " - fi - use vaapi && myconf+=" --enable-vaapi" - use vpx || myconf+=" --disable-libvpx-lavc" - # Encoding - uses="faac x264 xvid toolame twolame" - if use encode; then - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use faac || myconf+=" --disable-faac-lavc" - if use bindist && use faac; then - ewarn "faac is nonfree and cannot be distributed; disabling faac support." - myconf+=" --disable-faac --disable-faac-lavc" - fi - else - myconf+=" --disable-mencoder" - myconf+=" --disable-faac-lavc" - for i in ${uses}; do - myconf+=" --disable-${i}" - use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work." - done - fi - - ################# - # Binary codecs # - ################# - # bug 213836 - if ! use x86 || ! use win32codecs; then - use quicktime || myconf+=" --disable-qtx" - fi - - ###################### - # RealPlayer support # - ###################### - # Realplayer support shows up in four places: - # - libavcodec (internal) - # - win32codecs - # - realcodecs (win32codecs libs) - # - realcodecs (realplayer libs) - - # internal - use real || myconf+=" --disable-real" - - # Real binary codec support only available on x86, amd64 - if use real; then - use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" - use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" - elif ! use bindist; then - myconf+=" $(use_enable win32codecs win32dll)" - fi - - ################ - # Video Output # - ################ - uses="directfb md5sum sdl" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use aalib || myconf+=" --disable-aa" - use fbcon || myconf+=" --disable-fbdev" - use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" - use libcaca || myconf+=" --disable-caca" - use zoran || myconf+=" --disable-zr" - - if ! use kernel_linux || ! use video_cards_mga; then - myconf+=" --disable-mga --disable-xmga" - fi - - if use video_cards_tdfx; then - myconf+=" - $(use_enable video_cards_tdfx tdfxvid) - $(use_enable fbcon tdfxfb) - " - else - myconf+=" - --disable-3dfx - --disable-tdfxvid - --disable-tdfxfb - " - fi - - # sun card, disable by default, see bug #258729 - myconf+=" --disable-xvr100" - - ################ - # Audio Output # - ################ - uses="alsa esd jack ladspa nas openal" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use pulseaudio || myconf+=" --disable-pulse" - if ! use radio; then - use oss || myconf+=" --disable-ossaudio" - fi - - #################### - # Advanced Options # - #################### - # Platform specific flags, hardcoded on amd64 (see below) - if use cpudetection; then - myconf+=" --enable-runtime-cpudetection" - fi - - # Turning off CPU optimizations usually will break the build. - # However, this use flag, if enabled, will allow users to completely - # specify which ones to use. If disabled, mplayer will automatically - # enable all CPU optimizations that the host build supports. - if use custom-cpuopts; then - uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" - for i in ${uses}; do - myconf+=" $(use_enable ${i})" - done - fi - - use debug && myconf+=" --enable-debug=3" - - if use x86 && gcc-specs-pie; then - filter-flags -fPIC -fPIE - append-ldflags -nopie - fi - - is-flag -O? || append-flags -O2 - if use x86 || use x86-fbsd; then - use debug || append-flags -fomit-frame-pointer - fi - - # workaround bug, x86 just has too few registers, see c.f. - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44 - # and 32b osx, bug 329861 - [[ ${CHOST} == i?86-*solaris* || ${CHOST} == i?86-*darwin* ]] && append-flags -fomit-frame-pointer - - ########################### - # X enabled configuration # - ########################### - myconf+=" --disable-gui" - if use X; then - uses="dxr3 ggi xinerama" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use dga || myconf+=" --disable-dga1 --disable-dga2" - use opengl || myconf+=" --disable-gl" - use osdmenu && myconf+=" --enable-menu" - use vdpau || myconf+=" --disable-vdpau" - use video_cards_vesa || myconf+=" --disable-vesa" - use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" - use xscreensaver || myconf+=" --disable-xss" - - if use xv; then - if use xvmc; then - myconf+=" --enable-xvmc --with-xvmclib=XvMCW" - else - myconf+=" --disable-xvmc" - fi - else - myconf+=" - --disable-xv - --disable-xvmc - " - use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled." - fi - else - myconf+=" - --disable-dga1 - --disable-dga2 - --disable-dxr3 - --disable-ggi - --disable-gl - --disable-vdpau - --disable-vidix - --disable-vidix-pcidb - --disable-xinerama - --disable-xss - --disable-xv - --disable-xvmc - --disable-x11 - " - uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv" - for i in ${uses}; do - use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work." - done - fi - - ############################ - # OSX (aqua) configuration # - ############################ - if use aqua; then - myconf+=" - --enable-macosx-finder - --enable-macosx-bundle - " - fi - - ################### - # External FFmpeg # - ################### - if [[ ${PV} == *9999* ]]; then - use external-ffmpeg && myconf+=" --disable-ffmpeg_a" - fi - - myconf="--cc=$(tc-getCC) - --host-cc=$(tc-getBUILD_CC) - --prefix=${EPREFIX}/usr - --confdir=${EPREFIX}/etc/mplayer - --datadir=${EPREFIX}/usr/share/mplayer - --libdir=${EPREFIX}/usr/$(get_libdir) - ${myconf}" - - CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" -} - -src_compile() { - base_src_compile - # Build only user-requested docs if they're available. - if use doc ; then - # select available languages from $LINGUAS - LINGUAS=${LINGUAS/zh/zh_CN} - local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" - local BUILT_DOCS="" - for i in ${LINGUAS} ; do - hasq ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" - done - if [[ -z $BUILT_DOCS ]]; then - emake -j1 -C DOCS/xml html-chunked || die "Failed to generate html docs" - else - for i in ${BUILT_DOCS}; do - emake -j1 -C DOCS/xml html-chunked-${i} || die "Failed to generate html docs for ${i}" - done - fi - fi -} - -src_install() { - local i - - emake prefix="${ED}/usr" \ - BINDIR="${ED}/usr/bin" \ - LIBDIR="${ED}/usr/$(get_libdir)" \ - CONFDIR="${ED}/etc/mplayer" \ - DATADIR="${ED}/usr/share/mplayer" \ - MANDIR="${ED}/usr/share/man" \ - INSTALLSTRIP="" \ - install || die "emake install failed" - - dodoc AUTHORS Changelog Copyright README etc/codecs.conf || die - - docinto tech/ - dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} || die - docinto TOOLS/ - dodoc TOOLS/* || die - if use real; then - docinto tech/realcodecs/ - dodoc DOCS/tech/realcodecs/* || die - docinto TOOLS/realcodecs/ - dodoc TOOLS/realcodecs/* || die - fi - docinto tech/mirrors/ - dodoc DOCS/tech/mirrors/* || die - - if use doc; then - docinto html/ - dohtml -r "${S}"/DOCS/HTML/* || die - fi - - if ! use ass && ! use truetype; then - dodir /usr/share/mplayer/fonts - # Do this generic, as the mplayer people like to change the structure - # of their zips ... - for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do - cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts" - done - # Fix the font symlink ... - rm -rf "${ED}/usr/share/mplayer/font" - dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font - fi - - insinto /etc/mplayer - newins "${S}/etc/example.conf" mplayer.conf || die - doins "${S}/etc/input.conf" || die - if use osdmenu; then - doins "${S}/etc/menu.conf" || die - fi - - if use ass || use truetype; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -fontconfig=1 -subfont-osd-scale=4 -subfont-text-scale=3 -_EOF_ - fi - - # bug 256203 - if use rar; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -unrarexec=${EPREFIX}/usr/bin/unrar -_EOF_ - fi - - dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf - newbin "${S}/TOOLS/midentify.sh" midentify || die -} - -pkg_preinst() { - [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \ - rm -rf "${EROOT}/usr/share/mplayer/Skin/default" -} - -pkg_postrm() { - # Cleanup stale symlinks - [ -L "${EROOT}/usr/share/mplayer/font" -a \ - ! -e "${EROOT}/usr/share/mplayer/font" ] && \ - rm -f "${EROOT}/usr/share/mplayer/font" - - [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \ - ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \ - rm -f "${EROOT}/usr/share/mplayer/subfont.ttf" -} diff --git a/media-video/mplayer/mplayer-1.0_rc4_p20110322-r50.ebuild b/media-video/mplayer/mplayer-1.0_rc4_p20110322-r50.ebuild deleted file mode 100644 index 49afb1b87..000000000 --- a/media-video/mplayer/mplayer-1.0_rc4_p20110322-r50.ebuild +++ /dev/null @@ -1,752 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20110322.ebuild,v 1.2 2011/03/22 23:58:03 scarabeus Exp $ - -EAPI=4 - -EGIT_REPO_URI="git://git.libav.org/libav.git" -EGIT_PROJECT="ffmpeg" -ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" -[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git" || SVN_ECLASS="" - -inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS} - -# BUMP ME PLZ, NO COOKIES OTHERWISE -[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r33094 - -IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl bluray -bs2b cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac -directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon -ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa -libcaca libmpeg2 lirc +live lzo mad md5sum +mmx mmxext mng +mp3 mpg123 nas -+network nut openal amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime -radio +rar +real +rtc rtmp samba +shm +schroedinger sdl +speex sse sse2 ssse3 -tga +theora +tremor +truetype +toolame +twolame +unicode v4l v4l2 vaapi vdpau -vidix +vorbis vpx win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid -xvmc zoran" -[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg" - -VIDEO_CARDS="s3virge mga tdfx vesa" -for x in ${VIDEO_CARDS}; do - IUSE+=" video_cards_${x}" -done - -FONT_URI=" - mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 -" -if [[ ${PV} == *9999* ]]; then - RELEASE_URI="" -else - RELEASE_URI="http://dev.gentoo.org/~scarabeus/${P}.tar.xz - mirror://gentoo/${P}.tar.xz" -fi -SRC_URI="${RELEASE_URI} - !truetype? ( ${FONT_URI} )" - -DESCRIPTION="Media Player for Linux" -HOMEPAGE="http://www.mplayerhq.hu/" - -FONT_RDEPS=" - virtual/ttf-fonts - media-libs/fontconfig - >=media-libs/freetype-2.2.1:2 -" -X_RDEPS=" - x11-libs/libXext - x11-libs/libXxf86vm -" -[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )" -# Rar: althrought -gpl version is nice, it cant do most functions normal rars can -# nemesi? ( net-libs/libnemesi ) -RDEPEND+=" - sys-libs/ncurses - app-arch/bzip2 - sys-libs/zlib - !bindist? ( - x86? ( - win32codecs? ( media-libs/win32codecs ) - ) - ) - X? ( - ${X_RDEPS} - dga? ( x11-libs/libXxf86dga ) - ggi? ( - media-libs/libggi - media-libs/libggiwmh - ) - opengl? ( virtual/opengl ) - vdpau? ( x11-libs/libvdpau ) - xinerama? ( x11-libs/libXinerama ) - xscreensaver? ( x11-libs/libXScrnSaver ) - xv? ( - x11-libs/libXv - xvmc? ( x11-libs/libXvMC ) - ) - ) - a52? ( media-libs/a52dec ) - aalib? ( media-libs/aalib ) - alsa? ( media-libs/alsa-lib ) - amr? ( !bindist? ( media-libs/opencore-amr ) ) - ass? ( ${FONT_RDEPS} >=media-libs/libass-0.9.10[enca?] ) - bidi? ( dev-libs/fribidi ) - bluray? ( media-libs/libbluray ) - bs2b? ( media-libs/libbs2b ) - cdio? ( dev-libs/libcdio ) - cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) - dirac? ( media-video/dirac ) - directfb? ( dev-libs/DirectFB ) - dts? ( media-libs/libdca ) - dv? ( media-libs/libdv ) - dvb? ( media-tv/linuxtv-dvb-headers ) - dvd? ( - >=media-libs/libdvdread-4.1.3 - dvdnav? ( >=media-libs/libdvdnav-4.1.3 ) - ) - encode? ( - !twolame? ( toolame? ( media-sound/toolame ) ) - twolame? ( media-sound/twolame ) - faac? ( !bindist? ( media-libs/faac ) ) - mp3? ( media-sound/lame ) - x264? ( >=media-libs/x264-0.0.20100423 ) - xvid? ( media-libs/xvid ) - ) - esd? ( media-sound/esound ) - enca? ( app-i18n/enca ) - faad? ( media-libs/faad2 ) - gif? ( media-libs/giflib ) - gsm? ( media-sound/gsm ) - iconv? ( virtual/libiconv ) - jack? ( media-sound/jack-audio-connection-kit ) - jpeg? ( virtual/jpeg ) - jpeg2k? ( media-libs/openjpeg ) - ladspa? ( media-libs/ladspa-sdk ) - libcaca? ( media-libs/libcaca ) - libmpeg2? ( media-libs/libmpeg2 ) - lirc? ( app-misc/lirc ) - live? ( media-plugins/live ) - lzo? ( >=dev-libs/lzo-2 ) - mad? ( media-libs/libmad ) - mng? ( media-libs/libmng ) - mpg123? ( media-sound/mpg123 ) - nas? ( media-libs/nas ) - nut? ( >=media-libs/libnut-661 ) - openal? ( media-libs/openal ) - png? ( media-libs/libpng ) - pnm? ( media-libs/netpbm ) - pulseaudio? ( media-sound/pulseaudio ) - rar? ( - || ( - app-arch/unrar - app-arch/rar - ) - ) - rtmp? ( media-video/rtmpdump ) - samba? ( net-fs/samba ) - schroedinger? ( media-libs/schroedinger ) - sdl? ( media-libs/libsdl ) - speex? ( media-libs/speex ) - theora? ( media-libs/libtheora[encode?] ) - truetype? ( ${FONT_RDEPS} ) - vorbis? ( media-libs/libvorbis ) - vpx? ( media-libs/libvpx ) - xanim? ( media-video/xanim ) -" - -X_DEPS=" - x11-proto/videoproto - x11-proto/xf86vidmodeproto -" -ASM_DEP="dev-lang/yasm" -DEPEND="${RDEPEND} - dev-util/pkgconfig - X? ( - ${X_DEPS} - dga? ( x11-proto/xf86dgaproto ) - dxr3? ( media-video/em8300-libraries ) - xinerama? ( x11-proto/xineramaproto ) - xscreensaver? ( x11-proto/scrnsaverproto ) - ) - amd64? ( ${ASM_DEP} ) - doc? ( - dev-libs/libxslt app-text/docbook-xml-dtd - app-text/docbook-xsl-stylesheets - ) - x86? ( ${ASM_DEP} ) - x86-fbsd? ( ${ASM_DEP} ) -" - -SLOT="0" -LICENSE="GPL-2" -if [[ ${PV} != *9999* ]]; then - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -else - KEYWORDS="" -fi - -# bindist does not cope with amr codecs (#299405#c6), faac codecs are nonfree, win32codecs are nonfree -# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio -# dvd navigation requires dvd read support -# ass and freetype font require iconv and ass requires freetype fonts -# unicode transformations are usefull only with iconv -# libvorbis require external tremor to work -# radio requires oss or alsa backend -# xvmc requires xvideo support -REQUIRED_USE="bindist? ( !amr !faac !win32codecs )" - - -if use vaapi; then - PATCHES=( "${FILESDIR}"/vaapi-take3/*.patch ) -else - PATCHES=( -) -fi - -pkg_setup() { - if [[ ${PV} == *9999* ]]; then - elog - elog "This is a live ebuild which installs the latest from upstream's" - elog "subversion repository, and is unsupported by Gentoo." - elog "Everything but bugs in the ebuild itself will be ignored." - elog - fi - - if use cpudetection; then - ewarn - ewarn "You've enabled the cpudetection flag. This feature is" - ewarn "included mainly for people who want to use the same" - ewarn "binary on another system with a different CPU architecture." - ewarn "MPlayer will already detect your CPU settings by default at" - ewarn "buildtime; this flag is used for runtime detection." - ewarn "You won't need this turned on if you are only building" - ewarn "mplayer for this system. Also, if your compile fails, try" - ewarn "disabling this use flag." - fi - - if use custom-cpuopts; then - ewarn - ewarn "You are using the custom-cpuopts flag which will" - ewarn "specifically allow you to enable / disable certain" - ewarn "CPU optimizations." - ewarn - ewarn "Most desktop users won't need this functionality, but it" - ewarn "is included for corner cases like cross-compiling and" - ewarn "certain profiles. If unsure, disable this flag and MPlayer" - ewarn "will automatically detect and use your available CPU" - ewarn "optimizations." - ewarn - ewarn "Using this flag means your build is unsupported, so" - ewarn "please make sure your CPU optimization use flags (3dnow" - ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." - fi -} - -src_unpack() { - if [[ ${PV} = *9999* ]]; then - subversion_src_unpack - cd "${WORKDIR}" - rm -rf "${WORKDIR}/${P}/ffmpeg/" - ( S="${WORKDIR}/${P}/ffmpeg/" git_src_unpack ) - else - unpack ${A} - fi - - if ! use truetype; then - unpack font-arial-iso-8859-1.tar.bz2 \ - font-arial-iso-8859-2.tar.bz2 \ - font-arial-cp1250.tar.bz2 - fi -} - -src_prepare() { - if [[ ${PV} = *9999* ]]; then - # Set SVN version manually - subversion_wc_info - sed -i -e "s/UNKNOWN/${ESVN_WC_REVISION}/" "${S}/version.sh" || die - else - # Set version # - sed -i -e "s/UNKNOWN/${MPLAYER_REVISION}/" "${S}/version.sh" || die - fi - - # fix path to bash executable in configure scripts - sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die - - base_src_prepare -} - -src_configure() { - local myconf="" - local uses i - - # set LINGUAS - [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" - - # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable - # compilation in almost every situation. The reason for this is - # because if --enable is used, it will force the build of that option, - # regardless of whether the dependency is available or not. - - ################### - #Optional features# - ################### - # disable svga since we don't want it - # disable arts since we don't have kde3 - # always disable internal ass - myconf+=" - --disable-svga --disable-svgalib_helper - --disable-ass-internal - --disable-arts - --disable-kai - $(use_enable network networking) - $(use_enable joystick) - " - uses="ass bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild - myconf+=" --disable-nemesi" # nemesi automagic disable - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use bidi || myconf+=" --disable-fribidi" - use ipv6 || myconf+=" --disable-inet6" - use nut || myconf+=" --disable-libnut" - use rar || myconf+=" --disable-unrarexec" - use samba || myconf+=" --disable-smb" - if ! use lirc; then - myconf+=" - --disable-lirc - --disable-lircc - --disable-apple-ir - " - fi - - # libcdio support: prefer libcdio over cdparanoia - # don't check for cddb w/cdio - if use cdio; then - myconf+=" --disable-cdparanoia" - else - myconf+=" --disable-libcdio" - use cdparanoia || myconf+=" --disable-cdparanoia" - use cddb || myconf+=" --disable-cddb" - fi - - ################################ - # DVD read, navigation support # - ################################ - # - # dvdread - accessing a DVD - # dvdnav - navigation of menus - # - # use external libdvdcss, dvdread and dvdnav - myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal" - if use dvd; then - use dvdnav || myconf+=" --disable-dvdnav" - else - myconf+=" - --disable-dvdnav - --disable-dvdread - " - fi - - ############# - # Subtitles # - ############# - # - # SRT/ASS/SSA (subtitles) requires freetype support - # freetype support requires iconv - # iconv optionally can use unicode - if ! use ass && ! use truetype; then - myconf+=" --disable-freetype" - if ! use iconv; then - myconf+=" - --disable-iconv - --charset=noconv - " - fi - fi - use iconv && use unicode && myconf+=" --charset=UTF-8" - - ##################################### - # DVB / Video4Linux / Radio support # - ##################################### - myconf+=" --disable-tv-bsdbt848" - # broken upstream, won't work with recent kernels - myconf+=" --disable-ivtv" - if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then - use dvb || myconf+=" --disable-dvb" - use pvr || myconf+=" --disable-pvr" - use v4l || myconf+=" --disable-tv-v4l1" - use v4l2 || myconf+=" --disable-tv-v4l2" - if use radio && { use dvb || use v4l || use v4l2; }; then - myconf+=" - --enable-radio - $(use_enable encode radio-capture) - " - else - myconf+=" - --disable-radio-v4l2 - --disable-radio-bsdbt848 - " - fi - else - myconf+=" - --disable-tv - --disable-tv-v4l1 - --disable-tv-v4l2 - --disable-radio - --disable-radio-v4l2 - --disable-radio-bsdbt848 - --disable-dvb - --disable-v4l2 - --disable-pvr" - fi - - ########## - # Codecs # - ########## - myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support - myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2 - use dirac || myconf+=" --disable-libdirac-lavc" - use dts || myconf+=" --disable-libdca" - if ! use mp3; then - myconf+=" - --disable-mp3lame - --disable-mp3lame-lavc - --disable-mp3lib - " - fi - uses="a52 bs2b dv gsm lzo rtmp" - for i in ${uses}; do - use ${i} || myconf+=" --disable-lib${i}" - done - use schroedinger || myconf+=" --disable-libschroedinger-lavc" - use amr || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb" - - uses="faad gif jpeg libmpeg2 live mad mng mpg123 png pnm speex tga theora xanim" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use jpeg2k || myconf+=" --disable-libopenjpeg" - if use vorbis || use tremor; then - use tremor || myconf+=" --disable-tremor-internal" - use vorbis || myconf+=" --disable-libvorbis" - else - myconf+=" - --disable-tremor-internal - --disable-tremor - --disable-libvorbis - " - fi - use vaapi && myconf+=" --enable-vaapi" - use vpx || myconf+=" --disable-libvpx-lavc" - # Encoding - uses="faac x264 xvid toolame twolame" - if use encode; then - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use faac || myconf+=" --disable-faac-lavc" - if use bindist && use faac; then - ewarn "faac is nonfree and cannot be distributed; disabling faac support." - myconf+=" --disable-faac --disable-faac-lavc" - fi - else - myconf+=" --disable-mencoder" - myconf+=" --disable-faac-lavc" - for i in ${uses}; do - myconf+=" --disable-${i}" - use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work." - done - fi - - ################# - # Binary codecs # - ################# - # bug 213836 - if ! use x86 || ! use win32codecs; then - use quicktime || myconf+=" --disable-qtx" - fi - - ###################### - # RealPlayer support # - ###################### - # Realplayer support shows up in four places: - # - libavcodec (internal) - # - win32codecs - # - realcodecs (win32codecs libs) - # - realcodecs (realplayer libs) - - # internal - use real || myconf+=" --disable-real" - - # Real binary codec support only available on x86, amd64 - if use real; then - use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" - use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" - fi - myconf+=" $(use_enable win32codecs win32dll)" - - ################ - # Video Output # - ################ - uses="directfb md5sum sdl" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use aalib || myconf+=" --disable-aa" - use fbcon || myconf+=" --disable-fbdev" - use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" - use libcaca || myconf+=" --disable-caca" - use zoran || myconf+=" --disable-zr" - - if ! use kernel_linux || ! use video_cards_mga; then - myconf+=" --disable-mga --disable-xmga" - fi - - if use video_cards_tdfx; then - myconf+=" - $(use_enable video_cards_tdfx tdfxvid) - $(use_enable fbcon tdfxfb) - " - else - myconf+=" - --disable-3dfx - --disable-tdfxvid - --disable-tdfxfb - " - fi - - # sun card, disable by default, see bug #258729 - myconf+=" --disable-xvr100" - - ################ - # Audio Output # - ################ - uses="alsa esd jack ladspa nas openal" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use pulseaudio || myconf+=" --disable-pulse" - if ! use radio; then - use oss || myconf+=" --disable-ossaudio" - fi - - #################### - # Advanced Options # - #################### - # Platform specific flags, hardcoded on amd64 (see below) - use cpudetection && myconf+=" --enable-runtime-cpudetection" - - # Turning off CPU optimizations usually will break the build. - # However, this use flag, if enabled, will allow users to completely - # specify which ones to use. If disabled, mplayer will automatically - # enable all CPU optimizations that the host build supports. - if use custom-cpuopts; then - uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" - for i in ${uses}; do - myconf+=" $(use_enable ${i})" - done - fi - - use debug && myconf+=" --enable-debug=3" - - if use x86 && gcc-specs-pie; then - filter-flags -fPIC -fPIE - append-ldflags -nopie - fi - - is-flag -O? || append-flags -O2 - - # workaround bug, x86 just has too few registers, see c.f. - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44 - # and 32-bits OSX, bug 329861 - if [[ ${CHOST} == i?86-* ]] ; then - use debug || append-flags -fomit-frame-pointer - fi - - ########################### - # X enabled configuration # - ########################### - myconf+=" --disable-gui" - if use X; then - uses="dxr3 ggi xinerama" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use dga || myconf+=" --disable-dga1 --disable-dga2" - use opengl || myconf+=" --disable-gl" - use osdmenu && myconf+=" --enable-menu" - use vdpau || myconf+=" --disable-vdpau" - use video_cards_vesa || myconf+=" --disable-vesa" - use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" - use xscreensaver || myconf+=" --disable-xss" - - if use xv; then - if use xvmc; then - myconf+=" --enable-xvmc --with-xvmclib=XvMCW" - else - myconf+=" --disable-xvmc" - fi - else - myconf+=" - --disable-xv - --disable-xvmc - " - use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled." - fi - else - myconf+=" - --disable-dga1 - --disable-dga2 - --disable-dxr3 - --disable-ggi - --disable-gl - --disable-vdpau - --disable-vidix - --disable-vidix-pcidb - --disable-xinerama - --disable-xss - --disable-xv - --disable-xvmc - --disable-x11 - " - uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv" - for i in ${uses}; do - use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work." - done - fi - - ############################ - # OSX (aqua) configuration # - ############################ - if use aqua; then - myconf+=" - --enable-macosx-finder - --enable-macosx-bundle - " - fi - - ################### - # External FFmpeg # - ################### - if [[ ${PV} == *9999* ]]; then - use external-ffmpeg && myconf+=" --disable-ffmpeg_a" - fi - - myconf="--cc=$(tc-getCC) - --host-cc=$(tc-getBUILD_CC) - --prefix=${EPREFIX}/usr - --bindir=${EPREFIX}/usr/bin - --libdir=${EPREFIX}/usr/$(get_libdir) - --confdir=${EPREFIX}/etc/mplayer - --datadir=${EPREFIX}/usr/share/mplayer${namesuf} - --mandir=${EPREFIX}/usr/share/man - ${myconf}" - - CFLAGS="${CFLAGS}" ./configure ${myconf} || die -} - -src_compile() { - base_src_compile - # Build only user-requested docs if they're available. - if use doc ; then - # select available languages from $LINGUAS - LINGUAS=${LINGUAS/zh/zh_CN} - local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" - local BUILT_DOCS="" - for i in ${LINGUAS} ; do - hasq ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" - done - if [[ -z $BUILT_DOCS ]]; then - emake -j1 -C DOCS/xml html-chunked - else - for i in ${BUILT_DOCS}; do - emake -j1 -C DOCS/xml html-chunked-${i} - done - fi - fi -} - -src_install() { - local i - - emake \ - DESTDIR="${D}" \ - INSTALLSTRIP="" \ - install - - dodoc AUTHORS Changelog Copyright README etc/codecs.conf - - docinto tech/ - dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} - docinto TOOLS/ - dodoc -r TOOLS - if use real; then - docinto tech/realcodecs/ - dodoc DOCS/tech/realcodecs/* - fi - docinto tech/mirrors/ - dodoc DOCS/tech/mirrors/* - - if use doc; then - docinto html/ - dohtml -r "${S}"/DOCS/HTML/* - fi - - if ! use ass && ! use truetype; then - dodir /usr/share/mplayer/fonts - # Do this generic, as the mplayer people like to change the structure - # of their zips ... - for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do - cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts" - done - # Fix the font symlink ... - rm -rf "${ED}/usr/share/mplayer/font" - dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font - fi - - insinto /etc/mplayer - newins "${S}/etc/example.conf" mplayer.conf - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -# Config options can be section specific, global -# options should go in the default section -[default] -_EOF_ - doins "${S}/etc/input.conf" - if use osdmenu; then - doins "${S}/etc/menu.conf" - fi - - if use ass || use truetype; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -fontconfig=1 -subfont-osd-scale=4 -subfont-text-scale=3 -_EOF_ - fi - - # bug 256203 - if use rar; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -unrarexec=${EPREFIX}/usr/bin/unrar -_EOF_ - fi - - dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf - newbin "${S}/TOOLS/midentify.sh" midentify -} - -pkg_preinst() { - [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \ - rm -rf "${EROOT}/usr/share/mplayer/Skin/default" -} - -pkg_postrm() { - # Cleanup stale symlinks - [ -L "${EROOT}/usr/share/mplayer/font" -a \ - ! -e "${EROOT}/usr/share/mplayer/font" ] && \ - rm -f "${EROOT}/usr/share/mplayer/font" - - [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \ - ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \ - rm -f "${EROOT}/usr/share/mplayer/subfont.ttf" -} diff --git a/media-video/mplayer/mplayer-1.0_rc4_p20110322-r51.ebuild b/media-video/mplayer/mplayer-1.0_rc4_p20110322-r51.ebuild deleted file mode 100644 index 49afb1b87..000000000 --- a/media-video/mplayer/mplayer-1.0_rc4_p20110322-r51.ebuild +++ /dev/null @@ -1,752 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20110322.ebuild,v 1.2 2011/03/22 23:58:03 scarabeus Exp $ - -EAPI=4 - -EGIT_REPO_URI="git://git.libav.org/libav.git" -EGIT_PROJECT="ffmpeg" -ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" -[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git" || SVN_ECLASS="" - -inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS} - -# BUMP ME PLZ, NO COOKIES OTHERWISE -[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r33094 - -IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl bluray -bs2b cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac -directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon -ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa -libcaca libmpeg2 lirc +live lzo mad md5sum +mmx mmxext mng +mp3 mpg123 nas -+network nut openal amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime -radio +rar +real +rtc rtmp samba +shm +schroedinger sdl +speex sse sse2 ssse3 -tga +theora +tremor +truetype +toolame +twolame +unicode v4l v4l2 vaapi vdpau -vidix +vorbis vpx win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid -xvmc zoran" -[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg" - -VIDEO_CARDS="s3virge mga tdfx vesa" -for x in ${VIDEO_CARDS}; do - IUSE+=" video_cards_${x}" -done - -FONT_URI=" - mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 - mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 -" -if [[ ${PV} == *9999* ]]; then - RELEASE_URI="" -else - RELEASE_URI="http://dev.gentoo.org/~scarabeus/${P}.tar.xz - mirror://gentoo/${P}.tar.xz" -fi -SRC_URI="${RELEASE_URI} - !truetype? ( ${FONT_URI} )" - -DESCRIPTION="Media Player for Linux" -HOMEPAGE="http://www.mplayerhq.hu/" - -FONT_RDEPS=" - virtual/ttf-fonts - media-libs/fontconfig - >=media-libs/freetype-2.2.1:2 -" -X_RDEPS=" - x11-libs/libXext - x11-libs/libXxf86vm -" -[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )" -# Rar: althrought -gpl version is nice, it cant do most functions normal rars can -# nemesi? ( net-libs/libnemesi ) -RDEPEND+=" - sys-libs/ncurses - app-arch/bzip2 - sys-libs/zlib - !bindist? ( - x86? ( - win32codecs? ( media-libs/win32codecs ) - ) - ) - X? ( - ${X_RDEPS} - dga? ( x11-libs/libXxf86dga ) - ggi? ( - media-libs/libggi - media-libs/libggiwmh - ) - opengl? ( virtual/opengl ) - vdpau? ( x11-libs/libvdpau ) - xinerama? ( x11-libs/libXinerama ) - xscreensaver? ( x11-libs/libXScrnSaver ) - xv? ( - x11-libs/libXv - xvmc? ( x11-libs/libXvMC ) - ) - ) - a52? ( media-libs/a52dec ) - aalib? ( media-libs/aalib ) - alsa? ( media-libs/alsa-lib ) - amr? ( !bindist? ( media-libs/opencore-amr ) ) - ass? ( ${FONT_RDEPS} >=media-libs/libass-0.9.10[enca?] ) - bidi? ( dev-libs/fribidi ) - bluray? ( media-libs/libbluray ) - bs2b? ( media-libs/libbs2b ) - cdio? ( dev-libs/libcdio ) - cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) - dirac? ( media-video/dirac ) - directfb? ( dev-libs/DirectFB ) - dts? ( media-libs/libdca ) - dv? ( media-libs/libdv ) - dvb? ( media-tv/linuxtv-dvb-headers ) - dvd? ( - >=media-libs/libdvdread-4.1.3 - dvdnav? ( >=media-libs/libdvdnav-4.1.3 ) - ) - encode? ( - !twolame? ( toolame? ( media-sound/toolame ) ) - twolame? ( media-sound/twolame ) - faac? ( !bindist? ( media-libs/faac ) ) - mp3? ( media-sound/lame ) - x264? ( >=media-libs/x264-0.0.20100423 ) - xvid? ( media-libs/xvid ) - ) - esd? ( media-sound/esound ) - enca? ( app-i18n/enca ) - faad? ( media-libs/faad2 ) - gif? ( media-libs/giflib ) - gsm? ( media-sound/gsm ) - iconv? ( virtual/libiconv ) - jack? ( media-sound/jack-audio-connection-kit ) - jpeg? ( virtual/jpeg ) - jpeg2k? ( media-libs/openjpeg ) - ladspa? ( media-libs/ladspa-sdk ) - libcaca? ( media-libs/libcaca ) - libmpeg2? ( media-libs/libmpeg2 ) - lirc? ( app-misc/lirc ) - live? ( media-plugins/live ) - lzo? ( >=dev-libs/lzo-2 ) - mad? ( media-libs/libmad ) - mng? ( media-libs/libmng ) - mpg123? ( media-sound/mpg123 ) - nas? ( media-libs/nas ) - nut? ( >=media-libs/libnut-661 ) - openal? ( media-libs/openal ) - png? ( media-libs/libpng ) - pnm? ( media-libs/netpbm ) - pulseaudio? ( media-sound/pulseaudio ) - rar? ( - || ( - app-arch/unrar - app-arch/rar - ) - ) - rtmp? ( media-video/rtmpdump ) - samba? ( net-fs/samba ) - schroedinger? ( media-libs/schroedinger ) - sdl? ( media-libs/libsdl ) - speex? ( media-libs/speex ) - theora? ( media-libs/libtheora[encode?] ) - truetype? ( ${FONT_RDEPS} ) - vorbis? ( media-libs/libvorbis ) - vpx? ( media-libs/libvpx ) - xanim? ( media-video/xanim ) -" - -X_DEPS=" - x11-proto/videoproto - x11-proto/xf86vidmodeproto -" -ASM_DEP="dev-lang/yasm" -DEPEND="${RDEPEND} - dev-util/pkgconfig - X? ( - ${X_DEPS} - dga? ( x11-proto/xf86dgaproto ) - dxr3? ( media-video/em8300-libraries ) - xinerama? ( x11-proto/xineramaproto ) - xscreensaver? ( x11-proto/scrnsaverproto ) - ) - amd64? ( ${ASM_DEP} ) - doc? ( - dev-libs/libxslt app-text/docbook-xml-dtd - app-text/docbook-xsl-stylesheets - ) - x86? ( ${ASM_DEP} ) - x86-fbsd? ( ${ASM_DEP} ) -" - -SLOT="0" -LICENSE="GPL-2" -if [[ ${PV} != *9999* ]]; then - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -else - KEYWORDS="" -fi - -# bindist does not cope with amr codecs (#299405#c6), faac codecs are nonfree, win32codecs are nonfree -# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio -# dvd navigation requires dvd read support -# ass and freetype font require iconv and ass requires freetype fonts -# unicode transformations are usefull only with iconv -# libvorbis require external tremor to work -# radio requires oss or alsa backend -# xvmc requires xvideo support -REQUIRED_USE="bindist? ( !amr !faac !win32codecs )" - - -if use vaapi; then - PATCHES=( "${FILESDIR}"/vaapi-take3/*.patch ) -else - PATCHES=( -) -fi - -pkg_setup() { - if [[ ${PV} == *9999* ]]; then - elog - elog "This is a live ebuild which installs the latest from upstream's" - elog "subversion repository, and is unsupported by Gentoo." - elog "Everything but bugs in the ebuild itself will be ignored." - elog - fi - - if use cpudetection; then - ewarn - ewarn "You've enabled the cpudetection flag. This feature is" - ewarn "included mainly for people who want to use the same" - ewarn "binary on another system with a different CPU architecture." - ewarn "MPlayer will already detect your CPU settings by default at" - ewarn "buildtime; this flag is used for runtime detection." - ewarn "You won't need this turned on if you are only building" - ewarn "mplayer for this system. Also, if your compile fails, try" - ewarn "disabling this use flag." - fi - - if use custom-cpuopts; then - ewarn - ewarn "You are using the custom-cpuopts flag which will" - ewarn "specifically allow you to enable / disable certain" - ewarn "CPU optimizations." - ewarn - ewarn "Most desktop users won't need this functionality, but it" - ewarn "is included for corner cases like cross-compiling and" - ewarn "certain profiles. If unsure, disable this flag and MPlayer" - ewarn "will automatically detect and use your available CPU" - ewarn "optimizations." - ewarn - ewarn "Using this flag means your build is unsupported, so" - ewarn "please make sure your CPU optimization use flags (3dnow" - ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." - fi -} - -src_unpack() { - if [[ ${PV} = *9999* ]]; then - subversion_src_unpack - cd "${WORKDIR}" - rm -rf "${WORKDIR}/${P}/ffmpeg/" - ( S="${WORKDIR}/${P}/ffmpeg/" git_src_unpack ) - else - unpack ${A} - fi - - if ! use truetype; then - unpack font-arial-iso-8859-1.tar.bz2 \ - font-arial-iso-8859-2.tar.bz2 \ - font-arial-cp1250.tar.bz2 - fi -} - -src_prepare() { - if [[ ${PV} = *9999* ]]; then - # Set SVN version manually - subversion_wc_info - sed -i -e "s/UNKNOWN/${ESVN_WC_REVISION}/" "${S}/version.sh" || die - else - # Set version # - sed -i -e "s/UNKNOWN/${MPLAYER_REVISION}/" "${S}/version.sh" || die - fi - - # fix path to bash executable in configure scripts - sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die - - base_src_prepare -} - -src_configure() { - local myconf="" - local uses i - - # set LINGUAS - [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" - - # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable - # compilation in almost every situation. The reason for this is - # because if --enable is used, it will force the build of that option, - # regardless of whether the dependency is available or not. - - ################### - #Optional features# - ################### - # disable svga since we don't want it - # disable arts since we don't have kde3 - # always disable internal ass - myconf+=" - --disable-svga --disable-svgalib_helper - --disable-ass-internal - --disable-arts - --disable-kai - $(use_enable network networking) - $(use_enable joystick) - " - uses="ass bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild - myconf+=" --disable-nemesi" # nemesi automagic disable - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use bidi || myconf+=" --disable-fribidi" - use ipv6 || myconf+=" --disable-inet6" - use nut || myconf+=" --disable-libnut" - use rar || myconf+=" --disable-unrarexec" - use samba || myconf+=" --disable-smb" - if ! use lirc; then - myconf+=" - --disable-lirc - --disable-lircc - --disable-apple-ir - " - fi - - # libcdio support: prefer libcdio over cdparanoia - # don't check for cddb w/cdio - if use cdio; then - myconf+=" --disable-cdparanoia" - else - myconf+=" --disable-libcdio" - use cdparanoia || myconf+=" --disable-cdparanoia" - use cddb || myconf+=" --disable-cddb" - fi - - ################################ - # DVD read, navigation support # - ################################ - # - # dvdread - accessing a DVD - # dvdnav - navigation of menus - # - # use external libdvdcss, dvdread and dvdnav - myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal" - if use dvd; then - use dvdnav || myconf+=" --disable-dvdnav" - else - myconf+=" - --disable-dvdnav - --disable-dvdread - " - fi - - ############# - # Subtitles # - ############# - # - # SRT/ASS/SSA (subtitles) requires freetype support - # freetype support requires iconv - # iconv optionally can use unicode - if ! use ass && ! use truetype; then - myconf+=" --disable-freetype" - if ! use iconv; then - myconf+=" - --disable-iconv - --charset=noconv - " - fi - fi - use iconv && use unicode && myconf+=" --charset=UTF-8" - - ##################################### - # DVB / Video4Linux / Radio support # - ##################################### - myconf+=" --disable-tv-bsdbt848" - # broken upstream, won't work with recent kernels - myconf+=" --disable-ivtv" - if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then - use dvb || myconf+=" --disable-dvb" - use pvr || myconf+=" --disable-pvr" - use v4l || myconf+=" --disable-tv-v4l1" - use v4l2 || myconf+=" --disable-tv-v4l2" - if use radio && { use dvb || use v4l || use v4l2; }; then - myconf+=" - --enable-radio - $(use_enable encode radio-capture) - " - else - myconf+=" - --disable-radio-v4l2 - --disable-radio-bsdbt848 - " - fi - else - myconf+=" - --disable-tv - --disable-tv-v4l1 - --disable-tv-v4l2 - --disable-radio - --disable-radio-v4l2 - --disable-radio-bsdbt848 - --disable-dvb - --disable-v4l2 - --disable-pvr" - fi - - ########## - # Codecs # - ########## - myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support - myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2 - use dirac || myconf+=" --disable-libdirac-lavc" - use dts || myconf+=" --disable-libdca" - if ! use mp3; then - myconf+=" - --disable-mp3lame - --disable-mp3lame-lavc - --disable-mp3lib - " - fi - uses="a52 bs2b dv gsm lzo rtmp" - for i in ${uses}; do - use ${i} || myconf+=" --disable-lib${i}" - done - use schroedinger || myconf+=" --disable-libschroedinger-lavc" - use amr || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb" - - uses="faad gif jpeg libmpeg2 live mad mng mpg123 png pnm speex tga theora xanim" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use jpeg2k || myconf+=" --disable-libopenjpeg" - if use vorbis || use tremor; then - use tremor || myconf+=" --disable-tremor-internal" - use vorbis || myconf+=" --disable-libvorbis" - else - myconf+=" - --disable-tremor-internal - --disable-tremor - --disable-libvorbis - " - fi - use vaapi && myconf+=" --enable-vaapi" - use vpx || myconf+=" --disable-libvpx-lavc" - # Encoding - uses="faac x264 xvid toolame twolame" - if use encode; then - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use faac || myconf+=" --disable-faac-lavc" - if use bindist && use faac; then - ewarn "faac is nonfree and cannot be distributed; disabling faac support." - myconf+=" --disable-faac --disable-faac-lavc" - fi - else - myconf+=" --disable-mencoder" - myconf+=" --disable-faac-lavc" - for i in ${uses}; do - myconf+=" --disable-${i}" - use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work." - done - fi - - ################# - # Binary codecs # - ################# - # bug 213836 - if ! use x86 || ! use win32codecs; then - use quicktime || myconf+=" --disable-qtx" - fi - - ###################### - # RealPlayer support # - ###################### - # Realplayer support shows up in four places: - # - libavcodec (internal) - # - win32codecs - # - realcodecs (win32codecs libs) - # - realcodecs (realplayer libs) - - # internal - use real || myconf+=" --disable-real" - - # Real binary codec support only available on x86, amd64 - if use real; then - use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" - use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" - fi - myconf+=" $(use_enable win32codecs win32dll)" - - ################ - # Video Output # - ################ - uses="directfb md5sum sdl" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use aalib || myconf+=" --disable-aa" - use fbcon || myconf+=" --disable-fbdev" - use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" - use libcaca || myconf+=" --disable-caca" - use zoran || myconf+=" --disable-zr" - - if ! use kernel_linux || ! use video_cards_mga; then - myconf+=" --disable-mga --disable-xmga" - fi - - if use video_cards_tdfx; then - myconf+=" - $(use_enable video_cards_tdfx tdfxvid) - $(use_enable fbcon tdfxfb) - " - else - myconf+=" - --disable-3dfx - --disable-tdfxvid - --disable-tdfxfb - " - fi - - # sun card, disable by default, see bug #258729 - myconf+=" --disable-xvr100" - - ################ - # Audio Output # - ################ - uses="alsa esd jack ladspa nas openal" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use pulseaudio || myconf+=" --disable-pulse" - if ! use radio; then - use oss || myconf+=" --disable-ossaudio" - fi - - #################### - # Advanced Options # - #################### - # Platform specific flags, hardcoded on amd64 (see below) - use cpudetection && myconf+=" --enable-runtime-cpudetection" - - # Turning off CPU optimizations usually will break the build. - # However, this use flag, if enabled, will allow users to completely - # specify which ones to use. If disabled, mplayer will automatically - # enable all CPU optimizations that the host build supports. - if use custom-cpuopts; then - uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" - for i in ${uses}; do - myconf+=" $(use_enable ${i})" - done - fi - - use debug && myconf+=" --enable-debug=3" - - if use x86 && gcc-specs-pie; then - filter-flags -fPIC -fPIE - append-ldflags -nopie - fi - - is-flag -O? || append-flags -O2 - - # workaround bug, x86 just has too few registers, see c.f. - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44 - # and 32-bits OSX, bug 329861 - if [[ ${CHOST} == i?86-* ]] ; then - use debug || append-flags -fomit-frame-pointer - fi - - ########################### - # X enabled configuration # - ########################### - myconf+=" --disable-gui" - if use X; then - uses="dxr3 ggi xinerama" - for i in ${uses}; do - use ${i} || myconf+=" --disable-${i}" - done - use dga || myconf+=" --disable-dga1 --disable-dga2" - use opengl || myconf+=" --disable-gl" - use osdmenu && myconf+=" --enable-menu" - use vdpau || myconf+=" --disable-vdpau" - use video_cards_vesa || myconf+=" --disable-vesa" - use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" - use xscreensaver || myconf+=" --disable-xss" - - if use xv; then - if use xvmc; then - myconf+=" --enable-xvmc --with-xvmclib=XvMCW" - else - myconf+=" --disable-xvmc" - fi - else - myconf+=" - --disable-xv - --disable-xvmc - " - use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled." - fi - else - myconf+=" - --disable-dga1 - --disable-dga2 - --disable-dxr3 - --disable-ggi - --disable-gl - --disable-vdpau - --disable-vidix - --disable-vidix-pcidb - --disable-xinerama - --disable-xss - --disable-xv - --disable-xvmc - --disable-x11 - " - uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv" - for i in ${uses}; do - use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work." - done - fi - - ############################ - # OSX (aqua) configuration # - ############################ - if use aqua; then - myconf+=" - --enable-macosx-finder - --enable-macosx-bundle - " - fi - - ################### - # External FFmpeg # - ################### - if [[ ${PV} == *9999* ]]; then - use external-ffmpeg && myconf+=" --disable-ffmpeg_a" - fi - - myconf="--cc=$(tc-getCC) - --host-cc=$(tc-getBUILD_CC) - --prefix=${EPREFIX}/usr - --bindir=${EPREFIX}/usr/bin - --libdir=${EPREFIX}/usr/$(get_libdir) - --confdir=${EPREFIX}/etc/mplayer - --datadir=${EPREFIX}/usr/share/mplayer${namesuf} - --mandir=${EPREFIX}/usr/share/man - ${myconf}" - - CFLAGS="${CFLAGS}" ./configure ${myconf} || die -} - -src_compile() { - base_src_compile - # Build only user-requested docs if they're available. - if use doc ; then - # select available languages from $LINGUAS - LINGUAS=${LINGUAS/zh/zh_CN} - local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" - local BUILT_DOCS="" - for i in ${LINGUAS} ; do - hasq ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" - done - if [[ -z $BUILT_DOCS ]]; then - emake -j1 -C DOCS/xml html-chunked - else - for i in ${BUILT_DOCS}; do - emake -j1 -C DOCS/xml html-chunked-${i} - done - fi - fi -} - -src_install() { - local i - - emake \ - DESTDIR="${D}" \ - INSTALLSTRIP="" \ - install - - dodoc AUTHORS Changelog Copyright README etc/codecs.conf - - docinto tech/ - dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} - docinto TOOLS/ - dodoc -r TOOLS - if use real; then - docinto tech/realcodecs/ - dodoc DOCS/tech/realcodecs/* - fi - docinto tech/mirrors/ - dodoc DOCS/tech/mirrors/* - - if use doc; then - docinto html/ - dohtml -r "${S}"/DOCS/HTML/* - fi - - if ! use ass && ! use truetype; then - dodir /usr/share/mplayer/fonts - # Do this generic, as the mplayer people like to change the structure - # of their zips ... - for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do - cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts" - done - # Fix the font symlink ... - rm -rf "${ED}/usr/share/mplayer/font" - dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font - fi - - insinto /etc/mplayer - newins "${S}/etc/example.conf" mplayer.conf - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -# Config options can be section specific, global -# options should go in the default section -[default] -_EOF_ - doins "${S}/etc/input.conf" - if use osdmenu; then - doins "${S}/etc/menu.conf" - fi - - if use ass || use truetype; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -fontconfig=1 -subfont-osd-scale=4 -subfont-text-scale=3 -_EOF_ - fi - - # bug 256203 - if use rar; then - cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ -unrarexec=${EPREFIX}/usr/bin/unrar -_EOF_ - fi - - dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf - newbin "${S}/TOOLS/midentify.sh" midentify -} - -pkg_preinst() { - [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \ - rm -rf "${EROOT}/usr/share/mplayer/Skin/default" -} - -pkg_postrm() { - # Cleanup stale symlinks - [ -L "${EROOT}/usr/share/mplayer/font" -a \ - ! -e "${EROOT}/usr/share/mplayer/font" ] && \ - rm -f "${EROOT}/usr/share/mplayer/font" - - [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \ - ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \ - rm -f "${EROOT}/usr/share/mplayer/subfont.ttf" -} diff --git a/media-video/openshot/Manifest b/media-video/openshot/Manifest deleted file mode 100644 index 86a51885b..000000000 --- a/media-video/openshot/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST openshot-1.4.2.tar.gz 28610481 RMD160 34dbc3993bd4e508b67e9d12e000d3e57f2e05ee SHA1 2d96855349eab66ccc45e9fe1f69bd0f0309f17d SHA256 6bb63bd98080c6043db5ad9490b82c163d40ee858808d3a134cbed1840d3715f -EBUILD openshot-1.4.2.ebuild 1919 RMD160 169a25c03a6a617acfa14791f86a7062855c6694 SHA1 1214cb6554e94cfc27aae653533a5f3a82f2bfb8 SHA256 b6ba7e22c9b3a7307baa6f92a71306aa8a7f45f1c763e8cc9b01ea9cf16d2eb9 diff --git a/media-video/openshot/openshot-1.4.2.ebuild b/media-video/openshot/openshot-1.4.2.ebuild deleted file mode 100644 index 89bb79c8a..000000000 --- a/media-video/openshot/openshot-1.4.2.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -PYTHON_DEPEND=2:2.5 -PYTHON_USE_WITH=xml - -inherit versionator distutils fdo-mime python - -DESCRIPTION="OpenShot Video Editor is a non-linear video editor" -HOMEPAGE="http://www.openshotvideo.com" -SRC_URI="http://launchpad.net/openshot/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND=" - >=x11-libs/gtk+-2.18:2 - dev-python/pygtk - dev-python/pygoocanvas - dev-python/pyxdg - dev-python/librsvg-python - dev-python/httplib2 - >=media-libs/mlt-0.4.6-r1[ffmpeg,frei0r,gtk,melt,python,sdl,xml] - media-sound/sox[encode,ffmpeg] - >=virtual/ffmpeg-0.6[encode,sdl] - dev-python/imaging - " -#>=virtual/ffmpeg-0.6[encode,faac?,ieee1394?,mp3?,sdl,theora?,vorbis?,vpx,x264?,xvid?] -pkg_setup() { - python_set_active_version 2 - python_pkg_setup -} - -src_prepare() { - python_convert_shebangs -q -r 2 . - distutils_src_prepare - - # Disable the installation of the mime.types file. - # The .desktop file would be used to update the mime database. - sed -ie '/launcher/,+1d' setup.py || die - - # Avoid stuff covered by fdo-mime.eclass - # (update-mime-database update-desktop-database update-mime) - # export "FAKEROOTKEY=gentoo" does not work as this variable is filtered - # by portage - sed -ie '/FAILED = /,$d' setup.py || die -} - -# TODO: check stuff installed to /usr/lib/python2.6/site-packages as there are -# some parts installed which shouldn't (locale, themes, profiles effects, -# etc...) Afaik only python stuff should go there and the rest probably to -# /usr/share/openshot -# The same goes for /usr/lib/mime/packages - -pkg_postinst() { - fdo-mime_mime_database_update - fdo-mime_desktop_database_update - distutils_pkg_postinst -} - -pkg_postrm() { - fdo-mime_mime_database_update - fdo-mime_desktop_database_update - distutils_pkg_postrm -} diff --git a/media-video/realplayer/Manifest b/media-video/realplayer/Manifest deleted file mode 100644 index c430b3da3..000000000 --- a/media-video/realplayer/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST RealPlayer11GOLD.rpm 8348034 RMD160 cd91ad5b451624b4e25886727b87207dc0f2123b SHA1 0715703a986e0428dbca4064ee409e4e98fba5ce SHA256 9b0acfe643b50fac8f6ddbbe10875c7498e735040c918b21dd824b9f41388f2e -EBUILD realplayer-11.9999.ebuild 2902 RMD160 73895ca61ea72632ec8e5db34693dede05224ce2 SHA1 5c5dcd9d99b6b12634f0214046c3984f8bcf66b8 SHA256 553f832c785e87c5d5560bed59e9d6fb038d4b4ee7fab70a77cbf15b7627d0c1 -MISC metadata.xml 261 RMD160 fd6c87fa63054c379e842b826f994dce900bb013 SHA1 471683d4ccc2d0934e4f154b51de1be0435f508b SHA256 c4a2402d01197b6c1a7476c5b2b1ec7552b4acbc7dd51c7d775c4100c6324c8d diff --git a/media-video/realplayer/metadata.xml b/media-video/realplayer/metadata.xml deleted file mode 100644 index 234b4095d..000000000 --- a/media-video/realplayer/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - no-herd - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/media-video/realplayer/realplayer-11.9999.ebuild b/media-video/realplayer/realplayer-11.9999.ebuild deleted file mode 100644 index 0308a2aa0..000000000 --- a/media-video/realplayer/realplayer-11.9999.ebuild +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="3" - -inherit nsplugins eutils rpm - -MY_PN="RealPlayer" -DESCRIPTION="Real Media Player" -HOMEPAGE="http://www.real.com/ http://player.helixcommunity.org/" -SRC_URI="http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.rpm" -RESTRICT="mirror strip test" -LICENSE="HBRL" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -IUSE="X nsplugin" - -RDEPEND="!amd64? ( - X? ( >=dev-libs/glib-2 - >=x11-libs/pango-1.2 - >=x11-libs/gtk+-2.2 ) - =virtual/libstdc++-3.3* - ) - amd64? ( - X? ( app-emulation/emul-linux-x86-gtklibs ) - app-emulation/emul-linux-x86-compat - )" - -QA_TEXTRELS="opt/RealPlayer/codecs/raac.so - opt/RealPlayer/codecs/colorcvt.so - opt/RealPlayer/codecs/drv2.so - opt/RealPlayer/codecs/drvc.so - opt/RealPlayer/plugins/theorarend.so - opt/RealPlayer/plugins/vorbisrend.so - opt/RealPlayer/plugins/swfrender.so - opt/RealPlayer/plugins/oggfformat.so" - -QA_EXECSTACK="opt/RealPlayer/plugins/swfrender.so - opt/RealPlayer/plugins/vidsite.so - opt/RealPlayer/codecs/raac.so - opt/RealPlayer/codecs/drvc.so - opt/RealPlayer/codecs/drv2.so - opt/RealPlayer/codecs/colorcvt.so - opt/RealPlayer/codecs/atrc.so" - -QA_DT_HASH="opt/.*so opt/.*/realplay.bin" - -MY_S="${WORKDIR}/opt/real/${MY_PN}" - -pkg_setup() { - # This is a binary x86 package => ABI=x86 - # Please keep this in future versions - # Danny van Dyk 2005/03/26 - has_multilib_profile && ABI="x86" -} - -src_unpack() { - rpm_src_unpack -} - -src_install() { - dodir /opt/${MY_PN} - - cd "${MY_S}" - -# fperms 644 codecs/* - insinto "/opt/${MY_PN}/codecs" - doins codecs/* - - if use X; then - - rm "${MY_S}/share/distcode" - - # Make them executable, Bug #233415 - exeinto "/opt/${MY_PN}/" - doexe realplay realplay.bin - - insinto "/opt/${MY_PN}/" - for x in common mozilla plugins share; do - doins -r "${MY_S}/${x}" - done; - - domenu "${MY_S}/share/realplay.desktop" - - for res in 16 32 48 192; do - insinto /usr/share/icons/hicolor/${res}x${res}/apps - newins "${MY_S}/share/icons/realplay_${res}x${res}.png" \ - realplay.png - done - - # mozilla plugin - if use nsplugin ; then - exeinto /opt/netscape/plugins - doexe "${MY_S}/mozilla/nphelix.so" - inst_plugin /opt/netscape/plugins/nphelix.so - - insinto /opt/netscape/plugins - doins "${MY_S}/mozilla/nphelix.xpt" - inst_plugin /opt/netscape/plugins/nphelix.xpt - fi - - dodir /usr/bin - dosym "/opt/${MY_PN}/realplay" /usr/bin/realplay - fi - - # Language resources - cd "${D}"/opt/RealPlayer/share/locale - for LC in *; do - mkdir -p "${D}"/usr/share/locale/${LC}/LC_MESSAGES - dosym /opt/RealPlayer/share/locale/${LC}/player.mo /usr/share/locale/${LC}/LC_MESSAGES/realplay.mo - dosym /opt/RealPlayer/share/locale/${LC}/widget.mo /usr/share/locale/${LC}/LC_MESSAGES/libgtkhx.mo - done - - cd "${MY_S}" - dodoc README - dohtml share/hxplay_help.html share/tigris.css -} diff --git a/net-dialup/mkwvconf/Manifest b/net-dialup/mkwvconf/Manifest deleted file mode 100644 index 287abdea0..000000000 --- a/net-dialup/mkwvconf/Manifest +++ /dev/null @@ -1 +0,0 @@ -EBUILD mkwvconf-9999.ebuild 557 RMD160 85f13dc7417e300d4910356a872fbc1f3f6428ca SHA1 2cdfe92b01363b35a1e7384bb17b12aec31e88dc SHA256 4a005c2e20a1029f010b8ab39ef403913a4367549a4971cae1e7eaf7142697e5 diff --git a/net-dialup/mkwvconf/mkwvconf-9999.ebuild b/net-dialup/mkwvconf/mkwvconf-9999.ebuild deleted file mode 100644 index df8b6d532..000000000 --- a/net-dialup/mkwvconf/mkwvconf-9999.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" - -inherit git-2 python -EGIT_REPO_URI="git://github.com/schuay/mkwvconf.git" -KEYWORDS="~amd64 ~x86" - -DESCRIPTION="Automatically generate a wvdial configuration for mobile broadband devices using mobile-broadband-provider-info" -HOMEPAGE="https://github.com/schuay/mkwvconf" - -SLOT="0" -IUSE="" - -RDEPEND="net-dialup/wvdial -net-misc/mobile-broadband-provider-info" -DEPEND="${RDEPEND}" - -src_install() { - exeinto /usr/local/bin - doexe mkwvconf.py -} diff --git a/net-dns/bind/ChangeLog b/net-dns/bind/ChangeLog deleted file mode 100644 index ac861a4f8..000000000 --- a/net-dns/bind/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -# ChangeLog for net-dns/bind -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*bind-9.7.3_p3-r1 (05 Aug 2011) - - 05 Aug 2011; Mike Hiretsky (mhiretskiy) - +bind-9.7.3_p3-r1.ebuild, +files/bind-9.7.3-odbc-dlz-detect.patch, - +files/named.confd-r6, +files/named.init-r10, +files/named.init-r11: - Move bind from portage for binary rebuild in CDS. - diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest deleted file mode 100644 index 56fcd572c..000000000 --- a/net-dns/bind/Manifest +++ /dev/null @@ -1,23 +0,0 @@ -AUX 10bind.env 27 RMD160 872245707b4f72a212cda162c59495744d77a6e3 SHA1 7b8c1abd5910bb7a07c6b7c820c2b34a534b2593 SHA256 5ad6a4402372b43809618051873b63646746f400447bba30dc4dfecd028e3650 -AUX 127.zone-r1 533 RMD160 2795c6c27912a73ac45582f33de3182382db3a5d SHA1 87fcb2b96db4cef99d25fa87759dd32ea2ac5559 SHA256 0fa4c294640d4191710647d1b18a2099f22ff674b3a35e6e81ff929f921da626 -AUX bind-9.7.2-use_deprecated.patch 274 RMD160 9aacb2dc751048c4fca6cf9ff89731863c0dd5d4 SHA1 5fd75f4b1bdb234d0158c820b6b6df5591ef7fe7 SHA256 928360637f16b88eaa54d07e02ef7bab7024b4dc40423d9dbc9f59da181895df -AUX bind-9.7.3-odbc-dlz-detect.patch 517 RMD160 2103729c77088500c9640206b4aa0fd3888e0555 SHA1 28ab80dfe8f9d65d52fbf3f8b33a7522388d526a SHA256 69797543bf723e3e3e7405f0130d14754ad26830d45977efebdd35848b7b03aa -AUX bind-dlzmysql5-reconnect.patch 1842 RMD160 687f6128b6511dbeecdfc81b197520b1afd74005 SHA1 7b9b8e1b85f1344e4b5d8566ab868fcb1e87a049 SHA256 7376ac37c2d3fbcf5d8e886008639bdbe642f44c9021f435af370bddd3f03bd4 -AUX localhost.zone-r3 426 RMD160 b2dfe76923695e6eac49234b7e7f90fef4d1838e SHA1 b84babc535466cacc7001e4c6eb21e22ae11b22d SHA256 3f39e9b5be72435e961cd6f5acdfe396b05640bf370969acf918a939575122bc -AUX named.cache 2941 RMD160 c29f47291496e67e72c129db488d07172fe244e6 SHA1 b1575428e8b5f513469a90a32cf163e8db46cab5 SHA256 35f7fcf2b177678cf362af7ac942f7f1a1c102c045dc3844991a411fc4c5d277 -AUX named.conf-r5 3952 RMD160 e4554204786565b08eefb9d129c7b8e0b3a55454 SHA1 cd5c48aa966760343a807c107839c82ba5b575a0 SHA256 fd1e2cbb7d2b3d00ae658a431c747a2adb35227bf6bc6996db1fe705cf2da943 -AUX named.confd-r5 1224 RMD160 b353a2bd8c73cbc1f967d04339d4f07db840a5ee SHA1 181a57e1b2c0371ad2704bb61f621498e2bfddff SHA256 00f06f96dc0cc7855bd15d31449b492e3a2502938e8038081c9f09e0d0ce7a08 -AUX named.confd-r6 1368 RMD160 8ea5c67af53a0986a09f1077a5dd722dd52c8b51 SHA1 64d5d6ead7fb5ba0ff8016b5fee2518fbde6f90c SHA256 704ac6954b2bad5d0bab19281dc703e86d9b4fe94d63dd00be1e525a3e64c492 -AUX named.init-r10 5925 RMD160 acd84047fe945bb146c676a673eca9782362f4ad SHA1 bf91dabc72f693222c935eada9a21f7dc7dc2c2a SHA256 e7604579ed45cafdf121a65c5847b56aecb42356a213f7bac17474823431b24d -AUX named.init-r11 6250 RMD160 12de95defb4de776b4399640be5ae7b2c91388f8 SHA1 9e8ab623ce45cc362b156fed8ffdd67c3294f740 SHA256 5fec01c26a37a793a7c812b0e0c22bd0a0142d1ebfabd21b1bf4f11b73c5526b -AUX named.init-r9 4946 RMD160 48cce5a99a8da1eff3492c4896fbae4c1343a675 SHA1 944ed08d22e70ba93625814695535f58feed2083 SHA256 77fd6b4ecb0f7f4baa872d1be1b18d2ea9a913a15f30f63ab904a62ad4325748 -DIST bind-9.7.2-P3.tar.gz 7643996 RMD160 304f362cef1c3e48bece850802a08159ecfd5428 SHA1 ca621a23e79298b4da14a3884690edbccda410d4 SHA256 cd945f4766be664f4528ec065df626ad3624481695316ec8e13ad272f4abfb7e -DIST bind-9.7.3-P3.tar.gz 7586748 RMD160 456aed6a9c6e87de43d38860eaef2ee5d67e1f8e SHA1 90c5340daa94517e3bc7be89feef5ea6918fc390 SHA256 464e9aeeaf8d6964205621ead02898e076ebcfcbeef8c651dc695891c5622c37 -DIST bind-geoip-1.3-9.7.2-P2.patch 54084 RMD160 fcc2308bd2832df821f76aeb1ea1c5740fadb6f3 SHA1 786c2fd8dde40f235e292f5bd883094863976580 SHA256 c12c03fc25a679d8d4296142597c698ab934e18cc761113553062a66be2875dd -DIST bind-geoip-1.3-readme.txt 10040 RMD160 073956324ed4780e0e0cdbf40ae259f85ebef9d2 SHA1 e13ea2f458adfed3f1a20f9fe3eb2bfd484fc0b0 SHA256 380ce89f1a614f46571ad59bddf0f268275691aa2d7a7a7bf1c2a3ef4d26e845 -DIST bind-sdb-ldap-1.1.0-fc14.patch.bz2 9477 RMD160 eb7507dc4b1da0064516d9e75dbc435553b1c9ce SHA1 8c269cd172c6d90df38dab201cdd105eff03cbe3 SHA256 fe043a573ba187dcc8b0f7313d4408236e6916ec246b0443b7e71b33c8303ae9 -DIST bind-sdb-ldap-1.1.0.tar.bz2 5883 RMD160 ec2f684f278e5fa72158486a14dfce3005a62602 SHA1 fae539a29615fda56a2dcb55a1e01d335835b980 SHA256 afe9cc6a99c20f1dc1929b0a30ff815b0aac509a6c12f8df432853c856d35754 -DIST dyndns-samples.tbz2 22866 RMD160 27d5b2d0edb8e1ff16b3f980c38d7af33ccf0c7d SHA1 0a62e9458d0e16b67a3a2f63ea485ce969f1fb4d SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 -EBUILD bind-9.7.2_p3-r9.ebuild 11340 RMD160 c50cbe4785052a29f811226ff86e19e6f40567e0 SHA1 b2d843711629de8da586f2971a5a651f6893fb9e SHA256 a05eb29c28bf1b68dc3d5b0cc7552573de653ccc89fbbe1ced64caae4b3f4560 -EBUILD bind-9.7.3_p3-r1.ebuild 11547 RMD160 6e1ab2efcb184db200a53190b016a7d763499898 SHA1 dc534b640bb4ca05d7e3b700bc1c8a75b0d58ed9 SHA256 2e64fbe000308956c75c1edd324073f9cd377af1ad7320343a581ef03a719e27 -MISC ChangeLog 399 RMD160 3272c4950931f43913ab576a10aecf50886ff218 SHA1 2fedfc6656353f703183f49d88309f2ac9e7778b SHA256 f0088a86459c76caa461424dcda58bcbdd80b71bca974d85280bfdaeb0694999 diff --git a/net-dns/bind/bind-9.7.2_p3-r9.ebuild b/net-dns/bind/bind-9.7.2_p3-r9.ebuild deleted file mode 100644 index e443c6221..000000000 --- a/net-dns/bind/bind-9.7.2_p3-r9.ebuild +++ /dev/null @@ -1,356 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/bind-9.7.2_p3-r3.ebuild,v 1.1 2011/01/07 23:37:37 robbat2 Exp $ - -EAPI="3" - -inherit eutils autotools toolchain-funcs flag-o-matic - -MY_PV="${PV/_p/-P}" -MY_P="${PN}-${MY_PV}" - -SDB_LDAP_VER="1.1.0" - -GEOIP_PV=1.3 -#GEOIP_PV_AGAINST="${MY_PV}" -GEOIP_PV_AGAINST="9.7.2-P2" -GEOIP_P="bind-geoip-${GEOIP_PV}" -GEOIP_PATCH_A="${GEOIP_P}-${GEOIP_PV_AGAINST}.patch" -GEOIP_DOC_A="${GEOIP_P}-readme.txt" -GEOIP_SRC_URI_BASE="http://bind-geoip.googlecode.com/" - -DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" -HOMEPAGE="http://www.isc.org/software/bind" -SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz - doc? ( mirror://gentoo/dyndns-samples.tbz2 ) - geoip? ( ${GEOIP_SRC_URI_BASE}/files/${GEOIP_DOC_A} - ${GEOIP_SRC_URI_BASE}/files/${GEOIP_PATCH_A} ) - sdb-ldap? ( mirror://gentoo/bind-sdb-ldap-${SDB_LDAP_VER}.tar.bz2 )" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads - resolvconf urandom xml geoip gssapi sdb-ldap" - -DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) - mysql? ( >=virtual/mysql-4.0 ) - odbc? ( >=dev-db/unixODBC-2.2.6 ) - ldap? ( net-nds/openldap ) - idn? ( net-dns/idnkit ) - postgres? ( dev-db/postgresql-base ) - threads? ( >=sys-libs/libcap-2.1.0 ) - xml? ( dev-libs/libxml2 ) - geoip? ( >=dev-libs/geoip-1.4.6 ) - gssapi? ( virtual/krb5 ) - sdb-ldap? ( net-nds/openldap )" - -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-bind ) - resolvconf? ( net-dns/openresolv ) - sys-process/psmisc" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - use threads && { - ewarn - ewarn "If you're in vserver enviroment, you're probably want to" - ewarn "disable threads support because of linux capabilities dependency" - ewarn - } - - ebegin "Creating named group and user" - enewgroup named 40 - enewuser named 40 -1 /etc/bind named - eend ${?} -} - -src_prepare() { - # Adjusting PATHs in manpages - for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do - sed -i \ - -e 's:/etc/named.conf:/etc/bind/named.conf:g' \ - -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ - -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ - "${i}" || die "sed failed, ${i} doesn't exist" - done - - if use dlz; then - # bind fails to reconnect to MySQL5 databases, bug #180720, patch by Nicolas Brousse - # (http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/) - if use mysql && has_version ">=dev-db/mysql-5"; then - epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch - fi - fi - - # should be installed by bind-tools - sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die - - # sdb-ldap patch as per bug #160567 - # Upstream URL: http://bind9-ldap.bayour.com/ - # FIXME: bug 302735 - use sdb-ldap && epatch "${WORKDIR}"/sdb-ldap/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch - use sdb-ldap && epatch "${FILESDIR}"/bind-9.7.2-use_deprecated.patch - - if use geoip; then - cp "${DISTDIR}"/${GEOIP_PATCH_A} "${S}" || die - sed -i -e 's/-RELEASEVER=2/-RELEASEVER=3/' \ - -e 's/+RELEASEVER=2-geoip-1.3/+RELEASEVER=3-geoip-1.3/' \ - ${GEOIP_PATCH_A} || die - epatch ${GEOIP_PATCH_A} - fi - - # bug #220361 - rm {aclocal,libtool}.m4 - WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf - - # remove useless c++ checks - epunt_cxx -} - -src_configure() { - local myconf="" - - use dlz && { - myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" - use postgres && myconf="${myconf} --with-dlz-postgres" - use mysql && myconf="${myconf} --with-dlz-mysql" - use berkdb && myconf="${myconf} --with-dlz-bdb" - use ldap && myconf="${myconf} --with-dlz-ldap" - use odbc && myconf="${myconf} --with-dlz-odbc" - } - - if use threads; then - if use dlz && use mysql; then - ewarn - ewarn "MySQL uses thread local storage in its C api. Thus MySQL" - ewarn "requires that each thread of an application execute a MySQL" - ewarn "\"thread initialization\" to setup the thread local storage." - ewarn "This is impossible to do safely while staying within the DLZ" - ewarn "driver API. This is a limitation caused by MySQL, and not" - ewarn "the DLZ API." - ewarn "Because of this BIND MUST only run with a single thread when" - ewarn "using the MySQL driver." - ewarn - myconf="${myconf} --disable-linux-caps --disable-threads" - ewarn "Threading support disabled" - else - myconf="${myconf} --enable-linux-caps --enable-threads" - einfo "Threading support enabled" - fi - else - myconf="${myconf} --disable-linux-caps --disable-threads" - fi - - if use urandom; then - myconf="${myconf} --with-randomdev=/dev/urandom" - else - myconf="${myconf} --with-randomdev=/dev/random" - fi - - use geoip && myconf="${myconf} --with-geoip" - - # bug #158664 - gcc-specs-ssp && replace-flags -O[23s] -O - - export BUILD_CC=$(tc-getBUILD_CC) - econf \ - --sysconfdir=/etc/bind \ - --localstatedir=/var \ - --with-libtool \ - $(use_with ssl openssl) \ - $(use_with idn) \ - $(use_enable ipv6) \ - $(use_with xml libxml2) \ - $(use_with gssapi) \ - ${myconf} - - # bug #151839 - echo '#undef SO_BSDCOMPAT' >> config.h -} - -src_install() { - emake DESTDIR="${D}" install || die - - dodoc CHANGES FAQ README - - if use idn; then - dodoc contrib/idn/README.idnkit || die - fi - - if use doc; then - dodoc doc/arm/Bv9ARM.pdf || die - - docinto misc - dodoc doc/misc/* || die - - # might a 'html' useflag make sense? - docinto html - dohtml -r doc/arm/* || die - - docinto draft - dodoc doc/draft/* || die - - docinto rfc - dodoc doc/rfc/* || die - - docinto contrib - dodoc contrib/named-bootconf/named-bootconf.sh \ - contrib/nanny/nanny.pl || die - - # some handy-dandy dynamic dns examples - cd "${D}"/usr/share/doc/${PF} - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die - fi - - use geoip && dodoc "${DISTDIR}"/${GEOIP_P}-readme.txt - - insinto /etc/bind - newins "${FILESDIR}"/named.conf-r5 named.conf || die - - # ftp://ftp.rs.internic.net/domain/named.cache: - insinto /var/bind - doins "${FILESDIR}"/named.cache || die - - insinto /var/bind/pri - newins "${FILESDIR}"/127.zone-r1 127.zone || die - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die - - newinitd "${FILESDIR}"/named.init-r9 named || die - newconfd "${FILESDIR}"/named.confd-r5 named || die - - newenvd "${FILESDIR}"/10bind.env 10bind || die - - # Let's get rid of those tools and their manpages since they're provided by bind-tools - rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* - rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8* - rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} - rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate} - - dosym /var/bind/named.cache /var/bind/root.cache || die - dosym /var/bind/pri /etc/bind/pri || die - dosym /var/bind/sec /etc/bind/sec || die - keepdir /var/bind/sec - - dodir /var/{run,log}/named || die - - fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri} - fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} - fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} - fperms 0750 /etc/bind /var/bind/pri - fperms 0770 /var/{run,log}/named /var/bind/{,sec} -} - -pkg_postinst() { - if [ ! -f '/etc/bind/rndc.key' ]; then - if use urandom; then - einfo "Using /dev/urandom for generating rndc.key" - /usr/sbin/rndc-confgen -r /dev/urandom -a - echo - else - einfo "Using /dev/random for generating rndc.key" - /usr/sbin/rndc-confgen -a - echo - fi - chown root:named /etc/bind/rndc.key - chmod 0640 /etc/bind/rndc.key - fi - - einfo - einfo "You can edit /etc/conf.d/named to customize named settings" - einfo - use mysql || use postgres || use ldap && { - elog "If your named depends on MySQL/PostgreSQL or LDAP," - elog "uncomment the specified rc_named_* lines in your" - elog "/etc/conf.d/named config to ensure they'll start before bind" - einfo - } - einfo "If you'd like to run bind in a chroot AND this is a new" - einfo "install OR your bind doesn't already run in a chroot:" - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" - einfo - - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) - if [[ -n ${CHROOT} ]]; then - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" - elog "To enable the old behaviour (without using mount) uncomment the" - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." - elog "If you decide to use the new/default method, ensure to make backup" - elog "first and merge your existing configs/zones to /etc/bind and" - elog "/var/bind because bind will now mount the needed directories into" - elog "the chroot dir." - fi - - ewarn - ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache" - ewarn "you may need to fix your named.conf!" - ewarn - ewarn "NOTE: If you upgrade from =dev-db/mysql-5"; then - epatch "${FILESDIR}"/bind-dlzmysql5-reconnect.patch - fi - - if use odbc; then - epatch "${FILESDIR}/bind-9.7.3-odbc-dlz-detect.patch" - fi - fi - - # should be installed by bind-tools - sed -i -r -e "s:(nsupdate|dig) ::g" bin/Makefile.in || die - - # sdb-ldap patch as per bug #160567 - # Upstream URL: http://bind9-ldap.bayour.com/ - # New patch take from bug 302735 - if use sdb-ldap; then - epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch - cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named - cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools - cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools - fi - - if use geoip; then - cp "${DISTDIR}"/${GEOIP_PATCH_A} "${S}" || die - sed -i -e 's:PATCHVER=2:PATCHVER=3:' \ - -e 's/RELEASEVER=2/RELEASEVER=3/' \ - ${GEOIP_PATCH_A} || die - epatch ${GEOIP_PATCH_A} - fi - - # bug #220361 - rm {aclocal,libtool}.m4 - WANT_AUTOCONF=2.5 AT_NO_RECURSIVE=1 eautoreconf - - # remove useless c++ checks - epunt_cxx -} - -src_configure() { - local myconf="" - - use dlz && { - myconf="${myconf} --with-dlz-filesystem --with-dlz-stub" - use postgres && myconf="${myconf} --with-dlz-postgres" - use mysql && myconf="${myconf} --with-dlz-mysql" - use berkdb && myconf="${myconf} --with-dlz-bdb" - use ldap && myconf="${myconf} --with-dlz-ldap" - use odbc && myconf="${myconf} --with-dlz-odbc" - } - - if use threads; then - if use dlz && use mysql; then - ewarn - ewarn "MySQL uses thread local storage in its C api. Thus MySQL" - ewarn "requires that each thread of an application execute a MySQL" - ewarn "\"thread initialization\" to setup the thread local storage." - ewarn "This is impossible to do safely while staying within the DLZ" - ewarn "driver API. This is a limitation caused by MySQL, and not" - ewarn "the DLZ API." - ewarn "Because of this BIND MUST only run with a single thread when" - ewarn "using the MySQL driver." - ewarn - myconf="${myconf} --disable-linux-caps --disable-threads" - ewarn "Threading support disabled" - else - myconf="${myconf} --enable-linux-caps --enable-threads" - einfo "Threading support enabled" - fi - else - myconf="${myconf} --disable-linux-caps --disable-threads" - fi - - if use urandom; then - myconf="${myconf} --with-randomdev=/dev/urandom" - else - myconf="${myconf} --with-randomdev=/dev/random" - fi - - use geoip && myconf="${myconf} --with-geoip" - - # bug #158664 - gcc-specs-ssp && replace-flags -O[23s] -O - - export BUILD_CC=$(tc-getBUILD_CC) - econf \ - --sysconfdir=/etc/bind \ - --localstatedir=/var \ - --with-libtool \ - $(use_with ssl openssl) \ - $(use_with idn) \ - $(use_enable ipv6) \ - $(use_with xml libxml2) \ - $(use_with gssapi) \ - ${myconf} - - # bug #151839 - echo '#undef SO_BSDCOMPAT' >> config.h -} - -src_install() { - emake DESTDIR="${D}" install || die - - dodoc CHANGES FAQ README - - if use idn; then - dodoc contrib/idn/README.idnkit || die - fi - - if use doc; then - dodoc doc/arm/Bv9ARM.pdf || die - - docinto misc - dodoc doc/misc/* || die - - # might a 'html' useflag make sense? - docinto html - dohtml -r doc/arm/* || die - - docinto draft - dodoc doc/draft/* || die - - docinto rfc - dodoc doc/rfc/* || die - - docinto contrib - dodoc contrib/named-bootconf/named-bootconf.sh \ - contrib/nanny/nanny.pl || die - - # some handy-dandy dynamic dns examples - cd "${D}"/usr/share/doc/${PF} - tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die - fi - - use geoip && dodoc "${DISTDIR}"/${GEOIP_DOC_A} - - insinto /etc/bind - newins "${FILESDIR}"/named.conf-r5 named.conf || die - - # ftp://ftp.rs.internic.net/domain/named.cache: - insinto /var/bind - doins "${FILESDIR}"/named.cache || die - - insinto /var/bind/pri - newins "${FILESDIR}"/127.zone-r1 127.zone || die - newins "${FILESDIR}"/localhost.zone-r3 localhost.zone || die - - newinitd "${FILESDIR}"/named.init-r11 named || die - newconfd "${FILESDIR}"/named.confd-r6 named || die - - newenvd "${FILESDIR}"/10bind.env 10bind || die - - # Let's get rid of those tools and their manpages since they're provided by bind-tools - rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* - rm -f "${D}"/usr/share/man/man8/{dnssec-keygen,nsupdate}.8* - rm -f "${D}"/usr/bin/{dig,host,nslookup,dnssec-keygen,nsupdate} - rm -f "${D}"/usr/sbin/{dig,host,nslookup,dnssec-keygen,nsupdate} - - dosym /var/bind/named.cache /var/bind/root.cache || die - dosym /var/bind/pri /etc/bind/pri || die - dosym /var/bind/sec /etc/bind/sec || die - dosym /var/bind/dyn /etc/bind/dyn || die - keepdir /var/bind/{pri,sec,dyn} - - dodir /var/{run,log}/named || die - - fowners root:named /{etc,var}/bind /var/{run,log}/named /var/bind/{sec,pri,dyn} - fowners root:named /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} - fperms 0640 /var/bind/named.cache /var/bind/pri/{127,localhost}.zone /etc/bind/{bind.keys,named.conf} - fperms 0750 /etc/bind /var/bind/pri - fperms 0770 /var/{run,log}/named /var/bind/{,sec,dyn} -} - -pkg_postinst() { - if [ ! -f '/etc/bind/rndc.key' ]; then - if use urandom; then - einfo "Using /dev/urandom for generating rndc.key" - /usr/sbin/rndc-confgen -r /dev/urandom -a - echo - else - einfo "Using /dev/random for generating rndc.key" - /usr/sbin/rndc-confgen -a - echo - fi - chown root:named /etc/bind/rndc.key - chmod 0640 /etc/bind/rndc.key - fi - - einfo - einfo "You can edit /etc/conf.d/named to customize named settings" - einfo - use mysql || use postgres || use ldap && { - elog "If your named depends on MySQL/PostgreSQL or LDAP," - elog "uncomment the specified rc_named_* lines in your" - elog "/etc/conf.d/named config to ensure they'll start before bind" - einfo - } - einfo "If you'd like to run bind in a chroot AND this is a new" - einfo "install OR your bind doesn't already run in a chroot:" - einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." - einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" - einfo - - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) - if [[ -n ${CHROOT} ]]; then - elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" - elog "To enable the old behaviour (without using mount) uncomment the" - elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." - elog "If you decide to use the new/default method, ensure to make backup" - elog "first and merge your existing configs/zones to /etc/bind and" - elog "/var/bind because bind will now mount the needed directories into" - elog "the chroot dir." - fi - - ewarn - ewarn "NOTE: /var/bind/named.ca has been renamed to /var/bind/named.cache" - ewarn "you may need to fix your named.conf!" - ewarn - ewarn "NOTE: If you upgrade from - #include - -+#define LDAP_DEPRECATED 1 - #include - #include "ldapdb.h" - diff --git a/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch b/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch deleted file mode 100644 index 1577d578d..000000000 --- a/net-dns/bind/files/bind-9.7.3-odbc-dlz-detect.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in -index ff3783a..bd7a700 100644 ---- a/contrib/dlz/config.dlz.in -+++ b/contrib/dlz/config.dlz.in -@@ -407,10 +407,13 @@ then - odbcdirs="/usr /usr/local /usr/pkg" - for d in $odbcdirs - do -- if test -f $d/include/sql.h -a -f $d/lib/libodbc.a -+ if test -f $d/include/sql.h - then -- use_dlz_odbc=$d -- break -+ if test -f $d/lib/libodbc.a -o -f $d/lib/libodbc.la -o $d/lib/libodbc.so -+ then -+ use_dlz_odbc=$d -+ break -+ fi - fi - done - fi diff --git a/net-dns/bind/files/bind-dlzmysql5-reconnect.patch b/net-dns/bind/files/bind-dlzmysql5-reconnect.patch deleted file mode 100644 index b854b9583..000000000 --- a/net-dns/bind/files/bind-dlzmysql5-reconnect.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- bind-9.5.0a6.orig/contrib/dlz/drivers/dlz_mysql_driver.c 2007-02-06 06:44:26.000000000 +0100 -+++ bind-9.5.0a6/contrib/dlz/drivers/dlz_mysql_driver.c 2007-09-04 23:57:57.000000000 +0200 -@@ -92,6 +92,25 @@ - */ - - /*% -+ * Factorize the mysql_ping for adding a log error message -+ */ -+static isc_result_t -+mysqldrv_ping(dbinstance_t *dbi) { -+ int pres = 0; -+ -+ pres = mysql_ping(dbi->dbconn); -+ if ( pres != 0 ) { -+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, -+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), -+ "\nMySQL Ping Error : %s (%i)\n", -+ mysql_error(dbi->dbconn), -+ mysql_errno(dbi->dbconn)); -+ return (ISC_R_FAILURE); -+ } -+ return (ISC_R_SUCCESS); -+} -+ -+/*% - * Allocates memory for a new string, and then constructs the new - * string by "escaping" the input string. The new string is - * safe to be used in queries. This is necessary because we cannot -@@ -225,6 +244,8 @@ - } - - -+ mysqldrv_ping(dbi); -+ - /* - * was a zone string passed? If so, make it safe for use in - * queries. -@@ -324,7 +345,7 @@ - qres = mysql_query((MYSQL *) dbi->dbconn, querystring); - if (qres == 0) - break; -- for (j=0; mysql_ping((MYSQL *) dbi->dbconn) != 0 && j < 4; j++) -+ for (j=0; mysqldrv_ping(dbi) != 0 && j < 4; j++) - ; - } - -@@ -923,6 +944,12 @@ - pass = getParameterValue(argv[1], "pass="); - socket = getParameterValue(argv[1], "socket="); - -+ if(mysql_options((MYSQL *) dbi->dbconn, MYSQL_OPT_RECONNECT, "1")) { -+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, -+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, -+ "Could not set database reconnect option"); -+ } -+ - for (j=0; dbc == NULL && j < 4; j++) - dbc = mysql_real_connect((MYSQL *) dbi->dbconn, host, - user, pass, dbname, port, socket, diff --git a/net-dns/bind/files/localhost.zone-r3 b/net-dns/bind/files/localhost.zone-r3 deleted file mode 100644 index 2e7a5912b..000000000 --- a/net-dns/bind/files/localhost.zone-r3 +++ /dev/null @@ -1,11 +0,0 @@ -$TTL 1W -@ IN SOA localhost. root.localhost. ( - 2008122601 ; Serial - 28800 ; Refresh - 14400 ; Retry - 604800 ; Expire - 1 week - 86400 ) ; Minimum -@ IN NS localhost. -@ IN A 127.0.0.1 - -@ IN AAAA ::1 diff --git a/net-dns/bind/files/named.cache b/net-dns/bind/files/named.cache deleted file mode 100644 index ab99f2fb0..000000000 --- a/net-dns/bind/files/named.cache +++ /dev/null @@ -1,86 +0,0 @@ -; This file holds the information on root name servers needed to -; initialize cache of Internet domain name servers -; (e.g. reference this file in the "cache . " -; configuration file of BIND domain name servers). -; -; This file is made available by InterNIC -; under anonymous FTP as -; file /domain/named.cache -; on server FTP.INTERNIC.NET -; -OR- RS.INTERNIC.NET -; -; last update: Dec 12, 2008 -; related version of root zone: 2008121200 -; -; formerly NS.INTERNIC.NET -; -. 3600000 IN NS A.ROOT-SERVERS.NET. -A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 -A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30 -; -; FORMERLY NS1.ISI.EDU -; -. 3600000 NS B.ROOT-SERVERS.NET. -B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 -; -; FORMERLY C.PSI.NET -; -. 3600000 NS C.ROOT-SERVERS.NET. -C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 -; -; FORMERLY TERP.UMD.EDU -; -. 3600000 NS D.ROOT-SERVERS.NET. -D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 -; -; FORMERLY NS.NASA.GOV -; -. 3600000 NS E.ROOT-SERVERS.NET. -E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 -; -; FORMERLY NS.ISC.ORG -; -. 3600000 NS F.ROOT-SERVERS.NET. -F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 -F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2F::F -; -; FORMERLY NS.NIC.DDN.MIL -; -. 3600000 NS G.ROOT-SERVERS.NET. -G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 -; -; FORMERLY AOS.ARL.ARMY.MIL -; -. 3600000 NS H.ROOT-SERVERS.NET. -H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 -H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235 -; -; FORMERLY NIC.NORDU.NET -; -. 3600000 NS I.ROOT-SERVERS.NET. -I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 -; -; OPERATED BY VERISIGN, INC. -; -. 3600000 NS J.ROOT-SERVERS.NET. -J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 -J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30 -; -; OPERATED BY RIPE NCC -; -. 3600000 NS K.ROOT-SERVERS.NET. -K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 -K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FD::1 -; -; OPERATED BY ICANN -; -. 3600000 NS L.ROOT-SERVERS.NET. -L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42 -L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42 -; -; OPERATED BY WIDE -; -. 3600000 NS M.ROOT-SERVERS.NET. -M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 -M.ROOT-SERVERS.NET. 3600000 AAAA 2001:DC3::35 -; End of File diff --git a/net-dns/bind/files/named.conf-r5 b/net-dns/bind/files/named.conf-r5 deleted file mode 100644 index 20dfa7999..000000000 --- a/net-dns/bind/files/named.conf-r5 +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Refer to the named.conf(5) and named(8) man pages, and the documentation - * in /usr/share/doc/bind-9 for more details. - * Online versions of the documentation can be found here: - * http://www.isc.org/software/bind/documentation - * - * If you are going to set up an authoritative server, make sure you - * understand the hairy details of how DNS works. Even with simple mistakes, - * you can break connectivity for affected parties, or cause huge amounts of - * useless Internet traffic. - */ - -acl "xfer" { - /* Deny transfers by default except for the listed hosts. - * If we have other name servers, place them here. - */ - none; -}; - -/* - * You might put in here some ips which are allowed to use the cache or - * recursive queries - */ -acl "trusted" { - 127.0.0.0/8; - ::1/128; -}; - -options { - directory "/var/bind"; - pid-file "/var/run/named/named.pid"; - - /* https://www.isc.org/solutions/dlv >=bind-9.7.x only */ - //bindkeys-file "/etc/bind/bind.keys"; - - listen-on-v6 { ::1; }; - listen-on { 127.0.0.1; }; - - allow-query { - /* - * Accept queries from our "trusted" ACL. We will - * allow anyone to query our master zones below. - * This prevents us from becoming a free DNS server - * to the masses. - */ - trusted; - }; - - allow-query-cache { - /* Use the cache for the "trusted" ACL. */ - trusted; - }; - - allow-recursion { - /* Only trusted addresses are allowed to use recursion. */ - trusted; - }; - - allow-transfer { - /* Zone tranfers are denied by default. */ - none; - }; - - allow-update { - /* Don't allow updates, e.g. via nsupdate. */ - none; - }; - - /* - * If you've got a DNS server around at your upstream provider, enter its - * IP address here, and enable the line below. This will make you benefit - * from its cache, thus reduce overall DNS traffic in the Internet. - * - * Uncomment the following lines to turn on DNS forwarding, and change - * and/or update the forwarding ip address(es): - */ -/* - forward first; - forwarders { - // 123.123.123.123; // Your ISP NS - // 124.124.124.124; // Your ISP NS - // 4.2.2.1; // Level3 Public DNS - // 4.2.2.2; // Level3 Public DNS - 8.8.8.8; // Google Open DNS - 8.8.4.4; // Google Open DNS - }; - -*/ - - //dnssec-enable yes; - //dnssec-validation yes; - - /* if you have problems and are behind a firewall: */ - //query-source address * port 53; -}; - -/* -logging { - channel default_log { - file "/var/log/named/named.log" versions 5 size 50M; - print-time yes; - print-severity yes; - print-category yes; - }; - - category default { default_log; }; - category general { default_log; }; -}; -*/ - -include "/etc/bind/rndc.key"; -controls { - inet 127.0.0.1 port 953 allow { 127.0.0.1/32; ::1/128; } keys { "rndc-key"; }; -}; - -zone "." in { - type hint; - file "/var/bind/root.cache"; -}; - -zone "localhost" IN { - type master; - file "pri/localhost.zone"; - notify no; -}; - -zone "127.in-addr.arpa" IN { - type master; - file "pri/127.zone"; - notify no; -}; - -/* - * Briefly, a zone which has been declared delegation-only will be effectively - * limited to containing NS RRs for subdomains, but no actual data beyond its - * own apex (for example, its SOA RR and apex NS RRset). This can be used to - * filter out "wildcard" or "synthesized" data from NAT boxes or from - * authoritative name servers whose undelegated (in-zone) data is of no - * interest. - * See http://www.isc.org/software/bind/delegation-only for more info - */ - -//zone "COM" { type delegation-only; }; -//zone "NET" { type delegation-only; }; - -//zone "YOUR-DOMAIN.TLD" { -// type master; -// file "/var/bind/pri/YOUR-DOMAIN.TLD.zone"; -// allow-query { any; }; -// allow-transfer { xfer; }; -//}; - -//zone "YOUR-SLAVE.TLD" { -// type slave; -// file "/var/bind/sec/YOUR-SLAVE.TLD.zone"; -// masters { ; }; - - /* Anybody is allowed to query but transfer should be controlled by the master. */ -// allow-query { any; }; -// allow-transfer { none; }; - - /* The master should be the only one who notifies the slaves, shouldn't it? */ -// allow-notify { ; }; -// notify no; -//}; diff --git a/net-dns/bind/files/named.confd-r5 b/net-dns/bind/files/named.confd-r5 deleted file mode 100644 index 631ac19db..000000000 --- a/net-dns/bind/files/named.confd-r5 +++ /dev/null @@ -1,44 +0,0 @@ -# Set various named options here. -# -#OPTIONS="" - -# Set this to the number of processors you want bind to use. -# Leave this unchanged if you want bind to automatically detect the number -#CPU="1" - -# If you wish to run bind in a chroot: -# 1) un-comment the CHROOT= assignment, below. You may use -# a different chroot directory but MAKE SURE it's empty. -# 2) run: emerge --config = -# -#CHROOT="/chroot/dns" - -# Uncomment to enable binmount of /usr/share/GeoIP -#CHROOT_GEOIP="1" - -# Uncomment the line below to avoid that the init script mounts the needed paths -# into the chroot directory. -# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1". -#CHROOT_NOMOUNT="1" - -# Default pid file location -PIDFILE="${CHROOT}/var/run/named/named.pid" - -# Scheduling priority: 19 is the lowest and -20 is the highest. -# Default: 0 -#NAMED_NICELEVEL="0" - -# Uncomment rc_named_use/rc_named_after for the database you need. -# Its necessary to ensure the database backend will be started before named. - -# MySQL -#rc_named_use="mysql" -#rc_named_after="mysql" - -# PostgreSQL -#rc_named_use="pg_autovacuum postgresql" -#rc_named_after="pg_autovacuum postgresql" - -# LDAP -#rc_named_use="ldap" -#rc_named_after="ldap" diff --git a/net-dns/bind/files/named.confd-r6 b/net-dns/bind/files/named.confd-r6 deleted file mode 100644 index 0450d5b66..000000000 --- a/net-dns/bind/files/named.confd-r6 +++ /dev/null @@ -1,48 +0,0 @@ -# Set various named options here. -# -#OPTIONS="" - -# Set this to the number of processors you want bind to use. -# Leave this unchanged if you want bind to automatically detect the number -#CPU="1" - -# If you wish to run bind in a chroot: -# 1) un-comment the CHROOT= assignment, below. You may use -# a different chroot directory but MAKE SURE it's empty. -# 2) run: emerge --config = -# -#CHROOT="/chroot/dns" - -# Uncomment to enable binmount of /usr/share/GeoIP -#CHROOT_GEOIP="1" - -# Uncomment the line below to avoid that the init script mounts the needed paths -# into the chroot directory. -# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1". -#CHROOT_NOMOUNT="1" - -# Uncomment this option if you have setup your own chroot environment and you -# don't want/need the chroot consistency check -#CHROOT_NOCHECK=1 - -# Default pid file location -PIDFILE="${CHROOT}/var/run/named/named.pid" - -# Scheduling priority: 19 is the lowest and -20 is the highest. -# Default: 0 -#NAMED_NICELEVEL="0" - -# Uncomment rc_named_use/rc_named_after for the database you need. -# Its necessary to ensure the database backend will be started before named. - -# MySQL -#rc_named_use="mysql" -#rc_named_after="mysql" - -# PostgreSQL -#rc_named_use="pg_autovacuum postgresql" -#rc_named_after="pg_autovacuum postgresql" - -# LDAP -#rc_named_use="ldap" -#rc_named_after="ldap" diff --git a/net-dns/bind/files/named.init-r10 b/net-dns/bind/files/named.init-r10 deleted file mode 100644 index 219f6930f..000000000 --- a/net-dns/bind/files/named.init-r10 +++ /dev/null @@ -1,235 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r10,v 1.4 2011/03/10 17:06:01 idl0r Exp $ - -opts="start stop reload restart checkconfig checkzones" - -depend() { - need net - use logger - provide dns -} - -NAMED_CONF=${CHROOT}/etc/bind/named.conf - -OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0} - -_mount() { - local from - local to - local opts - - if [ "${#}" -lt 3 ]; then - eerror "_mount(): to few arguments" - return 1 - fi - - from=$1 - to=$2 - shift 2 - - opts="${*}" - shift $# - - if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then - einfo "mounting ${from} to ${to}" - mount ${from} ${to} ${opts} || return 1 - fi - - return 0 -} - -_umount() { - local dir=$1 - - if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then - einfo "umount ${dir}" - umount ${dir} || return 1 - fi - - return 0 -} - -_get_pidfile() { - # as suggested in bug #107724, bug 335398#c17 - [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\ - /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} | grep 'pid-file' | cut -d\" -f2) - [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/var/run/named/named.pid -} - -check_chroot() { - if [ -n "${CHROOT}" ]; then - [ ! -d "${CHROOT}" ] && return 1 - [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1 - [ ! -d "${CHROOT}/var/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1 - [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1 - [ ! -d "${CHROOT}/var/log/named" ] && return 1 - [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1 - [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1 - [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1 - if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then - if [ -d "/usr/lib64" ]; then - [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1 - elif [ -d "/usr/lib" ]; then - [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1 - fi - fi - fi - - return 0 -} - -checkconfig() { - ebegin "Checking named configuration" - - if [ ! -f "${NAMED_CONF}" ] ; then - eerror "No ${NAMED_CONF} file exists!" - return 1 - fi - - /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} || { - eerror "named-checkconf failed! Please fix your config first." - return 1 - } - - eend 0 - return 0 -} - -checkzones() { - ebegin "Checking named configuration and zones" - /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} - eend $? -} - -start() { - local piddir - - ebegin "Starting ${CHROOT:+chrooted }named" - - if [ -n "${CHROOT}" ]; then - if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then - check_chroot || { - eend 1 - eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" - return 1 - } - fi - - if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then - if [ ! -e /usr/lib/engines/libgost.so ]; then - eend 1 - eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support" - return 1 - fi - cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || { - eend 1 - eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'" - return 1 - } - fi - cp -Lp /etc/localtime "${CHROOT}/etc/localtime" - - if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then - einfo "Mounting chroot dirs" - _mount /etc/bind ${CHROOT}/etc/bind -o bind - _mount /var/bind ${CHROOT}/var/bind -o bind - _mount /var/log/named ${CHROOT}/var/log/named -o bind - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then - _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind - fi - fi - fi - - checkconfig || { eend 1; return 1; } - - # create piddir (usually /var/run/named) if necessary, bug 334535 - _get_pidfile - piddir="${PIDFILE%/*}" - if [ ! -d "${piddir}" ]; then - checkpath -q -d -o root:named -m 0770 "${piddir}" || { - eend 1 - return 1 - } - fi - - # In case someone have $CPU set in /etc/conf.d/named - if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then - CPU="-n ${CPU}" - fi - - start-stop-daemon --start --pidfile ${PIDFILE} \ - --nicelevel ${NAMED_NICELEVEL:-0} \ - --exec /usr/sbin/named \ - -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT} - eend $? -} - -stop() { - local reported=0 - - ebegin "Stopping ${CHROOT:+chrooted }named" - - # Workaround for now, until openrc's restart has been fixed. - # openrc doesn't care about a restart() function in init scripts. - if [ "${RC_CMD}" = "restart" ]; then - if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then - check_chroot || { - eend 1 - eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" - return 1 - } - fi - - checkconfig || { eend 1; return 1; } - fi - - # -R 10, bug 335398 - _get_pidfile - start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \ - --exec /usr/sbin/named - - if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then - ebegin "Umounting chroot dirs" - - # just to be sure everything gets clean - while fuser -s ${CHROOT} 2>/dev/null; do - if [ "${reported}" -eq 0 ]; then - einfo "Waiting until all named processes are stopped" - reported=1 - fi - sleep 1 - done - - [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP - _umount ${CHROOT}/etc/bind - _umount ${CHROOT}/var/log/named - _umount ${CHROOT}/var/bind - fi - - eend $? -} - -reload() { - local ret - - ebegin "Reloading named.conf and zone files" - - checkconfig || { eend 1; return 1; } - - _get_pidfile - if [ -n "${PIDFILE}" ]; then - # FIXME: Remove --stop and --oknodo as soon as baselayout-1 has been removed... finally... - start-stop-daemon --stop --oknodo --pidfile $PIDFILE --signal HUP --exec /usr/sbin/named - ret=$? - else - ewarn "Unable to determine the pidfile... this is" - ewarn "a fallback mode. Please check your installation!" - - $RC_SERVICE restart - ret=$? - fi - - eend $ret -} diff --git a/net-dns/bind/files/named.init-r11 b/net-dns/bind/files/named.init-r11 deleted file mode 100644 index 15f744e84..000000000 --- a/net-dns/bind/files/named.init-r11 +++ /dev/null @@ -1,250 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r11,v 1.2 2011/06/16 18:56:09 idl0r Exp $ - -opts="start stop reload restart checkconfig checkzones" - -depend() { - need net - use logger - provide dns -} - -NAMED_CONF=${CHROOT}/etc/bind/named.conf - -OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0} -MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60} - -_mount() { - local from - local to - local opts - local ret=0 - - if [ "${#}" -lt 3 ]; then - eerror "_mount(): to few arguments" - return 1 - fi - - from=$1 - to=$2 - shift 2 - - opts="${*}" - shift $# - - if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then - einfo "mounting ${from} to ${to}" - mount ${from} ${to} ${opts} - ret=$? - - eend $ret - return $ret - fi - - return 0 -} - -_umount() { - local dir=$1 - local ret=0 - - if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then - ebegin "umounting ${dir}" - umount ${dir} - ret=$? - - eend $ret - return $ret - fi - - return 0 -} - -_get_pidfile() { - # as suggested in bug #107724, bug 335398#c17 - [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\ - /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2) - [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/var/run/named/named.pid -} - -check_chroot() { - if [ -n "${CHROOT}" ]; then - [ ! -d "${CHROOT}" ] && return 1 - [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1 - [ ! -d "${CHROOT}/var/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1 - [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1 - [ ! -d "${CHROOT}/var/log/named" ] && return 1 - [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1 - [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1 - [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1 - if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then - if [ -d "/usr/lib64" ]; then - [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1 - elif [ -d "/usr/lib" ]; then - [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1 - fi - fi - fi - - return 0 -} - -checkconfig() { - ebegin "Checking named configuration" - - if [ ! -f "${NAMED_CONF}" ] ; then - eerror "No ${NAMED_CONF} file exists!" - return 1 - fi - - /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} || { - eerror "named-checkconf failed! Please fix your config first." - return 1 - } - - eend 0 - return 0 -} - -checkzones() { - ebegin "Checking named configuration and zones" - /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} - eend $? -} - -start() { - local piddir - - ebegin "Starting ${CHROOT:+chrooted }named" - - if [ -n "${CHROOT}" ]; then - if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then - check_chroot || { - eend 1 - eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" - return 1 - } - fi - - if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then - if [ ! -e /usr/lib/engines/libgost.so ]; then - eend 1 - eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support" - return 1 - fi - cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || { - eend 1 - eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'" - return 1 - } - fi - cp -Lp /etc/localtime "${CHROOT}/etc/localtime" - - if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then - einfo "Mounting chroot dirs" - _mount /etc/bind ${CHROOT}/etc/bind -o bind - _mount /var/bind ${CHROOT}/var/bind -o bind - _mount /var/log/named ${CHROOT}/var/log/named -o bind - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then - _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind - fi - fi - fi - - checkconfig || { eend 1; return 1; } - - # create piddir (usually /var/run/named) if necessary, bug 334535 - _get_pidfile - piddir="${PIDFILE%/*}" - if [ ! -d "${piddir}" ]; then - checkpath -q -d -o root:named -m 0770 "${piddir}" || { - eend 1 - return 1 - } - fi - - # In case someone have $CPU set in /etc/conf.d/named - if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then - CPU="-n ${CPU}" - fi - - start-stop-daemon --start --pidfile ${PIDFILE} \ - --nicelevel ${NAMED_NICELEVEL:-0} \ - --exec /usr/sbin/named \ - -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT} - eend $? -} - -stop() { - local reported=0 - - ebegin "Stopping ${CHROOT:+chrooted }named" - - # Workaround for now, until openrc's restart has been fixed. - # openrc doesn't care about a restart() function in init scripts. - if [ "${RC_CMD}" = "restart" ]; then - if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then - check_chroot || { - eend 1 - eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" - return 1 - } - fi - - checkconfig || { eend 1; return 1; } - fi - - # -R 10, bug 335398 - _get_pidfile - start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \ - --exec /usr/sbin/named - - if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then - ebegin "Umounting chroot dirs" - - # just to be sure everything gets clean - while fuser -s ${CHROOT} 2>/dev/null; do - if [ "${reported}" -eq 0 ]; then - einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)" - elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then - eerror "Waiting until all named processes are stopped failed!" - eend 1 - break - fi - sleep 1 - reported=$((reported+1)) - done - - [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP - _umount ${CHROOT}/etc/bind - _umount ${CHROOT}/var/log/named - _umount ${CHROOT}/var/bind - fi - - eend $? -} - -reload() { - local ret - - ebegin "Reloading named.conf and zone files" - - checkconfig || { eend 1; return 1; } - - _get_pidfile - if [ -n "${PIDFILE}" ]; then - # FIXME: Remove --stop and --oknodo as soon as baselayout-1 has been removed... finally... - start-stop-daemon --stop --oknodo --pidfile $PIDFILE --signal HUP --exec /usr/sbin/named - ret=$? - else - ewarn "Unable to determine the pidfile... this is" - ewarn "a fallback mode. Please check your installation!" - - $RC_SERVICE restart - ret=$? - fi - - eend $ret -} diff --git a/net-dns/bind/files/named.init-r9 b/net-dns/bind/files/named.init-r9 deleted file mode 100644 index a962984f3..000000000 --- a/net-dns/bind/files/named.init-r9 +++ /dev/null @@ -1,203 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r9,v 1.2 2010/12/15 23:35:09 idl0r Exp $ - -opts="start stop reload restart checkconfig checkzones" - -depend() { - need net - use logger - provide dns -} - -NAMED_CONF=${CHROOT}/etc/bind/named.conf - -_mount() { - local from - local to - local opts - - if [ "${#}" -lt 3 ]; then - eerror "_mount(): to few arguments" - return 1 - fi - - from=$1 - to=$2 - shift 2 - - opts="${*}" - shift $# - - if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then - einfo "mounting ${from} to ${to}" - mount ${from} ${to} ${opts} || return 1 - fi - - return 0 -} - -_umount() { - local dir=$1 - - if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then - einfo "umount ${dir}" - umount ${dir} || return 1 - fi - - return 0 -} - -_get_pidfile() { - # as suggested in bug #107724, bug 335398#c17 - [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\ - /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} | grep 'pid-file' | cut -d\" -f2) - [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/var/run/named/named.pid -} - -check_chroot() { - if [ -n "${CHROOT}" ]; then - [ ! -d "${CHROOT}" ] && return 1 - [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1 - [ ! -d "${CHROOT}/var/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1 - [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1 - [ ! -d "${CHROOT}/var/log/named" ] && return 1 - [ ! -e "${CHROOT}/etc/localtime" ] && return 1 - [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1 - [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1 - [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1 - fi - - return 0 -} - -checkconfig() { - ebegin "Checking named configuration" - - if [ ! -f "${NAMED_CONF}" ] ; then - eerror "No ${NAMED_CONF} file exists!" - return 1 - fi - - /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} || { - eerror "named-checkconf failed! Please fix your config first." - return 1 - } - - eend 0 - return 0 -} - -checkzones() { - ebegin "Checking named configuration and zones" - /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF/${CHROOT}} - eend $? -} - -start() { - local piddir - - ebegin "Starting ${CHROOT:+chrooted }named" - - if [ -n "${CHROOT}" ]; then - check_chroot || { - eend 1 - eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" - return 1 - } - - if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then - einfo "Mounting chroot dirs" - _mount /etc/bind ${CHROOT}/etc/bind -o bind - _mount /var/bind ${CHROOT}/var/bind -o bind - _mount /var/log/named ${CHROOT}/var/log/named -o bind - if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then - _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind - fi - fi - fi - - checkconfig || { eend 1; return 1; } - - # create piddir (usually /var/run/named) if necessary, bug 334535 - _get_pidfile - piddir="${PIDFILE%/*}" - if [ ! -d "${piddir}" ]; then - checkpath -q -d -o root:named -m 0770 "${piddir}" || { - eend 1 - return 1 - } - fi - - # In case someone have $CPU set in /etc/conf.d/named - if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then - CPU="-n ${CPU}" - fi - - start-stop-daemon --start --pidfile ${PIDFILE} \ - --nicelevel ${NAMED_NICELEVEL:-0} \ - --exec /usr/sbin/named \ - -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT} - eend $? -} - -stop() { - local reported=0 - - ebegin "Stopping ${CHROOT:+chrooted }named" - - # Workaround for now, until openrc's restart has been fixed. - # openrc doesn't care about a restart() function in init scripts. - if [ "${RC_CMD}" = "restart" ]; then - checkconfig || { eend 1; return 1; } - fi - - # -R 10, bug 335398 - _get_pidfile - start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \ - --exec /usr/sbin/named - - if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then - ebegin "Umounting chroot dirs" - - # just to be sure everything gets clean - while fuser -s ${CHROOT} 2>/dev/null; do - if [ "${reported}" -eq 0 ]; then - einfo "Waiting until all named processes are stopped" - reported=1 - fi - sleep 1 - done - - [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP - _umount ${CHROOT}/etc/bind - _umount ${CHROOT}/var/log/named - _umount ${CHROOT}/var/bind - fi - - eend $? -} - -reload() { - local ret - - ebegin "Reloading named.conf and zone files" - - checkconfig || { eend 1; return 1; } - - _get_pidfile - if [ -n "${PIDFILE}" ]; then - # FIXME: Remove --stop and --oknodo as soon as baselayout-1 has been removed... finally... - start-stop-daemon --stop --oknodo --pidfile $PIDFILE --signal HUP --exec /usr/sbin/named - ret=$? - else - ewarn "Unable to determine the pidfile... this is" - ewarn "a fallback mode. Please check your installation!" - - $RC_SERVICE restart - ret=$? - fi - - eend $ret -} diff --git a/net-fs/etercifs/Manifest b/net-fs/etercifs/Manifest deleted file mode 100644 index b196153f6..000000000 --- a/net-fs/etercifs/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST etercifs-4.3.8-eter5.tar.bz2 2350989 RMD160 80398745c7d09551c780a5dc07a6170b53277307 SHA1 ec90bf798b5c493d142bf6f7402ef3ac5563490a SHA256 e69a477ea84674bf800858520673000bd6a7fa5cab11327f2375af658c9b4079 -EBUILD etercifs-4.3.8_p5.ebuild 2314 RMD160 b746e93dd73a649f063dd342b7f3f129fa9fa48e SHA1 c9d31867e327c0e6953d4d64abe1d98532e027f1 SHA256 5ef38b695e9d783037d781a5fa781a3a14b70967810f947fc7cc6b9dba5ce056 diff --git a/net-fs/etercifs/etercifs-4.3.8_p5.ebuild b/net-fs/etercifs/etercifs-4.3.8_p5.ebuild deleted file mode 100644 index 09f4cba54..000000000 --- a/net-fs/etercifs/etercifs-4.3.8_p5.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit linux-mod eutils linux-info - -CIFSVER=${PV%_p*} -ETER_REV=${PV#*_p} - -DESCRIPTION="Advanced Common Internet File System for Linux with Etersoft extension" -HOMEPAGE="http://etersoft.ru/wine" -SRC_URI="ftp://anonymous@updates.etersoft.ru/pub/Etersoft/CIFS%40Etersoft/${CIFSVER}/sources/etercifs-${CIFSVER}-eter${ETER_REV}.tar.bz2 -ftp://ftp.cregion.ru/etersoft/cifs@etersoft/sources/etercifs-${CIFSVER}-eter${ETER_REV}.tar.bz2" -LICENSE="GPL-2" -KEYWORDS="-* x86 amd64" -IUSE="kernel_linux" - -DEPEND="kernel_linux? ( virtual/linux-sources )" - -pkg_setup() { - kernel_is lt 2 6 23 && die "Current kernel 2.6.x is not supported by this ebuild." - kernel_is gt 2 6 30 && die "Current kernel 2.6.x is not supported by this ebuild." - if use kernel_linux ; then - MODULE_NAMES="etercifs(etercifs:${WORKDIR}/cifs)" - CONFIG_CHECK="CIFS" - - linux-mod_pkg_setup - kernel_is 2 4 && die "kernel 2.4 is not supported by this ebuild. Get an older version from viewcvs" - - BUILD_PARAMS="-C ${KERNEL_DIR} M=${WORKDIR}/cifs" - BUILD_TARGETS="modules" - fi -} - -src_unpack() { - unpack ${A} - cd ${WORKDIR} - mkdir cifs - kern_arch_prefix='kernel-source-etercifs-2.6' - kernel_is 2 6 23 && kern_suffix='23-1.50' - kernel_is 2 6 24 && kern_suffix='24-1.52' - kernel_is 2 6 25 && kern_suffix='25-1.52' - kernel_is 2 6 26 && kern_suffix='26-1.53' - kernel_is 2 6 27 && kern_suffix='27-1.54' - kernel_is 2 6 28 && kern_suffix='28-1.55' - kernel_is 2 6 29 && kern_suffix='29-1.57' - kernel_is 2 6 30 && kern_suffix='30-1.58' - mv "${kern_arch_prefix}.${kern_suffix}"/* cifs/ - S="${WORKDIR}/cifs" - cd "${WORKDIR}/cifs" - sed -i 's/#define CIFS_VERSION.*"1.*"/#define CIFS_VERSION "4.3.8"/' cifsfs.h -} - -src_compile() { - if use kernel_linux ; then - cd "${WORKDIR}/cifs" - linux-mod_src_compile - fi -} - -src_install() { - - if use kernel_linux ; then - linux-mod_src_install - fi - -} - -pkg_preinst() { - KERN_MOD="/lib/modules/$(uname -r)" - find "${KERN_MOD}" -name cifs.ko | gawk '{print $1,$1".orig"}' | xargs mv -} - -pkg_postinst() { - use kernel_linux && linux-mod_pkg_postinst - - elog "" - elog "Don't forget to add module etercifs to /etc/modules.autoload.d/kernel-2.6" - elog "and switch off the Linux Extensions for cifs by adding:" - elog "" -} diff --git a/net-misc/faxsend/Manifest b/net-misc/faxsend/Manifest deleted file mode 100644 index 1726b1e55..000000000 --- a/net-misc/faxsend/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST faxsend-0.1.tar.bz2 21117 RMD160 73d49a094860235b5bdef925368cc7b85f1c2613 SHA1 b17084e01d34150f90f0009e3a7567440fdc1615 SHA256 7378f17643d1cd7554de54813a203d01334e11a3b1d8fdededdd607f10553e91 -EBUILD faxsend-0.1-r1.ebuild 707 RMD160 87d147c7dce313c1780bc132eaa13ee6fbdb065d SHA1 aa834b31f3b5daa9e0407a04487e9ee334913e0c SHA256 ac1b525e4bec43d4c1784c644f1ee39f80dce01b8dc7372b0123ae1ffaad41af diff --git a/net-misc/faxsend/faxsend-0.1-r1.ebuild b/net-misc/faxsend/faxsend-0.1-r1.ebuild deleted file mode 100644 index 2094412ac..000000000 --- a/net-misc/faxsend/faxsend-0.1-r1.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -DESCRIPTION="Sending fax or voice files using modem ZyXELOmni 56K" -HOMEPAGE="http://www.calculate-linux.org/faxsend" -SRC_URI="ftp://ftp.calculate-linux.org/pub/calculate/${PN}/${P}.tar.bz2 - http://mirror.yandex.ru/calculate/${PN}/${P}.tar.bz2 - ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${P}.tar.bz2" -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -DEPEND=">=net-dialup/mgetty-1.1 - >=sci-libs/fftw-3.1 - >=dev-python/pyserial-2.2 - >=media-gfx/imagemagick-6.3" -RDEPEND="${DEPEND}" - -src_compile() { - emake || die -} - -src_install() { - emake install DESTDIR="${D}" -} diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest deleted file mode 100644 index e8eb5816e..000000000 --- a/net-misc/networkmanager/Manifest +++ /dev/null @@ -1,14 +0,0 @@ -AUX 01-org.freedesktop.NetworkManager.settings.modify.system.pkla 187 SHA256 909356b25e2d887a31c0f9f2a23a466957f27b163bbd5172fa852988a1db1860 SHA512 b0f24294cf9a0c09ffa323c4d79a6758b128ae60d35eebc7db3a6de35a2117a5aeb58ede132be8170876ab069a2afc81cca3c75ee0e9f6e3a37fe5c9e45bbce4 WHIRLPOOL 54cb4687452bbba2ba78ed7fc237ef72f7b8e07fb30d239a1b7d5845c73eada0442ec1f18a9e3730169f30a621f0f45b4f715fa29d2e31084eefa8877925531d -AUX 01-org.freedesktop.NetworkManager.settings.modify.system.rules 265 SHA256 702e1e702ec633608fd75dfd44f66437896421c9d2d7fe9966df8e4ef1d93a6c SHA512 22dfa5b071891ba16b9a8b90a1964d56e370cb640d78191934ae802e568f92c299b9d4d965f7081fb36a8c09378bfb0b33193b2332cbdc28c6799b152128c214 WHIRLPOOL b89a4069cc973cf55001a5f0028c75a90ce4ea070c4424b5a22f3e9b8e61ee34ff7b06891eb1c6f8fa24735b3e5d98e61f0bfefca7dd12eeb615b83e72225c8b -AUX 10-openrc-status-r3 1103 SHA256 3ee158de440df6e6a8ddcc7c0622cb94039cffe6b0cc0b88d35a53333d32f73d SHA512 b848327b0975a59420a4e7132c45a15267a7d98b0f430f52d95991e7946eca787faf5b9a5adb3f1b294f5cc761f14d693d9d4e604ff091160da9610b76cb72e8 WHIRLPOOL 7745a0469e1bec653736c14e4e6f5f9593ef9a752d4973ad538350a1f934bcdf1e2cd4c276ce3f57515e9d8c34168014e138ab9627e57cd3cef79b852ebacc40 -AUX conf.d.NetworkManager 230 SHA256 4594573f01fe5e04b6dde4525796acf909158591bdcefd662ec23fe0d1c3e1bd SHA512 f8c9331834cbc66ab0e4e6f4a120fde6a08a435d680a1e1087718fdbb2b9843a313e7ec30b7008822999dafd98e152aa7d2a96f87320ba9c91c3adb63e0b7c9a WHIRLPOOL 7dbb15bf184e918369187605af91816ed11c460147066ede11f200d73103bb6f7f63ccc7abe7996d485294f44282d6bbd9520cc9e50f04ce41262c9817f7b994 -AUX init.d.NetworkManager 1895 SHA256 5f368362ef5c6deed538f20dc582d6da3c86871bd42297fa78536c0312021843 SHA512 c9a874976fa422778cc37e522d08da953c738fa971e8ae58f76952db374ad4fb8a5c65d1d0ddd2f2ad9ceae05996c21d24c98df214ebf5b9d338257f95c9cd5c WHIRLPOOL 036ef59d76e5a7e28de30345774a7bc446c6acf0e9d2499127d7f395b40f28b2078d02e91c24f7b421f5c90f907c3e799a40efb724ad2d02c546bbac1a446b30 -AUX networkmanager-0.9.2.0-init-provide-net-r1.patch 2282 SHA256 fd46086be527bdd79978142eb8b46653ecc919f2dcab0a02dea2d0fd28232f92 SHA512 d639f1bc6442a92ad9d759d09abc963131ca13ddae13129c0ef21affb3888426a8301aad6fe4b71eddfca2a9f21213d515ba90662abff981701090581ed6bb9e WHIRLPOOL fee0fa3b2b148e210d9bb547a327d42866a70fb817b0a8e5375ece10c09bbe1a67b048ca25cadba0296eeb4e8359245369e9b0c213fd0343a6e75792755bc0d3 -AUX networkmanager-0.9.2.0-pre-sleep.patch 9163 SHA256 e391907c8699b22b6c48ff27bf4d7a116600e643d788bd579339adc180e1ed97 SHA512 ca71814dec88e294776d8b9155063eeb10128b1236e19f159fe6f4071109716d2dce4422b8efa733ddbef222b44d02f909e75861623118d744966c45f097cea7 WHIRLPOOL f676bc5951ed07c07bb713894b576710b9e56495d2d80ef5e41b0845c0bccbc74a9bc76ae07981cbd5bec0de89f25129809798734da529f72b65881db08e6719 -AUX networkmanager-0.9.4.0-dhclient-ipv6.patch 1230 SHA256 5db0d4654c9844cc329f30ef3d6370eddc00148a60e6dd0935cd91206239f52c SHA512 9fbbdf6d7af6dc6d59b4f6c4e6ebd90de85feac1e62c2f4f019ba25036fe1c5ae8437b2404ffafb7f8fe614db78d7c583df269dc5caafc15658c2842663dbdc9 WHIRLPOOL c345f75533e3a1c85263f0e5e89ce70eef2c63756c265573addc70bae59130e397d07c6df24e50ad27e2d077f596660d65246c0ca394a7bc0f685b74e72c0527 -AUX networkmanager-0.9.4.0-force-libnl1.1-r1.patch 3422 SHA256 191511187731eab1d796104647b2fb93f35d9f315cb70d72f7927d1103a979d5 SHA512 b23ae707db485b52692dba3e8e3060650af78ff2a8fb0ac00b018cb5ebef25643362088236590bb893b56b56d5ed15a3f6bc30a094dfed49f7c04fffe769c2d1 WHIRLPOOL 91c9b37fa32a308a053ec14c5dc3228ba2880358adb5d8c36fbc1c576c23dd3909539ed20c20e55c719397a9a441a6f4b7b6493e54e6dff717f6fb6fa2762bf6 -AUX networkmanager-0.9.6.0-daemon-signals.patch 1045 SHA256 eb9e01f5622aabf611f881e3bf7989cdaa9df25dc19b0087747f04c423efe503 SHA512 2f6e7fcb76eb3944ae5df0fcc7b894ed45a8e852b0cba425fc6001de8a5532a1691ed847bb6c0b54988b9f2df5e9fa1720e4c6306e295477d7c8d246d00bf29a WHIRLPOOL 3243def958145d734954b8baaf4fefce4b9becf7e274f297010be9fb80998ae43df987061a7e0d00348df68bb84e92e1f90b5419567b88ed5a72e0db200a9598 -AUX nm-system-settings.conf-ifnet 70 SHA256 34f53d9ac1ad65eda6942dc3059117f60f6321059ca23f4fbfcc2f2edcae151f SHA512 74304a367c0675cfc88a6ae17b291a9bc20f24a9dab72e9a4578e697870c4d96245aa45ce62ec86f1e5e7e3069ab8fccec33936e479ca630a836805addb5574d WHIRLPOOL 24e140440014c07c355cecab0564d6a57fc2e37e3ded242f3b9dd3e6ddd05dd924a7497400d2984eed407e99ba9661028a159dd4e393917cee7665b0ff4737eb -DIST NetworkManager-0.9.6.4.tar.xz 1968564 SHA256 511b411e055d187bc8f26c519fdb3e55e07fc40d4adecbbec623c0249380a7eb SHA512 900eb30f7fed35d43f2c1003fcf7fc0b6ab9c5a9f0a14777d4636372376af8477e63fc7fc9b05d2f281d48de658d96d9b30f44851af8ae2b4271bb2b5c2cb669 WHIRLPOOL b87903e4cbb3efcec17b25e74dd67dc6a81a6d553df57e9c699bb1f0d40fe6d611953f6baaeca48ef4387316980d775ec2b07a9df06ecb5f03c10dffc2b60584 -EBUILD networkmanager-0.9.6.4-r2.ebuild 7509 SHA256 8ea74600475c6d71f692b16a3ede6e55aacb7e1bca5c2e58d203a65f3a123a4f SHA512 35e0d501af4a4d86b0677c08bba6b42c536cfdd7d68d1ca96a1c27a7fbf0b3b2b12d84c373057e1c59f6b323df933798a332b19bea0de313cec0c9eaddc0517d WHIRLPOOL c068ba41bd120a0a85b7623db61795aea8b6bf2a796d8773c8cf47c6c152b7b2848af51d1a623d13179225c19d73b9d55eb308d9f1170374317f19bf3c926ec5 -MISC metadata.xml 1492 SHA256 194d2784544c8dadf2a06ffa007cdf4c75d4727d2edd358431611abbbd11760e SHA512 50b0a3e918986da99da155f0fddcd52372d341aaca342dd70690cb241292d1009641e003e30e5015f97ee62ebc5b893d5fe3ad35a0eee75c1923e9326dc1818c WHIRLPOOL 2d679bd1e29c04c48712587b6f7287001d9c2951416bcc00657dd8ab7b5deb41d78db77fb2585679f9bb4e85ea37416a7a8439edcd7179047f7d1e7787669fbe diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla deleted file mode 100644 index d4433274c..000000000 --- a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla +++ /dev/null @@ -1,6 +0,0 @@ -[Let users in plugdev group modify NetworkManager] -Identity=unix-group:plugdev -Action=org.freedesktop.NetworkManager.settings.modify.system -ResultAny=no -ResultInactive=no -ResultActive=yes \ No newline at end of file diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules deleted file mode 100644 index d00b26853..000000000 --- a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules +++ /dev/null @@ -1,7 +0,0 @@ -// Let users in plugdev group modify NetworkManager -polkit.addRule(function(action, subject) { - if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" && - subject.isInGroup("plugdev") && subject.active) { - return "yes"; - } -}); diff --git a/net-misc/networkmanager/files/10-openrc-status-r3 b/net-misc/networkmanager/files/10-openrc-status-r3 deleted file mode 100644 index 0b4b89fb1..000000000 --- a/net-misc/networkmanager/files/10-openrc-status-r3 +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Copyright (c) 2012 Alexandre Rostovtsev -# Released under the 2-clause BSD license. - -# Ensures that the NetworkManager OpenRC service is marked as started and -# providing net only when it has a successful connection. - -# Ensure rc-service is in PATH -PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin" - -# Exit if the NetworkManager OpenRC service is not running -rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0 - -# Call rc-service in background mode so that the start/stop functions update -# NetworkManager service status to started or inactive instead of actually -# starting or stopping the daemon -export IN_BACKGROUND=YES - -case "$2" in - up) nm-online -t 0 -x && - ! rc-service NetworkManager status 2>&1 | grep -q started && - exec rc-service NetworkManager start ;; - down) nm-online -t 0 -x || - rc-service NetworkManager status 2>&1 | grep -q stopped || - exec rc-service NetworkManager stop ;; - pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped || - exec rc-service NetworkManager stop ;; -esac -exit 0 -# vim: set ts=4: diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager deleted file mode 100644 index 4a9922965..000000000 --- a/net-misc/networkmanager/files/conf.d.NetworkManager +++ /dev/null @@ -1,4 +0,0 @@ -# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT -# seconds after starting, the service will be marked as inactive, and it will -# continue to wait for a connection in background mode. -INACTIVE_TIMEOUT=1 diff --git a/net-misc/networkmanager/files/init.d.NetworkManager b/net-misc/networkmanager/files/init.d.NetworkManager deleted file mode 100755 index 8465449d8..000000000 --- a/net-misc/networkmanager/files/init.d.NetworkManager +++ /dev/null @@ -1,57 +0,0 @@ -#!/sbin/runscript -# Copyright (c) 2008 Saleem Abdulrasool -# Distributed under the terms of the GNU General Purpose License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/init.d.NetworkManager,v 1.1 2013/01/28 07:05:05 tetromino Exp $ - -description="NetworkManager daemon. The service is marked as started only \ -when a network connection is established." - -depend() { - need dbus - provide net -} - -start() { - # If we are re-called by a dispatcher event, we want to mark the service - # as started without starting the daemon again - yesno "${IN_BACKGROUND}" && return 0 - - [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1" - - ebegin "Starting NetworkManager" - start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \ - --exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid - local _retval=$? - eend "${_retval}" - if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then - einfo "Marking NetworkManager as inactive. It will automatically be marked" - einfo "as started after a network connection has been established." - mark_service_inactive - fi - return "${_retval}" -} - -stop() { - # If we are re-called by a dispatcher event, we want to mark the service - # as inactive without stopping the daemon - if yesno "${IN_BACKGROUND}"; then - mark_service_inactive "${SVCNAME}" - return 0 - fi - - ebegin "Stopping NetworkManager" - local pidfile=/run/NetworkManager/NetworkManager.pid - if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then - # Try stopping the pid file used by <0.9.7 - pidfile=/var/run/NetworkManager.pid - start-stop-daemon --stop --quiet --pidfile "${pidfile}" - ret=$? - [ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}" - eend ${ret} - else - start-stop-daemon --stop --quiet --pidfile "${pidfile}" - eend $? - fi -} - -# vim: set ft=gentoo-init-d ts=4 : diff --git a/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch b/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch deleted file mode 100644 index 0f8befb34..000000000 --- a/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 705b9978ed914aba87e5a5191a1d0acacaf70a81 Mon Sep 17 00:00:00 2001 -From: Alexandre Rostovtsev -Date: Wed, 1 Feb 2012 05:51:20 -0500 -Subject: [PATCH] gentoo: provide net and use inactive status when not - connected - -The status will be reset to started via a dispatcher script on up/down -events. See https://bugs.gentoo.org/show_bug.cgi?id=252137 ---- - initscript/Gentoo/NetworkManager.in | 26 +++++++++++++++++++++++++- - 1 files changed, 25 insertions(+), 1 deletions(-) - -diff --git a/initscript/Gentoo/NetworkManager.in b/initscript/Gentoo/NetworkManager.in -index 7db410b..1960795 100755 ---- a/initscript/Gentoo/NetworkManager.in -+++ b/initscript/Gentoo/NetworkManager.in -@@ -3,18 +3,42 @@ - # Distributed under the terms of the GNU General Purpose License v2 - # $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch,v 1.2 2012/02/21 23:19:19 tetromino Exp $ - -+description="NetworkManager daemon. The service is marked as started only \ -+when a network connection is established." -+ - depend() { - need dbus -+ provide net - } - - start() { -+ # If we are re-called by a dispatcher event, we want to mark the service -+ # as started without starting the daemon again -+ yesno "${IN_BACKGROUND}" && return 0 -+ -+ [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1" -+ - ebegin "Starting NetworkManager" - start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \ - --exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid -- eend $? -+ local _retval=$? -+ eend "${_retval}" -+ if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then -+ einfo "Marking NetworkManager as inactive. It will automatically be marked" -+ einfo "as started after a network connection has been established." -+ mark_service_inactive -+ fi -+ return "${_retval}" - } - - stop() { -+ # If we are re-called by a dispatcher event, we want to mark the service -+ # as inactive without stopping the daemon -+ if yesno "${IN_BACKGROUND}"; then -+ mark_service_inactive "${SVCNAME}" -+ return 0 -+ fi -+ - ebegin "Stopping NetworkManager" - start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid - eend $? --- -1.7.8.4 - diff --git a/net-misc/networkmanager/files/networkmanager-0.9.2.0-pre-sleep.patch b/net-misc/networkmanager/files/networkmanager-0.9.2.0-pre-sleep.patch deleted file mode 100644 index 128032795..000000000 --- a/net-misc/networkmanager/files/networkmanager-0.9.2.0-pre-sleep.patch +++ /dev/null @@ -1,232 +0,0 @@ -From 00b5c3785f7f5ce8da6db5da3fab814680ff82bc Mon Sep 17 00:00:00 2001 -From: Alexandre Rostovtsev -Date: Mon, 20 Feb 2012 02:14:26 -0500 -Subject: [PATCH] Implement "pre-sleep" action dispatch - -Based on work by Christian Becke in -https://bugzilla.gnome.org/show_bug.cgi?id=387832 - -Adds a nm_utils_call_dispatcher_with_notify variant of the dispatcher -call, and uses it to dispatch a "pre-sleep" action before sleeping. ---- - callouts/nm-dispatcher-utils.c | 3 +- - src/NetworkManagerUtils.c | 70 ++++++++++++++++++++++++++++++++++------ - src/NetworkManagerUtils.h | 12 +++++++ - src/nm-manager.c | 28 ++++++++++++---- - 4 files changed, 95 insertions(+), 18 deletions(-) - -diff --git a/callouts/nm-dispatcher-utils.c b/callouts/nm-dispatcher-utils.c -index 887e80d..db66b61 100644 ---- a/callouts/nm-dispatcher-utils.c -+++ b/callouts/nm-dispatcher-utils.c -@@ -407,7 +407,8 @@ nm_dispatcher_utils_construct_envp (const char *action, - g_return_val_if_fail (*out_iface == NULL, NULL); - - /* Hostname changes don't require a device nor contain a connection */ -- if (!strcmp (action, "hostname")) -+ if (!strcmp (action, "hostname") || -+ !strcmp (action, "pre-sleep")) - return g_new0 (char *, 1); - - /* Canonicalize the VPN interface name; "" is used when passing it through -diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c -index 451de6d..008b94e 100644 ---- a/src/NetworkManagerUtils.c -+++ b/src/NetworkManagerUtils.c -@@ -44,6 +44,13 @@ - #include "nm-setting-wireless-security.h" - #include "nm-manager-auth.h" - -+typedef struct -+{ -+ NMDBusManager *dbus_mgr; -+ NMUtilsDispatcherDoneCallback notify; -+ gpointer user_data; -+} NMUtilsCallDispatcherNotifyData; -+ - /* - * nm_ethernet_address_is_valid - * -@@ -475,18 +482,36 @@ fill_vpn_props (NMIP4Config *ip4_config, - static void - dispatcher_done_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) - { -+ NMUtilsCallDispatcherNotifyData *notify_data = (NMUtilsCallDispatcherNotifyData *) user_data; -+ - dbus_g_proxy_end_call (proxy, call, NULL, G_TYPE_INVALID); - g_object_unref (proxy); -+ if (notify_data->notify != NULL) -+ notify_data->notify (notify_data->user_data); -+} -+ -+static void -+nm_utils_call_dispatcher_notify_data_free (NMUtilsCallDispatcherNotifyData *data) -+{ -+ if (data == NULL) -+ return; -+ -+ if (data->dbus_mgr != NULL) -+ g_object_unref (data->dbus_mgr); -+ g_free (data); - } - - void --nm_utils_call_dispatcher (const char *action, -- NMConnection *connection, -- NMDevice *device, -- const char *vpn_iface, -- NMIP4Config *vpn_ip4_config, -- NMIP6Config *vpn_ip6_config) -+nm_utils_call_dispatcher_with_notify (const char *action, -+ NMConnection *connection, -+ NMDevice *device, -+ const char *vpn_iface, -+ NMIP4Config *vpn_ip4_config, -+ NMIP6Config *vpn_ip6_config, -+ NMUtilsDispatcherDoneCallback notify, -+ gpointer user_data) - { -+ NMUtilsCallDispatcherNotifyData *notify_data; - NMDBusManager *dbus_mgr; - DBusGProxy *proxy; - DBusGConnection *g_connection; -@@ -503,7 +528,8 @@ nm_utils_call_dispatcher (const char *action, - g_return_if_fail (action != NULL); - - /* All actions except 'hostname' require a device */ -- if (strcmp (action, "hostname") != 0) -+ if (strcmp (action, "hostname") != 0 && -+ strcmp (action, "pre-sleep") != 0) - g_return_if_fail (NM_IS_DEVICE (device)); - /* VPN actions require at least an IPv4 config (for now) */ - if (strcmp (action, "vpn-up") == 0) -@@ -544,7 +570,8 @@ nm_utils_call_dispatcher (const char *action, - vpn_ip6_props = value_hash_create (); - - /* hostname actions only send the hostname */ -- if (strcmp (action, "hostname") != 0) { -+ if (strcmp (action, "hostname") != 0 && -+ strcmp (action, "pre-sleep") != 0) { - fill_device_props (device, - device_props, - device_ip4_props, -@@ -555,6 +582,11 @@ nm_utils_call_dispatcher (const char *action, - fill_vpn_props (vpn_ip4_config, NULL, vpn_ip4_props, vpn_ip6_props); - } - -+ notify_data = g_new0 (NMUtilsCallDispatcherNotifyData, 1); -+ notify_data->dbus_mgr = dbus_mgr; -+ notify_data->notify = notify; -+ notify_data->user_data = user_data; -+ - /* Do a non-blocking call, but wait for the reply, because dbus-glib - * sometimes needs time to complete internal housekeeping. If we use - * dbus_g_proxy_call_no_reply(), that housekeeping (specifically the -@@ -563,8 +595,8 @@ nm_utils_call_dispatcher (const char *action, - */ - dbus_g_proxy_begin_call_with_timeout (proxy, "Action", - dispatcher_done_cb, -- dbus_mgr, /* automatically unref the dbus mgr when call is done */ -- g_object_unref, -+ notify_data, /* automatically unref the dbus mgr when call is done */ -+ (GDestroyNotify) nm_utils_call_dispatcher_notify_data_free, - 5000, - G_TYPE_STRING, action, - DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, connection_hash, -@@ -589,6 +621,24 @@ nm_utils_call_dispatcher (const char *action, - g_hash_table_destroy (vpn_ip6_props); - } - -+void -+nm_utils_call_dispatcher (const char *action, -+ NMConnection *connection, -+ NMDevice *device, -+ const char *vpn_iface, -+ NMIP4Config *vpn_ip4_config, -+ NMIP6Config *vpn_ip6_config) -+{ -+ nm_utils_call_dispatcher_with_notify (action, -+ connection, -+ device, -+ vpn_iface, -+ vpn_ip4_config, -+ vpn_ip6_config, -+ NULL, -+ NULL); -+} -+ - gboolean - nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr) - { -diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h -index 1bf741e..bdc0fef 100644 ---- a/src/NetworkManagerUtils.h -+++ b/src/NetworkManagerUtils.h -@@ -49,6 +49,18 @@ void nm_utils_call_dispatcher (const char *action, - NMIP4Config *vpn_ip4_config, - NMIP6Config *vpn_ip6_config); - -+typedef void (*NMUtilsDispatcherDoneCallback) (gpointer user_data); -+ -+void -+nm_utils_call_dispatcher_with_notify (const char *action, -+ NMConnection *connection, -+ NMDevice *device, -+ const char *vpn_iface, -+ NMIP4Config *vpn_ip4_config, -+ NMIP6Config *vpn_ip6_config, -+ NMUtilsDispatcherDoneCallback notify, -+ gpointer user_data); -+ - gboolean nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr); - gboolean nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels); - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 7205c7a..9e70071 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -2433,6 +2433,23 @@ impl_manager_deactivate_connection (NMManager *self, - } - - static void -+pre_sleep_dispatcher_done (gpointer user_data) -+{ -+ NMManager *self = (NMManager *) user_data; -+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); -+ GSList *iter; -+ -+ /* Just deactivate and down all devices from the device list, -+ * to keep things fast the device list will get resynced when -+ * the manager wakes up. -+ */ -+ for (iter = priv->devices; iter; iter = iter->next) -+ nm_device_set_managed (NM_DEVICE (iter->data), FALSE, NM_DEVICE_STATE_REASON_SLEEPING); -+ -+ nm_manager_update_state (self); -+} -+ -+static void - do_sleep_wake (NMManager *self) - { - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); -@@ -2442,13 +2459,10 @@ do_sleep_wake (NMManager *self) - if (manager_sleeping (self)) { - nm_log_info (LOGD_SUSPEND, "sleeping or disabling..."); - -- /* Just deactivate and down all devices from the device list, -- * to keep things fast the device list will get resynced when -- * the manager wakes up. -- */ -- for (iter = priv->devices; iter; iter = iter->next) -- nm_device_set_managed (NM_DEVICE (iter->data), FALSE, NM_DEVICE_STATE_REASON_SLEEPING); -- -+ nm_utils_call_dispatcher_with_notify ("pre-sleep", -+ NULL, NULL, NULL, NULL, NULL, -+ pre_sleep_dispatcher_done, self); -+ return; - } else { - nm_log_info (LOGD_SUSPEND, "waking up and re-enabling..."); - --- -1.7.8.4 - diff --git a/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch b/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch deleted file mode 100644 index 9700f1a11..000000000 --- a/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch +++ /dev/null @@ -1,34 +0,0 @@ -From cc9f8102859cccd95ba7a13c00bc3cc4fb53aa0a Mon Sep 17 00:00:00 2001 -From: Rick Harris -Date: Sun, 15 Apr 2012 09:44:55 +0000 -Subject: [PATCH] dhcp: do not require dhclient-4 to be built with DHCPv6 - -The "-4" flag is the default if dhclient-4 was built with DHCPv6 support -enabled, and it's invalid if dhclient-4 was built without DHCPv6. -Therefore, we simply should not use it. - -https://bugzilla.gnome.org/show_bug.cgi?id=679428 ---- - src/dhcp-manager/nm-dhcp-dhclient.c | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c -index 043cd63..14be5b2 100644 ---- a/src/dhcp-manager/nm-dhcp-dhclient.c -+++ b/src/dhcp-manager/nm-dhcp-dhclient.c -@@ -490,9 +490,10 @@ dhclient_start (NMDHCPClient *client, - g_ptr_array_add (argv, (gpointer) "-6"); - if (mode_opt) - g_ptr_array_add (argv, (gpointer) mode_opt); -- } else { -- g_ptr_array_add (argv, (gpointer) "-4"); - } -+ /* We never want the "-4" flag: it's the default if dhclient was -+ * built with DHCPv6 support, and invalid otherwise. -+ */ - #endif - - g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */ --- -1.7.8.6 - diff --git a/net-misc/networkmanager/files/networkmanager-0.9.4.0-force-libnl1.1-r1.patch b/net-misc/networkmanager/files/networkmanager-0.9.4.0-force-libnl1.1-r1.patch deleted file mode 100644 index 0b14ec68a..000000000 --- a/net-misc/networkmanager/files/networkmanager-0.9.4.0-force-libnl1.1-r1.patch +++ /dev/null @@ -1,83 +0,0 @@ -From d6fd1cf98a617aaf78ee98ec0a3ac5c468ac666f Mon Sep 17 00:00:00 2001 -From: Alexandre Rostovtsev -Date: Sun, 13 Nov 2011 17:51:47 -0500 -Subject: [PATCH] Allow building against libnl:1.1 only - -Allow building against libnl:1.1 only for wimax. Otherwise, networkmanager -will link to libnl-3.so and to libiWmxSdk (from wimax-1.5.2) which links -to libnl.so, and then explode spectacularly at runtime due to symbol -collisions. ---- - configure.ac | 47 +++++++++++++++++++---------------------------- - 1 files changed, 19 insertions(+), 28 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ed66b3d..c88cbe4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -379,32 +379,27 @@ AM_CONDITIONAL(SESSION_TRACKING_SYSTEMD, test "x$with_session_tracking" = "xsyst - - - have_libnl="no" --PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no]) --PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no]) --PKG_CHECK_MODULES(LIBNL_GENL3, libnl-genl-3.0, [have_libnl_genl3=yes], [have_libnl_genl3=no]) --if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes" -a "${have_libnl_genl3}" = "yes"); then -- AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support]) -- LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS $LIBNL_GENL3_CFLAGS" -- LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS $LIBNL_GENL3_LIBS" -- libnl_version="3" -- have_libnl="yes" -+AC_ARG_WITH(libnl-1, AS_HELP_STRING([--with-libnl-1], [use legacy libnl-1 instead of libnl-3]), ,[with_libnl_1=no]) -+if (test "${with_libnl_1}" = "yes"); then -+ PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no]) -+ if (test "${have_libnl1}" = "yes"); then -+ AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support]) -+ LIBNL_CFLAGS="$LIBNL1_CFLAGS" -+ LIBNL_LIBS="$LIBNL1_LIBS" -+ libnl_version="1" -+ have_libnl="yes" -+ NM_LIBNL_CHECK -+ fi - else -- PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no]) -- if (test "${have_libnl2}" = "yes"); then -- AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support]) -- LIBNL_CFLAGS="$LIBNL2_CFLAGS" -- LIBNL_LIBS="$LIBNL2_LIBS" -- libnl_version="2" -+ PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no]) -+ PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no]) -+ PKG_CHECK_MODULES(LIBNL_GENL3, libnl-genl-3.0, [have_libnl_genl3=yes], [have_libnl_genl3=no]) -+ if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes" -a "${have_libnl_genl3}" = "yes"); then -+ AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support]) -+ LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS $LIBNL_GENL3_CFLAGS" -+ LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS $LIBNL_GENL3_LIBS" -+ libnl_version="3" - have_libnl="yes" -- else -- PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no]) -- if (test "${have_libnl1}" = "yes"); then -- AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support]) -- LIBNL_CFLAGS="$LIBNL1_CFLAGS" -- LIBNL_LIBS="$LIBNL1_LIBS" -- libnl_version="1" -- have_libnl="yes" -- fi - fi - fi - -@@ -414,10 +409,6 @@ fi - AC_SUBST(LIBNL_CFLAGS) - AC_SUBST(LIBNL_LIBS) - --if (test "${libnl_version}" = "1"); then -- NM_LIBNL_CHECK --fi -- - PKG_CHECK_MODULES(UUID, uuid) - AC_SUBST(UUID_CFLAGS) - AC_SUBST(UUID_LIBS) --- -1.7.8.5 - diff --git a/net-misc/networkmanager/files/networkmanager-0.9.6.0-daemon-signals.patch b/net-misc/networkmanager/files/networkmanager-0.9.6.0-daemon-signals.patch deleted file mode 100644 index 45b2f472f..000000000 --- a/net-misc/networkmanager/files/networkmanager-0.9.6.0-daemon-signals.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 24e875ab6cd24deed32fc85639dc0a4b196d1eed Mon Sep 17 00:00:00 2001 -From: Alexandre Rostovtsev -Date: Thu, 13 Sep 2012 05:32:53 -0400 -Subject: [PATCH] core: wait until we daemonized before setting up signals - (bgo #683932) - -If we mask signals before daemonizing, the daemon process will not be -able to handle them, and thus would be unkillable with anything other -than SIGKILL. ---- - src/main.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/main.c b/src/main.c -index 8bc6d3f..edf4b5f 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -401,10 +401,6 @@ main (int argc, char *argv[]) - exit (1); - } - -- /* Set up unix signal handling */ -- if (!setup_signals ()) -- exit (1); -- - /* Set locale to be able to use environment variables */ - setlocale (LC_ALL, ""); - -@@ -501,6 +497,10 @@ main (int argc, char *argv[]) - wrote_pidfile = TRUE; - } - -+ /* Set up unix signal handling */ -+ if (!setup_signals ()) -+ exit (1); -+ - if (g_fatal_warnings) { - GLogLevelFlags fatal_mask; - --- -1.7.12 - diff --git a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet deleted file mode 100644 index 4d14ee7b8..000000000 --- a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet +++ /dev/null @@ -1,6 +0,0 @@ -[main] -plugins=ifnet,keyfile - -[ifnet] -managed=true -auto_refresh=false diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml deleted file mode 100644 index d92f443c4..000000000 --- a/net-misc/networkmanager/metadata.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - nirbheek@gentoo.org - Nirbheek Chauhan - - - tetromino@gentoo.org - Alexandre Rostovtsev - - - Use net-dns/dnsmasq and - net-firewall/iptables for connection sharing - Use sys-auth/consolekit for session - tracking - Use dhclient from net-misc/dhcp for - getting ip - Use net-misc/dhcpcd for getting ip - Enable support for mobile broadband devices - using net-misc/modemmanager - Use dev-libs/nss for cryptography - Enable support for mobile broadband and PPPoE - connections using net-dialup/ppp - Use net-dns/openresolv for managing - DNS information - Enable bindings for dev-lang/vala - Enable support for the deprecated Wext (Wireless - Extensions) API; needed for some older drivers (e.g. ipw2200, - ndiswrapper) - Enable support for WiMAX connections using - net-wireless/wimax - - diff --git a/net-misc/networkmanager/networkmanager-0.9.6.4-r2.ebuild b/net-misc/networkmanager/networkmanager-0.9.6.4-r2.ebuild deleted file mode 100644 index 763092c82..000000000 --- a/net-misc/networkmanager/networkmanager-0.9.6.4-r2.ebuild +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.6.4-r1.ebuild,v 1.2 2013/01/28 08:07:29 tetromino Exp $ - -EAPI="5" -GNOME_ORG_MODULE="NetworkManager" -VALA_MIN_API_VERSION="0.18" -VALA_USE_DEPEND="vapigen" - -inherit autotools eutils gnome.org linux-info systemd user toolchain-funcs vala udev - -DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts" -HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" - -LICENSE="GPL-2+" -SLOT="0" # TODO: add subslot on 0.9.8 bump -IUSE="avahi bluetooth connection-sharing +consolekit dhclient +dhcpcd doc gnutls +introspection kernel_linux +nss modemmanager +ppp resolvconf systemd vala +wext wimax" -KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86" - -REQUIRED_USE=" - modemmanager? ( ppp ) - ^^ ( nss gnutls ) - ^^ ( dhclient dhcpcd ) - ?? ( consolekit systemd ) -" - -# gobject-introspection-0.10.3 is needed due to gnome bug 642300 -# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 -# libnl:1.1 is needed for linking to net-wireless/wimax libraries -# XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 ! -# TODO: Qt support? -COMMON_DEPEND=">=sys-apps/dbus-1.2 - >=dev-libs/dbus-glib-0.94 - virtual/udev[gudev] - >=dev-libs/glib-2.26 - >=sys-auth/polkit-0.97 - >=net-libs/libsoup-2.26:2.4= - >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] - bluetooth? ( >=net-wireless/bluez-4.82 ) - avahi? ( net-dns/avahi:=[autoipd] ) - gnutls? ( - dev-libs/libgcrypt:= - net-libs/gnutls:= ) - nss? ( >=dev-libs/nss-3.11:= ) - dhclient? ( net-misc/dhcp[client] ) - dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 ) - introspection? ( >=dev-libs/gobject-introspection-0.10.3 ) - ppp? ( >=net-dialup/ppp-2.4.5[ipv6] ) - resolvconf? ( net-dns/openresolv ) - connection-sharing? ( - net-dns/dnsmasq - net-firewall/iptables ) - dev-libs/libnl:1.1 - wimax? ( >=net-wireless/wimax-1.5.1 ) -" -RDEPEND="${COMMON_DEPEND} - modemmanager? ( >=net-misc/modemmanager-0.4 ) - consolekit? ( sys-auth/consolekit ) - systemd? ( >=sys-apps/systemd-31 ) -" -DEPEND="${COMMON_DEPEND} - virtual/pkgconfig - >=dev-util/intltool-0.40 - >=sys-devel/gettext-0.17 - >=sys-kernel/linux-headers-2.6.29 - doc? ( >=dev-util/gtk-doc-1.8 ) - vala? ( $(vala_depend) ) - !wimax? ( !=dev-libs/libnl-3.2.20 ) -" - -sysfs_deprecated_check() { - ebegin "Checking for SYSFS_DEPRECATED support" - - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" - eerror "or NetworkManager will not work correctly." - eerror "See http://bugs.gentoo.org/333639 for more info." - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" - fi - eend $? -} - -pkg_pretend() { - if use kernel_linux; then - get_version - if linux_config_exists; then - sysfs_deprecated_check - else - ewarn "Was unable to determine your kernel .config" - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." - ewarn "See http://bugs.gentoo.org/333639 for more info." - fi - - fi -} - -pkg_setup() { - enewgroup plugdev -} - -src_prepare() { - # Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility - epatch "${FILESDIR}/${PN}-0.9.4.0-force-libnl1.1-r1.patch" - # Update init.d script to provide net and use inactive status if not connected - epatch "${FILESDIR}/${PN}-0.9.2.0-init-provide-net-r1.patch" - # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832 - epatch "${FILESDIR}/${PN}-0.9.2.0-pre-sleep.patch" - # Bug #335147, https://bugzilla.gnome.org/show_bug.cgi?id=679428 - epatch "${FILESDIR}/${PN}-0.9.4.0-dhclient-ipv6.patch" - # https://bugzilla.gnome.org/show_bug.cgi?id=683932 - epatch "${FILESDIR}/${PN}-0.9.6.0-daemon-signals.patch" - - epatch_user - - use vala && vala_src_prepare - eautoreconf - default -} - -src_configure() { - econf \ - --disable-more-warnings \ - --disable-static \ - --localstatedir=/var \ - --with-distro=gentoo \ - --with-dbus-sys-dir=/etc/dbus-1/system.d \ - --with-udev-dir="$(udev_get_udevdir)" \ - --with-iptables=/sbin/iptables \ - --enable-concheck \ - --with-crypto=$(usex nss nss gnutls) \ - --with-session-tracking=$(usex consolekit ck $(usex systemd systemd none)) \ - $(use_enable doc gtk-doc) \ - $(use_enable introspection) \ - $(use_enable ppp) \ - $(use_enable wimax) \ - $(use_with dhclient) \ - $(use_with dhcpcd) \ - $(use_with doc docs) \ - $(use_with resolvconf) \ - $(use_enable vala) \ - $(use_with wext) \ - $(use_with wimax libnl-1) \ - "$(systemd_with_unitdir)" -} - -src_test() { - cp libnm-util/tests/certs/test_ca_cert.pem src/settings/plugins/ifnet/tests/ || die - default -} - -src_install() { - default - # /var/run/NetworkManager is used by some distros, but not by Gentoo - rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed" - - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts - keepdir /etc/NetworkManager/dispatcher.d - - if use systemd; then - # Our init.d script requires running a dispatcher script that annoys - # systemd users; bug #434692 - rm -rv "${ED}/etc/init.d" || die "rm failed" - else - # Provide openrc net dependency only when nm is connected - exeinto /etc/NetworkManager/dispatcher.d - newexe "${FILESDIR}/10-openrc-status-r3" 10-openrc-status - sed -e "s:@EPREFIX@:${EPREFIX}:g" \ - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die - - # Default conf.d file - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager - fi - - # Add keyfile plugin support - keepdir /etc/NetworkManager/system-connections - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765 - insinto /etc/NetworkManager - newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf - - # Allow users in plugdev group to modify system connections - insinto /usr/share/polkit-1/rules.d/ - doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" - if has_version '=networkmanager-0.9.4.0-r4" - elog "If you edited ${old_rules}" - elog "without changing its behavior, you may want to remove it." - ;; - esac - fi -} diff --git a/net-misc/yandex-disk/Manifest b/net-misc/yandex-disk/Manifest deleted file mode 100644 index 2e891aaf5..000000000 --- a/net-misc/yandex-disk/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST yandex-disk_0.1.4.504_amd64.deb 4339846 SHA256 8781906ec67dbfe34902a7628adc82117f15bd652888f7b88095c2c8fb0fb62e SHA512 faa60a31c5aea4fb7c2d5ca031c20ee9df4b233334c2fc3fa1daaa4c4038d0a0ae4101491b23cf40c578a6f5e823f4fad56a9d58982031d51f1defbf4d6cd30b WHIRLPOOL 1e405d796f829543ddfeffaae575d11b2c8983b51fa8fc0acfbfdb6540b1848ee9ed96e25f5a218b7167f4cc2cfd62ba54becdde8c1157b08ab56c86ea043f53 -DIST yandex-disk_0.1.4.504_i386.deb 3949894 SHA256 b93913b8cdf27b84420a3bf1aa01473da83503dd7ab69669a009ccfc95621bb7 SHA512 c67491445baca662b78e05b429c95891584945d10b96972afd7fa213aede798e81f519d5db777dee260ab60e79b992540310ba8c6c6d8cda0f3bd639132728e3 WHIRLPOOL 6163b41490df6f8ae3ac53bf51ad1de427bbb94e09aeac0dce035a1e8d9b09fc0dbee1d4179a7275446fa533d212ee250bb7a83042a4333e6f28b262c2573628 -EBUILD yandex-disk-0.1.4.504.ebuild 925 SHA256 714b9732411631bd07cd94de6090a31d630dcfe173dd050e0e0857ba920c68ae SHA512 1a178947ca6e362cd537409732a8fce3a9a366faead71801184935fc3e50220eaa33176e8c40964919c2ea7580cf0597c9022e58878d7f802c3587504244c7cd WHIRLPOOL d689ccc0ce44fa3e7257e38e751182658b66ebe13503c98efb584a49adccf25e83cd63cb2b7d03418b56856997357a144bcb02ec63d4b2218f0327819fdae0c8 diff --git a/net-misc/yandex-disk/yandex-disk-0.1.4.504.ebuild b/net-misc/yandex-disk/yandex-disk-0.1.4.504.ebuild deleted file mode 100644 index f541fd47c..000000000 --- a/net-misc/yandex-disk/yandex-disk-0.1.4.504.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -DESCRIPTION="Console client for Yandex.Disk" -HOMEPAGE="https://disk.yandex.ru/" -SRC_URI=" - x86? ( http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/${PN}_${PV}_i386.deb ) - amd64? ( http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/${PN}_${PV}_amd64.deb )" -SLOT="0" -KEYWORDS="-* ~x86 ~amd64" -DEPEND="" -RDEPEND="" -IUSE="" - -src_unpack() { - mkdir "${S}" - cd "${S}" - if use amd64 ; then - unpack ${PN}_${PV}_amd64.deb - else - unpack ${PN}_${PV}_i386.deb - fi - - unpack ./data.tar.gz -} - -src_install() { - cp -pPR "${S}"/usr "${D}"/ || die "Installation failed." -} - -pkg_postinst() { - elog "Now you can configure Yandex.Disk client with command:" - elog "yandex-disk setup" -} \ No newline at end of file diff --git a/net-print/samsung-unified-linux-driver/Manifest b/net-print/samsung-unified-linux-driver/Manifest index dec2c4629..91903375d 100644 --- a/net-print/samsung-unified-linux-driver/Manifest +++ b/net-print/samsung-unified-linux-driver/Manifest @@ -1,2 +1,4 @@ -DIST samsung-unified-linux-driver-1.01.tar.gz 34024719 RMD160 3870137e33f453a02281de113066a73ae3dcdd86 SHA1 d6a23b8598e0ef699316634d498d8038dd7afabc SHA256 328fdeb852697e7648bbcbe1f0bacda647ee76d0273359cc3d69b5c5ba122869 -EBUILD samsung-unified-linux-driver-1.01.ebuild 3139 RMD160 91b8c192a0e289b55c1f54a74d149bedc5c621c3 SHA1 04a9a1b82938dfd0421e86d4494c89e0484e45bd SHA256 93a7e194fbe36e761e21daa5a30efde477ba65123aaf009f708f158038aab48a +DIST samsung-unified-linux-driver-1.01.tar.gz 34024719 SHA256 328fdeb852697e7648bbcbe1f0bacda647ee76d0273359cc3d69b5c5ba122869 SHA512 3ef8a877e6b21f7f7c1ba087b61a9b50b15315e7705181e74a7c9f028918035fa36b9e98e9d9a1e7e0ddcd052d050bc6fdaf6ef2a7d27ca51a6bc5161ec194a2 WHIRLPOOL 5559f8fade9f678dd21546791f1f2684341308ae11ff7c484651fbd310a361597b81482cda8cf836729dbddcb046306b8d7de7d2e80dd5afe2dff00188c82cd2 +DIST samsung-unified-linux-driver-1.05.tar.gz 32411592 SHA256 9fb37747fda2cf82cd5ae7f459822f1a287fb0dba2729b889501b9e3aaff5903 SHA512 de72ce97bffc09a11078a6efe2f4efc0a19e2987d6ed35ff0b1cbf8dfdce7a734f7b4603752e5a0f90e9d7e7ce418662750aca37fde7af3c3c7a6866a5c3d4e6 WHIRLPOOL 11904ae1e4167beb6e67e52712b779b33add8a5f291c6e6cf48f1626ca167159ec4fb449f74422168340f912baa90bac5036755bee5afcdc35ef0d4ee6ad987a +EBUILD samsung-unified-linux-driver-1.01.ebuild 3139 SHA256 93a7e194fbe36e761e21daa5a30efde477ba65123aaf009f708f158038aab48a SHA512 3c7bab1a5283de0aaf8eb3f5784a3b7bf3430c030c7a48bb97392e637bacffc0872aae9f31f5bc02cf879413a09d9d4f99bd9e8e708684983a34ecfff1e9e1d7 WHIRLPOOL 0a53b14ae7666071c1650b5ad5320bb4f717749884a2c82dc1164c1e96b566616d11771fb45f53e366be5273928d4028511994b86b94d8c75e4d8a163a802694 +EBUILD samsung-unified-linux-driver-1.05.ebuild 3335 SHA256 3e9446b693c8bed5eea1d86cd9a41061e492e9db2a2e4769d37ebf53f49952d4 SHA512 d6fea8e788b205d1b94c00e80316e2ce30eb752a6d9ca50f3a27c720ed3394f6364a10e00053f61525a089d658661478b2d69bb236166beb222c26429d5d7953 WHIRLPOOL 26ba5fcbccb7cdced911b4f9d511adec4741932abed7d7da93352d55812d6f48479fc5a66a2a05fc66ed485e85ecb8ebbaefb75a794c008aa377d94912d9fc7e diff --git a/net-print/samsung-unified-linux-driver/samsung-unified-linux-driver-1.05.ebuild b/net-print/samsung-unified-linux-driver/samsung-unified-linux-driver-1.05.ebuild new file mode 100644 index 000000000..bea673823 --- /dev/null +++ b/net-print/samsung-unified-linux-driver/samsung-unified-linux-driver-1.05.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.9.ebuild,v 1.12 2009/11/04 12:12:05 arfrever Exp $ + +EAPI=4 + +inherit multilib + +DESCRIPTION="Samsung's proprietary printer driver binaries known as UnifiedLinuxDriver" +HOMEPAGE="http://www.samsung.com/us/support/downloads/ML-6512MD/XAA" +SRC_URI="http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?VPath=DR/201108/20110830105903229/UnifiedLinuxDriver_${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="SAMSUNG-ELECTRONICS-software" +SLOT="0" +KEYWORDS="~amd64 ~x86 -*" +IUSE="+splix" + +S=${WORKDIR}/cdroot/Linux + +DEPEND="dev-util/bin_replace_string" +# We need libstdc++.so.5 +# Splix and we both try to install CMS (color management stuff) +# files. The splix useflag allows the two packages to not clobber +# eachother. +RDEPEND="net-print/cups + sys-libs/libstdc++-v3 + splix? ( net-print/splix ) + !splix? ( !net-print/splix )" + +QA_PRESTRIPPED='/usr/libexec/cups/filter/rastertosamsung.* /usr/lib[0-9]*/libscmssc.so' +QA_SONAME='/usr/lib[0-9]*/libscmssc.so' + +pkg_setup() { + local abi="${ABI}" + + # does non-portage-multilib take significance in ${ABI}? + [ -z "${abi}" ] && abi="${ARCH}" + + # Samsung's choice for how to denote ABIs and libdir within its + # tarball. + case ${abi} in + x86) + SABI=i386 + SLIBDIR=lib + ;; + amd64) + SABI=x86_64 + SLIBDIR=lib64 + ;; + *) + die "Unable to understand the following value of \${ABI} or \${ARCH}: \`\`${abi}''" + ;; + esac +} + +src_prepare() { + # The rasterto* cups filters will dlopen() libscmssc.so. However, + # they try to open it at /usr/lib/cups/filter/libscmssc.so, + # /usr/lib64/cups/filter/libscmssc.so, and finally + # ../src/libscmssc.so. We thus hack the first entry to not use an + # absolute path and just throw this binary into the library search + # path. If these filters fail to dlopen() libscmssc.so, the + # printer will print two copies of each page on each page with + # white horizonal bands. + for filter in ${SABI}/at_root/usr/${SLIBDIR}/cups/filter/rasterto*; do + einfo "Replacing dlopen() paths in ${filter}." + bin_replace_string /usr/lib/cups/filter/libscmssc.so libscmssc.so ${filter} || die + done +} + +src_install() { + # Currently, we try to install the minimum necessary for + # integrating into CUPS. The UI may come later with a qt4 + # useflag... but having a working driver is much more useful than + # a GUI. + + insinto /usr/share + doins -r noarch/at_opt/share/images + + insinto /usr/share/ppd + doins noarch/at_opt/share/ppd/*.ppd + + if ! use splix; then + # rastertosamsungsplc looks for the *.cts file here of + # its own arbitrary choosing. + insinto /usr/share/cups/model/samsung + doins -r noarch/at_opt/share/ppd/cms + fi + + # I think that sane support needs the smfpd to be installed and + # running...(?) [this copy of 1.05 doesn't include sane.d stuff) + #insinto /etc/sane.d + #doins -r noarch/at_root/etc/sane.d/* + + # required only for scanning? + #dosbin ${SABI}/at_root/usr/sbin/smfpd + + exeinto /usr/libexec/cups/filter + doexe ${SABI}/at_root/usr/${SLIBDIR}/cups/filter/rasterto* + + # see comment in src_prepare() about libscmssc.so; libscmssc.so + # must currently be placed into the system library search path to + # be found. + dolib ${SABI}/at_root/usr/${SLIBDIR}/cups/filter/libscmssc.so +} diff --git a/net-wireless/broadcom-sta/Manifest b/net-wireless/broadcom-sta/Manifest deleted file mode 100644 index 89162aff7..000000000 --- a/net-wireless/broadcom-sta/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -AUX broadcom-sta-5.10.91.9-license.patch 716 SHA256 53544703c15eb5e7f35721c436bfd0acf7db3de1df83b2e344bfc7090cb14cf1 SHA512 abdea6d154e66f43fd629eefe3dfd19a43318acfc54b3ac52abd9c8e839d25971214971b14429f5fb09091fbb16793d2ce3db1093c2ccca9496975085156b94c WHIRLPOOL 98ec882b0b0db93e5a19bc7aa465c7c758f3c36bd3fa5159458520b4d1a298549c5072a46f50d351dc48cfb01216b11a164291539f72455d37caad593d61483a -AUX broadcom-sta-5.100.82.111-linux-3.0.patch 935 SHA256 cd349fef72bb33025e59105fefa69c3e60066985707f396e03235102ca938137 SHA512 00e3139158b53f80d03bb6aa5b4eb3435cc453b100ee57b638a138ae0b624c88946c63dc20d559f05bee451275d7662dfb8c29e68de11ebe04c8df87a6a86f70 WHIRLPOOL 84d0d41e8a3e2b0b248ffe5d4c5256c68e1533aa58049a34ffc98e5f0bd0a2a20cffd58adf20cdced79096d10134bec474af5f9666a225c2103dfffc93b030a8 -AUX broadcom-sta-5.100.82.112-linux-2.6.39.patch 564 SHA256 2df2f242d6b34118cecbb8fb5c209356bf095436e8b553705f9f9f022648b53d SHA512 5b69b3b41af0a2f090b3fb021c188a846207b59ba0baf324cf4c93a5d3f9105fcd8f7e0aee592ebe0e898dd39c1988c65c8adeba643f1899f35287b0362b043e WHIRLPOOL 3d7dc0e31422b960038d52f5c62e15d1f0980dabb304cfc8cecc897af985a4ddcfaa90fb98150c25b2bc8040bb76c5c3e0b2afe8b7871397fbd20ed4a60debad -AUX broadcom-sta-5.100.82.112-linux-3.2.patch 541 SHA256 65e89b0950fe3972c3212c970d307f1b4ef633dfd622f94f4b5b816cb70af430 SHA512 e0d47ba584b302a3f6cf5da084d734cea44970a76e094bcc18acec07936ad77d7a69ef39c9333eef09256d0f7477d4d153b76e7378544ab40671c5aa1c7eedff WHIRLPOOL d681d691c4ca305dca3bee7501e831c9b64fe2912b5b91a3fc86c1d40606896c2cb479806eeb69a779905495f41a1513e75d0a4503b722459d1577559eb8ce35 -AUX broadcom-sta-5.100.82.112-linux-3.8.patch 4267 SHA256 a3d53a4868e5cde314ef06b108a88c6136ad36b3894a7732871c59561a4d69ad SHA512 1731a7e44fbd9d1aa4af9c2f7320f27797fe6a646c0c7528c648bd2b4e7c7960c690f8c5d7774fab55cc91fbd9c6f42896d437034960422d143f222ed4858d55 WHIRLPOOL bc58dec2f60e6b9efd7c8e462da6865bb75f0bc6e2eed11190d88d22edda8eb8d55f4b2198e1a5eb10d54889a58b35ea42f7e6750beadc7d965841cd18405104 -AUX broadcom-sta-5.100.82.38-gcc.patch 417 SHA256 82ad7a047e8e384fe4a571e054fabb0f629c81012f035f3525fa51eb611cc736 SHA512 d271493861fedf937be6f534fab1eaec95e7db3324583bfafb52445d1a5001c07d596fac88b150c7bd83e02d0095ad2867dc2f0ffbcfb320f4536d557d4a663e WHIRLPOOL 32b270e795503b5cb97c2407b472b62a93efffb14f2147680f45ad063839aa59526baadc72e9eeab424f1d36f236fd0e1bc40ae7ea9477d0dc2c043445fa7fc7 -DIST hybrid-portsrc_x86_32-v5_100_82_112.tar.gz 1139221 SHA256 85b4e3163b383943d5002a571efbd03f212d010ba0962ebdefb201fe6ce270e7 SHA512 315f8b2bb146de8868a64f08c839b0136ed174c76d0f4e825a4b8c0e0109872ccc58ff3103bb86ae4277f273060a6e1ed41d7aeb84931c926f8b3b0b085ac355 WHIRLPOOL 8b80660932e9d8db3b186e3847729d433ea899876577aa7c7f1f962efb4798b350630dcadbe2d18ec9f1faa232e42d23e9b306b221913ce61aae7a8e9dffb5da -DIST hybrid-portsrc_x86_64-v5_100_82_112.tar.gz 1175410 SHA256 9cd32f164c748b4353f10a74f3b00640bb281e4b79f17114aac581e0b3cd4ae3 SHA512 485c4a661c30ebc076499f48d468ef30afdd5fdfd6458f4cd25fceaf15969f33e46695a173908d05e635a572efc152b5ae973493d53d5b4089335b03b0ba9a6d WHIRLPOOL 2e3259d3fde1830aeddf8ee38a070f891c0acb167bfe99d623b6102f1bc8ee8f3f776efc6370b1067063eea2069a93e5678e6ea3b3ab054e7d4d30b9f5db8f46 -EBUILD broadcom-sta-5.100.82.112-r9.ebuild 2037 SHA256 8517e705d0773fce3679b158d19402aa950d5087f8febf6613c150d9afa66d22 SHA512 346827956907c8ca1cd8e0ca92dde4223d8f5b15dff2ce396074c71634eed06df45caf549a5b40398243975208b1056cbaf3c7b049325705e3058ae6bd9a9d2c WHIRLPOOL 0f2f37e3cd0cc0f71c475a1b567f4e6910d2ae8fa9dbac7640a0a422d45c8d12f997aaece8a7cb36cbf9af22dd9e22cc1be22c181a3b1fb2248b129040c980cf diff --git a/net-wireless/broadcom-sta/broadcom-sta-5.100.82.112-r9.ebuild b/net-wireless/broadcom-sta/broadcom-sta-5.100.82.112-r9.ebuild deleted file mode 100644 index d47b3f97d..000000000 --- a/net-wireless/broadcom-sta/broadcom-sta-5.100.82.112-r9.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/broadcom-sta/broadcom-sta-5.100.82.112-r2.ebuild,v 1.5 2013/03/08 04:59:30 pinkbyte Exp $ - -EAPI="4" -inherit eutils linux-mod - -DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver." -HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php" -SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86_" -SRC_URI="x86? ( ${SRC_BASE}32-v${PV//\./_}.tar.gz ) - amd64? ( ${SRC_BASE}64-v${PV//\./_}.tar.gz )" - -LICENSE="Broadcom" -KEYWORDS="amd64 x86" -IUSE="" - -RESTRICT="mirror" - -DEPEND="virtual/linux-sources" -RDEPEND="" - -S="${WORKDIR}" - -MODULE_NAMES="wl(net/wireless)" -MODULESD_WL_ALIASES=("wlan0 wl") - -pkg_setup() { - # bug #300570 - # NOTE: module builds correctly anyway with b43 and SSB enabled - # make checks non-fatal. The correct fix is blackisting ssb and, perhaps - # b43 via udev rules. Moreover, previous fix broke binpkgs support. - CONFIG_CHECK="~!B43 ~!SSB" - if kernel_is ge 2 6 32; then - CONFIG_CHECK="${CONFIG_CHECK} CFG80211 LIB80211 ~!MAC80211" - elif kernel_is ge 2 6 31; then - CONFIG_CHECK="${CONFIG_CHECK} LIB80211 WIRELESS_EXT ~!MAC80211" - elif kernel_is ge 2 6 29; then - CONFIG_CHECK="${CONFIG_CHECK} LIB80211 WIRELESS_EXT ~!MAC80211 COMPAT_NET_DEV_OPS" - else - CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP" - fi - linux-mod_pkg_setup - - BUILD_PARAMS="-C ${KV_DIR} M=${S}" - BUILD_TARGETS="wl.ko" -} - -src_prepare() { - epatch "${FILESDIR}/${PN}-5.10.91.9-license.patch" \ - "${FILESDIR}/${PN}-5.100.82.38-gcc.patch" \ - "${FILESDIR}/${PN}-5.100.82.111-linux-3.0.patch" \ - "${FILESDIR}/${PN}-5.100.82.112-linux-2.6.39.patch" \ - "${FILESDIR}/${PN}-5.100.82.112-linux-3.2.patch" \ - "${FILESDIR}/${PN}-5.100.82.112-linux-3.8.patch" - sed -e "s:^#include $:#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)\\n\\0\\n#endif:" \ - -i src/wl/sys/wl_linux.c || die "sed failed to patch for linux-3.4" - - epatch_user -} diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch deleted file mode 100644 index b320d977e..000000000 --- a/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c ---- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900 -+++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900 -@@ -163,6 +163,8 @@ - static void wl_free_if(wl_info_t *wl, wl_if_t *wlif); - static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info); - -+MODULE_LICENSE("MIXED/Proprietary"); -+ - static struct pci_device_id wl_id_table[] = { - { PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - { PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch deleted file mode 100644 index a915aee67..000000000 --- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur broadcom-sta-5.100.82.111.orig/Makefile broadcom-sta-5.100.82.111/Makefile ---- broadcom-sta-5.100.82.111.orig/Makefile 2011-10-06 08:16:10.000000000 +0900 -+++ broadcom-sta-5.100.82.111/Makefile 2011-10-24 08:54:26.000000000 +0900 -@@ -16,7 +16,7 @@ - ifneq ($(KERNELRELEASE),) - - LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \ -- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \ -+ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \ - echo TRUE; \ - else \ - echo FALSE; \ -@@ -24,7 +24,7 @@ - )) - - LINUXVER_WEXT_ONLY:=$(strip $(shell \ -- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \ -+ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \ - echo FALSE; \ - else \ - echo TRUE; \ diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch deleted file mode 100644 index 633b9c858..000000000 --- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/wl/sys/wl_cfg80211.c.orig 2011-10-31 07:57:38.000000000 -0400 -+++ src/wl/sys/wl_cfg80211.c 2011-10-31 07:57:46.000000000 -0400 -@@ -1811,7 +1811,7 @@ - notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) + - wl_get_ielen(wl); - freq = ieee80211_channel_to_frequency(notif_bss_info->channel --#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) - ,(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ - #endif - ); diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2.patch deleted file mode 100644 index b491537cb..000000000 --- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.112/src/wl/sys/wl_linux.c ---- broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_linux.c 2011-10-23 01:56:55.000000000 +0900 -+++ broadcom-sta-5.100.82.112/src/wl/sys/wl_linux.c 2011-11-22 00:56:07.021520421 +0900 -@@ -385,7 +385,9 @@ - #endif - .ndo_get_stats = wl_get_stats, - .ndo_set_mac_address = wl_set_mac_address, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) - .ndo_set_multicast_list = wl_set_multicast_list, -+#endif - .ndo_do_ioctl = wl_ioctl - }; - diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch deleted file mode 100644 index b313609b5..000000000 --- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -ur broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_cfg80211.c broadcom-sta-5.100.82.112/src/wl/sys/wl_cfg80211.c ---- broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_cfg80211.c 2013-02-25 23:56:44.171538633 +0400 -+++ broadcom-sta-5.100.82.112/src/wl/sys/wl_cfg80211.c 2013-03-01 11:24:52.932161199 +0400 -@@ -42,8 +42,13 @@ - enum nl80211_iftype type, u32 *flags, struct vif_params *params); - static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, - struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) -+static s32 wl_cfg80211_scan(struct wiphy *wiphy, -+ struct cfg80211_scan_request *request); -+#else - static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, - struct cfg80211_scan_request *request); -+#endif - static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); - static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, - struct cfg80211_ibss_params *params); -@@ -56,7 +61,10 @@ - struct cfg80211_connect_params *sme); - static s32 wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code); - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -+static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, -+ enum nl80211_tx_power_setting type, s32 dbm); -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) - static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, - enum nl80211_tx_power_setting type, s32 dbm); - #else -@@ -64,7 +72,11 @@ - enum tx_power_setting type, s32 dbm); - #endif - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -+static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm); -+#else - static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm); -+#endif - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) - static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy, -@@ -570,10 +582,19 @@ - } - - static s32 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) -+wl_cfg80211_scan(struct wiphy *wiphy, -+ struct cfg80211_scan_request *request) -+#else - wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, - struct cfg80211_scan_request *request) -+#endif - { - s32 err = 0; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) -+ struct wl_priv *wl = wiphy_to_wl(wiphy); -+ struct net_device *ndev = wl_to_ndev(wl); -+#endif - - CHECK_SYS_UP(); - err = __wl_cfg80211_scan(wiphy, ndev, request, NULL); -@@ -742,7 +763,11 @@ - else - memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -+ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size); -+#else - wl_ch_to_chanspec(params->channel, &join_params, &join_params_size); -+#endif - - err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); - if (err) { -@@ -1099,7 +1124,10 @@ - return err; - } - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -+static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, -+ enum nl80211_tx_power_setting type, s32 dbm) -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) - static s32 - wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm) - #else -@@ -1158,7 +1186,11 @@ - return err; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -+static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm) -+#else - static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) -+#endif - { - struct wl_priv *wl = wiphy_to_wl(wiphy); - struct net_device *ndev = wl_to_ndev(wl); -@@ -2074,8 +2106,13 @@ - beacon_interval = cpu_to_le16(bi->beacon_period); - } else { - WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -+ ie = bss->ies->data; -+ ie_len = bss->ies->len; -+#else - ie = bss->information_elements; - ie_len = bss->len_information_elements; -+#endif - beacon_interval = bss->beacon_interval; - cfg80211_put_bss(bss); - } diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch deleted file mode 100644 index 048565376..000000000 --- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur broadcom-sta-5.60.246.2.orig//src/wl/sys/wl_iw.h broadcom-sta-5.60.246.2/src/wl/sys/wl_iw.h ---- broadcom-sta-5.60.246.2.orig//src/wl/sys/wl_iw.h 2010-10-08 07:32:59.000000000 +0900 -+++ broadcom-sta-5.60.246.2/src/wl/sys/wl_iw.h 2010-10-28 00:50:57.925351964 +0900 -@@ -15,6 +15,7 @@ - #ifndef _wl_iw_h_ - #define _wl_iw_h_ - -+#include - #include - - #include diff --git a/net-wireless/madwifi-ng-tools/Manifest b/net-wireless/madwifi-ng-tools/Manifest deleted file mode 100644 index d29d1bf0a..000000000 --- a/net-wireless/madwifi-ng-tools/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST madwifi-0.9.4-r4180-20120502.tar.gz 3534976 RMD160 9d680936d0b50b0d204be84c83ff8c06e887e915 SHA1 4cd3f2553561f7a5675c8036e54d6e4065131e25 SHA256 fe1b9f934f3b01b86170e661565f201c4e18b50e826f86e68578b58aea93d080 -EBUILD madwifi-ng-tools-0.9.4.4180.20120502.ebuild 2055 RMD160 b30b53d2611ea7962f08f42d5c323e2b1c286b4b SHA1 5c54445f71af3855faa38779e174a14e4712eea8 SHA256 8d3057eeade58b7b53f3d95da63e7d58c0fbbe617f7ef80d39019f839591c5df diff --git a/net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4180.20120502.ebuild b/net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4180.20120502.ebuild deleted file mode 100644 index d78dec494..000000000 --- a/net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4180.20120502.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4165.20110816.ebuild,v 1.2 2011/10/15 23:22:51 maekke Exp $ - -EAPI="2" - -inherit versionator toolchain-funcs - -MY_PN=${PN/-ng-tools/} -MY_PV=$(get_version_component_range 1-3) -MY_REV=$(get_version_component_range 4) -MY_DATE=$(get_version_component_range 5) -MY_P=${MY_PN}-${MY_PV}-r${MY_REV}-${MY_DATE} -S=${WORKDIR}/${MY_P}/tools - -DESCRIPTION="Next Generation tools for configuration of Atheros based IEEE 802.11a/b/g wireless LAN cards" -HOMEPAGE="http://www.madwifi-project.org/" -SRC_URI="http://snapshots.madwifi-project.org/${MY_PN}-${MY_PV}/${MY_P}.tar.gz" - -LICENSE="|| ( BSD GPL-2 )" -SLOT="0" -KEYWORDS="amd64 ~ppc x86" -IUSE="" - -DEPEND="" -RDEPEND="!net-wireless/madwifi-old-tools" - -src_prepare() { - # format string fix from solar - #sed -i \ -# -e 's:err(1, ifr.ifr_name);:err(1, "%s", ifr.ifr_name);:g' \ -# ${S}/tools/athstats.c || die - - sed -i \ - -e "s:CC =.*:CC = $(tc-getCC):" \ - -e "s:CFLAGS=:CFLAGS+=:" \ - -e "s:LDFLAGS=:LDFLAGS+=:" \ - "${S}"/Makefile || die -} - -src_install() { - emake DESTDIR="${D}" BINDIR=/usr/bin MANDIR=/usr/share/man STRIP=echo \ - install || die "emake install failed" - - dodir /sbin - mv "${D}"/usr/bin/wlanconfig "${D}"/sbin - - # install headers for use by - # net-wireless/wpa_supplicant and net-wireless/hostapd - cd "${S}"/.. - insinto /usr/include/madwifi/include/ - doins include/*.h - insinto /usr/include/madwifi/net80211 - doins net80211/*.h -} - -pkg_postinst() { - if [ -e "${ROOT}"/etc/udev/rules.d/65-madwifi.rules ]; then - ewarn - ewarn "The udev rules for creating interfaces (athX) are no longer needed." - ewarn - ewarn "You should manually remove the /etc/udev/rules.d/65-madwifi.rules file" - ewarn "and either run 'udevstart' or reboot for the changes to take effect." - ewarn - fi - einfo - einfo "If you use net-wireless/wpa_supplicant or net-wireless/hostapd with madwifi" - einfo "you should remerge them now." - einfo -} diff --git a/net-wireless/madwifi-ng/Manifest b/net-wireless/madwifi-ng/Manifest deleted file mode 100644 index 5c469f7a6..000000000 --- a/net-wireless/madwifi-ng/Manifest +++ /dev/null @@ -1,8 +0,0 @@ -AUX madwifi-dfs-ieee80211-skb-update.patch 453 RMD160 856e6931da9bf96bc993a6f568933d6742f81719 SHA1 41928bbfdbb4e1c1fa5c1ed93fb673542c18bbc3 SHA256 25c4d782cdaac53ae4bf36253b93e27c475fec785043e4d080c83e61eb9c809f -AUX madwifi-ng-0.9.3-uudecode-gcda-fix.patch 340 RMD160 2a18fc4f9e66aa131e901e7e46930e08e2ece7ea SHA1 3c84bf4e203ab3c810c734816dd1291ba19b0005 SHA256 be6e7a66acad56044c25ab56d9cbd7d5326c4ba21f5d9ed25caef56a9577bdc8 -AUX madwifi-ng-0.9.4-2.6.27-r3811.patch 6515 RMD160 6d52c90f5afad8c225a2d23d90af593e4f00b666 SHA1 0f49938eb9a9b523ebb8925a446018010454184b SHA256 d98fc130d1588b599119eda5d3d723f6e7b83201a89ca9c1bac8760042308e41 -AUX madwifi-ng-0.9.4-request_module-build.patch 860 RMD160 d34c08fe10e21226e1593098cf23edc98275d907 SHA1 4a3c9894a8272aefe5be4c718753ead8c4277858 SHA256 5a9ade8f6d5c86ef7e80085c55983a6cf7269d367d383f175f3b88974ddd47aa -AUX madwifi-ng-injection-r3925.patch 1171 RMD160 f00fb830c3116b8ef5c6b0277105f8ffb9126b46 SHA1 9eb78206792d0f1c8fc230e3b850849cb86080d9 SHA256 48892221bea5da0a34c51235a80201e0bebb63be22075b04df659ce06a09dfed -AUX madwifi-ng-r1886.patch 965 RMD160 86389659efbd846c12153c7e11043f0fb3c7fd8b SHA1 cda44aff6e99ade85b736cc2f31b13cfee6c3721 SHA256 e068fbfaf9c2f27ac9670b6fc43939ceade0e6c40df88d5e23006be640ca0fbe -DIST madwifi-0.9.4-r4180-20120502.tar.gz 3534976 RMD160 9d680936d0b50b0d204be84c83ff8c06e887e915 SHA1 4cd3f2553561f7a5675c8036e54d6e4065131e25 SHA256 fe1b9f934f3b01b86170e661565f201c4e18b50e826f86e68578b58aea93d080 -EBUILD madwifi-ng-0.9.4.4180.20120502.ebuild 3449 RMD160 0f58e96d65018934cb2b48d3c4225797f83686ad SHA1 2453b4aabac2582f00e02db6026eadf9f2889244 SHA256 5a4bc282eeb179471eb234927347bac340d362ecfbfb1c045e137542ce7107f4 diff --git a/net-wireless/madwifi-ng/files/madwifi-dfs-ieee80211-skb-update.patch b/net-wireless/madwifi-ng/files/madwifi-dfs-ieee80211-skb-update.patch deleted file mode 100644 index af14023b8..000000000 --- a/net-wireless/madwifi-ng/files/madwifi-dfs-ieee80211-skb-update.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/net80211/ieee80211_linux.h 2008-05-09 01:15:01 +0400 -+++ b/net80211/ieee80211_linux.h 2008-05-11 02:26:35 +0400 -@@ -315,6 +315,9 @@ typedef spinlock_t acl_lock_t; - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - #define __skb_append(a,b,c) __skb_append(a, b) - #endif -+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25) -+#define __skb_append(a,b,c) __skb_queue_after(c,a,b) -+#endif - - /* - * Per-node power-save queue definitions. Beware of control diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.3-uudecode-gcda-fix.patch b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.3-uudecode-gcda-fix.patch deleted file mode 100644 index 686958cc1..000000000 --- a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.3-uudecode-gcda-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: ath_hal/Makefile -=================================================================== ---- ath_hal/Makefile (revision 1648) -+++ ath_hal/Makefile (working copy) -@@ -61,6 +61,7 @@ - ath_hal-objs := ah_osdep.o ${TARGET}.hal.o - - hostprogs-y := uudecode -+uudecode-objs := uudecode.o - - # For older 2.6 kernels - host-progs := $(hostprogs-y) diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch deleted file mode 100644 index b02795f5f..000000000 --- a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch +++ /dev/null @@ -1,190 +0,0 @@ -=== modified file 'net80211/ieee80211_wireless.c' ---- net80211/ieee80211_wireless.c 2008-10-22 18:13:35 +0000 -+++ net80211/ieee80211_wireless.c 2008-10-22 18:13:41 +0000 -@@ -1551,11 +1551,19 @@ - - struct iwscanreq { /* XXX: right place for this declaration? */ - struct ieee80211vap *vap; -+ struct iw_request_info *info; - char *current_ev; - char *end_buf; - int mode; - }; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(IW_REQUEST_FLAG_COMPAT) -+#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e) -+#define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e) -+#define iwe_stream_add_value(a, b, c, d, e, f) \ -+ iwe_stream_add_value(b, c, d, e, f) -+#define iwe_stream_lcp_len(a) IW_EV_LCP_LEN -+#endif - static int - giwscan_cb(void *arg, const struct ieee80211_scan_entry *se) - { -@@ -1590,7 +1598,8 @@ - IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_macaddr); - else - IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid); -- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); -+ current_ev = iwe_stream_add_event(req->info, current_ev, end_buf, -+ &iwe, IW_EV_ADDR_LEN); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1603,11 +1612,11 @@ - if (vap->iv_opmode == IEEE80211_M_HOSTAP) { - iwe.u.data.length = vap->iv_des_nssid > 0 ? - vap->iv_des_ssid[0].len : 0; -- current_ev = iwe_stream_add_point(current_ev, -+ current_ev = iwe_stream_add_point(req->info, current_ev, - end_buf, &iwe, vap->iv_des_ssid[0].ssid); - } else { - iwe.u.data.length = se->se_ssid[1]; -- current_ev = iwe_stream_add_point(current_ev, -+ current_ev = iwe_stream_add_point(req->info, current_ev, - end_buf, &iwe, (char *) se->se_ssid+2); - } - -@@ -1621,8 +1630,8 @@ - iwe.cmd = SIOCGIWMODE; - iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ? - IW_MODE_MASTER : IW_MODE_ADHOC; -- current_ev = iwe_stream_add_event(current_ev, -- end_buf, &iwe, IW_EV_UINT_LEN); -+ current_ev = iwe_stream_add_event(req->info, current_ev, -+ end_buf, &iwe, IW_EV_UINT_LEN); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1634,8 +1643,8 @@ - iwe.cmd = SIOCGIWFREQ; - iwe.u.freq.m = se->se_chan->ic_freq * 100000; - iwe.u.freq.e = 1; -- current_ev = iwe_stream_add_event(current_ev, -- end_buf, &iwe, IW_EV_FREQ_LEN); -+ current_ev = iwe_stream_add_event(req->info, current_ev, -+ end_buf, &iwe, IW_EV_FREQ_LEN); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1645,8 +1654,8 @@ - last_ev = current_ev; - iwe.cmd = IWEVQUAL; - set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE); -- current_ev = iwe_stream_add_event(current_ev, -- end_buf, &iwe, IW_EV_QUAL_LEN); -+ current_ev = iwe_stream_add_event(req->info, current_ev, -+ end_buf, &iwe, IW_EV_QUAL_LEN); - - /* We ran out of space in the buffer */ - if (last_ev == current_ev) -@@ -1660,7 +1669,8 @@ - else - iwe.u.data.flags = IW_ENCODE_DISABLED; - iwe.u.data.length = 0; -- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, ""); -+ current_ev = iwe_stream_add_point(req->info, current_ev, -+ end_buf, &iwe, ""); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1669,28 +1679,28 @@ - memset(&iwe, 0, sizeof(iwe)); - last_ev = current_ev; - iwe.cmd = SIOCGIWRATE; -- current_val = current_ev + IW_EV_LCP_LEN; -+ current_val = current_ev + iwe_stream_lcp_len(req->info); - /* NB: not sorted, does it matter? */ - for (j = 0; j < se->se_rates[1]; j++) { - int r = se->se_rates[2 + j] & IEEE80211_RATE_VAL; - if (r != 0) { - iwe.u.bitrate.value = r * (1000000 / 2); -- current_val = iwe_stream_add_value(current_ev, -- current_val, end_buf, &iwe, -- IW_EV_PARAM_LEN); -+ current_val = iwe_stream_add_value(req->info, -+ current_ev, current_val, end_buf, -+ &iwe, IW_EV_PARAM_LEN); - } - } - for (j = 0; j < se->se_xrates[1]; j++) { - int r = se->se_xrates[2+j] & IEEE80211_RATE_VAL; - if (r != 0) { - iwe.u.bitrate.value = r * (1000000 / 2); -- current_val = iwe_stream_add_value(current_ev, -- current_val, end_buf, &iwe, -- IW_EV_PARAM_LEN); -+ current_val = iwe_stream_add_value(req->info, -+ current_ev, current_val, end_buf, -+ &iwe, IW_EV_PARAM_LEN); - } - } - /* remove fixed header if no rates were added */ -- if ((current_val - current_ev) > IW_EV_LCP_LEN) { -+ if ((current_val - current_ev) > iwe_stream_lcp_len(req->info)) { - current_ev = current_val; - } else { - /* We ran out of space in the buffer. */ -@@ -1704,7 +1714,8 @@ - iwe.cmd = IWEVCUSTOM; - snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval); - iwe.u.data.length = strlen(buf); -- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf); -+ current_ev = iwe_stream_add_point(req->info, current_ev, -+ end_buf, &iwe, buf); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1728,8 +1739,8 @@ - rsn_leader, sizeof(rsn_leader) - 1); - #endif - if (iwe.u.data.length != 0) { -- current_ev = iwe_stream_add_point(current_ev, end_buf, -- &iwe, buf); -+ current_ev = iwe_stream_add_point(req->info, -+ current_ev, end_buf, &iwe, buf); - - /* We ran out of space in the buffer */ - if (last_ev == current_ev) -@@ -1754,8 +1765,8 @@ - wpa_leader, sizeof(wpa_leader) - 1); - #endif - if (iwe.u.data.length != 0) { -- current_ev = iwe_stream_add_point(current_ev, end_buf, -- &iwe, buf); -+ current_ev = iwe_stream_add_point(req->info, -+ current_ev, end_buf, &iwe, buf); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1773,8 +1784,8 @@ - se->se_wme_ie, se->se_wme_ie[1] + 2, - wme_leader, sizeof(wme_leader) - 1); - if (iwe.u.data.length != 0) { -- current_ev = iwe_stream_add_point(current_ev, end_buf, -- &iwe, buf); -+ current_ev = iwe_stream_add_point(req->info, -+ current_ev, end_buf, &iwe, buf); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1791,8 +1802,8 @@ - se->se_ath_ie, se->se_ath_ie[1] + 2, - ath_leader, sizeof(ath_leader) - 1); - if (iwe.u.data.length != 0) { -- current_ev = iwe_stream_add_point(current_ev, end_buf, -- &iwe, buf); -+ current_ev = iwe_stream_add_point(req->info, -+ current_ev, end_buf, &iwe, buf); - - /* We ran out of space in the buffer. */ - if (last_ev == current_ev) -@@ -1815,6 +1826,7 @@ - int res = 0; - - req.vap = vap; -+ req.info = info; - req.current_ev = extra; - if (data->length == 0) { - req.end_buf = extra + IW_SCAN_MAX_DATA; - diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-request_module-build.patch b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-request_module-build.patch deleted file mode 100644 index ad338a3b7..000000000 --- a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-request_module-build.patch +++ /dev/null @@ -1,31 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=232099 -http://madwifi-project.org/changeset/3880 - -=== modified file 'include/compat.h' ---- include/compat.h 2009-01-31 16:01:16 +0000 -+++ include/compat.h 2009-01-31 16:03:33 +0000 -@@ -175,6 +175,10 @@ - #define DEV_ATH CTL_UNNUMBERED - #endif - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -+#define request_module(_fmt, _modname) request_module(_modname) -+#endif -+ - #endif /* __KERNEL__ */ - - #endif /* _ATH_COMPAT_H_ */ - -=== modified file 'net80211/ieee80211_linux.c' ---- net80211/ieee80211_linux.c 2009-01-31 16:01:16 +0000 -+++ net80211/ieee80211_linux.c 2009-01-31 16:03:09 +0000 -@@ -335,7 +335,7 @@ - { - #ifdef CONFIG_KMOD - int rv; -- rv = request_module(modname); -+ rv = request_module("%s", modname); - if (rv < 0) - printk(KERN_ERR "failed to automatically load module: %s; " \ - "errno: %d\n", modname, rv); - diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-injection-r3925.patch b/net-wireless/madwifi-ng/files/madwifi-ng-injection-r3925.patch deleted file mode 100644 index 1999184ec..000000000 --- a/net-wireless/madwifi-ng/files/madwifi-ng-injection-r3925.patch +++ /dev/null @@ -1,32 +0,0 @@ -=== modified file 'ath/if_ath.c' ---- ath/if_ath.c 2009-06-03 07:46:17 +0000 -+++ ath/if_ath.c 2009-06-03 07:53:24 +0000 -@@ -2359,6 +2359,7 @@ - ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb) - { - struct ath_softc *sc = netdev_priv(dev); -+ struct ieee80211com *ic = &sc->sc_ic; - struct ath_hal *ah = sc->sc_ah; - struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *) (skb->cb + sizeof(struct ieee80211_cb)); - const HAL_RATE_TABLE *rt; -@@ -2375,7 +2376,8 @@ - struct ieee80211_frame *wh; - - wh = (struct ieee80211_frame *) skb->data; -- try0 = ph->try0; -+ //try0 = ph->try0; -+ try0 = (ic->ic_opmode == IEEE80211_M_MONITOR) ? 1 : ph->try0; - rt = sc->sc_currates; - txrate = dot11_to_ratecode(sc, rt, ph->rate0); - power = ph->power > 60 ? 60 : ph->power; -@@ -2404,7 +2406,8 @@ - KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); - - -- if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { -+ if (IEEE80211_IS_MULTICAST(wh->i_addr1) || ((ic->ic_opmode == -+ IEEE80211_M_MONITOR) && (skb->data[1]&3) != 0x01) ) { - flags |= HAL_TXDESC_NOACK; /* no ack on broad/multicast */ - sc->sc_stats.ast_tx_noack++; - try0 = 1; - diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-r1886.patch b/net-wireless/madwifi-ng/files/madwifi-ng-r1886.patch deleted file mode 100644 index 1ee11bec1..000000000 --- a/net-wireless/madwifi-ng/files/madwifi-ng-r1886.patch +++ /dev/null @@ -1,26 +0,0 @@ -allow to inject packets with aircrack-ng - -diff -ur ath/if_ath.c ath/if_ath.c ---- ath/if_ath.c 2007-01-07 21:22:55.312500000 +0100 -+++ ath/if_ath.c 2007-01-07 21:17:09.875000000 +0100 -@@ -2289,6 +2289,7 @@ - ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb) - { - struct ath_softc *sc = dev->priv; -+ struct ieee80211com *ic = &sc->sc_ic; - struct ath_hal *ah = sc->sc_ah; - struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *) (skb->cb + sizeof(struct ieee80211_cb)); - const HAL_RATE_TABLE *rt; -@@ -2305,7 +2306,11 @@ - struct ieee80211_frame *wh; - - wh = (struct ieee80211_frame *) skb->data; -- try0 = ph->try0; -+ try0 = (ic->ic_opmode == IEEE80211_M_MONITOR) ? 1 : ph->try0; -+ /* -+ * The retry value has to be patched to 1 when injecting, -+ * otherwise the sequence number will be overwritten -+ */ - rt = sc->sc_currates; - txrate = dot11_to_ratecode(sc, rt, ph->rate0); - power = ph->power > 60 ? 60 : ph->power; diff --git a/net-wireless/madwifi-ng/madwifi-ng-0.9.4.4180.20120502.ebuild b/net-wireless/madwifi-ng/madwifi-ng-0.9.4.4180.20120502.ebuild deleted file mode 100644 index 07388169c..000000000 --- a/net-wireless/madwifi-ng/madwifi-ng-0.9.4.4180.20120502.ebuild +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/madwifi-ng-0.9.4.4165.20110816.ebuild,v 1.2 2011/10/15 23:23:34 maekke Exp $ - -EAPI="2" - -inherit linux-mod versionator - -MY_PN=${PN/-ng/} -MY_PV=$(get_version_component_range 1-3) -MY_REV=$(get_version_component_range 4) -MY_DATE=$(get_version_component_range 5) -MY_P=${MY_PN}-${MY_PV}-r${MY_REV}-${MY_DATE} -S=${WORKDIR}/${MY_P} - -DESCRIPTION="Next Generation driver for Atheros based IEEE 802.11a/b/g wireless LAN cards" -HOMEPAGE="http://www.madwifi-project.org/" -SRC_URI="http://snapshots.madwifi-project.org/${MY_PN}-${MY_PV}/${MY_P}.tar.gz" - -LICENSE="atheros-hal - || ( BSD GPL-2 )" -SLOT="0" -KEYWORDS="amd64 ~ppc x86" -IUSE="injection" - -RDEPEND="!net-wireless/madwifi-old - net-wireless/wireless-tools - ~net-wireless/madwifi-ng-tools-${PV}" - -pkg_setup() { - CONFIG_CHECK="CRYPTO WIRELESS_EXT SYSCTL" - kernel_is lt 2 6 29 && CONFIG_CHECK="${CONFIG_CHECK} KMOD" - ERROR_CRYPTO="${P} requires Cryptographic API support (CONFIG_CRYPTO)." - ERROR_WIRELESS_EXT="${P} requires CONFIG_WIRELESS_EXT selected by Wireless LAN drivers (non-hamradio) & Wireless Extensions" - kernel_is gt 2 6 33 && \ - ERROR_WIRELESS_EXT="${P} requires CONFIG_WIRELESS_EXT selected by some Wireless LAN drivers (e.g CONFIG_IPW2100)" - ERROR_SYSCTL="${P} requires Sysctl support (CONFIG_SYSCTL)." - ERROR_KMOD="${F} requires CONFIG_KMOD to be set to y or m" - BUILD_TARGETS="all" - MODULESD_ATH_PCI_DOCS="README" - linux-mod_pkg_setup - - MODULE_NAMES='ath_hal(net:"${S}"/ath_hal) - wlan(net:"${S}"/net80211) - wlan_acl(net:"${S}"/net80211) - wlan_ccmp(net:"${S}"/net80211) - wlan_tkip(net:"${S}"/net80211) - wlan_wep(net:"${S}"/net80211) - wlan_xauth(net:"${S}"/net80211) - wlan_scan_sta(net:"${S}"/net80211) - wlan_scan_ap(net:"${S}"/net80211) - ath_rate_amrr(net:"${S}"/ath_rate/amrr) - ath_rate_onoe(net:"${S}"/ath_rate/onoe) - ath_rate_sample(net:"${S}"/ath_rate/sample) - ath_rate_minstrel(net:"${S}"/ath_rate/minstrel) - ath_pci(net:"${S}"/ath)' - - BUILD_PARAMS="KERNELPATH=${KV_OUT_DIR}" -} - -src_prepare() { - use injection && epatch "${FILESDIR}"/${PN}-injection-r3925.patch - for dir in ath ath_hal net80211 ath_rate ath_rate/amrr ath_rate/minstrel ath_rate/onoe ath_rate/sample; do - convert_to_m "${S}/${dir}/Makefile" - done - sed -e 's:-Werror ::' -i Makefile.inc || die "sed -Werror failed" - make svnversion.h || die -} - -src_install() { - linux-mod_src_install - dodoc README THANKS SNAPSHOT || die -} - -pkg_postinst() { - local moddir="${ROOT}/lib/modules/${KV_FULL}/net/" - - linux-mod_pkg_postinst - - einfo - einfo "Interfaces (athX) are now automatically created upon loading the ath_pci" - einfo "module." - einfo - einfo "The type of the created interface can be controlled through the 'autocreate'" - einfo "module parameter." - einfo - einfo "As of net-wireless/madwifi-ng-0.9.3 rate control module selection is done at" - einfo "module load time via the 'ratectl' module parameter." - - elog "Please note: This release is based off of 0.9.3.3 and NOT trunk." - elog "# No AR5007 support in this release;" - elog "experimental support is available for i386 (32bit) in #1679" - elog "# No AR5008 support in this release; support is available in trunk " - elog "No, we will not apply the patch from 1679, if you must, please do so - in an overlay on your system. That is upstreams ticket 1679, not Gentoo's." -} diff --git a/sys-apps/clsd-templates/Manifest b/sys-apps/clsd-templates/Manifest deleted file mode 100644 index 377e4c38e..000000000 --- a/sys-apps/clsd-templates/Manifest +++ /dev/null @@ -1 +0,0 @@ -EBUILD clsd-templates-2.2.9999.ebuild 565 SHA256 38c94b60025153683dde4a480d2b3b7b74c68e7d5694f3b5421ee7fb2d21d508 SHA512 7519166d7c97abf045c9b1f09bc526ce53df39a2fc975ac8c3368f7a4372d170eb7d3182c30ce63140ced0e883755692134648b884cfcf2b7008bf07ebcc5a7d WHIRLPOOL 4d254c9fe3031ce5c9afb8152c7a8258072e96033b95e618aa265a974e9fad1a19258acd4e4bc4b0f36fd6292de9b0994a4aa38d2eb83fa937486a06ff451acd diff --git a/sys-apps/clsd-templates/clsd-templates-2.2.9999.ebuild b/sys-apps/clsd-templates/clsd-templates-2.2.9999.ebuild deleted file mode 100644 index c42302bed..000000000 --- a/sys-apps/clsd-templates/clsd-templates-2.2.9999.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="3" - -inherit git-2 - -EGIT_REPO_URI="git://github.com/RodionD/CLsD-templates.git" - -DESCRIPTION="Templates for calculate linux small desktop" -HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2" -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -DEPEND="!=sys-apps/calculate-lib-2.2.0.0_rc1" - -RDEPEND="${DEPEND}" - -src_compile() { -: -} - -src_install() { - dodir /var/calculate/templates - insinto /var/calculate/templates - doins -r * -} diff --git a/sys-apps/silentbob/ChangeLog b/sys-apps/silentbob/ChangeLog deleted file mode 100644 index 18e609202..000000000 --- a/sys-apps/silentbob/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for sys-apps/silentbob -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*silentbob-2.4.1 (26 Oct 2010) - - 26 Oct 2010; Alexander Tratsevskiy (L'autre) - +silentbob-2.4.1.ebuild: - version bump - diff --git a/sys-apps/silentbob/Manifest b/sys-apps/silentbob/Manifest deleted file mode 100644 index eb885c2e0..000000000 --- a/sys-apps/silentbob/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -DIST silentbob-2.4.1.tar.gz 147347 SHA256 790a34c118816a5bf87c155b49c1c7cbcb1727a52268e2ebe27e3b0d58ba2bfc SHA512 a34c56ad76db1c0c58879f6d07d9dca53cc5735685cca21bff75cb7aeb32947140ca260ab54ed4feff2d9a5a616474882c47940c56684b3d1fb7b400cd8cf296 WHIRLPOOL cc5f9d3f226138886403f0fd3ebaa31593b5369d20e5951ac32f231df58cda265d2593e3cb75ab8ec26f88f520c17f361a4b8f1c91b2674c793360c2281741cb -DIST silentbob-2.7.2.tar.bz2 124182 SHA256 6a43271f90faa8f3552a001d1a297eeb2efebc5a57b73ed4255c25fd1ae51285 SHA512 4ef695447f2e2b78a5cad11a495195c930ab0046047709da28bda5a477bb7305d1a221c364d8342ce733c9366a259f073022bba6a55daf25e5579c00b6f03ed2 WHIRLPOOL c39ecde1b571c205f5387a0d56488b43d3ab8017824e647f7cecc1a8913f76ae2239348cf51bf5b949e082c8d3107c8c49eb4cf5ad956d6e28e2d1b9a3f40f8b -EBUILD silentbob-2.4.1.ebuild 631 SHA256 511569ff130527b75a400c6c810f1ac62b9b1ff46faf44bfd97af93d90083de7 SHA512 0e73501f2be76f9fe44a03218b7f547a6e48f2ec06e7487b308c98ae92be330872ac0579f8d4a1e78eb435cc2476fda62498f1de9136cc893437a9859ca5d028 WHIRLPOOL 7de3262bc95983ff8bc2ee02443eb7a9e3f213a67822dcb0d8b829f26ba5a877c865a5399647c8cbeb8f16d059372041fa5a3fa9fe033d3f7c14ecdb2b4320b6 -EBUILD silentbob-2.7.2.ebuild 412 SHA256 3e80919fb0d1c448fe2b3a8d1b96cfcc9ded79a7b743f3d02b5b03231eb629dc SHA512 a24cac942b2423aa8fb8b779f2afd853ec6b6d52e111a654341a08b57703a1819f2ba2606a96a7227eee20cae6c6f2071dd9057685cd553721dd45a44cf28697 WHIRLPOOL 32abf2f328b9e255ac9dca4c9f2dfd5376569b3d6518e14ef309f591d4a805f581d59557f927671a2a04ab42325c1c006296bf0d60f2826ee36ea9a080633cc9 -MISC ChangeLog 259 SHA256 4841599dfc1b1fd00cdadcbd7f9254c394eaf9967a4f83248e415c2eac3a0121 SHA512 2efc551e31ddd11a7eff584c250423c12c7b4dc8416d930f533cf436e4440fb28e8e962bf068605481e7ae24793ee6b41fafeebb3b98d32d9aa5f3cd625e4043 WHIRLPOOL ef7ae04c3c94353e0a021baa99b66c099308537af879eee1586fb2d5c708fe6e82e502def416e4e2364645792df77d22d318aae57af52da6e8a442368d662d72 diff --git a/sys-apps/silentbob/silentbob-2.4.1.ebuild b/sys-apps/silentbob/silentbob-2.4.1.ebuild deleted file mode 100644 index fc5e6e78d..000000000 --- a/sys-apps/silentbob/silentbob-2.4.1.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/ctags/ctags-5.8.ebuild,v 1.1 2009/11/16 21:59:58 spatz Exp $ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=2 -inherit cmake-utils - -DESCRIPTION="The SilentBob is yet another indexing tool helping you to find your way through the software source code" -HOMEPAGE="http://silentbob.sf.net" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - diff --git a/sys-apps/silentbob/silentbob-2.7.2.ebuild b/sys-apps/silentbob/silentbob-2.7.2.ebuild deleted file mode 100644 index f694a915a..000000000 --- a/sys-apps/silentbob/silentbob-2.7.2.ebuild +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=2 -inherit cmake-utils - -DESCRIPTION="The SilentBob is yet another indexing tool helping you to find your way through the software source code" -HOMEPAGE="http://silentbob.sf.net" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest deleted file mode 100644 index d36c683e6..000000000 --- a/x11-drivers/nvidia-drivers/Manifest +++ /dev/null @@ -1,24 +0,0 @@ -AUX 09nvidia 61 SHA256 14702d6726cc9f0ad832a3cc90059999eb956f9e3a35397cb63cfa6347b33e39 SHA512 14c47fa164bde3422b64224e3e46e0a6097599de6193b6d36eb162271d41130f0498f6aee09f5cb60fe43727bf74051f9127afa1b4af42efc28d40af2e4fa86f WHIRLPOOL 34bc9975d132da84506a61a119a5d8d8b5be35af5c1511b5e3228fa3d9f0f3b7f84821c0ab09252054d1471ac7901522309d440c82342d6dfdd2beb73f680460 -AUX NVIDIA_glx-defines.patch 437 SHA256 0007f3d962edb87da4788ce58869679c1b10f28223a6bf1c23696fede57305da SHA512 a9cbbe5d5d362db0eb92d5b9fe87f28cccb600df9b44ae2b323ed08da97c32d6a4a0553c7c82ea3777ab91a1a4bf6b74f04d89b6ec28e60565e677cc4af48351 WHIRLPOOL a826b11c86803530346a65612ebd1a12f77f6c6ba1d93af597435993086451648b825fbc245a2c5850e0680c58129924843744d7e29013d5087c3b4dd9fefb14 -AUX NVIDIA_glx-glheader.patch 380 SHA256 f630e24067bf6199a64f8fe8c5d6fc158cb4b153bda65ffc3f97b36a9cb08faf SHA512 366ebbe967001f4d694e9d6ae61fbd8b57e2946bba495894936809634bb87bd6ba6b10689969977e4d0eaba6983c16fe8d78830112b5b28f01c78381a0a095d6 WHIRLPOOL 8609fcedb439299189d9d05606a290a63de8b207bab855f874faa36e892396f41159d26e505dfead89fdac9d7e61aeeb50b16877aa14ad62dc3cd617353d7d60 -AUX eblits/donvidia.eblit 695 SHA256 d404dd7e5657d83ccf3687720fb978030a3716e47957fb8bb80dea3ed57b3672 SHA512 606d2a496ddae2ac89d3ac0ce5b80bac90cabfe74d6b29c577ab047c3b83ce8965bb4b91b29f37bf55d4f34eaab623ac886760920efb9d306d3904cb3b51291c WHIRLPOOL e0a945c4cbaa0514e19eecf8faa4daaa76c8fc6392fb9a2a607e011e7994c535a3ba4b024de9ee9f4f34c7d4e0d48a0c3315f4cf9687be05fb577ec8dd3c0fe2 -AUX eblits/mtrr_check.eblit 629 SHA256 ae1b8fb37985fc3e42a4a776779b3fe3d70be2c826df5c3f99d03ba7209ca0b1 SHA512 db1bcee808c616536e21f98d65cd0c2b64b26b8b0db827decfc8fe12b031431bf961f1f2016a22170b9400672aeb508f548a66c15018570b44fe1cd535692f86 WHIRLPOOL 4f4961dc5aa71f273871f9171f485aaf5dd27906a564e1967b9298362b2302d9b137a757c6e6918b4b3d1efef75b0ed266f08d83c898e0a1f2b47653e1ca7335 -AUX eblits/src_install-libs.eblit 3472 SHA256 6f301de374736cec316794bf1935a15de025b3c505981f24e06e3df75818ad6a SHA512 f3dd0cb69276cec6f2b7cbb452c77c8e0a82fc37514c31a21fb9a251e38027e4adfdda6ca8b1897635897608a0e70c81f03ff88466a7db1387ed7a4241924ce8 WHIRLPOOL a2e84fba09347bec9b27129f02311696938ad5ca61fa7ff8d9efa10ad9c63a01a622cba1d08b1e166c737e88b50add234c7c0d59b88e5b64442269a7dd47cbf8 -AUX eblits/want_tls.eblit 952 SHA256 e5ce767a2e9a5c0682e764b9ba42a20e721a093f4c0626605570c8b5e3afecd0 SHA512 eafa21a324f095e3d80ac0385c1a5159011a57e3aa2465927c71524c6329147f2ee804f6b0772d4ad97083637451df397be0da748d8674d5be42b308fb25ae2d WHIRLPOOL 8291d0fa548518926252fafabaa0ebbfd7ac165b380650beeed17c86918f95d658a3daadab6c4bde0adbdf1ce7b63a88ed6135cfcf9dceb4798f0b1ccefc8fcc -AUX libGL.la-r2 733 SHA256 4856e7a2c31763ade41c93a395f3e80a2705ac2ab4dbd73e5161cdba132f407b SHA512 52fbc3d704274fc5403b95a5d696824684302f4a77e0b08d5a59850435b12d9bdc4cf931f346f91e950f246cc342e0a673e7657cc2cea95e991ed3aab8c1c928 WHIRLPOOL 6a0006277a8444b4b5191a7e07c972efde43c3a9ff8a7286d1d1f78c69c3ba394572f31716b684f1e28355572a6e9f9cbd5437bb9dba127d727f8789fbd2a980 -AUX nvidia 1510 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5 SHA512 4ffdf49c2634b261be122a0016b0f69d30db6fe4b4a29767cfeee2e1d60671e7e6fc5e5c3a237b351a4def64404db121cf296a0cdb6e1bbd4f8e78ab40587000 WHIRLPOOL faab4c87940e4703b2a30f284cae34bdf4ac486cb1d402b5bd91ef65c23f443c2c961ad914fbcbd5258dd5bbaeee583f189fcf5fc14f2b9925c8ccfa0fc422c7 -AUX nvidia-169.07 639 SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f WHIRLPOOL 626ae3c01c879e0cfe05bd373e0b9dfd6f462dd9ef6ae94a7d60276fe2d17c57fbb20aaa4d2a186a0ffc2a860076692aac854d00a3545bc9736e7bb8d0581055 -AUX nvidia-drivers-173.14.30-2.6.39.patch 599 SHA256 f1528152fb786d74701bd5d99ccbabad0b1ac791958d83c17bf783484dda9474 SHA512 63a0ee5c2c005e3088ef9bf651e8c2a916d7533fec4a64523400d75f5a585a3dd5c1561a1323b9a21e3b026c91c0b26cb5b1d4af1c5497e8b6b3de8e465b0e52 WHIRLPOOL d188c2527aebf69bb6414f0c3c01ee6984abf481cff2a7165aecc9b92f470b8c9e461ea5510c0c4be1f8b96eaa6f159402eb2d85deee3b8ce5ddb30790f8353e -DIST NVIDIA-FreeBSD-x86-173.14.31.tar.gz 17991684 SHA256 98699bc8dc1dad86cebc2ed067b4fc5cd37b8540e897bb218f38ac80c4b4d875 -DIST NVIDIA-FreeBSD-x86-173.14.37.tar.gz 19603409 SHA256 568109656f95791448306d55e7732ca5f963c8ecd06cb0bf8c41c8b75d8eaa44 SHA512 86bd796210b18d634d6733f1d4fd3fefa91cffdd2be5ad0c9712f04c8740b8f9446e9ef04daf44d7cc8d5a491c1d34060837a8bdff5e7be2c390897049ee601b WHIRLPOOL 64c4ebe9e0ab8abb8c136a8aa9a0c7546958e54cdb229dca96a469356d56e1e74dcb9e5913472a8306b0cd17454bb8da5d688453b318e328419c529e6f820b26 -DIST NVIDIA-FreeBSD-x86-96.43.20.tar.gz 14060884 SHA256 e75fce272e72644d53e6ad3c0957fe173735a4b621726ce227ba8ecf9bd9c5cf -DIST NVIDIA-Linux-x86-173.14.31-pkg0.run 13407481 SHA256 e855a62f16a9d0eff1bf470a8fcedd48cd1b718e969ad5ebe89a557d039d1924 -DIST NVIDIA-Linux-x86-173.14.37-pkg0.run 14765478 SHA256 0c16885a1d8c370f85be73fe2ebb1e74c0e23932b349ca381b02c2b67ab9371a SHA512 0329bb7a971a93982be2626661d6f3faeede19ce6fef603afc85cce74cea1d5ffd7c93091c4e82de60a5a54d869b47cb2014677ae64081d234d7eb0745e01937 WHIRLPOOL dd558a6ef3a08d7cd1471c25b2d2b533f0a4631e58705d01eedf13b66a134797a07d8e7377313b9cdd55edcf1344c58e6f225998cb593f8eb6e26846a62dfb5d -DIST NVIDIA-Linux-x86-96.43.20-pkg0.run 10323541 SHA256 bc778062cf745ee4916de77a702f702312d33eeb3b6f379b63e4366fa5197517 SHA512 6fd8218dde3f3a3b49e83cd2e9df6aff502d17483ac5687c4f7009671a456bda008c12cde7d73a9d9999e6da777fe58f6093791cd7e7b10113c4a91deb1340fb WHIRLPOOL fd8e54f171bbf004eea9e7ea9bf0ad49386173e357221679f7144f6c9ec11d37d717f9b764a24a37bc10864b37e937a5dd7fd68319aa3e10edcdb835c4a2b1b0 -DIST NVIDIA-Linux-x86_64-173.14.31-pkg2.run 18967067 SHA256 c56cfe43c4fa95102d099e4f1c4e75e58b57d73b4b36a858d54a2a339aad56d9 SHA512 fcb3f004495c8e3ef93b4229b2b64e8ee83a12f2cc5ba1c33bf486b6bf8687e1e1d5b45c2da8721422f6c2190150f7f86bd4b9ec0987d4440343fafb9e18c208 WHIRLPOOL 585728e3d03b1a9cf90fd80c413f2dd432870f49df60bd1335ec0c7143b59005819b4fd655587b0f76d19c28eaa946d6893c4358b8ec7e33000486429684cd1f -DIST NVIDIA-Linux-x86_64-173.14.37-pkg2.run 20647769 SHA256 3e34a48cf4143469e6ae60c792932b5e920d7244ed374eb818d5d72af94a7809 SHA512 618a4379694a3102a7c0487c552aca3664639c45432b64aadac9f90c0e9dcad4de82b0dec15f7fdf03b2b222713133ee9f4a936755915d38a2c2fef0bc97f342 WHIRLPOOL 9ed7b65a26b6f846d0ec1aeb1eb051331e808c6791ace7324951bdf20861701fc1b9c9cbc00cacd9d86c9d9568509069d9ecf35b7fd8d1c5b5dc0e3ef9c3db0a -DIST NVIDIA-Linux-x86_64-96.43.20-pkg2.run 14572507 SHA256 562107a262e250b836966e29851628f6162ee2857d53252221c780d9b201de18 SHA512 ca89961463bc705b1aa0e5fcbb284317e60e455d444035ba8f6a44cb3884f3a4b4c98ed5a37465d6f70a0eb6578a7d865b25f15a6b6f48bdbcb5aaca6e541623 WHIRLPOOL 873e32237ee1441625c1335e1d325649f139306a49bc87fc25afe81ec37671984a2f0bb904b2d7b435d5ceb52572740bb910fac32853627ce5583655178674dc -EBUILD nvidia-drivers-173.14.31-r1.ebuild 15352 SHA256 0f916d53e884cac2ad2694608f53a29d794a1b65c26923334b836f47dd05913e SHA512 5e42bc807b2dedcb7190d3e25cf032e6713af882ecd0feb7f49245b8cecbac9764a48a3e74505335c63599f1951562bcd3e7626832d8b5f0fe7d5bd3c19dd936 WHIRLPOOL a0021ccba71f4e6d994fd73594bdc84c1f2a0780fb0befe0c3ec0c144ef20a167bdd96856c88fe11d2e9c0a74f7b8e272170647fe54a43fa50c7bd92d823e686 -EBUILD nvidia-drivers-173.14.37.ebuild 17185 SHA256 719d367f9036335ca2c3a61f79ec3858544260f61794b2ed4fe835e9e8c23434 SHA512 1d7e777861d2b232d3a20ffdbb05609ba64696600f7af5c8e35f2ff2d09a2faf7da70de4213fcb427e8101eec80584f22a8f0021ebcc6f397b3b57ccf2f0fd8d WHIRLPOOL ef62cd12ce9277b6712dcb0047587511d1397f0cfd1c4afd0ad21e791055909d9658401684a4fedb057b59f7bc5cb5c92d67c68d0328bdf2f33d8308a96af822 -EBUILD nvidia-drivers-96.43.20-r1.ebuild 15590 SHA256 d42d48818300b166c67717ccbd6c7dfa00bcfcaeb252f963d4fae99bb4fa299c SHA512 c07fbe1a9d388d8b8df1c3ff85d3eb2b1ec62a1f8c6ee4b17b01a6e78f032de7a22bc0d64959a8fd22a2ccfaf335ddbe9ae1dbbc495c74512cd617033fb648e8 WHIRLPOOL 622faba8dd30801b3146a806a9b4da5681417131bb8cac6bb55da17c0da0d95497191942c922dcf7384efa78c4bdb3866a90ce05c13f98a87915b51653940cee -MISC metadata.xml 528 SHA256 3651e308046ad88e101ed9d59fd0cd1adc82bfcc25f4f70738936466174e6264 SHA512 f3f8cd03f24324439a3701f3014e16940bbf3c496641189859906247d6999873dca48ecb99e73af4521c46f62e1fc7e09b6b1443fc95db6d5ecb0f680bcca65c WHIRLPOOL 9597b9f7960dc9aee8fdab800fc034b8814479f56ba671f0afdfd6106d89a6f94be18e8f79fb9549e22cafec4a6c456bda356f81f1343f6ef25d568ad81e2a80 diff --git a/x11-drivers/nvidia-drivers/files/09nvidia b/x11-drivers/nvidia-drivers/files/09nvidia deleted file mode 100644 index 1fcbef41f..000000000 --- a/x11-drivers/nvidia-drivers/files/09nvidia +++ /dev/null @@ -1,2 +0,0 @@ -# Has to precede X11's own libraries! -LDPATH=/opt/nvidia/lib diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch deleted file mode 100644 index da9933f63..000000000 --- a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h ---- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100 -+++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100 -@@ -39,6 +39,7 @@ - typedef XID GLXPixmap; - typedef XID GLXDrawable; - typedef XID GLXPbuffer; -+typedef XID GLXPbufferSGIX; - typedef XID GLXWindow; - typedef XID GLXFBConfigID; - diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch deleted file mode 100644 index e0393e1b9..000000000 --- a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000 -+++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000 -@@ -66,6 +66,10 @@ - typedef double GLclampd; - typedef void GLvoid; - -+/* Patching for some better defines in the global system */ -+#ifndef GL_GLEXT_LEGACY -+#include -+#endif - - /*************************************************************/ - diff --git a/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit deleted file mode 100644 index 75b39cfbd..000000000 --- a/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ - -# Install nvidia library: -# the first parameter is the place where to install it -# the second parameter is the base name of the library -# the third parameter is the provided soversion -donvidia() { - dodir $1 - exeinto $1 - - libname=$(basename $2) - - # libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully - if [ -e $2.$3 ] ; then - doexe $2.$3 - dosym ${libname}.$3 $1/${libname} - [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 - fi -} diff --git a/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit deleted file mode 100644 index b14df34b1..000000000 --- a/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ - -mtrr_check() { - ebegin "Checking for MTRR support" - linux_chkconfig_present MTRR - eend $? - - if [[ $? -ne 0 ]] ; then - eerror "Please enable MTRR support in your kernel config, found at:" - eerror - eerror " Processor type and features" - eerror " [*] MTRR (Memory Type Range Register) support" - eerror - eerror "and recompile your kernel ..." - die "MTRR support not detected!" - fi -} diff --git a/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit deleted file mode 100644 index e48d11ce9..000000000 --- a/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distribnuted under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ -# -src_install-libs() { - local pkglibdir=lib - local inslibdir=$(get_libdir) - - if [[ ${#} -eq 2 ]] ; then - pkglibdir=${1} - inslibdir=${2} - elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then - pkglibdir=lib32 - fi - - local usrpkglibdir=usr/${pkglibdir} - local libdir=usr/X11R6/${pkglibdir} - local drvdir=${libdir}/modules/drivers - local extdir=${libdir}/modules/extensions - local incdir=usr/include/GL - local sover=${PV} - local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" - local NO_TLS_ROOT="${NV_ROOT}/no-tls" - local TLS_ROOT="${NV_ROOT}/tls" - local X11_LIB_DIR="/usr/${inslibdir}/xorg" - - if use x86-fbsd; then - # on FreeBSD everything is on obj/ - pkglibdir=obj - usrpkglibdir=obj - x11pkglibdir=obj - drvdir=obj - extdir=obj - - # don't ask me why the headers are there.. glxext.h is missing - incdir=doc - - # on FreeBSD it has just .1 suffix - sover=1 - fi - - # The GLX libraries - donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} - donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} - - donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover} - - dodir ${NO_TLS_ROOT} - donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} - - if ! use x86-fbsd; then - donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} - fi - - if want_tls ; then - dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib - dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib - dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib - else - dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib - dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib - dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib - fi - - if ! use x86-fbsd; then - # Install the .la file for libtool, to prevent e.g. bug #176423 - [ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" - local ver1=$(get_version_component_range 1) - local ver2=$(get_version_component_range 2) - local ver3=$(get_version_component_range 3) - sed -e "s:\${PV}:${PV}:" \ - -e "s:\${ver1}:${ver1}:" \ - -e "s:\${ver2}:${ver2}:" \ - -e "s:\${ver3}:${ver3}:" \ - -e "s:\${libdir}:${inslibdir}:" \ - "${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la - fi - - exeinto ${X11_LIB_DIR}/modules/drivers - - [[ -f ${drvdir}/nvidia_drv.so ]] && \ - doexe ${drvdir}/nvidia_drv.so - - insinto /usr/${inslibdir} - [[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ - doins ${libdir}/libXvMCNVIDIA.a - exeinto /usr/${inslibdir} - # fix Bug 131315 - [[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ - doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ - dosym libXvMCNVIDIA.so.${PV} \ - /usr/${inslibdir}/libXvMCNVIDIA.so - - exeinto ${NV_ROOT}/extensions - [[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ - newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so - [[ -f ${extdir}/libglx.so.${sover} ]] && \ - newexe ${extdir}/libglx.so.${sover} libglx.so - - # Includes - insinto ${NV_ROOT}/include - doins ${incdir}/*.h - - #cuda - if [[ -f usr/include/cuda/cuda.h ]]; then - dodir /usr/include/cuda - insinto /usr/include/cuda - doins usr/include/cuda/*.h - - if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then - dolib.so usr/${pkglibdir}/libcuda.so.${PV} - dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1 - dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so - fi - fi -} diff --git a/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit deleted file mode 100644 index 4debb85d3..000000000 --- a/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $ - -want_tls() { - # For uclibc or anything non glibc, return false - has_version sys-libs/glibc || return 1 - - # Old versions of glibc were lt/no-tls only - has_version '=sys-libs/glibc-2.3.5' ; then - case ${CHOST/-*} in - i486|i586) return 1 ;; - esac - fi - - # These versions built linuxthreads version to support tls, too - has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 - - return 1 -} diff --git a/x11-drivers/nvidia-drivers/files/libGL.la-r2 b/x11-drivers/nvidia-drivers/files/libGL.la-r2 deleted file mode 100644 index 863d18441..000000000 --- a/x11-drivers/nvidia-drivers/files/libGL.la-r2 +++ /dev/null @@ -1,32 +0,0 @@ -# libGL.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libGL.so.1' - -# Names of this library. -library_names='libGL.so.${PV} libGL.so.1 libGL.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl' - -# Version information for libGL. -current=${ver1} -age=${ver2} -revision=${ver3} - -# Is this an already installed library? -installed=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/${libdir}' diff --git a/x11-drivers/nvidia-drivers/files/nvidia b/x11-drivers/nvidia-drivers/files/nvidia deleted file mode 100644 index 7cf0f7c07..000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia +++ /dev/null @@ -1,40 +0,0 @@ -# Nvidia drivers support -alias char-major-195 nvidia -alias /dev/nvidiactl char-major-195 - -# To tweak the driver the following options can be used, note that -# you should be careful, as it could cause instability!! For more -# options see /usr/share/doc/PACKAGE/README -# -# To enable Side Band Adressing: NVreg_EnableAGPSBA=1 -# -# To enable Fast Writes: NVreg_EnableAGPFW=1 -# -# To enable both for instance, uncomment following line: -# -#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1 -# If you have a mobile chip, you may need to enable this option -# if you have hard lockups when starting X. -# -# See: Appendix I. Configuring your laptop -# In /usr/share/doc/PACKAGE/README for full details -# -# Choose the appropriate value for NVreg_Mobile from the table: -# Value Meaning -# ---------- -------------------------------------------------- -# 0xFFFFFFFF let the kernel module autodetect the correct value -# 1 Dell laptops -# 2 non-Compal Toshiba laptops -# 3 all other laptops -# 4 Compal Toshiba laptops -# 5 Gateway laptops -# -#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3 - - -# !!! SECURITY WARNING !!! -# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW -# WHAT YOU ARE DOING. -# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, -# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. -options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07 deleted file mode 100644 index a96b0cd1e..000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-169.07 +++ /dev/null @@ -1,14 +0,0 @@ -# Nvidia drivers support -alias char-major-195 nvidia -alias /dev/nvidiactl char-major-195 - -# To tweak the driver the following options can be used, note that -# you should be careful, as it could cause instability!! For more -# options see /usr/share/doc/PACKAGE/README -# -# !!! SECURITY WARNING !!! -# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW -# WHAT YOU ARE DOING. -# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, -# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. -options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-173.14.30-2.6.39.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173.14.30-2.6.39.patch deleted file mode 100644 index de93e0bed..000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-173.14.30-2.6.39.patch +++ /dev/null @@ -1,14 +0,0 @@ -linux/smp_lock.h no longer exists in linux-2.6.39+ - ---- a/usr/src/nv/nv-linux.h -+++ b/usr/src/nv/nv-linux.h -@@ -87,7 +87,9 @@ - #if !defined(KERNEL_2_4) - #include /* suser(), capable() replacement */ - #include /* module_param() */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) - #include /* kernel_locked */ -+#endif - #include /* flush_tlb(), flush_tlb_all() */ - #include /* page table entry lookup */ - #endif diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml deleted file mode 100644 index 9728ae80b..000000000 --- a/x11-drivers/nvidia-drivers/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - cardoe@gentoo.org - General maintainer and POC with NVIDIA - - - jer@gentoo.org - - - spock@gentoo.org - Focused on CUDA and new kernel support - -NVIDIA X11 driver and GLX libraries - diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31-r1.ebuild deleted file mode 100644 index ada887ca3..000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31-r1.ebuild +++ /dev/null @@ -1,497 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.31.ebuild,v 1.3 2011/11/15 09:06:50 chainsaw Exp $ - -EAPI="5" - -inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver - -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" - -DESCRIPTION="NVIDIA X11 driver and GLX libraries" -HOMEPAGE="http://www.nvidia.com/" -SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) - amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) - x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" - -LICENSE="NVIDIA" -SLOT="0" -KEYWORDS="-* amd64 x86 ~x86-fbsd" -IUSE="acpi custom-cflags gtk multilib kernel_linux" -RESTRICT="strip" -EMULTILIB_PKG="true" - -COMMON="=sys-libs/glibc-2.6.1 ) - multilib? ( app-emulation/emul-linux-x86-opengl ) - >=app-admin/eselect-opengl-1.0.9" -DEPEND="${COMMON} - kernel_linux? ( virtual/linux-sources )" -RDEPEND="${COMMON} - acpi? ( sys-power/acpid )" -PDEPEND="gtk? ( media-video/nvidia-settings )" - -QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/xorg/modules/drivers/nvidia_drv.so - usr/lib/libcuda.so.${PV} - usr/lib/libnvidia-cfg.so.${PV} - usr/lib/libvdpau_nvidia.so.${PV} - usr/lib/libXvMCNVIDIA.so.${PV}" - -QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko - usr/lib/opengl/nvidia/lib/libGL.so.1 - usr/lib/opengl/nvidia/lib/libGLcore.so.1 - usr/lib/libnvidia-cfg.so.1 - usr/lib/opengl/nvidia/extensions/libglx.so.1 - usr/lib/xorg/modules/drivers/nvidia_drv.so" - -QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib32/libcuda.so.${PV} - usr/lib32/libvdpau_nvidia.so.${PV}" - -QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/xorg/modules/drivers/nvidia_drv.so - usr/lib/libXvMCNVIDIA.a:NVXVMC.o" - -QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/libnvcompiler.so.${PV} - usr/lib64/libXvMCNVIDIA.so.${PV} - usr/lib64/libXvMCNVIDIA.a:NVXVMC.o - usr/lib64/libnvidia-cfg.so.${PV} - usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib64/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib64/xorg/modules/drivers/nvidia_drv.so - usr/bin/nvidia-smi - usr/bin/nvidia-xconfig" - -QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/libXvMCNVIDIA.a" - -QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" - -QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" - -QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} - usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib32/libvdpau_nvidia.so.${PV} - usr/lib64/libXvMCNVIDIA.so.${PV} - usr/lib64/libcuda.so.${PV} - usr/lib64/libnvidia-cfg.so.${PV} - usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib64/xorg/modules/drivers/nvidia_drv.so - usr/lib64/libvdpau_nvidia.so.${PV} - usr/bin/nvidia-smi - usr/bin/nvidia-xconfig" - -QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} - usr/lib/libnvidia-cfg.so.${PV} - usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/xorg/modules/drivers/nvidia_drv.so - usr/lib/libXvMCNVIDIA.so.${PV} - usr/lib/libvdpau_nvidia.so.${PV} - usr/bin/nvidia-smi - usr/bin/nvidia-xconfig" - -if use x86; then - PKG_V="-pkg0" - NV_PACKAGE="${X86_NV_PACKAGE}" -elif use amd64; then - PKG_V="-pkg2" - NV_PACKAGE="${AMD64_NV_PACKAGE}" -elif use x86-fbsd; then - PKG_V="" - NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" -fi - -S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" - -mtrr_check() { - ebegin "Checking for MTRR support" - linux_chkconfig_present MTRR - eend $? - - if [[ $? -ne 0 ]] ; then - eerror "Please enable MTRR support in your kernel config, found at:" - eerror - eerror " Processor type and features" - eerror " [*] MTRR (Memory Type Range Register) support" - eerror - eerror "and recompile your kernel ..." - die "MTRR support not detected!" - fi -} - -lockdep_check() { - if linux_chkconfig_present LOCKDEP; then - eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." - eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" - eerror "which will prevent ${P} from compiling." - eerror "Please make sure the following options have been unset:" - eerror " Kernel hacking --->" - eerror " [ ] Lock debugging: detect incorrect freeing of live locks" - eerror " [ ] Lock debugging: prove locking correctness" - eerror " [ ] Lock usage statistics" - eerror "in 'menuconfig'" - die "LOCKDEP enabled" - fi -} - -pkg_setup() { - # try to turn off distcc and ccache for people that have a problem with it - export DISTCC_DISABLE=1 - export CCACHE_DISABLE=1 - - if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then - eerror "This ebuild doesn't currently support changing your default abi." - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" - fi - - if use kernel_linux; then - linux-mod_pkg_setup - MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" - mtrr_check - lockdep_check - fi - - # On BSD userland it wants real make command - use userland_BSD && MAKE="$(get_bmake)" - - export _POSIX2_VERSION="199209" - - # Since Nvidia ships 3 different series of drivers, we need to give the user - # some kind of guidance as to what version they should install. This tries - # to point the user in the right direction but can't be perfect. check - # nvidia-driver.eclass - nvidia-driver-check-warning - - # set variables to where files are in the package structure - if use kernel_FreeBSD; then - NV_DOC="${S}/doc" - NV_EXEC="${S}/obj" - NV_LIB="${S}/obj" - NV_SRC="${S}/src" - NV_MAN="${S}/x11/man" - NV_X11="${S}/obj" - NV_X11_DRV="${NV_X11}" - NV_X11_EXT="${NV_X11}" - NV_SOVER=1 - elif use kernel_linux; then - NV_DOC="${S}/usr/share/doc" - NV_EXEC="${S}/usr/bin" - NV_LIB="${S}/usr/lib" - NV_SRC="${S}/usr/src/nv" - NV_MAN="${S}/usr/share/man/man1" - NV_X11="${S}/usr/X11R6/lib" - NV_X11_DRV="${NV_X11}/modules/drivers" - NV_X11_EXT="${NV_X11}/modules/extensions" - NV_SOVER=${PV} - else - die "Could not determine proper NVIDIA package" - fi -} - -src_unpack() { - if use kernel_linux && kernel_is lt 2 6 7; then - echo - ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" - ewarn "This is not officially supported for ${P}. It is likely you" - ewarn "will not be able to compile or use the kernel module." - ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" - echo - ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." - fi - - if ! use x86-fbsd; then - mkdir "${S}" - cd "${S}" - unpack_makeself - else - unpack ${A} - fi -} - -src_prepare() { - # Please add a brief description for every added patch - use x86-fbsd && cd doc - - # Use the correct defines to make gtkglext build work - epatch "${FILESDIR}"/NVIDIA_glx-defines.patch - # Use some more sensible gl headers and make way for new glext.h - epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch - - if use kernel_linux; then - # Quiet down warnings the user does not need to see - sed -i \ - -e 's:-Wpointer-arith::g' \ - -e 's:-Wsign-compare::g' \ - "${NV_SRC}"/Makefile.kbuild - - # If you set this then it's your own fault when stuff breaks :) - use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* - - # If greater than 2.6.5 use M= instead of SUBDIR= - convert_to_m "${NV_SRC}"/Makefile.kbuild - fi -} - -src_compile() { - # This is already the default on Linux, as there's no toplevel Makefile, but - # on FreeBSD there's one and triggers the kernel module build, as we install - # it by itself, pass this. - - cd "${NV_SRC}" - if use x86-fbsd; then - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die - elif use kernel_linux; then - linux-mod_src_compile - fi -} - -src_install() { - if use kernel_linux; then - linux-mod_src_install - - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia - insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf || die - elif use x86-fbsd; then - insinto /boot/modules - doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die - - exeinto /boot/modules - doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die - fi - - # NVIDIA kernel <-> userspace driver config lib - dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ - die "failed to install libnvidia-cfg" - - # Xorg DDX driver - insinto /usr/$(get_libdir)/xorg/modules/drivers - doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" - - # Xorg GLX driver - insinto /usr/$(get_libdir)/opengl/nvidia/extensions - doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ - die "failed to install libglx.so" - dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ - /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ - die "failed to create libglx.so symlink" - - # XvMC driver - dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ - die "failed to install libXvMCNVIDIA.so" - dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ - die "failed to install libXvMCNVIDIA.so" - dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ - die "failed to create libXvMCNVIDIA.so symlink" - - # CUDA headers (driver to come) - if use kernel_linux && [[ -d ${S}/usr/include/cuda ]]; then - dodir /usr/include/cuda - insinto /usr/include/cuda - doins usr/include/cuda/*.h || die "failed to install cuda headers" - fi - - # OpenCL headers (driver to come) - if [[ -d ${S}/usr/include/CL ]]; then - dodir /usr/include/CL - insinto /usr/include/CL - doins usr/include/CL/*.h || die "failed to install OpenCL headers" - fi - - # Documentation - dodoc ${NV_DOC}/XF86Config.sample - dohtml ${NV_DOC}/html/* - if use x86-fbsd; then - dodoc "${NV_DOC}/README" - doman "${NV_MAN}/nvidia-xconfig.1" - else - # Docs - newdoc "${NV_DOC}/README.txt" README - dodoc "${NV_DOC}/NVIDIA_Changelog" -# doman "${NV_MAN}/nvidia-smi.1.gz" - doman "${NV_MAN}/nvidia-xconfig.1.gz" - fi - - # Helper Apps - dobin ${NV_EXEC}/nvidia-xconfig || die - dobin ${NV_EXEC}/nvidia-bug-report.sh || die - if use kernel_linux; then - dobin ${NV_EXEC}/nvidia-smi || die - fi - - if has_multilib_profile ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" -} - -# Install nvidia library: -# the first parameter is the place where to install it -# the second parameter is the base name of the library -# the third parameter is the provided soversion -donvidia() { - dodir $1 - exeinto $1 - - libname=$(basename $2) - - doexe $2.$3 || die "failed to install $2" - dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" - [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 -} - -src_install-libs() { - local inslibdir=$(get_libdir) - local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" - local libdir= sover= - - if use kernel_linux; then - if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then - libdir=usr/lib32 - else - libdir=usr/lib - fi - sover=${PV} - else - libdir=obj - # on FreeBSD it has just .1 suffix - sover=1 - fi - - # The GLX libraries - donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} - donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} - if use x86-fbsd; then - donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} - else - donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} - fi - - #cuda - if [[ -f ${libdir}/libcuda.so.${sover} ]]; then - dolib.so ${libdir}/libcuda.so.${sover} - [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 - dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so - fi - - #vdpau - if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then - dolib.so ${libdir}/libvdpau_nvidia.so.${sover} - dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so - fi - - # OpenCL - # NOTE: This isn't currently available in the publicly released drivers. - if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then - - dolib.so ${libdir}/libnvcompiler.so.${sover} - [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 - dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so - - dolib.so ${libdir}/libOpenCL.so.1.0.0 - dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 - dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so - fi -} - -pkg_preinst() { - if use kernel_linux; then - linux-mod_pkg_postinst - fi - - # Clean the dynamic libGL stuff's home to ensure - # we dont have stale libs floating around - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* - fi - # Make sure we nuke the old nvidia-glx's env.d file - if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then - rm -f "${ROOT}"/etc/env.d/09nvidia - fi -} - -pkg_postinst() { - if use kernel_linux; then - linux-mod_pkg_postinst - fi - - # Switch to the nvidia implementation - eselect opengl set --use-old nvidia - - echo - elog "You must be in the video group to use the NVIDIA device" - elog "For more info, read the docs at" - elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" - elog - - elog "This ebuild installs a kernel module and X driver. Both must" - elog "match explicitly in their version. This means, if you restart" - elog "X, you must modprobe -r nvidia before starting it back up" - elog - - elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" - elog - elog "NVIDIA has requested that any bug reports submitted have the" - elog "output of /usr/bin/nvidia-bug-report.sh included." - elog - elog "To work with compiz, you must enable the AddARGBGLXVisuals option." - elog - elog "If you are having resolution problems, try disabling DynamicTwinView." - echo -} - -pkg_postrm() { - if use kernel_linux; then - linux-mod_pkg_postrm - fi - eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.37.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.37.ebuild deleted file mode 100644 index a8c66573b..000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.37.ebuild +++ /dev/null @@ -1,539 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.36.ebuild,v 1.8 2013/03/07 16:14:25 jer Exp $ - -EAPI="5" - -inherit eutils flag-o-matic linux-mod multilib nvidia-driver portability \ - unpacker user versionator - -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" - -DESCRIPTION="NVIDIA X11 driver and GLX libraries" -HOMEPAGE="http://www.nvidia.com/" -SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) - amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) - x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" - -LICENSE="GPL-2 NVIDIA" -SLOT="0" -KEYWORDS="-* amd64 x86 ~x86-fbsd" -IUSE="acpi multilib kernel_linux tools" -RESTRICT="bindist mirror strip" -EMULTILIB_PKG="true" - -COMMON="=sys-libs/glibc-2.6.1 ) - multilib? ( app-emulation/emul-linux-x86-opengl ) - >=app-admin/eselect-opengl-1.0.9" -DEPEND="${COMMON} - kernel_linux? ( virtual/linux-sources )" -RDEPEND="${COMMON} - acpi? ( sys-power/acpid ) - tools? ( - dev-libs/atk - dev-libs/glib - x11-libs/gdk-pixbuf - x11-libs/gtk+:2 - x11-libs/libX11 - x11-libs/libXext - x11-libs/pango[X] - || ( x11-libs/pangox-compat " - eerror " [ ] Lock debugging: detect incorrect freeing of live locks" - eerror " [ ] Lock debugging: prove locking correctness" - eerror " [ ] Lock usage statistics" - eerror "in 'menuconfig'" - die "LOCKDEP enabled" - fi -} - -pkg_setup() { - # try to turn off distcc and ccache for people that have a problem with it - export DISTCC_DISABLE=1 - export CCACHE_DISABLE=1 - - if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then - eerror "This ebuild doesn't currently support changing your default abi." - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" - fi - - if use kernel_linux; then - linux-mod_pkg_setup - MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" - # linux-mod_src_compile calls set_arch_to_kernel, which - # sets the ARCH to x86 but NVIDIA's wrapping Makefile - # expects x86_64 or i386 and then converts it to x86 - # later on in the build process - BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" - mtrr_check - lockdep_check - fi - - # On BSD userland it wants real make command - use userland_BSD && MAKE="$(get_bmake)" - - export _POSIX2_VERSION="199209" - - if use kernel_linux && kernel_is ge 3 7 ; then - ewarn "Gentoo supports kernels which are supported by NVIDIA" - ewarn "which are limited to the following kernels:" - ewarn "= 2.6.7" - echo - ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." - fi - - if ! use x86-fbsd; then - mkdir "${S}" - cd "${S}" - unpack_makeself - else - unpack ${A} - fi -} - -src_prepare() { - # Please add a brief description for every added patch - use x86-fbsd && cd doc - - # Use the correct defines to make gtkglext build work - epatch "${FILESDIR}"/NVIDIA_glx-defines.patch - # Use some more sensible gl headers and make way for new glext.h - epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch - - if use kernel_linux; then - # Quiet down warnings the user does not need to see - sed -i \ - -e 's:-Wpointer-arith::g' \ - -e 's:-Wsign-compare::g' \ - "${NV_SRC}"/Makefile.kbuild - - # If greater than 2.6.5 use M= instead of SUBDIR= - convert_to_m "${NV_SRC}"/Makefile.kbuild - fi - - epatch_user -} - -src_compile() { - # This is already the default on Linux, as there's no toplevel Makefile, but - # on FreeBSD there's one and triggers the kernel module build, as we install - # it by itself, pass this. - - cd "${NV_SRC}" - if use x86-fbsd; then - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die - elif use kernel_linux; then - linux-mod_src_compile - fi -} - -src_install() { - if use kernel_linux; then - linux-mod_src_install - - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia - insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf || die - elif use kernel_FreeBSD; then - insinto /boot/modules - doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die - - exeinto /boot/modules - doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die - fi - - # NVIDIA kernel <-> userspace driver config lib - dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ - die "failed to install libnvidia-cfg" - dosym libnvidia-cfg.so.${NV_SOVER} \ - /usr/$(get_libdir)/libnvidia-cfg.so.1 || \ - die "failed to create libnvidia-cfg.so.1 symlink" - dosym libnvidia-cfg.so.1 \ - /usr/$(get_libdir)/libnvidia-cfg.so || \ - die "failed to create libnvidia-cfg.so symlink" - - # Xorg DDX driver - insinto /usr/$(get_libdir)/xorg/modules/drivers - doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" - - # Xorg GLX driver - insinto /usr/$(get_libdir)/opengl/nvidia/extensions - doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ - die "failed to install libglx.so" - dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ - /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ - die "failed to create libglx.so symlink" - - # XvMC driver - dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ - die "failed to install libXvMCNVIDIA.so" - dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ - die "failed to install libXvMCNVIDIA.so" - dosym libXvMCNVIDIA.so.${NV_SOVER} \ - /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \ - die "failed to create libXvMCNVIDIA.so.1 symlink" - dosym libXvMCNVIDIA.so.1 \ - /usr/$(get_libdir)/libXvMCNVIDIA.so || \ - die "failed to create libXvMCNVIDIA.so symlink" - dosym libXvMCNVIDIA.so.${NV_SOVER} \ - /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \ - die "failed to create libXvMCNVIDIA_dynamic.so.1 symlink" - - # CUDA headers (driver to come) - if use kernel_linux && [[ -d ${S}/usr/include/cuda ]]; then - dodir /usr/include/cuda - insinto /usr/include/cuda - doins usr/include/cuda/*.h || die "failed to install cuda headers" - fi - - # OpenCL headers (driver to come) - if [[ -d ${S}/usr/include/CL ]]; then - dodir /usr/include/CL - insinto /usr/include/CL - doins usr/include/CL/*.h || die "failed to install OpenCL headers" - fi - - # Documentation - dodoc ${NV_DOC}/XF86Config.sample - dohtml ${NV_DOC}/html/* - if use x86-fbsd; then - dodoc "${NV_DOC}/README" - doman "${NV_MAN}/nvidia-xconfig.1" - doman "${NV_MAN}/nvidia-settings.1" - else - # Docs - newdoc "${NV_DOC}/README.txt" README - dodoc "${NV_DOC}/NVIDIA_Changelog" - doman "${NV_MAN}/nvidia-xconfig.1.gz" - doman "${NV_MAN}/nvidia-settings.1.gz" - fi - - # Helper Apps - exeinto /opt/bin/ - doexe ${NV_EXEC}/nvidia-xconfig || die - doexe ${NV_EXEC}/nvidia-bug-report.sh || die - if use tools; then - doexe usr/bin/nvidia-settings || die - fi - if use kernel_linux; then - doexe ${NV_EXEC}/nvidia-smi || die - fi - - # Desktop entry for nvidia-settings - if use tools && use kernel_linux; then - sed -e 's:__UTILS_PATH__:/opt/bin:' \ - -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \ - -i "${S}"/usr/share/applications//nvidia-settings.desktop - newmenu "${S}"/usr/share/applications/nvidia-settings.desktop \ - nvidia-settings-opt.desktop - fi - - if has_multilib_profile ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" -} - -# Install nvidia library: -# the first parameter is the place where to install it -# the second parameter is the base name of the library -# the third parameter is the provided soversion -donvidia() { - dodir $1 - exeinto $1 - - libname=$(basename $2) - - doexe $2.$3 || die "failed to install $2" - dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" - [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 -} - -src_install-libs() { - local inslibdir=$(get_libdir) - local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" - local libdir= sover= - - if use kernel_linux; then - if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then - libdir=usr/lib32 - else - libdir=usr/lib - fi - sover=${PV} - else - libdir=obj - # on FreeBSD it has just .1 suffix - sover=1 - fi - - # The GLX libraries - donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} - donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} - if use x86-fbsd; then - donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} - else - donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} - fi - - #cuda - if [[ -f ${libdir}/libcuda.so.${sover} ]]; then - dolib.so ${libdir}/libcuda.so.${sover} - [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 - dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so - fi - - #vdpau - if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then - dolib.so ${libdir}/libvdpau_nvidia.so.${sover} - dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so - fi - - # OpenCL - # NOTE: This isn't currently available in the publicly released drivers. - if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then - - dolib.so ${libdir}/libnvcompiler.so.${sover} - [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 - dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so - - dolib.so ${libdir}/libOpenCL.so.1.0.0 - dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 - dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so - fi -} - -pkg_preinst() { - use kernel_linux && linux-mod_pkg_postinst - - # Clean the dynamic libGL stuff's home to ensure - # we dont have stale libs floating around - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* - fi - # Make sure we nuke the old nvidia-glx's env.d file - if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then - rm -f "${ROOT}"/etc/env.d/09nvidia - fi -} - -pkg_postinst() { - use kernel_linux && linux-mod_pkg_postinst - - # Switch to the nvidia implementation - "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia - - elog "You must be in the video group to use the NVIDIA device" - elog "For more info, read the docs at" - elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" - elog - elog "This ebuild installs a kernel module and X driver. Both must" - elog "match explicitly in their version. This means, if you restart" - elog "X, you must modprobe -r nvidia before starting it back up" - elog - elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" - elog - elog "NVIDIA has requested that any bug reports submitted have the" - elog "output of /usr/bin/nvidia-bug-report.sh included." - elog - if ! use tools; then - elog "USE=tools controls whether the nvidia-settings application" - elog "is installed. If you would like to use it, enable that" - elog "flag and re-emerge this ebuild. Optionally you can install" - elog "media-video/nvidia-settings" - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - use kernel_linux && linux-mod_pkg_postrm - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20-r1.ebuild deleted file mode 100644 index 0178c1755..000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20-r1.ebuild +++ /dev/null @@ -1,512 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.20.ebuild,v 1.4 2011/11/15 09:06:50 chainsaw Exp $ - -EAPI="5" - -inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver - -X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" -X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" - -DESCRIPTION="NVIDIA X11 driver and GLX libraries" -HOMEPAGE="http://www.nvidia.com/" -SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) - amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) - x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" - -LICENSE="NVIDIA" -SLOT="0" -KEYWORDS="-* amd64 x86 ~x86-fbsd" -IUSE="acpi custom-cflags gtk multilib kernel_linux" -RESTRICT="strip" -EMULTILIB_PKG="true" - -COMMON="=sys-libs/glibc-2.6.1 ) - multilib? ( app-emulation/emul-linux-x86-opengl ) - >=app-admin/eselect-opengl-1.0.9" -DEPEND="${COMMON} - kernel_linux? ( virtual/linux-sources )" -RDEPEND="${COMMON} - acpi? ( sys-power/acpid )" - -QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/xorg/modules/drivers/nvidia_drv.so - usr/lib/libcuda.so.${PV} - usr/lib/libnvidia-cfg.so.${PV} - usr/lib/libvdpau_nvidia.so.${PV} - usr/lib/libXvMCNVIDIA.so.${PV}" - -QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko - usr/lib/opengl/nvidia/lib/libGL.so.1 - usr/lib/opengl/nvidia/lib/libGLcore.so.1 - usr/lib/libnvidia-cfg.so.1 - usr/lib/opengl/nvidia/extensions/libglx.so.1 - usr/lib/xorg/modules/drivers/nvidia_drv.so" - -QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib32/libcuda.so.${PV} - usr/lib32/libvdpau_nvidia.so.${PV}" - -QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/xorg/modules/drivers/nvidia_drv.so - usr/lib/libXvMCNVIDIA.a:NVXVMC.o" - -QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/libnvcompiler.so.${PV} - usr/lib64/libXvMCNVIDIA.so.${PV} - usr/lib64/libXvMCNVIDIA.a:NVXVMC.o - usr/lib64/libnvidia-cfg.so.${PV} - usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib64/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib64/xorg/modules/drivers/nvidia_drv.so - usr/bin/nvidia-settings - usr/bin/nvidia-smi - usr/bin/nvidia-xconfig" - -QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/libXvMCNVIDIA.a" - -QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" - -QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" - -QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} - usr/lib32/opengl/nvidia/lib/libGL.so.${PV} - usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib32/libvdpau_nvidia.so.${PV} - usr/lib64/libXvMCNVIDIA.so.${PV} - usr/lib64/libcuda.so.${PV} - usr/lib64/libnvidia-cfg.so.${PV} - usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib64/opengl/nvidia/lib/libGL.so.${PV} - usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib64/xorg/modules/drivers/nvidia_drv.so - usr/lib64/libvdpau_nvidia.so.${PV} - usr/bin/nvidia-settings - usr/bin/nvidia-smi - usr/bin/nvidia-xconfig" - -QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} - usr/lib/libnvidia-cfg.so.${PV} - usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} - usr/lib/opengl/nvidia/lib/libGL.so.${PV} - usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} - usr/lib/opengl/nvidia/extensions/libglx.so.${PV} - usr/lib/xorg/modules/drivers/nvidia_drv.so - usr/lib/libXvMCNVIDIA.so.${PV} - usr/lib/libvdpau_nvidia.so.${PV} - usr/bin/nvidia-settings - usr/bin/nvidia-smi - usr/bin/nvidia-xconfig" - -if use x86; then - PKG_V="-pkg0" - NV_PACKAGE="${X86_NV_PACKAGE}" -elif use amd64; then - PKG_V="-pkg2" - NV_PACKAGE="${AMD64_NV_PACKAGE}" -elif use x86-fbsd; then - PKG_V="" - NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" -fi - -S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" - -mtrr_check() { - ebegin "Checking for MTRR support" - linux_chkconfig_present MTRR - eend $? - - if [[ $? -ne 0 ]] ; then - eerror "Please enable MTRR support in your kernel config, found at:" - eerror - eerror " Processor type and features" - eerror " [*] MTRR (Memory Type Range Register) support" - eerror - eerror "and recompile your kernel ..." - die "MTRR support not detected!" - fi -} - -lockdep_check() { - if linux_chkconfig_present LOCKDEP; then - eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." - eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" - eerror "which will prevent ${P} from compiling." - eerror "Please make sure the following options have been unset:" - eerror " Kernel hacking --->" - eerror " [ ] Lock debugging: detect incorrect freeing of live locks" - eerror " [ ] Lock debugging: prove locking correctness" - eerror " [ ] Lock usage statistics" - eerror "in 'menuconfig'" - die "LOCKDEP enabled" - fi -} - -pkg_setup() { - # try to turn off distcc and ccache for people that have a problem with it - export DISTCC_DISABLE=1 - export CCACHE_DISABLE=1 - - if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then - eerror "This ebuild doesn't currently support changing your default abi." - die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" - fi - - if use kernel_linux; then - linux-mod_pkg_setup - MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" - BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ - SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" - mtrr_check - lockdep_check - fi - - # On BSD userland it wants real make command - use userland_BSD && MAKE="$(get_bmake)" - - export _POSIX2_VERSION="199209" - - # Since Nvidia ships 3 different series of drivers, we need to give the user - # some kind of guidance as to what version they should install. This tries - # to point the user in the right direction but can't be perfect. check - # nvidia-driver.eclass - nvidia-driver-check-warning - - # set variables to where files are in the package structure - if use kernel_FreeBSD; then - NV_DOC="${S}/doc" - NV_EXEC="${S}/obj" - NV_LIB="${S}/obj" - NV_SRC="${S}/src" - NV_MAN="${S}/x11/man" - NV_X11="${S}/obj" - NV_X11_DRV="${NV_X11}" - NV_X11_EXT="${NV_X11}" - NV_SOVER=1 - elif use kernel_linux; then - NV_DOC="${S}/usr/share/doc" - NV_EXEC="${S}/usr/bin" - NV_LIB="${S}/usr/lib" - NV_SRC="${S}/usr/src/nv" - NV_MAN="${S}/usr/share/man/man1" - NV_X11="${S}/usr/X11R6/lib" - NV_X11_DRV="${NV_X11}/modules/drivers" - NV_X11_EXT="${NV_X11}/modules/extensions" - NV_SOVER=${PV} - else - die "Could not determine proper NVIDIA package" - fi -} - -src_unpack() { - if use kernel_linux && kernel_is lt 2 6 7; then - echo - ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" - ewarn "This is not officially supported for ${P}. It is likely you" - ewarn "will not be able to compile or use the kernel module." - ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" - echo - ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." - fi - - if ! use x86-fbsd; then - mkdir "${S}" - cd "${S}" - unpack_makeself - else - unpack ${A} - fi -} - -src_prepare() { - # Please add a brief description for every added patch - use x86-fbsd && cd doc - - # Use the correct defines to make gtkglext build work - epatch "${FILESDIR}"/NVIDIA_glx-defines.patch - # Use some more sensible gl headers and make way for new glext.h - epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch - - if use kernel_linux; then - # Quiet down warnings the user does not need to see - sed -i \ - -e 's:-Wpointer-arith::g' \ - -e 's:-Wsign-compare::g' \ - "${NV_SRC}"/Makefile.kbuild - - # If you set this then it's your own fault when stuff breaks :) - use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* - - # If greater than 2.6.5 use M= instead of SUBDIR= - convert_to_m "${NV_SRC}"/Makefile.kbuild - fi -} - -src_compile() { - # This is already the default on Linux, as there's no toplevel Makefile, but - # on FreeBSD there's one and triggers the kernel module build, as we install - # it by itself, pass this. - - cd "${NV_SRC}" - if use x86-fbsd; then - MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ - LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die - elif use kernel_linux; then - linux-mod_src_compile - fi -} - -src_install() { - if use kernel_linux; then - linux-mod_src_install - - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia - insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf || die - elif use x86-fbsd; then - insinto /boot/modules - doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die - - exeinto /boot/modules - doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die - fi - - # NVIDIA kernel <-> userspace driver config lib - dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ - die "failed to install libnvidia-cfg" - - # Xorg DDX driver - insinto /usr/$(get_libdir)/xorg/modules/drivers - doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" - - # Xorg GLX driver - insinto /usr/$(get_libdir)/opengl/nvidia/extensions - doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ - die "failed to install libglx.so" - dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ - /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ - die "failed to create libglx.so symlink" - - # XvMC driver - dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ - die "failed to install libXvMCNVIDIA.so" - dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ - die "failed to install libXvMCNVIDIA.so" - dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ - die "failed to create libXvMCNVIDIA.so symlink" - - # CUDA headers (driver to come) - if [[ -d ${S}/usr/include/cuda ]]; then - dodir /usr/include/cuda - insinto /usr/include/cuda - doins usr/include/cuda/*.h || die "failed to install cuda headers" - fi - - # OpenCL headers (driver to come) - if [[ -d ${S}/usr/include/CL ]]; then - dodir /usr/include/CL - insinto /usr/include/CL - doins usr/include/CL/*.h || die "failed to install OpenCL headers" - fi - - # Documentation - dodoc ${NV_DOC}/XF86Config.sample - dohtml ${NV_DOC}/html/* - if use x86-fbsd; then - dodoc "${NV_DOC}/README" - doman "${NV_MAN}/nvidia-xconfig.1" - else - # Docs - newdoc "${NV_DOC}/README.txt" README - dodoc "${NV_DOC}/NVIDIA_Changelog" -# doman "${NV_MAN}/nvidia-smi.1.gz" - doman "${NV_MAN}/nvidia-xconfig.1.gz" - fi - - # Helper Apps - dobin ${NV_EXEC}/nvidia-xconfig || die - dobin ${NV_EXEC}/nvidia-bug-report.sh || die - if use gtk; then - dobin usr/bin/nvidia-settings || die - fi -# if use kernel_linux; then -# dobin ${NV_EXEC}/nvidia-smi || die -# fi - - if has_multilib_profile ; then - local OABI=${ABI} - for ABI in $(get_install_abis) ; do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - is_final_abi || die "failed to iterate through all ABIs" -} - -# Install nvidia library: -# the first parameter is the place where to install it -# the second parameter is the base name of the library -# the third parameter is the provided soversion -donvidia() { - dodir $1 - exeinto $1 - - libname=$(basename $2) - - doexe $2.$3 || die "failed to install $2" - dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" - [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 -} - -src_install-libs() { - local inslibdir=$(get_libdir) - local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" - local libdir= sover= - - if use kernel_linux; then - if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then - libdir=usr/lib32 - else - libdir=usr/lib - fi - sover=${PV} - else - libdir=obj - # on FreeBSD it has just .1 suffix - sover=1 - fi - - # The GLX libraries - donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} - donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} - if use x86-fbsd; then - donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} - else - donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} - fi - - #cuda - if [[ -f ${libdir}/libcuda.so.${sover} ]]; then - dolib.so ${libdir}/libcuda.so.${sover} - [[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 - dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so - fi - - #vdpau - if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then - dolib.so ${libdir}/libvdpau_nvidia.so.${sover} - dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so - fi - - # OpenCL - # NOTE: This isn't currently available in the publicly released drivers. - if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then - - dolib.so ${libdir}/libnvcompiler.so.${sover} - [[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 - dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so - - dolib.so ${libdir}/libOpenCL.so.1.0.0 - dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 - dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so - fi -} - -pkg_preinst() { - if use kernel_linux; then - linux-mod_pkg_postinst - fi - - # Clean the dynamic libGL stuff's home to ensure - # we dont have stale libs floating around - if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then - rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* - fi - # Make sure we nuke the old nvidia-glx's env.d file - if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then - rm -f "${ROOT}"/etc/env.d/09nvidia - fi -} - -pkg_postinst() { - if use kernel_linux; then - linux-mod_pkg_postinst - fi - - # Switch to the nvidia implementation - eselect opengl set --use-old nvidia - - echo - elog "You must be in the video group to use the NVIDIA device" - elog "For more info, read the docs at" - elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" - elog - - elog "This ebuild installs a kernel module and X driver. Both must" - elog "match explicitly in their version. This means, if you restart" - elog "X, you must modprobe -r nvidia before starting it back up" - elog - - elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" - elog - elog "NVIDIA has requested that any bug reports submitted have the" - elog "output of /usr/bin/nvidia-bug-report.sh included." - elog - elog "To work with compiz, you must enable the AddARGBGLXVisuals option." - elog - elog "If you are having resolution problems, try disabling DynamicTwinView." - echo -} - -pkg_postrm() { - if use kernel_linux; then - linux-mod_pkg_postrm - fi - eselect opengl set --use-old xorg-x11 -} diff --git a/x11-misc/glipper/Manifest b/x11-misc/glipper/Manifest deleted file mode 100644 index 2ce3712e6..000000000 --- a/x11-misc/glipper/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST glipper-2.4.tar.gz 87599 SHA256 c84b4b77b342d3409b125ef0526948ae159074d3472dd81e3db6b95c5b33fd86 SHA512 7b4293dac8d7db6fe49ba57fec132167ecf0442218ab217f827f8368af250262de21d2ce1b00b84d2f7179ef4bf555e63f73420278a6579d7a51e5574b7db128 WHIRLPOOL 0455afcc78af0d1f08ca71d4cd2bf3e308ad8420c62f0c21e371ac6740162f012bfd187308002c9b0fd4efed3f942ac9e5c656a3f2cf6c34be8426b7f857ec19 -EBUILD glipper-2.4.ebuild 1012 SHA256 bda0cf68adf9ab413535b9afdffdbd79107f7872d3cbadb6397090ec728da430 SHA512 69b0fbe38bd5cf9b6c455c514c7c69feada2bc02db9a98071ba480ffcdfee5521fbb9debcbdfa0d9d088b495e68917dc84d01309f46a58ece7353faa9af14636 WHIRLPOOL d981a3565d136abf7e56dc484af4f5840ba03340ea1a0e3c97c53a6b4b071aa3f2d37c311a3b51df9745451a50370c3000c088a362b13526de82b741693aeb47 -MISC metadata.xml 336 SHA256 66a3d11dc1fc77c9a7831bfd089ef5c18fde1a95202d98aaf6055c69740bd946 SHA512 711dc15527aec5bc2b4dc8064f2ced1f53dd5eb3ca88171699a11ed0633b2d070b9c2e9eb58a3ceed3369c484726004d57ecc9d9b4112fc4f514da39f96325e7 WHIRLPOOL 325d6c17f14b60c71a109ab21290b21b7d21865064afc1fb77ad4900864db02c0a1a7f14221874ab28142be2d73ea19ed35c5e78641c4d074bcd3640d40d52de diff --git a/x11-misc/glipper/glipper-2.4.ebuild b/x11-misc/glipper/glipper-2.4.ebuild deleted file mode 100644 index 0fbd548e2..000000000 --- a/x11-misc/glipper/glipper-2.4.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -EAPI=4 - -PYTHON_DEPEND="2:2.7" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="3.*" - -inherit distutils gnome2-utils - -DESCRIPTION="A PyGTK+ based advanced clipboard manager" -HOMEPAGE="http://launchpad.net/glipper" -SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -RESTRICT="mirror" - -RDEPEND="!x11-misc/glipper - dev-libs/keybinder:0[python] - dev-libs/libappindicator - dev-python/gconf-python - dev-python/pycrypto - dev-python/pygtk:2 - dev-python/python-prctl - dev-python/pyxdg" -DEPEND="${RDEPEND} - >=dev-python/python-distutils-extra-2.37" - -src_install() { - sed -e "s:DATA_DIR = \"\":DATA_DIR = \"/usr/share\":g" \ - -i glipper/defs.py - distutils_src_install - - dodir /etc - mv -vf "${ED}"/usr/share/gconf "${ED}"/etc -} - -pkg_preinst() { - gnome2_gconf_savelist - gnome2_icon_savelist -} - -pkg_postinst() { - distutils_pkg_postinst - gnome2_gconf_install - gnome2_icon_cache_update -} - -pkg_postrm() { - distutils_pkg_postrm - gnome2_icon_cache_update -} diff --git a/x11-misc/glipper/metadata.xml b/x11-misc/glipper/metadata.xml deleted file mode 100644 index bc0eafb02..000000000 --- a/x11-misc/glipper/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - ayatana - - ayatana-bugs@gentoo.org - - - swegener@gentoo.org - Sven Wegener - - diff --git a/x11-misc/gxneur/ChangeLog b/x11-misc/gxneur/ChangeLog deleted file mode 100644 index 1093234c8..000000000 --- a/x11-misc/gxneur/ChangeLog +++ /dev/null @@ -1,52 +0,0 @@ -# ChangeLog for x11-misc/gxneur -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*gxneur-0.15.0 (27 Jan 2012) - - 27 Jan 2012; Alexander Tratsevskiy (L'autre) - -gxneur-0.12.0.ebuild, +gxneur-0.15.0.ebuild, -metadata.xml: - version bump - - 01 Feb 2011; Alexandre Rostovtsev (tetromino) - -gxneur-0.11.1.ebuild, +gxneur-0.12.0.ebuild: - Version bump. - - 06 Dec 2010; Peter Volkov -gxneur-0.10.0.ebuild, - +gxneur-0.11.1.ebuild: - Version bump, thank nightwelf and Alex Rodionov for report/help. - - 17 Oct 2010; Peter Volkov -gxneur-0.9.9.ebuild, - +gxneur-0.10.0.ebuild: - Version bump, thank Павел aka Nightwelf for report. - - 06 Jul 2010; Michał Górny (sedzimir) - gxneur-0.9.9.ebuild: - Cleanup, install the icon. - - 01 Jun 2010; Peter Volkov -gxneur-0.9.7.ebuild, - +gxneur-0.9.9.ebuild: - Version bump, thank Alex Rodionov for report in bug #169494. - - 16 Oct 2009; Peter Volkov - -files/gxneur-0.9.3-CFLAGS.patch, -gxneur-0.9.5.ebuild, - +gxneur-0.9.7.ebuild: - Version bump. Patch finally went upstream. - - 26 Aug 2009; Peter Volkov - files/gxneur-0.9.3-CFLAGS.patch, -gxneur-0.9.4.ebuild, - +gxneur-0.9.5.ebuild: - Version bump. - - 01 Jun 2009; Peter Volkov -gxneur-0.9.3.ebuild, - +gxneur-0.9.4.ebuild: - Version bump. - - 06 Apr 2009; Peter Volkov gxneur-0.9.3.ebuild: - Make eutils/versionator eclass globally inherited, thank Tommy for catching - this. - - 03 Apr 2009; Peter Volkov +gxneur-0.9.3.ebuild, - +files/gxneur-0.9.3-CFLAGS.patch, +metadata.xml: - New Ebuild for bug 169494. - diff --git a/x11-misc/gxneur/Manifest b/x11-misc/gxneur/Manifest deleted file mode 100644 index d198ec44f..000000000 --- a/x11-misc/gxneur/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST gxneur-0.15.0.tar.bz2 682903 RMD160 f6c07cf0ec5a499bd7dc2809f8b7ae95aadd3661 SHA1 013f7f0b35359e9da55132b7c588cfcead1f3316 SHA256 4fda25f0b3f90d6b76aa731bcc1768c606af1cbdba59e82400baa83d2ea9866d -EBUILD gxneur-0.15.0.ebuild 1197 RMD160 f7b68704d9432d895d8f1266231af59fcfcf9189 SHA1 9c98bb3a76eca34461b937e1f206e419d14e0b5b SHA256 d9c3b436685cea2dded090752d9493f1d2493ffc7684006c6c5659db8bda021c -MISC ChangeLog 1740 RMD160 2110bd5a3b41c390082cec86d0a7037c7aad743b SHA1 c856bbaa73cff6b1d94c6393f92500ea80c88dbb SHA256 b0b25904a3d84b50a68aace362ec2d63455f454207f99162006d3db5759de012 diff --git a/x11-misc/gxneur/gxneur-0.15.0.ebuild b/x11-misc/gxneur/gxneur-0.15.0.ebuild deleted file mode 100644 index f400ce972..000000000 --- a/x11-misc/gxneur/gxneur-0.15.0.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit autotools eutils gnome2-utils versionator - -DESCRIPTION="GTK+ based GUI for xneur" -HOMEPAGE="http://www.xneur.ru/" -SRC_URI="http://dists.xneur.ru/release-${PV}/tgz/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="+gconf nls" - -COMMON_DEPEND="gnome-base/libglade:2.0 - >=sys-devel/gettext-0.16.1 - >=x11-libs/gtk+-2.18:2 - >=x11-misc/xneur-$(get_version_component_range 1-2) - gconf? ( gnome-base/gconf:2 ) - !x11-misc/xneur[gtk3]" -RDEPEND="${COMMON_DEPEND} - nls? ( virtual/libintl )" -DEPEND="${COMMON_DEPEND} - nls? ( sys-devel/gettext ) - >=dev-util/pkgconfig-0.20" - -src_prepare() { - rm -f m4/{lt~obsolete,ltoptions,ltsugar,ltversion,libtool}.m4 \ - ltmain.sh aclocal.m4 || die - sed -i "s/-Werror -g0//" configure.in || die - eautoreconf -} - -src_configure() { - econf \ - $(use_enable nls) \ - $(use_with gconf) -} - -src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS ChangeLog NEWS - doicon pixmaps/gxneur.png -} - -pkg_preinst() { - gnome2_icon_savelist -} - -pkg_postinst() { - gnome2_icon_cache_update -} - -pkg_postrm() { - gnome2_icon_cache_update -} diff --git a/x11-misc/obdevicemenu/Manifest b/x11-misc/obdevicemenu/Manifest deleted file mode 100644 index 7bde37e49..000000000 --- a/x11-misc/obdevicemenu/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST obdevicemenu-1.6.1.tar.gz 14808 SHA256 de88786c07ca311696640f2c479c4fb536e7280fcb42ffdceecf8ac9ab22eaac SHA512 1870e7591982eb93d71b786a61710e95bdf6f1e01284a017022aee3a79b42b108c671c531fe732b1a4bca66f27f72af5fb43bb978a6bbb12a53cdd5f25ca3edf WHIRLPOOL ebc161844f26f10e32f31b6677c92c6cfb29ce22520f2892a7546036ec99db425627b8ed03ce06c358816fae869063093488f4bc10ed8f773096aebd8b22d763 -DIST obdevicemenu-1.7.0.tar.gz 14722 SHA256 724f9dfc705f0c9c4b317c7c017491a6e763252a7837255aff511fe4857647ce SHA512 0a01bc080df77111b295965d63d5f0389c9861cef22ecd9e67b516f89555a905c810ad43aa52bcc52bd76a8a0747e3251992c3a64b6235e2bac5be60fe6da8de WHIRLPOOL 94168f70e4e96382f36652c736bbb32c17ae477469706611ce6197ec36c5b6ffaa5e7751fecd9603f7d4c8f19d3b4597d8e5b847316efbf336392e6ad41c68e1 -EBUILD obdevicemenu-1.6.1.ebuild 723 SHA256 a8655d209275631d050955b0b649b7d50ce1a304f186e79778c24865d2c52d7f SHA512 1503defb5d9ead0a80a43ebe84cfcef650933fed6b9319081b176e1943a98993a540a5bd2d1e91d415825c07da0c6f79ec9f3d78fd88b1cbe3ecd555b7437d60 WHIRLPOOL 53ce7c3fa71cd62dc41ce2ec7741d22bd6a60a59a36fb9bb263e09de7e31533df0c90c568142dcfd5ec0385d3d8b2cfc5aaf499e3242d16417e6de7cd5bf3220 -EBUILD obdevicemenu-1.7.0.ebuild 723 SHA256 a8655d209275631d050955b0b649b7d50ce1a304f186e79778c24865d2c52d7f SHA512 1503defb5d9ead0a80a43ebe84cfcef650933fed6b9319081b176e1943a98993a540a5bd2d1e91d415825c07da0c6f79ec9f3d78fd88b1cbe3ecd555b7437d60 WHIRLPOOL 53ce7c3fa71cd62dc41ce2ec7741d22bd6a60a59a36fb9bb263e09de7e31533df0c90c568142dcfd5ec0385d3d8b2cfc5aaf499e3242d16417e6de7cd5bf3220 diff --git a/x11-misc/obdevicemenu/obdevicemenu-1.6.1.ebuild b/x11-misc/obdevicemenu/obdevicemenu-1.6.1.ebuild deleted file mode 100644 index 48c21388f..000000000 --- a/x11-misc/obdevicemenu/obdevicemenu-1.6.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="2" - -DESCRIPTION="OpenBox device menu" -HOMEPAGE="http://sourceforge.net/projects/obdevicemenu/" -SRC_URI="http://sourceforge.net/projects/obdevicemenu/files/${PF}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="notifications" - -DEPEND=" - app-shells/bash - sys-apps/dbus - x11-wm/openbox - sys-fs/udisks - notifications? ( x11-misc/notification-daemon ) -" - -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${PF}" - -src_unpack() { - if [ "${A}" != "" ]; then - unpack ${A} - fi -} - -src_install() { - insinto /etc - doins obdevicemenu.conf || die - exeinto /usr/local/bin - doexe obdevicemenu || die -} diff --git a/x11-misc/obdevicemenu/obdevicemenu-1.7.0.ebuild b/x11-misc/obdevicemenu/obdevicemenu-1.7.0.ebuild deleted file mode 100644 index 48c21388f..000000000 --- a/x11-misc/obdevicemenu/obdevicemenu-1.7.0.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="2" - -DESCRIPTION="OpenBox device menu" -HOMEPAGE="http://sourceforge.net/projects/obdevicemenu/" -SRC_URI="http://sourceforge.net/projects/obdevicemenu/files/${PF}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="notifications" - -DEPEND=" - app-shells/bash - sys-apps/dbus - x11-wm/openbox - sys-fs/udisks - notifications? ( x11-misc/notification-daemon ) -" - -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${PF}" - -src_unpack() { - if [ "${A}" != "" ]; then - unpack ${A} - fi -} - -src_install() { - insinto /etc - doins obdevicemenu.conf || die - exeinto /usr/local/bin - doexe obdevicemenu || die -} diff --git a/x11-misc/obmenugen-bin/Manifest b/x11-misc/obmenugen-bin/Manifest deleted file mode 100644 index f8183e9b6..000000000 --- a/x11-misc/obmenugen-bin/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST obmenugen-0.5-r72.tar.bz2 121357 RMD160 1d816d822eb0ab029da1caa5e458632876765fd0 SHA1 0ea09c2ddc5ed0adce5ff3f3f206060156caa340 SHA256 f13af8062788118e4f184cde46a2833b0842a9e4c2ff6617062a7eb42d40fc87 -EBUILD obmenugen-bin-0.5-r72.ebuild 780 RMD160 d225f807063ffec7e0407213575c7ba084071374 SHA1 6da1b094051f08392fe337418ac2fea860bfb371 SHA256 8890dc946b4eba56425c9c08dcdddb188d4120a7bef8699e8c82ab4a9f0be52d diff --git a/x11-misc/obmenugen-bin/obmenugen-bin-0.5-r72.ebuild b/x11-misc/obmenugen-bin/obmenugen-bin-0.5-r72.ebuild deleted file mode 100644 index ac848e471..000000000 --- a/x11-misc/obmenugen-bin/obmenugen-bin-0.5-r72.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -inherit versionator -MY_PN=${PN/-bin/} -C_PV=$(get_version_component_range 1-2) -DESCRIPTION="Flexible, easy to use and (really) fast static/dinamic menu generator for the Openbox Window Manager." -HOMEPAGE="https://launchpad.net/obmenugen" -SRC_URI="http://launchpad.net/${MY_PN}/${C_PV}/${PV}/+download/${MY_PN}-${PVR}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND} - x11-wm/openbox" - -S=${WORKDIR}/${MY_PN}-${PVR} - -src_compile() { -echo done -} - -src_install() { - newbin ./bin/obmenugen obmenugen - dodir /usr/share/obmenugen/ - cp -r ./translations/ ${D}/usr/share/obmenugen/ - dodoc README.txt LICENSE.txt - } diff --git a/x11-misc/obshutdown/Manifest b/x11-misc/obshutdown/Manifest deleted file mode 100644 index 432d9d8a0..000000000 --- a/x11-misc/obshutdown/Manifest +++ /dev/null @@ -1 +0,0 @@ -EBUILD obshutdown-9999.ebuild 654 SHA256 51c7c4effdcb2aed86432460d1227c013d1071cbdd760809981f3e0f83709e8f SHA512 6d3252137db2e011e1f615d09d6e8cb1ea3184169ead253703c729d339c8d5b53ea941f43280062ec4ce6cc60ce2a31b353f199f2638a24f2317971c32b2122b WHIRLPOOL 778738e5f8fadaa9603a65916b2ba6069337fccfebafd9721dc09b196eb649490e335e7a5a9b825ccdcd90206099e5226d35bb92cdc1586d460caf8a4d282f4e diff --git a/x11-misc/obshutdown/obshutdown-9999.ebuild b/x11-misc/obshutdown/obshutdown-9999.ebuild deleted file mode 100644 index e7be79bb5..000000000 --- a/x11-misc/obshutdown/obshutdown-9999.ebuild +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-9999.ebuild,v 1.2 2012/05/02 21:59:12 vapier Exp $ - -EAPI="4" - -inherit flag-o-matic eutils git-2 autotools - -EGIT_REPO_URI="git://github.com/panjandrum/obshutdown.git" - -DESCRIPTION="GTK/Cairo based shutdown box styled for Openbox and others windows managers" -HOMEPAGE="https://github.com/panjandrum/obshutdown" -KEYWORDS="~amd64 ~x86" -LICENSE="GPL" -SLOT="0" - -# strace only uses the header from libaio to decode structs -DEPEND=">=x11-libs/gtk+-2.24.10-r1 - >=x11-libs/cairo-1.10.2" -RDEPEND="" - diff --git a/x11-misc/tint2/Manifest b/x11-misc/tint2/Manifest deleted file mode 100644 index 137be210b..000000000 --- a/x11-misc/tint2/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -AUX gtk-update-icon-cache.patch 500 RMD160 661d03a0b5ec4734a7caea743277ca9940ee059e SHA1 bd55c1801e32222039bb882954d500d371990b42 SHA256 7a63949e03a2ad3c248b41d67aa643461ac26b3c73483e3e94f9409eeccc81dd -EBUILD tint2-9999.ebuild 1408 RMD160 8897e33961c3c63a883c26052a316ce32684fe81 SHA1 4b2a9e05550a7abf9647d4b97d2634f160833fec SHA256 2a7c3b7e5c8c63642f20bc811e4535bd89e22c95a34393b68ee7d5fe481ef1af -MISC metadata.xml 782 RMD160 fc7266b9a7a396f6f310869407aabead1e1597a7 SHA1 86cf41564c4cfd2511811acb3dd0ee38ebcd31e0 SHA256 bf6e9219feb9050a9996c40f8569f6ce565ef70acd9c8ea84c6b20181104ab8f diff --git a/x11-misc/tint2/files/gtk-update-icon-cache.patch b/x11-misc/tint2/files/gtk-update-icon-cache.patch deleted file mode 100644 index e538935de..000000000 --- a/x11-misc/tint2/files/gtk-update-icon-cache.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- src/tint2conf/CMakeLists.txt 2012-01-01 21:38:34.000000000 +0400 -+++ src/tint2conf/CMakeLists.txt_ 2012-01-01 21:45:19.000000000 +0400 -@@ -48,4 +48,3 @@ - install( PROGRAMS tintwizard.py DESTINATION bin ) - install( FILES taskbar.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps ) - install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications ) --install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" ) diff --git a/x11-misc/tint2/metadata.xml b/x11-misc/tint2/metadata.xml deleted file mode 100644 index 1150cfff1..000000000 --- a/x11-misc/tint2/metadata.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - idl0r@gentoo.org - Christian Ruppert - - - Install tint2rc examples - Enable battery status plugin - Build/Install tint2conf as well - - - tint2 is a simple panel/taskbar intentionally made for openbox3, but should also work with other window managers. - It's based on ttm code http://code.google.com/p/ttm/. - The goal is to keep a clean and unintrusive look with code lightweight and compliance with freedesktop specifications. - - diff --git a/x11-misc/tint2/tint2-9999.ebuild b/x11-misc/tint2/tint2-9999.ebuild deleted file mode 100644 index f89d960c8..000000000 --- a/x11-misc/tint2/tint2-9999.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/tint2/tint2-0.11-r1.ebuild,v 1.3 2011/04/25 13:52:51 tomka Exp $ - -EAPI="3" - -inherit cmake-utils eutils gnome2-utils subversion - -DESCRIPTION="A lightweight panel/taskbar" -HOMEPAGE="http://code.google.com/p/tint2/" -ESVN_REPO_URI="http://tint2.googlecode.com/svn/trunk/" -ESVN_PROJECT="tint2-read-only" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="" -IUSE="+battery examples tint2conf" - -COMMON_DEPEND="dev-libs/glib:2 - x11-libs/cairo - x11-libs/pango - x11-libs/libX11 - x11-libs/libXinerama - x11-libs/libXdamage - x11-libs/libXcomposite - x11-libs/libXrender - x11-libs/libXrandr - media-libs/imlib2[X]" -DEPEND="${COMMON_DEPEND} - dev-util/pkgconfig - x11-proto/xineramaproto" -RDEPEND="${COMMON_DEPEND} - tint2conf? ( x11-misc/tintwizard )" - -src_prepare() { - epatch ${FILESDIR}/gtk-update-icon-cache.patch -} - -src_configure() { - local mycmakeargs=( - $(cmake-utils_use_enable battery BATTERY) - $(cmake-utils_use_enable examples EXAMPLES) - $(cmake-utils_use_enable tint2conf TINT2CONF) - - # bug 296890 - "-DDOCDIR=/usr/share/doc/${PF}" - ) - - cmake-utils_src_configure -} - - - -src_install() { - cmake-utils_src_install - rm -f "${D}/usr/bin/tintwizard.py" -} - -pkg_preinst() { gnome2_icon_savelist; } -pkg_postinst() { gnome2_icon_cache_update; } -pkg_postrm() { gnome2_icon_cache_update; } diff --git a/x11-misc/trayfreq/Manifest b/x11-misc/trayfreq/Manifest deleted file mode 100644 index 52a6f94fa..000000000 --- a/x11-misc/trayfreq/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST trayfreq-0.2.x-dev2.tar.gz 136208 RMD160 4347676410c03424ab6938d7cb92e53dc4da0928 SHA1 1bbd239c1a88e163e9d8ca33c86c77b67b73efd5 SHA256 961e7bbb3f9cf0c98b96921e1b200a49040c092eff582618dac88e04e5d1be7e -EBUILD trayfreq-0.2_pre2.ebuild 1030 RMD160 ada563be56e8a2cb8545573c4465db31757fe079 SHA1 8982eb243b66c6fd8ced5f966396aaf02655e213 SHA256 8caef27e8ab28824ea14b66ae266ad66c1b981772e3084006b333f6ea4fc77fc diff --git a/x11-misc/trayfreq/trayfreq-0.2_pre2.ebuild b/x11-misc/trayfreq/trayfreq-0.2_pre2.ebuild deleted file mode 100644 index 7af3154dd..000000000 --- a/x11-misc/trayfreq/trayfreq-0.2_pre2.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit eutils versionator - -MY_P=${PN}-$(version_format_string '$1.$2.x-dev2') - -DESCRIPTION="A GTK+ CPU and Battery Tray Tool" -HOMEPAGE="http://trayfreq.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64" -IUSE="autostart suid" - -DEPEND="x11-libs/gtk+:2" -RDEPEND="${DEPEND} - sys-power/cpufrequtils" - -S=${WORKDIR}/${MY_P} - -src_configure() { - econf $(use_enable suid setsuid) \ - $(use_enable autostart) -} - -src_install() { - emake DESTDIR="${D}" install - - dodoc AUTHORS README data/trayfreq.config - newicon data/cpufreq-0.png ${PN}.png - make_desktop_entry ${PN} "Tray Tool for cpufreq" ${PN} -} - -pkg_postinst() { - if ! use suid; then - elog "trayfreq requires root privileges" - elog "if you use sudo you may have to edit sudoers" - elog "config file will be read from root directory" - fi - elog "a sample config file resides in documentation" -} diff --git a/x11-misc/xneur/ChangeLog b/x11-misc/xneur/ChangeLog deleted file mode 100644 index acf59e6bb..000000000 --- a/x11-misc/xneur/ChangeLog +++ /dev/null @@ -1,64 +0,0 @@ -# ChangeLog for x11-misc/xneur -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*xneur-0.15.0 (27 Jan 2012) - - 27 Jan 2012; Alexander Tratsevskiy (L'autre) - +files/0.15.0-select-gtk.patch, -xneur-0.12.0-r1.ebuild, - -files/xneur-0.12.0-libnotify-0.7.patch, +xneur-0.15.0.ebuild, -metadata.xml: - version bump - - 12 Mar 2011; Alexandre Rostovtsev (tetromino) - -xneur-0.12.0.ebuild, +xneur-0.12.0-r1.ebuild, - +files/xneur-0.12.0-libnotify-0.7.patch: - Add patch for libnotify-0.7 compatibility - - 01 Feb 2011; Alexandre Rostovtsev (tetromino) - -xneur-0.11.1.ebuild, -files/xneur-0.11.1-openmp.patch, - +xneur-0.12.0.ebuild: - Version bump; libpcre dependency is now obligatory; openmp patch is no - longer needed. - - 06 Dec 2010; Peter Volkov -xneur-0.10.0.ebuild, - +xneur-0.11.1.ebuild, +files/xneur-0.11.1-openmp.patch: - Version bump, thank nightwelf and Alex Rodionov for report/help. - - 17 Oct 2010; Peter Volkov -xneur-0.9.9.ebuild, - +xneur-0.10.0.ebuild, metadata.xml: - Version bump, thank Павел aka Nightwelf for report. - - 06 Jul 2010; Michał Górny (sedzimir) - xneur-0.9.9.ebuild: - Decrease EAPI requirement, cleanup. Correct dependencies. - - 01 Jun 2010; Peter Volkov -xneur-0.9.7.ebuild, - +xneur-0.9.9.ebuild: - Version bump, thank Alex Rodionov for report in bug #169494. - - 16 Oct 2009; Peter Volkov -xneur-0.9.5.ebuild, - -files/xneur-0.9.5-gcc44.patch, +xneur-0.9.7.ebuild: - Version bump. Patch substituted with shell magic. Imlib/xpm support to - display flag close to cursor was found slow and dropped. Spell is highly - suggested upstream. - - 26 Aug 2009; Peter Volkov -xneur-0.9.4.ebuild, - +xneur-0.9.5.ebuild, +files/xneur-0.9.5-gcc44.patch: - Version bump. Dropped subversion support code from ebuild (not used anyway). - New USE flag: libnotify. - - 01 Jun 2009; Peter Volkov -xneur-0.9.3.ebuild, - -files/xneur-0.9.3-CFLAGS.patch, -files/xneur-0.9.3-build-failure.patch, - +xneur-0.9.4.ebuild: - Version bump. Thank Jan Aniŝĉuk for the patch (bug #169494). - - 17 Apr 2009; Justin Lecher (jlec) xneur-0.9.3.ebuild: - QA quotes around EAPI version - - 03 Apr 2009; Peter Volkov +xneur-0.9.3.ebuild, - +files/xneur-0.9.3-CFLAGS.patch, +files/xneur-0.9.3-build-failure.patch, - +metadata.xml: - New Ebuild for bug 169494. Too many users want xneur but it still crashs and - has known limitations. In Sunrise everybody can easy get it and have a - chance to improve it. - diff --git a/x11-misc/xneur/Manifest b/x11-misc/xneur/Manifest deleted file mode 100644 index 60b1f0bc1..000000000 --- a/x11-misc/xneur/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -AUX 0.15.0-select-gtk.patch 1656 RMD160 2b9469eaa20c1c6bccc372d4ca2893b0825dc38d SHA1 9ea7718ae3fcf7173a6dd49d1f8f0f1d1ebefbbb SHA256 d674c760251f8cec10692ec2688bc364b69291e3ebcd69f8c63d499c4535129a -DIST xneur-0.15.0.tar.bz2 1136568 RMD160 4e112bc286a5be4afe1bd32b63989a7ccf23bd26 SHA1 46795bebb7787d9f6fa092005ffefce423bc7c3c SHA256 ebedf81ac2c8510d60e235ca66c7ed73c306b22b5b3164981a628950b5cb3e70 -EBUILD xneur-0.15.0.ebuild 3042 RMD160 a7b192f3e0fa8ee9dd505a99e927a0037dfb101c SHA1 e6185512fde8344897480814f4cc8e51f17fe2ab SHA256 f061257ce539e79d5ce3d7db5885a0fd45e4ee7761c940c48ef4a39095283e58 -MISC ChangeLog 2671 RMD160 8b9c0a8c837cd5b3c34c66bd6ab517117bb91d72 SHA1 b53523b037f8e61589488e12dd4bdc71180bd83c SHA256 e6a342d7c7d5b159d9810afa894e6c6e300b086c5c71e154326ba2002a34ba99 diff --git a/x11-misc/xneur/files/.svn/entries b/x11-misc/xneur/files/.svn/entries deleted file mode 100644 index 6e506e49b..000000000 --- a/x11-misc/xneur/files/.svn/entries +++ /dev/null @@ -1,62 +0,0 @@ -10 - -dir -11863 -svn://overlays.gentoo.org/proj/sunrise/reviewed/x11-misc/xneur/files -svn://overlays.gentoo.org/proj/sunrise - - - -2011-03-16T21:36:50.178763Z -11829 -mgorny - - - - - - - - - - - - - - -12608f7e-a915-0410-b2f3-ce240db1b126 - -xneur-0.12.0-libnotify-0.7.patch -file - - - - -2011-04-04T19:58:37.000000Z -d90e391dbd3451b691eb8df50abdfc2a -2011-03-16T21:36:50.178763Z -11829 -mgorny - - - - - - - - - - - - - - - - - - - - - -942 - diff --git a/x11-misc/xneur/files/.svn/text-base/xneur-0.12.0-libnotify-0.7.patch.svn-base b/x11-misc/xneur/files/.svn/text-base/xneur-0.12.0-libnotify-0.7.patch.svn-base deleted file mode 100644 index 080dcc680..000000000 --- a/x11-misc/xneur/files/.svn/text-base/xneur-0.12.0-libnotify-0.7.patch.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -diff -ru xneur-0.12.0-orig/lib/notify/popup.c xneur-0.12.0/lib/notify/popup.c ---- xneur-0.12.0-orig/lib/notify/popup.c 2011-01-27 05:25:42.000000000 -0500 -+++ xneur-0.12.0/lib/notify/popup.c 2011-03-12 02:21:20.411001315 -0500 -@@ -27,6 +27,10 @@ - - #include - -+#ifndef NOTIFY_CHECK_VERSION /* macro did not exist before libnotify-0.5.2 */ -+# define NOTIFY_CHECK_VERSION(x,y,z) 0 -+#endif -+ - #include - #include - #include -@@ -73,8 +77,12 @@ - popup_body->header = popup_body->content; - popup_body->content = NULL; - } -- -+ -+#if NOTIFY_CHECK_VERSION(0,7,0) -+ NotifyNotification *notify = notify_notification_new(popup_body->header, popup_body->content, icon); -+#else - NotifyNotification *notify = notify_notification_new(popup_body->header, popup_body->content, icon, NULL); -+#endif - - notify_notification_set_category(notify, type); - notify_notification_set_urgency(notify, urgency); diff --git a/x11-misc/xneur/files/0.15.0-select-gtk.patch b/x11-misc/xneur/files/0.15.0-select-gtk.patch deleted file mode 100644 index 0beed7d25..000000000 --- a/x11-misc/xneur/files/0.15.0-select-gtk.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- configure.in.orig 2011-12-06 19:43:49.934493120 +0100 -+++ configure.in 2011-12-06 19:43:57.365437555 +0100 -@@ -192,16 +192,28 @@ - AC_ARG_WITH(libnotify, [ --without-libnotify Compile without libnotify message support]) - if test "x$with_libnotify" != "xno"; then - -- AC_ARG_WITH(gtk, [ --with-gtk Compile with additional GTK support]) -- if test "x$with_gtk" == "xyes"; then -- PKG_CHECK_MODULES(GTK, [gtk+-3.0], found_gtk="yes", found_gtk="no") -- if test "x$found_gtk" = "xno"; then -- PKG_CHECK_MODULES(GTK, [gtk+-2.0]) -- fi -+ AC_ARG_WITH(gtk, [ --with-gtk[[=ARG]] Compile with additional GTK support ARG=[[yes|no|gtk2|gtk3]] [[default=no]]]) -+ if test "x$with_gtk" != "xno"; then -+ if test "x$with_gtk" = "x"; then -+ with_gtk="gtk3" -+ fi -+ -+ case $with_gtk in -+ gtk2) -+ PKG_CHECK_MODULES(GTK, [gtk+-2.0], found_gtk="yes", found_gtk="no") -+ ;; -+ gtk3|yes) -+ PKG_CHECK_MODULES(GTK, [gtk+-3.0], found_gtk="yes", found_gtk="no") -+ ;; -+ *) -+ AC_MSG_ERROR([Unsupported Gtk+ selected, --with-gtk=[[yes|no|gtk2|gtk3]]]) -+ ;; -+ esac -+ -+ PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.4.0]) -+ AC_DEFINE(WITH_LIBNOTIFY, 1, [Define if you want libnotify message support]) - fi - -- PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.4.0]) -- AC_DEFINE(WITH_LIBNOTIFY, 1, [Define if you want libnotify message support]) - fi - - AC_ARG_WITH(plugins, [ --without-plugins Compile without plugins support]) -@@ -331,7 +343,7 @@ - fi - - if test "x$with_popup" != "xno"; then -- if test "x$with_gtk" == "xyes"; then -+ if test "x$found_gtk" == "xyes"; then - cat <; - +x11-misc/xwinmosaic-9999.ebuild: - Initial import. diff --git a/x11-misc/xwinmosaic/Manifest b/x11-misc/xwinmosaic/Manifest deleted file mode 100644 index 211559bb1..000000000 --- a/x11-misc/xwinmosaic/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -EBUILD xwinmosaic-9999.ebuild 658 RMD160 ba2e61eaaad3a2395a79cf31a379d92fb8c27ffb SHA1 73d6221ce2d8b436598afc9836bec26ad386b6d5 SHA256 22b7a0304331374fc72bf1b7bda68a7b42885982a09c90ce3ca1eabf347aaa06 -MISC ChangeLog 264 RMD160 84c9b6523bd94502565e00c1bdccddf211a54a9c SHA1 ae3de755bd27bbfde5c5f1ba73585c3a4a6964f9 SHA256 4e45b6525313f89af60526711e260bd1c8d2dcb684d045bc8241667d0b4b2c81 -MISC metadata.xml 309 RMD160 55ffa622be8161e6a744404762fa2b10bc4f4cb6 SHA1 f571f1260efe967cb35b0c72e87835e3cd468ed1 SHA256 9b162897b263399eb3a950d413fd4e31c6d5a987c7b5caf3ab8fa9e8c2b1b6d4 diff --git a/x11-misc/xwinmosaic/metadata.xml b/x11-misc/xwinmosaic/metadata.xml deleted file mode 100644 index d4ff1587b..000000000 --- a/x11-misc/xwinmosaic/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - daks12@gmail.com - Dmitry 'daks' Fomenko - - - Install contrib scripts. - - diff --git a/x11-misc/xwinmosaic/xwinmosaic-9999.ebuild b/x11-misc/xwinmosaic/xwinmosaic-9999.ebuild deleted file mode 100644 index bc12b2d08..000000000 --- a/x11-misc/xwinmosaic/xwinmosaic-9999.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit git-2 cmake-utils - -DESCRIPTION="X11 window switcher with fancy look." -HOMEPAGE="http://github.com/soulthreads/xwinmosaic" -SRC_URI="" - -EGIT_REPO_URI="git://github.com/soulthreads/xwinmosaic.git" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="debug scripts" - -RDEPEND="x11-libs/libX11 - =x11-libs/gtk+-2*" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -DOCS=( "README.md" ) - -src_unpack() { - git-2_src_unpack -} - -src_configure() { - local mycmakeargs=( - $(cmake-utils_use_with scripts SCRIPTS) - ) - cmake-utils_src_configure -} diff --git a/x11-plugins/obvious/ChangeLog b/x11-plugins/obvious/ChangeLog deleted file mode 100644 index 2ba131aff..000000000 --- a/x11-plugins/obvious/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for x11-plugins/obvious -# Copyright 2011-2011 Gentoo Foundation; Distributed under the GPL v3 -# $Header: $ - -*obvious-3.4.10 (06 Jul 2011) -*obvious-9999 (06 Jul 2011) - - 06 Jul 2011; Dmitry 'daks' Fomenko - +obvious-3.4.10.ebuild, +obvious-9999.ebuild, +metadata.xml: - Initial ebuild. diff --git a/x11-plugins/obvious/Manifest b/x11-plugins/obvious/Manifest deleted file mode 100644 index e7ef35704..000000000 --- a/x11-plugins/obvious/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -EBUILD obvious-3.4.10.ebuild 994 RMD160 228009f87f47c01cec2148c7e573387a21b2e07a SHA1 296f542bb8d8d67a6417d4ee875579c42ac5c7cb SHA256 93caa9bce0f7ec1c329c4591870fd161f6308086f8cd9f2c1441f5cc9e51638f -EBUILD obvious-9999.ebuild 995 RMD160 dd39983fc428de8317ac3611910285b87a1797a9 SHA1 c5f5391ac0e0d2c7dcf031b3f5babe3fff5728ee SHA256 004c3f22309019b8c09f6ab645d03ec3872a9b916821f37000cf81b9c654578b -MISC ChangeLog 316 RMD160 e43da9e2208b7437dbe27dc3730374acc4135f5e SHA1 47d204c6cb0077b7d8fcbfab442c9a8615caff24 SHA256 dcfee28434d8fac81a2fb711a007d951f83e2e72a57a388e16ad3ac5ea79d036 -MISC metadata.xml 261 RMD160 fd6c87fa63054c379e842b826f994dce900bb013 SHA1 471683d4ccc2d0934e4f154b51de1be0435f508b SHA256 c4a2402d01197b6c1a7476c5b2b1ec7552b4acbc7dd51c7d775c4100c6324c8d diff --git a/x11-plugins/obvious/metadata.xml b/x11-plugins/obvious/metadata.xml deleted file mode 100644 index 234b4095d..000000000 --- a/x11-plugins/obvious/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - no-herd - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/x11-plugins/obvious/obvious-3.4.10.ebuild b/x11-plugins/obvious/obvious-3.4.10.ebuild deleted file mode 100644 index d99911706..000000000 --- a/x11-plugins/obvious/obvious-3.4.10.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/vicious/vicious-2.0.2.ebuild,v 1.2 2011/06/11 21:08:24 maekke Exp $ - -EAPI="3" - -inherit git-2 - -DESCRIPTION="Set of widgets for x11-wm/awesome that provide helpful information" -HOMEPAGE="https://awesome.naquadah.org/wiki/Obvious" -EGIT_REPO_URI="git://git.mercenariesguild.net/obvious.git" - -unset EGIT_MASTER EGIT_BRANCH EGIT_COMMIT -if [[ ${PV} == *9999* ]]; then - KEYWORDS="" -else - KEYWORDS="~amd64 ~x86" - EGIT_COMMIT="v${PV}" -fi - -LICENSE="MIT" -SLOT="0" -IUSE="" - -DEPEND="" -RDEPEND="=x11-wm/awesome-3.4*" - -src_unpack() { - git-2_src_unpack -} - -src_install() { - dodoc README TODO || die "dodoc failed" - insinto /usr/share/awesome/lib/obvious - doins -r basic_mpd battery bluetooth clock cpu fs_usage gps io keymap_switch lib loadavg mem net \ - popup_run_prompt temp_info umts volume_alsa volume_freebsd wlan init.lua || die "Install failed" -} diff --git a/x11-plugins/obvious/obvious-9999.ebuild b/x11-plugins/obvious/obvious-9999.ebuild deleted file mode 100644 index 90488316f..000000000 --- a/x11-plugins/obvious/obvious-9999.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/vicious/vicious-2.0.2.ebuild,v 1.2 2011/06/11 21:08:24 maekke Exp $ - -EAPI="3" - -inherit git-2 - -DESCRIPTION="Set of widgets for x11-wm/awesome that provide helpful information" -HOMEPAGE="https://awesome.naquadah.org/wiki/Obvious" -EGIT_REPO_URI="git://git.mercenariesguild.net/obvious.git" - -unset EGIT_MASTER EGIT_BRANCH EGIT_COMMIT -if [[ ${PV} == *9999* ]]; then - KEYWORDS="" -else - KEYWORDS="~amd64 ~x86" - EGIT_COMMIT="v${PV}" -fi - -LICENSE="MIT" -SLOT="0" -IUSE="" - -DEPEND="" -RDEPEND="=x11-wm/awesome-${PV}" - -src_unpack() { - git-2_src_unpack -} - -src_install() { - dodoc README TODO || die "dodoc failed" - insinto /usr/share/awesome/lib/obvious - doins -r basic_mpd battery bluetooth clock cpu fs_usage gps io keymap_switch lib loadavg mem net \ - popup_run_prompt temp_info umts volume_alsa volume_freebsd wlan init.lua || die "Install failed" -} diff --git a/x11-plugins/pidgin-window_merge/ChangeLog b/x11-plugins/pidgin-window_merge/ChangeLog deleted file mode 100644 index 3d07ebfee..000000000 --- a/x11-plugins/pidgin-window_merge/ChangeLog +++ /dev/null @@ -1,17 +0,0 @@ -# ChangeLog for x11-plugins/pidgin-window_merge -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - - -*pidgin-window_merge-0.3_p20121111.ebuild (16 Mar 2013) - - 16 Mar 2013; Dmitry 'daks' Fomenko daks12@gmail.com - +pidgin-window_merge-0.3_p20121111.ebuild: - Version bump. - -*pidgin-window_merge-0.2_p20120420 (04 Jul 2012) - - 04 Jul 2012; Dmitry 'daks' Fomenko daks12@gmail.com - +pidgin-window_merge-0.2_p20120420.ebuild, +metadata.xml: - Initial import from layman/sunrise. - diff --git a/x11-plugins/pidgin-window_merge/Manifest b/x11-plugins/pidgin-window_merge/Manifest deleted file mode 100644 index a16bfe549..000000000 --- a/x11-plugins/pidgin-window_merge/Manifest +++ /dev/null @@ -1,6 +0,0 @@ -DIST pidgin-window_merge-0.2_p20120420.tar.gz 27720 SHA256 8aa30f41189a6f8e5bc16277034675dfe6bec4d756f3e4ea86730e3e10102518 -DIST pidgin-window_merge-0.3_p20121111.tar.gz 33144 SHA256 f6c4149b13c125f02476f9c323ed70ff929d317df6aa0adc993abd8b3249bcce SHA512 49f477285ef4c550435752e9995455a7f88057b01c449036a16f7c2bf6306e3b197eddfde8ab35cc241ea7e71dd67ac2d38fd9bb0119b9ee5bcec59d5597f376 WHIRLPOOL ea8a17d1860cf925365d613ebb67cf854d75ac80945d15992443e263cad155a8d51edef1c51569e1957e2320d0609ad71bfd72c18c92c7577db20848df7737f0 -EBUILD pidgin-window_merge-0.2_p20120420.ebuild 887 SHA256 31db2e7fc30b5b64fe57c6f092caf08da80cff274698da4224bef3211f4f35d5 SHA512 07a6392ae7c8a18ee2ff3f21aa1f6e9d849d081f6da5ff754db3ba9cbcfd2e9c2c973e417b9a1c3e256829fdb0eb3265f65e0dc34b65e528f5d861fd52cb1c90 WHIRLPOOL 04b589946eec3afcb2291fcc7fd3062e7c7adaa5e36caf6b7bcb3a8f8ae4a5346830e88508b774e835b00da3e87fd04ce060b05ff70d1fb05612d62fdec6748d -EBUILD pidgin-window_merge-0.3_p20121111.ebuild 887 SHA256 2dfe0a53449c393d7584a40869a1ae6dbef096474d99150cea4e7ab29a46150d SHA512 1e22e89f575736f1395fe1506fb3f33008a6341d2036aa8294154a3a4a5a773c36fa0e7adb33dbff01de991722dfbb9d3996955943b0e0c9de42f985cc955527 WHIRLPOOL c348ad03c98ad9017778e5b3a963e09f807f26b539332ff1f6bb6232314ab5653a9806056cc7a635a671f6954fb501352e128c40e6a7a38a4aaf09d79cbad6e5 -MISC ChangeLog 509 SHA256 ccba109d9b64f1705a78c6cd422b0ae703bc9dfe7ea3f3f6c59d85ac635a62fe SHA512 1a6a777b99125c66dbdec2744477c1103c281e65aefb38b35f6eafa7d1545c020ca103ae9630b87b48dd1ab791383d4da96bf698908b442acd41b5264ffb7e5a WHIRLPOOL 2504f0da54d362ffe304cbd48804943817d35acc99911f2ed84488581555e2e855e351bdf17902180c1942218f22e2de8dc2c0003ff9ef4f3ffd2aa509e4148d -MISC metadata.xml 239 SHA256 46132d153ef5ee1075082ff571718736b90a2a48f85d29c7e38e07ba81322e42 SHA512 6355a32d108ed321ca77474192a5e83a05e173299dd34c95fe79b4bf464bb3d92b788ae4a03ee6a5235b17b22cffda0f1d557058a011c6d0b5eaf6ad54b7bbb5 WHIRLPOOL 07155d7fadf9c83395761153866d53dac1133efbb0e99057070bb83d612b5b385739bd39a5b0db363f28238f349fd8702f3b53db330ab588e846b47c52567f83 diff --git a/x11-plugins/pidgin-window_merge/metadata.xml b/x11-plugins/pidgin-window_merge/metadata.xml deleted file mode 100644 index 075818f09..000000000 --- a/x11-plugins/pidgin-window_merge/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - daks12@gmail.com - Dmitry 'daks' Fomenko - - diff --git a/x11-plugins/pidgin-window_merge/pidgin-window_merge-0.2_p20120420.ebuild b/x11-plugins/pidgin-window_merge/pidgin-window_merge-0.2_p20120420.ebuild deleted file mode 100644 index dc9f447a5..000000000 --- a/x11-plugins/pidgin-window_merge/pidgin-window_merge-0.2_p20120420.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 -inherit autotools - -DESCRIPTION="A Pidgin plugin that merges the Buddy List window with a conversation window" -HOMEPAGE="https://github.com/dm0-/window_merge" -COMMIT="cf1dba5ff3b1006552a7a779b3bf9acfd56e9e82" -SRC_URI="http://github.com/dm0-/${PN#pidgin-}/tarball/${COMMIT} -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -RDEPEND="dev-libs/glib:2 - net-im/pidgin[gtk]" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -S="${WORKDIR}"/dm0--${PN#pidgin-}-${COMMIT:0:7} -src_prepare(){ - sed -e "/ACLOCAL_AMFLAGS/d" -i Makefile.am || die - eautoreconf -} - -pkg_postinst(){ - ewarn "This plugin and infopane plugin (purple-plugin_pack) activated" - ewarn "at the same time cause a segfault in pidgin" - ewarn "see https://github.com/dm0-/window_merge/issues/4" -} diff --git a/x11-plugins/pidgin-window_merge/pidgin-window_merge-0.3_p20121111.ebuild b/x11-plugins/pidgin-window_merge/pidgin-window_merge-0.3_p20121111.ebuild deleted file mode 100644 index a2beafd75..000000000 --- a/x11-plugins/pidgin-window_merge/pidgin-window_merge-0.3_p20121111.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 -inherit autotools - -DESCRIPTION="A Pidgin plugin that merges the Buddy List window with a conversation window" -HOMEPAGE="https://github.com/dm0-/window_merge" -COMMIT="fc46a86fdf06ed82f231b60ccc80717dd60f8112" -SRC_URI="http://github.com/dm0-/${PN#pidgin-}/tarball/${COMMIT} -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -RDEPEND="dev-libs/glib:2 - net-im/pidgin[gtk]" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -S="${WORKDIR}"/dm0--${PN#pidgin-}-${COMMIT:0:7} -src_prepare(){ - sed -e "/ACLOCAL_AMFLAGS/d" -i Makefile.am || die - eautoreconf -} - -pkg_postinst(){ - ewarn "This plugin and infopane plugin (purple-plugin_pack) activated" - ewarn "at the same time cause a segfault in pidgin" - ewarn "see https://github.com/dm0-/window_merge/issues/4" -} diff --git a/x11-terms/lilyterm/ChangeLog b/x11-terms/lilyterm/ChangeLog deleted file mode 100644 index 26965c6c1..000000000 --- a/x11-terms/lilyterm/ChangeLog +++ /dev/null @@ -1,21 +0,0 @@ -# ChangeLog for x11-terms/lilyterm -# Copyright 2012-2013 Gentoo Foundation; Distributed under the GPL v3 -# $Header: $ - -*lilyterm-0.9.9.4 (16 Mar 2013) - - 16 Mar 2013; Dmitry 'daks' Fomenko - +lilyterm-0.9.9.4.ebuild, -lilyterm-0.9.9.1.ebuild: - Version bump, purge old ebuild. - -*lilyterm-0.9.9.2 (21 Jun 2012) - - 21 Jun 2012; Dmitry 'daks' Fomenko - +lilyterm-0.9.9.2.ebuild: - Version bump. - -*lilyterm-0.9.9.1 (13 Jun 2012) - - 13 Jun 2012; Dmitry 'daks' Fomenko - +lilyterm-0.9.9.1.ebuild, +metadata.xml, +ChangeLog: - Initial import based on the bug #334689. \ No newline at end of file diff --git a/x11-terms/lilyterm/Manifest b/x11-terms/lilyterm/Manifest deleted file mode 100644 index cbb9b5e8e..000000000 --- a/x11-terms/lilyterm/Manifest +++ /dev/null @@ -1,6 +0,0 @@ -DIST lilyterm-0.9.9.2.tar.gz 328443 SHA256 980902102f8d2f233ac1cb01f509dcc595e69a5e9ac783ef2d2e59599a3ca9b6 -DIST lilyterm-0.9.9.4.tar.gz 346180 SHA256 b72626431d4f5645e0e0f18449319fbb69bef4eab4345d5e37cde0ae712a5d74 SHA512 2fcd9d31a28d6bf9d953cd77b38cb3c67591dd04157f0efd418ce3ac9eab0f8090156435207c8bc18e619dda45e726f3346b1344f2d37fd308fa802476d3b5da WHIRLPOOL 401ea44884b836fbf36e89cf20c850607723c35f9e25bcd604816d6426bc656301e9b66845e79e1f109d97a9099af4cf3f6ce375ee564eaf4f5cce62d56ea100 -EBUILD lilyterm-0.9.9.2.ebuild 1117 SHA256 dada004104defdd2b09b00d83920f6c91c1bacd05db96d76762bc7b043411d2e SHA512 0cd42f1964064e6a824c1a1a26dcd3d3ed108955b1fb140ea12a7205f8ec2d09359eaee719ab2ce18e673c719ecae6e22c9737b22823027b3c07462a7541a6bb WHIRLPOOL 47ae92b71b35274486287a07501de99867d3b67f31ec2eead05b07d2c3e329e312584f92e23166de919f127842ddd8b3fdce269a7aa384deb739a7e804e72c95 -EBUILD lilyterm-0.9.9.4.ebuild 1117 SHA256 57d3b1ea0b7b0dbffde70d23ab2c24ec973d7e9d8973cb51e89f4fbb4e824665 SHA512 d9feaa4ce0bd252bec8e6a7d29d5168ba0cf02b7e794216b613b0938399d20889396c755ce5b4cc5f958ffd462d9e831861bc0ce74223899d9a587d5dbd2321e WHIRLPOOL de5eddd4953e5d778ed4c480c19bb7fa308e19208c4530ce2b823975f77218a0cd89c4c74d7e4674b1d24aad89497b73c7d6303877f31c30afa2d3dced0ab077 -MISC ChangeLog 617 SHA256 f32948bd5fed88ab5de1a7f56152b3c573f7f24a226db6ee1adc6d1fdbeb1433 SHA512 82dee021cb8a702ac2c99d350614a66acf28dbf31ee0348e198a609b28f676af66060acf5cf28d5776aff47f77be3a0c8c69fdd6e4a80de3912299b275726f54 WHIRLPOOL f196bac50b47e27f81253931baca1f9c637153df7222f33450790f600c4af1f34473b0188210b6ec33d11c36e559b326ab81d4742d6b53f9fb09e1d651fc63c4 -MISC metadata.xml 316 SHA256 fae41e3cdc1fea8f4b0486ac45291f1d564bd5498c1879d0a74fad880d4ef81d SHA512 fdd050aa84d33db22857bf0005c385f69da858f8b9a23e4d962e078a533cfff13f3cd325843f05f9186c75fa47d0828e39877b43b5422642b845756873dd3901 WHIRLPOOL add5b91eccbccc0ebc7f5167982ce97eb3a2a6389c744c70f2a015748650406c421e57e99a4137d5d96e02a94a8684b85dfe672e0ee24381dcf432f1ee71ed70 diff --git a/x11-terms/lilyterm/lilyterm-0.9.9.2.ebuild b/x11-terms/lilyterm/lilyterm-0.9.9.2.ebuild deleted file mode 100644 index f6e1d3e35..000000000 --- a/x11-terms/lilyterm/lilyterm-0.9.9.2.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit versionator autotools - -MY_P="${P/_/~}" - -DESCRIPTION="A light and easy to use libvte based X Terminal Emulator" -HOMEPAGE="http://lilyterm.luna.com.tw" -SRC_URI="${HOMEPAGE}/file/${MY_P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="debug nls safe-mode" - -RDEPEND="dev-libs/glib:2 - x11-libs/gtk+:2 - x11-libs/vte:0" -DEPEND="${RDEPEND} - dev-util/pkgconfig - dev-util/intltool - sys-devel/gettext" - -DOCS=( AUTHORS ChangeLog README TODO data/lilyterm.conf ) - -S=${WORKDIR}/${MY_P} - -src_prepare() { - sed -e '/DOCDIR/d' -i "${S}"/data/Makefile || die "sed0 failed" - sed -e '/EXAMPLES_DIR/d' -i "${S}"/data/Makefile || die "sed1 failed" - sed -e 's/xpm \\$//' -i "${S}"/data/Makefile || die "sed2 failed" -} - -src_configure() { - local myconf="--prefix=/usr --sysconfdir=/etc/xdg" - use debug && myconf+=" --enable-debug" - use nls || myconf+=" --disable-nls" - use safe-mode || myconf+=" --disable-safe-mode" - einfo "Doing ./configure \"${myconf}\"" - eval "./configure ${myconf}" -} diff --git a/x11-terms/lilyterm/lilyterm-0.9.9.4.ebuild b/x11-terms/lilyterm/lilyterm-0.9.9.4.ebuild deleted file mode 100644 index 67420f086..000000000 --- a/x11-terms/lilyterm/lilyterm-0.9.9.4.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit versionator autotools - -MY_P="${P/_/~}" - -DESCRIPTION="A light and easy to use libvte based X Terminal Emulator" -HOMEPAGE="http://lilyterm.luna.com.tw" -SRC_URI="${HOMEPAGE}/file/${MY_P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="debug nls safe-mode" - -RDEPEND="dev-libs/glib:2 - x11-libs/gtk+:2 - x11-libs/vte:0" -DEPEND="${RDEPEND} - dev-util/pkgconfig - dev-util/intltool - sys-devel/gettext" - -DOCS=( AUTHORS ChangeLog README TODO data/lilyterm.conf ) - -S=${WORKDIR}/${MY_P} - -src_prepare() { - sed -e '/DOCDIR/d' -i "${S}"/data/Makefile || die "sed0 failed" - sed -e '/EXAMPLES_DIR/d' -i "${S}"/data/Makefile || die "sed1 failed" - sed -e 's/xpm \\$//' -i "${S}"/data/Makefile || die "sed2 failed" -} - -src_configure() { - local myconf="--prefix=/usr --sysconfdir=/etc/xdg" - use debug && myconf+=" --enable-debug" - use nls || myconf+=" --disable-nls" - use safe-mode || myconf+=" --disable-safe-mode" - einfo "Doing ./configure \"${myconf}\"" - eval "./configure ${myconf}" -} diff --git a/x11-terms/lilyterm/metadata.xml b/x11-terms/lilyterm/metadata.xml deleted file mode 100644 index 4b17a9743..000000000 --- a/x11-terms/lilyterm/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - daks12@gmail.com - Dmitry 'daks' Fomenko - - - Enable running LilyTerm in safe mode - - diff --git a/xfce-base/exo/Manifest b/xfce-base/exo/Manifest deleted file mode 100644 index ab00e4aff..000000000 --- a/xfce-base/exo/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -AUX exo-0.8.0-chromium-22.patch 588 SHA256 7d03cc94cc5c072ee35a8d72c10ff3d0dfc8297949b88744bd14c342cb925e84 SHA512 61d432296463a25b0f2e7d4dd0370be0328b2cc1b5e08e892739ab58935bf1134cd53bf664adb97098ea3391f467691ef375a76564f3bfcb6ce8355bec5da29a WHIRLPOOL 36234e6babab7a5a0d10a0f7b324ff040cbd5e30f3575e90640961ab2d24419ffbf1e37f03cda40b8cc5c8dce716e47bf952b547ddde631423fc3ed23c99de72 -DIST exo-0.8.0.tar.bz2 1120701 SHA256 6e21aa30692affcb45fc8283d034da4a02221d26e3e1facb968d04fed4ba05b0 SHA512 28b7ad276f0efdb519145c7e09e8fd88e7c28dea67e0c9cb5384703e126cd935dad86d57ea207ea7c5d6d1d6838ed54c55b72e2a68095e79c743fddb0081cbf4 WHIRLPOOL e44e0432821b678b84ed94862c870ed5380e34d00a1cfe32cff42621f4d3062f7c84305c9836c4ff3b60619c4fe321a1b392be94c55c3014735de53c106e636b -EBUILD exo-0.8.0-r2.ebuild 1292 SHA256 1b55f5c0bd6ef4a2422c770293a1a0665d5c3a2c1a9ba261223d10840ce2b7be SHA512 4871f8ef38ba2caa887b20f9ed9c89265cf27f056a742732b675f81f15b35ab4f64b62cb1dca7f2459db265d7093e67908799deee4e15670d4483f9806fa89d9 WHIRLPOOL e0125e480e8fed278bad6b54eb58b82c69f54c3a322e574b8f91036db94dd710dbe77163f0bbe1a857444d7b9a9bca759f5d788bc58a39bb887ceb4eb23acd39 -MISC metadata.xml 159 SHA256 900ea49b6703fce452e205b85226bf1f994725963e5840da501182e7487d0e63 SHA512 000eb10e453390fb27843585adf354d725e77d881553d97a1a242bf06578a402ee4a924d9d8205a3fa687a59e2402bc9f3e1c227e448e05026354c196cf0a4f3 WHIRLPOOL 6f01aa01b8124d752be8e6c550ffdfc9093d45b206771c924ce25ce3f0daf006a669721d1385ff1bc803df342322d1c264f2905d3ccc44686c937deae8308ec3 diff --git a/xfce-base/exo/exo-0.8.0-r2.ebuild b/xfce-base/exo/exo-0.8.0-r2.ebuild deleted file mode 100644 index 79f6ccbca..000000000 --- a/xfce-base/exo/exo-0.8.0-r2.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-base/exo/exo-0.8.0.ebuild,v 1.10 2012/09/09 14:33:35 armin76 Exp $ - -EAPI=5 -inherit xfconf - -DESCRIPTION="Extensions, widgets and framework library with session support for the Xfce desktop environment" -HOMEPAGE="http://www.xfce.org/projects/" -SRC_URI="mirror://xfce/src/xfce/${PN}/${PV%.*}/${P}.tar.bz2" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris" -IUSE="debug" - -RDEPEND=">=dev-lang/perl-5.6 - >=dev-libs/glib-2.24 - dev-perl/URI - >=x11-libs/gtk+-2.20:2 - >=xfce-base/libxfce4ui-4.10 - >=xfce-base/libxfce4util-4.10" -DEPEND="${RDEPEND} - dev-util/intltool - virtual/pkgconfig - sys-devel/gettext" - -src_unpack() { - unpack "${A}" - cd "${S}" - - # quiet run chromium - epatch "${FILESDIR}/exo-0.8.0-chromium-22.patch" -} - -pkg_setup() { - XFCONF=( - --docdir="${EPREFIX}"/usr/share/doc/${PF} - $(xfconf_use_debug) - --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html - ) - - [[ ${CHOST} == *-darwin* ]] && XFCONF+=( --disable-visibility ) #366857 - - DOCS=( AUTHORS ChangeLog HACKING NEWS README THANKS TODO ) -} diff --git a/xfce-base/exo/files/exo-0.8.0-chromium-22.patch b/xfce-base/exo/files/exo-0.8.0-chromium-22.patch deleted file mode 100644 index 34a7d5bc0..000000000 --- a/xfce-base/exo/files/exo-0.8.0-chromium-22.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c -index a3a8c60..a37ed83 100644 ---- a/exo-helper/exo-helper.c -+++ b/exo-helper/exo-helper.c -@@ -422,7 +422,7 @@ exo_helper_execute (ExoHelper *helper, - succeed = FALSE; - break; - } -- else if (result > 0 && status != 0) -+ else if (result > 0 && status != 0 && status != 5888) - { - /* the command failed */ - err = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (EIO), g_strerror (EIO)); diff --git a/xfce-base/exo/metadata.xml b/xfce-base/exo/metadata.xml deleted file mode 100644 index d56729e92..000000000 --- a/xfce-base/exo/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - xfce -