aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2021-07-08 07:47:04 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2021-07-08 20:51:40 +0000
commit1fa679693782808b62c1b0e9eae0cf34ff4c2014 (patch)
tree9caf28d3c63639bf56af0079e4da8d04e4b5ca7c /multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp
parentc0b9d0ce57874d991499b2a1516bad44478661e1 (diff)
Diffstat (limited to 'multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp')
-rw-r--r--multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp b/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp
index 01518bb07ea0..0d155024338d 100644
--- a/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp
+++ b/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp
@@ -1,24 +1,24 @@
---- src/FFmpegWriter.cpp.orig 2021-02-18 07:59:16 UTC
+--- src/FFmpegWriter.cpp.orig 2021-06-07 02:42:27 UTC
+++ src/FFmpegWriter.cpp
-@@ -181,7 +181,7 @@ void FFmpegWriter::SetVideoOptions(bool has_video, std
+@@ -169,7 +169,7 @@ void FFmpegWriter::SetVideoOptions(bool has_video, std
AVCodec *new_codec;
// Check if the codec selected is a hardware accelerated codec
- #if HAVE_HW_ACCEL
+ #if USE_HW_ACCEL
-#if defined(__linux__)
+#if defined(__unix__)
if (strstr(codec.c_str(), "_vaapi") != NULL) {
new_codec = avcodec_find_encoder_by_name(codec.c_str());
hw_en_on = 1;
-@@ -231,7 +231,7 @@ void FFmpegWriter::SetVideoOptions(bool has_video, std
+@@ -219,7 +219,7 @@ void FFmpegWriter::SetVideoOptions(bool has_video, std
}
#else // unknown OS
new_codec = avcodec_find_encoder_by_name(codec.c_str());
-#endif //__linux__/_WIN32/__APPLE__
+#endif //__unix__/_WIN32/__APPLE__
- #else // HAVE_HW_ACCEL
+ #else // USE_HW_ACCEL
new_codec = avcodec_find_encoder_by_name(codec.c_str());
- #endif // HAVE_HW_ACCEL
-@@ -580,6 +580,7 @@ void FFmpegWriter::SetOption(StreamType stream, std::s
+ #endif // USE_HW_ACCEL
+@@ -568,6 +568,7 @@ void FFmpegWriter::SetOption(StreamType stream, std::s
else {
av_opt_set_int(c->priv_data, "crf", std::min(std::stoi(value),63), 0);
}
@@ -26,7 +26,7 @@
case AV_CODEC_ID_HEVC :
c->bit_rate = 0;
if (strstr(info.vcodec.c_str(), "svt_hevc") != NULL) {
-@@ -588,6 +589,8 @@ void FFmpegWriter::SetOption(StreamType stream, std::s
+@@ -576,6 +577,8 @@ void FFmpegWriter::SetOption(StreamType stream, std::s
av_opt_set_int(c->priv_data, "forced-idr",1,0);
}
break;
@@ -35,7 +35,7 @@
}
#endif // FFmpeg 4.0+
} else {
-@@ -1438,21 +1441,25 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVS
+@@ -1413,21 +1416,25 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVS
adapter_num = openshot::Settings::Instance()->HW_EN_DEVICE_SET;
std::clog << "Encoding Device Nr: " << adapter_num << "\n";
if (adapter_num < 3 && adapter_num >=0) {