Skip to content
This repository

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

Merged
merged 2 commits into from over 1 year ago
Lars Op den Kamp
Collaborator

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
Owner

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

Lars Op den Kamp
Collaborator

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

sofakng

Very exited about this!

Garrett Brown
Collaborator

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

Deleted user

The content you are editing has changed. Reload the page and try again.

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

Sending Request…

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Lars Op den Kamp
Collaborator

@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 :)

Lars Op den Kamp
Collaborator

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

system/PVRDemoAddonSettings.xml
((445 lines not shown))
  445
+    </entry>
  446
+    <entry>
  447
+      <broadcastid>2100</broadcastid>
  448
+      <title>Demo Radio EPG entry #10</title>
  449
+      <channelid>21</channelid>
  450
+      <start>0</start>
  451
+      <end>7200</end>
  452
+      <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>
  453
+      <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>
  454
+      <icon></icon>
  455
+      <genretype>30</genretype>
  456
+      <genresubtype>0</genresubtype>
  457
+    </entry>
  458
+
  459
+  </epg>
  460
+</demo>
3
da-anda Collaborator

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

Lars Op den Kamp Collaborator

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

Lars Op den Kamp Collaborator

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 September 03, 2012
xbmc/FileItem.cpp
((6 lines not shown))
61 68
 
62 69
 CFileItem::CFileItem(const CSong& song)
63 70
 {
64 71
   m_musicInfoTag = NULL;
65 72
   m_videoInfoTag = NULL;
  73
+  m_epgInfoTag = NULL;
  74
+  m_pvrChannelInfoTag = NULL;
  75
+  m_pvrRecordingInfoTag = NULL;
  76
+  m_pvrTimerInfoTag = NULL;
66 77
   m_pictureInfoTag = NULL;
2
da-anda Collaborator

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?

Lars Op den Kamp Collaborator

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! :(

Lars Op den Kamp
Collaborator

@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
Owner

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.

Lars Op den Kamp
Collaborator

@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! ;)

Lars Op den Kamp
Collaborator

@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
Collaborator

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
Collaborator

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.

Damian Huckle
Collaborator

@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
Collaborator

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

Lars Op den Kamp
Collaborator

@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

Damian Huckle
Collaborator

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

@opdenkamp - then test I shall! Congrats btw.

wsoltys
Collaborator

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

Joakim Plate
Collaborator
Fneufneu
Collaborator

build fine on FreeBSD

Tristan Fischer

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

wsoltys
Collaborator

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

Sascha Montellese
Collaborator

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.

Robert Meijers

@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.

Joakim Plate elupus commented on the diff September 03, 2012
lib/addons/library.xbmc.gui/libXBMC_gui.cpp
((540 lines not shown))
  540
+const char *CAddonListItem::GetProperty(const char *key) const
  541
+{
  542
+  if (!m_ListItemHandle)
  543
+    return "";
  544
+
  545
+  return m_cb->ListItem_GetProperty(m_Handle->addonData, m_ListItemHandle, key);
  546
+}
  547
+
  548
+void CAddonListItem::SetPath(const char *Path)
  549
+{
  550
+  if (m_ListItemHandle)
  551
+    m_cb->ListItem_SetPath(m_Handle->addonData, m_ListItemHandle, Path);
  552
+}
  553
+
  554
+
  555
+};
2
Joakim Plate Collaborator
elupus added a note September 03, 2012

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

Lars Op den Kamp Collaborator

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
Lars Op den Kamp
Collaborator

@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

xbmc/URL.cpp
... ...
@@ -183,6 +184,7 @@ void CURL::Parse(const CStdString& strURL1)
183 184
   if(strProtocol2.Equals("http")
184 185
     || strProtocol2.Equals("https")
185 186
     || strProtocol2.Equals("plugin")
  187
+    || m_strProtocol.Equals("addon")
2
Joakim Plate Collaborator
elupus added a note September 03, 2012

typo? should that that be strProtocol2 as the others?

Lars Op den Kamp Collaborator

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
Joakim Plate
Collaborator

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.

Lars Op den Kamp
Collaborator

@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

Sascha Montellese
Collaborator

@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.

Lars Op den Kamp
Collaborator

@Montellese indeed. will fix it

Lars Op den Kamp
Collaborator

@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)

Lars Op den Kamp
Collaborator

@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.

Deleted user

The content you are editing has changed. Reload the page and try again.

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

Sending Request…

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Lars Op den Kamp
Collaborator

@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
Owner

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

Lars Op den Kamp
Collaborator

@pieh included the two fixes from irc, thanks

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

Joakim Plate
Collaborator

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

alanwww1 (Attila)
Collaborator

@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.

Lars Op den Kamp
Collaborator

@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 (Attila)
Collaborator

@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.

Joakim Plate
Collaborator

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.

Lars Op den Kamp
Collaborator

@elupus done

Lars Op den Kamp opdenkamp merged commit d9d303f into from September 04, 2012
Lars Op den Kamp opdenkamp closed this September 04, 2012
jmarshallnz
Deleted user

The content you are editing has changed. Reload the page and try again.

Sending Request…

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

jmarshallnz
Lars Op den Kamp
Collaborator

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

Rainer Hochecker

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.

Collaborator
Collaborator

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

Collaborator
alanwww1 (Attila)

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

Thanks!

Collaborator
Collaborator
Collaborator
alanwww1 (Attila)

Hi Lars !

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

Could not 19103 and 19167 be merged ?

Thanks,
Attila

Collaborator
Rainer Hochecker

@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.

Collaborator
Collaborator

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

Collaborator
Collaborator
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.