where to browse xbmc generated python api code?
#1
http://wiki.xbmc.org/index.php?title=Codegeneration states that the python api is generated automatically from the c++ sources.

Does an online version of the generated python api source code exist (thankful for any pointers)?

Background: I'm trying to avoid compiling xbmc just to have a look at the generated python api code.
Reply
#2
Google: xbmc pydocs
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Generated C++ sources from Frodo 12.2: https://dl.dropboxusercontent.com/u/2435...erated.zip
Reply
#4
(2013-10-15, 22:23)Martijn Wrote: Google: xbmc pydocs

Thanks forr the reply. But I am looking for the generated python code, not the documentation under http://mirrors.xbmc.org/docs/python-docs/12.2-frodo/. Or did I miss something obvious?

(2013-10-15, 23:03)Roman_V_M Wrote: Generated C++ sources from Frodo 12.2: https://dl.dropboxusercontent.com/u/2435...erated.zip

Thanks for your reply. But I am looking for the generated python code, not the c++ code. Do you know where I can find this?
Reply
#5
The generated code is useless outside xbmc.
The only way it has any use is if you are running xbmc itself
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
(2013-10-16, 20:31)Martijn Wrote: The generated code is useless outside xbmc.
The only way it has any use is if you are running xbmc itself

I understand this. But the PythonDoc only has this on

Player-onPlayBackEnded


Quote:onPlayBackEnded(...)
onPlayBackEnded() -- onPlayBackEnded method.

I would like to know how this 'callback'/'event' is implemented in python, since I've read that python doesn't actually have 'events' like for example c# has.

Can you point me to some example code which uses f.ex. 'onPlayBackEnd' (or other xbmc.Player().on* 'callback' methods) in a sensible manner?
Reply
#7
https://github.com/XBMC-Addons/service.s...lt.py#L738
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#8
(2013-10-16, 20:27)draptik Wrote:
(2013-10-15, 23:03)Roman_V_M Wrote: Generated C++ sources from Frodo 12.2: https://dl.dropboxusercontent.com/u/2435...erated.zip

Thanks for your reply. But I am looking for the generated python code, not the c++ code. Do you know where I can find this?

I'm afraid, nowhere. These are the files you've asked for. XBMC Python modules are written in C++ and exposed to Python via C>Python API (SWIG).
Reply
#9
(2013-10-16, 22:31)Martijn Wrote: https://github.com/XBMC-Addons/service.s...lt.py#L738

Thanks for the example usage code! I will have a look at this.

(2013-10-16, 22:53)Roman_V_M Wrote:
(2013-10-16, 20:27)draptik Wrote:
(2013-10-15, 23:03)Roman_V_M Wrote: Generated C++ sources from Frodo 12.2: https://dl.dropboxusercontent.com/u/2435...erated.zip

Thanks for your reply. But I am looking for the generated python code, not the c++ code. Do you know where I can find this?

I'm afraid, nowhere. These are the files you've asked for. XBMC Python modules are written in C++ and exposed to Python via C>Python API (SWIG).

Ah, thanks for pointing this out! I was not aware from the docs or the wiki that there is yet another abstraction layer between c and python (swig). I will have to look at swig then. Is this a good starting point: http://www.swig.org/Doc1.3/Python.html ?
Reply
#10
(2013-10-16, 20:27)draptik Wrote: Ah, thanks for pointing this out! I was not aware from the docs or the wiki that there is yet another abstraction layer between c and python (swig). I will have to look at swig then. Is this a good starting point: http://www.swig.org/Doc1.3/Python.html ?

Maybe if you explain what you want to accomplish, we could provide some pointers about if and how it can (or cannot) be done, without digging into C++ code.
Reply
#11
(2013-10-17, 08:11)Roman_V_M Wrote: Maybe if you explain what you want to accomplish, we could provide some pointers about if and how it can (or cannot) be done, without digging into C++ code.

Here is the original problem description: http://forum.xbmc.org/showthread.php?tid=173639

Short version: Resume playback in audio files (similar to video files) does not seem to be supported.

Intended workflow for implementation:

-> create a new AudioBookPlayer, derived from the default xbmc Player
-> when AudioBookPlayer is stopped, paused, aborted, etc
---> save (1) the timestamp within the audio file and (2) the 'audio file id' (propably to a separate DB, since I couldn't find a suitable table/column in the default xbmc DB)
-> when AudioBookPlayer is started AND a file is selected from the "recently played" list
---> jump the the correct position in the audio file (similar to the video player behaviour)

Since I'm a c# and java developer, I figured the python api would be the preferred language for trying to implement this.
Reply

Logout Mark Read Team Forum Stats Members Help
where to browse xbmc generated python api code?0