View Full Version : Multi-task (background tasks like file-copy)?
theboxway
2007-07-11, 22:11
I was wondering if its possible to include a feature that allowed you to watch movies or do something else while copying files from one directory to another or whatever. Like when downloading a new version of xbmc with the script t3ch downloader, you could hide the progress bar and do something else. Like when watching a movie you can press X and the movie minimizes and you can browse through xbmc.
ultrabrutal
2007-07-11, 22:45
Yes copying in the background would be nice on occation. Code would have to be moved into a thread though and then you have all the syncronizing with the gui to take care off
jmarshall
2007-07-12, 01:45
And it's not a particularly high priority - a patch would certainly be welcome though.
There's plenty of examples of background threading stuff in SVN for someone to emulate.
An ideal project for someone wanting to get involved in development - it can be developed on win32 (no need for an xbox, or the xdk), or linux (no need for directx) - no excuses!
Cheers,
Jonathan
theboxway
2007-07-12, 01:53
So its possible..... I'm willing to pay for someone to code this!
Gamester17
2007-07-12, 12:00
would be a nice function in combination with a sync feature => http://xbmc.org/forum/showthread.php?t=27288
SixOneS4
2007-07-13, 05:37
And it's not a particularly high priority - a patch would certainly be welcome though.
There's plenty of examples of background threading stuff in SVN for someone to emulate.
An ideal project for someone wanting to get involved in development - it can be developed on win32 (no need for an xbox, or the xdk), or linux (no need for directx) - no excuses!
Cheers,
Jonathan
It's been quite a long time since I've even used XBMC since I sold my Xbox and I am in the process of getting my dev. environment set back up, could you point me in the right direction to check out some of these examples please? I am very interested to have a look at this and get involved.
jmarshall
2007-07-13, 08:04
For background thread stuff, you can check out the music info loader, or either of the scanners (musicinfoscanner and videoinfoscanner).
There's also the BackgroundInfoLoaders, and so on.
I'd probably suggest the music or video info scanners as the best examples to follow - pass the path to copy + the action to do, and then copy + paste the code that does the work from the filemanager over (most of it calls CFile::Cache() among other functions).
Cheers,
Jonathan
theboxway
2007-07-16, 04:03
Is this feature going to become a reality?
djdafreund
2007-07-16, 06:21
It will if you do it is what he's saying. The above is the way to do it. Takes some work, but nothing to major to do if you wanted to try it.
theboxway
2007-07-16, 18:08
well I'm not a developer but if theres a tutorial somewhere I'll give it a try because I really want this feature.
djdafreund
2007-07-17, 04:55
For background thread stuff, you can check out the music info loader, or either of the scanners (musicinfoscanner and videoinfoscanner).
There's also the BackgroundInfoLoaders, and so on.
I'd probably suggest the music or video info scanners as the best examples to follow - pass the path to copy + the action to do, and then copy + paste the code that does the work from the filemanager over (most of it calls CFile::Cache() among other functions).
Cheers,
Jonathan
That's the area to look, as mentioned. Those info scanners currently already have background support working fine. Go from there.
theboxway
2007-07-18, 02:18
Is there any developer interested in this project?
SixOneS4
2007-07-18, 04:14
well I'm not a developer but if theres a tutorial somewhere I'll give it a try because I really want this feature.
I'm not really sure what you expect in terms of a tutorial for programming, aside from something like this: http://newdata.box.sk/bx/c/
why would i do file management on my xbox when i got this nice little pc suited for the task?
Gamester17
2007-07-18, 16:10
well I'm not a developer but if theres a tutorial somewhere I'll give it a try because I really want this feature.http://www.xboxmediacenter.com/wiki/index.php?title=Appendix_D:_Development_Notes
http://xbmc.org/forum/showthread.php?t=1832 (many old Xbox tutorials have been removed)
and you can develop this feature on any platform - xbox, linux, win32. doesnt matter.
theboxway
2007-07-22, 06:18
Is there anyway a developer can do this? It doesnt sound very hard as you developers say that background codes are already in use. Please somebody help me with this....
Nick8888
2007-07-22, 08:13
Have you read any of the replies from the developers? They have said its not a big priority for them. They have also stated that if you want it you can add it. Continually bumping this thread with the same question isnt going to help you.
BritneysPAIRS
2007-07-22, 08:45
Hi I know my way around XBMC but am not that good at coding. Ill have a look into this can anyone help me..... as Im not very fast at this, but have managed to do quite a bit of other things with enough work.
theboxway
2007-07-22, 18:56
BritneysPAIRS maybe we can work together on this..
internick
2007-07-24, 11:27
Simply it's a really good idea.
Backgroud threads for low priority works is a fantastic idea that can save much time to anyone.
Congratulations.
BritneysPAIRS
2007-07-24, 13:14
ill look at the code this week... ive looked at it a little but will have time to look at all the code and understand the challenge in a day or 2. MSN me if you want to help. Cheers
theboxway
2007-07-27, 21:55
imagine being able to minimize the progress bar while downloading a new version of T3CH.
http://img70.imageshack.us/img70/329/screenshot003bi2.png
Gamester17
2007-07-28, 13:54
ill look at the code this week... ive looked at it a little but will have time to look at all the code and understand the challenge in a day or 2You might want to look at (or at lest read up on) OpenMP as well in regards to threading http://www.openmp.org
Would this solve the pauses related to visualizations switching & music playback?
no.
first of all, openmp is certainly not supported on the xbox. and openmp is used to split one task over several cores/cpu's, it wouldnt do any good here.
BritneysPAIRS
2007-07-30, 23:17
Hi ill take a proper look at this... this week as ill have time cheers, ill get back with issues or progress.
whiteblazer01
2007-08-06, 16:00
It would be great if I can continue using the File Manager when I'm transferring files. It sucks just sitting there waiting for multiple files to transfer, and not being able to go about XBMC.
Also, it would be nice if there was a transfer queue. Meaning, I can add files to be transferred to one folder, browse some more, then add some more files to be transferred to other folders, etc... Then say 'transfer files from queue', and it would transfer all the files I selected to their respective destinations.
Thanks!
theboxway
2007-08-20, 17:18
any luck?
theboxway
2007-09-02, 18:06
I'm thinking people lost interest in this project... oh well, it would have been a great feature.
I've subscribed to this thread, so if the need is still around in a few weeks I should be able to devote a fair bit of time to it.
No promises, however I hope this project should be a good intro to programming for xbmc.
I've made scripts that download in the background. The python script doesn't show any UI so it just starts up and begins to download what it's supposed to.
Here is what I was testing out. I'll have a script with a UI that will allow you to queue up your downloads etc. The script then saves this queue and exits. Then I'll launch the other script that takes the queue file and begins downloading in the background.
An ideal project for someone wanting to get involved in development - it can be developed on win32 (no need for an xbox, or the xdk), or linux (no need for directx) - no excuses!
Care to elaborate how I'd go about working on this at my piece o crap laptop running vector linux? Wouldn't I have to recompile either the XBE, the Win32 or Linux binaries?
It would be a lot quicker for me - this process will be painful with my poor c++ understanding - but I don't see how to reduce the compile time.
Also, it would be nice if there was a transfer queue. Meaning, I can add files to be transferred to one folder, browse some more, then add some more files to be transferred to other folders, etc... Then say 'transfer files from queue', and it would transfer all the files I selected to their respective destinations.
I don't see that feature as much of interest to me - I'm purely working on the routines to 'background' a task which is stealing focus. Primarily things like downloading a T3CH release, a video from the TV-Links script, performing synchronisation across multiple xboxs.
Not to say I wouldn't look at it, but like spiff said, a PC and decent ftp client would be much more suitable for general file management and a lot quicker.
jmarshall
2007-09-21, 00:18
Dunno about vector linux, but you could setup a VM with ubuntu if that's the way you want to go, or attempt compilation directly on vector linux - obviously you'll need the libraries etc. - check out the linuxport branch, read the readme.linux and see how much is doable.
I misunderstood you, I thought you meant there was a way to test my work outside of a running xbmc - in hindsight that seems pretty daft of me..
I'll stick with the win32 setup I have. (I like working on my laptop, but there's no way it could handle xbmc).
BritneysPAIRS
2007-09-21, 01:16
i have tested copying in the background and its painfully slow to switch stuff and pretty much locks up the xbox (its useable but not really) , lots of little files it didnt seem so bad but large video files made everything grind to a halt really.
Maybe a real coder could sort the issues but its not as easy as just copying in the background for a real solution
i have tested copying in the background and its painfully slow to switch stuff and pretty much locks up the xbox (its useable but not really) , lots of little files it didnt seem so bad but large video files made everything grind to a halt really.
This is a file from over your network, right?
Maybe a real coder could sort the issues but its not as easy as just copying in the background for a real solution
Well I'm certainly not one of those :D
BritneysPAIRS
2007-09-21, 04:30
its xbox to xbox or network to xbox.
ShortySco
2007-09-21, 05:43
its xbox to xbox or network to xbox.
Do you mean xbox to (another) xbox.
If so, can you tell us how it performs with local transfers please?
Cheers,
Shorty
BritneysPAIRS
2007-09-21, 09:29
same with local transfers.... but if you use an external client it runs fine... im not sure why this would be a programmer would know more about this than I would
ultrabrutal
2007-09-21, 09:42
Dumb question... Did you set priority on the thread to "idle"?
theboxway
2007-09-27, 02:04
Well file transfer isnt a priority..... I was thinking more like new T3ch downloading in the background.
theboxway
2007-09-30, 18:37
can you email me or upload the files necessary to do background work... I want to take a look at them. PM for email.
theboxway
2007-10-04, 01:57
any news?
any news?
In terms of downloading in the background, the code is already there - CDownloadQueueManager. You just can't utilize it from python scripts, yet..
As a proof of concept I've extended CUtil::ExecBuiltIn and queued 300 downloads, with great success. Likewise you can quite easily pass it the URL for one big file and let it work happily in the background.
Currently, the CHTTP class is hardwired to request Connection: Close from the webserver; which basically means each request will initiate a brand new connection forevery queueitem. For hundreds of small files this is an unnecessary overhead on the server. Ideally I'd have the connection "kept-alive" for successive downloads.
What I'm working on at the moment is a class that will monitor the download queue, in order to update a visual indicator, or at least inform the user when the queue has completed. Spiff mentioned that the Music and video scanner's OSD is a bit of a hack and would prefer a new base class. Problem being I'm only just finding my feet in C++, let alone the codebase! ???
The patch to include CDownloadQueue in CUtil::ExecBuiltIn is tiny and could be a useful stop-gap to offer threaded downloading to the scripts & plugins (albeit with no feedback on success/failure).
I recently trashed my windows box through excessive overclocking - hopefully explains why it took me this long to reply! :sad:
theboxway
2007-10-18, 04:42
how would install any of these?
http://www.koders.com/cpp/fid34F77C1E44E9E53D8F0958D535F4FABD224ADF1E.aspx?s =rssreader
Are you asking if there's a way to get this functionality by "installing" that c++ file?
There isn't.
theboxway
2007-10-26, 00:16
no i just want to know how to add those scripts or code to xbmc
The XBMC c++ code has to be recompiled with the patch, and then you'd have to write your own python script to take advantage of it.
If you don't have the necessary software and experience I'd recommend waiting until I've written a proper patch and submitted it to the devs.
I've no idea how long this will take..
Also bear in mind there's no guarantee that it would be accepted.
theboxway
2007-10-27, 00:51
thanks I appreciated
theboxway
2007-12-06, 02:02
well guys I'm hoping somebody is working on this..... cant wait until this feature is available
willers.nail
2008-01-29, 15:06
I am really interested with helping out with this feature but I am unsure of where to begin with as I have never coded anything in XBMC before. ragawu can you point me to where I can learn to code for this feature please.
basically; you need to do something equivalent to
CGUIDialogVideoScan / VideoInfoScanner
or
CGUIDialogMusicScan / MusicInfoScanner
And take a look at CDownloadQueue and CDownloadQueueManager in the sourcecode.
Would you guys be able to fix the file transfer status window so that it displays active transfers in the background, leaving me free to do other things in xbmc (like how xbox 360 has its own 'view active downloads' page on a blade)? Sometimes we need to transfer big files and/or over somewhat slower connections, and thats all we can do when we do it in xbmc.. sit there and wait for the bars to finish moving, but it would be nice to also watch a movie or listen to some music or play around with the xbmc settings while this is going on...
TksIA!
shoot sorry dude i did search but then i did a further search after this and found the thread