![]() |
HBBTV
22.11.0
|
HBBTV engine function definitions. More...
Go to the source code of this file.
Classes | |
struct | S_HBBTV_BROADCAST_APP |
Macros | |
#define | HBBTV_DBG_THBBAPI 1 |
#define | HBBTV_DBG_TAIT (1 << 2) |
#define | HBBTV_DBG_TKEYS (1 << 3) |
#define | HBBTV_DBG_TAPP (1 << 4) |
#define | HBBTV_DBG_TPVR (1 << 5) |
#define | HBBTV_DBG_TAV (1 << 6) |
#define | HBBTV_DBG_TOBJS (1 << 7) |
#define | HBBTV_DBG_TSTRMEV (1 << 8) |
#define | HBBTV_DBG_TVB (1 << 9) |
#define | HBBTV_DBG_TCHN (1 << 10) |
#define | HBBTV_DBG_TAVC (1 << 11) |
#define | HBBTV_DBG_TSRCH (1 << 12) |
#define | HBBTV_DBG_TDRM (1 << 13) |
#define | HBBTV_CAP_DL 1 |
bit representing support for Download feature | |
#define | HBBTV_CAP_PVR 2 |
bit representing support for PVR feature | |
#define | HBBTV_CAP_DRM 4 |
bit representing support for DRM feature | |
Typedefs | |
typedef void(* | F_HBBTV_DRM_SEND) (U8BIT *message, U32BIT length, U32BIT id, void *user_data) |
typedef void(* | F_HBBTV_DSMCC_FILE_CALLBACK) (void *user_data, U32BIT err, U8BIT *data, U32BIT size) |
Callback function to provide result of file request (using HBBTV_DsmccRequestFile) More... | |
Enumerations | |
enum | E_HBBTV_CHANNEL_CHANGE_STATUS { HBBTV_CHANNEL_CHANGE_SUCCEEDED, HBBTV_CHANNEL_CHANGE_WRONG_TUNER, HBBTV_CHANNEL_CHANGE_NO_SIGNAL, HBBTV_CHANNEL_CHANGE_TUNER_IN_USE, HBBTV_CHANNEL_CHANGE_PARENTAL_LOCKED, HBBTV_CHANNEL_CHANGE_ENCRYPTED, HBBTV_CHANNEL_CHANGE_UNKNOWN_CHANNEL, HBBTV_CHANNEL_CHANGE_INTERRUPTED, HBBTV_CHANNEL_CHANGE_RECORDING_IN_PROGRESS, HBBTV_CHANNEL_CHANGE_INSUFFICIENT_RESOURCES, HBBTV_CHANNEL_CHANGE_CHANNEL_NOT_IN_TS, HBBTV_CHANNEL_CHANGE_UNKNOWN_ERROR } |
enum | E_HBBTV_MP_STATE { HBBTV_MP_STOPPED = 0, HBBTV_MP_PLAYING, HBBTV_MP_PAUSED, HBBTV_MP_CONNECTING, HBBTV_MP_BUFFERING, HBBTV_MP_EOF, HBBTV_MP_ERROR } |
enum | E_HBBTV_RECPLAYER_STATE { HBBTV_RECPLAYER_STOPPED, HBBTV_RECPLAYER_PLAYING, HBBTV_RECPLAYER_PAUSED, HBBTV_RECPLAYER_BUFFERING, HBBTV_RECPLAYER_EOF, HBBTV_RECPLAYER_ERROR } |
enum | E_HBBTV_RECORDING_EVENT { HBBTV_RECORDING_NEWLY_SCHEDULED, HBBTV_RECORDING_ABOUT_TO_START, HBBTV_RECORDING_ACQUIRING_RESOURCES, HBBTV_RECORDING_STARTED, HBBTV_RECORDING_UPDATED, HBBTV_RECORDING_COMPLETED, HBBTV_RECORDING_PART_COMPLETED, HBBTV_RECORDING_FAILED_RESOURCE_LIMITATION, HBBTV_RECORDING_FAILED_INSUFFICIENT_STORAGE, HBBTV_RECORDING_FAILED_TUNER_CONFLICT, HBBTV_RECORDING_FAILED_NOT_ALLOWED, HBBTV_RECORDING_FAILED_UNKNOWN_ERROR, HBBTV_RECORDING_DELETED, HBBTV_RECORDING_TS_STARTING, HBBTV_RECORDING_TS_STARTED, HBBTV_RECORDING_TS_STOPPED, HBBTV_RECORDING_TS_NOT_POSSIBLE, HBBTV_RECORDING_TS_NOT_ALLOWED, HBBTV_RECORDING_TS_FAILED } |
enum | E_HBBTV_STRING_FORMAT { HBBTV_STRING_FORMAT_SI, HBBTV_STRING_FORMAT_HBBTV } |
enum | E_HBBTV_DRM_ERROR_STATE { HBBTV_DRM_NO_LICENSE, HBBTV_DRM_INVALID_LICENSE, HBBTV_DRM_VALID_LICENSE } |
OIPF Vol.5, section 7.13.6. | |
Functions | |
E_HBBTV_ERR | HBBTV_Initialise (U32BIT task_priority, E_HBBTV_STRING_FORMAT string_format, U8BIT options) |
Initialises the HBBTV module. More... | |
void | HBBTV_Finalise (void) |
Finalises the HBBTV module. | |
void | HBBTV_Start (S_HBBTV_DVB_LOCATOR *p_dvb_locator) |
Allows the HbbTV engine to run on the specified channel and handle the applications lifecyle as specified by the HbbTV standard. More... | |
void | HBBTV_Stop (void) |
Stops the HbbTV engine and prevents any HbbTV application to be displayed. | |
E_HBBTV_ERR | HBBTV_HbbTvSetUrl (const U8BIT *url) |
Launches a "Broadcast-INDEPENDENT" application. The url could be an XML-AIT file. More... | |
E_HBBTV_ERR | HBBTV_GetBroadcastAppList (S_HBBTV_BROADCAST_APP **apps, U32BIT *total) |
Returns a list of HbbTv Broadcast Appications signalled in the current AIT. The list must be freed using HBBTV_ReleaseAppList. More... | |
void | HBBTV_ReleaseAppList (S_HBBTV_BROADCAST_APP *apps) |
Releases the list of applications allocated by HBBTV_GetBroadcastAppList. More... | |
E_HBBTV_ERR | HBBTV_LaunchApplication (U32BIT org_id, U16BIT app_id) |
Launches the specified application. More... | |
E_HBBTV_ERR | HBBTV_NotifyKeyPress (E_HBBTV_KEY key) |
Notifies the HbbTV engine of a user key press. If the key is not required by an active HbbTV application, then the function returns HBBTV_IGNORED_REQUEST. More... | |
E_HBBTV_ERR | HBBTV_ProcessAitSection (U16BIT service_id, U8BIT *data, U32BIT nbytes) |
Requests the HbbTV engine to process the specified AIT. The HbbTV engine expects the relevant AITs only (the first one after HBBTV_Start and when the version changes). If more than one stream is signalled in the PMT for a service with an application_signalling_descriptor, then the application_signalling_descriptor for the stream containing the AIT for the HbbTV application shall include the HbbTV application_type (0x0010). More... | |
E_HBBTV_ERR | HBBTV_NotifyServiceListChange (void) |
Notifies the HbbTV ending that it must update Service list. This will cause the engine to subsequently call HBBTV_ObtainServiceList(). More... | |
E_HBBTV_ERR | HBBTV_NotifyParentalRatingChange (BOOLEAN blocked) |
Notifies the HbbTV engine that the parental rating of the currently playing service has changed. More... | |
E_HBBTV_ERR | HBBTV_NotifyChannelChangeStatus (U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, E_HBBTV_CHANNEL_CHANGE_STATUS status) |
Notifies the HbbTV engine of a change in the status of the service identified by the specified DVB triplet. More... | |
E_HBBTV_ERR | HBBTV_NotifyProgrammeChanged (void) |
Notifies the HbbTV engine that the present/following events have changed on the current service. More... | |
E_HBBTV_ERR | HBBTV_NotifyVideoAspectRatio (E_HBBTV_ASPECT_RATIO ratio) |
Notifies the HBBTV module of the aspect ratio of the video stream. This is used by the engine to correctly preserve the aspect ratio of resised videos as specified by the HbbTV specification. More... | |
void | HBBTV_MPNotifyState (void *ihdl, E_HBBTV_MP_STATE state) |
Notifies the HbbTV engine that the media player state has changed. More... | |
E_HBBTV_ERR | HBBTV_NotifyRecordingEvent (U32BIT id, E_HBBTV_RECORDING_EVENT event) |
Notifies the HbbTV engine of a recording event. More... | |
E_HBBTV_ERR | HBBTV_NotifyRecordingPlayerState (void *ihdl, E_HBBTV_RECPLAYER_STATE state) |
Notifies the HbbTV engine that the media player state has changed. More... | |
E_HBBTV_ERR | HBBTV_DRMRegister (U16BIT ca_system_id, F_HBBTV_DRM_SEND send_function, void *user_data) |
Registers a DRM system with the HbbTV engine. Registering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10. More... | |
void | HBBTV_DRMUnregister (U16BIT ca_system_id) |
Unregisters a DRM system with the HbbTV engine. Unegistering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10. More... | |
E_HBBTV_ERR | HBBTV_NotifyDRMMessageResult (U32BIT id, U8BIT *message, U32BIT length, U8BIT result_code) |
Notifies the result message from the DRM system.The HbbTV engine copies the content of message before returning. More... | |
E_HBBTV_ERR | HBBTV_NotifyDRMSystemMessage (U8BIT *message, U32BIT length, U16BIT ca_system_id) |
Notifies an incoming message from the DRM system. The HbbTV engine copies the content of message before returning. More... | |
E_HBBTV_ERR | HBBTV_NotifyDRMRightsError (E_HBBTV_DRM_ERROR_STATE error_state, U16BIT ca_system_id, U8BIT *rights_issuer_url, U32BIT rights_issuer_length) |
Notifies an incoming rights error from the DRM system. More... | |
E_HBBTV_ERR | HBBTV_NotifyLowMemory (void) |
Notifies the HbbTv engine that the device is running low on available memory for running applications. More... | |
void | HBBTV_DBGSetMask (U32BIT debug_mask) |
Sets the debug mask. More... | |
E_HBBTV_ERR | HBBTV_SetSystemInfo (S_HBBTV_SYSTEM_INFO *info) |
Informs the HbbTV engine of some information regarding the system. The HbbTV engine makes a copy of the strings in the structure. More... | |
void | HBBTV_DsmccSetCallback (F_HBBTV_DSMCC_FILE_CALLBACK func) |
Provide function to return result of file requests. More... | |
void | HBBTV_DsmccRequestFile (void *user_data, U8BIT *url) |
Request file from DSMCC (with 'dvb:' origin). The result is returned via function given to HBBTV_DsmccSetCallback(). This may be done synchronously or asynchronously. More... | |
HBBTV engine function definitions.
typedef void(* F_HBBTV_DSMCC_FILE_CALLBACK) (void *user_data, U32BIT err, U8BIT *data, U32BIT size) |
Callback function to provide result of file request (using HBBTV_DsmccRequestFile)
user_data | User data passed to HBBTV_DsmccRequestFile |
err | result of file request - zero is success |
data | Pointer to file data (only valid in callback function) |
size | Length of file data |
void HBBTV_DBGSetMask | ( | U32BIT | debug_mask | ) |
Sets the debug mask.
debug_mask | Bitmask of the following values (by default the relative prints are disabled)
|
When the engine is compiled in release mode (see environment variable DTVKIT_BUILD_MODE) this function has no effect and no prints will be produced. In debug mode, if the debug mask is not set, the only active debug prints will be relative to errors and generic messages. The engine will use the function HBBTV_DBGPrint to print debug messages (see hbbtv_sif_debug.h)
debug_mask | Each bit in the mask corresponds to a group of debug prints, 1 means such prints are active, 0 inactive. |
E_HBBTV_ERR HBBTV_DRMRegister | ( | U16BIT | ca_system_id, |
F_HBBTV_DRM_SEND | send_function, | ||
void * | user_data | ||
) |
Registers a DRM system with the HbbTV engine. Registering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10.
ca_system_id | CA system ID handled by the registering DRM system. |
send_function | Pointer to the function that the HbbTV engine will use to forward messages addressing this DRM system from the HbbTV application. |
user_data | Pointer that will be passed to send_function |
void HBBTV_DRMUnregister | ( | U16BIT | ca_system_id | ) |
Unregisters a DRM system with the HbbTV engine. Unegistering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10.
ca_system_id | CA system ID handled by the DRM system to be unregistered. |
void HBBTV_DsmccRequestFile | ( | void * | user_data, |
U8BIT * | url | ||
) |
Request file from DSMCC (with 'dvb:' origin). The result is returned via function given to HBBTV_DsmccSetCallback(). This may be done synchronously or asynchronously.
user_data | User data to be given to callback function |
url | URL of the file to request |
void HBBTV_DsmccSetCallback | ( | F_HBBTV_DSMCC_FILE_CALLBACK | func | ) |
Provide function to return result of file requests.
func | callback function to inform browser of result |
E_HBBTV_ERR HBBTV_GetBroadcastAppList | ( | S_HBBTV_BROADCAST_APP ** | apps, |
U32BIT * | total | ||
) |
Returns a list of HbbTv Broadcast Appications signalled in the current AIT. The list must be freed using HBBTV_ReleaseAppList.
apps | Pointer to S_HBBTV_BROADCAST_APP containng the list of available applications |
total | Number of applications in the returned list. |
E_HBBTV_ERR HBBTV_HbbTvSetUrl | ( | const U8BIT * | url | ) |
Launches a "Broadcast-INDEPENDENT" application. The url could be an XML-AIT file.
url | URL where application is to be found |
E_HBBTV_ERR HBBTV_Initialise | ( | U32BIT | task_priority, |
E_HBBTV_STRING_FORMAT | string_format, | ||
U8BIT | options | ||
) |
Initialises the HBBTV module.
task_priority | |
string_format | Format of the strings returned to the HbbTV engine. The engine will translate them if they're in DVB SI format or use them as they are otherwise. |
options | Mask representing the optional modules required. It is a combination of HBBTV_CAP_DL, HBBTV_CAP_PVR and HBBTV_CAP_DRM |
E_HBBTV_ERR HBBTV_LaunchApplication | ( | U32BIT | org_id, |
U16BIT | app_id | ||
) |
Launches the specified application.
org_id | Organisation ID as found in the list returned by HBBTV_GetBroadcastAppList |
app_id | Application ID as found in the list returned by HBBTV_GetBroadcastAppList |
void HBBTV_MPNotifyState | ( | void * | ihdl, |
E_HBBTV_MP_STATE | state | ||
) |
Notifies the HbbTV engine that the media player state has changed.
ihdl | Handle returned by HBBTV_MPInit |
state | New state |
E_HBBTV_ERR HBBTV_NotifyChannelChangeStatus | ( | U16BIT | onet_id, |
U16BIT | trans_id, | ||
U16BIT | serv_id, | ||
E_HBBTV_CHANNEL_CHANGE_STATUS | status | ||
) |
Notifies the HbbTV engine of a change in the status of the service identified by the specified DVB triplet.
onet_id | Original Network ID |
trans_id | Transport Stream ID |
serv_id | Service ID |
status | New status |
E_HBBTV_ERR HBBTV_NotifyDRMMessageResult | ( | U32BIT | id, |
U8BIT * | message, | ||
U32BIT | length, | ||
U8BIT | result_code | ||
) |
Notifies the result message from the DRM system.The HbbTV engine copies the content of message before returning.
id | Message ID idenfying the message the result refers to. |
message | Buffer containing the incoming message. |
length | Number of bytes in the buffer. |
result_code | Result code from the DRM. |
E_HBBTV_ERR HBBTV_NotifyDRMRightsError | ( | E_HBBTV_DRM_ERROR_STATE | error_state, |
U16BIT | ca_system_id, | ||
U8BIT * | rights_issuer_url, | ||
U32BIT | rights_issuer_length | ||
) |
Notifies an incoming rights error from the DRM system.
error_state | Error state |
ca_system_id | CA system ID of the originating DRM system. |
rights_issuer_url | |
right_issuer_length |
error_state | |
ca_system_id | |
rights_issuer_url | |
right_issuer_length |
E_HBBTV_ERR HBBTV_NotifyDRMSystemMessage | ( | U8BIT * | message, |
U32BIT | length, | ||
U16BIT | ca_system_id | ||
) |
Notifies an incoming message from the DRM system. The HbbTV engine copies the content of message before returning.
message | Buffer containing the incoming message. |
length | Number of bytes in the buffer. |
ca_system_id | CA system ID of the originating DRM system. |
E_HBBTV_ERR HBBTV_NotifyKeyPress | ( | E_HBBTV_KEY | key | ) |
Notifies the HbbTV engine of a user key press. If the key is not required by an active HbbTV application, then the function returns HBBTV_IGNORED_REQUEST.
key | Value representing the user pressed key |
Notifies the HbbTV engine of a user key press. If the key is not required by an active HbbTV application, then the function returns HBBTV_IGNORED_REQUEST.
key | Value representing the user pressed key |
E_HBBTV_ERR HBBTV_NotifyLowMemory | ( | void | ) |
Notifies the HbbTv engine that the device is running low on available memory for running applications.
E_HBBTV_ERR HBBTV_NotifyParentalRatingChange | ( | BOOLEAN | blocked | ) |
Notifies the HbbTV engine that the parental rating of the currently playing service has changed.
blocked | TRUE if the current service is blocked by the parental control system. |
E_HBBTV_ERR HBBTV_NotifyProgrammeChanged | ( | void | ) |
Notifies the HbbTV engine that the present/following events have changed on the current service.
E_HBBTV_ERR HBBTV_NotifyRecordingEvent | ( | U32BIT | id, |
E_HBBTV_RECORDING_EVENT | event | ||
) |
Notifies the HbbTV engine of a recording event.
id | scheduled or completed recording ID |
event | recording event |
id | Scheduled recording ID |
event | Recording event |
E_HBBTV_ERR HBBTV_NotifyRecordingPlayerState | ( | void * | ihdl, |
E_HBBTV_RECPLAYER_STATE | state | ||
) |
Notifies the HbbTV engine that the media player state has changed.
ihdl | Handle returned by HBBTV_PVRPlayInit |
state | New state |
E_HBBTV_ERR HBBTV_NotifyServiceListChange | ( | void | ) |
Notifies the HbbTV ending that it must update Service list. This will cause the engine to subsequently call HBBTV_ObtainServiceList().
E_HBBTV_ERR HBBTV_NotifyVideoAspectRatio | ( | E_HBBTV_ASPECT_RATIO | ratio | ) |
Notifies the HBBTV module of the aspect ratio of the video stream. This is used by the engine to correctly preserve the aspect ratio of resised videos as specified by the HbbTV specification.
ratio | HBBTV_VIDEO_ASPECT_RATIO_16x9 or HBBTV_VIDEO_ASPECT_RATIO_4x3 |
E_HBBTV_ERR HBBTV_ProcessAitSection | ( | U16BIT | service_id, |
U8BIT * | data, | ||
U32BIT | nbytes | ||
) |
Requests the HbbTV engine to process the specified AIT. The HbbTV engine expects the relevant AITs only (the first one after HBBTV_Start and when the version changes). If more than one stream is signalled in the PMT for a service with an application_signalling_descriptor, then the application_signalling_descriptor for the stream containing the AIT for the HbbTV application shall include the HbbTV application_type (0x0010).
service_id | Service ID he AIT refers to |
data | pointer to the buffer containing the AIT row data. It can be released as soon as the function returns. |
nbytes | number of bytes contained in data |
Requests the HbbTV engine to process the specified AIT. The HbbTV engine expects the relevant AITs only (the first one after HBBTV_Start and when the version changes). If more than one stream is signalled in the PMT for a service with an application_signalling_descriptor, then the application_signalling_descriptor for the stream containing the AIT for the HbbTV application shall include the HbbTV application_type (0x0010).
service_id | Service ID he AIT refers to |
data | pointer to the buffer containing the AIT row data |
nbytes | number of bytes contained in data |
void HBBTV_ReleaseAppList | ( | S_HBBTV_BROADCAST_APP * | apps | ) |
Releases the list of applications allocated by HBBTV_GetBroadcastAppList.
apps | Pointer to S_HBBTV_BROADCAST_APPS to be released |
E_HBBTV_ERR HBBTV_SetSystemInfo | ( | S_HBBTV_SYSTEM_INFO * | info | ) |
Informs the HbbTV engine of some information regarding the system. The HbbTV engine makes a copy of the strings in the structure.
info | Structure containing information regarding the system. |
void HBBTV_Start | ( | S_HBBTV_DVB_LOCATOR * | p_dvb_locator | ) |
Allows the HbbTV engine to run on the specified channel and handle the applications lifecyle as specified by the HbbTV standard.
p_dvb_locator | pointer to the DVB locator representing the current channel |