Projects
Multimedia
obs-studio
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 36
View file
obs-studio.changes
Changed
@@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Thu Sep 29 20:07:16 UTC 2016 - jimmy@boombatower.com + +- Update to version 0.16.2: + * obs-ffmpeg: Fix possible NVENC crash + * UI: Use rect intersection test for validating position + * enc-amf: Update submodule to 1.3.1.0 + * obs-text: Add gradient feature + * enc-amf: Fix warnings caused by warnings( push/pop ) + * libobs: Update to 0.16.2 + +------------------------------------------------------------------- Thu Sep 29 02:35:16 UTC 2016 - jimmy@boombatower.com - Update to version 0.16.1:
View file
obs-studio.spec
Changed
@@ -1,5 +1,5 @@ Name: obs-studio -Version: 0.16.1 +Version: 0.16.2 Release: 0 Summary: A recording/broadcasting program
View file
_service
Changed
@@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">refs/tags/0.16.1</param> + <param name="revision">refs/tags/0.16.2</param> <param name="url">git://github.com/jp9000/obs-studio.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param>
View file
_servicedata
Changed
@@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/jp9000/obs-studio.git</param> - <param name="changesrevision">6d16c51cd117a1da04d64f63562b112c38d3fd47</param> + <param name="changesrevision">580cfc1a95a6bb2b4ea6f002c95c630ae4542ed7</param> </service> </servicedata>
View file
obs-studio-0.16.1.tar.xz/UI/obs-app.cpp -> obs-studio-0.16.2.tar.xz/UI/obs-app.cpp
Changed
@@ -1518,17 +1518,19 @@ return true; } -bool WindowPositionValid(int x, int y) +bool WindowPositionValid(QRect rect) { vector<MonitorInfo> monitors; GetMonitors(monitors); for (auto &monitor : monitors) { - int br_x = monitor.x + monitor.cx; - int br_y = monitor.y + monitor.cy; + int left = int(monitor.x); + int top = int(monitor.y); + int right = left + int(monitor.cx); + int bottom = top + int(monitor.cy); - if (x >= monitor.x && x < br_x && - y >= monitor.y && y < br_y) + if ((rect.left() - right) < 0 && (left - rect.right()) < 0 && + (rect.top() - bottom) < 0 && (top - rect.bottom()) < 0) return true; }
View file
obs-studio-0.16.1.tar.xz/UI/obs-app.hpp -> obs-studio-0.16.2.tar.xz/UI/obs-app.hpp
Changed
@@ -166,7 +166,7 @@ bool GetFileSafeName(const char *name, std::string &file); bool GetClosestUnusedFileName(std::string &path, const char *extension); -bool WindowPositionValid(int x, int y); +bool WindowPositionValid(QRect rect); static inline int GetProfilePath(char *path, size_t size, const char *file) {
View file
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
@@ -137,9 +137,7 @@ restoreGeometry(byteArray); QRect windowGeometry = normalGeometry(); - int posx = windowGeometry.x(); - int posy = windowGeometry.y(); - if (!WindowPositionValid(posx, posy)) { + if (!WindowPositionValid(windowGeometry)) { QRect rect = App()->desktop()->availableGeometry(); setGeometry(QStyle::alignedRect( Qt::LeftToRight,
View file
obs-studio-0.16.1.tar.xz/libobs/obs-config.h -> obs-studio-0.16.2.tar.xz/libobs/obs-config.h
Changed
@@ -41,7 +41,7 @@ * * Reset to zero each major or minor version */ -#define LIBOBS_API_PATCH_VER 1 +#define LIBOBS_API_PATCH_VER 2 #define MAKE_SEMANTIC_VERSION(major, minor, patch) \ ((major << 24) | \
View file
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
@@ -150,4 +150,12 @@ *1.3.0.3* -* Changed: Translations have been updated from CrowdIn. \ No newline at end of file +* Changed: Translations have been updated from CrowdIn. + +*1.3.1.0* + +* Fixed: Simple Interface will now permanently apply Presets. +* Fixed: 'Indistinguishable' had Maximum QP at 21. +* Changed: 'Recording' preset enables 'Frame Skipping' by default. +* Changed: 'High Quality' Preset now uses CQP 16/19/21. +* Changed: 'Indistinguishable' Preset now uses CQP 11/14/16.
View file
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
@@ -32,11 +32,14 @@ // Plugin #include "plugin.h" -// AMD AMF SDK +// AMD AMF SDK +#pragma warning( push ) +#pragma warning( disable: 4458 ) #include "core\Factory.h" #include "components\Component.h" #include "components\ComponentCaps.h" #include "components\VideoEncoderVCE.h" +#pragma warning( pop ) ////////////////////////////////////////////////////////////////////////// // Code
View file
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
@@ -29,10 +29,6 @@ #include <stdint.h> #include <inttypes.h> -// OBS -#include "libobs/obs-module.h" -#include "libobs/obs-encoder.h" - // Plugin #include "plugin.h" #include "amd-amf.h"
View file
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
@@ -21,6 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #pragma once ////////////////////////////////////////////////////////////////////////// // Includes @@ -32,6 +33,7 @@ #include <thread> // Open Broadcaster Software +#pragma warning( disable: 4201 ) #include "libobs/obs-module.h" #include "libobs/obs-encoder.h" @@ -44,8 +46,8 @@ #define PLUGIN_VERSION_MAJOR 1 #define PLUGIN_VERSION_MINOR 3 -#define PLUGIN_VERSION_PATCH 0 -#define PLUGIN_VERSION_BUILD 3 +#define PLUGIN_VERSION_PATCH 1 +#define PLUGIN_VERSION_BUILD 0 #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)) #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) @@ -70,7 +72,7 @@ #define ThrowExceptionWithAMFError(format, res, ...) {\ std::vector<char> _throwexceptionwithamferror_buf(8192);\ - sprintf(_throwexceptionwithamferror_buf.data(), format, ##__VA_ARGS__, Plugin::AMD::AMF::GetInstance()->GetTrace()->GetResultText(res), res);\ + sprintf_s(_throwexceptionwithamferror_buf.data(), _throwexceptionwithamferror_buf.size(), format, ##__VA_ARGS__, Plugin::AMD::AMF::GetInstance()->GetTrace()->GetResultText(res), res);\ AMF_LOG_ERROR("%s", _throwexceptionwithamferror_buf.data()); \ throw new std::exception(_throwexceptionwithamferror_buf.data(), res); \ }
View file
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
@@ -23,6 +23,7 @@ */ #pragma once + ////////////////////////////////////////////////////////////////////////// // Includes ////////////////////////////////////////////////////////////////////////// @@ -91,7 +92,7 @@ } // Print to log - sprintf(msgBuf.data(), + sprintf_s(msgBuf.data(), msgBuf.size(), " %4s | %8s | %11d | %8d | %11d | %9d | %7s | %4d - %4d | %7d | %3s | %10d ", (i == 0 ? "AVC" : (i == 1 ? "SVC" : "HEVC")), accelType, @@ -146,7 +147,7 @@ } // Print to log - sprintf(msgBuf.data(), + sprintf_s(msgBuf.data(), msgBuf.size(), " %4s | %6s | %4dx%4d | %4dx%4d | %3s | %5d | %7s | %12s", (i == 0 ? "AVC" : (i == 1 ? "SVC" : "HEVC")), (j == 0 ? "Input" : "Output"),
View file
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
@@ -697,7 +697,6 @@ static const char* computeTypeToString[] = { "None", "OpenCL", - "DirectCompute", }; static const char* surfaceFormatToString[] = { "NV12",
View file
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
@@ -172,9 +172,9 @@ /// Preset list = obs_properties_add_list(props, AMF_H264SIMPLE_PRESET, obs_module_text(AMF_H264SIMPLE_PRESET), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); obs_property_list_add_int(list, "", -1); - obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_RECORDING), Preset_Recording); obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_TWITCH), Preset_Twitch); obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_YOUTUBE), Preset_YouTube); + obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_RECORDING), Preset_Recording); obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_HIGHQUALTIY), Preset_HighQuality); obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_INDISTINGUISHABLE), Preset_Indistinguishable); obs_property_list_add_int(list, obs_module_text(AMF_H264SIMPLE_PRESET_LOSSLESS), Preset_Lossless); @@ -367,23 +367,22 @@ bool Plugin::Interface::H264SimpleInterface::ui_modified(obs_properties_t *props, obs_property_t *, obs_data_t *data) { if (obs_data_get_int(data, AMF_H264SIMPLE_PRESET) != -1) { switch (obs_data_get_int(data, AMF_H264SIMPLE_PRESET)) { - case Preset_Recording: // Recording - obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 1); + case Preset_Twitch: // Twitch + obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 2); obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality); obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High); - obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel); - obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained); - obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0); + obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCEProfileLevel_41); + obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantBitrate); + obs_data_set_int(data, AMF_H264_QP_MINIMUM, 18); obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51); - obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000); - obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000); + obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 3000); obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false); - obs_data_set_int(data, AMF_H264_FILLERDATA, 0); + obs_data_set_int(data, AMF_H264_FILLERDATA, 1); obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0); // Advanced Properties - obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 3 : 0)); - obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 1 : 0)); + obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, 0); + obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, 0); obs_data_set_int(data, AMF_H264_QP_BPICTURE_DELTA, 0); obs_data_set_int(data, AMF_H264_QP_REFERENCE_BPICTURE_DELTA, 0); obs_data_set_int(data, AMF_H264_DEBLOCKINGFILTER, 1); @@ -393,7 +392,8 @@ obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_GOP_SIZE, false); obs_data_set_int(data, AMF_H264_CABAC, -1); break; - case Preset_Twitch: // Twitch + case Preset_YouTube: // YouTube + // Basic Properties obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 2); obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality); obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High); @@ -401,7 +401,7 @@ obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantBitrate); obs_data_set_int(data, AMF_H264_QP_MINIMUM, 18); obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51); - obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 3000); + obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 6000); obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false); obs_data_set_int(data, AMF_H264_FILLERDATA, 1); obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0); @@ -418,23 +418,23 @@ obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_GOP_SIZE, false); obs_data_set_int(data, AMF_H264_CABAC, -1); break; - case Preset_YouTube: // YouTube - // Basic Properties - obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 2); + case Preset_Recording: // Recording + obs_data_set_int(data, AMF_H264SIMPLE_KEYFRAME_INTERVAL, 1); obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality); obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High); - obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCEProfileLevel_41); - obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantBitrate); - obs_data_set_int(data, AMF_H264_QP_MINIMUM, 18); + obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel); + obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained); + obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0); obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51); - obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 6000); + obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000); + obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000); obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false); - obs_data_set_int(data, AMF_H264_FILLERDATA, 1); - obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0); + obs_data_set_int(data, AMF_H264_FILLERDATA, 0); + obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 1); // Advanced Properties - obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, 0); - obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, 0); + obs_data_set_int(data, AMF_H264_BPICTURE_PATTERN, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 3 : 0)); + obs_data_set_int(data, AMF_H264_BPICTURE_REFERENCE, (VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->supportsBFrames ? 1 : 0)); obs_data_set_int(data, AMF_H264_QP_BPICTURE_DELTA, 0); obs_data_set_int(data, AMF_H264_QP_REFERENCE_BPICTURE_DELTA, 0); obs_data_set_int(data, AMF_H264_DEBLOCKINGFILTER, 1); @@ -450,11 +450,14 @@ obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality); obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High); obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel); - obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained); + obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantQP); obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0); obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51); + obs_data_set_int(data, AMF_H264_QP_IFRAME, 16); + obs_data_set_int(data, AMF_H264_QP_PFRAME, 19); + obs_data_set_int(data, AMF_H264_QP_BFRAME, 21); obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000); - obs_data_set_int(data, AMF_H264_BITRATE_PEAK, 20000); + obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000); obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false); obs_data_set_int(data, AMF_H264_FILLERDATA, 0); obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0); @@ -477,11 +480,14 @@ obs_data_set_int(data, AMF_H264_QUALITY_PRESET, VCEQualityPreset_Quality); obs_data_set_int(data, AMF_H264_PROFILE, VCEProfile_High); obs_data_set_int(data, AMF_H264_PROFILELEVEL, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxProfileLevel); - obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_VariableBitrate_LatencyConstrained); + obs_data_set_int(data, AMF_H264_RATECONTROLMETHOD, VCERateControlMethod_ConstantQP); obs_data_set_int(data, AMF_H264_QP_MINIMUM, 0); - obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 21); + obs_data_set_int(data, AMF_H264_QP_MAXIMUM, 51); + obs_data_set_int(data, AMF_H264_QP_IFRAME, 11); + obs_data_set_int(data, AMF_H264_QP_PFRAME, 14); + obs_data_set_int(data, AMF_H264_QP_BFRAME, 16); obs_data_set_int(data, AMF_H264_BITRATE_TARGET, 10000); - obs_data_set_int(data, AMF_H264_BITRATE_PEAK, 50000); + obs_data_set_int(data, AMF_H264_BITRATE_PEAK, VCECapabilities::GetInstance()->GetEncoderCaps(VCEEncoderType_AVC)->maxBitrate / 1000); obs_data_set_bool(data, AMF_H264SIMPLE_USE_CUSTOM_BUFFER_SIZE, false); obs_data_set_int(data, AMF_H264_FILLERDATA, 0); obs_data_set_int(data, AMF_H264_FRAMESKIPPING, 0); @@ -530,7 +536,7 @@ obs_data_set_int(data, AMF_H264_CABAC, -1); break; } - obs_data_set_int(data, AMF_H264SIMPLE_PRESET, -1); + //obs_data_set_int(data, AMF_H264SIMPLE_PRESET, -1); } { // Rate Control Settings @@ -621,6 +627,8 @@ } } +#pragma warning( push ) +#pragma warning( disable: 4702 ) void Plugin::Interface::H264SimpleInterface::destroy(void* data) { try { delete (static_cast<Plugin::Interface::H264SimpleInterface*>(data)); @@ -629,14 +637,19 @@ AMF_LOG_ERROR("Unable to destroy Encoder, see log for more information."); } } +#pragma warning( pop ) +#pragma warning( push ) +#pragma warning( disable: 4702 ) bool Plugin::Interface::H264SimpleInterface::update(void *data, obs_data_t *settings) { try { return static_cast<Plugin::Interface::H264SimpleInterface*>(data)->update(settings); } catch (...) { AMF_LOG_ERROR("Unable to update Encoder, see log for more information."); + return false; } } +#pragma warning( pop ) bool Plugin::Interface::H264SimpleInterface::encode(void *data, struct encoder_frame * frame, struct encoder_packet * packet, bool * received_packet) { try { @@ -950,10 +963,13 @@ AMF_LOG_INFO("<AMFEncoder::H264SimpleInterface::~H264SimpleInterface> Complete."); } +#pragma warning( push ) +#pragma warning( disable: 4100 ) bool Plugin::Interface::H264SimpleInterface::update(obs_data_t* settings) { // settings is not flagged as a unused here, since a future update may add support for this. return false; } +#pragma warning( pop ) bool Plugin::Interface::H264SimpleInterface::encode(struct encoder_frame * frame, struct encoder_packet * packet, bool * received_packet) { bool retVal = true;
View file
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
@@ -102,6 +102,8 @@ } } +#pragma warning( push ) +#pragma warning( disable: 4702 ) void Plugin::Interface::H264Interface::destroy(void* data) { try { Plugin::Interface::H264Interface* enc = static_cast<Plugin::Interface::H264Interface*>(data); @@ -111,6 +113,7 @@ AMF_LOG_ERROR("Unable to destroy Encoder, see log for more information."); } } +#pragma warning( pop ) bool Plugin::Interface::H264Interface::encode(void *data, struct encoder_frame *frame, struct encoder_packet *packet, bool *received_packet) { try { @@ -656,6 +659,7 @@ return static_cast<Plugin::Interface::H264Interface*>(data)->update(settings); } catch (...) { AMF_LOG_ERROR("Unable to update Encoder, see log for more information."); + return false; } }
View file
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
@@ -102,7 +102,7 @@ <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> - <PreprocessorDefinitions>DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <EnableCOMDATFolding>false</EnableCOMDATFolding> @@ -114,7 +114,7 @@ <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> - <PreprocessorDefinitions>DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DEBUG;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <EnableCOMDATFolding>false</EnableCOMDATFolding> @@ -127,7 +127,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FloatingPointModel>Fast</FloatingPointModel> - <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FunctionLevelLinking>false</FunctionLevelLinking> <FloatingPointExceptions>false</FloatingPointExceptions> @@ -151,7 +151,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FloatingPointModel>Fast</FloatingPointModel> - <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FunctionLevelLinking>false</FunctionLevelLinking> <FloatingPointExceptions>false</FloatingPointExceptions>
View file
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
@@ -54,6 +54,7 @@ int height; bool first_packet; + bool initialized; }; static const char *nvenc_getname(void *unused) @@ -113,6 +114,8 @@ return false; } + enc->initialized = true; + *((AVPicture*)enc->vframe) = enc->dst_picture; return true; } @@ -233,15 +236,19 @@ static void nvenc_destroy(void *data) { struct nvenc_encoder *enc = data; - AVPacket pkt = {0}; - int r_pkt = 1; - while (r_pkt) { - if (avcodec_encode_video2(enc->context, &pkt, NULL, &r_pkt) < 0) - break; + if (enc->initialized) { + AVPacket pkt = {0}; + int r_pkt = 1; + + while (r_pkt) { + if (avcodec_encode_video2(enc->context, &pkt, NULL, + &r_pkt) < 0) + break; - if (r_pkt) - av_free_packet(&pkt); + if (r_pkt) + av_free_packet(&pkt); + } } avcodec_close(enc->context);
View file
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
@@ -7,6 +7,10 @@ Filter.AllFiles="All Files" Color="Color" Opacity="Opacity" +Gradient="Gradient" +Gradient.Color="Gradient Color" +Gradient.Opacity="Gradient Opacity" +Gradient.Direction="Gradient Direction" BkColor="Background Color" BkOpacity="Background Opacity" Alignment="Alignment"
View file
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
@@ -42,6 +42,10 @@ #define S_FILE "file" #define S_TEXT "text" #define S_COLOR "color" +#define S_GRADIENT "gradient" +#define S_GRADIENT_COLOR "gradient_color" +#define S_GRADIENT_DIR "gradient_dir" +#define S_GRADIENT_OPACITY "gradient_opacity" #define S_ALIGN "align" #define S_VALIGN "valign" #define S_OPACITY "opacity" @@ -73,6 +77,10 @@ #define T_FILE T_("TextFile") #define T_TEXT T_("Text") #define T_COLOR T_("Color") +#define T_GRADIENT T_("Gradient") +#define T_GRADIENT_COLOR T_("Gradient.Color") +#define T_GRADIENT_DIR T_("Gradient.Direction") +#define T_GRADIENT_OPACITY T_("Gradient.Opacity") #define T_ALIGN T_("Alignment") #define T_VALIGN T_("VerticalAlignment") #define T_OPACITY T_("Opacity") @@ -195,11 +203,15 @@ wstring face; int face_size = 0; uint32_t color = 0xFFFFFF; + uint32_t color2 = 0xFFFFFF; + float gradient_dir = 0; uint32_t opacity = 100; + uint32_t opacity2 = 100; uint32_t bk_color = 0; uint32_t bk_opacity = 0; Align align = Align::Left; VAlign valign = VAlign::Top; + bool gradient = false; bool bold = false; bool italic = false; bool underline = false; @@ -515,7 +527,10 @@ bits.get()); Graphics graphics_bitmap(&bitmap); - SolidBrush brush(Color(get_alpha_val(opacity) | (color & 0xFFFFFF))); + LinearGradientBrush brush(RectF(0, 0, (float)size.cx, (float)size.cy), + Color(calc_color(color, opacity)), + Color(calc_color(color2, opacity2)), + gradient_dir, 1); DWORD full_bk_color = bk_color & 0xFFFFFF; if (!text.empty() || use_extents) @@ -625,6 +640,10 @@ const char *valign_str = obs_data_get_string(s, S_VALIGN); uint32_t new_color = obs_data_get_uint32(s, S_COLOR); uint32_t new_opacity = obs_data_get_uint32(s, S_OPACITY); + bool gradient = obs_data_get_bool(s, S_GRADIENT); + uint32_t new_color2 = obs_data_get_uint32(s, S_GRADIENT_COLOR); + uint32_t new_opacity2 = obs_data_get_uint32(s, S_GRADIENT_OPACITY); + float new_grad_dir = (float)obs_data_get_double(s, S_GRADIENT_DIR); bool new_vertical = obs_data_get_bool(s, S_VERTICAL); bool new_outline = obs_data_get_bool(s, S_OUTLINE); uint32_t new_o_color = obs_data_get_uint32(s, S_OUTLINE_COLOR); @@ -674,11 +693,15 @@ /* ----------------------------- */ new_color = rgb_to_bgr(new_color); + new_color2 = rgb_to_bgr(new_color2); new_o_color = rgb_to_bgr(new_o_color); new_bk_color = rgb_to_bgr(new_bk_color); color = new_color; opacity = new_opacity; + color2 = new_color2; + opacity2 = new_opacity2; + gradient_dir = new_grad_dir; vertical = new_vertical; bk_color = new_bk_color; @@ -688,6 +711,11 @@ extents_cx = n_extents_cx; extents_cy = n_extents_cy; + if (!gradient) { + color2 = color; + opacity2 = opacity; + } + read_from_file = new_use_file; chatlog_mode = new_chat_mode; @@ -807,6 +835,17 @@ return true; } +static bool gradient_changed(obs_properties_t *props, obs_property_t *p, + obs_data_t *s) +{ + bool gradient = obs_data_get_bool(s, S_GRADIENT); + + set_vis(gradient, S_GRADIENT_COLOR, true); + set_vis(gradient, S_GRADIENT_OPACITY, true); + set_vis(gradient, S_GRADIENT_DIR, true); + return true; +} + static bool extents_modified(obs_properties_t *props, obs_property_t *p, obs_data_t *s) { @@ -855,8 +894,16 @@ obs_properties_add_bool(props, S_VERTICAL, T_VERTICAL); obs_properties_add_color(props, S_COLOR, T_COLOR); - obs_properties_add_int_slider(props, S_OPACITY, T_OPACITY, 0, 100, 1); + + p = obs_properties_add_bool(props, S_GRADIENT, T_GRADIENT); + obs_property_set_modified_callback(p, gradient_changed); + + obs_properties_add_color(props, S_GRADIENT_COLOR, T_GRADIENT_COLOR); + obs_properties_add_int_slider(props, S_GRADIENT_OPACITY, + T_GRADIENT_OPACITY, 0, 100, 1); + obs_properties_add_float_slider(props, S_GRADIENT_DIR, + T_GRADIENT_DIR, 0, 360, 0.1); obs_properties_add_color(props, S_BKCOLOR, T_BKCOLOR); obs_properties_add_int_slider(props, S_BKOPACITY, T_BKOPACITY, @@ -937,6 +984,9 @@ obs_data_set_default_string(settings, S_VALIGN, S_VALIGN_TOP); obs_data_set_default_int(settings, S_COLOR, 0xFFFFFF); obs_data_set_default_int(settings, S_OPACITY, 100); + obs_data_set_default_int(settings, S_GRADIENT_COLOR, 0xFFFFFF); + obs_data_set_default_int(settings, S_GRADIENT_OPACITY, 100); + obs_data_set_default_double(settings, S_GRADIENT_DIR, 90.0); obs_data_set_default_int(settings, S_BKCOLOR, 0x000000); obs_data_set_default_int(settings, S_BKOPACITY, 0); obs_data_set_default_int(settings, S_OUTLINE_SIZE, 2);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.