-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial recorder bug fix + app version included in logs / titlebar #102
Conversation
I think there might be a better way to fix the issue of this +/- 1 pixel thing due to the scaling; someone said somewhere on the Internet that you could simply use |
* feb22 backup * fix playerCombatant bug
* Cleanup application status values and logic - Create an enum for the application status values in a new module, `main/types`. - Replace `if..else` with an object of messages mapped to the new `AppStatus` enums. * Address comments in PR aza547#104
I think this is what @NickIs211 initially suggested in discord and I steered away from it. Might have been right all along. Not had a chance to look over this beyond the comments yet so not sure of my opinion. Will get a chance at the weekend. |
Add `enum UnitFlag` to types for easier identification of the various flags that a unit can have. Add `isUnitPlayer()` to easier identify a player controlled unit. Refactor `isUnitSelf()` to make use of `isUnitPlayer()` and `UnitFlags`.
* Remember volume and mute state when changing video * Avoid re-render when not needed We don't need to use `useState()` for reading and storing the current settings of the video player, only during the `useEffect()` call when `state.videoIndex` changes as the current state is being passed to `useState()` when the video changes in `handleChangeVideo()`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the PR, sorry for taking so long to get to it (and I've still only had a second glance). There is a bunch of changes here that I think are due to other PRs. Could you catch up with main by either merging it in or rebasing please?
I've quickly checked the version stuff which is awesome, curious why I see 18.0.3 on dev builds? You mentioned in comments that it works fine for release builds. Why the difference? I searched the repo for 18.0.3 and couldn't find a reference to it! Where is it coming from?
I've not managed to review the OBS bits as I'm not awake enough, but I promise I'll get to them soon!
…za547#106) * Fix problem with `maxSplits` in `splitLogLine()` `break` wasn't breaking out of both the `switch` and the `for` blocks, which is should have, causing us to not limit the number of splits we did but also to split incorrectly as `value` wasn't cleared before starting the next element value. * Fix off-by-one for month in `LogLine`date()` `Date.getMonth()` returns a zero based month number, with January being 0 and December being 11. This caused months to be off-by-one during parsing into a proper date.
* Refactor `categories` to be an enum type * Address comments in PR aza547#109
* Initial attempt at adding min encounter duration * Add default minimum encounter duration setting * Clean up syntax / formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, happy enough with the function, but a few code style comments for you to fix up. Thanks!
return isClose(parseInt(resW, 10), physicalWidth) && isClose(parseInt(resH, 10), physicalHeight); | ||
}; | ||
|
||
// TODO: Output should eventually be moved into a setting field to be scaled down. For now it matches the monitor resolution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this information come from? It's news to me - I'm quite keen to understand OBS better so if you have knowledge please share!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Video.Base translates to Base Canvas Resolution, which is the size of the scene we are creating. For current purposes, this should always match monitor resolution.
Video.Output translates to Output Resolution, which is the video resolution we're recording at. For users where storage space is a concern, they should be able to change the output resolution to a size that they find acceptable, say 720p. Currently, with this setup, users with 4k monitors will record at 4k.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. That's interesting for #67 if you fancy tackling another issue after!
@aza547 code refactored based on comments above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. This looks good, with the only problem being I'm not sure what happens if I try to merge this given the massive "files changed" page. I'm not good enough with git to know how to resolve (thought merge / rebase would do it) - can you either fix that via some git means (if you are better with it than me!) or re-create the PR so it's got a clean diff? Then I'm happy to merge!
return isClose(parseInt(resW, 10), physicalWidth) && isClose(parseInt(resH, 10), physicalHeight); | ||
}; | ||
|
||
// TODO: Output should eventually be moved into a setting field to be scaled down. For now it matches the monitor resolution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. That's interesting for #67 if you fancy tackling another issue after!
// Update source settings: | ||
let settings = videoSource.settings; | ||
settings['monitor'] = monitorIndexFromZero; | ||
settings['width'] = physicalWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these doing anything at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They weren't being respected when creating anything really, and looking at
https://github.com/stream-labs/obs-studio-node/blob/5e22aaa87103ddc4f234d6b0f73d173e9b76b507/tests/osn-tests/util/input_settings.ts#L106
https://github.com/stream-labs/obs-studio-node/blob/d048994aac4c3988e5f300d835feabdf8e57a3df/tests/osn-tests/src/test_osn_input.ts#L134
They don't seem to be used properties during osn testing. Also couldn't find the related fields in the libobs docs.
Also in the new PR, please add a changelog fixed entry linked to #96. |
Should be all good now. I initially merged main branch instead of bug-fixes ;;;;;; |
Hmm I still see 22 files changed (and lots of stuff from other commits). I think I was expecting merging main to be the correct thing to do (I'm not sure what bug-fixes is/was). |
965cf88
to
93af6e0
Compare
No description provided.