summaryrefslogtreecommitdiff
path: root/TvPlay.h (plain)
blob: 9e7f892687fff30c8c4ffda79439775d33c8e95d
1#ifndef _ANDROID_TV_PLAY_H_
2#define _ANDROID_TV_PLAY_H_
3
4#ifdef __cplusplus
5//extern "C" {
6#endif
7
8#include <TvClient.h>
9
10typedef 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_SPDIF,
27 SOURCE_ADTV,
28 SOURCE_MAX,
29} tv_source_input_t;
30
31typedef enum tv_source_type_e {
32 TYPE_REAL,
33 TYPE_VIRTUAL,
34} tv_source_type_t;
35
36class TvPlayObserver {
37public:
38 TvPlayObserver() {};
39 virtual ~TvPlayObserver() {};
40 virtual void onTvEvent (int32_t msgType, const Parcel &p) = 0;
41};
42
43class TvPlay : public TvListener {
44public:
45 TvPlay();
46 ~TvPlay();
47 int StartTv();
48 int StopTv();
49 int SwitchSourceInput(tv_source_input_t source_input);
50 //type , 1 is instaboot suspend
51 int DoSuspend(int type);
52 int DoResume(int type);
53 int GetSourceConnectStatus(tv_source_input_t source_input);
54 int GetCurrentSourceInput();
55 int GetHdmiAvHotplugDetectOnoff();
56 int setTvObserver (TvPlayObserver *ob);
57 int getAllTvDevices(int *devices, int *count);
58 int getHdmiPorts();
59 int getHdmiPort(tv_source_input_t source_input);
60 virtual void notify(int32_t msgType, const Parcel &p);
61
62 sp<TvClient> tvSession;
63
64private:
65 TvPlayObserver *mpObserver;
66 int mHdmiPorts;
67};
68
69#ifdef __cplusplus
70//}
71#endif
72
73#endif/*_ANDROID_TV_PLAY_H_*/
74