libweston: Add content-protection protocol implementation
This patch adds the content-protection protocol implementation, to enable a weston client application to request for content-protection for its content via HDCP. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
This commit is contained in:
@@ -111,7 +111,10 @@ enum weston_mode_aspect_ratio {
|
||||
WESTON_MODE_PIC_AR_256_135 = 4, /* DRM_MODE_PICTURE_ASPECT_256_135*/
|
||||
};
|
||||
|
||||
|
||||
enum weston_surface_protection_mode {
|
||||
WESTON_SURFACE_PROTECTION_MODE_RELAXED,
|
||||
WESTON_SURFACE_PROTECTION_MODE_ENFORCED
|
||||
};
|
||||
|
||||
struct weston_mode {
|
||||
uint32_t flags;
|
||||
@@ -1218,6 +1221,8 @@ struct weston_compositor {
|
||||
|
||||
struct weston_log_context *weston_log_ctx;
|
||||
struct weston_log_scope *debug_scene;
|
||||
|
||||
struct content_protection *content_protection;
|
||||
};
|
||||
|
||||
struct weston_buffer {
|
||||
@@ -1442,6 +1447,9 @@ struct weston_surface_state {
|
||||
|
||||
/* weston_protected_surface.set_type */
|
||||
enum weston_hdcp_protection desired_protection;
|
||||
|
||||
/* weston_protected_surface.enforced/relaxed */
|
||||
enum weston_surface_protection_mode protection_mode;
|
||||
};
|
||||
|
||||
struct weston_surface_activation_data {
|
||||
@@ -1573,6 +1581,8 @@ struct weston_surface {
|
||||
struct weston_buffer_release_reference buffer_release_ref;
|
||||
|
||||
enum weston_hdcp_protection desired_protection;
|
||||
enum weston_hdcp_protection current_protection;
|
||||
enum weston_surface_protection_mode protection_mode;
|
||||
};
|
||||
|
||||
struct weston_subsurface {
|
||||
@@ -1607,6 +1617,22 @@ struct weston_subsurface {
|
||||
struct wl_list unused_views;
|
||||
};
|
||||
|
||||
struct protected_surface {
|
||||
struct weston_surface *surface;
|
||||
struct wl_listener surface_destroy_listener;
|
||||
struct wl_list link;
|
||||
struct wl_resource *protection_resource;
|
||||
struct content_protection *cp_backptr;
|
||||
};
|
||||
|
||||
struct content_protection {
|
||||
struct weston_compositor *compositor;
|
||||
struct wl_listener destroy_listener;
|
||||
struct weston_log_scope *debug;
|
||||
struct wl_list protected_list;
|
||||
};
|
||||
|
||||
|
||||
enum weston_key_state_update {
|
||||
STATE_UPDATE_AUTOMATIC,
|
||||
STATE_UPDATE_NONE,
|
||||
@@ -2449,6 +2475,13 @@ void
|
||||
weston_buffer_send_server_error(struct weston_buffer *buffer,
|
||||
const char *msg);
|
||||
|
||||
int
|
||||
weston_compositor_enable_content_protection(struct weston_compositor *compositor);
|
||||
|
||||
void
|
||||
weston_protected_surface_send_event(struct protected_surface *psurface,
|
||||
enum weston_hdcp_protection protection);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user