diff options
author | Thomas Zander <riggs@FreeBSD.org> | 2018-03-26 17:58:07 +0000 |
---|---|---|
committer | Thomas Zander <riggs@FreeBSD.org> | 2018-03-26 17:58:07 +0000 |
commit | f319259ca58b618dfcc3b2ee48fe568d362148ed (patch) | |
tree | e155c97b782b6d561b84dac1936adc402fa33b86 | |
parent | net-p2p/bitcoin: Add an option to use newer BDB (diff) |
Un-break avidemux and plugins (import C++11 fixes from upstream)
PR: 224384
Submitted by: rkoberman@gmail.com
MFH: 2018Q1
Notes
Notes:
svn path=/head/; revision=465620
14 files changed, 249 insertions, 2 deletions
diff --git a/multimedia/avidemux-plugins/Makefile b/multimedia/avidemux-plugins/Makefile index a7ee42ce890e..713edddfb203 100644 --- a/multimedia/avidemux-plugins/Makefile +++ b/multimedia/avidemux-plugins/Makefile @@ -12,8 +12,6 @@ COMMENT= Simple GUI based video editor (Plugins) LIB_DEPENDS= libADM6avutil.so.54:multimedia/avidemux -BROKEN= fails to build - MASTERDIR= ${.CURDIR}/../avidemux PLIST= ${.CURDIR}/pkg-plist diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__demuxers_MpegTS_dmxTSPacket.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__demuxers_MpegTS_dmxTSPacket.cpp new file mode 100644 index 000000000000..c491432c5001 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__demuxers_MpegTS_dmxTSPacket.cpp @@ -0,0 +1,53 @@ +--- avidemux_plugins/ADM_demuxers/MpegTS/dmxTSPacket.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_demuxers/MpegTS/dmxTSPacket.cpp +@@ -144,7 +144,7 @@ bool tsPacket::setPos(uint64_t pos) + { + if(!_file->setpos(pos)) + { +- printf("[tsPacket] Cannot seek to %"PRIx64"\n", pos); ++ printf("[tsPacket] Cannot seek to %" PRIx64"\n", pos); + return false; + } + return true; +@@ -387,7 +387,7 @@ nextPack3: + zprintf("[TS Demuxer] Code=0x%x pid=0x%x\n",code,pes->pid); + if((code&0xffffff00)!=0x100) + { +- printf("[Ts Demuxer] No PES startcode at 0x%"PRIx64"\n",pkt.startAt); ++ printf("[Ts Demuxer] No PES startcode at 0x%" PRIx64"\n",pkt.startAt); + printf("0x:%02x %02x %02x %02x\n",pkt.payload[4],pkt.payload[5],pkt.payload[6],pkt.payload[7]); + goto nextPack3; + } +@@ -433,7 +433,7 @@ nextPack3: + /** + \fn decodePesHeader + */ +-#define fail(x) {printf("[Ts Demuxer]*********"x"*******\n");return false;} ++#define fail(x) {printf("[Ts Demuxer]*********" x"*******\n");return false;} + bool tsPacket::decodePesHeader(TS_PESpacket *pes) + { + uint8_t *start=pes->payload+6; +@@ -735,7 +735,7 @@ bool tsPacketLinear::read(uint32_t le + */ + bool tsPacketLinear::getInfo(dmxPacketInfo *info) + { +-#warning FIXME ++//#warning FIXME + if(pesPacket->offset<4) + { + info->startAt=this->oldStartAt; +@@ -780,12 +780,12 @@ bool tsPacketLinear::seek(uint64_t pa + { + if(!_file->setpos(packetStart)) + { +- printf("[tsPacket] Cannot seek to %"PRIx64"\n",packetStart); ++ printf("[tsPacket] Cannot seek to %" PRIx64"\n",packetStart); + return 0; + } + if(!refill()) + { +- printf("[tsPacketLinear] Seek to %"PRIx64":%"PRIx32" failed\n",packetStart,offset); ++ printf("[tsPacketLinear] Seek to %" PRIx64":%" PRIx32" failed\n",packetStart,offset); + return false; + } + ADM_assert(offset<pesPacket->payloadSize); diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffDv_ADM__ffDv.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffDv_ADM__ffDv.cpp new file mode 100644 index 000000000000..2592010dc1b2 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffDv_ADM__ffDv.cpp @@ -0,0 +1,11 @@ +--- avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp +@@ -44,7 +44,7 @@ typedef struct + + static const dvProfileClass supportedProfiles[]= + { +- {720,480,29.97,dvColor422}, ++ {720,480,30,dvColor422}, + {720,576,25,dvColor420}, + }; + diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffFlv1_ADM__ffFlv1.h b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffFlv1_ADM__ffFlv1.h new file mode 100644 index 000000000000..f1fbaddbfa15 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffFlv1_ADM__ffFlv1.h @@ -0,0 +1,14 @@ +--- avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h +@@ -43,9 +43,9 @@ + 0, /* max_b_frames */ \ + 0, /* mpeg_quant */ \ + 1, /* is_luma_elim_threshold */ \ +- -2, /* luma_elim_threshold */ \ ++ 0, /* luma_elim_threshold */ \ + 1, /* is_chroma_elim_threshold */ \ +- -5, /* chroma_elim_threshold */ \ ++ 0, /* chroma_elim_threshold */ \ + 0.05, /*lumi_masking */ \ + 1, /* is lumi */ \ + 0.01, /*dark_masking */ \ diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg2_ADM__ffMpeg2.h b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg2_ADM__ffMpeg2.h new file mode 100644 index 000000000000..187d5097aae0 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg2_ADM__ffMpeg2.h @@ -0,0 +1,14 @@ +--- avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h +@@ -53,9 +53,9 @@ enum + 2, /* max_b_frames */ \ + 1, /* mpeg_quant */ \ + 1, /* is_luma_elim_threshold */ \ +- -2, /* luma_elim_threshold */ \ ++ 0, /* luma_elim_threshold */ \ + 1, /* is_chroma_elim_threshold */ \ +- -5, /* chroma_elim_threshold */ \ ++ 0, /* chroma_elim_threshold */ \ + 0.05, /*lumi_masking */ \ + 1, /* is lumi */ \ + 0.01, /*dark_masking */ \ diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg4_ADM__ffMpeg4.h b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg4_ADM__ffMpeg4.h new file mode 100644 index 000000000000..6fb25a5cc719 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg4_ADM__ffMpeg4.h @@ -0,0 +1,14 @@ +--- avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h +@@ -43,9 +43,9 @@ + 2, /* max_b_frames */ \ + 0, /* mpeg_quant */ \ + 1, /* is_luma_elim_threshold */ \ +- -2, /* luma_elim_threshold */ \ ++ 0, /* luma_elim_threshold */ \ + 1, /* is_chroma_elim_threshold */ \ +- -5, /* chroma_elim_threshold */ \ ++ 0, /* chroma_elim_threshold */ \ + 0.05, /*lumi_masking */ \ + 1, /* is lumi */ \ + 0.01, /*dark_masking */ \ diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.cpp new file mode 100644 index 000000000000..844273e06960 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.cpp @@ -0,0 +1,34 @@ +--- avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.cpp +@@ -173,7 +173,7 @@ again: + //return false; + }else + { +- //printf("[PPPP] x264 Incoming : %"PRIu64"us \n",image->Pts); ++ //printf("[PPPP] x264 Incoming : %" PRIu64"us \n",image->Pts); + // 2-preamble + if(false==preAmble(image)) + { +@@ -289,11 +289,11 @@ bool x264Encoder::postAmble (ADMBitstrea + } + //------ + aprintf("encoder delay=%d, pic out dts=%d picout pts=%d\n",getEncoderDelay(),picout->i_dts,picout->i_pts); +- aprintf("pts = %"PRIu64", dts=%"PRIu64", pts+delay=%"PRIu64" delta=%"PRIu64"\n",picout->i_pts,out->dts,out->pts, ++ aprintf("pts = %" PRIu64", dts=%" PRIu64", pts+delay=%" PRIu64" delta=%" PRIu64"\n",picout->i_pts,out->dts,out->pts, + out->pts-out->dts); + if(out->dts>out->pts) + { +- ADM_warning("DTS > PTS, that can happen when there are holes in the source (%"PRIu64"/%"PRIu64")\n", ++ ADM_warning("DTS > PTS, that can happen when there are holes in the source (%" PRIu64"/%" PRIu64")\n", + out->dts,out->pts); + if(picout->i_type!=X264_TYPE_B && picout->i_type!=X264_TYPE_BREF) + { +@@ -341,7 +341,7 @@ bool x264Encoder::postAmble (ADMBitstrea + ADM_error ("[x264] Unknown image type: %d\n", picout->i_type); + //ADM_assert(0); + } +- //printf("[OOOO] x264 Outgoing : %"PRIu64"us \n",out->dts); ++ //printf("[OOOO] x264 Outgoing : %" PRIu64"us \n",out->dts); + out->out_quantizer = picout->i_qpplus1; + return true; + } diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.h b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.h new file mode 100644 index 000000000000..212a5c8bb885 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.h @@ -0,0 +1,11 @@ +--- avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h +@@ -108,7 +108,7 @@ extern "C" + 1.0, /* float rate_tolerance; */ \ + 0, /* uint32_t vbv_max_bitrate; */ \ + 0, /* uint32_t vbv_buffer_size; */ \ +- 0.9, /* uint32_t vbv_buffer_init; */ \ ++ 1, /* uint32_t vbv_buffer_init; */ \ + 1.4, /* float ip_factor; */ \ + 1.3, /* float pb_factor; */ \ + 1, /* uint32_t aq_mode; */ \ diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_qt4_Q__x264.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_qt4_Q__x264.cpp new file mode 100644 index 000000000000..511363896c2b --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_qt4_Q__x264.cpp @@ -0,0 +1,11 @@ +--- avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp +@@ -38,7 +38,7 @@ typedef struct + }idcToken; + + static const idcToken listOfIdc[]={ +- {-1,"Auto"}, ++ {(unsigned int)-1,"Auto"}, + {10,"1"}, + {11,"1.1"}, + {12,"1.2"}, diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.cpp new file mode 100644 index 000000000000..d94b9d2e1254 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.cpp @@ -0,0 +1,16 @@ +--- avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.cpp +@@ -284,11 +284,11 @@ bool x265Encoder::postAmble (ADMBitstrea + } + //------ + aprintf("encoder delay=%d, pic out dts=%d picout pts=%d\n",getEncoderDelay(),picout->i_dts,picout->i_pts); +- aprintf("pts = %"PRIu64", dts=%"PRIu64", pts+delay=%"PRIu64" delta=%"PRIu64"\n",picout->i_pts,out->dts,out->pts, ++ aprintf("pts = %" PRIu64", dts=%" PRIu64", pts+delay=%" PRIu64" delta=%" PRIu64"\n",picout->i_pts,out->dts,out->pts, + out->pts-out->dts); + if(out->dts>out->pts) + { +- ADM_warning("DTS > PTS, that can happen when there are holes in the source (%"PRIu64"/%"PRIu64")\n", ++ ADM_warning("DTS > PTS, that can happen when there are holes in the source (%" PRIu64"/%" PRIu64")\n", + out->dts,out->pts); + if(picout->sliceType!=X265_TYPE_B && picout->sliceType!=X265_TYPE_BREF) + { diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.h b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.h new file mode 100644 index 000000000000..a55b01089886 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.h @@ -0,0 +1,11 @@ +--- avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h +@@ -85,7 +85,7 @@ extern "C" + 1.0, /* float rate_tolerance; */ \ + 0, /* uint32_t vbv_max_bitrate; */ \ + 0, /* uint32_t vbv_buffer_size; */ \ +- 0.9, /* uint32_t vbv_buffer_init; */ \ ++ 1, /* uint32_t vbv_buffer_init; */ \ + 1.4, /* float ip_factor; */ \ + 1.3, /* float pb_factor; */ \ + 2, /* uint32_t aq_mode; */ \ diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_qt4_Q__x265.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_qt4_Q__x265.cpp new file mode 100644 index 000000000000..cdc0428e494e --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_qt4_Q__x265.cpp @@ -0,0 +1,11 @@ +--- avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp +@@ -38,7 +38,7 @@ typedef struct + }idcToken; + + static const idcToken listOfIdc[]={ +- {-1,"Auto"}, ++ {(unsigned int)-1,"Auto"}, + {10,"1"}, + {20,"2"}, + {21,"2.1"}, diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_xvid4_ADM__xvid4.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_xvid4_ADM__xvid4.cpp new file mode 100644 index 000000000000..eb4d83e242ef --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_xvid4_ADM__xvid4.cpp @@ -0,0 +1,20 @@ +--- avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp +@@ -54,7 +54,7 @@ typedef enum + RD_SQUARE = RD_HPEL_QPEL_8 | XVID_ME_EXTSEARCH_RD + } RateDistortionMode; + +-uint32_t rdMode[5]= ++int32_t rdMode[5]= + { + RD_NONE, + RD_DCT_ME, +@@ -332,7 +332,7 @@ again: + // Store Pts/DTS + ADM_timeMapping map; // Store real PTS <->lav value mapping + map.realTS=image->Pts+getEncoderDelay(); +- aprintf("Pushing fn=%d Time=%"PRIu64"\n",frameNum,map.realTS); ++ aprintf("Pushing fn=%d Time=%" PRIu64"\n",frameNum,map.realTS); + + map.internalTS=frameNum++; + mapper.push_back(map); diff --git a/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoFilters6_telecide_Telecide__getFrame.cpp b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoFilters6_telecide_Telecide__getFrame.cpp new file mode 100644 index 000000000000..edfcece21b58 --- /dev/null +++ b/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoFilters6_telecide_Telecide__getFrame.cpp @@ -0,0 +1,29 @@ +--- avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp.orig 2016-01-29 08:47:25 UTC ++++ avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp +@@ -240,7 +240,7 @@ teleCide *_param=&configuration; + { + // The chosen frame doesn't match the prediction. + if (predicted_metric == 0) mismatch = 0.0; +- else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric; ++ else mismatch = (100.0*abs((int)predicted_metric - (int)lowest))/predicted_metric; + if (mismatch < gthresh) + { + // It's close enough, so use the predicted one. +@@ -283,7 +283,7 @@ teleCide *_param=&configuration; + { + // The chosen frame doesn't match the prediction. + if (predicted_metric == 0) mismatch = 0.0; +- else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric; ++ else mismatch = (100.0*abs((int)predicted_metric - (int)lowest))/predicted_metric; + if ((int) mismatch <= gthresh) + { + // It's close enough, so use the predicted one. +@@ -394,7 +394,7 @@ teleCide *_param=&configuration; + { + unsigned char *dstpp, *dstpn; + int v1, v2, z; +- #warning blend in place is wrong! ++ //#warning blend in place is wrong! + final=dst; + // MeanX:We should copy here as we blend from source and destination + // for the moment we do it in place, it is wrong. |