DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbpvrpr.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 // pre-processor mechanism so multiple inclusions don't cause compilation error
26 
27 #ifndef _STBPVRPR_H
28 #define _STBPVRPR_H
29 
30 #include "techtype.h"
31 #include "stbhwav.h"
32 #include "stbhwdmx.h"
33 
34 //---Constant and macro definitions for public use-----------------------------
35 
36 //---Enumerations for public use-----------------------------------------------
37 typedef enum
38 {
39  PVR_PID_TYPE_VIDEO,
40  PVR_PID_TYPE_AUDIO,
41  PVR_PID_TYPE_PCR,
42  PVR_PID_TYPE_SUBTITLES,
43  PVR_PID_TYPE_SECTION,
44  PVR_PID_TYPE_TELETEXT
45 } E_PVR_PID_TYPE;
46 
47 
48 //---Global type defs for public use-------------------------------------------
49 
50 typedef enum e_stb_pvr_start_mode
51 {
52  START_RUNNING = 0,
53  START_PAUSED = 1,
54  START_AVSYNC = 2,
55  START_EXPORT_PES = 3,
56  START_IMPORT_TS = 4,
57  START_IMPORT_PES = 5
58 } E_STB_PVR_START_MODE;
59 
60 typedef enum e_stb_pvr_play_mode
61 {
62  PLAY_NO_TRICK = 0,
63  PLAY_TRICK_FORWARDS = 1,
64  PLAY_TRICK_REVERSE = 2,
65  PLAY_TRICK_FRAME = 3
66 } E_STB_PVR_PLAY_MODE;
67 
68 typedef struct s_pvr_pid_info
69 {
70  E_PVR_PID_TYPE type;
71  U16BIT pid;
72  union
73  {
74  E_STB_AV_VIDEO_CODEC video_codec;
75  E_STB_AV_AUDIO_CODEC audio_codec;
76  } u;
78 
79 
80 //---Global Function prototypes for public use---------------------------------
87 U8BIT STB_PVRInitPlayback(U8BIT num_audio_decoders, U8BIT num_video_decoders);
88 
94 U8BIT STB_PVRInitRecording(U8BIT num_tuners);
95 
102 void STB_PVRSetPlayStartMode(U8BIT audio_decoder, U8BIT video_decoder, E_STB_PVR_START_MODE mode);
103 
111 void STB_PVRPlayHasVideo(U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN has_video);
112 
120 void STB_PVRSetPlaybackNotifyTime(U8BIT audio_decoder, U8BIT video_decoder, U32BIT notify_time);
121 
131 BOOLEAN STB_PVRPlayStart(U16BIT disk_id, U8BIT audio_decoder, U8BIT video_decoder, U8BIT demux,
132  U8BIT *basename);
133 
143 BOOLEAN STB_PVRPlayChangeAudio(U8BIT audio_decoder, U8BIT video_decoder, U16BIT pid, U8BIT codec);
144 
151 BOOLEAN STB_PVRIsPlayStarted(U8BIT audio_decoder, U8BIT video_decoder);
152 
160 BOOLEAN STB_PVRPlaySetPosition(U8BIT audio_decoder, U8BIT video_decoder, U32BIT position_in_seconds);
161 
167 void STB_PVRPlayStop(U8BIT audio_decoder, U8BIT video_decoder);
168 
176 void STB_PVRPlayEnabled(U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN *video, BOOLEAN *audio);
177 
187 void STB_PVRPlaySetRetentionLimit(U8BIT audio_decoder, U8BIT video_decoder, U32BIT retention_limit,
188  U16BIT rec_date, U8BIT rec_hour, U8BIT rec_min);
189 
200 void STB_PVRSetRecordStartMode(U8BIT rec_index, E_STB_PVR_START_MODE mode, U32BIT param);
201 BOOLEAN STB_PVRRecordStart(U16BIT disk_id, U8BIT rec_index, U8BIT *basename,
202  U16BIT num_pids, S_PVR_PID_INFO *pid_array);
203 
209 BOOLEAN STB_PVRRecordPause(U8BIT rec_index);
210 
216 BOOLEAN STB_PVRRecordResume(U8BIT rec_index);
217 
225 BOOLEAN STB_PVRRecordChangePids(U8BIT rec_index, U16BIT num_pids, S_PVR_PID_INFO *pids_array);
226 
231 void STB_PVRRecordStop(U8BIT rec_index);
232 
238 BOOLEAN STB_PVRIsRecordStarted(U8BIT rec_index);
239 
246 void STB_PVRRecordEnabled(U8BIT rec_index, BOOLEAN *video, BOOLEAN *audio);
247 
256 void STB_PVRSetRecordEncryptionKey(U8BIT rec_index, BOOLEAN state, U8BIT *key, U8BIT *iv, U32BIT key_len);
257 
268 void STB_PVRSetPlaybackDecryptionKey(U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN state,
269  U8BIT *key, U8BIT *iv, U32BIT key_len);
270 
278 void STB_PVRPlayTrickMode(U8BIT audio_decoder, U8BIT video_decoder, E_STB_PVR_PLAY_MODE mode, S16BIT speed);
279 
285 void STB_PVRSaveFrame(U8BIT audio_decoder, U8BIT video_decoder);
286 
293 S16BIT STB_PVRGetPlaySpeed(U8BIT audio_decoder, U8BIT video_decoder);
294 
302 BOOLEAN STB_PVRSetPlaySpeed(U8BIT audio_decoder, U8BIT video_decoder, S16BIT speed);
303 
311 BOOLEAN STB_PVRIsValidRecording(U16BIT disk_id, U8BIT *basename);
312 
320 BOOLEAN STB_PVRCanBeUsedForRecording(U16BIT disk_id, U8BIT *basename);
321 
329 BOOLEAN STB_PVRDeleteRecording(U16BIT disk_id, U8BIT *basename);
330 
338 BOOLEAN STB_PVRGetRecordingSize(U16BIT disk_id, U8BIT *basename, U32BIT *rec_size_kb);
339 
349 BOOLEAN STB_PVRGetElapsedTime(U8BIT audio_decoder, U8BIT video_decoder, U8BIT *elapsed_hours,
350  U8BIT *elapsed_mins, U8BIT *elapsed_secs);
351 
358 U8BIT STB_PVRAcquireRecorderIndex(U8BIT tuner, U8BIT demux);
359 
364 void STB_PVRReleaseRecorderIndex(U8BIT rec_index);
365 
376 BOOLEAN STB_PVRApplyDescramblerKey(U8BIT rec_index, E_STB_DMX_DESC_TYPE desc_type,
377  E_STB_DMX_DESC_KEY_PARITY parity, U8BIT *key, U8BIT *iv);
378 
379 #endif // _STBPVRPR_H
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 bas...
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 record...
U8BIT STB_PVRInitRecording(U8BIT num_tuners)
Initialisation for recording.
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+...
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+.
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...
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.
void STB_PVRReleaseRecorderIndex(U8BIT rec_index)
Releases a recording index when no longer needed.
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.
void STB_PVRSaveFrame(U8BIT audio_decoder, U8BIT video_decoder)
Unused function.
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 aud...
S16BIT STB_PVRGetPlaySpeed(U8BIT audio_decoder, U8BIT video_decoder)
Returns the current playback speed.
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...
BOOLEAN STB_PVRPlayStart(U16BIT disk_id, U8BIT audio_decoder, U8BIT video_decoder, U8BIT demux, U8BIT *basename)
Starts playback.
Header file - Function prototypes for A/V control.
void STB_PVRRecordStop(U8BIT rec_index)
Stops a recording.
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 bas...
void STB_PVRPlayTrickMode(U8BIT audio_decoder, U8BIT video_decoder, E_STB_PVR_PLAY_MODE mode, S16BIT speed)
Sets trick mode during playback.
BOOLEAN STB_PVRRecordResume(U8BIT rec_index)
Resumes a paused recording.
U8BIT STB_PVRAcquireRecorderIndex(U8BIT tuner, U8BIT demux)
Acquires an index to be used to reference a recording.
Definition: stbpvrpr.h:68
BOOLEAN STB_PVRRecordPause(U8BIT rec_index)
Pauses a recording currently taking place.
BOOLEAN STB_PVRIsRecordStarted(U8BIT rec_index)
Returns whether recording has been started.
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...
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)
U8BIT STB_PVRInitPlayback(U8BIT num_audio_decoders, U8BIT num_video_decoders)
Initialisation for playback.
BOOLEAN STB_PVRRecordChangePids(U8BIT rec_index, U16BIT num_pids, S_PVR_PID_INFO *pids_array)
Changes the PIDs while recording.
System Wide Global Technical Data Type Definitions.
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...
void STB_PVRRecordEnabled(U8BIT rec_index, BOOLEAN *video, BOOLEAN *audio)
Returns status of audio/video recording.
BOOLEAN STB_PVRIsPlayStarted(U8BIT audio_decoder, U8BIT video_decoder)
Returns status of playback with the given decoders.
void STB_PVRSetPlayStartMode(U8BIT audio_decoder, U8BIT video_decoder, E_STB_PVR_START_MODE mode)
Set startup mode for playback.
Header file - Function prototypes for Demux control.
void STB_PVRPlayStop(U8BIT audio_decoder, U8BIT video_decoder)
Stops playback.
void STB_PVRPlayEnabled(U8BIT audio_decoder, U8BIT video_decoder, BOOLEAN *video, BOOLEAN *audio)
Returns whether audio and video playback has been started.
BOOLEAN STB_PVRSetPlaySpeed(U8BIT audio_decoder, U8BIT video_decoder, S16BIT speed)
Set the play speed for the specified decoder.
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.