--- libphash-0.9.4.orig/src/cimgffmpeg.cpp +++ libphash-0.9.4/src/cimgffmpeg.cpp @@ -67,7 +67,7 @@ // Find the video stream for(i=0; ipFormatCtx->nb_streams; i++) { - if(st_info->pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) + if(st_info->pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { st_info->videoStream=i; break; @@ -123,6 +123,10 @@ int size = 0; AVPacket packet; + + AVPacket avpacket; + av_init_packet(&avpacket); + int result = 1; CImg next_image; SwsContext *c = sws_getContext(st_info->pCodecCtx->width, st_info->pCodecCtx->height, st_info->pCodecCtx->pix_fmt, st_info->width, st_info->height, ffmpeg_pixfmt , SWS_BICUBIC, NULL, NULL, NULL); @@ -131,7 +135,10 @@ if (result < 0) break; if(packet.stream_index==st_info->videoStream) { - avcodec_decode_video(st_info->pCodecCtx, pFrame, &frameFinished,packet.data, packet.size); + avpacket.data = packet.data; + avpacket.size = packet.size; + avpacket.flags = AV_PKT_FLAG_KEY; + avcodec_decode_video2(st_info->pCodecCtx, pFrame, &frameFinished, &avpacket); if(frameFinished) { if (st_info->current_index == st_info->next_index){ st_info->next_index += st_info->step; @@ -213,7 +220,7 @@ // Find the video stream for(i=0; i< st_info->pFormatCtx->nb_streams; i++) { - if(st_info->pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) + if(st_info->pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { st_info->videoStream=i; break; @@ -268,6 +275,10 @@ int frameFinished; int size = 0; AVPacket packet; + + AVPacket avpacket; + av_init_packet(&avpacket); + int result = 1; CImg next_image; SwsContext *c = sws_getContext(st_info->pCodecCtx->width, st_info->pCodecCtx->height, st_info->pCodecCtx->pix_fmt, st_info->width, st_info->height, ffmpeg_pixfmt , SWS_BICUBIC, NULL, NULL, NULL); @@ -279,8 +290,10 @@ break; if(packet.stream_index == st_info->videoStream) { - avcodec_decode_video(st_info->pCodecCtx, pFrame, &frameFinished, - packet.data,packet.size); + avpacket.data = packet.data; + avpacket.size = packet.size; + avpacket.flags = AV_PKT_FLAG_KEY; + avcodec_decode_video2(st_info->pCodecCtx, pFrame, &frameFinished, &avpacket); if(frameFinished) { if (st_info->current_index == st_info->next_index) @@ -365,7 +378,7 @@ int videoStream=-1; for(unsigned int i=0; inb_streams; i++) { - if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) + if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { videoStream=i; break; @@ -407,7 +420,7 @@ int videoStream=-1; for(unsigned int i=0; inb_streams; i++) { - if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) + if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { videoStream=i; break; --- libphash-0.9.4.orig/debian/libphash0.install +++ libphash-0.9.4/debian/libphash0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/*.so.* usr/lib --- libphash-0.9.4.orig/debian/watch +++ libphash-0.9.4/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://phash.org/download/ /releases/pHash-(.+)\.tar\.gz --- libphash-0.9.4.orig/debian/README.source +++ libphash-0.9.4/debian/README.source @@ -0,0 +1,5 @@ +This source package uses dpatch for the modifications of the upstream source. +If you want to change something it is best to use the dpatch approach as +documented in /usr/share/doc/dpatch/README.source.gz + + -- Tiago Bortoletto Vaz Sat, 15 May 2010 03:31:16 +0000 --- libphash-0.9.4.orig/debian/copyright +++ libphash-0.9.4/debian/copyright @@ -0,0 +1,21 @@ +Format-Specification: + http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=112 +Name: pHash +Maintainer: Evan Klinger , + David Starkweather +Source: http://phash.org/releases/ + +Files: * +Copyright: 2009, Aetilius, Inc +License: GPL-3 + This program 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; version 3 dated June, 2007. + On Debian GNU/Linux systems, the complete text of version 3 of the GNU + General Public License can be found in `/usr/share/common-licenses/GPL-3' + +Files: debian/* +Copyright: 2009, Tiago Bortoletto Vaz +License: GPL-2+ + On Debian systems, the complete text of the GNU General Public License + can be found in /usr/share/common-licenses/GPL-2 file. --- libphash-0.9.4.orig/debian/changelog +++ libphash-0.9.4/debian/changelog @@ -0,0 +1,65 @@ +libphash (0.9.4-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Fix compatibility with libav 0.7, patch by Andreas Moog + (Closes: #638243) + + -- Moritz Muehlenhoff Sat, 01 Oct 2011 12:55:28 +0200 + +libphash (0.9.4-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Don't ship .la file (Closes: #620933). + * Strengthen versioned dep as debhelper overrides are used. + + -- Luk Claes Sun, 05 Jun 2011 18:34:03 +0200 + +libphash (0.9.4-1) unstable; urgency=low + + [ Christophe Monniez ] + * Merging upstream version 0.9.4. + * Fixing debian watch file. + * Bumping standards-version to 3.9.1. + * Adding build depends on libsnfile1-dev. + * Adding build depends on libsamplerate0-dev. + * Adding build depends on libmpg123-dev. + * Simplifying debian/rules. + * Removing obsolete patch. + * Adding dependency on cimg-dev for dev package. + (Closes: #590614, #607724). + * Fixing CXXFLAGS to build on armel. Thanks to Peter Green + (Closes: #613961). + + -- Michael Prokop Mon, 21 Feb 2011 22:49:50 +0100 + +libphash (0.9.0-2) unstable; urgency=low + + * Added patch 01_build_on_kfreebsd.dpatch: testing libc variant rather than + kernel in order to build for kfreebsd. Thanks to Petr Salinger and Cyril + Brulebois. (Closes: #576895) + + -- Tiago Bortoletto Vaz Sat, 15 May 2010 03:07:53 +0000 + +libphash (0.9.0-1) unstable; urgency=low + + * New upstream release. + + -- Tiago Bortoletto Vaz Sun, 28 Mar 2010 15:24:10 -0300 + +libphash (0.8.1-1) unstable; urgency=low + + * New upstream release. + + -- Tiago Bortoletto Vaz Mon, 01 Feb 2010 00:53:08 +0000 + +libphash (0.7.2-1) unstable; urgency=low + + * New upstream release. + + -- Tiago Bortoletto Vaz Fri, 25 Dec 2009 15:48:35 -0200 + +libphash (0.7-1) unstable; urgency=low + + * Initial Release. (Closes: #519290) + + -- Tiago Bortoletto Vaz Mon, 14 Dec 2009 00:05:34 -0200 --- libphash-0.9.4.orig/debian/compat +++ libphash-0.9.4/debian/compat @@ -0,0 +1 @@ +7 --- libphash-0.9.4.orig/debian/rules +++ libphash-0.9.4/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh ${@} + +override_dh_auto_configure: + dh_auto_configure -- CXXFLAGS="$(CXXFLAGS) -D__STDC_CONSTANT_MACROS" --- libphash-0.9.4.orig/debian/libphash0-dev.install +++ libphash-0.9.4/debian/libphash0-dev.install @@ -0,0 +1,4 @@ +debian/tmp/usr/lib/*.so usr/lib +debian/tmp/usr/lib/*.a usr/lib +debian/tmp/usr/include/* usr/include +debian/tmp/usr/lib/pkgconfig/* usr/lib/pkgconfig --- libphash-0.9.4.orig/debian/control +++ libphash-0.9.4/debian/control @@ -0,0 +1,51 @@ +Source: libphash +Section: libs +Priority: optional +Maintainer: Debian Forensics +Uploaders: Tiago Bortoletto Vaz +Build-Depends: debhelper (>= 7.0.50~), libavformat-dev, libavcodec-dev, libswscale-dev, libfftw3-dev, libjpeg-dev, libpng-dev, cimg-dev, libsndfile1-dev, libsamplerate0-dev, libmpg123-dev +Standards-Version: 3.9.1 +Homepage: http://phash.org +Vcs-Browser: http://git.debian.org/?p=forensics/libphash.git +Vcs-Git: git://git.debian.org/forensics/libphash.git + +Package: libphash0 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Perceptual hashing library + Unlike cryptographic hash functions which rely on an avalanche effect of + changes in input leading to drastic changes in the output, perceptual + hashes are "close" to one another if the inputs are visually or + auditorily similar. + . + Perceptual hashes have applications in searching, identifying potential + copyright infringement, locating duplicates etc. - since a fingerprint + of a file is usually less than 1% of the original media file's size, + the fingerprint can be stored in a database and used for semantic + searching, such as finding all images that look like another. + . + pHash implements several perceptual hashing algorithms and provides a + C++ API to use those functions in your own programs. + +Package: libphash0-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, ${shlibs:Depends}, cimg-dev, libphash0 (= ${binary:Version}) +Provides: libphash-dev +Description: Perceptual hashing library development package + Unlike cryptographic hash functions which rely on an avalanche effect of + changes in input leading to drastic changes in the output, perceptual + hashes are "close" to one another if the inputs are visually or + auditorily similar. + . + Perceptual hashes have applications in searching, identifying potential + copyright infringement, locating duplicates etc. - since a fingerprint + of a file is usually less than 1% of the original media file's size, + the fingerprint can be stored in a database and used for semantic + searching, such as finding all images that look like another. + . + pHash implements several perceptual hashing algorithms and provides a + C++ API to use those functions in your own programs. + . + This package provides the files necessary to compile programs which + use pHash library. --- libphash-0.9.4.orig/debian/libphash0-dev.examples +++ libphash-0.9.4/debian/libphash0-dev.examples @@ -0,0 +1 @@ +examples/*.cpp --- libphash-0.9.4.orig/debian/source/format +++ libphash-0.9.4/debian/source/format @@ -0,0 +1 @@ +1.0