Skip to content

Conversation

@utkarshdalal
Copy link
Contributor

@utkarshdalal utkarshdalal commented Jul 23, 2023

Description

Added a parameter for max bitrate to the web UI, config file and video.cpp. Additionally, made some small changes to fix CI deployment script for Windows - renamed a conflicting parameter.

Screenshot

image

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@github-actions github-actions bot changed the base branch from master to nightly July 23, 2023 12:00
@github-actions
Copy link

Your PR was set to master, PRs should be sent to nightly.
The base branch of this PR has been automatically changed to nightly.
Please check that there are no merge conflicts

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I have some changes to request. In addition to the other comments, we also need to update the advanced usage section of the docs.


extern "C" {
constexpr auto DNS_REQUEST_PENDING = 9506L;
constexpr auto MY_DNS_REQUEST_PENDING = 9506L;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really name variables "my_variable".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the change I had to make for the CI, it was failing with this error otherwise - https://github.com/utkarshdalal/Sunshine-GameAway/actions/runs/5632865670/job/15261219026. Screenshot below.
image

I can name it something else also if you like, but this variable name was conflicting with a reserved variable name.

@ReenigneArcher
Copy link
Member

Also, there was no change to the CI. Guessing you were working off the master branch, and fixed something we already fixed in nightly?

Utkarsh Dalal added 2 commits July 24, 2023 22:33
# Conflicts:
#	src/platform/windows/publish.cpp
#	src_assets/common/assets/web/config.html
@utkarshdalal
Copy link
Contributor Author

@ReenigneArcher The PR is updated, the only thing that I didn't change was renaming the variable to DNS_REQUEST_PENDING from MY_DNS_REQUEST_PENDING. As I mentioned in the comment, doing this made my Windows build fail. Does this work for you? If so I can change it but I think renaming the variable is necessary.

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few more requested changes.

Regarding the variable, I think it should be changed back. I'm a bit confused why it failed for you as we have many builds going daily and not had any failures from this recently. My first inclination is that this was something that we fixed a while back in the nightly branch, but you were working from the master branch, so didn't have our fixes. (@cgutman thoughts?)

}, // supported resolutions

{ 10, 30, 60, 90, 120 }, // supported fps
0, // max bitrate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
0, // max bitrate
0, // max bitrate

2 spaces (linting rules)

v-model="config.max_bitrate"
/>
<div class="form-text">
Maximum bitrate for streaming in Kbps. If not specified, the default bitrate is used
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Maximum bitrate for streaming in Kbps. If not specified, the default bitrate is used
Maximum bitrate for streaming in Kbps.

We always use the default value if not specified (or if the value provided by the user is outside an acceptable range). Actually we should probably enforce a max value for the setting.

list_string_f(vars, "resolutions"s, nvhttp.resolutions);
list_int_f(vars, "fps"s, nvhttp.fps);
list_prep_cmd_f(vars, "global_prep_cmd", config::sunshine.prep_cmds);
int_f(vars, "max_bitrate", nvhttp.max_bitrate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int_f(vars, "max_bitrate", nvhttp.max_bitrate);
int_between_f(vars, "max_bitrate", nvhttp.max_bitrate, { 0, 150000 });

@utkarshdalal
Copy link
Contributor Author

@ReenigneArcher I've addressed all your comments including renaming the variable. Maybe you haven't seen it break because the action (Windows Build) only runs when pushing to the master branch. Anyway, whenever you want to make a new version, if it breaks changing the name of this variable is the fix.

@ReenigneArcher
Copy link
Member

It runs all all PRs, as well as push events to nightly and master branches.

@ReenigneArcher

This comment was marked as resolved.

@utkarshdalal
Copy link
Contributor Author

@ReenigneArcher signed.

@ReenigneArcher ReenigneArcher requested a review from cgutman July 29, 2023 20:38
Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found an additional item to change. Placeholder should be the default value.

type="number"
class="form-control"
id="max_bitrate"
placeholder="5000"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
placeholder="5000"
placeholder="0"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's done, sorry for the delay I missed the notification.

# Conflicts:
#	docs/source/about/advanced_usage.rst
ReenigneArcher
ReenigneArcher previously approved these changes Sep 13, 2023
@ReenigneArcher ReenigneArcher changed the title Add max bitrate option in Sunshine UI Add max bitrate option Oct 7, 2023
@utkarshdalal
Copy link
Contributor Author

Anything remaining to be done on this issue?

@ReenigneArcher
Copy link
Member

Anything remaining to be done on this issue?

Agreement from other team members to merge this.

@ReenigneArcher ReenigneArcher requested review from cgutman and removed request for cgutman and ns6089 January 1, 2024 03:18
@LizardByte-bot
Copy link
Member

It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!

@utkarshdalal
Copy link
Contributor Author

utkarshdalal commented Mar 31, 2024 via email

@ReenigneArcher
Copy link
Member

@utkarshdalal I apologize, but at this time our team doesn't feel that this feature would be valuable to Sunshine. We can possibly revisit it in the future if there is more interest from users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants