[pvr] add PVR and EPG support to XBMC #1357

Merged
merged 2 commits into from Sep 4, 2012
@opdenkamp
Team Kodi member

add-ons are not included, but can be found here: https://github.com/opdenkamp/xbmc-pvr-addons

when the pvr manager is enabled without any pvr add-ons installed, then the following warning text will be displayed: "No PVR add-ons could be found. You need a tuner, backend software, and an add-on for the backend to be able to use PVR. Please visit xbmc.org/PVR to learn more."
this page needs to be created (just forward to the wiki page about pvr and update that one?)

when the pvrmanager is enabled, and there are add-ons found, but none is enabled, then the user will see a warning message that he needs to enable at least one add-on, and is taken to the add-ons directory with the disabled add-ons.

pvr related issues that i assigned to the frodo milestone (that i'd like to fix or see fixed before frodo final) can be found here: https://github.com/opdenkamp/xbmc/issues?milestone=3&state=open
i haven't checked and cleaned up trac tickets lately.

@Memphiz
Team Kodi member

Great work Lars - will fixup the Xcode projects for iOS and atv2 tomorrow in the train :D

@opdenkamp
Team Kodi member

cheers! you got r/w access to the repos now

@sofakng

Very exited about this!

@garbear
Team Kodi member

It looks like we have unused variables at here and here

Would it be possible to split up the big commit so that lib/ additions and xbmc/pvr/ additions are in separate commits? I know it breaks compilation but it's too big for github to load the commit diff

edit, nevermind just realized I can do it myself

@ghost

there are d in the big commit. it needs explaion. just a gut reaction with just a phone

@opdenkamp
Team Kodi member

@cptspiff "there are d in the big commit. it needs explaion. just a gut reaction with just a phone"
sorry, "d"? i'll be happy to add more explanation, just not sure what you'd like to see explained :)

@opdenkamp
Team Kodi member

@garbear those left overs from earlier. have been removed again in a later commit. i'll push a squashed commit

@da-anda da-anda and 1 other commented on an outdated diff Sep 3, 2012
system/PVRDemoAddonSettings.xml
+ </entry>
+ <entry>
+ <broadcastid>2100</broadcastid>
+ <title>Demo Radio EPG entry #10</title>
+ <channelid>21</channelid>
+ <start>0</start>
+ <end>7200</end>
+ <plotoutline>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam cursus consectetur ipsum, eu tincidunt dui aliquam ac. Sed scelerisque, augue eu lacinia ultrices, libero ante ullamcorper augue, vel malesuada justo risus ac nulla. Quisque ac libero libero. Sed tincidunt, orci eu condimentum laoreet, felis odio mattis est, et lacinia metus enim in leo. Fusce faucibus tristique risus in varius. Etiam sagittis venenatis ligula nec rutrum. Etiam gravida dictum hendrerit. Sed sodales felis in sapien rutrum non malesuada nisi lobortis. Mauris iaculis ante odio. Nunc gravida erat convallis purus dignissim et ultricies orci dapibus. Aliquam erat volutpat. Vestibulum mi felis, malesuada ac tincidunt sit amet, pulvinar nec dolor. Pellentesque vehicula est vulputate mi adipiscing euismod. Donec ac mauris nulla. Nullam suscipit felis eu quam sodales ac bibendum nisi interdum. Curabitur non lectus a ante venenatis semper eget id justo. Ut facilisis, ligula pretium dictum congue, lacus dolor commodo nibh, sit amet sodales sed.</plotoutline>
+ <plot>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam cursus consectetur ipsum, eu tincidunt dui aliquam ac. Sed scelerisque, augue eu lacinia ultrices, libero ante ullamcorper augue, vel malesuada justo risus ac nulla. Quisque ac libero libero. Sed tincidunt, orci eu condimentum laoreet, felis odio mattis est, et lacinia metus enim in leo. Fusce faucibus tristique risus in varius. Etiam sagittis venenatis ligula nec rutrum. Etiam gravida dictum hendrerit. Sed sodales felis in sapien rutrum non malesuada nisi lobortis. Mauris iaculis ante odio. Nunc gravida erat convallis purus dignissim et ultricies orci dapibus. Aliquam erat volutpat. Vestibulum mi felis, malesuada ac tincidunt sit amet, pulvinar nec dolor. Pellentesque vehicula est vulputate mi adipiscing euismod. Donec ac mauris nulla. Nullam suscipit felis eu quam sodales ac bibendum nisi interdum. Curabitur non lectus a ante venenatis semper eget id justo. Ut facilisis, ligula pretium dictum congue, lacus dolor commodo nibh, sit amet sodales sed.</plot>
+ <icon></icon>
+ <genretype>30</genretype>
+ <genresubtype>0</genresubtype>
+ </entry>
+
+ </epg>
+</demo>
@da-anda
Team Kodi member
da-anda added a note Sep 3, 2012

looks like this file is a leftover (as mentioned on IRC)

@opdenkamp
Team Kodi member

it is indeed. this is now included in the add-on

@opdenkamp
Team Kodi member

i've removed the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@da-anda da-anda commented on the diff Sep 3, 2012
xbmc/FileItem.cpp
CFileItem::CFileItem(const CSong& song)
{
m_musicInfoTag = NULL;
m_videoInfoTag = NULL;
+ m_epgInfoTag = NULL;
+ m_pvrChannelInfoTag = NULL;
+ m_pvrRecordingInfoTag = NULL;
+ m_pvrTimerInfoTag = NULL;
m_pictureInfoTag = NULL;
@da-anda
Team Kodi member
da-anda added a note Sep 3, 2012

not related to this PVR PR, just a general notice on FileItem.cpp: Can't all that m_xyzInfoTag = NULL; stuff that's repeated in this file like hundreds of times be moved to a private function or even the "reset()" function?

@opdenkamp
Team Kodi member

yeah this gets kind of messy when new types are added to CFileItem. but it's not related to this PR indeed, so we can pick that up later

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

I dont't think that the raspberry is powerfull enough to navigate through the channel list while watching a channel! Tried it with raspbmc R4 connected to a tvheadend server witch ran on an ubuntu pc and got crashes, picture bugs and so on! Main problem is the CPU performance! :(

@opdenkamp
Team Kodi member

@bennykill you need to wait until both pvr and rpi support are in mainline and i can't help you with quirks in someone's pvr+rpi merge attempt

@Memphiz
Team Kodi member

Beside that we are working here and this information was totally useless to us for this pull request.

@opdenkamp - with "D" spiff means the deleted files in that big commit.

@opdenkamp
Team Kodi member

@Memphiz @cptspiff right thanks, i'll add an explanation for those

@bennykill

@Memphiz With this information I wanted to help by telling you about my experiences. Because implementing PVR support isnt necessary when the hardware isnt strong enough! ;) Someone who wants to use XBMC as a receiver also wants to use a channel list! ;)

@opdenkamp
Team Kodi member

@bennykill the information is useless for this PR, like memphiz already said. you need to wait. and every comment on this PR will send mails to 100+ people so please leave it at this for now, unless you have some valid comment about the code changes in this PR.

@wsoltys
Team Kodi member

compiles and works fine on windows (tested with the vnsi plugin and my vdr). I don't have nav sounds with directsound but other audio is fine (mp3, live tv, etc). Maybe @DDDamian could have a look at it. Otherwise its fine and I'm okay with the merge.

@wsoltys
Team Kodi member

Another thing I noticed is that the description for settings->server is the same like settings->live tv. I use German but since its English I assume it uses the default values.

@DDDamian

@wsoltys - no TV tuner card here (thx to opdenkamp & others I now have an incentive) so not much help in testing. For nav sounds enable <streamsilence under <audio heading in as.xml so engine doesn't sleep. Since adding suspend / resume I'm adding some other functionality to restore nav sounds without re-opening sink from suspend mode with every GUI beep ;)

@wsoltys
Team Kodi member

you don't need the hw for testing the navsounds for this branch :)

@opdenkamp
Team Kodi member

@wsoltys thanks, I'll check that out. probably my mistake when merging that in earlier when that category was added

@DDDamian there's a demo add-on now that you can use that simulates a pvr backend. just plays back an internet stream, so it's not the same as playing back from hts or vdr, but that shouldn't matter for navsounds

@DDDamian

Sorry tags lost to parser lol - tag is streamsilence under audio heading.

@opdenkamp - then test I shall! Congrats btw.

@opdenkamp opdenkamp was assigned Sep 3, 2012
@wsoltys
Team Kodi member

The file win32/stdbool.h is added but I can't find where its used right now. Maybe a leftover?

@elupus
Team Kodi member
@Fneufneu
Team Kodi member

build fine on FreeBSD

@dersphere
Team Kodi member

Not sure if this is a surprise but builds (and works so far) fine on ubuntu 12.04 ;-)

@wsoltys
Team Kodi member

@DDDamian current master is also missing the nav sounds with direct sound so not related to pvr.

@Montellese
Team Kodi member

Nice work on this. Congrats.
Would it be possible to take out the PVR-specific additions to JSON-RPC and do them in a seperate PR. I currently don't have the possibility to test them and I don't want to stall the whole PVR stuff from going in just because of things I'd like to do differently in the JSON-RPC API. But I also don't want to add a new set of methods and then change it again a week or two later.

If it's too much hassle to take it out and do a seperate PR afterwards I'll just fix it up later when I got time. AFAIK you didn't write that code yourself either so you won't be the right person to answer my questions on it.

@RobertMe

@Montellese
Unsure about what you would like to do on the JSON side of things (only adding/extending the PVR API, or internally changing how JSON-RPC works?) But I'm already doing some work on the JSON API for PVR (current code isn't mine). @opdenkamp already told me he wouldn't like to include my work right now (in this PR). But I'm continuing development on it and already did a few things differently (most PVR methods which are in this PR should be part of Player IMHO, for one). One of the changes I already did was adding Player integration (opdenkamp#626) and currently I'm working on "read" support, so things like PVR.GetChannels etc.

@elupus elupus commented on the diff Sep 3, 2012
lib/addons/library.xbmc.gui/libXBMC_gui.cpp
+const char *CAddonListItem::GetProperty(const char *key) const
+{
+ if (!m_ListItemHandle)
+ return "";
+
+ return m_cb->ListItem_GetProperty(m_Handle->addonData, m_ListItemHandle, key);
+}
+
+void CAddonListItem::SetPath(const char *Path)
+{
+ if (m_ListItemHandle)
+ m_cb->ListItem_SetPath(m_Handle->addonData, m_ListItemHandle, Path);
+}
+
+
+};
@elupus
Team Kodi member
elupus added a note Sep 3, 2012

This stuff is clearly something that should be generated by @jimfcarroll code generation stuff at some point in the future.

@opdenkamp
Team Kodi member

yes, that would indeed be a lot nicer. tbh, i'm not sure whether any add-on is actually using this right now. haven't updated that recently, so things might be missing that are available in guilib. just fixed it up when it failed to compile by implementing the changes when merging it in. but i haven't used or tested any of the gui stuff in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@opdenkamp
Team Kodi member

@Montellese @RobertMe shouldn't be too hard to undo the json-rpc changes. i'll have a look at it and will update this PR

@elupus elupus and 1 other commented on an outdated diff Sep 3, 2012
@@ -183,6 +184,7 @@ void CURL::Parse(const CStdString& strURL1)
if(strProtocol2.Equals("http")
|| strProtocol2.Equals("https")
|| strProtocol2.Equals("plugin")
+ || m_strProtocol.Equals("addon")
@elupus
Team Kodi member
elupus added a note Sep 3, 2012

typo? should that that be strProtocol2 as the others?

@opdenkamp
Team Kodi member

looks like it. will check this, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@elupus
Team Kodi member

Annoying github not showing diffs on files further down. Anyway:
Key.h changes look scary, it's changing old window id's.

There is clearly some stuff i still don't like in the code. Mainly in dvdplayer.cpp and the interface to the addons for providing data, but I only have myself for blame regarding that since i've not looked at it. But it's nothing blocking a merge.

Some sami subtitle support has snuck in that could be separate.

The key.h header stuff i think needs fixing. Feel like it could break stuff. It's a huge amount of code, but my first scan through the patch is good so I have nothing blocking a merge.

@opdenkamp
Team Kodi member

@Montellese json-rpc changes have been removed from the PR
@elupus moved the window ids in Key.h around a bit so we don't change existing ids

everything will be squashed up into 1 commit when done

@Montellese
Team Kodi member

@opdenkamp Thanks for the reverts. The project files (VS and XCode) will need updating (i.e. remove the previously added xbmc/interfaces/json-rpc/PVROperations.h/cpp from the project files) but that shouldn't be a big deal.

@opdenkamp
Team Kodi member

@Montellese indeed. will fix it

@opdenkamp
Team Kodi member

@cptspiff was checking where the deletions were coming from, and noticed that this slipped in: following files were deleted in the pvr branch when i was cleaning things up, which should have been done in mainline:
lib/libhts/Win32/include/stdint.h
lib/libhts/Win32/libhts_2003.sln
lib/libhts/Win32/libhts_2003.vcproj
lib/libhts/Win32/libhts_2008.sln
lib/libhts/Win32/libhts_2008.vcproj

since this is completely unrelated to this PR, i'll re-add the files here and put that in a separate PR (those not being used anymore)

@opdenkamp
Team Kodi member

@cptspiff re-added project files for libhts in 36825e5. saves a few d's ;-) scrolled through the patch quickly, and most other deletions are things like changed if statements, cases added to switches, etc that hook up the various pvr bits. i'll be happy to explain certain parts you'd like to see explained.

@Montellese removed the refs to the files from the project files. just a quick find and replace, not sure whether the apple stuff needs more than just this.

@ghost

thanks lars, it was the deleted files i wondered about. that some hunks remove code is less of a concern.

@opdenkamp
Team Kodi member

@elupus the samitagconvertor stuff was merged in from pvr-testing2 earlier, but doesn't seem to be hooked up to anything. it's not even hooked up in the makefiles/project files. so i'll just remove it from the PR.

@Memphiz
Team Kodi member

Just to confirm. Your changes in removing the PVR JSON stuff from the xcode projects are fine.

@opdenkamp
Team Kodi member

@pieh included the two fixes from irc, thanks

let me know when everybody finished this review, and i'll rebase & squash

@elupus
Team Kodi member

When you rebase, would be nice if non english translations where added as a separate commit. (they are not a core requirement)

@alanwww1
Team Kodi member

@elupus , @opdenkamp

It is not a problem for me to handle the translations. This is why a held back my bulk language file update PR, so that it wouldn't interfere with this PR. If this is merged, I can update Transifex with the new English strings and also the non-English translations as well. Translation groups can than review, or change the as they decide.

So from my side, they can stay in, if there is no other reason to separate.

@opdenkamp
Team Kodi member

@alanwww1 great, thanks for holding back your PR. i can just push in the english strings, or push them all. whichever you prefer. it's an easy change for me

unless someone wants to review the latest changes separately, i'll squash&rebase now. the removals will make github show some more changes without complaining that the pr is too big ;-)

@alanwww1
Team Kodi member

@opdenkamp For me, it would be better to have them all in, so I can merge back the new translations right after it, if that's ok for everyone.

@elupus
Team Kodi member

I never meant leave the translations out. I just meant as a separate commit. This is one huge commit as it is. If it can easily be split that makes it more readable.

@opdenkamp
Team Kodi member

@elupus done

@opdenkamp opdenkamp merged commit d9d303f into xbmc:master Sep 4, 2012
@jmarshallnz
Team Kodi member
@ghost
@jmarshallnz
Team Kodi member
@opdenkamp
Team Kodi member

@jmarshallnz i'm pretty sure there will be plenty to review and fix up when you get back ;-) have a nice trip :)

@FernetMenta

This interafce overwrites state.time (UpdatePlayState) in dvdplayer. This is not ok for vnsi recordings which use ffmpeg demuxer. They better get the time from demuxer. I don't have a good idea for a clean solution yet.

Team Kodi member
Team Kodi member

ahh ok. So the solution would be that GetTotalTime() should return 0 when playing a recording?

Team Kodi member
@alanwww1

@opdenkamp
I can't seem to find where we use this string (#19161)
Cannot this be deleted ?

Thanks!

Team Kodi member
Team Kodi member
Team Kodi member
@alanwww1

Hi Lars !

Sorry for bothering again with the language strings. Just another thing I noticed:

Could not 19103 and 19167 be merged ?

Thanks,
Attila

Team Kodi member
@FernetMenta

@opdenkamp for what reason do we return true here? My recordings stop 10 sec too early: demuxer hits eof, player tries to open next stream, create demuxer fails, player stops.

Team Kodi member
Team Kodi member

in dvdplayer: should we move the check for next stream below the lines where it checks for a/v players !HasData?

Team Kodi member
Team Kodi member
Team Kodi member

@FernetMenta no idea really, didn't write this one. but i guess @elupus already answered your questions :)

@bam80

Channels mapping table request:
f73deb8#commitcomment-7766235

@LongChair LongChair added a commit to plexinc/plex-home-theater-public that referenced this pull request Apr 30, 2015
@LongChair LongChair Change Rocket Scientists factors to fox 1:85 image cropping, should fix fc542d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment