summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Clément <caratorn@gmail.com>2008-04-12 09:33:03 +0000
committerCharles Clément <caratorn@gmail.com>2008-04-12 09:33:03 +0000
commitb16cfc9999781eedd527d151f8f184eb6af48d70 (patch)
tree7b89d298641c193acb40d81015344611fb86de23 /media-libs
parentdev-util/guilt: dev-util/guilt: new version 0.30 released from upstream, http... (diff)
downloadsunrise-reviewed-b16cfc9999781eedd527d151f8f184eb6af48d70.tar.gz
sunrise-reviewed-b16cfc9999781eedd527d151f8f184eb6af48d70.tar.bz2
sunrise-reviewed-b16cfc9999781eedd527d151f8f184eb6af48d70.zip
media-libs/libinstrudeo: Version bump, fix ffmpeg export
svn path=/sunrise/; revision=6028
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libinstrudeo/ChangeLog7
-rw-r--r--media-libs/libinstrudeo/Manifest7
-rw-r--r--media-libs/libinstrudeo/files/img_convert_to_sws_scale.patch79
-rw-r--r--media-libs/libinstrudeo/libinstrudeo-0.1.4.ebuild (renamed from media-libs/libinstrudeo/libinstrudeo-0.1.3.ebuild)14
4 files changed, 95 insertions, 12 deletions
diff --git a/media-libs/libinstrudeo/ChangeLog b/media-libs/libinstrudeo/ChangeLog
index 75dc75d63..fb13740b2 100644
--- a/media-libs/libinstrudeo/ChangeLog
+++ b/media-libs/libinstrudeo/ChangeLog
@@ -1,7 +1,12 @@
# ChangeLog for media-libs/libinstrudeo
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 12 Apr 2008; Charles Clément <caratorn@gmail.com>
+ -libinstrudeo-0.1.3.ebuild, +libinstrudeo-0.1.4.ebuild,
+ +files/img_convert_to_sws_scale.patch:
+ Version bump, fix ffmpeg export
+
16 Oct 2007; Jakub Moc <jakub@gentoo.org> libinstrudeo-0.1.3.ebuild:
libdts is deprecated, use libdca by default
diff --git a/media-libs/libinstrudeo/Manifest b/media-libs/libinstrudeo/Manifest
index 38971e7f6..a49a81255 100644
--- a/media-libs/libinstrudeo/Manifest
+++ b/media-libs/libinstrudeo/Manifest
@@ -1,4 +1,5 @@
-DIST libinstrudeo-0.1.3.tar.gz 790204 RMD160 de6f8742bff89d405bc7ef63a824d4ad631a9856 SHA1 24040e3afd1430b10b25e932d2c7b3502b1442a5 SHA256 906442f01ed55f89106d43c30536385899abfdf8929b5bc532fa853fe345d6f5
-EBUILD libinstrudeo-0.1.3.ebuild 1186 RMD160 a8abdd877e5a142ee1b2fffb551c05fa8430ee4b SHA1 f9fbf3a64f187339dfea1afcef8371d89dd02c8c SHA256 f4b6e48eb8de458e7e19e8779e1f0cff82699bed65174f1b4fec4515044d3e11
-MISC ChangeLog 1080 RMD160 c4244b7edfab4343074133a1e1bc0486bb74ba12 SHA1 a68c311583003a1d6a413fa3e59c978aaa67d901 SHA256 97d676237d966e940edede5bcdcc588fe4da0e15f57d29fab4c1e0162830db7d
+AUX img_convert_to_sws_scale.patch 3909 RMD160 d83d755f0d7096ac757da0fcb7a02564714431ae SHA1 f584c9db088250813fa6f87d83d8e9a685fb899d SHA256 8fb30c614089c3ed000a98da46ddd9dbefb183409d11fb3f423a907c9a420a77
+DIST libinstrudeo-0.1.4.tar.gz 791506 RMD160 43503ba0e4164abddbd8291cd7381cb6216c6d37 SHA1 49ca4a084edc61d84c04899dde26206ed6f0def7 SHA256 6e9fd562ce138d3e27d06ebadc2200afee6ac5c00e9f13793cb18af7ea24671e
+EBUILD libinstrudeo-0.1.4.ebuild 1098 RMD160 068e794684db1bf4df68155c191c1763ba5b482f SHA1 b0fa4c5a9bc9ecae3c7cf3e4ac13ca153d1bf1b7 SHA256 55766de219f722d33333ddf16c45063963916bd69138a8fbbec9e6d5068c3013
+MISC ChangeLog 1267 RMD160 7e1e19a000985facac47be6094b9b4ea4dce4a2b SHA1 0993730f49fb4b6095d1bee7d9b12c9eaaa4b935 SHA256 319468dfc3fbd1cdf56aacb67996f88d36dc7ce9e092e92bd8a57e8ea38e5c1d
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/media-libs/libinstrudeo/files/img_convert_to_sws_scale.patch b/media-libs/libinstrudeo/files/img_convert_to_sws_scale.patch
new file mode 100644
index 000000000..881ecd159
--- /dev/null
+++ b/media-libs/libinstrudeo/files/img_convert_to_sws_scale.patch
@@ -0,0 +1,79 @@
+Index: libinstrudeo-0.1.4/configure.ac
+===================================================================
+--- libinstrudeo-0.1.4.orig/configure.ac
++++ libinstrudeo-0.1.4/configure.ac
+@@ -92,6 +92,7 @@ AC_CHECK_LIB([vorbisenc], [vorbis_encode
+ AC_CHECK_LIB([theora], [theora_info_init], , AC_MSG_ERROR([*** theora missing - please install libtheora development package ***]))
+ AC_CHECK_LIB([avcodec], [avcodec_init], , AC_MSG_ERROR([*** avcodec missing - please install avcodec development package ***]), [-lavutil])
+ AC_CHECK_LIB([avformat], [av_open_input_stream], , AC_MSG_ERROR([*** avformat missing - please install avformat development package ***]), [-lavutil])
++AC_CHECK_LIB([swscale], [sws_scale], , AC_MSG_ERROR([*** swscale missing - please install swscale development package ***]), [-lswscale])
+ dnl This should pass, since we successfully linked in the two previous checks
+ dnl This step add the necessary -lavutil to the LIBS variable
+ dnl Note: specifying a method caused troubles, so I switched to main
+@@ -144,4 +145,4 @@ AC_FUNC_STRTOD
+ AC_CHECK_FUNCS([ftime gethostbyname gettimeofday localtime_r memset munmap select setlocale socket sqrt strchr strdup strerror strrchr strstr strtoull])
+
+ AC_CONFIG_FILES(Makefile src/Makefile src/libinstrudeo/webservice/Makefile src/libinstrudeo/Makefile src/isdexport/Makefile data/Makefile data/commentboxes/Makefile data/fonts/Makefile)
+-AC_OUTPUT
+\ Pas de fin de ligne à la fin du fichier.
++AC_OUTPUT
+Index: libinstrudeo-0.1.4/src/libinstrudeo/isdffmpegexporter.cpp
+===================================================================
+--- libinstrudeo-0.1.4.orig/src/libinstrudeo/isdffmpegexporter.cpp
++++ libinstrudeo-0.1.4/src/libinstrudeo/isdffmpegexporter.cpp
+@@ -79,6 +79,7 @@ ISDFFmpegExporter::~ISDFFmpegExporter()
+ ISDObject::ISDErrorCode ISDFFmpegExporter::doExport(char* pixelBuffer)
+ {
+ char* grabBuffer;
++ struct SwsContext *toYUV_convert_ctx;
+
+ if (!initOK) {
+ LOG_WARNING("Export routine called without initializing the encoder.");
+@@ -96,6 +97,10 @@ ISDObject::ISDErrorCode ISDFFmpegExporte
+ grabBuffer = (char*)malloc(bufSize);
+ }
+
++ toYUV_convert_ctx = sws_getContext(codecContext->width, codecContext->height, inputPixFmt,
++ outputContext->streams[0]->codec->width, outputContext->streams[0]->codec->height,
++ FFMPEG_STREAM_PIX_FMT, SWS_BICUBIC, NULL, NULL, NULL);
++
+ /*
+ * Note: video time is in milliseconds, so if we have a framerate
+ * of 25, we must increment the loop with 1000/25 milliseconds
+@@ -126,13 +131,13 @@ ISDObject::ISDErrorCode ISDFFmpegExporte
+ }
+
+ //convert input pic to yuv420p
+- if (img_convert(&yuvInputPicture, FFMPEG_STREAM_PIX_FMT, &inputPicture,
+- inputPixFmt, codecContext->width, codecContext->height) < 0)
+- {
+- LOG_WARNING("Pixel format conversion not handled while exporting.");
+- RETURN_ERROR(ISD_EXPORT_FORMAT_ERROR);
+- }
+-
++ if (sws_scale(toYUV_convert_ctx, inputPicture.data, inputPicture.linesize, 0, codecContext->height,
++ yuvInputPicture.data, yuvInputPicture.linesize) < 0)
++ {
++ LOG_WARNING("Pixel format conversion not handled while exporting.");
++ RETURN_ERROR(ISD_EXPORT_FORMAT_ERROR);
++ }
++
+ outSize = avcodec_encode_video(codecContext, outputBuf, outputBufSize, inputFrame);
+ //if zero size, it means the image was buffered
+ if (outSize > 0) {
+Index: libinstrudeo-0.1.4/src/libinstrudeo/isdffmpegexporter.h
+===================================================================
+--- libinstrudeo-0.1.4.orig/src/libinstrudeo/isdffmpegexporter.h
++++ libinstrudeo-0.1.4/src/libinstrudeo/isdffmpegexporter.h
+@@ -47,8 +47,11 @@
+
+ #include <libinstrudeo/isdexporter.h>
+
++extern "C" {
+ #include <ffmpeg/avcodec.h>
+ #include <ffmpeg/avformat.h>
++#include <ffmpeg/swscale.h>
++}
+
+ using namespace std;
+
diff --git a/media-libs/libinstrudeo/libinstrudeo-0.1.3.ebuild b/media-libs/libinstrudeo/libinstrudeo-0.1.4.ebuild
index 5c5be3ed5..433243482 100644
--- a/media-libs/libinstrudeo/libinstrudeo-0.1.3.ebuild
+++ b/media-libs/libinstrudeo/libinstrudeo-0.1.4.ebuild
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+inherit eutils autotools
+
DESCRIPTION="Provides the necessary logic to capture screen recordings and to process them"
HOMEPAGE="http://libinstrudeo.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
@@ -28,21 +30,17 @@ DEPEND=">=dev-cpp/libxmlpp-2.10.0
virtual/glut"
RDEPEND="${DEPEND}"
-src_unpack() {
+src_unpack(){
unpack ${A}
cd "${S}"
- sed -i \
- -e 's#/etc/instrudeo#/usr/share/instrudeo#g' \
- data/commentboxes/Makefile.in \
- data/fonts/Makefile.in \
- src/libinstrudeo/isdcommentbox.h \
- || die "sed failed"
+
+ epatch "${FILESDIR}/img_convert_to_sws_scale.patch"
+ eautoreconf
}
src_compile() {
CXXFLAGS="${CXXFLAGS} -D__STDC_CONSTANT_MACROS" econf || die "econf failed"
emake || die "emake failed"
-
}
src_install() {