diff -Nru bombono-dvd-1.2.2/debian/changelog bombono-dvd-1.2.2/debian/changelog --- bombono-dvd-1.2.2/debian/changelog 2016-04-23 18:37:09.000000000 +0000 +++ bombono-dvd-1.2.2/debian/changelog 2016-05-03 23:48:36.000000000 +0000 @@ -1,3 +1,13 @@ +bombono-dvd (1.2.2-0ubuntu10) yakkety; urgency=medium + + * Drop existing patch stack, replacing with upstream patches: + - Fixes for ffmpeg 3.0.1. + - Fixes for C++11 and Boost. + - Add -std=c++11 by default. + - Miscellaneous compile fixes. + + -- Colin Watson Wed, 04 May 2016 00:48:35 +0100 + bombono-dvd (1.2.2-0ubuntu9) yakkety; urgency=medium * No-change rebuild for boost soname change. diff -Nru bombono-dvd-1.2.2/debian/patches/0001-ffmpeg-has-renamed-CodecID-AVCodecID.patch bombono-dvd-1.2.2/debian/patches/0001-ffmpeg-has-renamed-CodecID-AVCodecID.patch --- bombono-dvd-1.2.2/debian/patches/0001-ffmpeg-has-renamed-CodecID-AVCodecID.patch 2014-05-31 03:11:29.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/0001-ffmpeg-has-renamed-CodecID-AVCodecID.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -From 392e3b3b1e08599c461746baaee33f0246a75afe Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Thu, 31 Oct 2013 14:19:17 +0100 -Subject: [PATCH] ffmpeg has renamed CodecID -> AVCodecID - ---- - src/mgui/ffviewer.cpp | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/mgui/ffviewer.cpp b/src/mgui/ffviewer.cpp -index 92d76a4..82ee8b7 100644 ---- a/src/mgui/ffviewer.cpp -+++ b/src/mgui/ffviewer.cpp -@@ -62,7 +62,7 @@ C_LINKAGE_BEGIN - - typedef struct AVCodecTag { - #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,39,00) -- enum CodecID id; -+ enum AVCodecID id; - #else - int id; - #endif -@@ -70,14 +70,14 @@ typedef struct AVCodecTag { - } AVCodecTag; - - #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,34,00) --static uint FFCodecID2Tag(CodecID codec_id) -+static uint FFCodecID2Tag(AVCodecID codec_id) - { - unsigned int ff_codec_get_tag(const AVCodecTag *tags, int id); - extern const AVCodecTag ff_codec_bmp_tags[]; - return ff_codec_get_tag(ff_codec_bmp_tags, codec_id); - } - #else --static uint FFCodecID2Tag(CodecID codec_id) -+static uint FFCodecID2Tag(AVCodecID codec_id) - { - unsigned int codec_get_tag(const AVCodecTag *tags, int id); - extern const AVCodecTag codec_bmp_tags[]; -@@ -388,7 +388,7 @@ static unsigned char GetChar(uint tag, int bit_begin) - return (tag>>bit_begin) & 0xFF; - } - --static std::string CodecID2Str(CodecID codec_id) -+static std::string CodecID2Str(AVCodecID codec_id) - { - #ifdef _MSC_VER - std::string tag_str = boost::format("%1%") % codec_id % bf::stop; -@@ -406,7 +406,7 @@ static std::string CodecID2Str(CodecID codec_id) - - #else // CALC_FF_TAG - --static std::string CodecID2Str(CodecID codec_id) -+static std::string CodecID2Str(AVCodecID codec_id) - { - return Int2Str(codec_id); - } --- -1.8.3.1 - diff -Nru bombono-dvd-1.2.2/debian/patches/1000-ubuntu-stop-using-ffmpeg-AVFormatContext-data_offset-now-private.patch bombono-dvd-1.2.2/debian/patches/1000-ubuntu-stop-using-ffmpeg-AVFormatContext-data_offset-now-private.patch --- bombono-dvd-1.2.2/debian/patches/1000-ubuntu-stop-using-ffmpeg-AVFormatContext-data_offset-now-private.patch 2015-08-12 10:48:14.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/1000-ubuntu-stop-using-ffmpeg-AVFormatContext-data_offset-now-private.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Description: ubuntu stop using ffmpeg AVFormatContext data_offset now private - Stop using the ffmpeg AVFormatContext data_offset as this is now private. - It seems that if we seek to a position below the internal data_offset - we will get rounded up to that point, so we can simply seek to 0. -Author: Andy Whitcroft - ---- bombono-dvd-1.2.2.orig/src/mgui/ffviewer.cpp -+++ bombono-dvd-1.2.2/src/mgui/ffviewer.cpp -@@ -1120,7 +1120,9 @@ static bool SeekSetTime(FFViewer& ffv, d - bool seek_ok = TimeSeek(ffv, start_time, time); - if( !seek_ok && CanByteSeek(ffv.iCtx) ) - // тогда переходим в начало файла -- seek_ok = DoSeek(ffv, ffv.iCtx->data_offset, true); -+ // if we seek to 0 and there is a data_offset our seek will -+ // be rounded to the minimum possible, ie data_offset. -+ seek_ok = DoSeek(ffv, /* ffv.iCtx->data_offset */ 0, true); - - // некоторое видео глючит в начале (Hellboy), из-за чего - // последовательный доступ выполняется с перескоками - diff -Nru bombono-dvd-1.2.2/debian/patches/cxx11-boost-fixes.patch bombono-dvd-1.2.2/debian/patches/cxx11-boost-fixes.patch --- bombono-dvd-1.2.2/debian/patches/cxx11-boost-fixes.patch 1970-01-01 00:00:00.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/cxx11-boost-fixes.patch 2016-05-03 23:30:03.000000000 +0000 @@ -0,0 +1,112 @@ +Description: fixes for CXX11 & Boost +Origin: upstream, https://github.com/muravjov/bombono-dvd/commit/9d40d4501cd104e7b0c52d28eeeb0f5c2fd4b13c +Last-Update: 2016-05-04 + +Index: b/src/mgui/author/script.cpp +=================================================================== +--- a/src/mgui/author/script.cpp ++++ b/src/mgui/author/script.cpp +@@ -279,7 +279,7 @@ + + ASSERT_RTL( vi || mn ); + // VTS domain +- bool is_video = vi; ++ bool is_video = bool(vi); + const PostAction& pa = is_video ? vi->PAction() : mn->MtnData().pAct ; + + std::string jnt_cmd; +Index: b/src/mgui/project/add.cpp +=================================================================== +--- a/src/mgui/project/add.cpp ++++ b/src/mgui/project/add.cpp +@@ -415,7 +415,7 @@ + { + std::string err_str; + Gtk::TreePath pth; +- bool res = TryAddMedia(fname.c_str(), pth, err_str); ++ bool res = bool(TryAddMedia(fname.c_str(), pth, err_str)); + if( !res ) + { + LOG_ERR << "TryAddMediaQuiet error (" << desc << "): " << err_str << io::endl; +@@ -538,7 +538,7 @@ + continue; + } + +- bool res = TryAddMedia(fpath.c_str(), brw_pth, err_str, insert_after); ++ bool res = bool(TryAddMedia(fpath.c_str(), brw_pth, err_str, insert_after)); + if( res ) + { + insert_after = true; // вставляем друг за другом +Index: b/src/mgui/project/media-browser.cpp +=================================================================== +--- a/src/mgui/project/media-browser.cpp ++++ b/src/mgui/project/media-browser.cpp +@@ -854,7 +854,7 @@ + Gtk::MenuItem& ea_itm = AppendMI(mn, NewManaged(_("End Action"))); + // только видео + VideoItem vi = IsVideo(mi); +- if( SetEnabled(ea_itm, vi) ) ++ if( SetEnabled(ea_itm, bool(vi)) ) + ea_itm.set_submenu(EndActionMenuBld(vi->PAction(), boost::function_identity, + VideoAddConstantChoice).Create()); + +@@ -863,10 +863,10 @@ + // калькулятор + AddDialogItem(mn, DialogParams(_("Bitrate Calculator"), bb::bind(&RunBitrateCalc, vi, _1, b::ref(brw)), + 350, &brw), tr_enabled); +- AddEnabledItem(mn, _("Reason For Transcoding"), bb::bind(&ShowDVDCompliantStatus, vi), vi); ++ AddEnabledItem(mn, _("Reason For Transcoding"), bb::bind(&ShowDVDCompliantStatus, vi), bool(vi)); + AppendSeparator(mn); + +- AddDialogItem(mn, SubtitlesDialog(vi, &brw), vi); ++ AddDialogItem(mn, SubtitlesDialog(vi, &brw), bool(vi)); + + Popup(mn, event, true); + } +Index: b/src/mgui/project/menu-actions.cpp +=================================================================== +--- a/src/mgui/project/menu-actions.cpp ++++ b/src/mgui/project/menu-actions.cpp +@@ -197,9 +197,11 @@ + void EraseLinkedMenus(MenuPack& mp) + { + CanvasBuf& cb = mp.thRgn.GetCanvasBuf(); ++ const Point& menu_sz = cb.Size(); ++ RectListRgn& lst = cb.RenderList(); + ForeachLinked(mp.Owner(), bb::bind(&UpdateMenuRegionObject, +- _1, boost::cref(cb.Size()), +- boost::ref(cb.RenderList()))); ++ _1, boost::cref(menu_sz), ++ boost::ref(lst))); + } + + void RegionEraserVis::ProcessImpl(bool exceed) +Index: b/src/mgui/project/thumbnail.cpp +=================================================================== +--- a/src/mgui/project/thumbnail.cpp ++++ b/src/mgui/project/thumbnail.cpp +@@ -410,7 +410,7 @@ + { + if( AData().FirstPlayItem() != mi ) + return; +- bool is_menu = IsMenu(mi); ++ bool is_menu = bool(IsMenu(mi)); + RefPtr emblem = GetCheckEmblem(pix, is_menu + ? "copy-n-paste/HelixPlayer_Activity-watch-listen/28.png" + : "copy-n-paste/HelixPlayer_Activity-watch-listen/16.png"); +Index: b/src/mlib/ptr.h +=================================================================== +--- a/src/mlib/ptr.h ++++ b/src/mlib/ptr.h +@@ -153,6 +153,11 @@ + return *this; + } + ++ operator bool () const ++ { ++ return this->get() != 0; ++ } ++ + #if 0 + // кострукторы приведения + template diff -Nru bombono-dvd-1.2.2/debian/patches/ffmpeg-3.0.1.patch bombono-dvd-1.2.2/debian/patches/ffmpeg-3.0.1.patch --- bombono-dvd-1.2.2/debian/patches/ffmpeg-3.0.1.patch 1970-01-01 00:00:00.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/ffmpeg-3.0.1.patch 2016-05-03 23:29:21.000000000 +0000 @@ -0,0 +1,132 @@ +Description: fixes for ffmpeg 3.0.1 +Origin: upstream, https://github.com/muravjov/bombono-dvd/commit/282273b8a58160d881b74711475b51ec99fed02a +Last-Update: 2016-05-04 + +Index: b/src/mgui/ffviewer.cpp +=================================================================== +--- a/src/mgui/ffviewer.cpp ++++ b/src/mgui/ffviewer.cpp +@@ -48,6 +48,18 @@ + C_LINKAGE_END + #endif + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,05,00) ++C_LINKAGE_BEGIN ++#include ++C_LINKAGE_END ++static int bmd_avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height) ++{ ++ return av_image_get_buffer_size(pix_fmt, width, height, 1); ++} ++#else ++#define bmd_avpicture_get_size avpicture_get_size ++#endif ++ + // Прямой доступ к ff_codec_bmp_tags, в частности, закрыл, некий + // Anton Khirnov, см. libavformat/libavformat.v (из него генерится скрипт + // для опции --version-script= линковщика ld) +@@ -406,7 +418,11 @@ + + #else // CALC_FF_TAG + +-static std::string CodecID2Str(CodecID codec_id) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,00,00) ++//#define CodecID AVCodecID ++#endif ++ ++static std::string CodecID2Str(AVCodecID codec_id) + { + return Int2Str(codec_id); + } +@@ -617,6 +633,13 @@ + CloseInfo(*this); + } + ++static int bmd_avpicture_fill(AVFrame *picture, const uint8_t *ptr, ++ AVPixelFormat pix_fmt, int width, int height) ++{ ++ return av_image_fill_arrays(picture->data, picture->linesize, ++ ptr, pix_fmt, width, height, 1); ++} ++ + bool FFViewer::Open(const char* fname, std::string& err_str) + { + // * закрываем открытое ранее +@@ -635,11 +658,14 @@ + // opt_default(); // обновление sws_opts по -sws_flags + // sws_flags = av_get_int(sws_opts, "sws_flags", NULL); // = sws_opts.flags + int sws_flags = SWS_BICUBIC; ++ ++#if !(LIBSWSCALE_VERSION_INT >= AV_VERSION_INT(3,0,0)) + // при сборке с --enable-runtime-cpudetect (появилось после 0.5), который полюбили пакетировщики, + // лучшая оптимизация выбирается на этапе выполнения, а не сборке; однако для 0.6 времени + // maverick оно еще не доделано, см. http://ffmpeg.arrozcru.org/forum/viewtopic.php?f=1&t=1185 + // :KLUDGE: потому добавляем явно + sws_flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2; ++#endif + + // :TRICKY: почему-то ffmpeg'у "нравится" BGR24 и не нравиться RGB24 в плане использования + // MMX (ускорения); цена по времени неизвестна,- используем только ради того, чтобы не было +@@ -647,15 +673,27 @@ + // Другой вариант - PIX_FMT_RGB32, но там зависимый порядок байтов (в GdkPixbuf - нет) и + // мы нацелены на RGB24 + // :TODO: с версии LIBSWSCALE_VERSION_INT >= 0.8.11 появился прямой yuv -> rgb24, поправить ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(54,17,00) ++ AVPixelFormat dst_pf = AV_PIX_FMT_BGR24; // AV_PIX_FMT_RGB24; ++#else + PixelFormat dst_pf = PIX_FMT_BGR24; // PIX_FMT_RGB24; ++#endif ++ + rgbCnvCtx = sws_getContext(sz.x, sz.y, GetVideoCtx(*this)->pix_fmt, sz.x, sz.y, + dst_pf, sws_flags, 0, 0, 0); + ASSERT( rgbCnvCtx ); + + Point dst_sz(sz); +- rgbBuf = (uint8_t*)av_malloc(avpicture_get_size(dst_pf, dst_sz.x, dst_sz.y) * sizeof(uint8_t)); +- avcodec_get_frame_defaults(&rgbFrame); // не помешает +- avpicture_fill((AVPicture*)&rgbFrame, rgbBuf, dst_pf, dst_sz.x, dst_sz.y); ++ rgbBuf = (uint8_t*)av_malloc(bmd_avpicture_get_size(dst_pf, dst_sz.x, dst_sz.y) * sizeof(uint8_t)); ++ ++ // не помешает ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56,35,01) ++ av_frame_unref(&rgbFrame); ++#else ++ avcodec_get_frame_defaults(&rgbFrame); ++#endif ++ ++ bmd_avpicture_fill(&rgbFrame, rgbBuf, dst_pf, dst_sz.x, dst_sz.y); + } + else + // защита от неполных открытий +@@ -841,7 +879,11 @@ + + DoVideoDecode(ffv, got_picture, &pkt); + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,8,00) ++ av_packet_unref(&pkt); ++#else + av_free_packet(&pkt); ++#endif + } + else if( av_res == (int)AVERROR_EOF ) // для mpegts также -EIO приходит + { +@@ -1119,8 +1161,18 @@ + { + bool seek_ok = TimeSeek(ffv, start_time, time); + if( !seek_ok && CanByteSeek(ffv.iCtx) ) ++ { + // тогда переходим в начало файла +- seek_ok = DoSeek(ffv, ffv.iCtx->data_offset, true); ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(56,11,00) ++ // автор 9deaec782810d098bca11c9332fab2d2f4c5fb78 уверяет, что ++ // сокрытие AVFormatContext.internal в internal.h - это нормально ++ //int64_t data_offset = ffv.iCtx->internal->data_offset; ++ int64_t data_offset = 0; ++#else ++ int64_t data_offset = ffv.iCtx->data_offset; ++#endif ++ seek_ok = DoSeek(ffv, data_offset, true); ++ } + + // некоторое видео глючит в начале (Hellboy), из-за чего + // последовательный доступ выполняется с перескоками - diff -Nru bombono-dvd-1.2.2/debian/patches/misc-fixes.patch bombono-dvd-1.2.2/debian/patches/misc-fixes.patch --- bombono-dvd-1.2.2/debian/patches/misc-fixes.patch 1970-01-01 00:00:00.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/misc-fixes.patch 2016-05-03 23:48:24.000000000 +0000 @@ -0,0 +1,32 @@ +Description: miscellaneous compile fixes +Origin: backport, https://github.com/muravjov/bombono-dvd/commit/11f8b5a9cb2fc36c42103ddc6866836b4bf57f58 +Last-Update: 2016-05-04 + +Index: b/src/mgui/stream_utils.h +=================================================================== +--- a/src/mgui/stream_utils.h ++++ b/src/mgui/stream_utils.h +@@ -42,8 +42,8 @@ + stream(std::iostream& strm): io_strm(strm) {} + + std::iostream& strm() { return io_strm; } +- operator void*() const { return (void*)io_strm; } +- bool operator!() const { return !operator void*(); } ++ //operator void*() const { return (void*)io_strm; } ++ //bool operator!() const { return !operator void*(); } + stream& seekg(streamoff off, ios_base::seekdir dir) + { io_strm.seekg(off, dir); return *this; } + stream& seekp(streamoff off, ios_base::seekdir dir) +Index: b/src/mgui/tests/test_compile.cpp +=================================================================== +--- a/src/mgui/tests/test_compile.cpp ++++ b/src/mgui/tests/test_compile.cpp +@@ -44,7 +44,7 @@ + std::for_each(r_lst.begin(), r_lst.end(), ( + lambda::var(cut_rct) = lambda::bind(Intersection, lambda::_1, ref(plc_rct)), + lambda::if_then( !lambda::bind(&RectT::IsNull, lambda::var(cut_rct)), +- lambda::bind(&DrwFunctor::operator(), ref(drw_fnr), lambda::var(cut_rct)) ) ++ lambda::bind(&DrwFunctor::operator(), drw_fnr, lambda::var(cut_rct)) ) + ) ); + } + diff -Nru bombono-dvd-1.2.2/debian/patches/series bombono-dvd-1.2.2/debian/patches/series --- bombono-dvd-1.2.2/debian/patches/series 2015-08-12 10:48:14.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/series 2016-05-03 23:47:08.000000000 +0000 @@ -1,2 +1,4 @@ -0001-ffmpeg-has-renamed-CodecID-AVCodecID.patch -1000-ubuntu-stop-using-ffmpeg-AVFormatContext-data_offset-now-private.patch +ffmpeg-3.0.1.patch +cxx11-boost-fixes.patch +std-cxx11.patch +misc-fixes.patch diff -Nru bombono-dvd-1.2.2/debian/patches/std-cxx11.patch bombono-dvd-1.2.2/debian/patches/std-cxx11.patch --- bombono-dvd-1.2.2/debian/patches/std-cxx11.patch 1970-01-01 00:00:00.000000000 +0000 +++ bombono-dvd-1.2.2/debian/patches/std-cxx11.patch 2016-05-03 23:31:57.000000000 +0000 @@ -0,0 +1,18 @@ +Description: add -std=c++11 by default +Origin: upstream, https://github.com/muravjov/bombono-dvd/commit/b964f9e9af92047f4e884d2eb2347b870fbf086e +Last-Update: 2016-05-04 + +Index: b/SConstruct +=================================================================== +--- a/SConstruct ++++ b/SConstruct +@@ -69,7 +69,8 @@ + global common_warn_flags, cxx_warn_flags, debug_flags, defines + if BV.IsGccCompiler(): + # GCC +- common_warn_flags = ['-ansi'] ++ # -std=c++11 is required by sigc++, shit ++ common_warn_flags = ['-ansi', '-std=c++11'] + # -Wno-reorder - not to warn if not accurate order in ctor (let compiler do!) + # :TODO: why + # CXXCOM = $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS ...