Kodi Community Forum
PVR API changes (add-on authors: read this!) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: PVR API changes (add-on authors: read this!) (/showthread.php?tid=97764)

Pages: 1 2 3 4


- opdenkamp - 2012-02-08

great, thanks.
if you encounter any (more) bugs in lib/platform, let me know and I'll get it fixed.


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-10

iClientId has been removed from PVR_PROPERTIES. more changes will follow soon.

https://github.com/opdenkamp/xbmc/commit/2a6b1aed206dcc6a721638980e8cc63577cd797b


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-13

removed bSupportsChannelSettings and bSupportsTimeshift from PVR_ADDON_CAPABILITIES
https://github.com/opdenkamp/xbmc/commit/68f33069105aa81d216522afedfac8d06038f987


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-19

moved and renamed PVR_HANDLE from xbmc_pvr_types.h to ADDON_HANDLE in xbmc_addon_types.h

https://github.com/opdenkamp/xbmc/commit/a0f882b3fb3177a601dfe466238511ad0c0af9c2


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-19

epg related types have been extracted from xbmc_pvr_types.h and been moved to xbmc_epg_types.h

https://github.com/opdenkamp/xbmc/commit/e494d2eb11bb65855749d4631711b239ab17245f


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-20

added XBMC_PVR_API_VERSION to xbmc_pvr_types.h.

Every add-on must implement the method const char* GetPVRAPIVersion(), that returns the value of XBMC_PVR_API_VERSION that was used to compile the add-on

https://github.com/opdenkamp/xbmc/commit/1c5ca99ec4bc76cda08efa63716a934bd03e9839 (there's a typo in the method name in the commit note)


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-22

not directly an interface change, but related: https://github.com/opdenkamp/xbmc/pull/622

i'm going to remove all add-ons from the pvr tree soon.


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-08-23

changed PVR_ERROR:
PVR_ERROR_NOT_SYNC has been removed
PVR_ERROR_NOT_DELETED and PVR_ERROR_NOT_SAVED have been replaced by PVR_ERROR_FAILED
PVR_ERROR_NOT_POSSIBLE has been replaced by PVR_ERROR_REJECTED
PVR_ERROR_INVALID_PARAMETERS has been added

enum values were changed

https://github.com/opdenkamp/xbmc/commit/f872cfd5c70d7d62f02a11a96dddf0c84f131e8a

all PVR add-ons have now been removed from the tree. you can find an explanation in https://github.com/opdenkamp/xbmc/blob/master/docs/README.pvr


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-09-03

forgot to post about the latest interface changes here.

each add-on must implement "unsigned int GetChannelSwitchDelay()". Delay to use when using switching channels for add-ons not providing an input stream.
-> https://github.com/opdenkamp/xbmc-pvr-addons/commit/ccc757b7c881a0a127b0054930d7befe55fcf598

changed some PVR_STREAM_PROPERTIES to int instead of unsigned, to match the field types in XBMC
-> https://github.com/opdenkamp/xbmc-pvr-addons/commit/97ddf5233e02fec7d908e78cb2bd1c8a7758fb44

each add-on must implement "const char* GetMininumPVRAPIVersion(void)" and return the value of XBMC_PVR_MIN_API_VERSION that was used to compile the add-on
-> https://github.com/opdenkamp/xbmc-pvr-addons/commit/fb0ffa5b438868fb84d07a20cf53b1afbeb65bd6

PVR API version has been bumped to 1.2.0


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-09-18

the following PR exposes CFile methods to PVR add-ons: https://github.com/xbmc/xbmc/pull/1432
PVR add-ons cannot use external libs like curl or smbclient (or any other lib, unless it's linked into the add-on). I've updated most of the add-on code to use these new methods: https://github.com/opdenkamp/xbmc-pvr-addons/pull/35. That PR will be merged in after 1432 has been merged.


RE: PVR API changes (add-on authors: read this!) - Nirvana - 2012-10-07

Shouldn't timeshift be rather a funtionality in xbmc instead of the backend? In my opinion that is a generic challenge which needs to be solved also for Livestreams / other video addons.


RE: PVR API changes (add-on authors: read this!) - dteirney - 2012-10-07

(2012-10-07, 18:36)Nirvana Wrote: Shouldn't timeshift be rather a funtionality in xbmc instead of the backend? In my opinion that is a generic challenge which needs to be solved also for Livestreams / other video addons.

Some PVR backends already support time-shifting, e.g. MythTV, which streams LiveTV to disk on the backend and it is streamed from there.

The generic challenge also comes with generic problems, e.g. how many minutes get buffered before too much memory is consumed and it has to be spooled to disk. How much disk should be used? When should that content be deleted if the stream is closed? Should it be available to watch again? How would the user access that? What if the XBMC installation is on a lightweight front end client that doesn't have access to writable storage to cope with the 6-8Gb per hour that is need for HD Live TV streams.

If a PVR backend already addresses a number of these questions then it seems reasonable to expose that functionality rather than not having time-shifting. For PVR backends that don't support time-shifting perhaps someone will create a generic solution that can be used by those.


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-10-10

Forgot to post about the API changes again, sorry.

callback sigs were changed (v1.3.0):
https://github.com/opdenkamp/xbmc-pvr-addons/commit/50afdabfa4cdefe6d0883614421012fc0e5b0669

the following strings were added to PVR_RECORDING: strIconPath, strThumbnailPath and strFanartPath (v1.4.0):
https://github.com/opdenkamp/xbmc-pvr-addons/commit/9e7a5ba2c1b9c32fbb79063c2466122dd2d2aa53

every add-on must implement the (stubs for) methods CanPauseStream, CanSeekStream and PauseStream (v1.5.0):
https://github.com/opdenkamp/xbmc-pvr-addons/commit/a13c54582e78381829aa503f57d47f24804e347b

following PVR_TIMER_STATE's were added: PVR_TIMER_STATE_CONFLICT_OK, PVR_TIMER_STATE_CONFLICT_NOK, PVR_TIMER_STATE_ERROR (v1.5.0)
https://github.com/opdenkamp/xbmc-pvr-addons/commit/ba217053c6f961f966fb4b79d539c2627fb13562

add-ons must return ADDON_STATUS_PERMANENT_FAILURE when a call to RegisterMe() in ADDON_Create() fails (v1.5.0):
https://github.com/opdenkamp/xbmc-pvr-addons/commit/4904df3552a5762811b51d63ff9087756544d4cc


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-10-12

as jdembski already noticed, i forgot to mention 1 new callback method:

TriggerEpgUpdate() can be used in the add-on to request XBMC to update the EPG for a channel:
https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/xbmc/libXBMC_pvr.h#L255


RE: PVR API changes (add-on authors: read this!) - opdenkamp - 2012-11-10

iStreamIndex has been removed from PVR_PROPERTIES

menu hooks got a new field: category, of type PVR_MENUHOOK_CAT
https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/xbmc/xbmc_pvr_types.h#L117

the following methods have been added for pvr add-ons that use the demux code:
bool SeekTime(int,bool,double*)
https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/xbmc/xbmc_pvr_dll.h#L534

void SetSpeed(int)
https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/xbmc/xbmc_pvr_dll.h#L544

UnknownToUTF8(), GetLocalizedString() and GetDVDMenuLanguage() now return char*, that must be freed by calling a new API method: FreeString()
https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/xbmc/libXBMC_addon.h#L298

full set of changes: https://github.com/opdenkamp/xbmc-pvr-addons/commit/4e24ae699004e7bcf4e3beafa2e2bc13456c2e0c