XBMC GUILib port to Xbox 360

Discussion of XBMC4XBOX development.
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

XBMC GUILib port to Xbox 360

Post by r32crazy01 »

Hey,

I've been working on porting the XBMC4XBOX Guilib to the XBOX 360.

Some windows have no contents yet, and it's still missing the controls needed to browse media/files, but I'm currently working on those. I have not got animations working yet either.

If anyone is interested in contributing I can put the code up in a SVN repo. I'm also going to use some code from the open source Freestyle 360 dash for features like the NTP and FTP server. The FFMPEG libraries and FFPLAY have already been ported to 360 so eventually I would like to look at using them as a player core.

Main bugs:
1.) The screen coordinates and sizes for images are messed up, this is due to my lack of Direct3D matrices knowledge and the Xbox 360 XDK no longer supporting the XYZ_RWH flag (unlike the original Xbox). If someone with more experience is willing to setup the 2D projection matrix it would be awesome :) . I have got around this atm by using crazy numbers in the XML skin files for image coordinates and sizes.

2.) The fonts/labels in the XML files need to be listed last, this is due to the 360 XDK XUI lib, hopefully I can work this out by reading through the docs.

3.) Windows should be opening slightly quicker.

PS: Please be kind if you find any silly bugs as its very much a early WIP test and I'm a junior dev :P
Last edited by r32crazy01 on Sun May 15, 2016 11:37 pm, edited 2 times in total.
User avatar
professor_jonny
Posts: 1260
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 63 times
Been thanked: 187 times

Re: XBMC GUILib port to Xbox 360

Post by professor_jonny »

are you planning to expand the hid with custom functions on the 360?
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

Not at this stage, but in future I would like to expand it with 360 functions.

Update:
- Bug #2 font issue = fixed.
- A cut down version of ffplay is now integrated and video playback working (using Ced2911's port the ffmpeg libs).

No support for seeking yet.
User avatar
BuZz
Site Admin
Posts: 1890
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: XBMC GUILib port to Xbox 360

Post by BuZz »

I think it would be useful to put the code online - the source needs to be available anyway as it's GPL, and this simplifies it (ie not having to manually hand out the sourcecode on request)
User avatar
professor_jonny
Posts: 1260
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 63 times
Been thanked: 187 times

Re: XBMC GUILib port to Xbox 360

Post by professor_jonny »

r32crazy01 wrote:Not at this stage, but in future I would like to expand it with 360 functions.

Update:
- Bug #2 font issue = fixed.
- A cut down version of ffplay is now integrated and video playback working (using Ced2911's port the ffmpeg libs).

No support for seeking yet.
I would be worth you sporting a post over at realmodscene as they have the xui workshop for editing the hub for auroa and fsd.
team xecuter may even put you on their news feed if you sport a post over there :-)
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

@professor_jonny: Thanks for the suggestion, I might wait till I get little further and have media browsing working.

@Buzz: Yeah, I was planning to put the source up publicly. I will upload the source and the latest binaries soon.

Update:
You can now play video full screen with sound, but the 360 XDK D3D9 API no longer has support for a hardware overlay :( (why would Microsoft remove this?!), so not sure how to get smooth playback while the video preview view port is displayed in GUI mode. This may also be an issue for OSD while in full screen until we find another solution.

Working on media browsing controls ATM so until then, the Y game pad button launches the video called testvideo.avi in the root of the xbmc360 folder.

Unfortunately I can’t get text working for GUI things like spin control until I work out the 2D projection matrix issue I mentioned in my first post. I’m struggling with this one so any help would be much appreciated.

Current main bugs:
- Small memory leak in CGUISound – Should be easy to fix, just not releasing the sound I think.
- Video playback has started lagging slightly for some reason since I move the thread creation to the CThread abstract class. = Fixed
- 2D projection matrix for images not setup to match screen coordinates.

WIP:
- Settings menu.
- Media browsing controls.
Last edited by r32crazy01 on Sat May 28, 2016 2:47 pm, edited 2 times in total.
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

Video playback lag bug = Fixed.

Sorry for the delay putting up the files, they should be up by the weekend.
Last edited by r32crazy01 on Tue May 17, 2016 9:50 am, edited 1 time in total.
Geeba
Posts: 531
Joined: Wed Jul 04, 2012 11:32 am
Location: UK
Has thanked: 59 times
Been thanked: 31 times

Re: XBMC GUILib port to Xbox 360

Post by Geeba »

Daft question I'm sure... but what is XBMC GULib? :?
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

Geeba wrote:Daft question I'm sure... but what is XBMC GULib? :?
It's the XBMC graphical user interface/skinning engine. I should probably rename the thread as now it also includes a basic player core (cut down version ffplay) as well, plus I'm looking to expand it with more XBMC features in future.
Geeba
Posts: 531
Joined: Wed Jul 04, 2012 11:32 am
Location: UK
Has thanked: 59 times
Been thanked: 31 times

Re: XBMC GUILib port to Xbox 360

Post by Geeba »

r32crazy01 wrote:
Geeba wrote:Daft question I'm sure... but what is XBMC GULib? :?
It's the XBMC graphical user interface/skinning engine. I should probably rename the thread as now it also includes a basic player core (cut down version ffplay) as well, plus I'm looking to expand it with more XBMC features in future.

Ahh ok - so xbmc on 360 is still being looked into? - I thought it was a complete no go... dificault modding proceedure and no GPU access/aceleration had put a stop to it ever being viable? :?
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

Geeba wrote:
r32crazy01 wrote:
Geeba wrote:Daft question I'm sure... but what is XBMC GULib? :?
It's the XBMC graphical user interface/skinning engine. I should probably rename the thread as now it also includes a basic player core (cut down version ffplay) as well, plus I'm looking to expand it with more XBMC features in future.

Ahh ok - so xbmc on 360 is still being looked into? - I thought it was a complete no go... dificault modding proceedure and no GPU access/aceleration had put a stop to it ever being viable? :?
The other attempts have used different methods and run into the above issues .i.e running it via Linux (No GPU access/acceleration) and patching the original Xbox versions xbmc.xbe to try and get it running via software emulation used for original Xbox backwards compatibility on the 360.

The method I'm using is to port the code using the Xbox 360 SDK so the above issues don't apply, the hardest part now is changes in the 360 SDK D3D9 API and what it can support, but these can all be overcome.
Last edited by r32crazy01 on Thu May 19, 2016 3:50 am, edited 1 time in total.
Skyhi
Posts: 14
Joined: Sat Sep 15, 2012 12:31 am
Has thanked: 2 times
Been thanked: 2 times

Re: XBMC GUILib port to Xbox 360

Post by Skyhi »

Hey Crazy - glad to see someone else interested in porting this to Xbox 360!

:D
Geeba
Posts: 531
Joined: Wed Jul 04, 2012 11:32 am
Location: UK
Has thanked: 59 times
Been thanked: 31 times

Re: XBMC GUILib port to Xbox 360

Post by Geeba »

Sounds great.... complex but great :D

But isnt the modding of the 360 still a complete shag? ie far from straight forward? - I've never owned one but the fact that I couldn't mod it put me off as games I play on my PC.

How powerfull is it now? will it play 1080p or 4K video? :?
User avatar
professor_jonny
Posts: 1260
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 63 times
Been thanked: 187 times

Re: XBMC GUILib port to Xbox 360

Post by professor_jonny »

they are harder to mod but once you have done a few it is no problems

it is a triple core ppc custom chipset running a 3.2ghz but really we don't know how much power it really has or can compare it to any thing as it is highly customised specialist processor.

in theory it should have at least 3-4 times the power of the original processor as generally emulation requires a device 3-5 times faster than the original system, and as it can emulate the basics of the xbox with backward compatibility I would say it should be able to decode 1080p h264 purely in software.
fxmech
Posts: 673
Joined: Wed Aug 01, 2012 9:15 am
Has thanked: 37 times
Been thanked: 46 times

Re: XBMC GUILib port to Xbox 360

Post by fxmech »

Once you've modded it, the 360 really does function well and is easy to manage and use.

The bulk of the work so far has just been really on gaming, alternative dashboards for game launching, etc.

Aurora is a really impressive dash, though. LiNK service is integrated into the system blade, too, so system linking is way easier than using Xlink Kai though.

Anyway, I would recommend the 360 as a modded gaming console, second only to our beloved Xbox of course!
Skyhi
Posts: 14
Joined: Sat Sep 15, 2012 12:31 am
Has thanked: 2 times
Been thanked: 2 times

Re: XBMC GUILib port to Xbox 360

Post by Skyhi »

Any chance of putting up the source for this - I'd love to take a look!

Thanks :)
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

Thanks guys, yep I will defiantly have the code up soon. I was meaning to have it up last weekend but I have been busy with work and not had a chance to finish a few things I want to get done before uploading it. If you can contribute it would be awesome :) .

I’ve tested playing quite a few video files and it has played everything I’ve thrown at it, ffmpeg appears to contain a lot of codecs.

I’m thinking of moving this project to UWP on the XBOX One now this has just recently become possible, see the following link for more information: http://team-xecuter.com/forums/threads/ ... n-Xbox-One

Update:
-Settings working.
-Radio button control working.
-Spin control working.
-Skin switching working (only 1 skin atm tho).

Bugs:
-Text and image alignment on spin/radio button controls slightly off. (Again due to the 2d projection matrix issue).
-Font alignment can’t be set on the fly (XUI limitation), need to find a work around. Might have to create a right aligned font alongside each normal font created in fonts.xml
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 216 times
Contact:

Re: XBMC GUILib port to Xbox 360

Post by Dom DXecutioner »

Interesting work. Please do keep in mind that since you're using xbmc source code, you must make the source available to the public in order to comply with the license...

That being said, awesome work!
Image
User avatar
professor_jonny
Posts: 1260
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 63 times
Been thanked: 187 times

Re: XBMC GUILib port to Xbox 360

Post by professor_jonny »

r32crazy01 wrote:
I’m thinking of moving this project to UWP on the XBOX One now this has just recently become possible, see the following link for more information: http://team-xecuter.com/forums/threads/ ... n-Xbox-One
I fear that what Microsoft gives you in recourses under UWP wont be enough to higher bit rate videos but it would be cool to have a play and see what you can do. being as it is an x86 platform you wont have endian issues in porting code direct from xbmc source.
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: XBMC GUILib port to Xbox 360

Post by r32crazy01 »

You can download the latest binaries below, I will post a link to the code shortly once I get it hosted.

https://drive.google.com/file/d/0B46dhO ... pYcEU/view

There are 4 videos hard coded at the moment (each one is a different thumbnail under the videos tab).

As I have mentioned previously, the text and images under settings are out of alignment atm. Also the only setting that does anything atm is the skin selection setting. The others are there just for testing atm.

Main Bug:
- Memory leak in FFPlay:
You can only watch 2 or 3 of the test videos before a crash as there is a memory leak with the packet queues not been released. This player is a bit of mess and just for testing purposes really, I'm currently working on porting a early revision of DVDPlayer (I'm using an earlier revision as the latter ones are to complex for me).

Thanks
Post Reply