diff options
Diffstat (limited to 'media-video/dvdstyler/files')
-rw-r--r-- | media-video/dvdstyler/files/ffmpeg4.patch | 13 | ||||
-rw-r--r-- | media-video/dvdstyler/files/ffmpeg5.patch | 89 | ||||
-rw-r--r-- | media-video/dvdstyler/files/wx30.patch | 14 | ||||
-rw-r--r-- | media-video/dvdstyler/files/wx32.patch | 12 |
4 files changed, 115 insertions, 13 deletions
diff --git a/media-video/dvdstyler/files/ffmpeg4.patch b/media-video/dvdstyler/files/ffmpeg4.patch deleted file mode 100644 index 39966dd1dfb8..000000000000 --- a/media-video/dvdstyler/files/ffmpeg4.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: DVDStyler-3.0.4/src/mediaenc_ffmpeg.cpp -=================================================================== ---- DVDStyler-3.0.4.orig/src/mediaenc_ffmpeg.cpp -+++ DVDStyler-3.0.4/src/mediaenc_ffmpeg.cpp -@@ -223,7 +223,7 @@ bool wxFfmpegMediaEncoder::addAudioStrea - c->time_base = (AVRational){ 1, c->sample_rate }; - // some formats want stream headers to be separate - if(m_outputCtx->oformat->flags & AVFMT_GLOBALHEADER) -- c->flags |= CODEC_FLAG_GLOBAL_HEADER; -+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; - - return true; - } diff --git a/media-video/dvdstyler/files/ffmpeg5.patch b/media-video/dvdstyler/files/ffmpeg5.patch new file mode 100644 index 000000000000..c7ef02833076 --- /dev/null +++ b/media-video/dvdstyler/files/ffmpeg5.patch @@ -0,0 +1,89 @@ +Index: DVDStyler-3.2.1/src/mediaenc_ffmpeg.cpp +=================================================================== +--- DVDStyler-3.2.1.orig/src/mediaenc_ffmpeg.cpp ++++ DVDStyler-3.2.1/src/mediaenc_ffmpeg.cpp +@@ -26,10 +26,12 @@ + extern "C" { + #define __STDC_CONSTANT_MACROS + #define __STDC_LIMIT_MACROS ++#include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> + #include <libswscale/swscale.h> + #include <libavutil/mathematics.h> + #include <libavutil/avstring.h> ++#include <libavutil/channel_layout.h> + } + + #define AUDIO_BUF_SIZE 524288 +@@ -74,6 +76,9 @@ void print_error(const char *filename, i + bool wxFfmpegMediaEncoder::BeginEncode(const wxString& fileName, VideoFormat videoFormat, AudioFormat audioFormat, + AspectRatio aspectRatio, int videoBitrate, bool cbr) { + EndEncode(); ++#if LIBAVCODEC_VERSION_MAJOR >= 59 ++ const ++#endif + AVOutputFormat* outputFormat = NULL; + if (videoFormat == vfNONE || audioFormat == afNONE) + outputFormat = av_guess_format(NULL, (const char*) fileName.ToUTF8(), NULL); +@@ -83,13 +88,16 @@ bool wxFfmpegMediaEncoder::BeginEncode(c + wxLogError(wxT("Cannot open output format")); + return false; + } +- outputFormat->video_codec = videoFormat == vfNONE ? AV_CODEC_ID_NONE : AV_CODEC_ID_MPEG2VIDEO; ++ enum AVCodecID video_codec, audio_codec; ++ ++ video_codec = videoFormat == vfNONE ? AV_CODEC_ID_NONE : AV_CODEC_ID_MPEG2VIDEO; ++ + if (audioFormat == afNONE) +- outputFormat->audio_codec = AV_CODEC_ID_NONE; ++ audio_codec = AV_CODEC_ID_NONE; + else if (audioFormat == afAC3) +- outputFormat->audio_codec = AV_CODEC_ID_AC3; ++ audio_codec = AV_CODEC_ID_AC3; + else +- outputFormat->audio_codec = AV_CODEC_ID_MP2; ++ audio_codec = AV_CODEC_ID_MP2; + + m_outputCtx = NULL; + avformat_alloc_output_context2(&m_outputCtx, outputFormat, NULL, (const char*) fileName.ToUTF8()); +@@ -101,9 +109,9 @@ bool wxFfmpegMediaEncoder::BeginEncode(c + m_outputCtx->packet_size = 2048; + + // add video and audio streams +- if (!addVideoStream(outputFormat->video_codec, videoFormat, aspectRatio, videoBitrate, cbr)) ++ if (!addVideoStream(video_codec, videoFormat, aspectRatio, videoBitrate, cbr)) + return false; +- if (!addAudioStream(outputFormat->audio_codec)) ++ if (!addAudioStream(audio_codec)) + return false; + + // open the output file +@@ -170,6 +178,9 @@ bool wxFfmpegMediaEncoder::addVideoStrea + m_videoStm->id = 0; + + // find the video encoder and open it ++#if LIBAVCODEC_VERSION_MAJOR >= 59 ++ const ++#endif + AVCodec* encoder = avcodec_find_encoder((AVCodecID) codecId); + if (!encoder) { + wxLogError(wxT("Video codec not found")); +@@ -235,7 +246,7 @@ bool wxFfmpegMediaEncoder::addVideoStrea + return true; + } + +-bool hasSampleFmt(AVCodec* codec, AVSampleFormat sample_fmt) { ++bool hasSampleFmt(const AVCodec* codec, AVSampleFormat sample_fmt) { + if (codec != NULL && codec->sample_fmts != NULL) { + int fIdx = 0; + while (codec->sample_fmts[fIdx] >= 0) { +@@ -260,6 +271,9 @@ bool wxFfmpegMediaEncoder::addAudioStrea + m_audioStm->id = 1; + + // find the audio encoder and open it ++#if LIBAVCODEC_VERSION_MAJOR >= 59 ++ const ++#endif + AVCodec* encoder = NULL; + AVSampleFormat sampleFmt = AV_SAMPLE_FMT_S16; + if ((AVCodecID) codecId == AV_CODEC_ID_AC3) { diff --git a/media-video/dvdstyler/files/wx30.patch b/media-video/dvdstyler/files/wx30.patch new file mode 100644 index 000000000000..1ffde52696f0 --- /dev/null +++ b/media-video/dvdstyler/files/wx30.patch @@ -0,0 +1,14 @@ +Index: DVDStyler-3.2.1/wxVillaLib/PropDlg.cpp +=================================================================== +--- DVDStyler-3.2.1.orig/wxVillaLib/PropDlg.cpp ++++ DVDStyler-3.2.1/wxVillaLib/PropDlg.cpp +@@ -760,7 +760,9 @@ void wxPropDlg::OnSelectColour(wxCommand + ((wxButton*) event.GetEventObject())->GetName().Mid(12).ToLong(&index); + ColourPanel* panel = ((ColourPanel*) m_controls[index]); + m_colourData.SetColour(panel->GetColour()); ++#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1 + m_colourData.SetChooseAlpha(true); ++#endif + #ifdef __WXMSW__ + wxGenericColourDialog dialog(propWindow, &m_colourData); + #else diff --git a/media-video/dvdstyler/files/wx32.patch b/media-video/dvdstyler/files/wx32.patch new file mode 100644 index 000000000000..1391fb3c1a83 --- /dev/null +++ b/media-video/dvdstyler/files/wx32.patch @@ -0,0 +1,12 @@ +Index: b/wxVillaLib/PropDlg.cpp +=================================================================== +--- a/wxVillaLib/PropDlg.cpp 2021-11-07 10:42:36.000000000 +0200 ++++ b/wxVillaLib/PropDlg.cpp 2022-08-01 09:06:10.548828062 +0200 +@@ -12,7 +12,6 @@ + #include "utils.h" + #include <wx/fontdlg.h> + #include <wx/colordlg.h> +-#include <wx/generic/colrdlgg.h> + #include <wx/filedlg.h> + #include <wx/dirdlg.h> + #include <wx/grid.h> |