-
Notifications
You must be signed in to change notification settings - Fork 3
/
vc_tvservice.lua
100 lines (55 loc) · 3.04 KB
/
vc_tvservice.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
local ffi = require "ffi"
--[[
/*
* TV service host API,
* See vc_hdmi for HDMI related constants
* See vc_sdtv for SDTV related constants
*/
--]]
require "common"
require "vcos"
require "vchi"
require "vc_tvservice_defs"
require "vc_hdmi"
require "vc_sdtv"
ffi.cdef[[
typedef void (*TVSERVICE_CALLBACK_T)(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2);
int vc_vchi_tv_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections );
void vc_vchi_tv_stop( void );
void vc_tv_register_callback(TVSERVICE_CALLBACK_T callback, void *callback_data);
void vc_tv_unregister_callback(TVSERVICE_CALLBACK_T callback);
int vc_tv_enable_copyprotect(uint32_t cp_mode, uint32_t timeout);
int vc_tv_disable_copyprotect( void );
int vc_tv_show_info(uint32_t show);
int vc_tv_get_state(TV_GET_STATE_RESP_T *tvstate);
int vc_tv_power_off( void );
int vc_tv_test_mode_start(uint32_t colour, TV_TEST_MODE_T test_mode);
int vc_tv_test_mode_stop( void );
const char* vc_tv_notifcation_name(VC_HDMI_NOTIFY_T reason);
// SDTV Specific Routines
int vc_tv_sdtv_power_on(SDTV_MODE_T mode, SDTV_OPTIONS_T *options);
// HDMI Specific Routines
int vc_tv_hdmi_power_on_preferred( void );
int vc_tv_hdmi_power_on_preferred_3d( void );
int vc_tv_hdmi_power_on_best(uint32_t width, uint32_t height, uint32_t frame_rate,
HDMI_INTERLACED_T scan_mode, EDID_MODE_MATCH_FLAG_T match_flags);
int vc_tv_hdmi_power_on_best_3d(uint32_t width, uint32_t height, uint32_t frame_rate,
HDMI_INTERLACED_T scan_mode, EDID_MODE_MATCH_FLAG_T match_flags);
int vc_tv_hdmi_power_on_explicit(HDMI_MODE_T mode, HDMI_RES_GROUP_T group, uint32_t code);
int vc_tv_hdmi_get_supported_modes(HDMI_RES_GROUP_T group,
TV_SUPPORTED_MODE_T *supported_modes,
uint32_t max_supported_modes,
HDMI_RES_GROUP_T *preferred_group,
uint32_t *preferred_mode);
int vc_tv_hdmi_mode_supported(HDMI_RES_GROUP_T group, uint32_t mode);
int vc_tv_hdmi_audio_supported(uint32_t audio_format, uint32_t num_channels, EDID_AudioSampleRate fs, uint32_t bitrate);
int vc_tv_hdmi_get_av_latency( void );
int vc_tv_hdmi_set_hdcp_key(const uint8_t *key);
int vc_tv_hdmi_set_hdcp_revoked_list(const uint8_t *list, uint32_t num_keys);
int vc_tv_hdmi_set_spd(const char *manufacturer, const char *description, HDMI_SPD_TYPE_CODE_T type);
int vc_tv_hdmi_set_display_options(HDMI_ASPECT_T aspect, uint32_t left_bar_width, uint32_t right_bar_width, uint32_t top_bar_height, uint32_t bottom_bar_height, uint32_t overscan_flags);
int vc_tv_hdmi_ddc_read(uint32_t offset, uint32_t length, uint8_t *buffer);
int vc_tv_hdmi_set_attached(uint32_t attached);
int vc_tv_hdmi_set_property(uint32_t property, uint32_t param1, uint32_t param2);
int vc_tv_hdmi_get_property(uint32_t property, uint32_t *param1, uint32_t *param2);
]]