Skip to content


Subversion checkout URL

You can clone with
Download ZIP


RFC: [pvr] Fix problems with multiple PVR Addons running at the same time #1472

merged 4 commits into from

6 participants


Currently, running different PVR addons simultaneously leads into unspecified behavior.
For example recordings are loaded from all plugins, but you can only play some.

The issue is described here:
In short: The shared libraries that are loaded by the addons (libXBMC_addon, libXBMC_pvr, libXBMC_gui) use global variables (m_Handle, m_cb) that are overriden each time a plugin loads.

I started to work on one possible solution: Getting rid of those global variables, and passing them as function parameter in all exported functions.
The API that the addons call, doesn't not change because I store the handles as class members.

@opdenkamp: I'd like to get some feedback on this. Is this the proper approach or any easier fix that I just fail to see?
You were using void* as handles in the .h file. Is there a specific reason or is it better to include the header / forward declare the handles?


Looks good to me, just reviewed it very quickly though.

I would suggest removing (or seperate) the vxcproj changes however.


had a quick look at it and looking good. i'll need to go through this in more detail though as soon as i got time


Thanks so far! I've splitted the vxcproj changes and corrected the return type of XBMC_get_file_chunk_size (according to CFile and CAddonCallbacksAddon it should be int instead of int64_t)


@opdenkamp I'd like to add a few more API functions that are needed for the mythtv addon (FileExists, FileDelete, FileStat, CreateDirectory, DirectoryExists and DirectoryDelete). Is it okay to add them here as a separate commit? Cause they also depend on this rework here.

@opdenkamp opdenkamp was assigned

@fetzerch go for it.

won't be around until sunday evening, so if someone else could verify this and merge in if ok before tagging the alpha, than that would be great.


Reviewed the code change (which looks like search&replace most of the time) and compile/run tested on osx. Though since i can't estimate the influences because i'm not into that binary addon handling - someone else has to push the button.


compiled on win32 without problems. haven't tested functionality

@opdenkamp opdenkamp merged commit 20bd8cd into xbmc:master

needed an interface version bump. added that before pushing. pvr add-on repos has been updated with this too.

@LongChair LongChair referenced this pull request from a commit in plexinc/plex-home-theater-public
@LongChair LongChair Go back one level up if MediaWindow update failed, fixes #1472
This allows to get out of the section if anything goes wrong with the update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 25, 2012
  1. @fetzerch
  2. @fetzerch

    [addons] Modified vc project files to generate debug information for

    fetzerch authored
    libXBMC_addon / libXBMC_gui / libXBMC_pvr
  3. @fetzerch
Commits on Sep 29, 2012
  1. @fetzerch

    [addons] Added FileExists, StatFile, DeleteFile, CreateDirectory, Dir…

    fetzerch authored
    …ectoryExists and RemoveDirectory to libXBMCaddon
Something went wrong with that request. Please try again.