Changes of Revision 36
obs-studio.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Thu Sep 29 20:07:16 UTC 2016 - jimmy@boombatower.com
4
+
5
+- Update to version 0.16.2:
6
+ * obs-ffmpeg: Fix possible NVENC crash
7
+ * UI: Use rect intersection test for validating position
8
+ * enc-amf: Update submodule to 1.3.1.0
9
+ * obs-text: Add gradient feature
10
+ * enc-amf: Fix warnings caused by warnings( push/pop )
11
+ * libobs: Update to 0.16.2
12
+
13
+-------------------------------------------------------------------
14
Thu Sep 29 02:35:16 UTC 2016 - jimmy@boombatower.com
15
16
- Update to version 0.16.1:
17
obs-studio.spec
Changed
8
1
2
Name: obs-studio
3
-Version: 0.16.1
4
+Version: 0.16.2
5
Release: 0
6
Summary: A recording/broadcasting program
7
8
_service
Changed
10
1
2
<services>
3
<service name="tar_scm" mode="disabled">
4
<param name="versionformat">@PARENT_TAG@</param>
5
- <param name="revision">refs/tags/0.16.1</param>
6
+ <param name="revision">refs/tags/0.16.2</param>
7
<param name="url">git://github.com/jp9000/obs-studio.git</param>
8
<param name="scm">git</param>
9
<param name="changesgenerate">enable</param>
10
_servicedata
Changed
9
1
2
<servicedata>
3
<service name="tar_scm">
4
<param name="url">git://github.com/jp9000/obs-studio.git</param>
5
- <param name="changesrevision">6d16c51cd117a1da04d64f63562b112c38d3fd47</param>
6
+ <param name="changesrevision">580cfc1a95a6bb2b4ea6f002c95c630ae4542ed7</param>
7
</service>
8
</servicedata>
9
obs-studio-0.16.1.tar.xz/UI/obs-app.cpp -> obs-studio-0.16.2.tar.xz/UI/obs-app.cpp
Changed
26
1
2
return true;
3
}
4
5
-bool WindowPositionValid(int x, int y)
6
+bool WindowPositionValid(QRect rect)
7
{
8
vector<MonitorInfo> monitors;
9
GetMonitors(monitors);
10
11
for (auto &monitor : monitors) {
12
- int br_x = monitor.x + monitor.cx;
13
- int br_y = monitor.y + monitor.cy;
14
+ int left = int(monitor.x);
15
+ int top = int(monitor.y);
16
+ int right = left + int(monitor.cx);
17
+ int bottom = top + int(monitor.cy);
18
19
- if (x >= monitor.x && x < br_x &&
20
- y >= monitor.y && y < br_y)
21
+ if ((rect.left() - right) < 0 && (left - rect.right()) < 0 &&
22
+ (rect.top() - bottom) < 0 && (top - rect.bottom()) < 0)
23
return true;
24
}
25
26
obs-studio-0.16.1.tar.xz/UI/obs-app.hpp -> obs-studio-0.16.2.tar.xz/UI/obs-app.hpp
Changed
10
1
2
bool GetFileSafeName(const char *name, std::string &file);
3
bool GetClosestUnusedFileName(std::string &path, const char *extension);
4
5
-bool WindowPositionValid(int x, int y);
6
+bool WindowPositionValid(QRect rect);
7
8
static inline int GetProfilePath(char *path, size_t size, const char *file)
9
{
10
obs-studio-0.16.1.tar.xz/UI/window-basic-main.cpp -> obs-studio-0.16.2.tar.xz/UI/window-basic-main.cpp
Changed
12
1
2
restoreGeometry(byteArray);
3
4
QRect windowGeometry = normalGeometry();
5
- int posx = windowGeometry.x();
6
- int posy = windowGeometry.y();
7
- if (!WindowPositionValid(posx, posy)) {
8
+ if (!WindowPositionValid(windowGeometry)) {
9
QRect rect = App()->desktop()->availableGeometry();
10
setGeometry(QStyle::alignedRect(
11
Qt::LeftToRight,
12
obs-studio-0.16.1.tar.xz/libobs/obs-config.h -> obs-studio-0.16.2.tar.xz/libobs/obs-config.h
Changed
10
1
2
*
3
* Reset to zero each major or minor version
4
*/
5
-#define LIBOBS_API_PATCH_VER 1
6
+#define LIBOBS_API_PATCH_VER 2
7
8
#define MAKE_SEMANTIC_VERSION(major, minor, patch) \
9
((major << 24) | \
10
obs-studio-0.16.1.tar.xz/plugins/enc-amf/#Resources/PatchNotes.txt -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/#Resources/PatchNotes.txt
Changed
16
1
2
3
*1.3.0.3*
4
5
-* Changed: Translations have been updated from CrowdIn.
6
\ No newline at end of file
7
+* Changed: Translations have been updated from CrowdIn.
8
+
9
+*1.3.1.0*
10
+
11
+* Fixed: Simple Interface will now permanently apply Presets.
12
+* Fixed: 'Indistinguishable' had Maximum QP at 21.
13
+* Changed: 'Recording' preset enables 'Frame Skipping' by default.
14
+* Changed: 'High Quality' Preset now uses CQP 16/19/21.
15
+* Changed: 'Indistinguishable' Preset now uses CQP 11/14/16.
16
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Include/amd-amf.h -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Include/amd-amf.h
Changed
17
1
2
// Plugin
3
#include "plugin.h"
4
5
-// AMD AMF SDK
6
+// AMD AMF SDK
7
+#pragma warning( push )
8
+#pragma warning( disable: 4458 )
9
#include "core\Factory.h"
10
#include "components\Component.h"
11
#include "components\ComponentCaps.h"
12
#include "components\VideoEncoderVCE.h"
13
+#pragma warning( pop )
14
15
//////////////////////////////////////////////////////////////////////////
16
// Code
17
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Include/enc-h264-simple.h -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Include/enc-h264-simple.h
Changed
12
1
2
#include <stdint.h>
3
#include <inttypes.h>
4
5
-// OBS
6
-#include "libobs/obs-module.h"
7
-#include "libobs/obs-encoder.h"
8
-
9
// Plugin
10
#include "plugin.h"
11
#include "amd-amf.h"
12
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Include/plugin.h -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Include/plugin.h
Changed
37
1
2
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3
SOFTWARE.
4
*/
5
+
6
#pragma once
7
//////////////////////////////////////////////////////////////////////////
8
// Includes
9
10
#include <thread>
11
12
// Open Broadcaster Software
13
+#pragma warning( disable: 4201 )
14
#include "libobs/obs-module.h"
15
#include "libobs/obs-encoder.h"
16
17
18
19
#define PLUGIN_VERSION_MAJOR 1
20
#define PLUGIN_VERSION_MINOR 3
21
-#define PLUGIN_VERSION_PATCH 0
22
-#define PLUGIN_VERSION_BUILD 3
23
+#define PLUGIN_VERSION_PATCH 1
24
+#define PLUGIN_VERSION_BUILD 0
25
#define PLUGIN_VERSION_FULL (((uint64_t)PLUGIN_VERSION_MAJOR << 48ull) | ((uint64_t)PLUGIN_VERSION_MINOR << 32ull) | ((uint64_t)PLUGIN_VERSION_PATCH) | ((uint64_t)PLUGIN_VERSION_BUILD))
26
#define PLUGIN_VERSION_TEXT vstr(PLUGIN_VERSION_MAJOR) "." vstr(PLUGIN_VERSION_MINOR) "." vstr(PLUGIN_VERSION_PATCH) "." vstr(PLUGIN_VERSION_BUILD) "-" vstr(AMF_VERSION_MAJOR) "." vstr(AMF_VERSION_MINOR) "." vstr(AMF_VERSION_RELEASE) "." vstr(AMF_VERSION_BUILD_NUM)
27
28
29
30
#define ThrowExceptionWithAMFError(format, res, ...) {\
31
std::vector<char> _throwexceptionwithamferror_buf(8192);\
32
- sprintf(_throwexceptionwithamferror_buf.data(), format, ##__VA_ARGS__, Plugin::AMD::AMF::GetInstance()->GetTrace()->GetResultText(res), res);\
33
+ sprintf_s(_throwexceptionwithamferror_buf.data(), _throwexceptionwithamferror_buf.size(), format, ##__VA_ARGS__, Plugin::AMD::AMF::GetInstance()->GetTrace()->GetResultText(res), res);\
34
AMF_LOG_ERROR("%s", _throwexceptionwithamferror_buf.data()); \
35
throw new std::exception(_throwexceptionwithamferror_buf.data(), res); \
36
}
37
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Source/amd-amf-vce-capabilities.cpp -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Source/amd-amf-vce-capabilities.cpp
Changed
27
1
2
*/
3
4
#pragma once
5
+
6
//////////////////////////////////////////////////////////////////////////
7
// Includes
8
//////////////////////////////////////////////////////////////////////////
9
10
}
11
12
// Print to log
13
- sprintf(msgBuf.data(),
14
+ sprintf_s(msgBuf.data(), msgBuf.size(),
15
" %4s | %8s | %11d | %8d | %11d | %9d | %7s | %4d - %4d | %7d | %3s | %10d ",
16
(i == 0 ? "AVC" : (i == 1 ? "SVC" : "HEVC")),
17
accelType,
18
19
}
20
21
// Print to log
22
- sprintf(msgBuf.data(),
23
+ sprintf_s(msgBuf.data(), msgBuf.size(),
24
" %4s | %6s | %4dx%4d | %4dx%4d | %3s | %5d | %7s | %12s",
25
(i == 0 ? "AVC" : (i == 1 ? "SVC" : "HEVC")),
26
(j == 0 ? "Input" : "Output"),
27
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Source/amd-amf-vce.cpp -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Source/amd-amf-vce.cpp
Changed
9
1
2
static const char* computeTypeToString[] = {
3
"None",
4
"OpenCL",
5
- "DirectCompute",
6
};
7
static const char* surfaceFormatToString[] = {
8
"NV12",
9
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Source/enc-h264-simple.cpp -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Source/enc-h264-simple.cpp
Changed
186
1
2
/// Preset
3
list = obs_properties_add_list(props, AMF_H264SIMPLE_PRESET, obs_module_text(AMF_H264SIMPLE_PRESET), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
4
obs_property_list_add_int(list, "", -1);
5
- obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_RECORDING), Preset_Recording);
6
obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_TWITCH), Preset_Twitch);
7
obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_YOUTUBE), Preset_YouTube);
8
+ obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_RECORDING), Preset_Recording);
9
obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_HIGHQUALTIY), Preset_HighQuality);
10
obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_INDISTINGUISHABLE), Preset_Indistinguishable);
11
obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_LOSSLESS), Preset_Lossless);
12
13
bool Plugin::Interface::H264SimpleInterface::ui_modified(obs_properties_t *props, obs_property_t *, obs_data_t *data) {
14
if (obs_data_get_int(data, AMF_H264SIMPLE_PRESET) != -1) {
15
switch (obs_data_get_int(data, AMF_H264SIMPLE_PRESET)) {
16
- case Preset_Recording: // Recording
17
- obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 1);
18
+ case Preset_Twitch: // Twitch
19
+ obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 2);
20
obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality);
21
obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High);
22
- obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel);
23
- obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained);
24
- obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0);
25
+ obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCEProfileLevel_41);
26
+ obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantBitrate);
27
+ obs_data_set_int(data, AMF_H264_QP_MINIMUM, 18);
28
obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51);
29
- obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000);
30
- obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000);
31
+ obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 3000);
32
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false);
33
- obs_data_set_int(data, AMF_H264_FILLERDATA, 0);
34
+ obs_data_set_int(data, AMF_H264_FILLERDATA, 1);
35
obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0);
36
37
// Advanced Properties
38
- obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 3 : 0));
39
- obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 1 : 0));
40
+ obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, 0);
41
+ obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, 0);
42
obs_data_set_int(data, AMF_H264_QP_BPICTURE_DELTA, 0);
43
obs_data_set_int(data, AMF_H264_QP_REFERENCE_BPICTURE_DELTA, 0);
44
obs_data_set_int(data, AMF_H264_DEBLOCKINGFILTER, 1);
45
46
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_GOP_SIZE, false);
47
obs_data_set_int(data, AMF_H264_CABAC, -1);
48
break;
49
- case Preset_Twitch: // Twitch
50
+ case Preset_YouTube: // YouTube
51
+ // Basic Properties
52
obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 2);
53
obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality);
54
obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High);
55
56
obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantBitrate);
57
obs_data_set_int(data, AMF_H264_QP_MINIMUM, 18);
58
obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51);
59
- obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 3000);
60
+ obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 6000);
61
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false);
62
obs_data_set_int(data, AMF_H264_FILLERDATA, 1);
63
obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0);
64
65
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_GOP_SIZE, false);
66
obs_data_set_int(data, AMF_H264_CABAC, -1);
67
break;
68
- case Preset_YouTube: // YouTube
69
- // Basic Properties
70
- obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 2);
71
+ case Preset_Recording: // Recording
72
+ obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 1);
73
obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality);
74
obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High);
75
- obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCEProfileLevel_41);
76
- obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantBitrate);
77
- obs_data_set_int(data, AMF_H264_QP_MINIMUM, 18);
78
+ obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel);
79
+ obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained);
80
+ obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0);
81
obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51);
82
- obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 6000);
83
+ obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000);
84
+ obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000);
85
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false);
86
- obs_data_set_int(data, AMF_H264_FILLERDATA, 1);
87
- obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0);
88
+ obs_data_set_int(data, AMF_H264_FILLERDATA, 0);
89
+ obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 1);
90
91
// Advanced Properties
92
- obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, 0);
93
- obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, 0);
94
+ obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 3 : 0));
95
+ obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 1 : 0));
96
obs_data_set_int(data, AMF_H264_QP_BPICTURE_DELTA, 0);
97
obs_data_set_int(data, AMF_H264_QP_REFERENCE_BPICTURE_DELTA, 0);
98
obs_data_set_int(data, AMF_H264_DEBLOCKINGFILTER, 1);
99
100
obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality);
101
obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High);
102
obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel);
103
- obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained);
104
+ obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantQP);
105
obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0);
106
obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51);
107
+ obs_data_set_int(data, AMF_H264_QP_IFRAME, 16);
108
+ obs_data_set_int(data, AMF_H264_QP_PFRAME, 19);
109
+ obs_data_set_int(data, AMF_H264_QP_BFRAME, 21);
110
obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000);
111
- obs_data_set_int(data, AMF_H264_BITRATE_PEAK, 20000);
112
+ obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000);
113
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false);
114
obs_data_set_int(data, AMF_H264_FILLERDATA, 0);
115
obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0);
116
117
obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality);
118
obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High);
119
obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel);
120
- obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained);
121
+ obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantQP);
122
obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0);
123
- obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 21);
124
+ obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51);
125
+ obs_data_set_int(data, AMF_H264_QP_IFRAME, 11);
126
+ obs_data_set_int(data, AMF_H264_QP_PFRAME, 14);
127
+ obs_data_set_int(data, AMF_H264_QP_BFRAME, 16);
128
obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000);
129
- obs_data_set_int(data, AMF_H264_BITRATE_PEAK, 50000);
130
+ obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000);
131
obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false);
132
obs_data_set_int(data, AMF_H264_FILLERDATA, 0);
133
obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0);
134
135
obs_data_set_int(data, AMF_H264_CABAC, -1);
136
break;
137
}
138
- obs_data_set_int(data, AMF_H264SIMPLE_PRESET, -1);
139
+ //obs_data_set_int(data, AMF_H264SIMPLE_PRESET, -1);
140
}
141
142
{ // Rate Control Settings
143
144
}
145
}
146
147
+#pragma warning( push )
148
+#pragma warning( disable: 4702 )
149
void Plugin::Interface::H264SimpleInterface::destroy(void* data) {
150
try {
151
delete (static_cast<Plugin::Interface::H264SimpleInterface*>(data));
152
153
AMF_LOG_ERROR("Unable to destroy Encoder, see log for more information.");
154
}
155
}
156
+#pragma warning( pop )
157
158
+#pragma warning( push )
159
+#pragma warning( disable: 4702 )
160
bool Plugin::Interface::H264SimpleInterface::update(void *data, obs_data_t *settings) {
161
try {
162
return static_cast<Plugin::Interface::H264SimpleInterface*>(data)->update(settings);
163
} catch (...) {
164
AMF_LOG_ERROR("Unable to update Encoder, see log for more information.");
165
+ return false;
166
}
167
}
168
+#pragma warning( pop )
169
170
bool Plugin::Interface::H264SimpleInterface::encode(void *data, struct encoder_frame * frame, struct encoder_packet * packet, bool * received_packet) {
171
try {
172
173
AMF_LOG_INFO("<AMFEncoder::H264SimpleInterface::~H264SimpleInterface> Complete.");
174
}
175
176
+#pragma warning( push )
177
+#pragma warning( disable: 4100 )
178
bool Plugin::Interface::H264SimpleInterface::update(obs_data_t* settings) {
179
// settings is not flagged as a unused here, since a future update may add support for this.
180
return false;
181
}
182
+#pragma warning( pop )
183
184
bool Plugin::Interface::H264SimpleInterface::encode(struct encoder_frame * frame, struct encoder_packet * packet, bool * received_packet) {
185
bool retVal = true;
186
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/Source/enc-h264.cpp -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/Source/enc-h264.cpp
Changed
26
1
2
}
3
}
4
5
+#pragma warning( push )
6
+#pragma warning( disable: 4702 )
7
void Plugin::Interface::H264Interface::destroy(void* data) {
8
try {
9
Plugin::Interface::H264Interface* enc = static_cast<Plugin::Interface::H264Interface*>(data);
10
11
AMF_LOG_ERROR("Unable to destroy Encoder, see log for more information.");
12
}
13
}
14
+#pragma warning( pop )
15
16
bool Plugin::Interface::H264Interface::encode(void *data, struct encoder_frame *frame, struct encoder_packet *packet, bool *received_packet) {
17
try {
18
19
return static_cast<Plugin::Interface::H264Interface*>(data)->update(settings);
20
} catch (...) {
21
AMF_LOG_ERROR("Unable to update Encoder, see log for more information.");
22
+ return false;
23
}
24
}
25
26
obs-studio-0.16.1.tar.xz/plugins/enc-amf/enc-amf/enc-amf.vcxproj -> obs-studio-0.16.2.tar.xz/plugins/enc-amf/enc-amf/enc-amf.vcxproj
Changed
37
1
2
<WarningLevel>Level4</WarningLevel>
3
<Optimization>Disabled</Optimization>
4
<SDLCheck>true</SDLCheck>
5
- <PreprocessorDefinitions>DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
7
</ClCompile>
8
<Link>
9
<EnableCOMDATFolding>false</EnableCOMDATFolding>
10
11
<WarningLevel>Level4</WarningLevel>
12
<Optimization>Disabled</Optimization>
13
<SDLCheck>true</SDLCheck>
14
- <PreprocessorDefinitions>DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
15
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
16
</ClCompile>
17
<Link>
18
<EnableCOMDATFolding>false</EnableCOMDATFolding>
19
20
<IntrinsicFunctions>true</IntrinsicFunctions>
21
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
22
<FloatingPointModel>Fast</FloatingPointModel>
23
- <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
24
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
25
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
26
<FunctionLevelLinking>false</FunctionLevelLinking>
27
<FloatingPointExceptions>false</FloatingPointExceptions>
28
29
<IntrinsicFunctions>true</IntrinsicFunctions>
30
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
31
<FloatingPointModel>Fast</FloatingPointModel>
32
- <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
33
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
34
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
35
<FunctionLevelLinking>false</FunctionLevelLinking>
36
<FloatingPointExceptions>false</FloatingPointExceptions>
37
obs-studio-0.16.1.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c -> obs-studio-0.16.2.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
Changed
45
1
2
3
int height;
4
bool first_packet;
5
+ bool initialized;
6
};
7
8
static const char *nvenc_getname(void *unused)
9
10
return false;
11
}
12
13
+ enc->initialized = true;
14
+
15
*((AVPicture*)enc->vframe) = enc->dst_picture;
16
return true;
17
}
18
19
static void nvenc_destroy(void *data)
20
{
21
struct nvenc_encoder *enc = data;
22
- AVPacket pkt = {0};
23
- int r_pkt = 1;
24
25
- while (r_pkt) {
26
- if (avcodec_encode_video2(enc->context, &pkt, NULL, &r_pkt) < 0)
27
- break;
28
+ if (enc->initialized) {
29
+ AVPacket pkt = {0};
30
+ int r_pkt = 1;
31
+
32
+ while (r_pkt) {
33
+ if (avcodec_encode_video2(enc->context, &pkt, NULL,
34
+ &r_pkt) < 0)
35
+ break;
36
37
- if (r_pkt)
38
- av_free_packet(&pkt);
39
+ if (r_pkt)
40
+ av_free_packet(&pkt);
41
+ }
42
}
43
44
avcodec_close(enc->context);
45
obs-studio-0.16.1.tar.xz/plugins/obs-text/data/locale/en-US.ini -> obs-studio-0.16.2.tar.xz/plugins/obs-text/data/locale/en-US.ini
Changed
12
1
2
Filter.AllFiles="All Files"
3
Color="Color"
4
Opacity="Opacity"
5
+Gradient="Gradient"
6
+Gradient.Color="Gradient Color"
7
+Gradient.Opacity="Gradient Opacity"
8
+Gradient.Direction="Gradient Direction"
9
BkColor="Background Color"
10
BkOpacity="Background Opacity"
11
Alignment="Alignment"
12
obs-studio-0.16.1.tar.xz/plugins/obs-text/gdiplus/obs-text.cpp -> obs-studio-0.16.2.tar.xz/plugins/obs-text/gdiplus/obs-text.cpp
Changed
136
1
2
#define S_FILE "file"
3
#define S_TEXT "text"
4
#define S_COLOR "color"
5
+#define S_GRADIENT "gradient"
6
+#define S_GRADIENT_COLOR "gradient_color"
7
+#define S_GRADIENT_DIR "gradient_dir"
8
+#define S_GRADIENT_OPACITY "gradient_opacity"
9
#define S_ALIGN "align"
10
#define S_VALIGN "valign"
11
#define S_OPACITY "opacity"
12
13
#define T_FILE T_("TextFile")
14
#define T_TEXT T_("Text")
15
#define T_COLOR T_("Color")
16
+#define T_GRADIENT T_("Gradient")
17
+#define T_GRADIENT_COLOR T_("Gradient.Color")
18
+#define T_GRADIENT_DIR T_("Gradient.Direction")
19
+#define T_GRADIENT_OPACITY T_("Gradient.Opacity")
20
#define T_ALIGN T_("Alignment")
21
#define T_VALIGN T_("VerticalAlignment")
22
#define T_OPACITY T_("Opacity")
23
24
wstring face;
25
int face_size = 0;
26
uint32_t color = 0xFFFFFF;
27
+ uint32_t color2 = 0xFFFFFF;
28
+ float gradient_dir = 0;
29
uint32_t opacity = 100;
30
+ uint32_t opacity2 = 100;
31
uint32_t bk_color = 0;
32
uint32_t bk_opacity = 0;
33
Align align = Align::Left;
34
VAlign valign = VAlign::Top;
35
+ bool gradient = false;
36
bool bold = false;
37
bool italic = false;
38
bool underline = false;
39
40
bits.get());
41
42
Graphics graphics_bitmap(&bitmap);
43
- SolidBrush brush(Color(get_alpha_val(opacity) | (color & 0xFFFFFF)));
44
+ LinearGradientBrush brush(RectF(0, 0, (float)size.cx, (float)size.cy),
45
+ Color(calc_color(color, opacity)),
46
+ Color(calc_color(color2, opacity2)),
47
+ gradient_dir, 1);
48
DWORD full_bk_color = bk_color & 0xFFFFFF;
49
50
if (!text.empty() || use_extents)
51
52
const char *valign_str = obs_data_get_string(s, S_VALIGN);
53
uint32_t new_color = obs_data_get_uint32(s, S_COLOR);
54
uint32_t new_opacity = obs_data_get_uint32(s, S_OPACITY);
55
+ bool gradient = obs_data_get_bool(s, S_GRADIENT);
56
+ uint32_t new_color2 = obs_data_get_uint32(s, S_GRADIENT_COLOR);
57
+ uint32_t new_opacity2 = obs_data_get_uint32(s, S_GRADIENT_OPACITY);
58
+ float new_grad_dir = (float)obs_data_get_double(s, S_GRADIENT_DIR);
59
bool new_vertical = obs_data_get_bool(s, S_VERTICAL);
60
bool new_outline = obs_data_get_bool(s, S_OUTLINE);
61
uint32_t new_o_color = obs_data_get_uint32(s, S_OUTLINE_COLOR);
62
63
/* ----------------------------- */
64
65
new_color = rgb_to_bgr(new_color);
66
+ new_color2 = rgb_to_bgr(new_color2);
67
new_o_color = rgb_to_bgr(new_o_color);
68
new_bk_color = rgb_to_bgr(new_bk_color);
69
70
color = new_color;
71
opacity = new_opacity;
72
+ color2 = new_color2;
73
+ opacity2 = new_opacity2;
74
+ gradient_dir = new_grad_dir;
75
vertical = new_vertical;
76
77
bk_color = new_bk_color;
78
79
extents_cx = n_extents_cx;
80
extents_cy = n_extents_cy;
81
82
+ if (!gradient) {
83
+ color2 = color;
84
+ opacity2 = opacity;
85
+ }
86
+
87
read_from_file = new_use_file;
88
89
chatlog_mode = new_chat_mode;
90
91
return true;
92
}
93
94
+static bool gradient_changed(obs_properties_t *props, obs_property_t *p,
95
+ obs_data_t *s)
96
+{
97
+ bool gradient = obs_data_get_bool(s, S_GRADIENT);
98
+
99
+ set_vis(gradient, S_GRADIENT_COLOR, true);
100
+ set_vis(gradient, S_GRADIENT_OPACITY, true);
101
+ set_vis(gradient, S_GRADIENT_DIR, true);
102
+ return true;
103
+}
104
+
105
static bool extents_modified(obs_properties_t *props, obs_property_t *p,
106
obs_data_t *s)
107
{
108
109
110
obs_properties_add_bool(props, S_VERTICAL, T_VERTICAL);
111
obs_properties_add_color(props, S_COLOR, T_COLOR);
112
-
113
obs_properties_add_int_slider(props, S_OPACITY, T_OPACITY, 0, 100, 1);
114
+
115
+ p = obs_properties_add_bool(props, S_GRADIENT, T_GRADIENT);
116
+ obs_property_set_modified_callback(p, gradient_changed);
117
+
118
+ obs_properties_add_color(props, S_GRADIENT_COLOR, T_GRADIENT_COLOR);
119
+ obs_properties_add_int_slider(props, S_GRADIENT_OPACITY,
120
+ T_GRADIENT_OPACITY, 0, 100, 1);
121
+ obs_properties_add_float_slider(props, S_GRADIENT_DIR,
122
+ T_GRADIENT_DIR, 0, 360, 0.1);
123
124
obs_properties_add_color(props, S_BKCOLOR, T_BKCOLOR);
125
obs_properties_add_int_slider(props, S_BKOPACITY, T_BKOPACITY,
126
127
obs_data_set_default_string(settings, S_VALIGN, S_VALIGN_TOP);
128
obs_data_set_default_int(settings, S_COLOR, 0xFFFFFF);
129
obs_data_set_default_int(settings, S_OPACITY, 100);
130
+ obs_data_set_default_int(settings, S_GRADIENT_COLOR, 0xFFFFFF);
131
+ obs_data_set_default_int(settings, S_GRADIENT_OPACITY, 100);
132
+ obs_data_set_default_double(settings, S_GRADIENT_DIR, 90.0);
133
obs_data_set_default_int(settings, S_BKCOLOR, 0x000000);
134
obs_data_set_default_int(settings, S_BKOPACITY, 0);
135
obs_data_set_default_int(settings, S_OUTLINE_SIZE, 2);
136