--- ffmpeg-php-0.6.0.orig/debian/docs +++ ffmpeg-php-0.6.0/debian/docs @@ -0,0 +1,3 @@ +CREDITS +TODO +EXPERIMENTAL --- ffmpeg-php-0.6.0.orig/debian/watch +++ ffmpeg-php-0.6.0/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://sf.net/ffmpeg-php/ffmpeg-php-(.*)\.tbz2 --- ffmpeg-php-0.6.0.orig/debian/control +++ ffmpeg-php-0.6.0/debian/control @@ -0,0 +1,22 @@ +Source: ffmpeg-php +Section: php +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian PHP Maintainers +Uploaders: Raphael Geissert +Build-Depends: debhelper (>= 5), php5-dev (>= 5.2.0), libavformat-dev, libavcodec-dev, libswscale-dev, libgd2-xpm-dev, php5-cli (>= 5.2.0), php5-gd, quilt, chrpath, hardening-includes +Build-Conflicts: php5-ffmpeg +Standards-Version: 3.8.4 +Homepage: http://ffmpeg-php.sourceforge.net/ +Vcs-Git: git://git.debian.org/pkg-php/ffmpeg-php.git +Vcs-Browser: http://git.debian.org/?p=pkg-php/ffmpeg-php.git;a=summary + +Package: php5-ffmpeg +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${php:Depends} +Recommends: php5-gd +Description: audio and video support via ffmpeg for php5 + Provides access and retrieval of meta-data from all the movies and + audio file formats supported by ffmpeg. Extra features include retrieving and + manipulating frames from video files that can later be also manipulated by + PHP's own image functions. --- ffmpeg-php-0.6.0.orig/debian/compat +++ ffmpeg-php-0.6.0/debian/compat @@ -0,0 +1 @@ +5 --- ffmpeg-php-0.6.0.orig/debian/copyright +++ ffmpeg-php-0.6.0/debian/copyright @@ -0,0 +1,51 @@ +This package was debianized by Raphael Geissert on +Fri, 13 Apr 2007 13:03:17 -0500. + +It was downloaded from: http://ffmpeg-php.sourceforge.net/ + +Upstream authors: + Todd Kirby + Martin Prangl + Alexey Zakhlestin + +Some portions of this software are: +Copyright (C) 2004-2008 by Todd Kirby +Copyright (C) 2008 by Alexey Zakhlestin + +License: + + This package 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. + + This package 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 this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + In addition, as a special exception, the copyright holders of ffmpeg-php + give you permission to combine ffmpeg-php with code included in the + standard release of PHP under the PHP license (or modified versions of + such code, with unchanged license). You may copy and distribute such a + system following the terms of the GNU GPL for ffmpeg-php and the licenses + of the other code concerned, provided that you include the source code of + that other code when and as the GNU GPL requires distribution of source code. + + You must obey the GNU General Public License in all respects for all of the + code used other than standard release of PHP. If you modify this file, you + may extend this exception to your version of the file, but you are not + obligated to do so. If you do not wish to do so, delete this exception + statement from your version. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is: +Copyright (C) 2007, 2008, 2009, 2010 by Raphael Geissert +And is licensed under the GNU GPL version 2 or (at your option) any +later version. --- ffmpeg-php-0.6.0.orig/debian/rules +++ ffmpeg-php-0.6.0/debian/rules @@ -0,0 +1,87 @@ +#!/usr/bin/make -f +EXTN=ffmpeg +BUILD=$(CURDIR)/debian/php5-$(EXTN) +PHP_EX=$(shell /usr/bin/php-config5 --extension-dir) +LFSFLAGS += $(shell getconf LFS_CFLAGS) +CFLAGS ?= -g -O2 + +include /usr/share/quilt/quilt.make + +DEB_BUILD_HARDENING_PIE:=0 +include /usr/share/hardening-includes/hardening.make + +CFLAGS += $(HARDENING_CFLAGS) +LDFLAGS += $(HARDENING_LDFLAGS) + +modules/$(EXTN).so: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh_testdir + phpize5 + CFLAGS="$(CFLAGS) $(LFSFLAGS)" LDFLAGS="$(LDFLAGS)" \ + ./configure --disable-rpath --prefix=$(BUILD)/usr \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --with-php-config=/usr/bin/php-config5 \ + --enable-skip-gd-check + $(MAKE) DESTDIR=$(BUILD) + + touch build-stamp + +test: test-stamp +test-stamp: modules/$(EXTN).so + dh_testdir +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + # prevent php from throwing warnings, causing the tests to fail + ln -s $(PHP_EX)/*.so $(CURDIR)/modules/ + $(MAKE) test 2>&1 | tee test-results.txt + # Print the failed tests output: + @sed -r 's,^ffmpeg\s+[^\[]+\s+\[(tests/\w+)\.phpt\]$$,\1.log,g' \ + < test-results.txt | egrep "^tests/.*\.log" | \ + xargs cat +else + echo 'Skipping test...' +endif + touch $@ + +build: patch build-stamp test + +clean: unpatch + dh_testdir + dh_testroot + $(RM) build-stamp test-stamp test-results.txt + [ ! -d modules ] || { for l in modules/*; do \ + [ ! -L "$$l" ] || unlink "$$l"; \ + done; \ + } + [ ! -f Makefile ] || $(MAKE) clean + phpize5 --clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_installdirs + install -D -m 644 modules/$(EXTN).so debian/php5-$(EXTN)$(PHP_EX)/$(EXTN).so + -chrpath -l debian/php5-$(EXTN)$(PHP_EX)/$(EXTN).so + -chrpath -d debian/php5-$(EXTN)$(PHP_EX)/$(EXTN).so + install -D -m 644 debian/$(EXTN).ini debian/php5-$(EXTN)/etc/php5/conf.d/$(EXTN).ini + +binary-indep: + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/php5-$(EXTN).substvars + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: clean binary-indep binary-arch binary install test --- ffmpeg-php-0.6.0.orig/debian/changelog +++ ffmpeg-php-0.6.0/debian/changelog @@ -0,0 +1,104 @@ +ffmpeg-php (0.6.0-2ubuntu3) precise; urgency=low + + * find_libavcodec.patch: Find libavcodec.so in multiarch dir (LP: #935086) + + -- Andreas Moog Sat, 25 Feb 2012 18:40:30 +0100 + +ffmpeg-php (0.6.0-2ubuntu2) oneiric; urgency=low + + * fix_ftbfs_libav-0.7.patch: fix FTBFS with libav >= 0.7 (LP: #831101) + + -- Fabrice Coutadeur Sat, 03 Sep 2011 07:11:01 +0200 + +ffmpeg-php (0.6.0-2ubuntu1) maverick; urgency=low + + * Fakesync with debian because tarball has different checksum (LP: #589202). + * Fix FTBFS with ffmpeg >= 0.6 + - Add fix_ftbfs_pix_fmt_rgba32.patch + + -- Felix Geyer Thu, 03 Jun 2010 16:28:20 +0200 + +ffmpeg-php (0.6.0-2) unstable; urgency=low + + * Update my email address + * Drop DM-UA field + * Update VCS fields to reflect switch to git + * Update standards version to 3.8.4, no changes needed + * Switch to section 'php' instead of 'web' + * Use tee to print the test suite progress + * Drop ORed dependency on php5 (Closes: #566299) + * Define default CFLAGS, properly pass LFSFLAGS and build with + hardening flags + * Bump copyright year + * Actually redirect the testsuite's output to tee + * Remove the test-results.txt file on 'clean' + * Update the allow_persist... patch to use --INI-- + * Ignore ffmpeg's info/debug messages on the test suite + + -- Raphael Geissert Tue, 09 Feb 2010 23:17:17 -0600 + +ffmpeg-php (0.6.0-1) unstable; urgency=low + + * New upstream release (Closes: #516365) + - Support for the ffmpeg swscale API (Closes: #487643) + - API Changes: + + Removed obsolete resize() and crop() functions. + + Removed animated gif class. + - Added check to ensure that gd loads before ffmpeg-php if both are + compiled as extensions. + * debian/control: + + Improve the package description. + + Add an ORed dependency on a real php5 SAPI package. + + Add a BuildDep on libswscale-dev + * debian/rules: + + Minor cleanup. + * debian/copyright: + + Update copyright years + + -- Raphael Geissert Sun, 22 Feb 2009 20:42:18 -0600 + +ffmpeg-php (0.5.3.1-3) unstable; urgency=low + + * gdtoimage_fix.patch (Closes: #496079) + + fix the toGDImage method by not using gdImageBoundsSafeMacro + - Thanks to Patrick Matthäi for the patch + + -- Raphael Geissert Mon, 07 Jul 2008 18:24:47 -0500 + +ffmpeg-php (0.5.3.1-2) unstable; urgency=low + + * Fix build failure caused by chrpath returning an exit status of 2. + + -- Raphael Geissert Mon, 07 Jul 2008 17:50:11 -0500 + +ffmpeg-php (0.5.3.1-1) unstable; urgency=low + + * New upstream release + * debian/control: + + Added Homepage and Vcs-* fields + + Bumped Standards-Version: 3.8.0, no changes needed + + Added XS-DM-Upload-Allowed: yes + * debian/patches/: + + 01gd.patch: dropped, included by upstream + + allow_persistent_on_persistentMovie.phpt.patch: fixes a test + * Run test suite at build time + + Depend on php5-cli and php5-gd, and conflict php5-ffmpeg + * debian/copyright: Added more credits + * debian/rules: removed some useless stuff + * debian/ffmpeg.ini: added some new options as comments + + -- Raphael Geissert Mon, 30 Jun 2008 18:25:05 -0500 + +ffmpeg-php (0.5.1-2) unstable; urgency=low + + * Fixed libgd-xpm-dev dependency + * Replaced -$(MAKE) clean with [ ! -f Makefile ] || $(MAKE) clean + + -- Raphael Geissert Mon, 16 Jul 2007 14:09:27 -0500 + +ffmpeg-php (0.5.1-1) unstable; urgency=low + + * Initial release (Closes: #397462) + + -- Raphael Geissert Thu, 21 Jun 2007 11:18:17 -0500 + --- ffmpeg-php-0.6.0.orig/debian/ffmpeg.ini +++ ffmpeg-php-0.6.0/debian/ffmpeg.ini @@ -0,0 +1,9 @@ +; configuration for the ffmpeg-php module + +extension=ffmpeg.so + +; Turn ffmpeg warnings into PHP warnings +;ffmpeg.show_warnings=0 + +; Persistent movies +;ffmpeg.allow_persistent=0 --- ffmpeg-php-0.6.0.orig/debian/patches/find_libavcodec.patch +++ ffmpeg-php-0.6.0/debian/patches/find_libavcodec.patch @@ -0,0 +1,36 @@ +Description: Find libavcodec in multiarch directories +Bug-Ubuntu: https://bugs.launchpad.net/bugs/935086 +Author: Andreas Moog + +=== modified file 'config.m4' +--- a/config.m4 2009-05-24 13:04:49 +0000 ++++ b/config.m4 2012-02-25 17:40:08 +0000 +@@ -3,6 +3,8 @@ + + PHP_ARG_ENABLE(skip-gd-check, whether to force gd support in ffmpeg-php, [ --enable-skip-gd-check skip checks for gd libs and assume they are present.], no, no) + ++DEB_HOST_MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH` ++ + if test "$PHP_SKIP_GD_CHECK" != "no"; then + AC_DEFINE(HAVE_LIBGD20, 1, [Define to 1 if the GD functions are available in php]) + fi +@@ -53,7 +55,7 @@ + + + AC_MSG_CHECKING(for ffmpeg libavcodec.so) +- for i in $PHP_FFMPEG /usr/local /usr ; do ++ for i in $PHP_FFMPEG /usr/local /usr /usr/lib/$DEB_HOST_MULTIARCH; do + if test -f $i/lib/libavcodec.so; then + FFMPEG_LIBDIR=$i/lib + fi +@@ -61,6 +63,9 @@ + if test -f $i/lib64/libavcodec.so; then + FFMPEG_LIBDIR=$i/lib64 + fi ++ if test -f $i/libavcodec.so; then ++ FFMPEG_LIBDIR=$i ++ fi + dnl MacOS-X support (Alexey Zakhlestin) + if test -f $i/lib/libavcodec.dylib; then + FFMPEG_LIBDIR=$i/lib + --- ffmpeg-php-0.6.0.orig/debian/patches/gdtoimage_fix.patch +++ ffmpeg-php-0.6.0/debian/patches/gdtoimage_fix.patch @@ -0,0 +1,25 @@ +diff -Naur ffmpeg-php-0.5.3.1.orig/ffmpeg_frame.c ffmpeg-php-0.5.3.1/ffmpeg_frame.c +--- ffmpeg-php-0.5.3.1.orig/ffmpeg_frame.c 2008-08-22 17:03:55.000000000 +0200 ++++ ffmpeg-php-0.5.3.1/ffmpeg_frame.c 2008-08-22 17:06:15.000000000 +0200 +@@ -396,15 +396,14 @@ + int x, y; + int *src = (int*)frame->data[0]; + ++ if(width > dest->sx || height > dest->sy){ ++ return -1; ++ } ++ + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { +- +- if (gdImageBoundsSafeMacro(dest, x, y)) { +- /* copy pixel to gdimage buffer zeroing the alpha channel */ +- dest->tpixels[y][x] = src[x] & 0x00ffffff; +- } else { +- return -1; +- } ++ /* copy pixel to gdimage buffer zeroing the alpha channel */ ++ dest->tpixels[y][x] = src[x] & 0x00ffffff; + } + src += width; + } --- ffmpeg-php-0.6.0.orig/debian/patches/fix_ftbfs_pix_fmt_rgba32.patch +++ ffmpeg-php-0.6.0/debian/patches/fix_ftbfs_pix_fmt_rgba32.patch @@ -0,0 +1,47 @@ +Description: Fix FTBFS with ffmpeg >= 0.6 as it doesn't define PIX_FMT_RGBA32 anymore. +Author: Felix Geyer +Origin: backport, http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php?view=rev&revision=677 + +diff -Nur ffmpeg-php-0.6.0/ffmpeg_frame.c ffmpeg-php-0.6.0.patch/ffmpeg_frame.c +--- ffmpeg-php-0.6.0/ffmpeg_frame.c 2008-10-14 01:02:01.000000000 +0200 ++++ ffmpeg-php-0.6.0.patch/ffmpeg_frame.c 2010-06-03 16:13:17.596647216 +0200 +@@ -60,6 +60,12 @@ + ZEND_FETCH_RESOURCE(gd_img, gdImagePtr, ret, -1, "Image", le_gd); \ + } + ++#if PIX_FMT_RGBA32 ++#define FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT PIX_FMT_RGBA32 ++#else ++#define FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT PIX_FMT_RGB32 ++#endif ++ + // Borrowed from gd.c + #define gdImageBoundsSafeMacro(im, x, y) (!((((y) < (im)->cy1) || ((y) > (im)->cy2)) || (((x) < (im)->cx1) || ((x) > (im)->cx2)))) + +@@ -333,7 +339,7 @@ + + GET_FRAME_RESOURCE(getThis(), ff_frame); + +- _php_convert_frame(ff_frame, PIX_FMT_RGBA32); ++ _php_convert_frame(ff_frame, FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT); + + return_value->value.lval = _php_get_gd_image(ff_frame->width, + ff_frame->height); +@@ -418,7 +424,7 @@ + + /* create a an av_frame and allocate space for it */ + frame = avcodec_alloc_frame(); +- avpicture_alloc((AVPicture*)frame, PIX_FMT_RGBA32, width, height); ++ avpicture_alloc((AVPicture*)frame, FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT, width, height); + + /* copy the gd image to the av_frame */ + _php_gd_image_to_avframe(gd_img, frame, width, height); +@@ -429,7 +435,7 @@ + /* set the ffpmeg_frame's properties */ + ff_frame->width = width; + ff_frame->height = height; +- ff_frame->pixel_format = PIX_FMT_RGBA32; ++ ff_frame->pixel_format = FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT; + break; + default: + zend_error(E_ERROR, "Invalid argument\n"); --- ffmpeg-php-0.6.0.orig/debian/patches/fix_ftbfs_libav-0.7.patch +++ ffmpeg-php-0.6.0/debian/patches/fix_ftbfs_libav-0.7.patch @@ -0,0 +1,293 @@ +Description: Fix FTFS with libav 0.7 because of undefined CODEC_TYPE_*, + PKT_FLAG_KEY, hurry_up and MAX_STREAMS variables as well as datas (comment, + title, author, album, copyright, genre, track, year) in AVFormatContext + (replaced by av_dict_get functions) +Author: Fabrice Coutadeur + +Index: ffmpeg-php-0.6.0/ffmpeg_movie.c +=================================================================== +--- ffmpeg-php-0.6.0.orig/ffmpeg_movie.c 2011-09-03 17:01:53.000000000 +0000 ++++ ffmpeg-php-0.6.0/ffmpeg_movie.c 2011-09-03 17:12:05.000000000 +0000 +@@ -45,6 +45,10 @@ + + #include "ffmpeg_frame.h" + #include "ffmpeg_movie.h" ++ ++#if LIBAVFORMAT_VERSION_MAJOR >= 53 ++#define MAX_STREAMS 20 /* arbitrary sanity check value */ ++#endif + + #define GET_MOVIE_RESOURCE(ff_movie_ctx) {\ + zval **_tmp_zval;\ +@@ -149,7 +153,7 @@ + */ + static AVStream *_php_get_video_stream(AVFormatContext *fmt_ctx) + { +- int i = _php_get_stream_index(fmt_ctx, CODEC_TYPE_VIDEO); ++ int i = _php_get_stream_index(fmt_ctx, AVMEDIA_TYPE_VIDEO); + + return i < 0 ? NULL : fmt_ctx->streams[i]; + } +@@ -162,7 +166,7 @@ + */ + static AVStream *_php_get_audio_stream(AVFormatContext *fmt_ctx) + { +- int i = _php_get_stream_index(fmt_ctx, CODEC_TYPE_AUDIO); ++ int i = _php_get_stream_index(fmt_ctx, AVMEDIA_TYPE_AUDIO); + + return i < 0 ? NULL : fmt_ctx->streams[i]; + } +@@ -481,7 +485,7 @@ + stream_index = _php_get_stream_index(ffmovie_ctx->fmt_ctx, stream_type); + if (stream_index < 0) { + // FIXME: factor out the conditional. +- if (stream_type == CODEC_TYPE_VIDEO) { ++ if (stream_type == AVMEDIA_TYPE_VIDEO) { + zend_error(E_WARNING, "Can't find video stream in %s", + _php_get_filename(ffmovie_ctx)); + return NULL; +@@ -528,8 +532,8 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_STRINGL(ffmovie_ctx->fmt_ctx->comment, +- strlen(ffmovie_ctx->fmt_ctx->comment), 1); ++ RETURN_STRINGL(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "comment", NULL, 0)->value, ++ strlen(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "comment", NULL, 0)->value), 1); + } + /* }}} */ + +@@ -543,8 +547,8 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_STRINGL(ffmovie_ctx->fmt_ctx->title, +- strlen(ffmovie_ctx->fmt_ctx->title), 1); ++ RETURN_STRINGL(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "title", NULL, 0)->value, ++ strlen(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "title", NULL, 0)->value), 1); + } + /* }}} */ + +@@ -558,8 +562,8 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_STRINGL(ffmovie_ctx->fmt_ctx->author, +- strlen(ffmovie_ctx->fmt_ctx->author), 1); ++ RETURN_STRINGL(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "artist", NULL, 0)->value, ++ strlen(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "artist", NULL, 0)->value), 1); + } + /* }}} */ + +@@ -572,8 +576,8 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_STRINGL(ffmovie_ctx->fmt_ctx->copyright, +- strlen(ffmovie_ctx->fmt_ctx->copyright), 1); ++ RETURN_STRINGL(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "copyright", NULL, 0)->value, ++ strlen(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "copyright", NULL, 0)->value), 1); + } + /* }}} */ + +@@ -587,8 +591,8 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_STRINGL(ffmovie_ctx->fmt_ctx->album, +- strlen(ffmovie_ctx->fmt_ctx->album), 1); ++ RETURN_STRINGL(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "album", NULL, 0)->value, ++ strlen(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "album", NULL, 0)->value), 1); + } + /* }}} */ + +@@ -601,8 +605,8 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_STRINGL(ffmovie_ctx->fmt_ctx->genre, +- strlen(ffmovie_ctx->fmt_ctx->genre), 1); ++ RETURN_STRINGL(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "genre", NULL, 0)->value, ++ strlen(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "genre", NULL, 0)->value), 1); + } + /* }}} */ + +@@ -616,7 +620,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_LONG(ffmovie_ctx->fmt_ctx->track); ++ RETURN_LONG(strtol(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "track", NULL, 0)->value, NULL, 10)); + } + /* }}} */ + +@@ -629,7 +633,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- RETURN_LONG(ffmovie_ctx->fmt_ctx->year); ++ RETURN_LONG(strtol(av_dict_get(ffmovie_ctx->fmt_ctx->metadata, "date", NULL, 0)->value, NULL, 10)); + } + /* }}} */ + +@@ -675,7 +679,7 @@ + } + + #if LIBAVCODEC_BUILD > 4753 +- if (GET_CODEC_FIELD(st->codec, codec_type) == CODEC_TYPE_VIDEO){ ++ if (GET_CODEC_FIELD(st->codec, codec_type) == AVMEDIA_TYPE_VIDEO){ + if (st->r_frame_rate.den && st->r_frame_rate.num) { + rate = av_q2d(st->r_frame_rate); + } else { +@@ -807,7 +811,7 @@ + { + AVCodecContext *decoder_ctx = NULL; + +- decoder_ctx = _php_get_decoder_context(ffmovie_ctx, CODEC_TYPE_VIDEO); ++ decoder_ctx = _php_get_decoder_context(ffmovie_ctx, AVMEDIA_TYPE_VIDEO); + if (!decoder_ctx) { + return 0; + } +@@ -847,7 +851,7 @@ + { + AVCodecContext *decoder_ctx; + +- decoder_ctx = _php_get_decoder_context(ffmovie_ctx, CODEC_TYPE_VIDEO); ++ decoder_ctx = _php_get_decoder_context(ffmovie_ctx, AVMEDIA_TYPE_VIDEO); + + return decoder_ctx ? decoder_ctx->pix_fmt : 0; + } +@@ -960,7 +964,7 @@ + codec_name = decoder_ctx->codec_name; + } else { + /* output avi tags */ +- if (decoder_ctx->codec_type == CODEC_TYPE_VIDEO) { ++ if (decoder_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { + snprintf(buf1, sizeof(buf1), "%c%c%c%c", + decoder_ctx->codec_tag & 0xff, + (decoder_ctx->codec_tag >> 8) & 0xff, +@@ -986,7 +990,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- codec_name = (char*)_php_get_codec_name(ffmovie_ctx, CODEC_TYPE_VIDEO); ++ codec_name = (char*)_php_get_codec_name(ffmovie_ctx, AVMEDIA_TYPE_VIDEO); + + if (codec_name) { + RETURN_STRINGL(codec_name, strlen(codec_name), 1); +@@ -1006,7 +1010,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- codec_name = (char*)_php_get_codec_name(ffmovie_ctx, CODEC_TYPE_AUDIO); ++ codec_name = (char*)_php_get_codec_name(ffmovie_ctx, AVMEDIA_TYPE_AUDIO); + + if (codec_name) { + RETURN_STRINGL(codec_name, strlen(codec_name), 1); +@@ -1026,7 +1030,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- stream_id= _php_get_stream_index(ffmovie_ctx->fmt_ctx, CODEC_TYPE_VIDEO); ++ stream_id= _php_get_stream_index(ffmovie_ctx->fmt_ctx, AVMEDIA_TYPE_VIDEO); + + if( stream_id == -1 ) + { +@@ -1048,7 +1052,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- stream_id= _php_get_stream_index(ffmovie_ctx->fmt_ctx, CODEC_TYPE_AUDIO); ++ stream_id= _php_get_stream_index(ffmovie_ctx->fmt_ctx, AVMEDIA_TYPE_AUDIO); + + if( stream_id == -1 ) + { +@@ -1086,7 +1090,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- channels = _php_get_codec_channels(ffmovie_ctx, CODEC_TYPE_AUDIO); ++ channels = _php_get_codec_channels(ffmovie_ctx, AVMEDIA_TYPE_AUDIO); + + if (channels) { + RETURN_LONG(channels); +@@ -1122,7 +1126,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- sample_rate = _php_get_codec_sample_rate(ffmovie_ctx, CODEC_TYPE_AUDIO); ++ sample_rate = _php_get_codec_sample_rate(ffmovie_ctx, AVMEDIA_TYPE_AUDIO); + + if (sample_rate) { + RETURN_LONG(sample_rate); +@@ -1158,7 +1162,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- bit_rate = _php_get_codec_bit_rate(ffmovie_ctx, CODEC_TYPE_AUDIO); ++ bit_rate = _php_get_codec_bit_rate(ffmovie_ctx, AVMEDIA_TYPE_AUDIO); + + if (bit_rate) { + RETURN_LONG(bit_rate); +@@ -1178,7 +1182,7 @@ + + GET_MOVIE_RESOURCE(ffmovie_ctx); + +- bit_rate = _php_get_codec_bit_rate(ffmovie_ctx, CODEC_TYPE_VIDEO); ++ bit_rate = _php_get_codec_bit_rate(ffmovie_ctx, AVMEDIA_TYPE_VIDEO); + + if (bit_rate) { + RETURN_LONG(bit_rate); +@@ -1201,7 +1205,7 @@ + int got_frame; + + video_stream = _php_get_stream_index(ffmovie_ctx->fmt_ctx, +- CODEC_TYPE_VIDEO); ++ AVMEDIA_TYPE_VIDEO); + if (video_stream < 0) { + return NULL; + } +@@ -1212,11 +1216,10 @@ + while (av_read_frame(ffmovie_ctx->fmt_ctx, &packet) >= 0) { + if (packet.stream_index == video_stream) { + +- avcodec_decode_video(decoder_ctx, frame, &got_frame, +- packet.data, packet.size); ++ avcodec_decode_video2(decoder_ctx, frame, &got_frame, &packet); + + if (got_frame) { +- *is_keyframe = (packet.flags & PKT_FLAG_KEY); ++ *is_keyframe = (packet.flags & AV_PKT_FLAG_KEY); + *pts = packet.pts; + av_free_packet(&packet); + return frame; +@@ -1243,7 +1246,7 @@ + AVCodecContext *decoder_ctx = NULL; + AVFrame *frame = NULL; + +- decoder_ctx = _php_get_decoder_context(ffmovie_ctx, CODEC_TYPE_VIDEO); ++ decoder_ctx = _php_get_decoder_context(ffmovie_ctx, AVMEDIA_TYPE_VIDEO); + if (decoder_ctx == NULL) { + return NULL; + } +@@ -1279,9 +1282,9 @@ + wanted_frame != GETFRAME_NEXTFRAME && + wanted_frame - ffmovie_ctx->frame_number > + decoder_ctx->gop_size + 1) { +- decoder_ctx->hurry_up = 1; ++ decoder_ctx->skip_frame = AVDISCARD_NONREF; + } else { +- decoder_ctx->hurry_up = 0; ++ decoder_ctx->skip_frame = AVDISCARD_DEFAULT; + } + ffmovie_ctx->frame_number++; + +@@ -1440,7 +1443,7 @@ + AVCodecContext *decoder_ctx; + + +- decoder_ctx = _php_get_decoder_context(ffmovie_ctx, CODEC_TYPE_VIDEO); ++ decoder_ctx = _php_get_decoder_context(ffmovie_ctx, AVMEDIA_TYPE_VIDEO); + if (!decoder_ctx) { + return -1; + } --- ffmpeg-php-0.6.0.orig/debian/patches/test_fixes.patch +++ ffmpeg-php-0.6.0/debian/patches/test_fixes.patch @@ -0,0 +1,405 @@ +Index: ffmpeg-php/tests/getAudioBitRate.phpt +=================================================================== +--- ffmpeg-php.orig/tests/getAudioBitRate.phpt ++++ ffmpeg-php/tests/getAudioBitRate.phpt +@@ -2,6 +2,9 @@ + ffmpeg getAudioBitRate test + --SKIPIF-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + + --INI-- + ffmpeg.allow_persistent=1 ++ffmpeg.show_warnings=1 ++error_reporting = E_ALL & ~E_NOTICE + --FILE-- + ++--INI-- ++ffmpeg.allow_persistent=1 + --FILE-- +