This PR extends the PVR API to allow pause, rewind and forward of LiveTV streams if the backend supports it.
A PVR addon can tell XBMC for each individual backend channel whether it supports timeshifting for this channel or not.
XBMC will enable the corresponding buttons if the selected channel can timeshift.
Summary of the changes:
Check for ILiveTV (or what the interface is called) in dvdplayer instead of isstreamtype pvr, when doing the pause
Also, why does application need to block pause actions? IMHO they should only be blocked in dvdplayer for live tv.
@elupus Agreed. It is cleaner to move it to the dvdplayer. The only reason I can think of why the existing check for LiveTV was in application is maybe to support other players.
I will move the check to the dvdplayer code.
@opdenkamp: that is also an option unless you mean "add back the property bSupportsTimeshift to the PVR_ADDON_CAPABILITIES" as it was before the PVR merge.
I would like to check the property for each channel individually because the MediaPortal addon can return a mixed channel set (both web channels and real tv channels). Some channel can be paused, while other can't.
It is now done at channel scan time, but I can ask the PVR addon at tune time whether it support timeshifting for the newly selected channel.
How would you like to see this? Extend the PVR_STREAM_PROPERTIES or PVR_SIGNAL_STATUS struct or add a dedicated CanTimeshift function instead?
if this can be different per channel for one add-on, then i prefer adding it to PVR_STREAM_PROPERTIES. thanks
Ok, I will try to update it using the PVR_STREAM_PROPERTIES struct although I'm not yet sure if I can get the order right for updating the enabled state of the GUI buttons.
Furthermore, this requires that the PVR addon always knows which channel is playing in order to return the proper CanTimeshift() answer.
For example: what should happen if the channel uses a StreamURL and XBMC directly opens the URL?
Will XBMC then execute the PVR addon's GetStreamProperties() to see if the timeshift buttons should be enabled?
And how should the addon then know which channel is active?
I'll have to verify this for stream url.
nope, it's not read with those. go for the CanTimeshift() method instead then.
Thanks for checking. Will update the code to add CanTimeshift instead
I tried to apply this patch on top of f674404 and installed xbmc-addon-xvdr - XBMC crashes with segmentation fault when switching to any channel. Without the patch everything works fine. Tested on Ubuntu 12.04 with kernels 3.0.2 and 3.0.5.
@AndreyPavlenko That won't work without adapting the also the xvdr addon. This pull request changes the PVR API, so all addons need to be updated. The segmentation fault is probably caused by a mismatch between the struct sizes in XBMC and your pvr addon (if you didn't modify also the addon sources).
Furthermore, this pull request only provides the required infrastructure for timehifting. It requires proper backend support and an extension of the pvr addon. I don't know the XVDR stuff good enough to know if this backend has timeshift support.
I've updated this pull request to incorporate the remarks and suggestions.
The previous database change is now replaced by the CanTimeshift() function.
The application.cpp file check on livetv is now moved to the dvdplayer instead as suggested by elupus
Updated with the remarks from @da-anda (generic names).
There is no reference to the word timeshift anymore.
Nice work, thanks. Fine now from my side :) The mentioned typo above can be fixed when squashing I think.
Argh, sorry for closing, damn small smartphone, was actually just scrolling :(
looking sane to me. i'll test it tomorrow, and merge it in with a little Trigger...() method that i wanted to add earlier but forgot, so we don't need another bump.
Confluence: add extra PVR buttons to support pause and seek
These buttons are only enabled when the current PVR backend supports pause and seek for the current playing stream
pvr: extend the PVR API to allow pause and seek for LiveTV and record…
…ings when the backend supports it
- Add CanPauseStream and CanSeekStream functions enable/disable pause and seek for the current playing stream
- Add PauseStream function to notify the backend that XBMC paused playback
pvr: add the PauseStream, CanPauseStream and CanSeekStream functions …
…to the PVRClient(s) classes
dvdplayer: add support for pause and seek of LiveTV and recordings
This functionality is only enabled when the PVR backend reports that it is supported
pvr: enable pause and seek when the PVR backend supports it for the c…
…urrent playing stream
Fixed the c+p mistakes. Thanks for checking.
Thanks margro. XVDR does not support timeshift. Are there any addons for tvheadend/vdr backends that support timeshifting?
There's a forum for such question
Merge branch 'pvrapi_1_5_0'. closes #1504. closes #1577