blob: 60e59be159bf5e5293dbd82a4b8193778fb5d029
1 | // |
2 | // |
3 | // amlogic 2015 |
4 | // |
5 | // @ Project : tv |
6 | // @ File Name : |
7 | // @ Date : 2015 -7 |
8 | // @ Author : hao.fu |
9 | // |
10 | // |
11 | |
12 | |
13 | #if !defined(_AUTOBACKLIGHT_H) |
14 | #define _AUTOBACKLIGHT_H |
15 | #include "../tvin/CTvin.h" |
16 | #include "../tvutils/CThread.h" |
17 | #include "../vpp/CVpp.h" |
18 | |
19 | class AutoBackLight: public CThread { |
20 | private: |
21 | tv_source_input_type_t mAutoBacklightSource; |
22 | int mCur_source_default_backlight; |
23 | int mCur_sig_state; |
24 | bool mAutoBacklight_OnOff_Flag; |
25 | int mCurrent_backlight; |
26 | int mCur_dest_backlight; |
27 | |
28 | void adjustDstBacklight(); |
29 | void adjustBacklight(); |
30 | int HistogramGet_AVE(); |
31 | bool threadLoop(); |
32 | |
33 | public: |
34 | enum SIG_STATE { |
35 | SIG_STATE_STABLE = 1, |
36 | SIG_STATE_NOSIG = 2, |
37 | }; |
38 | |
39 | AutoBackLight(); |
40 | ~AutoBackLight(); |
41 | void updateSigState(int state); |
42 | void startAutoBacklight( tv_source_input_type_t source_type ); |
43 | void stopAutoBacklight(); |
44 | bool isAutoBacklightOn(); |
45 | }; |
46 | #endif |
47 |