Bug #104
openAmbilight Patch
0%
Description
I updated my Ambilight patch to apply to the XBMC4Xbox project. Warning: Dirty Code. Relevant only to users who own a SmartXX modchip.
Cheers
David.
Files
Updated by lagwagon667 over 14 years ago
Thx for your comment :)
fixed hard tabs / formatting in XBMC4Xbox_AmbiLightPatch4.patch
I did use a indentation of 2 spaces as this seems to be the default in xbmc. In AdvancedSettings.h this caused a lot of changes, as the indentation of the whole file was using 4 spaces (I reformatted the whole file to have uniform indentation). Let me know if I should revert this.
Updated by arnova over 14 years ago
The formatting in AdvancedSettings.h is fine the way it is.
class CAdvancedSettings
{
public:
CAdvancedSettings();
FYI: Is perfect. Furthermore shouldn't patches that implement functionality have proper formatting for the code they add but it shouldn't modify existing code. This should be done seperately.
Updated by lagwagon667 over 14 years ago
added another patch file, this time only the code additions/changes made by me are marked. I fitted my indentation to the surounding code.
For reference, as in all previous patches, I kept a copy of my AdvancedSettings.xml and PMIII's home.xml in the patch, both however are of course not necessary, for ambilight to work (well, one needs to enable it in AS.xml of course) and just for demonstration purposes.
Cheers, lagwagon667
Updated by arnova over 14 years ago
This is getting better :-) But still a few comments:
1)I don't like having an additional hunk of code in CDVDPlayerVideo. First because it makes merging changes over from mainline xbmc but furthermore this causes the code to only work for DVDPlayer (and not MPlayer). Maybe the output renderer in CXboxRenderer is a better location?
2) I guess it would be nice to #IFDEF (eg. #IFDEF AMBLIGHT_SUPPORT) the additions, just to allow enabling/disabling this at compile time just keep the binary size down.
Updated by lagwagon667 over 14 years ago
Hi arnova,
I added the #ifdefs as suggested. Just one note: I defined AMBILIGHT_SUPPORT in LED.h as this is the "main" location of ambilight (core functions are defined here). However, this means I cannot use this pragma in AdvancedSettings.h/.cpp as these files do not include LED.h. Do you know any better location where to define AMBILIGHT_SUPPORT? Otherwise the ambilight settings would always be existent, even if they are not necessary.
As for CDVDPlayerVideo: I didn't remove the changes yet (however, they need not to be applied for ambilight to work - of course, no ambilight is available then during DVD playback). Do you have any idea, where exactly in CXboxRenderer I can grab the YUV chunks, no matter which player is used to play whatever source of video? Right now I'm using DrawSlice in XboxRenderer which seems to be used only when playing movies from files, like DivX, MPG, not DVDs). I would prefer to use a more generic renderer which triggers on all kinds of video, if such exists.
Otherwise I will try to figure out myself a solution.