|
Tizen HAL API
1.0
|
The HDCP provides functions for hdcp devices.
#include <hal-hdcp.h>
The hdcp devices have various specifications, so it's hard to control them using single code. The hdcp HAL provides common abstraction interfaces to control hdcp devices which are different.
The HDCP HAL allows creation of components required in secure playback including:
| FUNCTION | PRE-STATE | POST-STATE | SYNC TYPE |
|---|---|---|---|
| hal_hdcp_init() | NONE | INITIALIZED | SYNC |
| hal_hdcp_deinit() | INITIALIZED | NONE | SYNC |
| hal_hdcp_open() | INITIALIZED | OPENED | SYNC |
| hal_hdcp_close() | OPENED | INITIALIZED | SYNC |
For more information on the HDCP features and the macros, see HAL HDCP programming guides and tutorials.
Typedefs | |
| typedef enum hal_hdcp_error | hal_hdcp_error_e |
| Enumeration for the HDCP error. | |
| typedef enum hal_hdcp_state | hal_hdcp_state_e |
| Enumeration for the HDCP state. | |
| typedef enum hal_hdcp_command | hal_hdcp_command_e |
| Enumeration for the HDCP command. | |
| typedef struct hal_hdcp_batch_command_control | hal_hdcp_batch_command_control_s |
| The structure type of batch command. | |
| typedef enum hal_hdcp_message_type | hal_hdcp_message_type_e |
| Enumeration for the HDCP message type. | |
| typedef struct hal_hdcp_message | hal_hdcp_message_s |
| The structure type of the HDCP message. | |
| typedef hal_hdcp_error_e(* | hal_hdcp_message_cb )(hal_hdcp_message_s *message, void *user_data) |
| Callback function for notification from HDCP HAL. | |
| typedef struct _hal_backend_hdcp_funcs | hal_backend_hdcp_funcs |
| The structure type of the HDCP HAL functions. | |
| struct hal_hdcp_buffer_s |
The structure type of HDCP buffer.
Data Fields | |
| int | index |
| bool | is_secure |
| uint32_t | size |
| unsigned char * | data |
| int | fd |
| unsigned char* hal_hdcp_buffer_s::data |
The pointer of data buffer
The fd(file descriptor) of data buffer
The index of buffer
The flag which indicates the real data is managed in secure world or not
| uint32_t hal_hdcp_buffer_s::size |
The size of data buffer
| struct hal_hdcp_crypto_info_s |
The structure type of crypto information for encryption and decryption.
Data Fields | |
| uint32_t | iv_size |
| unsigned char * | iv |
| unsigned char* hal_hdcp_crypto_info_s::iv |
The IV(Initialization Vector) for block cipher modes of operation
| uint32_t hal_hdcp_crypto_info_s::iv_size |
The size of IV
| struct hal_hdcp_custom_command_s |
The structure type of the HDCP HAL custom command.
Data Fields | |
| const char * | name |
| void * | value |
| const char* hal_hdcp_custom_command_s::name |
The name of custom command
The value of custom command
| struct hal_hdcp_batch_command_control |
The structure type of batch command.
Data Fields | |
| uint64_t | command_set_flag |
| hal_hdcp_custom_command_s | custom |
flag for updating commands
The value for custom command
| struct hal_hdcp_message |
The structure type of the HDCP message.
Data Fields | |
| hal_hdcp_message_type_e | type |
| hal_hdcp_error_e | error_code |
The error code
The type of message
| struct _hal_backend_hdcp_funcs |
The structure type of the HDCP HAL functions.
Data Fields | |
| int(* | init )(void **hdcp_handle) |
| int(* | deinit )(void *hdcp_handle) |
| int(* | open )(void *hdcp_handle, hal_hdcp_device_type_e type, hal_hdcp_protocol_version_e version) |
| int(* | close )(void *hdcp_handle) |
| int(* | start_receiver )(void *hdcp_handle, uint32_t socket_port, uint32_t *hdcp_id) |
| int(* | stop_receiver )(void *hdcp_handle, uint32_t hdcp_id) |
| int(* | start_transmitter )(void *hdcp_handle, const char *socket_ip, uint32_t socket_port, uint32_t *hdcp_id) |
| int(* | stop_transmitter )(void *hdcp_handle, uint32_t hdcp_id) |
| int(* | allocate_output_buffer )(void *hdcp_handle, uint32_t size, bool is_secure, hal_hdcp_buffer_s **buffer) |
| int(* | release_output_buffer )(void *hdcp_handle, hal_hdcp_buffer_s *buffer) |
| int(* | decrypt )(void *hdcp_handle, hal_hdcp_buffer_s *input, hal_hdcp_crypto_info_s *decrypt_info, hal_hdcp_buffer_s *output) |
| int(* | encrypt )(void *hdcp_handle, hal_hdcp_buffer_s *input, uint32_t hdcp_id, hal_hdcp_crypto_info_s *encrypt_info, hal_hdcp_buffer_s *output) |
| int(* | set_command )(void *hdcp_handle, hal_hdcp_command_e command, void *value) |
| int(* | get_command )(void *hdcp_handle, hal_hdcp_command_e command, void **value) |
| int(* | set_batch_command )(void *hdcp_handle, hal_hdcp_batch_command_control_s *batch_command, hal_hdcp_command_e *error_command) |
| int(* _hal_backend_hdcp_funcs::allocate_output_buffer)(void *hdcp_handle, uint32_t size, bool is_secure, hal_hdcp_buffer_s **buffer) |
Allocates hdcp output buffer
| int(* _hal_backend_hdcp_funcs::close)(void *hdcp_handle) |
Closes HDCP
| int(* _hal_backend_hdcp_funcs::decrypt)(void *hdcp_handle, hal_hdcp_buffer_s *input, hal_hdcp_crypto_info_s *decrypt_info, hal_hdcp_buffer_s *output) |
Decrypts HDCP data
| int(* _hal_backend_hdcp_funcs::deinit)(void *hdcp_handle) |
Deinitializes HDCP HAL backend handle
| int(* _hal_backend_hdcp_funcs::encrypt)(void *hdcp_handle, hal_hdcp_buffer_s *input, uint32_t hdcp_id, hal_hdcp_crypto_info_s *encrypt_info, hal_hdcp_buffer_s *output) |
Encrypts HDCP data
| int(* _hal_backend_hdcp_funcs::get_command)(void *hdcp_handle, hal_hdcp_command_e command, void **value) |
Gets the current value of command
| int(* _hal_backend_hdcp_funcs::init)(void **hdcp_handle) |
Initializes HDCP HAL backend handle
| int(* _hal_backend_hdcp_funcs::open)(void *hdcp_handle, hal_hdcp_device_type_e type, hal_hdcp_protocol_version_e version) |
Opens HDCP
| int(* _hal_backend_hdcp_funcs::release_output_buffer)(void *hdcp_handle, hal_hdcp_buffer_s *buffer) |
Releases hdcp output buffer
| int(* _hal_backend_hdcp_funcs::set_batch_command)(void *hdcp_handle, hal_hdcp_batch_command_control_s *batch_command, hal_hdcp_command_e *error_command) |
Sets a set of commands
| int(* _hal_backend_hdcp_funcs::set_command)(void *hdcp_handle, hal_hdcp_command_e command, void *value) |
Sets the various command and value
| int(* _hal_backend_hdcp_funcs::start_receiver)(void *hdcp_handle, uint32_t socket_port, uint32_t *hdcp_id) |
Starts HDCP receiver
| int(* _hal_backend_hdcp_funcs::start_transmitter)(void *hdcp_handle, const char *socket_ip, uint32_t socket_port, uint32_t *hdcp_id) |
Starts HDCP transmitter
| int(* _hal_backend_hdcp_funcs::stop_receiver)(void *hdcp_handle, uint32_t hdcp_id) |
Stops HDCP receiver
| int(* _hal_backend_hdcp_funcs::stop_transmitter)(void *hdcp_handle, uint32_t hdcp_id) |
Stops HDCP transmitter
| typedef struct _hal_backend_hdcp_funcs hal_backend_hdcp_funcs |
The structure type of the HDCP HAL functions.
| typedef struct hal_hdcp_batch_command_control hal_hdcp_batch_command_control_s |
The structure type of batch command.
| typedef enum hal_hdcp_command hal_hdcp_command_e |
Enumeration for the HDCP command.
| typedef enum hal_hdcp_error hal_hdcp_error_e |
Enumeration for the HDCP error.
| typedef hal_hdcp_error_e(* hal_hdcp_message_cb)(hal_hdcp_message_s *message, void *user_data) |
Callback function for notification from HDCP HAL.
| [in] | message | The message from HDCP HAL |
| [in] | user_data | The user data for callback |
| typedef struct hal_hdcp_message hal_hdcp_message_s |
The structure type of the HDCP message.
| typedef enum hal_hdcp_message_type hal_hdcp_message_type_e |
Enumeration for the HDCP message type.
| typedef enum hal_hdcp_state hal_hdcp_state_e |
Enumeration for the HDCP state.
| enum hal_hdcp_command |
| enum hal_hdcp_error |
Enumeration for the HDCP error.
| enum hal_hdcp_state |