Project

General

Profile

Actions

Bug #104

open

Ambilight Patch

Added by lagwagon667 over 13 years ago. Updated over 13 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Other (un-categorized)
Target version:
-
Start date:
Due date:
% Done:

0%

Resolution:
Affected Version:

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

XBMC4Xbox_AmbilightPatch.patch (4.43 KB) XBMC4Xbox_AmbilightPatch.patch lagwagon667, 28/08/2010 03:20 PM
XBMC4Xbox_AmbilightPatch2.patch (6.19 KB) XBMC4Xbox_AmbilightPatch2.patch Some bugfixes for Ambilight (AdvancedSettings.xml not longer ignored, etc.) lagwagon667, 31/08/2010 09:53 PM
XBMC4Xbox_AmbilightPatch3.patch (6.19 KB) XBMC4Xbox_AmbilightPatch3.patch Improved ambilight function, however, code is still a mess. lagwagon667, 01/09/2010 09:44 PM
XBMC4Xbox_AmbiLightPatch3.patch (59 KB) XBMC4Xbox_AmbiLightPatch3.patch All previous patches are incomplete, here's a recent complete patch. lagwagon667, 04/09/2010 09:23 AM
XBMC4Xbox_AmbiLightPatch4.patch (79.5 KB) XBMC4Xbox_AmbiLightPatch4.patch fixed hard tabs / formatting lagwagon667, 08/09/2010 08:13 AM
XBMC4Xbox_AmbiLightPatch5.patch (44.9 KB) XBMC4Xbox_AmbiLightPatch5.patch fixed hard tabs / formatting 2nd try :) lagwagon667, 08/09/2010 09:47 PM
XBMC4Xbox_AmbiLightPatch6.patch (42.5 KB) XBMC4Xbox_AmbiLightPatch6.patch Added #define AMBILIGHT_SUPPORT to enable / disable ambilight at compile time lagwagon667, 14/09/2010 11:18 PM
Actions #1

Updated by arnova over 13 years ago

Please fix formatting/remove hard tabs.

Actions #2

Updated by lagwagon667 over 13 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.

Actions #3

Updated by arnova over 13 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.

Actions #4

Updated by lagwagon667 over 13 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

Actions #5

Updated by arnova over 13 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.

Actions #6

Updated by lagwagon667 over 13 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.

Actions

Also available in: Atom PDF