Skip to content
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

Load channel settings properly when <cacheindvdplayer> is disabled #4333

Closed

Conversation

Jalle19
Copy link
Member

@Jalle19 Jalle19 commented Mar 5, 2014

There is currently a bug in XBMC which causes channel settings to not be loaded at all when pvr.cacheindvdplayer is disabled. The setting is used to dramatically speed up the time it takes to switch channels on backends with an internal demuxer. The problem is that the call to load the settings is done in a block that is never reached when the setting is disabled.

Because standard files and PVR channels work quite differently I've opted to contain loading/saving of channel settings in PVRManager. Currently they're loaded in Open/CloseLiveStream() and PerformChannelSwitch(). They were previously loaded in DVDPlayer and sometimes stored in Application in addition to whenever the current audio/video settings were changed.

I've also changed the Save/Load methods to take the channel in question as a parameter, this way it is easier to put the call in the proper location. It also alleviates the need to defer to PVRClients to handle the logic.

@opdenkamp @FernetMenta would be nice if you could chip in
@margro can you check for regressions with some backend other than tvheadend/vdr?

@Jalle19
Copy link
Member Author

Jalle19 commented Mar 11, 2014

@FernetMenta I removed the last commit (the one you commented on, naturally Github lost it...). Did you find the time to look at the rest of it? It would be nice to see this make it into Gotham, without this pvr.cacheindvdplayer is all but useless.

@xhaggi xhaggi added the PVR label Mar 12, 2014
@FernetMenta
Copy link
Contributor

I remember lots of trouble with those functions until we got it work for almost all scenarios. I assess the risk that something may break as relatively high. IMO we should rather prevent pvr.cacheindvdplayer from being disabled because it forces the system into an unstable state in which it is not supposed to run. When an audio stream is started AE fills the various buffers which in sum hold up to approximately 0.8 seconds of audio, If you reduce pvr caching from the default values those buffers never fill. It may work somehow but this is not the stable state.

Apart from this I agree that load/save of channel settings needs rework. G+1

@Jalle19
Copy link
Member Author

Jalle19 commented Mar 12, 2014

The only trouble has been that loading the settings has been done in the most non-obvious place available (HandlePlaySpeed). With these changes it is much more predictable.

I'd rather not see the advanced setting removed, it speeds up zapping considerably.

@FernetMenta
Copy link
Contributor

We have told you multiple times that your attempts to speed up channel switching sacrifice behavior we have implemented for good reasons. Fast channel changing is worth nothing if audio stalls some time later. Your changes my work somehow on you system but for sure won't work on every system. Removing the caching is no option.

@Jalle19
Copy link
Member Author

Jalle19 commented Mar 12, 2014

These changes don't remove the caching option (I closed that PR yesterday precisely because like you say it may have unintended consequences). I'm trying to make an optional (advanced) setting which disables it actually work, that's all.

@Jalle19
Copy link
Member Author

Jalle19 commented Mar 12, 2014

Anyway, if these changes don't cut it, do you have any suggestions on alternative ways of doing it?

@FernetMenta
Copy link
Contributor

I did not say the changes in this pr are wrong. They are reasonable and should be discussed G+1 because the risk that something breaks is high.

@Jalle19
Copy link
Member Author

Jalle19 commented Mar 12, 2014

Okay, I can live with that. If there were a less intrusive way to make this work correctly I'd go for that, but it seems it's not possible.

@t-nelson t-nelson added the Helix label Apr 5, 2014
@Jalle19
Copy link
Member Author

Jalle19 commented May 7, 2014

@opdenkamp any comment on this?

@piotrasd
Copy link

could you rebase ? dont work with actual git master

@opdenkamp
Copy link
Member

been away all week end and haven't had time to look at this yet

@piotrasd please rebase yourself if you like to test this and don't post about it on github. hundreds of people get an email about this.

@Jalle19
Copy link
Member Author

Jalle19 commented May 15, 2014

@piotrasd it's rebased now, I'm in the process of build testing it but at a glance it seems fine.

@Jalle19
Copy link
Member Author

Jalle19 commented May 15, 2014

Rebased again (didn't have the latest local copy), don't know why the merge button is still gray though.

@t-nelson
Copy link
Contributor

Looks like you forgot to push or rebased against the wrong tree.

@opdenkamp
Copy link
Member

@FernetMenta or me needs to review this properly and +1 it before this is allowed to go in

@Jalle19
Copy link
Member Author

Jalle19 commented May 15, 2014

@t-nelson should be fixed now, I rebased the wrong local branch and pushed that. No wonder the light didn't turn green.

@opdenkamp of course

@piotrasd
Copy link

Yeep, works great !!! thanks.

@@ -5761,10 +5758,6 @@ void CApplication::SaveCurrentFileSettings()
dbs.Close();
}
}
else if (m_itemCurrentFile->IsPVRChannel())

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@MartijnKaijser MartijnKaijser added this to the Pending for inclusion milestone May 21, 2014
@Jalle19
Copy link
Member Author

Jalle19 commented May 24, 2014

Replaced by #4783

@Jalle19 Jalle19 closed this May 24, 2014
@MartijnKaijser MartijnKaijser modified the milestones: Abandoned, obsolete or superseeded, Pending for inclusion May 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants