DVBCore  1.0
Open source DVB engine
midware/stb/inc/stbpvr.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00025 // pre-processor mechanism so multiple inclusions don't cause compilation error
00026 
00027 #ifndef _STBPVR_H
00028 #define _STBPVR_H
00029 
00030 #include "stbpvrpr.h"
00031 #include "stbhwdmx.h"
00032 
00033 //---Constant and macro definitions for public use-----------------------------
00034 
00035 #define STB_PVR_NAME_LEN            255
00036 #define STB_PVR_BASENAME_LEN        9
00037 #define STB_PVR_SERVICE_LEN         32
00038 #define STB_PVR_ADDITIONAL_INFO_LEN 255
00039 
00040 #define STB_PVR_NORMAL_PLAY_SPEED   100
00041 #define STB_PVR_INVALID_HANDLE      0
00042 
00043 #define STB_PVR_MAX_CRID_LEN        65
00044 
00045 #define STB_PVR_MAX_ADD_INFO_LEN    255
00046 
00047 //---Enumerations for public use-----------------------------------------------
00048 
00049 typedef enum
00050 {
00051    FORMAT_START = 0,
00052    FORMAT_PROGRESS = 1,
00053    FORMAT_END = 2
00054 } E_STB_PVR_FORMATMODE;
00055 
00056 typedef enum
00057 {
00058    REPAIR_ENQUIRE = 0,
00059    REPAIR_START = 1,
00060    REPAIR_PROGRESS = 2,
00061    REPAIR_END = 3
00062 } E_STB_PVR_REPAIRMODE;
00063 
00064 //---Global type defs for public use-------------------------------------------
00065 
00066 //---Global Function prototypes for public use---------------------------------
00067 
00068 BOOLEAN STB_PVRInitialise(void);
00069 void STB_PVRSetStandbyState(BOOLEAN state);
00070 BOOLEAN STB_PVRIsInitialised(void);
00071 U16BIT STB_PVRGetDefaultDisk(void);
00072 BOOLEAN STB_PVRCanDiskBeUsed(U16BIT disk_id);
00073 
00074 BOOLEAN STB_PVRFormat(U16BIT disk_id, E_STB_PVR_FORMATMODE mode, U8BIT *prog);
00075 BOOLEAN STB_PVRRepair(U16BIT disk_id, E_STB_PVR_REPAIRMODE mode, U8BIT *prog);
00076 
00077 void STB_PVRUpdateRecordings(BOOLEAN force_load);
00078 
00079 BOOLEAN STB_PVRIsValidHandle(U32BIT handle);
00080 
00081 BOOLEAN STB_PVRCreateRecording(U16BIT disk_id, U8BIT *name, U32BIT *handle);
00082 BOOLEAN STB_PVRDestroyRecording(U32BIT handle);
00083 
00084 void STB_PVRSaveRecording(U32BIT handle);
00085 
00086 U16BIT STB_PVRGetRecordingHandles(U32BIT **handle_array);
00087 void STB_PVRReleaseRecordingHandles(U32BIT *handle_array);
00088 
00089 BOOLEAN STB_PVRFindRecordingFromCrid(U8BIT *prog_crid, U32BIT *handle);
00090 BOOLEAN STB_PVRFindNextSplitRecording(U32BIT curr_handle, U32BIT *next_handle);
00091 
00092 U32BIT STB_PVRGetHandleForRecordingIndex(U8BIT rec_index);
00093 
00094 void STB_PVRRecordingSetName(U32BIT handle, U8BIT *name);
00095 U8BIT* STB_PVRRecordingGetName(U32BIT handle);
00096 BOOLEAN STB_PVRRecordingGetDateTime(U32BIT handle, U16BIT *date, U8BIT *hours, U8BIT *mins, U8BIT *secs);
00097 BOOLEAN STB_PVRRecordingGetLength(U32BIT handle, U8BIT *length_hours, U8BIT *length_mins, U8BIT *length_secs, U32BIT *rec_size_kb);
00098 U16BIT STB_PVRRecordingGetDiskId(U32BIT handle);
00099 void STB_PVRRecordingSetSeries(U32BIT handle);
00100 void STB_PVRRecordingSetRecommendation(U32BIT handle);
00101 BOOLEAN STB_PVRRecordingGetRecommendation(U32BIT handle);
00102 BOOLEAN STB_PVRRecordingGetSeries(U32BIT handle);
00103 void STB_PVRRecordingSetOtherCrid(U32BIT handle, U8BIT *crid);
00104 BOOLEAN STB_PVRRecordingGetOtherCrid(U32BIT handle, U8BIT *crid, U16BIT name_len);
00105 
00111 void STB_PVRRecordingSetAdditionalInfo(U32BIT handle, U8BIT *additional_info);
00112 
00118 U8BIT* STB_PVRRecordingGetAdditionalInfo(U32BIT handle);
00119 
00125 void STB_PVRRecordingSetParentalRatingAge(U32BIT handle, U32BIT parental_rating);
00126 
00133 U32BIT STB_PVRRecordingGetParentalRating(U32BIT handle);
00134 
00140 void STB_PVRRecordingSetStartPadding(U32BIT handle, S32BIT start_padding);
00141 
00148 S32BIT STB_PVRRecordingGetStartPadding(U32BIT handle);
00149 
00155 void STB_PVRRecordingSetEndPadding(U32BIT handle, S32BIT end_padding);
00156 
00163 S32BIT STB_PVRRecordingGetEndPadding(U32BIT handle);
00164 
00165 void STB_PVRRecordingSetServiceName(U32BIT handle, U8BIT *service_name);
00166 BOOLEAN STB_PVRRecordingGetServiceName(U32BIT handle, U8BIT *service_name, U16BIT name_len);
00167 void STB_PVRRecordingSetDescription(U32BIT handle, U8BIT *description);
00168 BOOLEAN STB_PVRRecordingGetDescription(U32BIT handle, U8BIT *description, U16BIT desc_len);
00169 U16BIT STB_PVRRecordingGetDescriptionLen(U32BIT handle);
00170 void STB_PVRRecordingSetExtendedDescription(U32BIT handle, U8BIT *description);
00171 BOOLEAN STB_PVRRecordingGetExtendedDescription(U32BIT handle, U8BIT *description, U16BIT desc_len);
00172 U16BIT STB_PVRRecordingGetExtendedDescriptionLen(U32BIT handle);
00173 void STB_PVRRecordingSetCrid(U32BIT handle, U8BIT *crid);
00174 BOOLEAN STB_PVRRecordingGetCrid(U32BIT handle, U8BIT *crid, U16BIT name_len);
00175 BOOLEAN STB_PVRRecordingSetLocked(U32BIT handle, BOOLEAN state);
00176 BOOLEAN STB_PVRRecordingGetLocked(U32BIT handle);
00177 BOOLEAN STB_PVRRecordingSetSelected(U32BIT handle, BOOLEAN state);
00178 BOOLEAN STB_PVRRecordingGetSelected(U32BIT handle);
00179 BOOLEAN STB_PVRRecordingIsEncrypted(U32BIT handle);
00180 BOOLEAN STB_PVRRecordingSetParentalLock(U32BIT handle, BOOLEAN state);
00181 BOOLEAN STB_PVRRecordingGetParentalLock(U32BIT handle);
00182 BOOLEAN STB_PVRRecordingSetGuidance(U32BIT handle, U8BIT *text);
00183 BOOLEAN STB_PVRRecordingHasGuidance(U32BIT handle);
00184 BOOLEAN STB_PVRRecordingGetGuidance(U32BIT handle, U8BIT *text, U16BIT text_len);
00185 U16BIT STB_PVRRecordingGetGuidanceLen(U32BIT handle);
00186 
00187 BOOLEAN STB_PVRRecordingSetCicamId(U32BIT handle, U8BIT *cicam_id, U8BIT id_len);
00188 BOOLEAN STB_PVRRecordingGetCicamId(U32BIT handle, U8BIT *cicam_id, U8BIT id_len);
00189 BOOLEAN STB_PVRRecordingAddURI(U32BIT handle, U8BIT *uri);
00190 BOOLEAN STB_PVRRecordingUpdateURI(U32BIT handle, U8BIT *uri);
00191 BOOLEAN STB_PVRRecordingAddLicence(U32BIT handle, U8BIT *licence, U16BIT licence_len);
00192 BOOLEAN STB_PVRRecordingUpdateLicence(U32BIT handle, U8BIT *licence, U16BIT licence_len);
00193 BOOLEAN STB_PVRRecordingAddPin(U32BIT handle, U8BIT age_rating, U8BIT *private_data,
00194    U16BIT date_code, U8BIT hour, U8BIT min, U8BIT secs);
00195 
00196 BOOLEAN STB_PVRIsBeingRecorded(U32BIT handle);
00197 
00198 U32BIT STB_PVRGetTimeOfAllRecordings(U16BIT disk_id);
00199 U32BIT STB_PVRGetSizeOfAllRecordings(U16BIT disk_id);
00200 
00201 BOOLEAN STB_PVRGetSubtitlePlaybackInfo(U32BIT handle, U16BIT *pid, U16BIT *cpage, U16BIT *apage);
00202 BOOLEAN STB_PVRGetTeletextPlaybackInfo(U32BIT handle, U16BIT *pid, U8BIT *magazine, U8BIT *page);
00203 BOOLEAN STB_PVRGetADPlaybackInfo(U32BIT handle, U16BIT *pid, BOOLEAN *broadcast_mix);
00204 
00205 BOOLEAN STB_PVRStartPlayingAD(U8BIT path);
00206 BOOLEAN STB_PVRStopPlayingAD(U8BIT path);
00207 
00208 BOOLEAN STB_PVRToggleBookmark(U8BIT path);
00209 BOOLEAN STB_PVRGotoNextBookmark(U8BIT path);
00210 U16BIT STB_PVRGetBookmarks(U8BIT path, U32BIT **bookmarks);
00211 U16BIT STB_PVRGetBookmarksForRecording(U32BIT handle, U32BIT **bookmarks);
00212 void STB_PVRReleaseBookmarks(U32BIT *bookmarks);
00213 
00214 void STB_PVRPlaybackNotifyTime(U8BIT path);
00215 
00216 BOOLEAN STB_PVRStartPlaying(U8BIT path, U32BIT handle, BOOLEAN resume);
00217 BOOLEAN STB_PVRIsPlaying(U8BIT path, U32BIT *handle);
00218 void STB_PVRStopPlaying(U8BIT path);
00219 BOOLEAN STB_PVRRecordingGetTriplet(U32BIT handle, U16BIT *serv_id, U16BIT *ts_id, U16BIT *orig_net_id);
00220 
00221 void STB_PVRStartPlayRunning(U8BIT decoder);
00222 void STB_PVRStartPlayPaused(U8BIT decoder);
00223 void STB_PVRStartPlaySync(U8BIT decoder);
00224 BOOLEAN STB_PVRIsPlayAudio(U8BIT decoder);
00225 
00226 BOOLEAN STB_PVRIsPlayVideo(U32BIT handle);
00227 
00228 BOOLEAN STB_PVRSetRecordingPids(U8BIT path, U16BIT num_pids, S_PVR_PID_INFO *pid_array);
00229 BOOLEAN STB_PVRUpdateRecordingPids(U8BIT path, U16BIT num_pids, S_PVR_PID_INFO *pid_array);
00230 
00231 BOOLEAN STB_PVRSetRecoringTriplet(U8BIT path, U16BIT serv_id, U16BIT ts_id, U16BIT orig_net_id);
00232 
00233 void STB_PVRSetSubtitleRecordingInfo(U32BIT handle, U16BIT pid, U16BIT cpage, U16BIT apage);
00234 void STB_PVRSetADRecordingInfo(U32BIT handle, U16BIT pid, BOOLEAN broadcast_mix);
00235 
00236 BOOLEAN STB_PVRStartRecording(U8BIT path, U32BIT handle);
00237 BOOLEAN STB_PVRPauseRecording(U8BIT path);
00238 BOOLEAN STB_PVRResumeRecording(U8BIT path);
00239 void STB_PVRStopRecording(U8BIT path);
00240 BOOLEAN STB_PVRIsRecording(U8BIT path, U32BIT *handle);
00241 
00242 void STB_PVRStartRecordRunning(U8BIT path);
00243 void STB_PVRStartRecordPaused(U8BIT path, U32BIT timeshift_seconds);
00244 BOOLEAN STB_PVRIsRecordVideo(U8BIT path);
00245 BOOLEAN STB_PVRIsRecordAudio(U8BIT path);
00246 
00247 void STB_PVREncryptRecording(U8BIT path, BOOLEAN state);
00248 
00249 #ifdef COMMON_INTERFACE
00250 BOOLEAN STB_PVRSetDescramblerKey(U8BIT path, E_STB_DMX_DESC_TYPE desc_type,
00251    E_STB_DMX_DESC_KEY_PARITY parity, U8BIT *key, U8BIT *iv);
00252 #endif
00253 
00254 void STB_PVRPlayNormal(U8BIT decoder);
00255 BOOLEAN STB_PVRIsPlayNormal(U8BIT decoder);
00256 
00257 void STB_PVRPlayPause(U8BIT decoder);
00258 BOOLEAN STB_PVRIsPlayPause(U8BIT decoder);
00259 
00260 void STB_PVRPlayForward(U8BIT decoder);
00261 BOOLEAN STB_PVRIsPlayForward(U8BIT decoder);
00262 
00263 void STB_PVRPlayReverse(U8BIT decoder);
00264 BOOLEAN STB_PVRIsPlayReverse(U8BIT decoder);
00265 
00266 void STB_PVRPlayFrameInc(U8BIT decoder);
00267 void STB_PVRPlayFrameDec(U8BIT decoder);
00268 
00269 void STB_PVRPlayMedium(U8BIT decoder);
00270 BOOLEAN STB_PVRIsPlayMedium(U8BIT decoder);
00271 
00272 void STB_PVRPlaySlower(U8BIT decoder, BOOLEAN include_slow_speeds);
00273 BOOLEAN STB_PVRIsPlaySlowest(U8BIT decoder);
00274 
00275 void STB_PVRPlayFaster(U8BIT decoder, BOOLEAN include_slow_speeds);
00276 BOOLEAN STB_PVRIsPlayFastest(U8BIT decoder);
00277 
00278 S16BIT STB_PVRGetMinPlaySpeed(U8BIT path);
00279 S16BIT STB_PVRGetMaxPlaySpeed(U8BIT path);
00280 
00281 void STB_PVRDiskUsed(U16BIT disk_id, U8BIT *hours, U8BIT *mins);
00282 void STB_PVRDiskFree(U16BIT disk_id, U8BIT *hours, U8BIT *mins);
00283 U32BIT STB_PVRDiskSize(U16BIT disk_id);
00284 
00285 #endif //  _STBPVR_H
00286 
00287 //*****************************************************************************
00288 // End of file
00289 //*****************************************************************************
00290 
 All Data Structures Files Functions Typedefs Defines