blob: d30522d0ca6a39a08cab3dd40dcd4ba550ce725f
1 | #ifndef _ANDROID_TV_PLAY_H_ |
2 | #define _ANDROID_TV_PLAY_H_ |
3 | |
4 | #ifdef __cplusplus |
5 | //extern "C" { |
6 | #endif |
7 | |
8 | #include <include/TvClient.h> |
9 | |
10 | typedef enum tv_source_input_e { |
11 | SOURCE_INVALID = -1, |
12 | SOURCE_TV = 0, |
13 | SOURCE_AV1, |
14 | SOURCE_AV2, |
15 | SOURCE_YPBPR1, |
16 | SOURCE_YPBPR2, |
17 | SOURCE_HDMI1, |
18 | SOURCE_HDMI2, |
19 | SOURCE_HDMI3, |
20 | SOURCE_VGA, |
21 | SOURCE_MPEG, |
22 | SOURCE_DTV, |
23 | SOURCE_SVIDEO, |
24 | SOURCE_IPTV, |
25 | SOURCE_DUMMY, |
26 | SOURCE_MAX, |
27 | } tv_source_input_t; |
28 | |
29 | class TvPlayObserver { |
30 | public: |
31 | TvPlayObserver() {}; |
32 | virtual ~TvPlayObserver() {}; |
33 | virtual void onTvEvent (int32_t msgType, const Parcel &p) = 0; |
34 | }; |
35 | |
36 | class TvPlay : public TvListener { |
37 | public: |
38 | TvPlay(); |
39 | ~TvPlay(); |
40 | int StartTv(); |
41 | int StopTv(); |
42 | int SwitchSourceInput(tv_source_input_t source_input); |
43 | //type , 1 is instaboot suspend |
44 | int DoSuspend(int type); |
45 | int DoResume(int type); |
46 | int GetSourceConnectStatus(tv_source_input_t source_input); |
47 | int GetCurrentSourceInput(); |
48 | int GetHdmiAvHotplugDetectOnoff(); |
49 | int setTvObserver (TvPlayObserver *ob); |
50 | virtual void notify(int32_t msgType, const Parcel &p); |
51 | |
52 | sp<TvClient> tvSession; |
53 | |
54 | private: |
55 | TvPlayObserver *mpObserver; |
56 | }; |
57 | |
58 | #ifdef __cplusplus |
59 | //} |
60 | #endif |
61 | |
62 | #endif/*_ANDROID_TV_PLAY_H_*/ |
63 |