-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add support for streaming profiles #119
Conversation
Yeah, looks good. Obviously the new setting heavily interferes with #116... |
Hi, I ll take a look thx! |
ea4f625
to
e268f7b
Compare
@TheTroll can you test? |
Hi, I will before the end of the week. |
No problem, I'll test again when I get home (just checking that the rebase went well). @ksooo @Glenn-1990 we should refactor |
a7d3ff3
to
36973b4
Compare
void SendSubscribe(uint32_t channelId = 0, | ||
uint32_t weight = SUBSCRIPTION_WEIGHT_NORMAL, | ||
const std::string &profile = "", | ||
bool restart = false); | ||
|
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.
Is it possible to change the profile on run-time?
Otherwise we could just pass the profile with the constructor, that will make all this profile passing unnecessary?
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.
Technically it should be but currently no since an addon restart is triggered if you change the setting. I'm perfectly fine with requiring a restart and feeding the desired profile through the constructor instead, anything to keep the parameter count on this method down is good in by book. @ksooo thoughts?
@ksooo I had to move the logic that queries for available profiles to Will do some final runtime testing when I get home, then I'll merge and update the changelog etc. |
{ | ||
XBMC->QueueNotification( | ||
QUEUE_ERROR, | ||
XBMC->GetLocalizedString(30502), streamingProfile.c_str()); |
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.
This error is shown when I didn't set any streaming profile?
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.
Haha could be that I didn't test that scenario yet :-D
It's probably a silly question, but why do wee need this, we can set the desired streaming profile in the tvheadend config right? |
I'm thinking that we can provide different profiles for end-users, and they can choose the profile that fits their current scenario? For example, if the user is in a place with low bandwidth, he can select a profile with heavy transcoding to save bandwidth. |
@Glenn-1990 see #40, there are a few reasonable use cases for this (especially the one about recordings) |
41b586e
to
3b7782b
Compare
@Glenn-1990 you mind giving this a final spin (mainly to check that untouched configurations still work)? @ksooo I squashed the latest fixups, mind doing a final review before merging? |
@@ -15,6 +15,9 @@ | |||
<setting id="autorec_approxtime" type="enum" label="30051" lvalues="30052|30053" default="0"/> | |||
<setting id="autorec_maxdiff" enable="eq(-1,1)" type="slider" option="int" range="0,5,120" label="30054" default="15" /> | |||
|
|||
<setting label="30500" type="lsep"/> | |||
<setting id="streaming_profile" type="text" label="30501" default="" /> | |||
|
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.
I have the feeling that our "Advanced settings" page becomes to big. Is it just me or should we do a settings pages redesign soon?
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.
@Glenn-1990 already refactored it, but yeah, we may need an additional tab. I'd leave that to a separate PR though.
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.
Sure, nothing for this PR. Maybe you can file an issue for that so we don't forget.
@Jalle19 working now with default config ;-) |
Good, I'll just have to plug the leaks then and we should be good to go. |
display an error notification during startup if the specified profile name is not valid
3b7782b
to
a850428
Compare
Add support for streaming profiles
Hi, I have moved to 15.2 and pvr.hts master, is it the right combination to test the new feature ? Thanks |
You can't use pvr.hts master with 15.2, if you want to test this you should grab a nightly build. |
So master is meant to be for kodi master ? |
Yes, exactly. |
Let me check again :) |
Ok my bad, I was using the the isengard branch! |
Now it works thanks :) |
Because none of us have any idea how to use that and users are less likely to find it. |
Ok :) |
Nope. |
See #40
@ksooo for review. I've split the feature into three commits for easier review, we can squash it before merging if you want to.
I'm thinking whether we should add another boolean option to disable predictive tuning if a streaming profile is set. Having multiple transcoded subscriptions can easily overwhelm a low-powered server.
Since this touches settings I'd like to get #116 merged before this one. #79 would be nice to get in before as well since it refactors
Subscription
into a class (if the feature is not ready we could opt for just merging that particular part).@TheTroll can you test this?