Skip to content

Commit

Permalink
Merge pull request obsproject#103 from amazon-contributing/ruwen/inte…
Browse files Browse the repository at this point in the history
…grate-upstream-feedback

Integrate upstream feedback
  • Loading branch information
palana committed Nov 27, 2023
2 parents 8e53954 + cd33fc3 commit d620759
Show file tree
Hide file tree
Showing 28 changed files with 42 additions and 71 deletions.
10 changes: 5 additions & 5 deletions UI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ target_sources(
goliveapi-postdata.cpp
goliveapi-postdata.hpp
immutable-date-time.cpp
immutable-date-time.h
immutable-date-time.hpp
ivs-events.cpp
ivs-events.h
ivs-events.hpp
presentmon-csv-capture.cpp
presentmon-csv-capture.hpp
presentmon-csv-parser.cpp
presentmon-csv-parser.hpp
simulcast-error.cpp
simulcast-error.h
simulcast-error.hpp
simulcast-output.cpp
simulcast-output.h
system-info.h)
simulcast-output.hpp
system-info.hpp)

if(OS_WINDOWS)
include(cmake/os-windows.cmake)
Expand Down
2 changes: 1 addition & 1 deletion UI/berryessa-every-minute.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include "berryessa-submitter.hpp"
#include "berryessa-every-minute.hpp"
#include "immutable-date-time.h"
#include "immutable-date-time.hpp"
#include "presentmon-csv-capture.hpp"

#include <util/dstr.hpp>
Expand Down
2 changes: 1 addition & 1 deletion UI/berryessa-every-minute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "presentmon-csv-capture.hpp"
#ifdef _WIN32
#include "wmi-data-provider.h"
#include "wmi-data-provider.hpp"
#endif

#include <util/platform.h>
Expand Down
10 changes: 5 additions & 5 deletions UI/cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -295,18 +295,18 @@ target_sources(
goliveapi-postdata.cpp
goliveapi-postdata.hpp
immutable-date-time.cpp
immutable-date-time.h
immutable-date-time.hpp
ivs-events.cpp
ivs-events.h
ivs-events.hpp
presentmon-csv-capture.cpp
presentmon-csv-capture.hpp
presentmon-csv-parser.cpp
presentmon-csv-parser.hpp
simulcast-error.cpp
simulcast-error.h
simulcast-error.hpp
simulcast-output.cpp
simulcast-output.h
system-info.h)
simulcast-output.hpp
system-info.hpp)

target_sources(obs PRIVATE importers/importers.cpp importers/importers.hpp importers/classic.cpp importers/sl.cpp
importers/studio.cpp importers/xsplit.cpp)
Expand Down
2 changes: 1 addition & 1 deletion UI/cmake/os-windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ target_sources(
update/models/whatsnew.hpp
win-update/updater/manifest.hpp)

target_sources(obs-studio PRIVATE system-info-windows.cpp wmi-data-provider.h wmi-data-provider.cpp)
target_sources(obs-studio PRIVATE system-info-windows.cpp wmi-data-provider.hpp wmi-data-provider.cpp)

target_link_libraries(obs-studio PRIVATE crypt32 OBS::blake2 OBS::w32-pthreads MbedTLS::MbedTLS
nlohmann_json::nlohmann_json Detours::Detours)
Expand Down
2 changes: 1 addition & 1 deletion UI/data/locale/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ FailedToStartStream.CustomConfigURLInvalidConfig="Custom config URL returned inv
FailedToStartStream.GoLiveConfigInvalid="API returned invalid config; try again later"
FailedToStartStream.FailedToCreateSimulcastService="Failed to create simulcast service"
FailedToStartStream.FailedToCreateSimulcastOutput="Failed to create simulcast rtmp output"
FailedToStartStream.EncoderNotAvailble="NVENC not available.\n\nFailed to find encoder type '%1'"
FailedToStartStream.EncoderNotAvailable="NVENC not available.\n\nFailed to find encoder type '%1'"
FailedToStartStream.FailedToCreateVideoEncoder="Failed to create video encoder '%1' (type: '%2')"
FailedToStartStream.FailedToGetOBSVideoInfo="Failed to get obs video info while creating encoder '%1' (type: '%2')"
FailedToStartStream.FailedToCreateAudioEncoder="Failed to create audio encoder"
Expand Down
2 changes: 1 addition & 1 deletion UI/goliveapi-network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <obs.hpp>
#include <obs-app.hpp>
#include <remote-text.hpp>
#include "simulcast-error.h"
#include "simulcast-error.hpp"

#include <qstring.h>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions UI/goliveapi-postdata.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "goliveapi-postdata.hpp"

#include "immutable-date-time.h"
#include "system-info.h"
#include "immutable-date-time.hpp"
#include "system-info.hpp"

OBSDataAutoRelease
constructGoLivePost(const ImmutableDateTime &attempt_start_time,
Expand Down
2 changes: 1 addition & 1 deletion UI/immutable-date-time.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "immutable-date-time.h"
#include "immutable-date-time.hpp"

ImmutableDateTime::ImmutableDateTime(QDateTime date_time)
: date_time(date_time),
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions UI/ivs-events.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "ivs-events.h"
#include "ivs-events.hpp"

#include "immutable-date-time.h"
#include "immutable-date-time.hpp"

OBSDataAutoRelease MakeEvent_ivs_obs_stream_start(
obs_data_t *postData, obs_data_t *goLiveConfig,
Expand Down
2 changes: 1 addition & 1 deletion UI/ivs-events.h → UI/ivs-events.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <optional>

#include "immutable-date-time.h"
#include "immutable-date-time.hpp"

OBSDataAutoRelease MakeEvent_ivs_obs_stream_start(
obs_data_t *postData, obs_data_t *goLiveConfig,
Expand Down
2 changes: 1 addition & 1 deletion UI/simulcast-error.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "simulcast-error.h"
#include "simulcast-error.hpp"

#include <QMessageBox>
#include "obs-app.hpp"
Expand Down
File renamed without changes.
10 changes: 6 additions & 4 deletions UI/simulcast-output.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "simulcast-output.h"
#include "simulcast-output.hpp"

#include <util/dstr.hpp>
#include <util/platform.h>
Expand All @@ -23,11 +23,11 @@
#include <QUrlQuery>
#include <QUuid>

#include "system-info.h"
#include "system-info.hpp"
#include "goliveapi-postdata.hpp"
#include "goliveapi-network.hpp"
#include "ivs-events.h"
#include "simulcast-error.h"
#include "ivs-events.hpp"
#include "simulcast-error.hpp"

bool SimulcastDeveloperModeEnabled()
{
Expand Down Expand Up @@ -211,10 +211,12 @@ static OBSOutputAutoRelease create_output(bool use_ertmp_multitrack)
static OBSOutputAutoRelease create_recording_output(bool use_ertmp_multitrack)
{
OBSDataAutoRelease settings = obs_data_create();
#if 0
obs_data_set_string(settings, "path",
GetOutputFilename(system_video_save_path(),
"%CCYY-%MM-%DD_%hh-%mm-%ss")
.c_str());
#endif
obs_data_set_bool(settings, "ertmp_multitrack", use_ertmp_multitrack);

OBSOutputAutoRelease output = obs_output_create(
Expand Down
2 changes: 1 addition & 1 deletion UI/simulcast-output.h → UI/simulcast-output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define NOMINMAX

#include "immutable-date-time.h"
#include "immutable-date-time.hpp"

#include "berryessa-submitter.hpp"
#include "berryessa-every-minute.hpp"
Expand Down
14 changes: 1 addition & 13 deletions UI/system-info-macos.mm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "system-info.h"
#include "system-info.hpp"

#import <Foundation/Foundation.h>

Expand All @@ -11,15 +11,3 @@ OBSDataAutoRelease system_info()
{
return nullptr;
}

std::string system_video_save_path()
{
NSFileManager *fm = [NSFileManager defaultManager];
NSURL *url = [fm URLForDirectory:NSMoviesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:true
error:nil];

if (!url)
return getenv("HOME");

return url.path.fileSystemRepresentation;
}
7 changes: 1 addition & 6 deletions UI/system-info-posix.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "system-info.h"
#include "system-info.hpp"

OBSDataArrayAutoRelease system_gpu_data()
{
Expand All @@ -9,8 +9,3 @@ OBSDataAutoRelease system_info()
{
return nullptr;
}

std::string system_video_save_path()
{
return std::string(getenv("HOME"));
}
14 changes: 1 addition & 13 deletions UI/system-info-windows.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "system-info.h"
#include "system-info.hpp"

#include <dxgi.h>
#include <cinttypes>
Expand Down Expand Up @@ -273,15 +273,3 @@ OBSDataAutoRelease system_info()

return data;
}

std::string system_video_save_path()
{
wchar_t path_utf16[MAX_PATH];
char path_utf8[MAX_PATH] = {};

SHGetFolderPathW(NULL, CSIDL_MYVIDEO, NULL, SHGFP_TYPE_CURRENT,
path_utf16);

os_wcs_to_utf8(path_utf16, wcslen(path_utf16), path_utf8, MAX_PATH);
return std::string(path_utf8);
}
1 change: 0 additions & 1 deletion UI/system-info.h → UI/system-info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@

OBSDataArrayAutoRelease system_gpu_data();
OBSDataAutoRelease system_info();
std::string system_video_save_path();
4 changes: 2 additions & 2 deletions UI/window-basic-auto-config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include "goliveapi-postdata.hpp"
#include "goliveapi-network.hpp"
#include "immutable-date-time.h"
#include "simulcast-error.h"
#include "immutable-date-time.hpp"
#include "simulcast-error.hpp"

#include "ui_AutoConfigStartPage.h"
#include "ui_AutoConfigVideoPage.h"
Expand Down
2 changes: 1 addition & 1 deletion UI/window-basic-main-outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QMessageBox>
#include "qt-wrappers.hpp"
#include "audio-encoders.hpp"
#include "simulcast-error.h"
#include "simulcast-error.hpp"
#include "window-basic-main.hpp"
#include "window-basic-main-outputs.hpp"
#include "window-basic-vcam-config.hpp"
Expand Down
2 changes: 1 addition & 1 deletion UI/window-basic-main-outputs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <memory>
#include <string>

#include "simulcast-output.h"
#include "simulcast-output.hpp"

class OBSBasic;

Expand Down
3 changes: 0 additions & 3 deletions UI/window-basic-settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6259,9 +6259,6 @@ void OBSBasicSettings::UpdateSimulcasting()
ui->simulcastInfo->setText(
QTStr("Simulcast.InfoTest")
.arg(ui->service->currentText()));
ui->enableSimulcast->setText(
QTStr("Basic.Settings.Stream.EnableSimulcast")
.arg(ui->service->currentText()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion UI/wmi-data-provider.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "wmi-data-provider.h"
#include "wmi-data-provider.hpp"

#include <obs.hpp>
#include <util/platform.h>
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion libobs/obs-output.c
Original file line number Diff line number Diff line change
Expand Up @@ -2034,14 +2034,16 @@ check_encoder_group_keyframe_alignment(obs_output_t *output,

if (data->dts_usec < packet->dts_usec) {
if (data->seen_on_track[packet->track_idx] ==
KEYFRAME_TRACK_STATUS_NOT_SEEN)
KEYFRAME_TRACK_STATUS_NOT_SEEN) {
blog(LOG_WARNING,
"obs-output '%s': Missing keyframe with dts_usec %" PRIi64
" for encoder '%s' (track: %zu)",
obs_output_get_name(output),
data->dts_usec,
obs_encoder_get_name(packet->encoder),
packet->track_idx);
}

data->seen_on_track[packet->track_idx] =
KEYFRAME_TRACK_STATUS_SKIPPED;

Expand Down
4 changes: 2 additions & 2 deletions plugins/obs-outputs/rtmp-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ static inline bool send_headers(struct rtmp_stream *stream)

if (!send_audio_header(stream, 0, &next_audio))
return false;
if (!send_video_header(stream, 0, &next_video) &&
if (!send_video_header(stream, 0, &next_video) ||
!send_video_metadata(stream, 0))
return false;

Expand All @@ -1010,7 +1010,7 @@ static inline bool send_headers(struct rtmp_stream *stream)

i = 1;
while (next_video) {
if (!send_video_header(stream, i++, &next_video) &&
if (!send_video_header(stream, i++, &next_video) ||
!send_video_metadata(stream, i))
return false;
}
Expand Down

0 comments on commit d620759

Please sign in to comment.