DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Data Structures | Typedefs | Enumerations | Functions
stbpvrpr.h File Reference

Header file - macros and function prototypes for public use. More...

#include "techtype.h"
#include "stbhwav.h"
#include "stbhwdmx.h"

Go to the source code of this file.

Data Structures

struct  s_pvr_pid_info
 

Typedefs

typedef enum e_stb_pvr_start_mode E_STB_PVR_START_MODE
 
typedef enum e_stb_pvr_play_mode E_STB_PVR_PLAY_MODE
 
typedef struct s_pvr_pid_info S_PVR_PID_INFO
 

Enumerations

enum  E_PVR_PID_TYPE {
  PVR_PID_TYPE_VIDEO, PVR_PID_TYPE_AUDIO, PVR_PID_TYPE_PCR, PVR_PID_TYPE_SUBTITLES,
  PVR_PID_TYPE_SECTION, PVR_PID_TYPE_TELETEXT
}
 
enum  e_stb_pvr_start_mode {
  START_RUNNING = 0, START_PAUSED = 1, START_AVSYNC = 2, START_EXPORT_PES = 3,
  START_IMPORT_TS = 4, START_IMPORT_PES = 5
}
 
enum  e_stb_pvr_play_mode { PLAY_NO_TRICK = 0, PLAY_TRICK_FORWARDS = 1, PLAY_TRICK_REVERSE = 2, PLAY_TRICK_FRAME = 3 }
 

Functions

U8BIT STB_PVRInitPlayback (U8BIT num_audio_decoders, U8BIT num_video_decoders)
 Initialisation for playback. More...
 
U8BIT STB_PVRInitRecording (U8BIT num_tuners)
 Initialisation for recording. More...
 
void STB_PVRSetPlayStartMode (U8BIT audio_decoder, U8BIT video_decoder, E_STB_PVR_START_MODE mode)
 Set startup mode for playback. More...
 
void STB_PVRPlayHasVideo (U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN has_video)
 Informs the platform whether there's video in the file to be played. Should be called before playback is started. More...
 
void STB_PVRSetPlaybackNotifyTime (U8BIT audio_decoder, U8BIT video_decoder, U32BIT notify_time)
 Sets the time the next notification event should be sent during playback. This is required for CI+, but may also be used for other purposes. More...
 
BOOLEAN STB_PVRPlayStart (U16BIT disk_id, U8BIT audio_decoder, U8BIT video_decoder, U8BIT demux, U8BIT *basename)
 Starts playback. More...
 
BOOLEAN STB_PVRPlayChangeAudio (U8BIT audio_decoder, U8BIT video_decoder, U16BIT pid, U8BIT codec)
 Changes the main audio PID being decoded during playback. This can be used to switch between main audio and broadcaster mix AD. More...
 
BOOLEAN STB_PVRIsPlayStarted (U8BIT audio_decoder, U8BIT video_decoder)
 Returns status of playback with the given decoders. More...
 
BOOLEAN STB_PVRPlaySetPosition (U8BIT audio_decoder, U8BIT video_decoder, U32BIT position_in_seconds)
 Sets the playback position after playback has started (i.e. jump to bookmark) More...
 
void STB_PVRPlayStop (U8BIT audio_decoder, U8BIT video_decoder)
 Stops playback. More...
 
void STB_PVRPlayEnabled (U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN *video, BOOLEAN *audio)
 Returns whether audio and video playback has been started. More...
 
void STB_PVRPlaySetRetentionLimit (U8BIT audio_decoder, U8BIT video_decoder, U32BIT retention_limit, U16BIT rec_date, U8BIT rec_hour, U8BIT rec_min)
 Set the retention limit for the playback. This function is used for CI+. More...
 
void STB_PVRSetRecordStartMode (U8BIT rec_index, E_STB_PVR_START_MODE mode, U32BIT param)
 Sets the startup mode for a recording. This function should be called before the recording is started and is used to when pausing live TV in which case the additional param defines the length of the pause buffer to be used, in seconds. More...
 
BOOLEAN STB_PVRRecordStart (U16BIT disk_id, U8BIT rec_index, U8BIT *basename, U16BIT num_pids, S_PVR_PID_INFO *pid_array)
 
BOOLEAN STB_PVRRecordPause (U8BIT rec_index)
 Pauses a recording currently taking place. More...
 
BOOLEAN STB_PVRRecordResume (U8BIT rec_index)
 Resumes a paused recording. More...
 
BOOLEAN STB_PVRRecordChangePids (U8BIT rec_index, U16BIT num_pids, S_PVR_PID_INFO *pids_array)
 Changes the PIDs while recording. More...
 
void STB_PVRRecordStop (U8BIT rec_index)
 Stops a recording. More...
 
BOOLEAN STB_PVRIsRecordStarted (U8BIT rec_index)
 Returns whether recording has been started. More...
 
void STB_PVRRecordEnabled (U8BIT rec_index, BOOLEAN *video, BOOLEAN *audio)
 Returns status of audio/video recording. More...
 
void STB_PVRSetRecordEncryptionKey (U8BIT rec_index, BOOLEAN state, U8BIT *key, U8BIT *iv, U32BIT key_len)
 Enables or disables encryption and sets the encryption key to be used. More...
 
void STB_PVRSetPlaybackDecryptionKey (U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN state, U8BIT *key, U8BIT *iv, U32BIT key_len)
 Enables and sets the key that will be used to decrypt an encrypted recording during playback. More...
 
void STB_PVRPlayTrickMode (U8BIT audio_decoder, U8BIT video_decoder, E_STB_PVR_PLAY_MODE mode, S16BIT speed)
 Sets trick mode during playback. More...
 
void STB_PVRSaveFrame (U8BIT audio_decoder, U8BIT video_decoder)
 Unused function. More...
 
S16BIT STB_PVRGetPlaySpeed (U8BIT audio_decoder, U8BIT video_decoder)
 Returns the current playback speed. More...
 
BOOLEAN STB_PVRSetPlaySpeed (U8BIT audio_decoder, U8BIT video_decoder, S16BIT speed)
 Set the play speed for the specified decoder. More...
 
BOOLEAN STB_PVRIsValidRecording (U16BIT disk_id, U8BIT *basename)
 Checks whether any of the files already exist that would be created by a recording with the given base filename. More...
 
BOOLEAN STB_PVRCanBeUsedForRecording (U16BIT disk_id, U8BIT *basename)
 Checks whether any of the files already exist that would be created by a recording with the given base filename. More...
 
BOOLEAN STB_PVRDeleteRecording (U16BIT disk_id, U8BIT *basename)
 Deletes any files associated with the given base filename that were created as a result of the recording being performed. More...
 
BOOLEAN STB_PVRGetRecordingSize (U16BIT disk_id, U8BIT *basename, U32BIT *rec_size_kb)
 Returns the size in kilobytes of the recording defined by the given base filename. More...
 
BOOLEAN STB_PVRGetElapsedTime (U8BIT audio_decoder, U8BIT video_decoder, U8BIT *elapsed_hours, U8BIT *elapsed_mins, U8BIT *elapsed_secs)
 Returns the elapsed playback time in hours, mins & secs. More...
 
U8BIT STB_PVRAcquireRecorderIndex (U8BIT tuner, U8BIT demux)
 Acquires an index to be used to reference a recording. More...
 
void STB_PVRReleaseRecorderIndex (U8BIT rec_index)
 Releases a recording index when no longer needed. More...
 
BOOLEAN STB_PVRApplyDescramblerKey (U8BIT rec_index, E_STB_DMX_DESC_TYPE desc_type, E_STB_DMX_DESC_KEY_PARITY parity, U8BIT *key, U8BIT *iv)
 Called to apply the given descrambler key to the PID data being recorded. This function may be called before the recording has actually started. More...
 

Detailed Description

Header file - macros and function prototypes for public use.

Date
07/02/2003

Function Documentation

U8BIT STB_PVRAcquireRecorderIndex ( U8BIT  tuner,
U8BIT  demux 
)

Acquires an index to be used to reference a recording.

Parameters
tunertuner to be used for the recording
demuxdemux to be used for the recording
Returns
recording index, 255 if none available
BOOLEAN STB_PVRApplyDescramblerKey ( U8BIT  rec_index,
E_STB_DMX_DESC_TYPE  desc_type,
E_STB_DMX_DESC_KEY_PARITY  parity,
U8BIT *  key,
U8BIT *  iv 
)

Called to apply the given descrambler key to the PID data being recorded. This function may be called before the recording has actually started.

Parameters
rec_indexrecording index
desc_typedescrambler type
paritykey parity
keykey data
ivprovides an initialisation vector data, if required for the descrambler type
Returns
TRUE if successful, FALSE otherwise
BOOLEAN STB_PVRCanBeUsedForRecording ( U16BIT  disk_id,
U8BIT *  basename 
)

Checks whether any of the files already exist that would be created by a recording with the given base filename.

Parameters
disk_iddisk to be checked
basenamebase filename to be used for a recording
Returns
TRUE if none of the files exist, FALSE otherwise
BOOLEAN STB_PVRDeleteRecording ( U16BIT  disk_id,
U8BIT *  basename 
)

Deletes any files associated with the given base filename that were created as a result of the recording being performed.

Parameters
disk_iddisk containing the recording to be deleted
basenamebase filename used for the recording
Returns
TRUE if successful, FALSE otherwise
BOOLEAN STB_PVRGetElapsedTime ( U8BIT  audio_decoder,
U8BIT  video_decoder,
U8BIT *  elapsed_hours,
U8BIT *  elapsed_mins,
U8BIT *  elapsed_secs 
)

Returns the elapsed playback time in hours, mins & secs.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
elapsed_hourscurrent number of hours into the playback
elapsed_minscurrent number of minutes into the playback
elapsed_secscurrent number of seconds into the playback
Returns
TRUE if the info has been successfully gathered
S16BIT STB_PVRGetPlaySpeed ( U8BIT  audio_decoder,
U8BIT  video_decoder 
)

Returns the current playback speed.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
Returns
current playback speed as a percentage
BOOLEAN STB_PVRGetRecordingSize ( U16BIT  disk_id,
U8BIT *  basename,
U32BIT *  rec_size_kb 
)

Returns the size in kilobytes of the recording defined by the given base filename.

Parameters
disk_iddisk containing the recording to be queried
basenamebase filename of recording to get info about
rec_size_kbreturned size of recording in kilobytes
Returns
TRUE if the information is successfully gathered
U8BIT STB_PVRInitPlayback ( U8BIT  num_audio_decoders,
U8BIT  num_video_decoders 
)

Initialisation for playback.

Parameters
num_audio_decodersnumber of audio decoders available
num_video_decodersnumber of video decoders available
Returns
Number of players, 0 if unsuccessful or unsupported
U8BIT STB_PVRInitRecording ( U8BIT  num_tuners)

Initialisation for recording.

Parameters
num_tunersnumber of tuners available for recording
Returns
Number of recorders, 0 if unsuccessful or unsupported
BOOLEAN STB_PVRIsPlayStarted ( U8BIT  audio_decoder,
U8BIT  video_decoder 
)

Returns status of playback with the given decoders.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
Returns
TRUE if playback is in progress with the given decoders
BOOLEAN STB_PVRIsRecordStarted ( U8BIT  rec_index)

Returns whether recording has been started.

Parameters
rec_indexrecording index being queried
Returns
TRUE if recording has been started
BOOLEAN STB_PVRIsValidRecording ( U16BIT  disk_id,
U8BIT *  basename 
)

Checks whether any of the files already exist that would be created by a recording with the given base filename.

Parameters
disk_iddisk to be checked
basenamebase filename to be used for a recording
Returns
TRUE if none of the files exist, FALSE otherwise
BOOLEAN STB_PVRPlayChangeAudio ( U8BIT  audio_decoder,
U8BIT  video_decoder,
U16BIT  pid,
U8BIT  codec 
)

Changes the main audio PID being decoded during playback. This can be used to switch between main audio and broadcaster mix AD.

Parameters
audio_decoder- audio decoder for playback
video_decoder- video decoder for playback
pid- new audio PID to decode
codec- new audio codec
Returns
TRUE if the PID is changed successfully, FALSE otherwise
void STB_PVRPlayEnabled ( U8BIT  audio_decoder,
U8BIT  video_decoder,
BOOLEAN *  video,
BOOLEAN *  audio 
)

Returns whether audio and video playback has been started.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
videoreturned as TRUE if video is being decoded
audioreturned as TRUE if audio is being decoded
void STB_PVRPlayHasVideo ( U8BIT  audio_decoder,
U8BIT  video_decoder,
BOOLEAN  has_video 
)

Informs the platform whether there's video in the file to be played. Should be called before playback is started.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
has_videoTRUE if the recording contains video, FALSE otherwise
BOOLEAN STB_PVRPlaySetPosition ( U8BIT  audio_decoder,
U8BIT  video_decoder,
U32BIT  position_in_seconds 
)

Sets the playback position after playback has started (i.e. jump to bookmark)

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
position_in_secondsposition to jump to in the recording in seconds from the beginning
Returns
TRUE if position is set successfully, FALSE otherwise
void STB_PVRPlaySetRetentionLimit ( U8BIT  audio_decoder,
U8BIT  video_decoder,
U32BIT  retention_limit,
U16BIT  rec_date,
U8BIT  rec_hour,
U8BIT  rec_min 
)

Set the retention limit for the playback. This function is used for CI+.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
retention_limitRetention limit in minutes
rec_datadata when the recording was taken
rec_hourhour when the recording was taken
rec_minminute when the recording was taken
BOOLEAN STB_PVRPlayStart ( U16BIT  disk_id,
U8BIT  audio_decoder,
U8BIT  video_decoder,
U8BIT  demux,
U8BIT *  basename 
)

Starts playback.

Parameters
disk_iddisk containing the recording to be played
audio_decoderaudio decoder to be used for playback
video_decodervideo decoder to be used for playback
demuxdemux to be used for playback
basenamebasename of the recording to be played
Returns
TRUE if playback is started, FALSE otherwise
void STB_PVRPlayStop ( U8BIT  audio_decoder,
U8BIT  video_decoder 
)

Stops playback.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
void STB_PVRPlayTrickMode ( U8BIT  audio_decoder,
U8BIT  video_decoder,
E_STB_PVR_PLAY_MODE  mode,
S16BIT  speed 
)

Sets trick mode during playback.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
modetrick mode to be used
speedplayback speed to be used as a percentage (100% = normal playback)
BOOLEAN STB_PVRRecordChangePids ( U8BIT  rec_index,
U16BIT  num_pids,
S_PVR_PID_INFO pids_array 
)

Changes the PIDs while recording.

Parameters
rec_indexcurrent recording index to be updated
num_pidsnumber of PIDs in PID array
pid_arraynew PID list to be recorded
Returns
TRUE if the PIDs have been successfully changed, FALSE otherwise
void STB_PVRRecordEnabled ( U8BIT  rec_index,
BOOLEAN *  video,
BOOLEAN *  audio 
)

Returns status of audio/video recording.

Parameters
rec_indexrecording index being used for recording
videopointer to a boolean value that indicates whether the video data is being recorded
audiopointer to a boolean value that indicates whether the audio data is being recorded
BOOLEAN STB_PVRRecordPause ( U8BIT  rec_index)

Pauses a recording currently taking place.

Parameters
rec_indexrecording index
Returns
TRUE if the recording is successfully paused, FALSE otherwise
BOOLEAN STB_PVRRecordResume ( U8BIT  rec_index)

Resumes a paused recording.

Parameters
rec_indexrecording index
Returns
TRUE if the recording is successfully resumed, FALSE otherwise
void STB_PVRRecordStop ( U8BIT  rec_index)

Stops a recording.

Parameters
rec_indexrecording index
void STB_PVRReleaseRecorderIndex ( U8BIT  rec_index)

Releases a recording index when no longer needed.

Parameters
rec_indexrecoding index
void STB_PVRSaveFrame ( U8BIT  audio_decoder,
U8BIT  video_decoder 
)

Unused function.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
void STB_PVRSetPlaybackDecryptionKey ( U8BIT  audio_decoder,
U8BIT  video_decoder,
BOOLEAN  state,
U8BIT *  key,
U8BIT *  iv,
U32BIT  key_len 
)

Enables and sets the key that will be used to decrypt an encrypted recording during playback.

Parameters
audio_decoderaudio decoder used for playback
video_decodervideo decoder used for playback
statewhether decryption is enabled of disabled
keydecryption key, ignored if state is FALSE
ivinitialisation vector, ignored if state is FALSE
key_lenlength of decryption key, ignored if state is FALSE
void STB_PVRSetPlaybackNotifyTime ( U8BIT  audio_decoder,
U8BIT  video_decoder,
U32BIT  notify_time 
)

Sets the time the next notification event should be sent during playback. This is required for CI+, but may also be used for other purposes.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
notify_timetime in seconds the next notification event is to be sent
BOOLEAN STB_PVRSetPlaySpeed ( U8BIT  audio_decoder,
U8BIT  video_decoder,
S16BIT  speed 
)

Set the play speed for the specified decoder.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
speedPlay speed as a percentage (i.e 100% = normal playback)
Returns
TRUE if successful
void STB_PVRSetPlayStartMode ( U8BIT  audio_decoder,
U8BIT  video_decoder,
E_STB_PVR_START_MODE  mode 
)

Set startup mode for playback.

Parameters
audio_decoderaudio decoder being used for playback
video_decodervideo decoder being used for playback
modeplayback startup mode
void STB_PVRSetRecordEncryptionKey ( U8BIT  rec_index,
BOOLEAN  state,
U8BIT *  key,
U8BIT *  iv,
U32BIT  key_len 
)

Enables or disables encryption and sets the encryption key to be used.

Parameters
rec_indexrecording index to be set
statewhether encryption is enabled of disabled
keyencryption key, ignored if state is FALSE
ivinitialisation vector, ignored if state is FALSE
key_lenlength of encryption key, ignored if state is FALSE
void STB_PVRSetRecordStartMode ( U8BIT  rec_index,
E_STB_PVR_START_MODE  mode,
U32BIT  param 
)

Sets the startup mode for a recording. This function should be called before the recording is started and is used to when pausing live TV in which case the additional param defines the length of the pause buffer to be used, in seconds.

Parameters
rec_indexrecording index to be used for the recording
modestartup mode
paramadditional parameter linked to the mode. When pausing live TV, this is the length of the pause buffer, in seconds.