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

[pvr] Rewrite of PVR window integration #4753

Merged
merged 12 commits into from
Jul 13, 2014
Merged

Conversation

xhaggi
Copy link
Member

@xhaggi xhaggi commented May 19, 2014

As pointed out on IRC i'm working on a rewrite of the current PVR window integration. I've refactored all "sub windows"
(channels, guide, recordings, timers, seach) out of CGUIWindowPVR to be normal windows which inherit from a CGUIWindowPVRBase class
(same it is done on other parts of XBMC). Each window has its own new window id depends on the type tv or radio (WINDOW_TV_CHANNELS, WINDOW_RADIO_CHANNELS, WINDOW_TV_GUIDE etc.)
and is mapped to an action command (TVChannels, RadioChannels, TVGuide etc.) within the CButtonTranslator. You could activate such a window by calling
ActivateWindow(TVGuide) or ActivateWindow(RadioGuide).
I also changed the implementation of views to be dynamic such as the video views are, except the guide views which need static ID refs (10 = epggrid, 11 = now, 12 = next, 13 = channel epg).
But the skinners will have control over which views are used by adding them to the <views> node. So now it's possible to add different views for channel list,
recordings etc. or for example only provide the guide grid view for the guide window by adding the ID 11 to <views> only.

There are several other changes, so here is complete overview:

  • new windows ID's: WINDOW_TV_CHANNELS, WINDOW_TV_GUIDE, WINDOW_TV_RECORDINGS, WINDOW_TV_TIMERS, WINDOW_TV_SEARCH, WINDOW_RADIO_CHANNELS, WINDOW_RADIO_GUIDE, WINDOW_RADIO_RECORDINGS, WINDOW_RADIO_TIMERS, WINDOW_RADIO_SEARCH
  • new window action mappings: TVChannels, TVGuide, TVRecordings, TVTimers, TVSearch, RadioChannels, RadioGuide, RadioRecordings, RadioTimers, RadioSearch
  • use of ActivateWindow(TVGuide) instead of ActivateWindowAndFocus(MyPVR, 31,0, 10,0)
  • get rid of static button references for activating a pvr window (heavily used on the sideblade menu), instead <onclick>ActivateWindow(TVGuide)</onclick> is used.
  • new group selection dialog (Button control ID: 28)
  • use of the "View As" button (ID: 2) to switch between existing views.
  • new gui info properties PVR.HasTVChannels and PVR.HasRadioChannels to determine if we have tv and/or radio channels and hide the tv/radio item in home menu.
  • new window property IsRadio

It would be nice to get some feedback especially from @jmarshallnz for the gui part, @opdenkamp and @Jalle19 for the PVR related parts and @ronie for the changes I made to confluence.

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

ronie commented May 24, 2014

skin changes look ok to me.
nice work xhaggi, things will make the pvr section far more useable.

iWindow != WINDOW_PVR_TIMERS ||
iWindow != WINDOW_PVR_SEARCH ||
(iWindow == WINDOW_PVR_RECORDINGS && StringUtils::StartsWith(m_vecItems->GetPath(), "pvr://recordings/")))
m_history.AddPath(m_vecItems->GetPath(), m_strFilterPath);

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.

@opdenkamp opdenkamp self-assigned this May 24, 2014
@xhaggi
Copy link
Member Author

xhaggi commented May 25, 2014

@ronie thanks for reviewing the confluence part, removed the include and unused language keys.

@opdenkamp
Copy link
Member

i've reviewed the first commit, but don't have time to review the rest right now. in general: great work, but try to split the changes in smaller commits instead of a huge one next time, since this makes it nearly impossible to review.

@xhaggi
Copy link
Member Author

xhaggi commented May 26, 2014

thanks so far .. this was a rework of my old PR and i'm lazy to split things up.

@xhaggi
Copy link
Member Author

xhaggi commented May 26, 2014

@opdenkamp i've now added the unique window ids (WINDOW_TV_CHANNELS, WINDOW_RADIO_CHANNELS) + action mappings (tvchannels, radiochannels) for each type of pvr window.

@xhaggi
Copy link
Member Author

xhaggi commented May 27, 2014

@ronie could you please review the changes made to confluence 9a1e085. Now we use unique window id's instead of one for tv and radio.

CPVRChannelGroupPtr m_selectedGroup;
bool m_bShowHiddenChannels;
bool m_bRadio;
bool m_bShowHiddenChannels = false;

This comment was marked as spam.

@xhaggi
Copy link
Member Author

xhaggi commented May 28, 2014

@opdenkamp i've done most of the stuff you chalked up. would be nice if you take a look at the rest of this PR, so i can rebase against master

@xhaggi
Copy link
Member Author

xhaggi commented May 29, 2014

@opdenkamp done, let me know if i could start a rebase.

@xhaggi xhaggi changed the title [WIP] Rewrite of PVR window integration [pvr] Rewrite of PVR window integration Jul 11, 2014
@@ -421,8 +419,11 @@ bool CPVRTimers::GetDirectory(const CStdString& strPath, CFileItemList &items) c
for (vector<CPVRTimerInfoTagPtr>::const_iterator timerIt = it->second->begin(); timerIt != it->second->end(); timerIt++)
{
CPVRTimerInfoTagPtr current = *timerIt;
item.reset(new CFileItem(*current));
items.Add(item);
if(bRadio == current->m_bIsRadio)

This comment was marked as spam.

@Jalle19
Copy link
Member

Jalle19 commented Jul 12, 2014

Apart from the minor stuff I suggested I believe this is okay, like others have said it's so big that it's hard to get a grip of what's changed or not (especially since some files show as completely removed and completely added respectively). I say we get this in sooner rather than later and fix whatever issues crop up after that as we go. We desperately need a more solid codebase to work with in this area, it's hard to fix bugs and change behavior without it.

@jmarshallnz
Copy link
Contributor

Righto, been long enough. @xhaggi please create a new branch, squash in fixes where appropriate, rebase to master, PR and jenkins build, then hit the button.

@opdenkamp if you do have time to do any further review, this branch will remain available - anything you find can always be fixed in master - no big deal.

@opdenkamp
Copy link
Member

I've talked to @xhaggi on irc, will review the rest this week end. Little patience please.

@jmarshallnz
Copy link
Contributor

Much appreciated.

if (pWindow)
pWindow->SetInvalid();
/* make sure the pvr windows are updated */
g_PVRManager.SetWindowsInvalid();

This comment was marked as spam.

@@ -1581,3 +1622,14 @@ bool CPVRManager::CreateChannelEpgs(void)
m_bEpgsCreated = m_channelGroups->CreateChannelEpgs();
return m_bEpgsCreated;
}

void CPVRManager::SetWindowsInvalid(void)

This comment was marked as spam.

@opdenkamp
Copy link
Member

right, for as far as it is reviewable like this, it looks okay. let's do the magic numbers later and get this rebased and squashed. could you try removing the hack from dvdplayer that i commented about, and check if it selects the correct channel that you're playing in the window. would be nice if that one could go.

other than that, press the button.

@xhaggi
Copy link
Member Author

xhaggi commented Jul 13, 2014

@opdenkamp thanks for your time ;) .. i've removed the dvd/omxplayer hack, sqashed and rebased everything.

jenkins build this please

xhaggi added a commit that referenced this pull request Jul 13, 2014
[pvr] Rewrite of PVR window integration
@xhaggi xhaggi merged commit 0d6f7f7 into xbmc:master Jul 13, 2014
@MartijnKaijser MartijnKaijser modified the milestones: Helix 14.0-alpha1, Pending for inclusion Jul 19, 2014
@xhaggi xhaggi deleted the pvr-window-rewrite branch August 7, 2014 11:46
@xhaggi xhaggi restored the pvr-window-rewrite branch August 7, 2014 11:46
@xhaggi xhaggi deleted the pvr-window-rewrite branch April 20, 2015 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PVR RFC PR submitted for gathering feedback Type: Improvement non-breaking change which improves existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants