compositor: Enable HDCP for an output using weston.ini
This patch enables a user to opt for HDCP per output, by writing into the output section of weston.ini configuration file. HDCP is always enabled by default for the outputs. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
This commit is contained in:
@@ -1232,6 +1232,18 @@ wet_output_set_transform(struct weston_output *output,
|
||||
weston_output_set_transform(output, transform);
|
||||
}
|
||||
|
||||
static void
|
||||
allow_content_protection(struct weston_output *output,
|
||||
struct weston_config_section *section)
|
||||
{
|
||||
int allow_hdcp = 1;
|
||||
|
||||
if (section)
|
||||
weston_config_section_get_bool(section, "allow_hdcp", &allow_hdcp, 1);
|
||||
|
||||
weston_output_allow_protection(output, allow_hdcp);
|
||||
}
|
||||
|
||||
static int
|
||||
wet_configure_windowed_output_from_config(struct weston_output *output,
|
||||
struct wet_output_config *defaults)
|
||||
@@ -1269,6 +1281,8 @@ wet_configure_windowed_output_from_config(struct weston_output *output,
|
||||
free(mode);
|
||||
}
|
||||
|
||||
allow_content_protection(output, section);
|
||||
|
||||
if (parsed_options->width)
|
||||
width = parsed_options->width;
|
||||
|
||||
@@ -1720,6 +1734,8 @@ drm_backend_output_configure(struct weston_output *output,
|
||||
api->set_seat(output, seat);
|
||||
free(seat);
|
||||
|
||||
allow_content_protection(output, section);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user