summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorLarry Hajali <larryhaja[at]gmail[dot]com>2011-12-18 21:10:07 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-12-18 21:10:07 -0600
commit7dff35001a9e79799b0d83760e7c4222aa30224a (patch)
tree59f5a7750ffbe64c1ad489468bc93ee6a1e49f54 /multimedia
parentccdbd0aa1297467f95468217ee80838ad6a5760c (diff)
downloadslackbuilds-7dff35001a9e79799b0d83760e7c4222aa30224a.tar.gz
multimedia/miro: Patched to build with new ffmpeg.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/miro/ffmpeg-0.8.patch126
-rw-r--r--multimedia/miro/miro.SlackBuild5
-rw-r--r--multimedia/miro/miro.info2
3 files changed, 131 insertions, 2 deletions
diff --git a/multimedia/miro/ffmpeg-0.8.patch b/multimedia/miro/ffmpeg-0.8.patch
new file mode 100644
index 0000000000..622e080dc5
--- /dev/null
+++ b/multimedia/miro/ffmpeg-0.8.patch
@@ -0,0 +1,126 @@
+diff -Naur miro-4.0.3.orig/linux/miro-segmenter.c miro-4.0.3/linux/miro-segmenter.c
+--- miro-4.0.3.orig/linux/miro-segmenter.c 2011-08-10 17:53:51.000000000 +0000
++++ miro-4.0.3/linux/miro-segmenter.c 2011-12-18 23:14:21.423409001 +0000
+@@ -60,7 +60,11 @@
+ }
+
+ switch (input_codec_context->codec_type) {
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ case AVMEDIA_TYPE_AUDIO:
++#else
+ case CODEC_TYPE_AUDIO:
++#endif
+ output_codec_context->channel_layout = input_codec_context->channel_layout;
+ output_codec_context->sample_rate = input_codec_context->sample_rate;
+ output_codec_context->channels = input_codec_context->channels;
+@@ -72,7 +76,11 @@
+ output_codec_context->block_align = input_codec_context->block_align;
+ }
+ break;
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ case AVMEDIA_TYPE_VIDEO:
++#else
+ case CODEC_TYPE_VIDEO:
++#endif
+ output_codec_context->pix_fmt = input_codec_context->pix_fmt;
+ output_codec_context->width = input_codec_context->width;
+ output_codec_context->height = input_codec_context->height;
+@@ -154,7 +162,11 @@
+ exit(1);
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ ofmt = av_guess_format("mpegts", NULL, NULL);
++#else
+ ofmt = guess_format("mpegts", NULL, NULL);
++#endif
+ if (!ofmt) {
+ fprintf(stderr, "Could not find MPEG-TS muxer\n");
+ exit(1);
+@@ -174,12 +186,20 @@
+
+ for (i = 0; i < ic->nb_streams && (video_index < 0 || audio_index < 0); i++) {
+ switch (ic->streams[i]->codec->codec_type) {
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ case AVMEDIA_TYPE_VIDEO:
++#else
+ case CODEC_TYPE_VIDEO:
++#endif
+ video_index = i;
+ ic->streams[i]->discard = AVDISCARD_NONE;
+ video_st = add_output_stream(oc, ic->streams[i]);
+ break;
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ case AVMEDIA_TYPE_AUDIO:
++#else
+ case CODEC_TYPE_AUDIO:
++#endif
+ audio_index = i;
+ ic->streams[i]->discard = AVDISCARD_NONE;
+ audio_st = add_output_stream(oc, ic->streams[i]);
+@@ -195,7 +215,11 @@
+ exit(1);
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ av_dump_format(oc, 0, input, 1);
++#else
+ dump_format(oc, 0, input, 1);
++#endif
+
+ if (video_st) {
+ codec = avcodec_find_decoder(video_st->codec->codec_id);
+@@ -208,7 +232,11 @@
+ }
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ if (avio_open(&oc->pb, output_filename, URL_WRONLY) < 0) {
++#else
+ if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++#endif
+ fprintf(stderr, "Could not open '%s'\n", output_filename);
+ exit(1);
+ }
+@@ -234,7 +262,11 @@
+ break;
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ if (packet.stream_index == video_index && (packet.flags & AV_PKT_FLAG_KEY)) {
++#else
+ if (packet.stream_index == video_index && (packet.flags & PKT_FLAG_KEY)) {
++#endif
+ segment_time = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
+ }
+ else if (video_index < 0) {
+@@ -245,10 +277,17 @@
+ }
+
+ if (segment_time - prev_segment_time >= segment_duration) {
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ avio_flush(oc->pb);
++ avio_close(oc->pb);
++
++ if (avio_open(&oc->pb, output_filename, URL_WRONLY) < 0) {
++#else
+ put_flush_packet(oc->pb);
+ url_fclose(oc->pb);
+
+ if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++#endif
+ fprintf(stderr, "Could not open '%s'\n", output_filename);
+ break;
+ }
+@@ -278,7 +317,11 @@
+ av_freep(&oc->streams[i]);
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR > 52
++ avio_close(oc->pb);
++#else
+ url_fclose(oc->pb);
++#endif
+ av_free(oc);
+
+ return 0;
diff --git a/multimedia/miro/miro.SlackBuild b/multimedia/miro/miro.SlackBuild
index a9ec7a8ff5..fb8027430e 100644
--- a/multimedia/miro/miro.SlackBuild
+++ b/multimedia/miro/miro.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=miro
VERSION=4.0.3
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -69,6 +69,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Patch to build against ffmpeg 0.6.x, 0.7.x and 0.8.x.
+patch -p1 < $CWD/ffmpeg-0.8.patch
+
cd linux
sed -i 's|share/man|man|' setup.py
CFLAGS="$SLKCFLAGS" python setup.py install --root=$PKG
diff --git a/multimedia/miro/miro.info b/multimedia/miro/miro.info
index 8a79fe53b5..d05e832e88 100644
--- a/multimedia/miro/miro.info
+++ b/multimedia/miro/miro.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Larry Hajali"
EMAIL="larryhaja[at]gmail[dot]com"
-APPROVED="Niels Horn"
+APPROVED="rworkman"