Skip to contentSkip to conversation

package/kodi: Bump version to 14.0a4-Helix

PATCH Superseded Bernd Kuhls 2 participants 16 messages Oct 18, 2014 – Oct 19, 2014

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v3 cover package/kodi: Bump version to 14.0a4-Helix

Hi,

this patchset is a RFC and not meant to be committed to buildroot git yet.

The follow-up version of XBMC 13.x-Gotham will be called Kodi, its alpha4 was released October 3rd: http://xbmc.org/kodi-14-0-helix-alpha-4

In order to prepare this version bump I am sharing my patchset as an RFC, two preparatory patches to rename the package, splitted for easier review, and one patch for the real version bump.

Regards, Bernd

v3: - rebased
- added audioenconder addons, Kodi now needs to be installed to STAGING_DIR
- kodi: removed dependency to flac, backported from upstream master
- bumped xbmc-pvr-addons
- bumped xbmc-addon-xvdr
- note: kodi specific ffmpeg-patches no longer depend on
http://patchwork.ozlabs.org/patch/396911/
patch was committed to buildroot

v2: - rebased: - _CONF_OPT -> _CONF_OPTS
- added notes to "Rename XBMC to Kodi"-patches, they are meant to be committed together (Yann)
- kodi specific ffmpeg-patches are now a seperate commit (Yann), depends on http://patchwork.ozlabs.org/patch/396911/
- ffmpeg is now compiled dynamically, ported from
https://github.com/OpenELEC/OpenELEC.tv/commit/ba586280

Bernd Kuhls (11):
package/ffmpeg: Add Kodi patchset
Rename XBMC to Kodi - part I - move files
Rename XBMC to Kodi - part II - rename variables package/kodi: Bump version to 14.0a4-Helix
xbmc-pvr-addons: Bump version for Helix-compatibility package/xbmc-addon-xvdr: Bump version for Helix-compatibility package/kodi: Enable install to STAGING_DIR, needed for audioencoder
addons
kodi-audioencoder-flac: New package package/kodi-audioencoder-lame: New package package/kodi-audioencoder-vorbis: New package package/kodi-audioencoder-wav: New package

 package/ffmpeg/ffmpeg-0001-fminf.patch          |   47 +++++++++
 package/libplist/libplist.mk                    |    5 +-
 package/openssl/openssl.mk                      |    2 -
 package/uclibc/0.9.33.2/uclibc-0063-fminf.patch |  127 -----------------------
 4 files changed, 51 insertions(+), 130 deletions(-)
 create mode 100644 package/ffmpeg/ffmpeg-0001-fminf.patch
 delete mode 100644 package/uclibc/0.9.33.2/uclibc-0063-fminf.patch
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 1/11 package/ffmpeg: Add Kodi patchset

---
 package/ffmpeg/ffmpeg-kodi.patch |  904 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 904 insertions(+)
 create mode 100644 package/ffmpeg/ffmpeg-kodi.patch
package/ffmpeg/ffmpeg-kodi.patch new file +904 -0
new file mode 100644
index 0000000..f13d674
@@ -0,0 +1,904 @@
+In the past xbmc delivered its own ffmpeg source code with specific patches to
+address bugs found during the use of xbmc. For Helix the ffmpeg source code was
+removed, Helix uses a vanilla ffmpeg source tarball and applies this patchset
+on top of it.
+
+Downloaded from
+https://github.com/xbmc/FFmpeg/compare/FFmpeg:release/2.4...release/2.4-xbmc.patch
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+From 622f5f1b5e76283e70772152134c7562b6e17e9d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sun, 11 Sep 2011 19:04:51 +0200
+Subject: [PATCH 01/17] Support raw dvdsub palette as stored on normal dvd's
+
+This is how the palette is stored on dvd's. Currently
+only xbmc passes the palette information to libavcodec
+this way.
+---
+ libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
+index 7355c03..4a945d9 100644
+--- a/libavcodec/dvdsubdec.c
++++ b/libavcodec/dvdsubdec.c
+@@ -61,6 +61,24 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *
+     }
+ }
+ 
++static void ayvu_to_argb(const uint8_t *ayvu, uint32_t *argb, int num_values)
++{
++    uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
++    uint8_t r, g, b;
++    int i, y, cb, cr, a;
++    int r_add, g_add, b_add;
++
++    for (i = num_values; i > 0; i--) {
++        a = *ayvu++;
++        y = *ayvu++;
++        cr = *ayvu++;
++        cb = *ayvu++;
++        YUV_TO_RGB1_CCIR(cb, cr);
++        YUV_TO_RGB2_CCIR(r, g, b, y);
++        *argb++ = (a << 24) | (r << 16) | (g << 8) | b;
++    }
++}
++
+ static int decode_run_2bit(GetBitContext *gb, int *color)
+ {
+     unsigned int v, t;
+@@ -629,6 +647,12 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
+ 
+     if (ctx->palette_str)
+         parse_palette(ctx, ctx->palette_str);
++
++    if (!ctx->has_palette && avctx->extradata_size == 64) {
++        ayvu_to_argb((uint8_t*)avctx->extradata, ctx->palette, 16);
++        ctx->has_palette = 1;
++    }
++
+     if (ctx->has_palette) {
+         int i;
+         av_log(avctx, AV_LOG_DEBUG, "palette:");
+
+From 5bd445513110e57a41458888c80b0532cdcd09aa Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sat, 22 Oct 2011 18:33:45 +0200
+Subject: [PATCH 02/17] Check return value of avio_seek and avoid modifying
+ state if it fails
+
+The code still modifies state if the timestamp is not found. Not
+sure exactly how to avoid that.
+---
+ libavformat/matroskadec.c | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
+index b8ddf67..1a1935f 100644
+--- a/libavformat/matroskadec.c
++++ b/libavformat/matroskadec.c
+@@ -2921,8 +2921,8 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
+     timestamp = FFMAX(timestamp, st->index_entries[0].timestamp);
+ 
+     if ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
+-        avio_seek(s->pb, st->index_entries[st->nb_index_entries - 1].pos,
+-                  SEEK_SET);
++        if (avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET) < 0)
++            return -1;
+         matroska->current_id = 0;
+         while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
+             matroska_clear_queue(matroska);
+@@ -2931,16 +2931,11 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
+         }
+     }
+ 
+-    matroska_clear_queue(matroska);
+     if (index < 0 || (matroska->cues_parsing_deferred < 0 && index == st->nb_index_entries - 1))
+         goto err;
+ 
+     index_min = index;
+     for (i = 0; i < matroska->tracks.nb_elem; i++) {
+-        tracks[i].audio.pkt_cnt        = 0;
+-        tracks[i].audio.sub_packet_cnt = 0;
+-        tracks[i].audio.buf_timecode   = AV_NOPTS_VALUE;
+-        tracks[i].end_timecode         = 0;
+         if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE &&
+             tracks[i].stream->discard != AVDISCARD_ALL) {
+             index_sub = av_index_search_timestamp(
+@@ -2954,8 +2949,18 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
+         }
+     }
+ 
+-    avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET);
+-    matroska->current_id       = 0;
++    if (avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET) < 0)
++        return -1;
++
++    matroska_clear_queue(matroska);
++    for (i=0; i < matroska->tracks.nb_elem; i++) {
++        tracks[i].audio.pkt_cnt = 0;
++        tracks[i].audio.sub_packet_cnt = 0;
++        tracks[i].audio.buf_timecode = AV_NOPTS_VALUE;
++        tracks[i].end_timecode = 0;
++    }
++    matroska->current_id = 0;
++
+     if (flags & AVSEEK_FLAG_ANY) {
+         st->skip_to_keyframe = 0;
+         matroska->skip_to_timecode = timestamp;
+
+From 870b1a68c4fdb6a31b0dc29ece7aa429659fb52d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Mon, 12 Sep 2011 21:37:17 +0200
+Subject: [PATCH 03/17] asf hacks
+
+---
+ libavformat/asfdec.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
+index 7f7bb4d..8911987 100644
+--- a/libavformat/asfdec.c
++++ b/libavformat/asfdec.c
+@@ -1549,9 +1549,20 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
+     AVStream *st    = s->streams[stream_index];
+     int ret = 0;
+ 
++    if (pts == 0) {
++      // this is a hack since av_gen_search searches the entire file in this case
++      av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", s->data_offset);
++      if (avio_seek(s->pb, s->data_offset, SEEK_SET) < 0)
++          return -1;
++      return 0;
++    }
++
+     if (s->packet_size <= 0)
+         return -1;
+ 
++    if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
++        return -1;
++
+     /* Try using the protocol's read_seek if available */
+     if (s->pb) {
+         int ret = avio_seek_time(s->pb, stream_index, pts, flags);
+
+From 6fee17a0a63bf20b7835832e2d01ee7857b821b1 Mon Sep 17 00:00:00 2001
+From: Cory Fields <[email protected]>
+Date: Mon, 28 Jun 2010 01:55:31 -0400
+Subject: [PATCH 04/17] if av_read_packet returns AVERROR_IO, we are done.
+ ffmpeg's codecs might or might not handle returning any completed demuxed
+ packets correctly
+
+---
+ libavformat/utils.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index e899e4d..d75c168 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -1271,6 +1271,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
+         if (ret < 0) {
+             if (ret == AVERROR(EAGAIN))
+                 return ret;
++            if (ret == AVERROR(EIO))
++                return ret;
+             /* flush the parsers */
+             for (i = 0; i < s->nb_streams; i++) {
+                 st = s->streams[i];
+
+From f7ef5230815955d6db8037cbca363c23c1ebce5b Mon Sep 17 00:00:00 2001
+From: Cory Fields <[email protected]>
+Date: Mon, 28 Jun 2010 02:10:50 -0400
+Subject: [PATCH 05/17] added: Ticket #7187, TV Teletext support for DVB EBU
+ Teletext streams
+
+---
+ libavcodec/avcodec.h | 4 ++++
+ libavformat/mpegts.c | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index fb1c9ca..45bfba3 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -523,6 +523,10 @@ enum AVCodecID {
+     AV_CODEC_ID_PJS        = MKBETAG('P','h','J','S'),
+     AV_CODEC_ID_ASS        = MKBETAG('A','S','S',' '),  ///< ASS as defined in Matroska
+ 
++    /* data codecs */
++    AV_CODEC_ID_VBI_DATA= 0x17500,
++    AV_CODEC_ID_VBI_TELETEXT,
++
+     /* other specific kind of codecs (generally used for attachments) */
+     AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID pointing at the start of various fake codecs.
+     AV_CODEC_ID_TTF = 0x18000,
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 8808269..4d73e6d 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -717,6 +717,8 @@ static const StreamType DESC_types[] = {
+     { 0x7b, AVMEDIA_TYPE_AUDIO,    AV_CODEC_ID_DTS          },
+     { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT },
+     { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
++    { 0x45, AVMEDIA_TYPE_DATA,         AV_CODEC_ID_VBI_DATA }, /* VBI Data descriptor */
++    { 0x46, AVMEDIA_TYPE_DATA,     AV_CODEC_ID_VBI_TELETEXT }, /* VBI Teletext descriptor */
+     { 0 },
+ };
+ 
+
+From 1b74fd18695d977496d26085fb305fababfebd1d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sun, 18 Sep 2011 19:16:34 +0200
+Subject: [PATCH 06/17] Don't accept mpegts PMT that isn't current
+
+---
+ libavformat/mpegts.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 4d73e6d..4160c80 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -561,6 +561,7 @@ typedef struct SectionHeader {
+     uint8_t tid;
+     uint16_t id;
+     uint8_t version;
++    uint8_t current;
+     uint8_t sec_num;
+     uint8_t last_sec_num;
+ } SectionHeader;
+@@ -632,6 +633,7 @@ static int parse_section_header(SectionHeader *h,
+     val = get8(pp, p_end);
+     if (val < 0)
+         return val;
++    h->current = val & 0x1;
+     h->version = (val >> 1) & 0x1f;
+     val = get8(pp, p_end);
+     if (val < 0)
+@@ -1904,6 +1906,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
+         return;
+     if (ts->skip_changes)
+         return;
++    if (!h->current)
++        return;
+ 
+     ts->stream->ts_id = h->id;
+ 
+
+From 354837b4c939246753039ce70c60cbd9fb1e01d0 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sun, 18 Sep 2011 19:17:23 +0200
+Subject: [PATCH 07/17] Don't reparse PMT unless it's version has changed
+
+---
+ libavformat/mpegts.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 4160c80..c946449 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -87,6 +87,7 @@ struct MpegTSFilter {
+     int es_id;
+     int last_cc; /* last cc code (-1 if first packet) */
+     int64_t last_pcr;
++    int last_version; /* last version of data on this pid */
+     enum MpegTSFilterType type;
+     union {
+         MpegTSPESFilter pes_filter;
+@@ -439,6 +440,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid,
+     filter->es_id   = -1;
+     filter->last_cc = -1;
+     filter->last_pcr= -1;
++    filter->last_version = -1;
+ 
+     return filter;
+ }
+@@ -1908,6 +1910,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
+         return;
+     if (!h->current)
+         return;
++    if (h->version == filter->last_version)
++        return;
++    filter->last_version = h->version;
++    av_dlog(ts->stream, "version=%d\n", filter->last_version);
+ 
+     ts->stream->ts_id = h->id;
+ 
+
+From c874d974baefc35d6300938997131efd1a4da48b Mon Sep 17 00:00:00 2001
+From: Cory Fields <[email protected]>
+Date: Fri, 9 Jul 2010 16:43:31 -0400
+Subject: [PATCH 08/17] Read PID timestamps as well as PCR timestamps to find
+ location in mpegts stream
+
+---
+ libavformat/mpegts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 46 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index c946449..772df83 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -2388,6 +2388,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) {
+         av_log(s, pb->seekable ? AV_LOG_ERROR : AV_LOG_INFO, "Unable to seek back to the start\n");
+ }
+ 
++static int parse_timestamp(int64_t *ts, const uint8_t *buf)
++{
++    int afc, flags;
++    const uint8_t *p;
++
++    if(!(buf[1] & 0x40)) /* must be a start packet */
++        return -1;
++
++    afc = (buf[3] >> 4) & 3;
++    p = buf + 4;
++    if (afc == 0 || afc == 2) /* invalid or only adaption field */
++        return -1;
++    if (afc == 3)
++        p += p[0] + 1;
++    if (p >= buf + TS_PACKET_SIZE)
++        return -1;
++
++    if (p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01)  /* packet_start_code_prefix */
++        return -1;
++
++    flags = p[3] | 0x100; /* stream type */
++    if (!((flags >= 0x1c0 && flags <= 0x1df) ||
++          (flags >= 0x1e0 && flags <= 0x1ef) ||
++          (flags == 0x1bd) || (flags == 0x1fd)))
++        return -1;
++
++    flags = p[7];
++    if ((flags & 0xc0) == 0x80) {
++        *ts = ff_parse_pes_pts(p+9);
++        return 0;
++    } else if ((flags & 0xc0) == 0xc0) {
++        *ts = ff_parse_pes_pts(p+9+5);
++        return 0;
++    }
++    return -1;
++}
++
++
+ static int mpegts_read_header(AVFormatContext *s)
+ {
+     MpegTSContext *ts = s->priv_data;
+@@ -2587,6 +2625,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
+     uint8_t buf[TS_PACKET_SIZE];
+     int pcr_l, pcr_pid =
+         ((PESContext *)s->streams[stream_index]->priv_data)->pcr_pid;
++    int pid = ((PESContext*)s->streams[stream_index]->priv_data)->pid;
+     int pos47 = ts->pos47_full % ts->raw_packet_size;
+     pos =
+         ((*ppos + ts->raw_packet_size - 1 - pos47) / ts->raw_packet_size) *
+@@ -2608,6 +2647,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
+             *ppos = pos;
+             return timestamp;
+         }
++        if ((pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pid) &&
++            parse_timestamp(&timestamp, buf) == 0) {
++            *ppos = pos;
++            return timestamp;
++        }
+         pos += ts->raw_packet_size;
+     }
+ 
+@@ -2707,7 +2751,7 @@ AVInputFormat ff_mpegts_demuxer = {
+     .read_header    = mpegts_read_header,
+     .read_packet    = mpegts_read_packet,
+     .read_close     = mpegts_read_close,
+-    .read_timestamp = mpegts_get_dts,
++    .read_timestamp = mpegts_get_pcr,
+     .flags          = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
+     .priv_class     = &mpegts_class,
+ };
+@@ -2719,7 +2763,7 @@ AVInputFormat ff_mpegtsraw_demuxer = {
+     .read_header    = mpegts_read_header,
+     .read_packet    = mpegts_raw_read_packet,
+     .read_close     = mpegts_read_close,
+-    .read_timestamp = mpegts_get_dts,
++    .read_timestamp = mpegts_get_pcr,
+     .flags          = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
+     .priv_class     = &mpegtsraw_class,
+ };
+
+From 24ad8f579e523eeec50fbedca28820c3619449c7 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sat, 22 Oct 2011 19:01:38 +0200
+Subject: [PATCH 09/17] Get stream durations using read_timestamp
+
+---
+ libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index d75c168..9f74313 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -2312,6 +2312,41 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
+ #define DURATION_MAX_READ_SIZE 250000LL
+ #define DURATION_MAX_RETRY 4
+ 
++static void av_estimate_timings_from_pts2(AVFormatContext *ic, int64_t old_offset)
++{
++    AVStream *st;
++    int i, step= 1024;
++    int64_t ts, pos;
++
++    for(i=0;i<ic->nb_streams;i++) {
++        st = ic->streams[i];
++
++        pos = 0;
++        ts = ic->iformat->read_timestamp(ic, i, &pos, DURATION_MAX_READ_SIZE);
++        if (ts == AV_NOPTS_VALUE)
++            continue;
++        if (st->start_time > ts || st->start_time == AV_NOPTS_VALUE)
++            st->start_time = ts;
++
++        pos = avio_size(ic->pb) - 1;
++        do {
++            pos -= step;
++            ts = ic->iformat->read_timestamp(ic, i, &pos, pos + step);
++            step += step;
++        } while (ts == AV_NOPTS_VALUE && pos >= step && step < DURATION_MAX_READ_SIZE);
++
++        if (ts == AV_NOPTS_VALUE)
++            continue;
++
++        if (st->duration < ts - st->start_time || st->duration == AV_NOPTS_VALUE)
++            st->duration = ts - st->start_time;
++    }
++
++    fill_all_stream_timings(ic);
++
++    avio_seek(ic->pb, old_offset, SEEK_SET);
++}
++
+ /* only usable for MPEG-PS streams */
+ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
+ {
+@@ -2462,6 +2497,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
+          * the components */
+         fill_all_stream_timings(ic);
+         ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
++    } else if (ic->iformat->read_timestamp && 
++        file_size && ic->pb->seekable) {
++        /* get accurate estimate from the PTSes */
++        av_estimate_timings_from_pts2(ic, old_offset);
+     } else {
+         /* less precise: use bitrate info */
+         estimate_timings_from_bit_rate(ic);
+
+From 5edeb3be287bae328c18b0dd6a3278843882a276 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Wed, 8 Dec 2010 14:03:43 +0000
+Subject: [PATCH 10/17] changed: allow 4 second skew between streams in mov
+ before attempting to seek
+
+---
+ libavformat/mov.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/mov.c b/libavformat/mov.c
+index ae48c02..047cdc6 100644
+--- a/libavformat/mov.c
++++ b/libavformat/mov.c
+@@ -3694,8 +3694,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
+             if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
+                 (s->pb->seekable &&
+                  ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
+-                 ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
+-                  (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
++                 ((FFABS(best_dts - dts) <= 4*AV_TIME_BASE && current_sample->pos < sample->pos) ||
++                  (FFABS(best_dts - dts) > 4*AV_TIME_BASE && dts < best_dts)))))) {
+                 sample = current_sample;
+                 best_dts = dts;
+                 *st = avst;
+
+From 957d47d1c2484a398bc357e102357fc47515610f Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Fri, 26 Nov 2010 20:56:48 +0000
+Subject: [PATCH 11/17] fixed: memleak in mpegts demuxer on some malformed (??)
+ mpegts files with too large pes packets
+
+at-visions sample file brokenStream.mpg
+---
+ libavformat/mpegts.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 772df83..40dfab1 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -820,6 +820,10 @@ static void reset_pes_packet_state(PESContext *pes)
+ 
+ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
+ {
++    if(pkt->data) {
++      av_log(pes->stream, AV_LOG_ERROR, "ignoring previously allocated packet on stream %d\n", pkt->stream_index);
++      av_free_packet(pkt);
++    }
+     av_init_packet(pkt);
+ 
+     pkt->buf  = pes->buffer;
+@@ -2578,6 +2582,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
+ 
+     pkt->size = -1;
+     ts->pkt = pkt;
++    ts->pkt->data = NULL;
++
+     ret = handle_packets(ts, 0);
+     if (ret < 0) {
+         av_free_packet(ts->pkt);
+
+From 2962ec9624a1c7108b2874335616ef5cc0a4a0d3 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Mon, 28 Jun 2010 21:26:54 +0000
+Subject: [PATCH 12/17] Speed up mpegts av_find_stream_info
+
+---
+ libavformat/mpegts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 40dfab1..031f4e1 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -982,7 +982,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
+                         goto skip;
+ 
+                     /* stream not present in PMT */
+-                    if (!pes->st) {
++                    if (ts->auto_guess && !pes->st) {
+                         if (ts->skip_changes)
+                             goto skip;
+ 
+
+From 2418829bd999ac9ce6c4c1ce1e8bc267327a4b86 Mon Sep 17 00:00:00 2001
+From: marc <mhocking@ubuntu-desktop.(none)>
+Date: Mon, 18 Feb 2013 17:18:18 +0000
+Subject: [PATCH 13/17] dxva-h264 Fix dxva playback of streams that don't start
+ with an I-Frame.
+
+---
+ libavcodec/dxva2_h264.c | 8 ++++++++
+ libavcodec/h264.c       | 1 +
+ libavcodec/h264.h       | 2 ++
+ libavcodec/h264_slice.c | 1 +
+ 4 files changed, 12 insertions(+)
+
+diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
+index 6deccc3..85b25fd 100644
+--- a/libavcodec/dxva2_h264.c
++++ b/libavcodec/dxva2_h264.c
+@@ -451,6 +451,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
+ 
+     if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
+         return -1;
++
++    // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs
++    if (!h->got_first_iframe) {
++        if (!(ctx_pic->pp.wBitFields & (1 << 15)))
++            return -1;
++        h->got_first_iframe = 1;
++    }
++
+     ret = ff_dxva2_common_end_frame(avctx, &h->cur_pic_ptr->f,
+                                     &ctx_pic->pp, sizeof(ctx_pic->pp),
+                                     &ctx_pic->qm, sizeof(ctx_pic->qm),
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index c4f4b05..080845c 100644
+--- a/libavcodec/h264.c
++++ b/libavcodec/h264.c
+@@ -1085,6 +1085,7 @@ void ff_h264_flush_change(H264Context *h)
+     h->list_count = 0;
+     h->current_slice = 0;
+     h->mmco_reset = 1;
++    h->got_first_iframe = 0;
+ }
+ 
+ /* forget old pics after a seek */
+diff --git a/libavcodec/h264.h b/libavcodec/h264.h
+index 5ec4f0c..d26cee3 100644
+--- a/libavcodec/h264.h
++++ b/libavcodec/h264.h
+@@ -740,6 +740,8 @@ typedef struct H264Context {
+     int luma_weight_flag[2];    ///< 7.4.3.2 luma_weight_lX_flag
+     int chroma_weight_flag[2];  ///< 7.4.3.2 chroma_weight_lX_flag
+ 
++    int got_first_iframe;
++
+     // Timestamp stuff
+     int sei_buffering_period_present;   ///< Buffering period SEI flag
+     int initial_cpb_removal_delay[32];  ///< Initial timestamps for CPBs
+diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
+index ffb7de5..338114e 100644
+--- a/libavcodec/h264_slice.c
++++ b/libavcodec/h264_slice.c
+@@ -1178,6 +1178,7 @@ static int h264_slice_header_init(H264Context *h, int reinit)
+         ff_h264_free_tables(h, 0);
+     h->first_field           = 0;
+     h->prev_interlaced_frame = 1;
++    h->got_first_iframe = 0;
+ 
+     init_scan_tables(h);
+     ret = ff_h264_alloc_tables(h);
+
+From a8df0cfd31a31b6962616cabc40d7929746eee4d Mon Sep 17 00:00:00 2001
+From: elupus <[email protected]>
+Date: Tue, 1 Nov 2011 20:18:35 +0100
+Subject: [PATCH 14/17] add public version of ff_read_frame_flush
+
+We need this since we sometimes seek on the
+input stream behind ffmpeg's back. After this
+all data need to be flushed completely.
+---
+ libavformat/avformat.h | 5 +++++
+ libavformat/utils.c    | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/libavformat/avformat.h b/libavformat/avformat.h
+index b915148..64695c6 100644
+--- a/libavformat/avformat.h
++++ b/libavformat/avformat.h
+@@ -2112,6 +2112,11 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
+ int av_read_frame(AVFormatContext *s, AVPacket *pkt);
+ 
+ /**
++ * Clear out any buffered data in context
++ */
++void av_read_frame_flush(AVFormatContext *s);
++
++/**
+  * Seek to the keyframe at timestamp.
+  * 'timestamp' in 'stream_index'.
+  *
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 9f74313..8de7c3d 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -1580,6 +1580,11 @@ void ff_read_frame_flush(AVFormatContext *s)
+     }
+ }
+ 
++void av_read_frame_flush(AVFormatContext *s)
++{
++  ff_read_frame_flush(s);
++}
++
+ void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
+ {
+     int i;
+
+From d01ef454fb11286e666d568c47ead0c1633d659a Mon Sep 17 00:00:00 2001
+From: Memphiz <[email protected]>
+Date: Mon, 12 May 2014 18:27:01 +0200
+Subject: [PATCH 15/17] fix --disable-ffplay should disable any needs to check
+ or add compile/link flags otherwise SDL gets spewed all over pkg-config files
+ and generally causes a mess
+
+---
+ configure | 32 +++++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 15 deletions(-)
+
+diff --git a/configure b/configure
+index 618dfab..30fe640 100755
+--- a/configure
++++ b/configure
+@@ -4911,22 +4911,24 @@ if enabled libdc1394; then
+     die "ERROR: No version of libdc1394 found "
+ fi
+ 
+-SDL_CONFIG="${cross_prefix}sdl-config"
+-if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+-    enable sdl
+-else
+-  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+-    sdl_cflags=$("${SDL_CONFIG}" --cflags)
+-    sdl_libs=$("${SDL_CONFIG}" --libs)
+-    check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+-    enable sdl
+-  fi
++if enabled ffplay; then
++    SDL_CONFIG="${cross_prefix}sdl-config"
++    if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
++        enable sdl
++    else
++      if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
++        sdl_cflags=$("${SDL_CONFIG}" --cflags)
++        sdl_libs=$("${SDL_CONFIG}" --libs)
++        check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
++        enable sdl
++      fi
++    fi
++    enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
+ fi
+-enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
+ 
+ makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
+ enabled makeinfo && (makeinfo --version | \
+
+From 27fa565a9ec4a4e1b1f28e83e17a9aa7bf795fe7 Mon Sep 17 00:00:00 2001
+From: Hendrik Leppkes <[email protected]>
+Date: Sun, 21 Sep 2014 02:29:27 +0200
+Subject: [PATCH 16/17] mlpdec: support major sync headers with optional
+ extension blocks
+
+Signed-off-by: Michael Niedermayer <[email protected]>
+---
+ libavcodec/mlp_parser.c | 29 ++++++++++++++++++++++++-----
+ libavcodec/mlp_parser.h |  1 +
+ libavcodec/mlpdec.c     |  7 ++++++-
+ 3 files changed, 31 insertions(+), 6 deletions(-)
+
+diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
+index 4bb82ee..deaa844 100644
+--- a/libavcodec/mlp_parser.c
++++ b/libavcodec/mlp_parser.c
+@@ -119,6 +119,23 @@ uint64_t ff_truehd_layout(int chanmap)
+     return layout;
+ }
+ 
++static int ff_mlp_get_major_sync_size(const uint8_t * buf, int bufsize)
++{
++    int has_extension, extensions = 0;
++    int size = 28;
++    if (bufsize < 28)
++        return -1;
++
++    if (AV_RB32(buf) == 0xf8726fba) {
++        has_extension = buf[25] & 1;
++        if (has_extension) {
++            extensions = buf[26] >> 4;
++            size += 2 + extensions * 2;
++        }
++    }
++    return size;
++}
++
+ /** Read a major sync info header - contains high level information about
+  *  the stream - sample rate, channel arrangement etc. Most of this
+  *  information is not actually necessary for decoding, only for playback.
+@@ -127,18 +144,19 @@ uint64_t ff_truehd_layout(int chanmap)
+ 
+ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
+ {
+-    int ratebits, channel_arrangement;
++    int ratebits, channel_arrangement, header_size;
+     uint16_t checksum;
+ 
+     av_assert1(get_bits_count(gb) == 0);
+ 
+-    if (gb->size_in_bits < 28 << 3) {
++    header_size = ff_mlp_get_major_sync_size(gb->buffer, gb->size_in_bits >> 3);
++    if (header_size < 0 || gb->size_in_bits < header_size << 3) {
+         av_log(log, AV_LOG_ERROR, "packet too short, unable to read major sync\n");
+         return -1;
+     }
+ 
+-    checksum = ff_mlp_checksum16(gb->buffer, 26);
+-    if (checksum != AV_RL16(gb->buffer+26)) {
++    checksum = ff_mlp_checksum16(gb->buffer, header_size - 2);
++    if (checksum != AV_RL16(gb->buffer+header_size-2)) {
+         av_log(log, AV_LOG_ERROR, "major sync info header checksum error\n");
+         return AVERROR_INVALIDDATA;
+     }
+@@ -147,6 +165,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
+         return AVERROR_INVALIDDATA;
+ 
+     mh->stream_type = get_bits(gb, 8);
++    mh->header_size = header_size;
+ 
+     if (mh->stream_type == 0xbb) {
+         mh->group1_bits = mlp_quants[get_bits(gb, 4)];
+@@ -199,7 +218,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
+ 
+     mh->num_substreams = get_bits(gb, 4);
+ 
+-    skip_bits_long(gb, 4 + 11 * 8);
++    skip_bits_long(gb, 4 + (header_size - 17) * 8);
+ 
+     return 0;
+ }
+diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
+index 5d1d2e7..0c0109e 100644
+--- a/libavcodec/mlp_parser.h
++++ b/libavcodec/mlp_parser.h
+@@ -32,6 +32,7 @@
+ typedef struct MLPHeaderInfo
+ {
+     int stream_type;                        ///< 0xBB for MLP, 0xBA for TrueHD
++    int header_size;                        ///< Size of the major sync header, in bytes
+ 
+     int group1_bits;                        ///< The bit depth of the first substream
+     int group2_bits;                        ///< Bit depth of the second substream (MLP only)
+diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
+index ed6a7fb..fddeb14 100644
+--- a/libavcodec/mlpdec.c
++++ b/libavcodec/mlpdec.c
+@@ -132,6 +132,9 @@ typedef struct MLPDecodeContext {
+     /// Current access unit being read has a major sync.
+     int         is_major_sync_unit;
+ 
++    /// Size of the major sync unit, in bytes
++    int         major_sync_header_size;
++
+     /// Set if a valid major sync block has been read. Otherwise no decoding is possible.
+     uint8_t     params_valid;
+ 
+@@ -349,6 +352,8 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
+         return AVERROR_PATCHWELCOME;
+     }
+ 
++    m->major_sync_header_size = mh.header_size;
++
+     m->access_unit_size      = mh.access_unit_size;
+     m->access_unit_size_pow2 = mh.access_unit_size_pow2;
+ 
+@@ -1142,7 +1147,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
+         if (read_major_sync(m, &gb) < 0)
+             goto error;
+         m->is_major_sync_unit = 1;
+-        header_size += 28;
++        header_size += m->major_sync_header_size;
+     }
+ 
+     if (!m->params_valid) {
+
+From 265630307d5b36e87ac2879ce9852364ce1f6a8b Mon Sep 17 00:00:00 2001
+From: Hendrik Leppkes <[email protected]>
+Date: Sun, 21 Sep 2014 02:29:28 +0200
+Subject: [PATCH 17/17] mlpdec: support TrueHD streams with an Atmos substream
+
+The fourth substream is being discarded, since its not raw audio data,
+but an encoded Atmos stream which needs a specialized decoder.
+
+Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv
+
+Signed-off-by: Michael Niedermayer <[email protected]>
+---
+ libavcodec/mlp.h    | 2 +-
+ libavcodec/mlpdec.c | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h
+index bb9ca26..05d8dba 100644
+--- a/libavcodec/mlp.h
++++ b/libavcodec/mlp.h
+@@ -45,7 +45,7 @@
+ /** Maximum number of substreams that can be decoded.
+  *  MLP's limit is 2. TrueHD supports at least up to 3.
+  */
+-#define MAX_SUBSTREAMS      3
++#define MAX_SUBSTREAMS      4
+ 
+ /** which multiple of 48000 the maximum sample rate is */
+ #define MAX_RATEFACTOR      4
+diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
+index fddeb14..e443f81 100644
+--- a/libavcodec/mlpdec.c
++++ b/libavcodec/mlpdec.c
+@@ -358,7 +358,9 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
+     m->access_unit_size_pow2 = mh.access_unit_size_pow2;
+ 
+     m->num_substreams        = mh.num_substreams;
+-    m->max_decoded_substream = m->num_substreams - 1;
++
++    /* limit to decoding 3 substreams, as the 4th is used by Dolby Atmos for non-audio data */
++    m->max_decoded_substream = FFMIN(m->num_substreams - 1, 2);
+ 
+     m->avctx->sample_rate    = mh.group1_samplerate;
+     m->avctx->frame_size     = mh.access_unit_size;
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v3 1/11 package/ffmpeg: Add Kodi patchset

Bernd, All,

On 2014-10-18 21:44 +0200, Bernd Kuhls spake thusly:

We already talked about this patchset, and why it is needed. I would like the commit log to explain this, for posterity, please.

I think repeating the comment from the patch would be enough.

Regards,
Yann E. MORIN.

Quoted 923 lines
---
 package/ffmpeg/ffmpeg-kodi.patch |  904 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 904 insertions(+)
 create mode 100644 package/ffmpeg/ffmpeg-kodi.patch
package/ffmpeg/ffmpeg-kodi.patch new file +904 -0
new file mode 100644
index 0000000..f13d674
@@ -0,0 +1,904 @@
+In the past xbmc delivered its own ffmpeg source code with specific patches to
+address bugs found during the use of xbmc. For Helix the ffmpeg source code was
+removed, Helix uses a vanilla ffmpeg source tarball and applies this patchset
+on top of it.
+
+Downloaded from
+https://github.com/xbmc/FFmpeg/compare/FFmpeg:release/2.4...release/2.4-xbmc.patch
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+From 622f5f1b5e76283e70772152134c7562b6e17e9d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sun, 11 Sep 2011 19:04:51 +0200
+Subject: [PATCH 01/17] Support raw dvdsub palette as stored on normal dvd's
+
+This is how the palette is stored on dvd's. Currently
+only xbmc passes the palette information to libavcodec
+this way.
+---
+ libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
+index 7355c03..4a945d9 100644
+--- a/libavcodec/dvdsubdec.c
++++ b/libavcodec/dvdsubdec.c
+@@ -61,6 +61,24 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *
+     }
+ }
+ 
++static void ayvu_to_argb(const uint8_t *ayvu, uint32_t *argb, int num_values)
++{
++    uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
++    uint8_t r, g, b;
++    int i, y, cb, cr, a;
++    int r_add, g_add, b_add;
++
++    for (i = num_values; i > 0; i--) {
++        a = *ayvu++;
++        y = *ayvu++;
++        cr = *ayvu++;
++        cb = *ayvu++;
++        YUV_TO_RGB1_CCIR(cb, cr);
++        YUV_TO_RGB2_CCIR(r, g, b, y);
++        *argb++ = (a << 24) | (r << 16) | (g << 8) | b;
++    }
++}
++
+ static int decode_run_2bit(GetBitContext *gb, int *color)
+ {
+     unsigned int v, t;
+@@ -629,6 +647,12 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
+ 
+     if (ctx->palette_str)
+         parse_palette(ctx, ctx->palette_str);
++
++    if (!ctx->has_palette && avctx->extradata_size == 64) {
++        ayvu_to_argb((uint8_t*)avctx->extradata, ctx->palette, 16);
++        ctx->has_palette = 1;
++    }
++
+     if (ctx->has_palette) {
+         int i;
+         av_log(avctx, AV_LOG_DEBUG, "palette:");
+
+From 5bd445513110e57a41458888c80b0532cdcd09aa Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sat, 22 Oct 2011 18:33:45 +0200
+Subject: [PATCH 02/17] Check return value of avio_seek and avoid modifying
+ state if it fails
+
+The code still modifies state if the timestamp is not found. Not
+sure exactly how to avoid that.
+---
+ libavformat/matroskadec.c | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
+index b8ddf67..1a1935f 100644
+--- a/libavformat/matroskadec.c
++++ b/libavformat/matroskadec.c
+@@ -2921,8 +2921,8 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
+     timestamp = FFMAX(timestamp, st->index_entries[0].timestamp);
+ 
+     if ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
+-        avio_seek(s->pb, st->index_entries[st->nb_index_entries - 1].pos,
+-                  SEEK_SET);
++        if (avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET) < 0)
++            return -1;
+         matroska->current_id = 0;
+         while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
+             matroska_clear_queue(matroska);
+@@ -2931,16 +2931,11 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
+         }
+     }
+ 
+-    matroska_clear_queue(matroska);
+     if (index < 0 || (matroska->cues_parsing_deferred < 0 && index == st->nb_index_entries - 1))
+         goto err;
+ 
+     index_min = index;
+     for (i = 0; i < matroska->tracks.nb_elem; i++) {
+-        tracks[i].audio.pkt_cnt        = 0;
+-        tracks[i].audio.sub_packet_cnt = 0;
+-        tracks[i].audio.buf_timecode   = AV_NOPTS_VALUE;
+-        tracks[i].end_timecode         = 0;
+         if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE &&
+             tracks[i].stream->discard != AVDISCARD_ALL) {
+             index_sub = av_index_search_timestamp(
+@@ -2954,8 +2949,18 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
+         }
+     }
+ 
+-    avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET);
+-    matroska->current_id       = 0;
++    if (avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET) < 0)
++        return -1;
++
++    matroska_clear_queue(matroska);
++    for (i=0; i < matroska->tracks.nb_elem; i++) {
++        tracks[i].audio.pkt_cnt = 0;
++        tracks[i].audio.sub_packet_cnt = 0;
++        tracks[i].audio.buf_timecode = AV_NOPTS_VALUE;
++        tracks[i].end_timecode = 0;
++    }
++    matroska->current_id = 0;
++
+     if (flags & AVSEEK_FLAG_ANY) {
+         st->skip_to_keyframe = 0;
+         matroska->skip_to_timecode = timestamp;
+
+From 870b1a68c4fdb6a31b0dc29ece7aa429659fb52d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Mon, 12 Sep 2011 21:37:17 +0200
+Subject: [PATCH 03/17] asf hacks
+
+---
+ libavformat/asfdec.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
+index 7f7bb4d..8911987 100644
+--- a/libavformat/asfdec.c
++++ b/libavformat/asfdec.c
+@@ -1549,9 +1549,20 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
+     AVStream *st    = s->streams[stream_index];
+     int ret = 0;
+ 
++    if (pts == 0) {
++      // this is a hack since av_gen_search searches the entire file in this case
++      av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", s->data_offset);
++      if (avio_seek(s->pb, s->data_offset, SEEK_SET) < 0)
++          return -1;
++      return 0;
++    }
++
+     if (s->packet_size <= 0)
+         return -1;
+ 
++    if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
++        return -1;
++
+     /* Try using the protocol's read_seek if available */
+     if (s->pb) {
+         int ret = avio_seek_time(s->pb, stream_index, pts, flags);
+
+From 6fee17a0a63bf20b7835832e2d01ee7857b821b1 Mon Sep 17 00:00:00 2001
+From: Cory Fields <[email protected]>
+Date: Mon, 28 Jun 2010 01:55:31 -0400
+Subject: [PATCH 04/17] if av_read_packet returns AVERROR_IO, we are done.
+ ffmpeg's codecs might or might not handle returning any completed demuxed
+ packets correctly
+
+---
+ libavformat/utils.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index e899e4d..d75c168 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -1271,6 +1271,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
+         if (ret < 0) {
+             if (ret == AVERROR(EAGAIN))
+                 return ret;
++            if (ret == AVERROR(EIO))
++                return ret;
+             /* flush the parsers */
+             for (i = 0; i < s->nb_streams; i++) {
+                 st = s->streams[i];
+
+From f7ef5230815955d6db8037cbca363c23c1ebce5b Mon Sep 17 00:00:00 2001
+From: Cory Fields <[email protected]>
+Date: Mon, 28 Jun 2010 02:10:50 -0400
+Subject: [PATCH 05/17] added: Ticket #7187, TV Teletext support for DVB EBU
+ Teletext streams
+
+---
+ libavcodec/avcodec.h | 4 ++++
+ libavformat/mpegts.c | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index fb1c9ca..45bfba3 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -523,6 +523,10 @@ enum AVCodecID {
+     AV_CODEC_ID_PJS        = MKBETAG('P','h','J','S'),
+     AV_CODEC_ID_ASS        = MKBETAG('A','S','S',' '),  ///< ASS as defined in Matroska
+ 
++    /* data codecs */
++    AV_CODEC_ID_VBI_DATA= 0x17500,
++    AV_CODEC_ID_VBI_TELETEXT,
++
+     /* other specific kind of codecs (generally used for attachments) */
+     AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID pointing@the start of various fake codecs.
+     AV_CODEC_ID_TTF = 0x18000,
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 8808269..4d73e6d 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -717,6 +717,8 @@ static const StreamType DESC_types[] = {
+     { 0x7b, AVMEDIA_TYPE_AUDIO,    AV_CODEC_ID_DTS          },
+     { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT },
+     { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
++    { 0x45, AVMEDIA_TYPE_DATA,         AV_CODEC_ID_VBI_DATA }, /* VBI Data descriptor */
++    { 0x46, AVMEDIA_TYPE_DATA,     AV_CODEC_ID_VBI_TELETEXT }, /* VBI Teletext descriptor */
+     { 0 },
+ };
+ 
+
+From 1b74fd18695d977496d26085fb305fababfebd1d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sun, 18 Sep 2011 19:16:34 +0200
+Subject: [PATCH 06/17] Don't accept mpegts PMT that isn't current
+
+---
+ libavformat/mpegts.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 4d73e6d..4160c80 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -561,6 +561,7 @@ typedef struct SectionHeader {
+     uint8_t tid;
+     uint16_t id;
+     uint8_t version;
++    uint8_t current;
+     uint8_t sec_num;
+     uint8_t last_sec_num;
+ } SectionHeader;
+@@ -632,6 +633,7 @@ static int parse_section_header(SectionHeader *h,
+     val = get8(pp, p_end);
+     if (val < 0)
+         return val;
++    h->current = val & 0x1;
+     h->version = (val >> 1) & 0x1f;
+     val = get8(pp, p_end);
+     if (val < 0)
+@@ -1904,6 +1906,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
+         return;
+     if (ts->skip_changes)
+         return;
++    if (!h->current)
++        return;
+ 
+     ts->stream->ts_id = h->id;
+ 
+
+From 354837b4c939246753039ce70c60cbd9fb1e01d0 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sun, 18 Sep 2011 19:17:23 +0200
+Subject: [PATCH 07/17] Don't reparse PMT unless it's version has changed
+
+---
+ libavformat/mpegts.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 4160c80..c946449 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -87,6 +87,7 @@ struct MpegTSFilter {
+     int es_id;
+     int last_cc; /* last cc code (-1 if first packet) */
+     int64_t last_pcr;
++    int last_version; /* last version of data on this pid */
+     enum MpegTSFilterType type;
+     union {
+         MpegTSPESFilter pes_filter;
+@@ -439,6 +440,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid,
+     filter->es_id   = -1;
+     filter->last_cc = -1;
+     filter->last_pcr= -1;
++    filter->last_version = -1;
+ 
+     return filter;
+ }
+@@ -1908,6 +1910,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
+         return;
+     if (!h->current)
+         return;
++    if (h->version == filter->last_version)
++        return;
++    filter->last_version = h->version;
++    av_dlog(ts->stream, "version=%d\n", filter->last_version);
+ 
+     ts->stream->ts_id = h->id;
+ 
+
+From c874d974baefc35d6300938997131efd1a4da48b Mon Sep 17 00:00:00 2001
+From: Cory Fields <[email protected]>
+Date: Fri, 9 Jul 2010 16:43:31 -0400
+Subject: [PATCH 08/17] Read PID timestamps as well as PCR timestamps to find
+ location in mpegts stream
+
+---
+ libavformat/mpegts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 46 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index c946449..772df83 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -2388,6 +2388,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) {
+         av_log(s, pb->seekable ? AV_LOG_ERROR : AV_LOG_INFO, "Unable to seek back to the start\n");
+ }
+ 
++static int parse_timestamp(int64_t *ts, const uint8_t *buf)
++{
++    int afc, flags;
++    const uint8_t *p;
++
++    if(!(buf[1] & 0x40)) /* must be a start packet */
++        return -1;
++
++    afc = (buf[3] >> 4) & 3;
++    p = buf + 4;
++    if (afc == 0 || afc == 2) /* invalid or only adaption field */
++        return -1;
++    if (afc == 3)
++        p += p[0] + 1;
++    if (p >= buf + TS_PACKET_SIZE)
++        return -1;
++
++    if (p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01)  /* packet_start_code_prefix */
++        return -1;
++
++    flags = p[3] | 0x100; /* stream type */
++    if (!((flags >= 0x1c0 && flags <= 0x1df) ||
++          (flags >= 0x1e0 && flags <= 0x1ef) ||
++          (flags == 0x1bd) || (flags == 0x1fd)))
++        return -1;
++
++    flags = p[7];
++    if ((flags & 0xc0) == 0x80) {
++        *ts = ff_parse_pes_pts(p+9);
++        return 0;
++    } else if ((flags & 0xc0) == 0xc0) {
++        *ts = ff_parse_pes_pts(p+9+5);
++        return 0;
++    }
++    return -1;
++}
++
++
+ static int mpegts_read_header(AVFormatContext *s)
+ {
+     MpegTSContext *ts = s->priv_data;
+@@ -2587,6 +2625,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
+     uint8_t buf[TS_PACKET_SIZE];
+     int pcr_l, pcr_pid =
+         ((PESContext *)s->streams[stream_index]->priv_data)->pcr_pid;
++    int pid = ((PESContext*)s->streams[stream_index]->priv_data)->pid;
+     int pos47 = ts->pos47_full % ts->raw_packet_size;
+     pos =
+         ((*ppos + ts->raw_packet_size - 1 - pos47) / ts->raw_packet_size) *
+@@ -2608,6 +2647,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
+             *ppos = pos;
+             return timestamp;
+         }
++        if ((pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pid) &&
++            parse_timestamp(&timestamp, buf) == 0) {
++            *ppos = pos;
++            return timestamp;
++        }
+         pos += ts->raw_packet_size;
+     }
+ 
+@@ -2707,7 +2751,7 @@ AVInputFormat ff_mpegts_demuxer = {
+     .read_header    = mpegts_read_header,
+     .read_packet    = mpegts_read_packet,
+     .read_close     = mpegts_read_close,
+-    .read_timestamp = mpegts_get_dts,
++    .read_timestamp = mpegts_get_pcr,
+     .flags          = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
+     .priv_class     = &mpegts_class,
+ };
+@@ -2719,7 +2763,7 @@ AVInputFormat ff_mpegtsraw_demuxer = {
+     .read_header    = mpegts_read_header,
+     .read_packet    = mpegts_raw_read_packet,
+     .read_close     = mpegts_read_close,
+-    .read_timestamp = mpegts_get_dts,
++    .read_timestamp = mpegts_get_pcr,
+     .flags          = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
+     .priv_class     = &mpegtsraw_class,
+ };
+
+From 24ad8f579e523eeec50fbedca28820c3619449c7 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Sat, 22 Oct 2011 19:01:38 +0200
+Subject: [PATCH 09/17] Get stream durations using read_timestamp
+
+---
+ libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index d75c168..9f74313 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -2312,6 +2312,41 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
+ #define DURATION_MAX_READ_SIZE 250000LL
+ #define DURATION_MAX_RETRY 4
+ 
++static void av_estimate_timings_from_pts2(AVFormatContext *ic, int64_t old_offset)
++{
++    AVStream *st;
++    int i, step= 1024;
++    int64_t ts, pos;
++
++    for(i=0;i<ic->nb_streams;i++) {
++        st = ic->streams[i];
++
++        pos = 0;
++        ts = ic->iformat->read_timestamp(ic, i, &pos, DURATION_MAX_READ_SIZE);
++        if (ts == AV_NOPTS_VALUE)
++            continue;
++        if (st->start_time > ts || st->start_time == AV_NOPTS_VALUE)
++            st->start_time = ts;
++
++        pos = avio_size(ic->pb) - 1;
++        do {
++            pos -= step;
++            ts = ic->iformat->read_timestamp(ic, i, &pos, pos + step);
++            step += step;
++        } while (ts == AV_NOPTS_VALUE && pos >= step && step < DURATION_MAX_READ_SIZE);
++
++        if (ts == AV_NOPTS_VALUE)
++            continue;
++
++        if (st->duration < ts - st->start_time || st->duration == AV_NOPTS_VALUE)
++            st->duration = ts - st->start_time;
++    }
++
++    fill_all_stream_timings(ic);
++
++    avio_seek(ic->pb, old_offset, SEEK_SET);
++}
++
+ /* only usable for MPEG-PS streams */
+ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
+ {
+@@ -2462,6 +2497,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
+          * the components */
+         fill_all_stream_timings(ic);
+         ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
++    } else if (ic->iformat->read_timestamp && 
++        file_size && ic->pb->seekable) {
++        /* get accurate estimate from the PTSes */
++        av_estimate_timings_from_pts2(ic, old_offset);
+     } else {
+         /* less precise: use bitrate info */
+         estimate_timings_from_bit_rate(ic);
+
+From 5edeb3be287bae328c18b0dd6a3278843882a276 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Wed, 8 Dec 2010 14:03:43 +0000
+Subject: [PATCH 10/17] changed: allow 4 second skew between streams in mov
+ before attempting to seek
+
+---
+ libavformat/mov.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/mov.c b/libavformat/mov.c
+index ae48c02..047cdc6 100644
+--- a/libavformat/mov.c
++++ b/libavformat/mov.c
+@@ -3694,8 +3694,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
+             if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
+                 (s->pb->seekable &&
+                  ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
+-                 ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
+-                  (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
++                 ((FFABS(best_dts - dts) <= 4*AV_TIME_BASE && current_sample->pos < sample->pos) ||
++                  (FFABS(best_dts - dts) > 4*AV_TIME_BASE && dts < best_dts)))))) {
+                 sample = current_sample;
+                 best_dts = dts;
+                 *st = avst;
+
+From 957d47d1c2484a398bc357e102357fc47515610f Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Fri, 26 Nov 2010 20:56:48 +0000
+Subject: [PATCH 11/17] fixed: memleak in mpegts demuxer on some malformed (??)
+ mpegts files with too large pes packets
+
+at-visions sample file brokenStream.mpg
+---
+ libavformat/mpegts.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 772df83..40dfab1 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -820,6 +820,10 @@ static void reset_pes_packet_state(PESContext *pes)
+ 
+ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
+ {
++    if(pkt->data) {
++      av_log(pes->stream, AV_LOG_ERROR, "ignoring previously allocated packet on stream %d\n", pkt->stream_index);
++      av_free_packet(pkt);
++    }
+     av_init_packet(pkt);
+ 
+     pkt->buf  = pes->buffer;
+@@ -2578,6 +2582,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
+ 
+     pkt->size = -1;
+     ts->pkt = pkt;
++    ts->pkt->data = NULL;
++
+     ret = handle_packets(ts, 0);
+     if (ret < 0) {
+         av_free_packet(ts->pkt);
+
+From 2962ec9624a1c7108b2874335616ef5cc0a4a0d3 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <[email protected]>
+Date: Mon, 28 Jun 2010 21:26:54 +0000
+Subject: [PATCH 12/17] Speed up mpegts av_find_stream_info
+
+---
+ libavformat/mpegts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 40dfab1..031f4e1 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -982,7 +982,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
+                         goto skip;
+ 
+                     /* stream not present in PMT */
+-                    if (!pes->st) {
++                    if (ts->auto_guess && !pes->st) {
+                         if (ts->skip_changes)
+                             goto skip;
+ 
+
+From 2418829bd999ac9ce6c4c1ce1e8bc267327a4b86 Mon Sep 17 00:00:00 2001
+From: marc <mhocking@ubuntu-desktop.(none)>
+Date: Mon, 18 Feb 2013 17:18:18 +0000
+Subject: [PATCH 13/17] dxva-h264 Fix dxva playback of streams that don't start
+ with an I-Frame.
+
+---
+ libavcodec/dxva2_h264.c | 8 ++++++++
+ libavcodec/h264.c       | 1 +
+ libavcodec/h264.h       | 2 ++
+ libavcodec/h264_slice.c | 1 +
+ 4 files changed, 12 insertions(+)
+
+diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
+index 6deccc3..85b25fd 100644
+--- a/libavcodec/dxva2_h264.c
++++ b/libavcodec/dxva2_h264.c
+@@ -451,6 +451,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
+ 
+     if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
+         return -1;
++
++    // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs
++    if (!h->got_first_iframe) {
++        if (!(ctx_pic->pp.wBitFields & (1 << 15)))
++            return -1;
++        h->got_first_iframe = 1;
++    }
++
+     ret = ff_dxva2_common_end_frame(avctx, &h->cur_pic_ptr->f,
+                                     &ctx_pic->pp, sizeof(ctx_pic->pp),
+                                     &ctx_pic->qm, sizeof(ctx_pic->qm),
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index c4f4b05..080845c 100644
+--- a/libavcodec/h264.c
++++ b/libavcodec/h264.c
+@@ -1085,6 +1085,7 @@ void ff_h264_flush_change(H264Context *h)
+     h->list_count = 0;
+     h->current_slice = 0;
+     h->mmco_reset = 1;
++    h->got_first_iframe = 0;
+ }
+ 
+ /* forget old pics after a seek */
+diff --git a/libavcodec/h264.h b/libavcodec/h264.h
+index 5ec4f0c..d26cee3 100644
+--- a/libavcodec/h264.h
++++ b/libavcodec/h264.h
+@@ -740,6 +740,8 @@ typedef struct H264Context {
+     int luma_weight_flag[2];    ///< 7.4.3.2 luma_weight_lX_flag
+     int chroma_weight_flag[2];  ///< 7.4.3.2 chroma_weight_lX_flag
+ 
++    int got_first_iframe;
++
+     // Timestamp stuff
+     int sei_buffering_period_present;   ///< Buffering period SEI flag
+     int initial_cpb_removal_delay[32];  ///< Initial timestamps for CPBs
+diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
+index ffb7de5..338114e 100644
+--- a/libavcodec/h264_slice.c
++++ b/libavcodec/h264_slice.c
+@@ -1178,6 +1178,7 @@ static int h264_slice_header_init(H264Context *h, int reinit)
+         ff_h264_free_tables(h, 0);
+     h->first_field           = 0;
+     h->prev_interlaced_frame = 1;
++    h->got_first_iframe = 0;
+ 
+     init_scan_tables(h);
+     ret = ff_h264_alloc_tables(h);
+
+From a8df0cfd31a31b6962616cabc40d7929746eee4d Mon Sep 17 00:00:00 2001
+From: elupus <[email protected]>
+Date: Tue, 1 Nov 2011 20:18:35 +0100
+Subject: [PATCH 14/17] add public version of ff_read_frame_flush
+
+We need this since we sometimes seek on the
+input stream behind ffmpeg's back. After this
+all data need to be flushed completely.
+---
+ libavformat/avformat.h | 5 +++++
+ libavformat/utils.c    | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/libavformat/avformat.h b/libavformat/avformat.h
+index b915148..64695c6 100644
+--- a/libavformat/avformat.h
++++ b/libavformat/avformat.h
+@@ -2112,6 +2112,11 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
+ int av_read_frame(AVFormatContext *s, AVPacket *pkt);
+ 
+ /**
++ * Clear out any buffered data in context
++ */
++void av_read_frame_flush(AVFormatContext *s);
++
++/**
+  * Seek to the keyframe at timestamp.
+  * 'timestamp' in 'stream_index'.
+  *
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 9f74313..8de7c3d 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -1580,6 +1580,11 @@ void ff_read_frame_flush(AVFormatContext *s)
+     }
+ }
+ 
++void av_read_frame_flush(AVFormatContext *s)
++{
++  ff_read_frame_flush(s);
++}
++
+ void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
+ {
+     int i;
+
+From d01ef454fb11286e666d568c47ead0c1633d659a Mon Sep 17 00:00:00 2001
+From: Memphiz <[email protected]>
+Date: Mon, 12 May 2014 18:27:01 +0200
+Subject: [PATCH 15/17] fix --disable-ffplay should disable any needs to check
+ or add compile/link flags otherwise SDL gets spewed all over pkg-config files
+ and generally causes a mess
+
+---
+ configure | 32 +++++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 15 deletions(-)
+
+diff --git a/configure b/configure
+index 618dfab..30fe640 100755
+--- a/configure
++++ b/configure
+@@ -4911,22 +4911,24 @@ if enabled libdc1394; then
+     die "ERROR: No version of libdc1394 found "
+ fi
+ 
+-SDL_CONFIG="${cross_prefix}sdl-config"
+-if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+-    enable sdl
+-else
+-  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+-    sdl_cflags=$("${SDL_CONFIG}" --cflags)
+-    sdl_libs=$("${SDL_CONFIG}" --libs)
+-    check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+-    enable sdl
+-  fi
++if enabled ffplay; then
++    SDL_CONFIG="${cross_prefix}sdl-config"
++    if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
++        enable sdl
++    else
++      if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
++        sdl_cflags=$("${SDL_CONFIG}" --cflags)
++        sdl_libs=$("${SDL_CONFIG}" --libs)
++        check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
++        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
++        enable sdl
++      fi
++    fi
++    enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
+ fi
+-enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
+ 
+ makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
+ enabled makeinfo && (makeinfo --version | \
+
+From 27fa565a9ec4a4e1b1f28e83e17a9aa7bf795fe7 Mon Sep 17 00:00:00 2001
+From: Hendrik Leppkes <[email protected]>
+Date: Sun, 21 Sep 2014 02:29:27 +0200
+Subject: [PATCH 16/17] mlpdec: support major sync headers with optional
+ extension blocks
+
+Signed-off-by: Michael Niedermayer <[email protected]>
+---
+ libavcodec/mlp_parser.c | 29 ++++++++++++++++++++++++-----
+ libavcodec/mlp_parser.h |  1 +
+ libavcodec/mlpdec.c     |  7 ++++++-
+ 3 files changed, 31 insertions(+), 6 deletions(-)
+
+diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
+index 4bb82ee..deaa844 100644
+--- a/libavcodec/mlp_parser.c
++++ b/libavcodec/mlp_parser.c
+@@ -119,6 +119,23 @@ uint64_t ff_truehd_layout(int chanmap)
+     return layout;
+ }
+ 
++static int ff_mlp_get_major_sync_size(const uint8_t * buf, int bufsize)
++{
++    int has_extension, extensions = 0;
++    int size = 28;
++    if (bufsize < 28)
++        return -1;
++
++    if (AV_RB32(buf) == 0xf8726fba) {
++        has_extension = buf[25] & 1;
++        if (has_extension) {
++            extensions = buf[26] >> 4;
++            size += 2 + extensions * 2;
++        }
++    }
++    return size;
++}
++
+ /** Read a major sync info header - contains high level information about
+  *  the stream - sample rate, channel arrangement etc. Most of this
+  *  information is not actually necessary for decoding, only for playback.
+@@ -127,18 +144,19 @@ uint64_t ff_truehd_layout(int chanmap)
+ 
+ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
+ {
+-    int ratebits, channel_arrangement;
++    int ratebits, channel_arrangement, header_size;
+     uint16_t checksum;
+ 
+     av_assert1(get_bits_count(gb) == 0);
+ 
+-    if (gb->size_in_bits < 28 << 3) {
++    header_size = ff_mlp_get_major_sync_size(gb->buffer, gb->size_in_bits >> 3);
++    if (header_size < 0 || gb->size_in_bits < header_size << 3) {
+         av_log(log, AV_LOG_ERROR, "packet too short, unable to read major sync\n");
+         return -1;
+     }
+ 
+-    checksum = ff_mlp_checksum16(gb->buffer, 26);
+-    if (checksum != AV_RL16(gb->buffer+26)) {
++    checksum = ff_mlp_checksum16(gb->buffer, header_size - 2);
++    if (checksum != AV_RL16(gb->buffer+header_size-2)) {
+         av_log(log, AV_LOG_ERROR, "major sync info header checksum error\n");
+         return AVERROR_INVALIDDATA;
+     }
+@@ -147,6 +165,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
+         return AVERROR_INVALIDDATA;
+ 
+     mh->stream_type = get_bits(gb, 8);
++    mh->header_size = header_size;
+ 
+     if (mh->stream_type == 0xbb) {
+         mh->group1_bits = mlp_quants[get_bits(gb, 4)];
+@@ -199,7 +218,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
+ 
+     mh->num_substreams = get_bits(gb, 4);
+ 
+-    skip_bits_long(gb, 4 + 11 * 8);
++    skip_bits_long(gb, 4 + (header_size - 17) * 8);
+ 
+     return 0;
+ }
+diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
+index 5d1d2e7..0c0109e 100644
+--- a/libavcodec/mlp_parser.h
++++ b/libavcodec/mlp_parser.h
+@@ -32,6 +32,7 @@
+ typedef struct MLPHeaderInfo
+ {
+     int stream_type;                        ///< 0xBB for MLP, 0xBA for TrueHD
++    int header_size;                        ///< Size of the major sync header, in bytes
+ 
+     int group1_bits;                        ///< The bit depth of the first substream
+     int group2_bits;                        ///< Bit depth of the second substream (MLP only)
+diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
+index ed6a7fb..fddeb14 100644
+--- a/libavcodec/mlpdec.c
++++ b/libavcodec/mlpdec.c
+@@ -132,6 +132,9 @@ typedef struct MLPDecodeContext {
+     /// Current access unit being read has a major sync.
+     int         is_major_sync_unit;
+ 
++    /// Size of the major sync unit, in bytes
++    int         major_sync_header_size;
++
+     /// Set if a valid major sync block has been read. Otherwise no decoding is possible.
+     uint8_t     params_valid;
+ 
+@@ -349,6 +352,8 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
+         return AVERROR_PATCHWELCOME;
+     }
+ 
++    m->major_sync_header_size = mh.header_size;
++
+     m->access_unit_size      = mh.access_unit_size;
+     m->access_unit_size_pow2 = mh.access_unit_size_pow2;
+ 
+@@ -1142,7 +1147,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
+         if (read_major_sync(m, &gb) < 0)
+             goto error;
+         m->is_major_sync_unit = 1;
+-        header_size += 28;
++        header_size += m->major_sync_header_size;
+     }
+ 
+     if (!m->params_valid) {
+
+From 265630307d5b36e87ac2879ce9852364ce1f6a8b Mon Sep 17 00:00:00 2001
+From: Hendrik Leppkes <[email protected]>
+Date: Sun, 21 Sep 2014 02:29:28 +0200
+Subject: [PATCH 17/17] mlpdec: support TrueHD streams with an Atmos substream
+
+The fourth substream is being discarded, since its not raw audio data,
+but an encoded Atmos stream which needs a specialized decoder.
+
+Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv
+
+Signed-off-by: Michael Niedermayer <[email protected]>
+---
+ libavcodec/mlp.h    | 2 +-
+ libavcodec/mlpdec.c | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h
+index bb9ca26..05d8dba 100644
+--- a/libavcodec/mlp.h
++++ b/libavcodec/mlp.h
+@@ -45,7 +45,7 @@
+ /** Maximum number of substreams that can be decoded.
+  *  MLP's limit is 2. TrueHD supports at least up to 3.
+  */
+-#define MAX_SUBSTREAMS      3
++#define MAX_SUBSTREAMS      4
+ 
+ /** which multiple of 48000 the maximum sample rate is */
+ #define MAX_RATEFACTOR      4
+diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
+index fddeb14..e443f81 100644
+--- a/libavcodec/mlpdec.c
++++ b/libavcodec/mlpdec.c
+@@ -358,7 +358,9 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
+     m->access_unit_size_pow2 = mh.access_unit_size_pow2;
+ 
+     m->num_substreams        = mh.num_substreams;
+-    m->max_decoded_substream = m->num_substreams - 1;
++
++    /* limit to decoding 3 substreams, as the 4th is used by Dolby Atmos for non-audio data */
++    m->max_decoded_substream = FFMIN(m->num_substreams - 1, 2);
+ 
+     m->avctx->sample_rate    = mh.group1_samplerate;
+     m->avctx->frame_size     = mh.access_unit_size;
Signature · 6 lines
1.7.10.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v3 1/11 package/ffmpeg: Add Kodi patchset

"Yann E. MORIN" <[email protected]> wrote in news:20141018224016.GB14899 at free.fr:

Quoted 1 line

I think repeating the comment from the patch would be enough.

Hi,

v3 will contain this as commit log.

Regards, Bernd

#4 lore raw

PATCH v3 2/11 Rename XBMC to Kodi - part I - move files

In reply to Bernd Kuhls

Background information: http://xbmc.org/introducing-kodi-14

In a first step to bump version to 14.0-Helix move the package to its new directory. Because git will not recognize the moved files due to many upcoming changes to variable names the move is done in this seperate commit.

The "Rename XBMC to Kodi" is split in two parts for easier review, please apply both patches in one commit.

---
 package/Config.in                                                    |    2 +-
 package/{xbmc => kodi}/Config.in                                     |    0
 package/{xbmc/S50xbmc => kodi/S50kodi}                               |    0
 package/{xbmc/br-xbmc => kodi/br-kodi}                               |    0
 .../kodi-0001-Fixup-include-path.patch}                              |    0
 .../{xbmc/xbmc-0002-mathutil.patch => kodi/kodi-0002-mathutil.patch} |    0
 package/{xbmc/xbmc-0003-dbus.patch => kodi/kodi-0003-dbus.patch}     |    0
 package/{xbmc/xbmc.mk => kodi/kodi.mk}                               |    0
 package/{xbmc/xbmc.service => kodi/kodi.service}                     |    0
 9 files changed, 1 insertion(+), 1 deletion(-)
 rename package/{xbmc => kodi}/Config.in (100%)
 rename package/{xbmc/S50xbmc => kodi/S50kodi} (100%)
 rename package/{xbmc/br-xbmc => kodi/br-kodi} (100%)
 rename package/{xbmc/xbmc-0001-Fixup-include-path.patch => kodi/kodi-0001-Fixup-include-path.patch} (100%)
 rename package/{xbmc/xbmc-0002-mathutil.patch => kodi/kodi-0002-mathutil.patch} (100%)
 rename package/{xbmc/xbmc-0003-dbus.patch => kodi/kodi-0003-dbus.patch} (100%)
 rename package/{xbmc/xbmc.mk => kodi/kodi.mk} (100%)
 rename package/{xbmc/xbmc.service => kodi/kodi.service} (100%)
package/Config.in +1 -1
index 4c6685a..f802897 100644
@@ -14,6 +14,7 @@ menu "Audio and video applications"
 	source "package/gstreamer/Config.in"
 	source "package/gstreamer1/Config.in"
 	source "package/jack2/Config.in"
+	source "package/kodi/Config.in"
 	source "package/lame/Config.in"
 	source "package/libvpx/Config.in"
 	source "package/madplay/Config.in"
@@ -33,7 +34,6 @@ menu "Audio and video applications"
 	source "package/vlc/Config.in"
 	source "package/vorbis-tools/Config.in"
 	source "package/wavpack/Config.in"
-	source "package/xbmc/Config.in"
 	source "package/yavta/Config.in"
 	source "package/ympd/Config.in"
 endmenu
package/kodi/Config.in renamed from package/xbmc/Config.in +0 -0
similarity index 100%
rename from package/xbmc/Config.in
rename to package/kodi/Config.in
package/kodi/S50kodi renamed from package/xbmc/S50xbmc +0 -0
similarity index 100%
rename from package/xbmc/S50xbmc
rename to package/kodi/S50kodi
package/kodi/br-kodi renamed from package/xbmc/br-xbmc +0 -0
similarity index 100%
rename from package/xbmc/br-xbmc
rename to package/kodi/br-kodi
package/kodi/kodi-0001-Fixup-include-path.patch renamed from package/xbmc/xbmc-0001-Fixup-include-path.patch +0 -0
similarity index 100%
rename from package/xbmc/xbmc-0001-Fixup-include-path.patch
rename to package/kodi/kodi-0001-Fixup-include-path.patch
package/kodi/kodi-0002-mathutil.patch renamed from package/xbmc/xbmc-0002-mathutil.patch +0 -0
similarity index 100%
rename from package/xbmc/xbmc-0002-mathutil.patch
rename to package/kodi/kodi-0002-mathutil.patch
package/kodi/kodi-0003-dbus.patch renamed from package/xbmc/xbmc-0003-dbus.patch +0 -0
similarity index 100%
rename from package/xbmc/xbmc-0003-dbus.patch
rename to package/kodi/kodi-0003-dbus.patch
package/kodi/kodi.mk renamed from package/xbmc/xbmc.mk +0 -0
similarity index 100%
rename from package/xbmc/xbmc.mk
rename to package/kodi/kodi.mk
package/kodi/kodi.service renamed from package/xbmc/xbmc.service +0 -0
similarity index 100%
rename from package/xbmc/xbmc.service
rename to package/kodi/kodi.service
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v3 3/11 Rename XBMC to Kodi - part II - rename variables

In reply to Bernd Kuhls

- add xbmc-related options to Config.in.legacy

The "Rename XBMC to Kodi" is split in two parts for easier review, please apply both patches in one commit.

---
 Config.in.legacy                           |  119 +++++++++++++++
 package/kodi/Config.in                     |  100 ++++++------
 package/kodi/S50kodi                       |   16 +-
 package/kodi/br-kodi                       |   16 +-
 package/kodi/kodi.mk                       |  226 ++++++++++++++--------------
 package/kodi/kodi.service                  |    2 +-
 package/xbmc-addon-xvdr/xbmc-addon-xvdr.mk |    2 +-
 package/xbmc-pvr-addons/xbmc-pvr-addons.mk |    2 +-
 8 files changed, 301 insertions(+), 182 deletions(-)
Config.in.legacy +119 -0
index 6e202fe..ba68fa7 100644
@@ -101,6 +101,125 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2014.11"
 
+config BR2_PACKAGE_XBMC
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_ALSA_LIB
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_ALSA_LIB
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_AVAHI
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_AVAHI
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_DBUS
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_DBUS
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBBLURAY
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBBLURAY
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_GOOM
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_GOOM
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_RSXS
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_RSXS
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBCEC
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBCEC
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBMICROHTTPD
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBMICROHTTPD
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBNFS
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBNFS
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_RTMPDUMP
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_RTMPDUMP
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBSHAIRPLAY
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBSHAIRPLAY
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBSMBCLIENT
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBSMBCLIENT
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBTHEORA
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBTHEORA
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBUSB
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBUSB
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_LIBVA
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_LIBVA
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
+config BR2_PACKAGE_XBMC_WAVPACK
+	bool "xbmc options have been renamed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_KODI_WAVPACK
+	help
+	  The XBMC media center project was renamed to Kodi entertainment center
+
 config BR2_PACKAGE_LINUX_FIRMWARE_XC5000
 	bool "Xceive xc5000 option has been renamed"
 	select BR2_PACKAGE_LINUX_FIRMWARE_XCx000
package/kodi/Config.in +50 -50

250 lines not on this page · raw message

package/kodi/S50kodi +8 -8
index 312452b..f9abbb5 100755
@@ -1,20 +1,20 @@
 #!/bin/sh
 #
-# Starts XBMC.
+# Starts Kodi
 #
 
-BIN=/usr/bin/br-xbmc
-XBMC=/usr/lib/xbmc/xbmc.bin
-XBMC_ARGS="--standalone -fs -n"
-PIDFILE=/var/run/xbmc.pid
+BIN=/usr/bin/br-kodi
+KODI=/usr/lib/xbmc/xbmc.bin
+KODI_ARGS="--standalone -fs -n"
+PIDFILE=/var/run/kodi.pid
 
 start() {
-	echo -n "Starting XBMC: "
-	start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $XBMC $XBMC_ARGS
+	echo -n "Starting Kodi: "
+	start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $KODI $KODI_ARGS
 	[ $? == 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-	echo -n "Stopping XBMC: "
+	echo -n "Stopping Kodi: "
 	start-stop-daemon -K -q -p $PIDFILE
 	[ $? == 0 ] && echo "OK" || echo "FAIL"
 }
package/kodi/br-kodi +8 -8
index fee5d51..83d4d4e 100755
@@ -1,15 +1,15 @@
 #!/bin/sh
 
-# We're called with the real XBMC executable as
-# first argument, followed by any XBMC extra args
-XBMC="${1}"
+# We're called with the real Kodi executable as
+# first argument, followed by any Kodi extra args
+KODI="${1}"
 shift
 
 # In case someone asked we terminate, just kill
-# the XBMC process
+# the Kodi process
 trap_kill() {
     LOOP=0
-    killall "${XBMC##*/}"
+    killall "${KODI##*/}"
 }
 trap trap_kill INT QUIT TERM
 
@@ -17,11 +17,11 @@ LOOP=1
 while [ ${LOOP} -eq 1 ]; do
     # Hack: BusyBox ash does not catch signals while a non-builtin
     # is running, and only catches the signal when the non-builtin
-    # command ends. So, we just background the XBMC binary, and wait
+    # command ends. So, we just background the Kodi binary, and wait
     # for it. But BusyBox' ash's wait builtin does not return the
     # exit code even if there was only one job (which is correct
-    # for POSIX). So we explicitly wait for the XBMC job
-    "${XBMC}" "${@}" &
+    # for POSIX). So we explicitly wait for the Kodi job
+    "${KODI}" "${@}" &
     wait %1
     ret=$?
     case "${ret}" in
package/kodi/kodi.mk +113 -113

354 lines not on this page · raw message

package/kodi/kodi.service +1 -1
index 3fe5895..acd3b8e 100644
@@ -1,5 +1,5 @@
 [Unit]
-Description = XBMC media center
+Description = Kodi Entertainment Center
 After = network.target
 
 [Service]
package/xbmc-addon-xvdr/xbmc-addon-xvdr.mk +1 -1
index a4d9624..16f3a0d 100644
@@ -21,6 +21,6 @@ XBMC_ADDON_XVDR_AUTORECONF = YES
 # This really is a runtime dependency, but we need XBMC to be installed
 # first, since we'll install files in XBMC's directories _after_ XBMC has
 # installed his own files
-XBMC_ADDON_XVDR_DEPENDENCIES = xbmc
+XBMC_ADDON_XVDR_DEPENDENCIES = kodi
 
 $(eval $(autotools-package))
package/xbmc-pvr-addons/xbmc-pvr-addons.mk +1 -1
index bfcb7ed..4410153 100644
@@ -18,7 +18,7 @@ XBMC_PVR_ADDONS_DEPENDENCIES = boost zlib
 # This really is a runtime dependency, but we need XBMC to be installed
 # first, since we'll install files in XBMC's directories _after_ XBMC has
 # installed its own files
-XBMC_PVR_ADDONS_DEPENDENCIES += xbmc
+XBMC_PVR_ADDONS_DEPENDENCIES += kodi
 
 XBMC_PVR_ADDONS_CONF_OPTS = \
 	--enable-release \
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v3 4/11 package/kodi: Bump version to 14.0a4-Helix

In reply to Bernd Kuhls

- delete kodi-0002-mathutil.patch, committed upstream
- delete kodi-0003-dbus.patch, committed upstream
- add dependency to ffmpeg, xbmc does not deliver its own ffmpeg anymore
- remove dependency to flac & lame, audio encoders have been seperated from kodi

---
 package/kodi/Config.in                   |    4 +-
 package/kodi/kodi-0002-mathutil.patch    |  213 ------------------------------
 package/kodi/kodi-0002-remove-flac.patch |   43 ++++++
 package/kodi/kodi-0003-dbus.patch        |   46 -------
 package/kodi/kodi.mk                     |   26 +---
 5 files changed, 51 insertions(+), 281 deletions(-)
 delete mode 100644 package/kodi/kodi-0002-mathutil.patch
 create mode 100644 package/kodi/kodi-0002-remove-flac.patch
 delete mode 100644 package/kodi/kodi-0003-dbus.patch
package/kodi/Config.in +3 -1
index 3f14a75..2dcd8b3 100644
@@ -35,7 +35,9 @@ menuconfig BR2_PACKAGE_KODI
 	select BR2_PACKAGE_BOOST_THREAD
 	select BR2_PACKAGE_BZIP2
 	select BR2_PACKAGE_EXPAT
-	select BR2_PACKAGE_FLAC
+	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_FFMPEG_GPL
+	select BR2_PACKAGE_FFMPEG_POSTPROC # postproc depends on GPL
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_JASPER
package/kodi/kodi-0002-mathutil.patch deleted +0 -213

213 lines not on this page · raw message

package/kodi/kodi-0002-remove-flac.patch new file +43 -0

43 lines not on this page · raw message

package/kodi/kodi-0003-dbus.patch deleted +0 -46

46 lines not on this page · raw message

package/kodi/kodi.mk +5 -21
index 5e74da0..fc24c4d 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-KODI_VERSION = 13.2-Gotham
+KODI_VERSION = 14.0a4-Helix
 KODI_SOURCE = $(KODI_VERSION).tar.gz
 KODI_SITE = https://github.com/xbmc/xbmc/archive
 KODI_LICENSE = GPLv2
@@ -13,22 +13,13 @@ KODI_LICENSE_FILES = LICENSE.GPL
 # called TexturePacker. It is responsible to take all the images used in the
 # GUI and pack them in a blob.
 # http://wiki.xbmc.org/index.php?title=TexturePacker
-KODI_DEPENDENCIES = host-gawk host-gettext host-gperf host-infozip host-lzo host-sdl_image host-swig
-KODI_DEPENDENCIES += boost bzip2 expat flac fontconfig freetype jasper jpeg \
+KODI_DEPENDENCIES = host-gawk host-gettext host-gperf host-infozip host-lzo \
+	host-nasm host-sdl_image host-swig
+KODI_DEPENDENCIES += boost bzip2 expat ffmpeg fontconfig freetype jasper jpeg \
 	libass libcdio libcurl libfribidi libgcrypt libmad libmodplug libmpeg2 \
 	libogg libplist libpng libsamplerate libungif libvorbis libxml2 libxslt lzo ncurses \
 	openssl pcre python readline sqlite taglib tiff tinyxml yajl zlib
 
-# kodi at i386 depends on nasm
-KODI_DEPENDENCIES += $(if $(BR2_i386),host-nasm)
-
-# ffmpeg depends on yasm on MMX archs
-# kodi configure passes $(BR2_ARCH) to ffmpeg configure which adds
-# yasm as dependency for x86_64, even if BR2_x86_generic=y
-ifneq ($(BR2_X86_CPU_HAS_MMX)$(BR2_x86_64),)
-KODI_DEPENDENCIES += host-yasm
-endif
-
 KODI_CONF_ENV = \
 	PYTHON_VERSION="$(PYTHON_VERSION_MAJOR)" \
 	PYTHON_LDFLAGS="-lpython$(PYTHON_VERSION_MAJOR) -lpthread -ldl -lutil -lm" \
@@ -40,7 +31,7 @@ KODI_CONF_ENV = \
 	TEXTUREPACKER_NATIVE_ROOT="$(HOST_DIR)/usr"
 
 KODI_CONF_OPTS +=  \
-	--with-arch=$(BR2_ARCH) \
+	--with-ffmpeg=shared \
 	--disable-crystalhd \
 	--disable-debug \
 	--disable-dvdcss \
@@ -78,13 +69,6 @@ else
 KODI_CONF_OPTS += --disable-alsa
 endif
 
-ifeq ($(BR2_PACKAGE_LAME),y)
-KODI_DEPENDENCIES += lame
-KODI_CONF_OPTS += --enable-libmp3lame
-else
-KODI_CONF_OPTS += --disable-libmp3lame
-endif
-
 # quote from kodi/configure.in: "GLES overwrites GL if both set to yes."
 # we choose the opposite because opengl offers more features, like libva support
 ifeq ($(BR2_PACKAGE_KODI_GL),y)
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH v3 5/11 xbmc-pvr-addons: Bump version for Helix-compatibility

In reply to Bernd Kuhls
---
 package/xbmc-pvr-addons/xbmc-pvr-addons.mk |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/xbmc-pvr-addons/xbmc-pvr-addons.mk +3 -3
index 4410153..748cc75 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-# This cset is on the branch 'gotham'
-# When XBMC is updated, then this should be updated to the corresponding branch
-XBMC_PVR_ADDONS_VERSION = be12a8da2072e9c3ddad54892df2f85b759d4e9a
+# This cset is on the branch 'master'
+# When Kodi is released, then this should be updated to the corresponding branch
+XBMC_PVR_ADDONS_VERSION = 79ca634891d09b5bb6cf4256389dc681a1041903
 XBMC_PVR_ADDONS_SITE = $(call github,opdenkamp,xbmc-pvr-addons,$(XBMC_PVR_ADDONS_VERSION))
 XBMC_PVR_ADDONS_LICENSE = GPLv3+
 XBMC_PVR_ADDONS_LICENSE_FILES = COPYING
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH v3 6/11 package/xbmc-addon-xvdr: Bump version for Helix-compatibility

In reply to Bernd Kuhls
---
 package/xbmc-addon-xvdr/xbmc-addon-xvdr.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/xbmc-addon-xvdr/xbmc-addon-xvdr.mk +2 -2
index 16f3a0d..7e6ca4b 100644
@@ -4,10 +4,10 @@
 #
 ################################################################################
 
-# This cset is on master. When a Gotham branch is made, we should
+# This cset is on master. When a Helix branch is made, we should
 # follow it, as incompatible changes in the plugins API can happen
 # on the master branch.
-XBMC_ADDON_XVDR_VERSION = 82b5093ad33847f97a978cb620c9a87d2dbcf7eb
+XBMC_ADDON_XVDR_VERSION = 2bf2563c801684e0ee2d08ba4ea57acbdbea5750
 XBMC_ADDON_XVDR_SITE = $(call github,pipelka,xbmc-addon-xvdr,$(XBMC_ADDON_XVDR_VERSION))
 XBMC_ADDON_XVDR_LICENSE = GPLv2+
 XBMC_ADDON_XVDR_LICENSE_FILES = COPYING
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH v3 7/11 package/kodi: Enable install to STAGING_DIR, needed for audioencoder addons

In reply to Bernd Kuhls
---
 package/kodi/kodi.mk |    2 ++
 1 file changed, 2 insertions(+)
package/kodi/kodi.mk +2 -0
index fc24c4d..57baeed 100644
@@ -9,6 +9,8 @@ KODI_SOURCE = $(KODI_VERSION).tar.gz
 KODI_SITE = https://github.com/xbmc/xbmc/archive
 KODI_LICENSE = GPLv2
 KODI_LICENSE_FILES = LICENSE.GPL
+# needed for audioencoder addons
+KODI_INSTALL_STAGING = YES
 # Kodi needs host-sdl_image (and therefore host-sdl) for a host tools it builds
 # called TexturePacker. It is responsible to take all the images used in the
 # GUI and pack them in a blob.
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH v3 7/11 package/kodi: Enable install to STAGING_DIR, needed for audioencoder addons

Bernd, All,

On 2014-10-18 21:44 +0200, Bernd Kuhls spake thusly:

Quoted 11 lines
---
 package/kodi/kodi.mk |    2 ++
 1 file changed, 2 insertions(+)
package/kodi/kodi.mk +0 -0
index fc24c4d..57baeed 100644

package/kodi/kodi.mk KODI_SOURCE = $(KODI_VERSION).tar.gz · line 13

Quoted 5 lines
package/kodi/kodi.mk +2 -0
@@ -9,6 +9,8 @@ KODI_SOURCE = $(KODI_VERSION).tar.gz
 KODI_SITE = https://github.com/xbmc/xbmc/archive
 KODI_LICENSE = GPLv2
 KODI_LICENSE_FILES = LICENSE.GPL
+# needed for audioencoder addons
+KODI_INSTALL_STAGING = YES

I'm not sure I understand why you need Kodi in staging.

In this patch, you state that audioencoder addons need it at build time, but in each such audioencoder addons, you state the dependency is only a runtime dependency.

Care to expand a bit on this, please?

Regards,
Yann E. MORIN.

Quoted 10 lines
package/kodi/kodi.mk +0 -0
 # Kodi needs host-sdl_image (and therefore host-sdl) for a host tools it builds
 # called TexturePacker. It is responsible to take all the images used in the
 # GUI and pack them in a blob.
Signature · 6 lines
1.7.10.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH v3 7/11 package/kodi: Enable install to STAGING_DIR, needed for audioencoder addons

"Yann E. MORIN" <[email protected]> wrote in news:20141018223754.GA14899 at free.fr:

Quoted 4 lines

package/kodi/kodi.mk KODI_SOURCE = $(KODI_VERSION).tar.gz · line 13

Quoted 2 lines
package/kodi/kodi.mk +2 -0
+# needed for audioencoder addons
+KODI_INSTALL_STAGING = YES

I'm not sure I understand why you need Kodi in staging.

Hi,

the build system (cmake) of all audioencoder addons checks for an installed xbmc/kodi, for example:

https://github.com/xbmc/audioencoder.flac/blob/master/CMakeLists.txt#L9

I will update the comments.

Regards, Bernd

#12 lore raw

PATCH v3 8/11 kodi-audioencoder-flac: New package

In reply to Bernd Kuhls
---
 package/kodi-audioencoder-flac/Config.in           |    8 +++++++
 .../kodi-audioencoder-flac.mk                      |   23 ++++++++++++++++++++
 package/kodi/Config.in                             |    6 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 package/kodi-audioencoder-flac/Config.in
 create mode 100644 package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk
package/kodi-audioencoder-flac/Config.in new file +8 -0
new file mode 100644
index 0000000..a6cf2d8
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_KODI_AUDIOENCODER_FLAC
+	bool "kodi-audioencoder-flac"
+	select BR2_PACKAGE_FLAC
+	select BR2_PACKAGE_LIBOGG
+	help
+	  An audioencoder addon for XBMC
+
+	  https://github.com/xbmc/audioencoder.flac
package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk new file +23 -0
new file mode 100644
index 0000000..92cbe3b
@@ -0,0 +1,23 @@
+################################################################################
+#
+# kodi-audioencoder-flac
+#
+################################################################################
+
+KODI_AUDIOENCODER_FLAC_VERSION = 84bdf32418df4611aac8b2f48ca205153ded239f
+KODI_AUDIOENCODER_FLAC_SITE = $(call github,xbmc,audioencoder.flac,$(KODI_AUDIOENCODER_FLAC_VERSION))
+KODI_AUDIOENCODER_FLAC_LICENSE = GPLv2+
+KODI_AUDIOENCODER_FLAC_LICENSE_FILES = src/EncoderFlac.cpp
+
+KODI_AUDIOENCODER_FLAC_DEPENDENCIES = flac libogg
+# This really is a runtime dependency, but we need Kodi to be installed
+# first, since we'll install files in Kodi's directories _after_ Kodi has
+# installed its own files
+KODI_AUDIOENCODER_FLAC_DEPENDENCIES += kodi
+
+KODI_AUDIOENCODER_FLAC_CONF_OPTS += \
+	-DCMAKE_MODULE_PATH=$(TARGET_DIR)/usr/lib/xbmc \
+	-DFLAC_INCLUDE_DIRS=$(STAGING_DIR)/usr/include \
+	-DOGG_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
+
+$(eval $(cmake-package))
package/kodi/Config.in +5 -1
index 2dcd8b3..a2dc0d4 100644
@@ -235,7 +235,11 @@ config BR2_PACKAGE_KODI_WAVPACK
 	  Enable WAV input support.
 	  Select this if you want to play back WV files.
 
-comment "Kodi addons"
+comment "Kodi audioencoder addons"
+
+source "package/kodi-audioencoder-flac/Config.in"
+
+comment "Kodi PVR addons"
 
 source "package/xbmc-addon-xvdr/Config.in"
 source "package/xbmc-pvr-addons/Config.in"
Signature · 1 line
1.7.10.4
#13 lore raw

PATCH v3 9/11 package/kodi-audioencoder-lame: New package

In reply to Bernd Kuhls
---
 package/kodi-audioencoder-lame/Config.in           |    7 +++++++
 .../kodi-audioencoder-lame.mk                      |   22 ++++++++++++++++++++
 package/kodi/Config.in                             |    1 +
 3 files changed, 30 insertions(+)
 create mode 100644 package/kodi-audioencoder-lame/Config.in
 create mode 100644 package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk
package/kodi-audioencoder-lame/Config.in new file +7 -0
new file mode 100644
index 0000000..be00296
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_KODI_AUDIOENCODER_LAME
+	bool "kodi-audioencoder-lame"
+	select BR2_PACKAGE_LAME
+	help
+	  An audioencoder addon for Kodi
+
+	  https://github.com/xbmc/audioencoder.lame
package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk new file +22 -0
new file mode 100644
index 0000000..0ffa718
@@ -0,0 +1,22 @@
+################################################################################
+#
+# kodi-audioencoder-lame
+#
+################################################################################
+
+KODI_AUDIOENCODER_LAME_VERSION = 90fb99b8f3c876b5f3d8ecd4ea29aa1ef2dabc89
+KODI_AUDIOENCODER_LAME_SITE = $(call github,xbmc,audioencoder.lame,$(KODI_AUDIOENCODER_LAME_VERSION))
+KODI_AUDIOENCODER_LAME_LICENSE = GPLv2+
+KODI_AUDIOENCODER_LAME_LICENSE_FILES = src/EncoderLame.cpp
+
+KODI_AUDIOENCODER_LAME_DEPENDENCIES = lame
+# This really is a runtime dependency, but we need Kodi to be installed
+# first, since we'll install files in Kodi's directories _after_ Kodi has
+# installed its own files
+KODI_AUDIOENCODER_LAME_DEPENDENCIES += kodi
+
+KODI_AUDIOENCODER_LAME_CONF_OPTS += \
+	-DCMAKE_MODULE_PATH=$(TARGET_DIR)/usr/lib/xbmc \
+	-DLAME_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
+
+$(eval $(cmake-package))
package/kodi/Config.in +1 -0
index a2dc0d4..54869e5 100644
@@ -238,6 +238,7 @@ config BR2_PACKAGE_KODI_WAVPACK
 comment "Kodi audioencoder addons"
 
 source "package/kodi-audioencoder-flac/Config.in"
+source "package/kodi-audioencoder-lame/Config.in"
 
 comment "Kodi PVR addons"
 
Signature · 1 line
1.7.10.4
#14 lore raw

PATCH v3 10/11 package/kodi-audioencoder-vorbis: New package

In reply to Bernd Kuhls
---
 package/kodi-audioencoder-vorbis/Config.in         |    8 +++++++
 .../kodi-audioencoder-vorbis.mk                    |   24 ++++++++++++++++++++
 package/kodi/Config.in                             |    1 +
 3 files changed, 33 insertions(+)
 create mode 100644 package/kodi-audioencoder-vorbis/Config.in
 create mode 100644 package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk
package/kodi-audioencoder-vorbis/Config.in new file +8 -0
new file mode 100644
index 0000000..c3630a7
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_KODI_AUDIOENCODER_VORBIS
+	bool "kodi-audioencoder-vorbis"
+	select BR2_PACKAGE_LIBOGG
+	select BR2_PACKAGE_LIBVORBIS
+	help
+	  An audioencoder addon for XBMC
+
+	  https://github.com/xbmc/audioencoder.vorbis
package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk new file +24 -0
new file mode 100644
index 0000000..c65143f
@@ -0,0 +1,24 @@
+################################################################################
+#
+# kodi-audioencoder-vorbis
+#
+################################################################################
+
+KODI_AUDIOENCODER_VORBIS_VERSION = a73ef7e2b889d3d60d13175bc4ca44c36546d695
+KODI_AUDIOENCODER_VORBIS_SITE = $(call github,xbmc,audioencoder.vorbis,$(KODI_AUDIOENCODER_VORBIS_VERSION))
+KODI_AUDIOENCODER_VORBIS_LICENSE = GPLv2+
+KODI_AUDIOENCODER_VORBIS_LICENSE_FILES = src/EncoderVorbis.cpp
+
+KODI_AUDIOENCODER_VORBIS_DEPENDENCIES = libogg libvorbis
+# This really is a runtime dependency, but we need Kodi to be installed
+# first, since we'll install files in Kodi's directories _after_ Kodi has
+# installed its own files
+KODI_AUDIOENCODER_VORBIS_DEPENDENCIES += kodi
+
+KODI_AUDIOENCODER_VORBIS_CONF_OPTS += \
+	-DCMAKE_MODULE_PATH=$(TARGET_DIR)/usr/lib/xbmc \
+	-DOGG_INCLUDE_DIRS=$(STAGING_DIR)/usr/include \
+	-DVORBIS_INCLUDE_DIRS=$(STAGING_DIR)/usr/include \
+	-DVORBISENC_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
+
+$(eval $(cmake-package))
package/kodi/Config.in +1 -0
index 54869e5..bfab51d 100644
@@ -239,6 +239,7 @@ comment "Kodi audioencoder addons"
 
 source "package/kodi-audioencoder-flac/Config.in"
 source "package/kodi-audioencoder-lame/Config.in"
+source "package/kodi-audioencoder-vorbis/Config.in"
 
 comment "Kodi PVR addons"
 
Signature · 1 line
1.7.10.4
#15 lore raw

PATCH v3 11/11 package/kodi-audioencoder-wav: New package

In reply to Bernd Kuhls
---
 package/kodi-audioencoder-wav/Config.in            |    6 ++++++
 .../kodi-audioencoder-flac.mk                      |   20 ++++++++++++++++++++
 package/kodi/Config.in                             |    1 +
 3 files changed, 27 insertions(+)
 create mode 100644 package/kodi-audioencoder-wav/Config.in
 create mode 100644 package/kodi-audioencoder-wav/kodi-audioencoder-flac.mk
package/kodi-audioencoder-wav/Config.in new file +6 -0
new file mode 100644
index 0000000..64e1f27
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_KODI_AUDIOENCODER_WAV
+	bool "kodi-audioencoder-wav"
+	help
+	  An audioencoder addon for XBMC
+
+	  https://github.com/xbmc/audioencoder.wav
package/kodi-audioencoder-wav/kodi-audioencoder-flac.mk new file +20 -0
new file mode 100644
index 0000000..2b27532
@@ -0,0 +1,20 @@
+################################################################################
+#
+# kodi-audioencoder-wav
+#
+################################################################################
+
+KODI_AUDIOENCODER_WAV_VERSION = b28ab95a89f6b2d7332692d4cf3653731342620f
+KODI_AUDIOENCODER_WAV_SITE = $(call github,xbmc,audioencoder.wav,$(KODI_AUDIOENCODER_WAV_VERSION))
+KODI_AUDIOENCODER_WAV_LICENSE = GPLv2+
+KODI_AUDIOENCODER_WAV_LICENSE_FILES = src/EncoderWav.cpp
+
+# This really is a runtime dependency, but we need Kodi to be installed
+# first, since we'll install files in Kodi's directories _after_ Kodi has
+# installed its own files
+KODI_AUDIOENCODER_WAV_DEPENDENCIES = kodi
+
+KODI_AUDIOENCODER_WAV_CONF_OPTS += \
+	-DCMAKE_MODULE_PATH=$(TARGET_DIR)/usr/lib/xbmc
+
+$(eval $(cmake-package))
package/kodi/Config.in +1 -0
index bfab51d..a690431 100644
@@ -240,6 +240,7 @@ comment "Kodi audioencoder addons"
 source "package/kodi-audioencoder-flac/Config.in"
 source "package/kodi-audioencoder-lame/Config.in"
 source "package/kodi-audioencoder-vorbis/Config.in"
+source "package/kodi-audioencoder-wav/Config.in"
 
 comment "Kodi PVR addons"
 
Signature · 1 line
1.7.10.4