![]() |
DVBCore
22.11.0
Open Source DVB Engine
|
System Interface, PVR. More...
#include <stdio.h>
#include <string.h>
#include <techtype.h>
#include <dbgfuncs.h>
#include "stbhwos.h"
#include "stbhwdsk.h"
#include "stbheap.h"
#include "stbgc.h"
#include "stbpvr.h"
#include "stbvtc.h"
#include "ap_dbacc.h"
#include "ap_tmr.h"
#include "ap_pvr.h"
#include "hbbtv.h"
#include "hbbtv_sif_types.h"
#include "hbbtv_sif_service.h"
#include "hbbtv_sif_pvr.h"
#include "common.h"
Classes | |
union | U_DATA |
struct | s_llist |
struct | S_REC |
Macros | |
#define | DBG(string, vars...) |
Typedefs | |
typedef struct s_llist | S_LLIST |
Functions | |
void | EXT_HbbtvPVRInitialise (void) |
Initialises the PVR resources needed by the HbbTV external interface. | |
void | EXT_HbbtvPVRTerminate (void) |
Releases the PVR resources allocated by the HbbTV external interface. | |
E_HBBTV_ERR | HBBTV_PVRRecordCRID (S_HBBTV_STRING *crid, S_HBBTV_STRING *fqdn, U16BIT *service_lcn, U32BIT *id) |
Schedules an event to be recorded. More... | |
E_HBBTV_ERR | HBBTV_PVRRecordEventID (U16BIT event_id, U16BIT service_lcn, S_HBBTV_STRING *fqdn, U32BIT *id) |
Schedules an event to be recorded, the event is identified by its ID and the service LCN. More... | |
E_HBBTV_ERR | HBBTV_PVRRecordAt (U16BIT service_lcn, U32BIT start_time, U32BIT duration, U8BIT repeat_days, S_HBBTV_STRING *fqdn, S_HBBTV_EVENT_DETAILS *details, U32BIT *id) |
Schedules a recording based on start time and duration. More... | |
E_HBBTV_ERR | HBBTV_PVRGetRecordingId (U32BIT scheduled_recording_id, U32BIT *recording_id) |
Returns the recording ID (as in S_HBBTV_RECORDING_DETAILS) for an in progress scheduled recording represented by scheduled_recording_id. More... | |
E_HBBTV_ERR | HBBTV_PVRStopRecording (U32BIT recording_id) |
Stops an in progress recording. More... | |
E_HBBTV_ERR | HBBTV_PVRSetScheduledRecordingName (U32BIT id, S_HBBTV_STRING *name) |
Sets the name for the specified scheduled recording. More... | |
E_HBBTV_ERR | HBBTV_PVRSetScheduledRecordingDescription (U32BIT id, S_HBBTV_STRING *description) |
Sets the description for the specified scheduled recording. More... | |
E_HBBTV_ERR | HBBTV_PVRGetScheduledRecordingDetails (U32BIT id, S_HBBTV_SCHEDULED_RECORDING_DETAILS *details) |
Retrieves the details of the scheduled recording identified by 'id'. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseScheduledRecordingDetails to release allocated data on the same task immediately after it has copied the data. More... | |
void | HBBTV_PVRReleaseScheduledRecordingDetails (S_HBBTV_SCHEDULED_RECORDING_DETAILS *details) |
Release data allocated by HBBTV_PVRGetScheduledRecordingDetails (e.g. String data). Always called immediately after the HbbTV engine has copied data. More... | |
E_HBBTV_ERR | HBBTV_PVRGetScheduledRecordingList (S_HBBTV_STRING *fqdn, U32BIT *num_ptr, S_HBBTV_SCHEDULED_RECORDING_DETAILS **list_ptr) |
Retrieves the list of recordingins scheduled with the given Full Qualified Domain Name. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseScheduledRecordingList to release allocated data on the same task immediately after it has copied the data. More... | |
void | HBBTV_PVRReleaseScheduledRecordingList (U32BIT num, S_HBBTV_SCHEDULED_RECORDING_DETAILS *list) |
Release data allocated by HBBTV_PVRGetScheduledRecordingList (e.g. String data). Always called immediately after the HbbTV engine has copied data. More... | |
E_HBBTV_ERR | HBBTV_PVRRemoveScheduledRecording (U32BIT id, S_HBBTV_STRING *fqdn) |
Removes a scheduled recording created with HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt. More... | |
E_HBBTV_ERR | HBBTV_PVRSetScheduledRecordingStartPadding (U32BIT id, S32BIT start_padding) |
Changes the start padding value for the specified scheduled recording. More... | |
E_HBBTV_ERR | HBBTV_PVRSetScheduledRecordingEndPadding (U32BIT id, S32BIT end_padding) |
Changes the end padding value for the specified scheduled recording. More... | |
E_HBBTV_ERR | HBBTV_PVRGetRecordingDetails (U32BIT id, S_HBBTV_RECORDING_DETAILS *details) |
Retrieves the details of the recording identified by 'id'. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseRecordingDetails to release allocated data on the same task immediately after it has copied the data. More... | |
void | HBBTV_PVRReleaseRecordingDetails (S_HBBTV_RECORDING_DETAILS *details) |
Release data allocated by HBBTV_PVRGetRecordingDetails (e.g. String data). Always called immediately after the HbbTV engine has copied data. More... | |
E_HBBTV_ERR | HBBTV_PVRGetRecordingList (S_HBBTV_STRING *fqdn, U32BIT *num_ptr, S_HBBTV_RECORDING_DETAILS **list_ptr) |
Retrieves the list of recordings completed or in progress with the given Fully Qualified Domain Name. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseScheduledRecordingList to release allocated data on the same task immediately after it has copied the data. More... | |
void | HBBTV_PVRReleaseRecordingList (U32BIT num, S_HBBTV_RECORDING_DETAILS *list) |
Release data allocated by HBBTV_PVRGetRecordingList (e.g. String data). Always called immediately after the HbbTV engine has copied data. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayInit (U32BIT recording_id, void **handle) |
Initialises an instance of PVR player for the specified recording id and returns its handle. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayExit (void *handle) |
Releases the specified instance of PVR playe. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayStart (void *handle) |
Starts the presentation of the specified PVR player. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayStop (void *handle) |
Stops the presentation of the specified PVR player. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayPause (void *handle) |
Pauses the PVR player. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayResume (void *handle) |
Resumes the PVR player. More... | |
E_HBBTV_ERR | HBBTV_PVRPlaySeek (void *handle, U32BIT position) |
Changes the position of the PVR player. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayGetPosition (void *handle, U32BIT *position) |
Returns the current position in the recording. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayGetLength (void *handle, U32BIT *length) |
Returns the length of the recording. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayGetComponentList (void *handle, E_HBBTV_COMPONENT_TYPE type, U32BIT *num_ptr, S_HBBTV_COMPONENT_DETAILS **list_ptr) |
Retrieves the list of available components in the recording. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRPlayReleaseComponentList to release allocated data on the same task immediately after the HbbTV engine has copied the data. More... | |
void | HBBTV_PVRPlayReleaseComponentList (void *handle, S_HBBTV_COMPONENT_DETAILS *list_ptr) |
Release data allocated by HBBTV_PVRPlayGetComponentList. Always called immediately after the HbbTV engine has copied data. More... | |
E_HBBTV_ERR | HBBTV_PVRPlaySelectComponent (void *handle, S_HBBTV_COMPONENT_DETAILS *component) |
Replace any component of the same type with the specified one. This function can be called before or after the media player has been started. More... | |
E_HBBTV_ERR | HBBTV_PVRPlayUnselectComponent (void *handle, S_HBBTV_COMPONENT_DETAILS *component) |
Stops rendering the specified component. More... | |
E_HBBTV_ERR | HBBTV_PVRPlaySetRectangle (void *handle, S_HBBTV_RECT *rect) |
Changes position and size of the video presentation window. More... | |
E_HBBTV_RECPLAYER_ERROR | HBBTV_PVRPlayGetError (void *handle) |
Retrieves the error code from the PVR player. More... | |
void | HBBTV_PVRRecordingStarted (U32BIT timer) |
Called by the HbbTV engine when a recording starts so the recording handle can be saved. More... | |
U32BIT | EXT_HbbtvPVRGetRecID (U32BIT timer, U32BIT recording) |
Returns the recording ID associated with the specified timer handle and recording handle. More... | |
System Interface, PVR.
U32BIT EXT_HbbtvPVRGetRecID | ( | U32BIT | timer, |
U32BIT | recording | ||
) |
Returns the recording ID associated with the specified timer handle and recording handle.
timer | Timer handle |
recording | Recording handle |
E_HBBTV_ERR HBBTV_PVRGetRecordingDetails | ( | U32BIT | id, |
S_HBBTV_RECORDING_DETAILS * | details | ||
) |
Retrieves the details of the recording identified by 'id'. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseRecordingDetails to release allocated data on the same task immediately after it has copied the data.
id | Recording unique identifier. |
details | Pointer where the details will be returned. |
E_HBBTV_ERR HBBTV_PVRGetRecordingId | ( | U32BIT | scheduled_recording_id, |
U32BIT * | recording_id | ||
) |
Returns the recording ID (as in S_HBBTV_RECORDING_DETAILS) for an in progress scheduled recording represented by scheduled_recording_id.
scheduled_recording_id | Scheduled recording unique identifier, as returned by HBBTV_PVRRecordAt, HBBTV_PVRRecordEventID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordCRID. |
record_id | Pointer to the returned recording ID. |
E_HBBTV_ERR HBBTV_PVRGetRecordingList | ( | S_HBBTV_STRING * | fqdn, |
U32BIT * | num_ptr, | ||
S_HBBTV_RECORDING_DETAILS ** | list_ptr | ||
) |
Retrieves the list of recordings completed or in progress with the given Fully Qualified Domain Name. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseScheduledRecordingList to release allocated data on the same task immediately after it has copied the data.
fqdn | Pointer to a utf-8 string containing the application Full Qualified Domain Name to be stored with the scheduled recording and the resulting recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
num_ptr | Pointer to number of recordings (Not NULL) |
list_ptr | Pointer to S_HBBTV_RECORDING_DETAILS (Not NULL) |
E_HBBTV_ERR HBBTV_PVRGetScheduledRecordingDetails | ( | U32BIT | id, |
S_HBBTV_SCHEDULED_RECORDING_DETAILS * | details | ||
) |
Retrieves the details of the scheduled recording identified by 'id'. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseScheduledRecordingDetails to release allocated data on the same task immediately after it has copied the data.
id | Scheduled recording unique identifier as returned by HBBTV_PVRRecordCRID or HBBTV_PVRRecordAt. |
details | Pointer where the details will be returned. |
E_HBBTV_ERR HBBTV_PVRGetScheduledRecordingList | ( | S_HBBTV_STRING * | fqdn, |
U32BIT * | num_ptr, | ||
S_HBBTV_SCHEDULED_RECORDING_DETAILS ** | list_ptr | ||
) |
Retrieves the list of recordingins scheduled with the given Full Qualified Domain Name. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRReleaseScheduledRecordingList to release allocated data on the same task immediately after it has copied the data.
fqdn | Pointer to a utf-8 string containing the application Full Qualified Domain Name to be stored with the scheduled recording and the resulting recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
num_ptr | Pointer to number of events (Not NULL) |
list_ptr | Pointer to S_HBBTV_EVENT_DETAILS Pointer (Not NULL) |
E_HBBTV_ERR HBBTV_PVRPlayExit | ( | void * | handle | ) |
Releases the specified instance of PVR playe.
handle | Handle |
E_HBBTV_ERR HBBTV_PVRPlayGetComponentList | ( | void * | handle, |
E_HBBTV_COMPONENT_TYPE | type, | ||
U32BIT * | num_ptr, | ||
S_HBBTV_COMPONENT_DETAILS ** | list_ptr | ||
) |
Retrieves the list of available components in the recording. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_PVRPlayReleaseComponentList to release allocated data on the same task immediately after the HbbTV engine has copied the data.
handle | Handle |
type | Required component type |
num_ptr | Pointer to number of components (Not NULL) |
list_ptr | Pointer to S_HBBTV_COMPONENT_DETAILS Pointer (Not NULL) |
E_HBBTV_RECPLAYER_ERROR HBBTV_PVRPlayGetError | ( | void * | handle | ) |
Retrieves the error code from the PVR player.
handle | Handle |
E_HBBTV_ERR HBBTV_PVRPlayGetLength | ( | void * | handle, |
U32BIT * | length | ||
) |
Returns the length of the recording.
handle | Handle |
length | Length of the recording in milliseconds |
E_HBBTV_ERR HBBTV_PVRPlayGetPosition | ( | void * | handle, |
U32BIT * | position | ||
) |
Returns the current position in the recording.
handle | Handle |
position | Current position in in milliseconds in the recording |
E_HBBTV_ERR HBBTV_PVRPlayInit | ( | U32BIT | recording_id, |
void ** | handle | ||
) |
Initialises an instance of PVR player for the specified recording id and returns its handle.
recording_id | Recording id as in S_HBBTV_RECORDING_DETAILS structure |
handle | Handle |
E_HBBTV_ERR HBBTV_PVRPlayPause | ( | void * | handle | ) |
Pauses the PVR player.
handle | Handle |
void HBBTV_PVRPlayReleaseComponentList | ( | void * | handle, |
S_HBBTV_COMPONENT_DETAILS * | list_ptr | ||
) |
Release data allocated by HBBTV_PVRPlayGetComponentList. Always called immediately after the HbbTV engine has copied data.
recording_id | Recording id as in S_HBBTV_RECORDING_DETAILS structure |
handle | Handle |
list_ptr | Pointer to S_HBBTV_COMPONENT_DETAILS |
E_HBBTV_ERR HBBTV_PVRPlayResume | ( | void * | handle | ) |
Resumes the PVR player.
handle | Handle |
E_HBBTV_ERR HBBTV_PVRPlaySeek | ( | void * | handle, |
U32BIT | position | ||
) |
Changes the position of the PVR player.
handle | Handle |
position | position in in milliseconds in the recording |
E_HBBTV_ERR HBBTV_PVRPlaySelectComponent | ( | void * | handle, |
S_HBBTV_COMPONENT_DETAILS * | component | ||
) |
Replace any component of the same type with the specified one. This function can be called before or after the media player has been started.
handle | Handle |
component | Pointer to the component to be rendered |
E_HBBTV_ERR HBBTV_PVRPlaySetRectangle | ( | void * | handle, |
S_HBBTV_RECT * | rect | ||
) |
Changes position and size of the video presentation window.
handle | Handle |
rect | Pointer to the rectangle defining the presentation window. Values are in HbbTV 1280x720 coordinates. |
E_HBBTV_ERR HBBTV_PVRPlayStart | ( | void * | handle | ) |
Starts the presentation of the specified PVR player.
handle | Handle |
E_HBBTV_ERR HBBTV_PVRPlayStop | ( | void * | handle | ) |
Stops the presentation of the specified PVR player.
handle | Handle |
E_HBBTV_ERR HBBTV_PVRPlayUnselectComponent | ( | void * | handle, |
S_HBBTV_COMPONENT_DETAILS * | component | ||
) |
Stops rendering the specified component.
handle | Handle |
component | Pointer to the component to be stopped |
E_HBBTV_ERR HBBTV_PVRRecordAt | ( | U16BIT | service_lcn, |
U32BIT | start_time, | ||
U32BIT | duration, | ||
U8BIT | repeat_days, | ||
S_HBBTV_STRING * | fqdn, | ||
S_HBBTV_EVENT_DETAILS * | details, | ||
U32BIT * | id | ||
) |
Schedules a recording based on start time and duration.
service_lcn | LCN in the current channel list of the service to be recorded |
start_time | Start of the time period of the recording measured in seconds since midnight (GMT) on 1/1/1970. If the start time occurs in the past and the current time is within the specified duration of the recording, the recording starts immediately. |
duration | Duration of the recording in seconds. |
repeat_days | Bitfield indicating which days of the week the recording should be repeated. The meaning of each bit is the following:
|
fqdn | Pointer to a utf-8 string containing the application Full Qualified Domain Name to be stored with the scheduled recording and the resulting recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
details | Pointer to the details of the event to be recorded. The engine will call HBBTV_ReleaseEventDetails to release allocated data on the same task and immediately after it has copied the data. |
E_HBBTV_ERR HBBTV_PVRRecordCRID | ( | S_HBBTV_STRING * | crid, |
S_HBBTV_STRING * | fqdn, | ||
U16BIT * | service_lcn, | ||
U32BIT * | id | ||
) |
Schedules an event to be recorded.
crid | Pointer to S_HBBTV_STRING containing the CRID for the event to be scheduled for recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
fqdn | Pointer to a utf-8 string containing the application Full Qualified Domain Name to be stored with the scheduled recording and the resulting recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
service_lcn | Pointer to a U16BIT representing the service LCN in the current channel list associated with the event to be recorded |
id | Pointer to a U32BIT representing the scheduled recording unique identifier |
E_HBBTV_ERR HBBTV_PVRRecordEventID | ( | U16BIT | event_id, |
U16BIT | service_lcn, | ||
S_HBBTV_STRING * | fqdn, | ||
U32BIT * | id | ||
) |
Schedules an event to be recorded, the event is identified by its ID and the service LCN.
event_id | DVB event ID representing the event to be recorded. |
service_lcn | service LCN in the current channel list associated with the event to be recorded. |
fqdn | Pointer to a utf-8 string containing the application Full Qualified Domain Name to be stored with the scheduled recording and the resulting recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
id | Pointer to a U32BIT representing the scheduled recording unique identifier |
void HBBTV_PVRRecordingStarted | ( | U32BIT | timer | ) |
Called by the HbbTV engine when a recording starts so the recording handle can be saved.
timer | timer handle associated with the scheduled recording |
void HBBTV_PVRReleaseRecordingDetails | ( | S_HBBTV_RECORDING_DETAILS * | details | ) |
Release data allocated by HBBTV_PVRGetRecordingDetails (e.g. String data). Always called immediately after the HbbTV engine has copied data.
details | Pointer to the S_HBBTV_RECORDING_DETAILS filled by HBBTV_PVRGetRecordingDetails. |
void HBBTV_PVRReleaseRecordingList | ( | U32BIT | num, |
S_HBBTV_RECORDING_DETAILS * | list | ||
) |
Release data allocated by HBBTV_PVRGetRecordingList (e.g. String data). Always called immediately after the HbbTV engine has copied data.
num | number of elements in the list |
list_ptr | Pointer to S_HBBTV_RECORDING_DETAILS list |
void HBBTV_PVRReleaseScheduledRecordingDetails | ( | S_HBBTV_SCHEDULED_RECORDING_DETAILS * | details | ) |
Release data allocated by HBBTV_PVRGetScheduledRecordingDetails (e.g. String data). Always called immediately after the HbbTV engine has copied data.
details | Pointer to the S_HBBTV_SCHEDULED_RECORDING_DETAILS filled by HBBTV_PVRGetScheduledRecordingDetails. |
void HBBTV_PVRReleaseScheduledRecordingList | ( | U32BIT | num, |
S_HBBTV_SCHEDULED_RECORDING_DETAILS * | list | ||
) |
Release data allocated by HBBTV_PVRGetScheduledRecordingList (e.g. String data). Always called immediately after the HbbTV engine has copied data.
num | number of elements in the list |
list_ptr | Pointer to S_HBBTV_SCHEDULED_RECORDING_DETAILS list |
E_HBBTV_ERR HBBTV_PVRRemoveScheduledRecording | ( | U32BIT | id, |
S_HBBTV_STRING * | fqdn | ||
) |
Removes a scheduled recording created with HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt.
id | Scheduled recording unique identifier as returned by HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt. |
fqdn | Pointer to a utf-8 string containing the application Full Qualified Domain Name to be stored with the scheduled recording and the resulting recording. This function makes a copy of it as the engine does not guarantee the pointer will be valid after the function returns. |
E_HBBTV_ERR HBBTV_PVRSetScheduledRecordingDescription | ( | U32BIT | id, |
S_HBBTV_STRING * | description | ||
) |
Sets the description for the specified scheduled recording.
id | Scheduled recording unique identifier as returned by HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt. |
description | Description to be associated with the specified scheduled recording |
E_HBBTV_ERR HBBTV_PVRSetScheduledRecordingEndPadding | ( | U32BIT | id, |
S32BIT | end_padding | ||
) |
Changes the end padding value for the specified scheduled recording.
id | Scheduled recording unique identifier as returned by HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt. |
end_padding | new value of end padding |
E_HBBTV_ERR HBBTV_PVRSetScheduledRecordingName | ( | U32BIT | id, |
S_HBBTV_STRING * | name | ||
) |
Sets the name for the specified scheduled recording.
id | Scheduled recording unique identifier as returned by HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt. |
Name | name to be associated with the specified scheduled recording |
E_HBBTV_ERR HBBTV_PVRSetScheduledRecordingStartPadding | ( | U32BIT | id, |
S32BIT | start_padding | ||
) |
Changes the start padding value for the specified scheduled recording.
id | Scheduled recording unique identifier as returned by HBBTV_PVRRecordCRID, HBBTV_PVRRecordEventID or HBBTV_PVRRecordAt. |
start_padding | new value of start padding |
E_HBBTV_ERR HBBTV_PVRStopRecording | ( | U32BIT | recording_id | ) |
Stops an in progress recording.
recording | id recordig ID |