summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/vdr2jpeg
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/vdr2jpeg')
-rw-r--r--media-video/vdr2jpeg/Manifest2
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch38
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch326
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch238
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch54
-rw-r--r--media-video/vdr2jpeg/metadata.xml13
-rw-r--r--media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild44
-rw-r--r--media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild46
8 files changed, 761 insertions, 0 deletions
diff --git a/media-video/vdr2jpeg/Manifest b/media-video/vdr2jpeg/Manifest
new file mode 100644
index 000000000000..c98933b3c6ce
--- /dev/null
+++ b/media-video/vdr2jpeg/Manifest
@@ -0,0 +1,2 @@
+DIST vdr2jpeg-0.1.9.tgz 31160 SHA256 869250e411def669aa89170ceff6bfbfd08c522bee9a8967799b4af60010ea79 SHA512 e2309fd08591d5efa08246c2ecde70811036ea293e21f7e5ae989af5acef5e795216cbc31455d2f0b65de575a876863efe55ddf4397ab4eadf3d67a627579d99 WHIRLPOOL 1009060f15563d1b0c4d75f2e965f188efcc021cb28a12a7750096b2aa32e5d83fc8601b6246f29c35f87df39b1cf64f34be180b13275442a80d38301a3e03b1
+DIST vdr2jpeg-0.2.0.tgz 20027 SHA256 988f19c5d84e345ad5cc2beab55570d340495c54b507d83ff0b9c5d3e01e7356 SHA512 65f3e0acb2ecd3a5341e527c45fafd454266841f1369c89b10750fce86f2326fba76329abd17a05d67aea3b43a7b1299a49cfa9eee9a784bb99c940253ca5952 WHIRLPOOL 614ddabbbac0306aaa2c0d16e06b2407b646ab08f4fae22913c875954ccad48c4c237d0a04391bb003561c28a7b95175548ebd45cb25d41dfce611985dc1bd93
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch
new file mode 100644
index 000000000000..975587610692
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch
@@ -0,0 +1,38 @@
+add missing inludes for gcc-4.3.x
+http://bugs.gentoo.org/show_bug.cgi?id=229377
+diff -uBbwNr vdr2jpeg-0.1.0_orig/gop.cpp vdr2jpeg-0.1.0/gop.cpp
+--- vdr2jpeg-0.1.0_orig/gop.cpp 2008-02-17 07:14:46.000000000 +0100
++++ vdr2jpeg-0.1.0/gop.cpp 2008-06-25 13:48:19.000000000 +0200
+@@ -29,6 +29,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <time.h>
++#include <string.h>
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
+diff -uBbwNr vdr2jpeg-0.1.0_orig/tools.cpp vdr2jpeg-0.1.0/tools.cpp
+--- vdr2jpeg-0.1.0_orig/tools.cpp 2008-02-17 07:15:22.000000000 +0100
++++ vdr2jpeg-0.1.0/tools.cpp 2008-06-25 13:47:40.000000000 +0200
+@@ -19,6 +19,8 @@
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ */
+
++#include <string.h>
++
+ #include "tools.h"
+
+ int option(int argc, char *argv[], const char opt, bool bParam,
+diff -uBbwNr vdr2jpeg-0.1.0_orig/vdr2jpeg.cpp vdr2jpeg-0.1.0/vdr2jpeg.cpp
+--- vdr2jpeg-0.1.0_orig/vdr2jpeg.cpp 2008-02-17 07:15:48.000000000 +0100
++++ vdr2jpeg-0.1.0/vdr2jpeg.cpp 2008-06-25 13:47:12.000000000 +0200
+@@ -22,6 +22,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <stdlib.h>
++#include <algorithm>
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
+
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch
new file mode 100644
index 000000000000..549a6c8f60ee
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch
@@ -0,0 +1,326 @@
+diff -urN vdr2jpeg-0.1.9.old/ffm.cpp vdr2jpeg-0.1.9/ffm.cpp
+--- vdr2jpeg-0.1.9.old/ffm.cpp 2012-04-21 09:53:26.727892390 +0200
++++ vdr2jpeg-0.1.9/ffm.cpp 2012-04-21 09:57:25.555890271 +0200
+@@ -21,6 +21,7 @@
+
+ extern "C" {
+ #include <libavutil/avutil.h>
++#include <libavutil/mathematics.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libswscale/swscale.h>
+@@ -185,7 +186,7 @@
+ }else
+ ost->sync_opts= lrintf(get_sync_ipts(ost) / av_q2d(enc->time_base));
+
+- nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number);
++ nb_frames= FFMIN(nb_frames, max_frames[AVMEDIA_TYPE_VIDEO] - ost->frame_number);
+ if (nb_frames <= 0)
+ return true;
+
+@@ -221,7 +222,7 @@
+ if(dec->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
+ pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
+ if(dec->coded_frame && dec->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+
+ av_interleaved_write_frame(s, &pkt);
+ enc->coded_frame = old_frame;
+@@ -245,7 +246,7 @@
+ big_picture.quality = (int)ist->st->quality;
+ }else
+ big_picture.quality = (int)ost->st->quality;
+- big_picture.pict_type = 0;
++ big_picture.pict_type = (AVPictureType) 0;
+ // big_picture.pts = AV_NOPTS_VALUE;
+ big_picture.pts= ost->sync_opts;
+ // big_picture.pts= av_rescale(ost->sync_opts, AV_TIME_BASE*(int64_t)enc->time_base.num, enc->time_base.den);
+@@ -268,7 +269,7 @@
+ pkt.dts != AV_NOPTS_VALUE ? av_rescale(pkt.dts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1);*/
+
+ if(enc->coded_frame && enc->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ av_interleaved_write_frame(s, &pkt);
+ *frame_size = ret;
+ }
+@@ -316,13 +317,17 @@
+ data_size = 0;
+ if (ist->decoding_needed) {
+ switch(ist->st->codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
+ /* XXX: allocate picture correctly */
+ avcodec_get_frame_defaults(&picture);
++ AVPacket pkt;
++ av_init_packet( &pkt );
++ pkt.data = ptr;
++ pkt.size = len;
+
+- ret = avcodec_decode_video(ist->st->codec,
+- &picture, &got_picture, ptr, len);
++ ret = avcodec_decode_video2(ist->st->codec,
++ &picture, &got_picture, &pkt);
+ ist->st->quality= picture.quality;
+ if (ret < 0)
+ goto fail_decode;
+@@ -341,7 +346,7 @@
+ goto fail_decode;
+ }
+ } else {
+- if(ist->st->codec->codec_type == CODEC_TYPE_VIDEO) {
++ if(ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ if (ist->st->codec->time_base.num != 0) {
+ ist->next_pts += ((int64_t)AV_TIME_BASE *
+ ist->st->codec->time_base.num) /
+@@ -354,16 +359,6 @@
+ len = 0;
+ }
+
+- /* frame rate emulation */
+- if (ist->st->codec->rate_emu) {
+- int64_t pts = av_rescale((int64_t) ist->frame * ist->st->codec->time_base.num, 1000000, ist->st->codec->time_base.den);
+- int64_t now = av_gettime() - ist->start;
+- if (pts > now)
+- usleep(pts - now);
+-
+- ist->frame++;
+- }
+-
+ #if 0
+ /* mpeg PTS deordering : if it is a P or I frame, the PTS
+ is the one of the next displayed one */
+@@ -398,7 +393,7 @@
+
+ if (ost->encoding_needed) {
+ switch(ost->st->codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ if(!do_video_out(os, ost, ist, &picture, &frame_size))
+ return -1;
+ break;
+@@ -415,9 +410,9 @@
+
+ avcodec_get_frame_defaults(&avframe);
+ ost->st->codec->coded_frame= &avframe;
+- avframe.key_frame = pkt->flags & PKT_FLAG_KEY;
++ avframe.key_frame = pkt->flags & AV_PKT_FLAG_KEY;
+
+- if (ost->st->codec->codec_type == CODEC_TYPE_VIDEO) {
++ if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ ost->sync_opts++;
+ }
+
+@@ -438,7 +433,7 @@
+ opkt.flags= pkt->flags;
+
+ //FIXME remove the following 2 lines they shall be replaced by the bitstream filters
+- if(av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, data_buf, data_size, pkt->flags & PKT_FLAG_KEY))
++ if(av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, data_buf, data_size, pkt->flags & AV_PKT_FLAG_KEY))
+ opkt.destruct= av_destruct_packet;
+
+ av_interleaved_write_frame(os, &opkt);
+@@ -459,7 +454,7 @@
+ AVCodecContext *enc= ost->st->codec;
+ os = output_files[ost->file_index];
+
+- if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
++ if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
+ continue;
+
+ if (ost->encoding_needed) {
+@@ -469,10 +464,10 @@
+ pkt.stream_index= ost->index;
+
+ switch(ost->st->codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL);
+ if(enc->coded_frame && enc->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ break;
+ default:
+ ret=-1;
+@@ -547,11 +542,6 @@
+ ist->index = k;
+ ist->discard = 1; /* the stream is discarded by default
+ (changed later) */
+-
+- if (ist->st->codec->rate_emu) {
+- ist->start = av_gettime();
+- ist->frame = 0;
+- }
+ }
+ }
+
+@@ -641,20 +631,20 @@
+ else
+ codec->time_base = ist->st->time_base;
+ switch(codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ codec->pix_fmt = icodec->pix_fmt;
+ codec->width = icodec->width;
+ codec->height = icodec->height;
+ codec->has_b_frames = icodec->has_b_frames;
+ break;
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_SUBTITLE:
+ break;
+ default:
+ return false;
+ }
+ } else {
+ switch(codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ ost->video_resample = ((codec->width != icodec->width) ||
+ (codec->height != icodec->height) ||
+ (codec->pix_fmt != icodec->pix_fmt));
+@@ -686,7 +676,7 @@
+ return false;
+ }
+ }
+- if(codec->codec_type == CODEC_TYPE_VIDEO){
++ if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
+ int size= codec->width * codec->height;
+ bit_buffer_size= FFMAX(bit_buffer_size, 4*size);
+ }
+@@ -738,7 +728,7 @@
+ ist->file_index, ist->index);
+ return false;
+ }
+- //if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO)
++ //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
+ }
+ }
+@@ -786,7 +776,7 @@
+ ost = ost_table[i];
+ os = output_files[ost->file_index];
+ ist = ist_table[ost->source_index];
+- if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO)
++ if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ opts = ost->sync_opts * av_q2d(ost->st->codec->time_base);
+ else
+ opts = ost->st->pts.val * av_q2d(ost->st->time_base);
+@@ -924,22 +914,22 @@
+ void print_error(const char *filename, int err)
+ {
+ switch(err) {
+- case AVERROR_NUMEXPECTED:
++ case AVERROR(EINVAL):
+ fprintf(stderr, "%s: Incorrect image filename syntax.\n",
+ filename);
+ break;
+ case AVERROR_INVALIDDATA:
+ fprintf(stderr, "%s: Error while parsing header\n", filename);
+ break;
+- case AVERROR_NOFMT:
++ case AVERROR(EILSEQ):
+ fprintf(stderr, "%s: Unknown format\n", filename);
+ break;
+- case AVERROR_IO:
++ case AVERROR(EIO):
+ fprintf(stderr, "%s: I/O error occured\n"
+ "Usually that means that input file is truncated and/or corrupted.\n",
+ filename);
+ break;
+- case AVERROR_NOMEM:
++ case AVERROR(ENOMEM):
+ fprintf(stderr, "%s: memory allocation error occured\n", filename);
+ break;
+ default:
+@@ -968,9 +958,9 @@
+ ap->pix_fmt = frame_pix_fmt;
+ ap->channel = 0;
+ ap->standard = 0;
+- ap->video_codec_id = CODEC_ID_NONE;
++ ic->video_codec_id = CODEC_ID_NONE;
+ if(pgmyuv_compatibility_hack)
+- ap->video_codec_id= CODEC_ID_PGMYUV;
++ ic->video_codec_id= CODEC_ID_PGMYUV;
+
+ /* open the input file with generic libav function */
+ err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
+@@ -999,7 +989,7 @@
+ AVCodecContext *enc = ic->streams[i]->codec;
+ enc->thread_count= 1;
+ switch(enc->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ frame_height = enc->height;
+ frame_width = enc->width;
+ frame_aspect_ratio = av_q2d(enc->sample_aspect_ratio) * enc->width / enc->height;
+@@ -1020,13 +1010,12 @@
+ frame_rate = rfps;
+ frame_rate_base = rfps_base;
+
+- enc->rate_emu = 0;
+ break;
+- case CODEC_TYPE_DATA:
++ case AVMEDIA_TYPE_DATA:
+ break;
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_SUBTITLE:
+ break;
+- case CODEC_TYPE_UNKNOWN:
++ case AVMEDIA_TYPE_UNKNOWN:
+ break;
+ default:
+ //av_abort();
+@@ -1058,12 +1047,12 @@
+ for(i=0;i<ic->nb_streams;i++) {
+ AVCodecContext *enc = ic->streams[i]->codec;
+ switch(enc->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ has_video = 1;
+ break;
+- case CODEC_TYPE_DATA:
+- case CODEC_TYPE_UNKNOWN:
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_DATA:
++ case AVMEDIA_TYPE_UNKNOWN:
++ case AVMEDIA_TYPE_SUBTITLE:
+ break;
+ default:
+ //av_abort();
+@@ -1086,14 +1075,14 @@
+ fprintf(stderr, "Could not alloc stream\n");
+ return false;
+ }
+- avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO);
++ avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
+
+ video_enc = st->codec;
+
+ {
+ AVCodec *codec;
+
+- codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
++ codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
+
+ video_enc->codec_id = codec_id;
+ codec = avcodec_find_encoder(codec_id);
+@@ -1203,7 +1192,7 @@
+ oc = avformat_alloc_context();
+
+ if (!file_oformat) {
+- file_oformat = guess_format(NULL, filename, NULL);
++ file_oformat = av_guess_format(NULL, filename, NULL);
+ if (!file_oformat) {
+ fprintf(stderr, "Unable for find a suitable output format for '%s'\n",
+ filename);
+@@ -1239,7 +1228,7 @@
+ /* check filename in case of an image number is expected */
+ if (oc->oformat->flags & AVFMT_NEEDNUMBER) {
+ if (!av_filename_number_test(oc->filename)) {
+- print_error(oc->filename, AVERROR_NUMEXPECTED);
++ print_error(oc->filename, AVERROR(EINVAL));
+ return false;
+ }
+ }
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch
new file mode 100644
index 000000000000..4d032d89235e
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch
@@ -0,0 +1,238 @@
+Index: vdr2jpeg-0.1.9/ffm.cpp
+===================================================================
+--- vdr2jpeg-0.1.9.orig/ffm.cpp
++++ vdr2jpeg-0.1.9/ffm.cpp
+@@ -22,6 +22,7 @@
+ extern "C" {
+ #include <libavutil/avutil.h>
+ #include <libavutil/mathematics.h>
++#include <libavutil/pixdesc.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libswscale/swscale.h>
+@@ -55,14 +56,12 @@ static int video_qdiff = 3;
+ static const char *video_rc_eq="tex^qComp";
+ static int me_method = ME_EPZS;
+
+-static int same_quality = 1;
+
+ static int top_field_first = -1;
+
+
+
+
+-static float mux_preload= 0.5;
+ static float mux_max_delay= 0.7;
+
+ static int64_t input_ts_offset = 0;
+@@ -150,7 +149,7 @@ static bool do_video_out(AVFormatContext
+ int *frame_size)
+ {
+ int nb_frames, i, ret;
+- AVFrame *final_picture, *formatted_picture, *resampling_dst, *padding_src;
++ AVFrame *final_picture, *formatted_picture, *resampling_dst;
+ AVFrame picture_crop_temp, picture_pad_temp;
+ AVCodecContext *enc, *dec;
+
+@@ -195,11 +194,9 @@ static bool do_video_out(AVFormatContext
+ }
+
+ final_picture = formatted_picture;
+- padding_src = formatted_picture;
+ resampling_dst = &ost->pict_tmp;
+
+ if (ost->video_resample) {
+- padding_src = NULL;
+ final_picture = &ost->pict_tmp;
+ sws_scale(ost->img_resample_ctx, formatted_picture->data, formatted_picture->linesize,
+ 0, ost->resample_height, resampling_dst->data, resampling_dst->linesize);
+@@ -242,10 +239,7 @@ static bool do_video_out(AVFormatContext
+
+ /* handles sameq here. This is not correct because it may
+ not be a global option */
+- if (same_quality) {
+- big_picture.quality = (int)ist->st->quality;
+- }else
+- big_picture.quality = (int)ost->st->quality;
++ big_picture.quality = ist->st->codec->global_quality;
+ big_picture.pict_type = (AVPictureType) 0;
+ // big_picture.pts = AV_NOPTS_VALUE;
+ big_picture.pts= ost->sync_opts;
+@@ -328,7 +322,7 @@ static int output_packet(AVInputStream *
+
+ ret = avcodec_decode_video2(ist->st->codec,
+ &picture, &got_picture, &pkt);
+- ist->st->quality= picture.quality;
++ ist->st->codec->global_quality= picture.quality;
+ if (ret < 0)
+ goto fail_decode;
+ if (!got_picture) {
+@@ -618,31 +612,6 @@ static bool av_encode(AVFormatContext **
+ codec = ost->st->codec;
+ icodec = ist->st->codec;
+
+- if (ost->st->stream_copy) {
+- /* if stream_copy is selected, no need to decode or encode */
+- codec->codec_id = icodec->codec_id;
+- codec->codec_type = icodec->codec_type;
+- if(!codec->codec_tag) codec->codec_tag = icodec->codec_tag;
+- codec->bit_rate = icodec->bit_rate;
+- codec->extradata= icodec->extradata;
+- codec->extradata_size= icodec->extradata_size;
+- if(av_q2d(icodec->time_base) > av_q2d(ist->st->time_base) && av_q2d(ist->st->time_base) < 1.0/1000)
+- codec->time_base = icodec->time_base;
+- else
+- codec->time_base = ist->st->time_base;
+- switch(codec->codec_type) {
+- case AVMEDIA_TYPE_VIDEO:
+- codec->pix_fmt = icodec->pix_fmt;
+- codec->width = icodec->width;
+- codec->height = icodec->height;
+- codec->has_b_frames = icodec->has_b_frames;
+- break;
+- case AVMEDIA_TYPE_SUBTITLE:
+- break;
+- default:
+- return false;
+- }
+- } else {
+ switch(codec->codec_type) {
+ case AVMEDIA_TYPE_VIDEO:
+ ost->video_resample = ((codec->width != icodec->width) ||
+@@ -675,7 +644,6 @@ static bool av_encode(AVFormatContext **
+ default:
+ return false;
+ }
+- }
+ if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
+ int size= codec->width * codec->height;
+ bit_buffer_size= FFMAX(bit_buffer_size, 4*size);
+@@ -690,7 +658,7 @@ static bool av_encode(AVFormatContext **
+ /* dump the file output parameters - cannot be done before in case
+ of stream copy */
+ for(i=0;i<nb_output_files;i++) {
+- dump_format(output_files[i], i, output_files[i]->filename, 1);
++ av_dump_format(output_files[i], i, output_files[i]->filename, 1);
+ }
+
+ /* open each encoder */
+@@ -749,7 +717,7 @@ static bool av_encode(AVFormatContext **
+ /* open files and write file headers */
+ for(i=0;i<nb_output_files;i++) {
+ os = output_files[i];
+- if (av_write_header(os) < 0) {
++ if (avformat_write_header(os,NULL) < 0) {
+ fprintf(stderr, "Could not write header for output file #%d (incorrect codec parameters ?)\n", i);
+ ret = false; //AVERROR(EINVAL);
+ goto fail;
+@@ -941,36 +909,32 @@ void print_error(const char *filename, i
+ static bool opt_input_file(const char *filename)
+ {
+ AVFormatContext *ic;
+- AVFormatParameters params, *ap = &params;
+ int err, ret, rfps, rfps_base;
+ unsigned int i;
+ int64_t timestamp;
++ AVDictionary *opts = NULL;
++ char buf[1024];
+
+ /* get default parameters from command line */
+ ic = avformat_alloc_context();
+
+- memset(ap, 0, sizeof(*ap));
+- ap->prealloced_context = 1;
+- ap->time_base.den = frame_rate;
+- ap->time_base.num = frame_rate_base;
+- ap->width = frame_width + 0 + 0;
+- ap->height = frame_height + 0 + 0;
+- ap->pix_fmt = frame_pix_fmt;
+- ap->channel = 0;
+- ap->standard = 0;
++ snprintf(buf, sizeof(buf), "%d/%d", frame_rate, frame_rate_base);
++ av_dict_set(&opts, "framerate", buf, 0);
++ snprintf(buf, sizeof(buf), "%dx%d", frame_width, frame_height);
++ av_dict_set(&opts, "video_size", buf, 0);
++ av_dict_set(&opts, "pixel_format", av_get_pix_fmt_name(frame_pix_fmt), 0);
++
+ ic->video_codec_id = CODEC_ID_NONE;
+ if(pgmyuv_compatibility_hack)
+ ic->video_codec_id= CODEC_ID_PGMYUV;
+
+ /* open the input file with generic libav function */
+- err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
++ err = avformat_open_input(&ic, filename, file_iformat, &opts);
+ if (err < 0) {
+ print_error(filename, err);
+ return 0;
+ }
+
+- ic->loop_input = 0;
+-
+ /* If not enough info to get the stream parameters, we decode the
+ first frames to get it. (used in mpeg case for example) */
+ ret = av_find_stream_info(ic);
+@@ -1027,7 +991,7 @@ static bool opt_input_file(const char *f
+ input_files_ts_offset[nb_input_files] = input_ts_offset - timestamp;
+ /* dump the file content */
+ if (verbose >= 0)
+- dump_format(ic, nb_input_files, filename, 0);
++ av_dump_format(ic, nb_input_files, filename, 0);
+
+ nb_input_files++;
+ file_iformat = NULL;
+@@ -1133,11 +1097,8 @@ static bool new_video_stream(AVFormatCon
+
+ /* if (intra_only)
+ video_enc->gop_size = 0;*/
+- if (same_quality) {
+ video_enc->flags |= CODEC_FLAG_QSCALE;
+- st->quality = FF_QP2LAMBDA;
+- video_enc->global_quality= (int)st->quality;
+- }
++ video_enc->global_quality= FF_QP2LAMBDA;
+
+ video_enc->max_qdiff = video_qdiff;
+ video_enc->rc_eq = video_rc_eq;
+@@ -1187,7 +1148,6 @@ static bool opt_output_file(const char *
+ {
+ AVFormatContext *oc;
+ int use_video, input_has_video = 0;
+- AVFormatParameters params, *ap = &params;
+
+ oc = avformat_alloc_context();
+
+@@ -1219,8 +1179,6 @@ static bool opt_output_file(const char *
+ return false;
+ }
+
+- oc->timestamp = 0;
+-
+ }
+
+ output_files[nb_output_files++] = oc;
+@@ -1233,16 +1191,7 @@ static bool opt_output_file(const char *
+ }
+ }
+
+- memset(ap, 0, sizeof(*ap));
+- if (av_set_parameters(oc, ap) < 0) {
+- fprintf(stderr, "%s: Invalid encoding parameters\n",
+- oc->filename);
+- return false;
+- }
+-
+- oc->preload= (int)(mux_preload*AV_TIME_BASE);
+ oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE);
+- oc->loop_output = AVFMT_NOOUTPUTLOOP;
+
+ /* reset some options */
+ file_oformat = NULL;
+@@ -1323,7 +1272,7 @@ bool decode (const char* szMPVfile, /* c
+ AVFormatContext *s = output_files[i];
+
+ if (!(s->oformat->flags & AVFMT_NOFILE))
+- url_fclose(s->pb);
++ avio_close(s->pb);
+ for(j=0;j<s->nb_streams;j++)
+ av_free(s->streams[j]);
+ av_free(s);
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch
new file mode 100644
index 000000000000..c984cfc4cff5
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch
@@ -0,0 +1,54 @@
+--- ffm.cpp.old 2013-06-22 20:12:27.972712290 +0200
++++ ffm.cpp 2013-06-22 20:13:33.586709956 +0200
+@@ -672,7 +672,7 @@
+ ost->file_index, ost->index);
+ return false;
+ }
+- if (avcodec_open(ost->st->codec, codec) < 0) {
++ if (avcodec_open2(ost->st->codec, codec, NULL) < 0) {
+ fprintf(stderr, "Error while opening codec for output stream #%d.%d - maybe incorrect parameters such as bit_rate, rate, width or height\n",
+ ost->file_index, ost->index);
+ return false;
+@@ -691,7 +691,7 @@
+ ist->st->codec->codec_id, ist->file_index, ist->index);
+ return false;
+ }
+- if (avcodec_open(ist->st->codec, codec) < 0) {
++ if (avcodec_open2(ist->st->codec, codec, NULL) < 0) {
+ fprintf(stderr, "Error while opening codec for input stream #%d.%d\n",
+ ist->file_index, ist->index);
+ return false;
+@@ -937,7 +937,7 @@
+
+ /* If not enough info to get the stream parameters, we decode the
+ first frames to get it. (used in mpeg case for example) */
+- ret = av_find_stream_info(ic);
++ ret = avformat_find_stream_info(ic, NULL);
+ if (ret < 0 && verbose >= 0) {
+ fprintf(stderr, "%s: could not find codec parameters\n", filename);
+ return false;
+@@ -1034,12 +1034,13 @@
+ AVCodecContext *video_enc;
+ CodecID codec_id;
+
+- st = av_new_stream(oc, oc->nb_streams);
++ st = avformat_new_stream(oc, NULL);
+ if (!st) {
+ fprintf(stderr, "Could not alloc stream\n");
+ return false;
+ }
+- avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
++ st->id = oc->nb_streams;
++ avcodec_get_context_defaults3(st->codec, NULL);
+
+ video_enc = st->codec;
+
+@@ -1204,7 +1205,7 @@
+ {
+ av_log_set_level(verbose);
+ av_register_all();
+- avctx_opts= avcodec_alloc_context();
++ avctx_opts= avcodec_alloc_context3(NULL);
+ }
+
+ void ffm_deinitalize(void)
diff --git a/media-video/vdr2jpeg/metadata.xml b/media-video/vdr2jpeg/metadata.xml
new file mode 100644
index 000000000000..b3e2a5f7a5f0
--- /dev/null
+++ b/media-video/vdr2jpeg/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ <name>Joerg Bornkessel</name>
+ </maintainer>
+ <longdescription lang="en">
+ Addon needed for XXV - WWW Admin for the Video Disk Recorder
+ Creating jpeg pics from *.vdr files
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild b/media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild
new file mode 100644
index 000000000000..39cef9de1847
--- /dev/null
+++ b/media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+VERSION="717" # every bump, new version
+
+RESTRICT="strip"
+
+DESCRIPTION="Addon needed for XXV - WWW Admin for the Video Disk Recorder"
+HOMEPAGE="http://projects.vdr-developer.org/projects/xxv"
+SRC_URI="mirror://vdr-developerorg/${VERSION}/${P}.tgz
+ mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/ffmpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e "s:usr/local:usr:" \
+ -e "s:-o vdr2jpeg:\$(LDFLAGS) -o vdr2jpeg:" \
+ Makefile || die
+ epatch "${FILESDIR}/${P}-ffmpeg.patch" \
+ "${FILESDIR}/${P}-ffmpeg1.patch" \
+ "${FILESDIR}/${P}-libav9.patch"
+
+ if has_version ">=media-video/ffmpeg-2"; then
+ sed -e "s:CodecID:AVCodecID:" -i ffm.cpp
+ fi
+}
+
+src_install() {
+ dobin vdr2jpeg
+ dodoc README LIESMICH
+}
diff --git a/media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild b/media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild
new file mode 100644
index 000000000000..72ef90919dea
--- /dev/null
+++ b/media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+VERSION="1911" # every bump, new version
+
+RESTRICT="strip"
+
+DESCRIPTION="Addon needed for XXV - WWW Admin for the Video Disk Recorder"
+HOMEPAGE="http://projects.vdr-developer.org/projects/xxv"
+SRC_URI="mirror://vdr-developerorg/${VERSION}/${P}.tgz
+ mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libav"
+
+RDEPEND="
+ libav? ( media-video/libav )
+ !libav? ( media-video/ffmpeg:0 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e "s:usr/local:usr:" \
+ -e "s:-o vdr2jpeg:\$(LDFLAGS) -o vdr2jpeg:" \
+ Makefile || die
+}
+
+src_install() {
+ if use libav; then
+ emake DESTDIR="${D}" install FFMPEG_BIN=/usr/bin/avconv
+ else
+ emake DESTDIR="${D}" install FFMPEG_BIN=/usr/bin/ffmpeg
+ fi
+
+ dodoc README LIESMICH
+}