ScreenSaver plugin API for XBMC
#1
Thumbs Up 
got what i think is a simple idea that i have been thinking about for quite a long time now, be great if someone could code it after 1.1.0:

right now the existing screen savers (matrix, dimmer, and black-screen) are integrated into the xbmc xbe, but what i would like you to do is move those externaly as dll's just like our existing visualisation plugin interface, i think that basicaly all have to is re-use (plus maybe extend?) the visualisation plugin interface and thus we don't duplicate it, however the visualisation and screensaver parts need to be separated from a users point of view (so in the gui, the files and file-extentions) but in 'the background' they both use the same source code;

\xbmc\
\xbmc\visualisations\
\xbmc\visualisations\*.vis *& **.xml
\xbmc\screensavers\
\xbmc\screensavers\*.xscr *& **.xml

what then needs to be to be done is 'port' the matrix screensaver to a dll and give it a matching xml plus rename the file-extention,
it would be nice if also the "black screen" and "dim" screensaver functions where ported to dll's with xml's for unification/consistancy,
(but maybe "black screen" and "dim" are simpler to keep in the xbe?, same would be with a picture slideshow screensaver if coded?).

then settings needs to be created/added to the gui to control these and all future screensavers functions from within xbmc, ex:

new subsection ("screensavers"?) under general settings in xbmc gui:
* (of course different options will be grayed out above depending on what one select)

black screen saver: enable/disable
spindown harddrive when activated: enable/disable

dim screen saver: enable/disable
spindown harddrive when activated: enable/disable

picture/video screen saver: enable/disable
spindown harddrive when activated: enable/disable (only work if files on network)
picture playlist to display on idle: up/down (here on can browse existing playlists)
music playlist to play on idle (if any): up/down (here on can browse existing playlists)
video playlist to display on idle: up/down (here on can browse existing playlists)
audio visualization when music playlist only: enable/disable
showdown on finish (otherwise repeat): enable/disable
randomize/scramble picture playlist: enable/disable
randomize/scramble music playlist: enable/disable
randomize/scramble video playlist: enable/disable

note! before the "picture", "video" and "music" playlist options/features suggested above could work one would probebly first have to code so that save playlists (*.m3u/*.pls) from "my videos", "my music" and "my pictures into separate foders/locations (set in xboxmediacenter.xml), or?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#2
Sad 
now that xbmc 1.1.0 is out would anyone be interested in coding this?, i have already got a prize sponsor lined up (5 x x2vga Wink )
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
i'm allways intreseted in these sort of things, but as you know, there are other projects first to complete for me :-)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
ok, lets have a quick think about what would be required.

basically, there'd be a start routine (when the screensaver is initially loaded), a routine to run that does the rendering, and a routine to run to clean everything up.

so we probably just need:

start()
render()
stop()

start() would have to take in the d3ddevice info for rendering, but probably nothing else.

render() wouldn't need any arguments - it'd be called from xbmc's render() routine.

stop() would simply allow the visz to cleanup.

the only other thing we might need is a bool function needrender() which xbmc could call before calling the screensavers render function, which would state whether the screensaver requires xbmc to render it's own window first. this would allow various effects (fade out) to be performed before the visz starts.

anything else others can think of? it should be pretty simple to modify the visz api to get the current screensavers (dim, black, matrix) to use this system.

porting the slideshow + visz code etc. to use this system would not be trivial, however, and i doubt that it's worth it - better to handle those from xbmc itself imo.

comments welcome. note that it's not a high priority for me, but might be something fun to work on while i'm sorting out the settings mess :p

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
apologies - should have posted earlier; i have a working prototype for this, essentially along the lines of what jonathan has suggested. i should be ready to commit to cvs with a matrix trails dll plugin by the end of the weekend.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
:thumbsup:
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
Thumbs Up 
thanks you for looking at this forza Cool ...if just get some basic functions in then we can let the devs in the contest enhance it Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
the interface and all the xbmc core changes are now finished and i'll be committing it all to cvs just as soon as i get the damn matrix trails working in a dll - proving a little tricky as it used the xbox font stuff, so i'm having to extend the emulated calls considerably Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
<grumble>stupid matrix trails</grumble>
can't get the font stuff working so i've abandonded the matrix trails for the moment and late last night did a quick port of the pyro screensaver found in most linux disties - this has proved the template/framework works nicely Smile
all i've got left to do is change the setings gui to look for .scr files in the screensaver folder so the user can select the one they want and document the template project.

will commit all tonight.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
Thumbs Up 
k. though maybe call them *.xscr instead so users don't get 'confused' and think that they can use normal windows .scr files :p
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#11
Quote:k. though maybe call them *.xscr instead so users don't get 'confused' and think that they can use normal windows .scr files
true, i can see the forum posts now ....

called them .xbs - i.e. it's not an xbe (xbox executable), but an xbs (xbox screensaver). hopefully that will make sense to everyone else Smile

templatexbs.rar in the docs folder contains a documented skeleton and pyroxbs.rar contains the source of the pyro screensaver. when installing xbmc, a folder called 'screensavers ' should be created off the root xbmc folder (at the same level as the visualisations folder) and should contain all the .xbs files and their respective .xml configuration files. selection of the screensaver is made in the screensaver settings screen using the existing spin control.

let the screensaver coding begin!
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#12
Thumbs Up 
cool! thank you very much forza :bowdown: ...though can't/won't start the contest until recieved the prizes (not shipped yet).
@everyone, in the meantime please feel free to to enhance, test and/or debug this api interface as much as possible, tia Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#13
Exclamation 
moving this topic thread to the public xbmc development forum so all unofficial xbmc devs can help out on the new screensaver api interface,
(...plus this is a sneak heads up about the upcoming contest Wink ...sorry no, still i haven't recieved the prizes so won't officially announce yet).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#14
just a quick question:
are the screensavers and visualisation interfaces totally compatible? i.e. can you rename a visualisation.vis to visualisation.xbs and have it act as a screensaver?
Reply
#15
i wouldn't think so, but they should be close.

the screensavers don't need any info about any music running etc. for a start (so no onaudio() function), so this would have to be faked in order to give the visz something to render.

it probably wouldn't take too much to transfer one across.

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
ScreenSaver plugin API for XBMC2