commit 8b9f3bf809fe7d3bf8b79fce80233b359ce5bd60
Author: Jan RÄ™korajski <[email protected]>
Date:   Sun Sep 1 17:57:56 2024 +0200

    - up to 0.3.3

 imagemagick7.patch       |  79 -----------------------------
 libopenshot-ffmpeg.patch | 127 -----------------------------------------------
 libopenshot.spec         |  19 +++----
 3 files changed, 6 insertions(+), 219 deletions(-)
---
diff --git a/libopenshot.spec b/libopenshot.spec
index 2abe98f..f98d4ce 100644
--- a/libopenshot.spec
+++ b/libopenshot.spec
@@ -1,14 +1,11 @@
 Summary:       Library for creating and editing videos
 Name:          libopenshot
-Version:       0.2.0
-Release:       3
+Version:       0.3.3
+Release:       1
 License:       LGPL-3.0+
 Group:         Libraries
-Source0:       
https://github.com/OpenShot/libopenshot/archive/v%{version}.tar.gz
-# Source0-md5: 09b05e23356d53777bcb2cad1615683b
-Patch0:                imagemagick7.patch
-Patch1:                %{name}-ffmpeg.patch
-Group:         Development/Libraries
+Source0:       
https://github.com/OpenShot/libopenshot/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 3fc1f185050bf01b73948944b8e13bc7
 URL:           http://www.openshot.org/
 BuildRequires: ImageMagick-c++-devel
 BuildRequires: Qt5Core-devel
@@ -19,7 +16,7 @@ BuildRequires:        cppzmq-devel
 BuildRequires: doxygen
 BuildRequires: ffmpeg-devel
 BuildRequires: ffmpeg-libs
-BuildRequires: libopenshot-audio-devel
+BuildRequires: libopenshot-audio-devel >= 0.3
 BuildRequires: libstdc++-devel
 BuildRequires: python3-devel
 BuildRequires: swig
@@ -55,10 +52,6 @@ that use %{name}.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-
-sed -i -e 's#${_REL_PYTHON_MODULE_PATH}#%{py3_sitedir}#g' 
src/bindings/python/CMakeLists.txt
 
 %build
 install -d build
@@ -82,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libopenshot.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libopenshot.so.15
+%attr(755,root,root) %ghost %{_libdir}/libopenshot.so.26
 
 %files devel
 %defattr(644,root,root,755)
diff --git a/imagemagick7.patch b/imagemagick7.patch
deleted file mode 100644
index f54498d..0000000
--- a/imagemagick7.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -ur libopenshot-0.1.2.orig/include/TextReader.h 
libopenshot-0.1.2/include/TextReader.h
---- libopenshot-0.1.2.orig/include/TextReader.h        2016-08-30 
13:23:13.000000000 +0900
-+++ libopenshot-0.1.2/include/TextReader.h     2017-01-01 02:41:47.536511096 
+0900
-@@ -91,7 +91,7 @@ namespace openshot
-               string text_color;
-               string background_color;
-               std::shared_ptr<Magick::Image> image;
--              list<Magick::Drawable> lines;
-+              vector<Magick::Drawable> lines;
-               bool is_open;
-               GravityType gravity;
- 
-diff -ur libopenshot-0.1.2.orig/src/Frame.cpp libopenshot-0.1.2/src/Frame.cpp
---- libopenshot-0.1.2.orig/src/Frame.cpp       2016-08-30 13:23:13.000000000 
+0900
-+++ libopenshot-0.1.2/src/Frame.cpp    2017-01-01 02:45:51.545585405 +0900
-@@ -29,6 +29,9 @@
- 
- using namespace std;
- using namespace openshot;
-+#ifdef USE_IMAGEMAGICK
-+using namespace Magick;
-+#endif
- 
- // Constructor - blank frame (300x200 blank image, 48kHz audio silence)
- Frame::Frame() : number(1), pixel_ratio(1,1), channels(2), width(1), 
height(1),
-@@ -835,7 +838,7 @@
-       // Give image a transparent background color
-       magick_image->backgroundColor(Magick::Color("none"));
-       magick_image->virtualPixelMethod(Magick::TransparentVirtualPixelMethod);
--      magick_image->matte(true);
-+      magick_image->alpha(true);
- 
-       return magick_image;
- }
-@@ -857,13 +860,14 @@
-     // Iterate through the pixel packets, and load our own buffer
-       // Each color needs to be scaled to 8 bit (using the ImageMagick 
built-in ScaleQuantumToChar function)
-       int numcopied = 0;
--    Magick::PixelPacket *pixels = new_image->getPixels(0,0, 
new_image->columns(), new_image->rows());
-+      const Quantum *pixels = new_image->getConstPixels(0,0, 
new_image->columns(), new_image->rows());
-     for (int n = 0, i = 0; n < new_image->columns() * new_image->rows(); n += 
1, i += 4) {
--      buffer[i+0] = MagickCore::ScaleQuantumToChar((Magick::Quantum) 
pixels[n].red);
--      buffer[i+1] = MagickCore::ScaleQuantumToChar((Magick::Quantum) 
pixels[n].green);
--      buffer[i+2] = MagickCore::ScaleQuantumToChar((Magick::Quantum) 
pixels[n].blue);
--      buffer[i+3] = 255 - MagickCore::ScaleQuantumToChar((Magick::Quantum) 
pixels[n].opacity);
--      numcopied+=4;
-+      buffer[i+0] = 
MagickCore::ScaleQuantumToChar(MagickCore::GetPixelRed(new_image->image(), 
pixels));
-+      buffer[i+1] = 
MagickCore::ScaleQuantumToChar(MagickCore::GetPixelGreen(new_image->image(), 
pixels));
-+      buffer[i+2] = 
MagickCore::ScaleQuantumToChar(MagickCore::GetPixelBlue(new_image->image(), 
pixels));
-+      buffer[i+3] = 
MagickCore::ScaleQuantumToChar(MagickCore::GetPixelAlpha(new_image->image(), 
pixels));
-+      numcopied+=4;
-+      pixels += MagickCore::GetPixelChannels(new_image->image());
-     }
- 
-     // Create QImage of frame data
-diff -ur libopenshot-0.1.2.orig/src/ImageReader.cpp 
libopenshot-0.1.2/src/ImageReader.cpp
---- libopenshot-0.1.2.orig/src/ImageReader.cpp 2016-08-30 13:23:13.000000000 
+0900
-+++ libopenshot-0.1.2/src/ImageReader.cpp      2017-01-01 02:34:47.539360428 
+0900
-@@ -50,7 +50,7 @@
- 
-                       // Give image a transparent background color
-                       image->backgroundColor(Magick::Color("none"));
--                      image->matte(true);
-+                      image->alpha(true);
-               }
-               catch (Magick::Exception e) {
-                       // raise exception
-diff -ur libopenshot-0.1.2.orig/src/ImageWriter.cpp 
libopenshot-0.1.2/src/ImageWriter.cpp
---- libopenshot-0.1.2.orig/src/ImageWriter.cpp 2016-08-30 13:23:13.000000000 
+0900
-+++ libopenshot-0.1.2/src/ImageWriter.cpp      2017-01-01 02:35:05.279830304 
+0900
-@@ -97,7 +97,7 @@
-       tr1::shared_ptr<Magick::Image> frame_image = frame->GetMagickImage();
-       frame_image->magick( info.vcodec );
-       frame_image->backgroundColor(Magick::Color("none"));
--      frame_image->matte(true);
-+      frame_image->alpha(true);
-       frame_image->quality(image_quality);
-       frame_image->animationDelay(info.video_timebase.ToFloat() * 100);
-       frame_image->animationIterations(number_of_loops);
diff --git a/libopenshot-ffmpeg.patch b/libopenshot-ffmpeg.patch
deleted file mode 100644
index 4436219..0000000
--- a/libopenshot-ffmpeg.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- a/src/FFmpegReader.cpp~    2018-04-29 21:29:04.000000000 +0200
-+++ b/src/FFmpegReader.cpp     2018-04-29 21:30:32.336155455 +0200
-@@ -941,7 +941,7 @@ void FFmpegReader::ProcessAudioPacket(in
-       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
-@@ -1046,7 +1046,7 @@ void FFmpegReader::ProcessAudioPacket(in
- 
- 
-       // 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);
- 
---- libopenshot-0.1.9/src/FFmpegWriter.cpp~    2018-04-29 22:11:22.000000000 
+0200
-+++ libopenshot-0.1.9/src/FFmpegWriter.cpp     2018-04-29 22:13:25.133795468 
+0200
-@@ -868,7 +868,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);
-@@ -940,7 +940,7 @@ AVStream* FFmpegWriter::add_video_stream
-               c->mb_decision = 2;
-       // 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;
- 
-       // Find all supported pixel formats for this codec
-     const PixelFormat* supported_pixel_formats = codec->pix_fmts;
---- libopenshot-0.1.9/src/FFmpegWriter.cpp~    2018-04-29 22:18:37.000000000 
+0200
-+++ libopenshot-0.1.9/src/FFmpegWriter.cpp     2018-04-29 22:20:24.006338376 
+0200
-@@ -544,8 +544,6 @@ void FFmpegWriter::flush_encoders()
- {
-       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)
--              return;
- 
-     int error_code = 0;
-     int stop_encoding = 1;
-@@ -955,10 +953,6 @@ AVStream* FFmpegWriter::add_video_stream
-             // Raw video should use RGB24
-               c->pix_fmt = PIX_FMT_RGB24;
- 
--        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)
--                      oc->oformat->flags |= AVFMT_RAWPICTURE;
-         } else {
-               // Set the default codec
-               c->pix_fmt = PIX_FMT_YUV420P;
-@@ -966,7 +960,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, "", -1, "", -1);
- 
-       return st;
- }
-@@ -1519,34 +1513,7 @@ void FFmpegWriter::process_video_packet(
- // 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) {
--              // Raw video case.
--              AVPacket pkt;
--              av_init_packet(&pkt);
--
--              pkt.flags |= AV_PKT_FLAG_KEY;
--              pkt.stream_index= video_st->index;
--              pkt.data= (uint8_t*)frame_final->data;
--              pkt.size= sizeof(AVPicture);
--
--              // Increment PTS (in frames and scaled to the codec's timebase)
--              write_video_count += av_rescale_q(1, (AVRational){info.fps.den, 
info.fps.num}, video_codec->time_base);
--              pkt.pts = write_video_count;
--
--              /* write the compressed frame in the media file */
--              int error_code = av_interleaved_write_frame(oc, &pkt);
--              if (error_code < 0)
--              {
--                      
ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::write_video_packet 
ERROR [" + (string)av_err2str(error_code) + "]", "error_code", error_code, "", 
-1, "", -1, "", -1, "", -1, "", -1);
--                      return false;
--              }
--
--              // Deallocate packet
--              AV_FREE_PACKET(&pkt);
--
--      } else {
-+      
ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::write_video_packet", 
"frame->number", frame->number, "", -1, "", -1, "", -1, "", -1, "", -1);
- 
-               AVPacket pkt;
-               av_init_packet(&pkt);
-@@ -1653,7 +1620,6 @@ bool FFmpegWriter::write_video_packet(st
- 
-               // Deallocate packet
-               AV_FREE_PACKET(&pkt);
--      }
- 
-       // Success
-       return true;
-
---- libopenshot-0.1.9/src/FFmpegWriter.cpp~    2018-04-29 22:20:42.000000000 
+0200
-+++ libopenshot-0.1.9/src/FFmpegWriter.cpp     2018-04-29 22:22:06.796083026 
+0200
-@@ -1022,7 +1022,7 @@ void FFmpegWriter::open_audio(AVFormatCo
-       audio_encoder_buffer_size = AUDIO_PACKET_ENCODING_SIZE;
-       audio_encoder_buffer = new uint8_t[audio_encoder_buffer_size];
- 
--      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);
- 
- }
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libopenshot.git/commitdiff/8b9f3bf809fe7d3bf8b79fce80233b359ce5bd60

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to