commit 62cd9773cb654016a05a12834fd341e0d91772b9
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Aug 1 01:22:35 2018 +0100
New upstream release
.gitignore | 1 +
ffmpeg35_buildfix.patch => ffmpeg40_buildfix.patch | 80 +++++++++++-----------
libopenshot.spec | 32 +++++++--
sources | 2 +-
4 files changed, 68 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9253366..7d2ecaa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ libopenshot-0.0.6.tar.gz
/libopenshot-0.1.7.tar.gz
/libopenshot-0.1.8.tar.gz
/libopenshot-0.1.9.tar.gz
+/libopenshot-0.2.0.tar.gz
diff --git a/ffmpeg35_buildfix.patch b/ffmpeg40_buildfix.patch
similarity index 69%
rename from ffmpeg35_buildfix.patch
rename to ffmpeg40_buildfix.patch
index 2ce1171..8336296 100644
--- a/ffmpeg35_buildfix.patch
+++ b/ffmpeg40_buildfix.patch
@@ -1,24 +1,46 @@
+--- a/src/FFmpegReader.cpp
++++ b/src/FFmpegReader.cpp
+@@ -978,7 +978,7 @@ void FFmpegReader::ProcessAudioPacket(int64_t requested_frame,
int64_t target_fr
+ int data_size = 0;
+
+ // re-initialize buffer size (it gets changed in the avcodec_decode_audio2 method
call)
+- int buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE;
++ int buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE + AV_INPUT_BUFFER_PADDING_SIZE;
+ #pragma omp critical (ProcessAudioPacket)
+ {
+ #if IS_FFMPEG_3_2
+@@ -1083,7 +1083,7 @@ void FFmpegReader::ProcessAudioPacket(int64_t requested_frame,
int64_t target_fr
+
+
+ // Allocate audio buffer
+- int16_t *audio_buf = new int16_t[AVCODEC_MAX_AUDIO_FRAME_SIZE +
FF_INPUT_BUFFER_PADDING_SIZE];
++ int16_t *audio_buf = new int16_t[AVCODEC_MAX_AUDIO_FRAME_SIZE +
AV_INPUT_BUFFER_PADDING_SIZE];
+
+ ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::ProcessAudioPacket
(ReSample)", "packet_samples", packet_samples, "info.channels",
info.channels, "info.sample_rate", info.sample_rate,
"aCodecCtx->sample_fmt", AV_GET_SAMPLE_FORMAT(aStream, aCodecCtx),
"AV_SAMPLE_FMT_S16", AV_SAMPLE_FMT_S16, "", -1);
+
+diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp
+index 4416040..82c6a9e 100644
--- a/src/FFmpegWriter.cpp
+++ b/src/FFmpegWriter.cpp
-@@ -543,7 +543,7 @@
+@@ -559,7 +559,7 @@ void FFmpegWriter::flush_encoders()
{
- if (info.has_audio && audio_codec &&
audio_st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
audio_codec->frame_size <= 1)
- return;
-- if (info.has_video && video_st->codec->codec_type ==
AVMEDIA_TYPE_VIDEO && (oc->oformat->flags & AVFMT_RAWPICTURE) &&
video_codec->codec->id == AV_CODEC_ID_RAWVIDEO)
-+ if (info.has_video && video_st->codec->codec_type ==
AVMEDIA_TYPE_VIDEO && (oc->oformat->flags & AVFMT_NOFILE) &&
video_codec->codec->id == AV_CODEC_ID_RAWVIDEO)
- return;
+ if (info.has_audio && audio_codec && AV_GET_CODEC_TYPE(audio_st) ==
AVMEDIA_TYPE_AUDIO && AV_GET_CODEC_ATTRIBUTES(audio_st,
audio_codec)->frame_size <= 1)
+ return;
+- if (info.has_video && video_codec && AV_GET_CODEC_TYPE(video_st) ==
AVMEDIA_TYPE_VIDEO && (oc->oformat->flags & AVFMT_RAWPICTURE) &&
AV_FIND_DECODER_CODEC_ID(video_st) == AV_CODEC_ID_RAWVIDEO)
++ if (info.has_video && video_codec && AV_GET_CODEC_TYPE(video_st) ==
AVMEDIA_TYPE_VIDEO && (oc->oformat->flags & AVFMT_NOFILE) &&
AV_FIND_DECODER_CODEC_ID(video_st) == AV_CODEC_ID_RAWVIDEO)
+ return;
int error_code = 0;
-@@ -858,7 +858,7 @@
+@@ -881,7 +881,7 @@ AVStream* FFmpegWriter::add_audio_stream()
// some formats want stream headers to be separate
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ AV_COPY_PARAMS_FROM_CONTEXT(st, c);
ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::add_audio_stream",
"c->codec_id", c->codec_id, "c->bit_rate", c->bit_rate,
"c->channels", c->channels, "c->sample_fmt",
c->sample_fmt, "c->channel_layout", c->channel_layout,
"c->sample_rate", c->sample_rate);
-
-@@ -931,7 +931,7 @@
+@@ -953,7 +953,7 @@ AVStream* FFmpegWriter::add_video_stream()
c->mb_decision = 2;
// some formats want stream headers to be separate
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
@@ -27,7 +49,7 @@
// Find all supported pixel formats for this codec
const PixelFormat* supported_pixel_formats = codec->pix_fmts;
-@@ -951,14 +951,14 @@
+@@ -973,7 +973,7 @@ AVStream* FFmpegWriter::add_video_stream()
if (strcmp(fmt->name, "gif") != 0)
// If not GIF format, skip the encoding process
// Set raw picture flag (so we don't encode this video)
@@ -36,55 +58,33 @@
} else {
// Set the default codec
c->pix_fmt = PIX_FMT_YUV420P;
- }
+@@ -981,7 +981,7 @@ AVStream* FFmpegWriter::add_video_stream()
}
+ AV_COPY_PARAMS_FROM_CONTEXT(st, c);
- ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::add_video_stream
(" + (string)fmt->name + " : " +
(string)av_get_pix_fmt_name(c->pix_fmt) + ")", "c->codec_id",
c->codec_id, "c->bit_rate", c->bit_rate, "c->pix_fmt",
c->pix_fmt, "oc->oformat->flags", oc->oformat->flags,
"AVFMT_RAWPICTURE", AVFMT_RAWPICTURE, "", -1);
+ ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::add_video_stream
(" + (string)fmt->name + " : " +
(string)av_get_pix_fmt_name(c->pix_fmt) + ")", "c->codec_id",
c->codec_id, "c->bit_rate", c->bit_rate, "c->pix_fmt",
c->pix_fmt, "oc->oformat->flags", oc->oformat->flags,
"AVFMT_NOFILE", AVFMT_NOFILE, "", -1);
return st;
}
-@@ -1018,7 +1018,7 @@
- audio_encoder_buffer_size = AUDIO_PACKET_ENCODING_SIZE;
- audio_encoder_buffer = new uint8_t[audio_encoder_buffer_size];
+@@ -1056,7 +1056,7 @@ void FFmpegWriter::open_audio(AVFormatContext *oc, AVStream *st)
+ av_dict_set(&st->metadata, iter->first.c_str(), iter->second.c_str(),
0);
+ }
- ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::open_audio",
"audio_codec->thread_count", audio_codec->thread_count,
"audio_input_frame_size", audio_input_frame_size, "buffer_size",
AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE, "", -1,
"", -1, "", -1);
+ ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::open_audio",
"audio_codec->thread_count", audio_codec->thread_count,
"audio_input_frame_size", audio_input_frame_size, "buffer_size",
AVCODEC_MAX_AUDIO_FRAME_SIZE + AV_INPUT_BUFFER_PADDING_SIZE, "", -1,
"", -1, "", -1);
}
-@@ -1473,9 +1473,9 @@
+@@ -1560,9 +1560,9 @@ void
FFmpegWriter::process_video_packet(std::shared_ptr<Frame> frame)
// write video frame
bool FFmpegWriter::write_video_packet(std::shared_ptr<Frame> frame, AVFrame*
frame_final)
{
- ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::write_video_packet",
"frame->number", frame->number, "oc->oformat->flags &
AVFMT_RAWPICTURE", oc->oformat->flags & AVFMT_RAWPICTURE, "", -1,
"", -1, "", -1, "", -1);
--
-- if (oc->oformat->flags & AVFMT_RAWPICTURE) {
+ ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::write_video_packet",
"frame->number", frame->number, "oc->oformat->flags &
AVFMT_NOFILE", oc->oformat->flags & AVFMT_NOFILE, "", -1,
"", -1, "", -1, "", -1);
-+
+
+- if (oc->oformat->flags & AVFMT_RAWPICTURE) {
+ if (oc->oformat->flags & AVFMT_NOFILE) {
// Raw video case.
AVPacket pkt;
av_init_packet(&pkt);
-
---- a/src/FFmpegReader.cpp
-+++ b/src/FFmpegReader.cpp
-@@ -903,7 +903,7 @@
- int data_size = 0;
-
- // re-initialize buffer size (it gets changed in the avcodec_decode_audio2 method
call)
-- int buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE;
-+ int buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE + AV_INPUT_BUFFER_PADDING_SIZE;
- int used = avcodec_decode_audio4(aCodecCtx, audio_frame, &frame_finished, packet);
-
- if (frame_finished) {
-@@ -976,7 +976,7 @@
-
-
- // Allocate audio buffer
-- int16_t *audio_buf = new int16_t[AVCODEC_MAX_AUDIO_FRAME_SIZE +
FF_INPUT_BUFFER_PADDING_SIZE];
-+ int16_t *audio_buf = new int16_t[AVCODEC_MAX_AUDIO_FRAME_SIZE +
AV_INPUT_BUFFER_PADDING_SIZE];
-
- ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::ProcessAudioPacket
(ReSample)", "packet_samples", packet_samples, "info.channels",
info.channels, "info.sample_rate", info.sample_rate,
"aCodecCtx->sample_fmt", aCodecCtx->sample_fmt,
"AV_SAMPLE_FMT_S16", AV_SAMPLE_FMT_S16, "", -1);
-
-
diff --git a/libopenshot.spec b/libopenshot.spec
index cb6026e..b0a1a59 100644
--- a/libopenshot.spec
+++ b/libopenshot.spec
@@ -1,22 +1,26 @@
Name: libopenshot
-Version: 0.1.9
-Release: 3%{?dist}
+Version: 0.2.0
+Release: 1%{?dist}
Summary: Library for creating and editing videos
License: LGPLv3+
URL:
http://www.openshot.org/
Source0:
https://github.com/OpenShot/%{name}/archive/v%{version}/%{name}-%{version...
-Patch0: ffmpeg35_buildfix.patch
+Patch0: ffmpeg40_buildfix.patch
-BuildRequires: cmake swig
+BuildRequires: gcc-c++
+BuildRequires: cmake
+BuildRequires: swig
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: ImageMagick-c++-devel
BuildRequires: ffmpeg-devel
-BuildRequires: libopenshot-audio-devel >= 0.1.5
+BuildRequires: libopenshot-audio-devel >= 0.1.6
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-qtmultimedia-devel
BuildRequires: unittest-cpp-devel
-BuildRequires: zeromq-devel cppzmq-devel
+BuildRequires: cppzmq-devel
+BuildRequires: zeromq-devel
+BuildRequires: ruby-devel
%description
@@ -47,6 +51,16 @@ The python-%{name} package contains python bindings for
applications that use %{name}.
+%package -n ruby-%{name}
+Summary: Ruby bindings for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Group: Development/Libraries
+
+%description -n ruby-%{name}
+The ruby-%{name} package contains ruby bindings for
+applications that use %{name}.
+
+
%prep
%autosetup -p1
@@ -78,8 +92,14 @@ export CXXFLAGS="%{optflags} -Wl,--as-needed -Wno-error"
%files -n python%{python3_pkgversion}-libopenshot
%{python3_sitearch}/*
+%files -n ruby-libopenshot
+%{ruby_vendorarchdir}/*
+
%changelog
+* Tue Jul 31 2018 FeRD (Frank Dana) <ferdnyc AT gmail com> - 0.2.0-1
+- New upstream release
+
* Sat Feb 17 2018 Sérgio Basto <sergio(a)serjux.com> - 0.1.9-3
- require libopenshot-audio 0.1.5
diff --git a/sources b/sources
index 8e0c5aa..e8c2e7c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-74012e7260c91c3413b45401c46bfcc0 libopenshot-0.1.9.tar.gz
+09b05e23356d53777bcb2cad1615683b libopenshot-0.2.0.tar.gz