Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/10.4-EOL/sci
In directory vz-cvs-3.sog:/tmp/cvs-serv21639
Added Files:
video-oct.info video-oct.patch
Log Message:
akh's fix WorksForMeToo
--- NEW FILE: video-oct.info ---
Info2: <<
Package: video-oct%type_pkg[oct]
Version: 1.0.2
Type: oct (3.0.5 3.2.4), forge (video)
Revision: 1
Maintainer: Alexander Hansen <[email protected]>
# unfortunately, Homepage won't do types
Homepage: http://octave.sourceforge.net/video/index.html
Description: FFmpeg interface for Octave
DescDetail: <<
Implements addframe, avifile, aviinfo, and aviread, using ffmpeg. (and
approximately conforms to the Matlab interface)
This package provides the following functions:
addframe
avifile
aviinfo
aviread
<<
License: GPL
# default source
# Source:
http://voxel.dl.sourceforge.net/sourceforge/octave/%type_raw[forge]-%v.tar.gz
# this will redirect like a fiend, and then you can replace it with a one-hop:
Source:
mirror:sourceforge:octave/Octave%%20Forge%%20Packages/R2009-05-08/%type_raw[forge]-%v.tar.gz
# replacing "Individual Package Releases" with the relevant directory that you
get from the first
# Source above.
Source-MD5: e45e827ce5f409191aa9e9a61058e4ce
# All octave-forge packages have to have the following BuildDepends:
# octave%type_pkg[oct]-dev | octave%type_pkg[oct]-atlas-dev,
# fftw3,
# ( %type_pkg[oct] = 305 ) hdf5.7-oldapi,
# ( %type_pkg[oct] != 305 ) hdf5.7
#
# Packages which serve only Octave-3.0.5 or only Octave > 3.0.5 need
# not use the conditional, of course.
BuildDepends: <<
fink (>= 0.24.12),
octave%type_pkg[oct]-dev | octave%type_pkg[oct]-atlas-dev,
fftw3,
( %type_pkg[oct] = 305 ) hdf5.7-oldapi,
( %type_pkg[oct] != 305 ) hdf5.7,
libavcodec53-dev,
libavformat53-dev,
libavutil51-dev,
libswscale2-dev,
pkgconfig
<<
Depends: <<
octave%type_pkg[oct] | octave%type_pkg[oct]-atlas,
libavcodec53-shlibs,
libavformat53-shlibs,
libavutil51-shlibs,
libswscale2-shlibs
<<
Conflicts: octave-forge
DescPackaging: <<
For this package:
Numerous patches to use ffmpeg-0.8.4.
Common for all octave-forge packages:
We read in postinst and prerm template scripts installed by octaveN and modify
them to use the name of this package because Octave's package manager can't
cope with non-literal arguments.
The Type: forge (pkgname) is used to minimize what needs to be changed when
using this .info file as a template, or when the package name contains
underscores.
<<
#### Insert required changes here ####
PatchFile: %{ni}.patch
PatchFile-MD5: b03ae588d822b2bc67489d93737bc582
PatchScript: <<
%{default_script}
perl -pi -e 's|CODEC(_TYPE.*)|AVMEDIA$1|g ; \
s|av_alloc_format_context|avformat_alloc_context|g ; \
s|(PKT_FLAG_KEY)|AV_$1|g' \
src/AVHandler.cc
sed -i.orig -e '1i\
#include "AVHandler.h"' src/oct-avifile.cc
<<
SetCXXFLAGS: -D__STDC_CONSTANT_MACROS
######################################
# Do not change anything from this point down, unless absolutely necessary,
# since the foo-oct%type_pkg[oct] packages are designed to be built/installed
# in the same way.
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
SetLIBRARY_PATH: /usr/X11R6/lib:%p/lib
SetMAKEFLAGS: -j1
CompileScript: OCTAVE=%p/bin/octave-%type_raw[oct]
%p/share/octave/%type_raw[oct]/scripts/octave-forge-compile.sh
%type_raw[forge]-%v
InstallScript: <<
#!/bin/sh -ev
%p/share/octave/%type_raw[oct]/scripts/octave-forge-install.sh
%type_raw[forge]-%v %i %b
mkdir -p %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v
# copy template scripts
cp %p/share/octave/%type_raw[oct]/scripts/octave-forge-prerm
%p/share/octave/%type_raw[oct]/scripts/octave-forge-postinst
%i/share/octave/%type_raw[oct]/%type_raw[forge]-%v
cd %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v
sed -i -e 's/@PKGNAME@/%type_raw[forge]-%v/' octave-forge-postinst
sed -i -e 's/@PKGNAME@/%type_raw[forge]/' octave-forge-prerm
chmod a+x octave-forge*
<<
PostInstScript: <<
if [ -s %p/var/octave/%type_raw[oct]/octave_packages ] && [ -f
%p/var/octave/%type_raw[oct]/octave_packages ]
then
%p/share/octave/%type_raw[oct]/%type_raw[forge]-%v/octave-forge-postinst
else
mv
%p/share/octave/%type_raw[oct]/packages/%type_raw[forge]-%v/octave_packages
%p/var/octave/%type_raw[oct]/octave_packages
fi
<<
PreRmScript:
%p/share/octave/%type_raw[oct]/%type_raw[forge]-%v/octave-forge-prerm
<<
--- NEW FILE: video-oct.patch ---
diff -Nurd video-1.0.2/src/AVHandler.cc video-1.0.2.patched/src/AVHandler.cc
--- video-1.0.2/src/AVHandler.cc 2009-05-08 09:17:36.000000000 -0400
+++ video-1.0.2.patched/src/AVHandler.cc 2011-10-02 20:50:50.000000000
-0400
@@ -42,6 +42,8 @@
#endif
std::ostream *AVHandler::out = &std::cout;
+/** head of registered output format linked list */
+static AVOutputFormat *first_oformat = NULL;
AVHandler::~AVHandler(void) {
if (frame) {
@@ -127,9 +129,9 @@
}
snprintf(av_output->filename, sizeof(av_output->filename), "%s",
filename.c_str());
- snprintf(av_output->title, sizeof(av_output->title), "%s", title.c_str());
- snprintf(av_output->author, sizeof(av_output->author), "%s",
author.c_str());
- snprintf(av_output->comment, sizeof(av_output->comment), "%s",
comment.c_str());
+// snprintf(av_output->title, sizeof(av_output->title), "%s",
title.c_str());
+// snprintf(av_output->author, sizeof(av_output->author), "%s",
author.c_str());
+// snprintf(av_output->comment, sizeof(av_output->comment), "%s",
comment.c_str());
if (url_fopen(&av_output->pb, filename.c_str(), URL_WRONLY) < 0) {
(*out) << "AVHandler: Could not open \"" << filename << "\" for output"
<< std::endl;
@@ -204,9 +206,9 @@
width = vstream->codec->width;
height = vstream->codec->height;
- title = av_input->title;
- author = av_input->author;
- comment = av_input->comment;
+// title = av_input->title;
+// author = av_input->author;
+// comment = av_input->comment;
rgbframe = create_frame(PIX_FMT_RGB24);
if (!rgbframe) return -1;
@@ -296,7 +298,7 @@
(*out) << "AVHandler: Error seeking to " << target_timestamp <<
std::endl;
return -1;
}
- cc->hurry_up = 1;
+ cc->skip_frame;
// Flush stream buffers after seek
avcodec_flush_buffers(cc);
@@ -331,7 +333,11 @@
// Decode the packet into a frame
int frameFinished;
- if (avcodec_decode_video(cc, frame, &frameFinished, packet.data,
packet.size) < 0) {
+
+ // HACK for CorePNG to decode as normal PNG by default
+ packet.flags = PKT_FLAG_KEY;
+
+ if (avcodec_decode_video2(cc, frame, &frameFinished, &packet) < 0) {
(*out) << "AVHandler: Error decoding video stream" << std::endl;
av_free_packet(&packet);
av_free(frame); frame = NULL;
@@ -342,7 +348,7 @@
current_timestamp = (uint64_t)(vstream->cur_dts * AV_TIME_BASE *
(long double)stream_time_base);
}
}
- cc->hurry_up = 0;
+// cc->hurry_up = 0;
SwsContext *sc = sws_getContext(cc->width, cc->height, cc->pix_fmt,
cc->width, cc->height, PIX_FMT_BGR24,
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs