58 #ifdef INTEGRATE_HBBTV 71 #ifdef COMMON_INTERFACE 80 extern void LogDateTime();
87 #define APP_PRINT_PVR_REC(x) // STB_SPDebugWrite x // recording 88 #define APP_PRINT_PVR_PAUSE(x) // STB_SPDebugWrite x // pause 89 #define APP_PRINT_PVR_PLAY_STATUS(x) // STB_SPDebugWrite x // play status 90 #define APP_PRINT_PVR_PLAY_TUNE(x) // STB_SPDebugWrite x // play status 91 #define APP_PRINT_PVR_FP(x) // STB_SPDebugWrite x // Freeview+ debug 94 #define PVR_NUM_DUMMY_RECORDINGS 15 96 #define PVR_NORMAL_PLAY_SPEED 100 98 #define RECORD_WAIT_TIMEOUT 1000 // 1 seconds 103 #define PVR_100_PERCENT 100 105 #define CRID_DATE_TIMEOUT 91 108 #define CRID_MAX_SIZE 64 119 #define DBG_PVR(X) STB_SPDebugWrite X 129 static void *tuned_service_ptr;
132 static BOOLEAN inc_speed;
133 static BOOLEAN is_trick_mode_mute_on;
134 static U8BIT trick_mode_copy_volume_value;
135 static U32BIT playback_handle;
136 static U8BIT playback_path = INVALID_RES_ID;
137 static U8BIT pause_path = INVALID_RES_ID;
138 static U8BIT monitor_si_path = INVALID_RES_ID;
141 static U32BIT paused_recording;
142 static U16BIT paused_disk_id;
143 static U16BIT timeshift_buffer_size;
145 static void *eit_update_queue;
146 static void *process_crids_task;
150 static BOOLEAN encrypt_recordings;
152 #ifdef COMMON_INTERFACE 153 static U32BIT *cam_record_start_timer;
164 static BOOLEAN GetRecording(U8BIT tuner_id, U8BIT **name_ptr);
165 static BOOLEAN DestroyRecording(U32BIT recording_handle);
166 static S16BIT IsPidInList(U16BIT pid,
S_PVR_PID_INFO *pid_array, U16BIT num_pids);
167 static U16BIT FillPidList(
void *service,
S_PVR_PID_INFO **pid_array);
168 static void SetupForRecording(U8BIT path,
void *service, BOOLEAN update);
173 static BOOLEAN IsPlayingHandle(U32BIT *recording_handle_ptr);
175 static void EitUpdatedTask(
void *param);
176 static void ProcessCridRecords(
void);
180 #ifdef COMMON_INTERFACE 181 static U32BIT NewCountdownTimer(U32BIT seconds);
197 static BOOLEAN GetRecording(U8BIT path, U8BIT **name_ptr)
199 BOOLEAN recording_ok;
200 U32BIT recording_handle;
202 FUNCTION_START(GetRecording);
212 recording_ok = FALSE;
215 FUNCTION_FINISH(GetRecording);
217 return(recording_ok);
232 static BOOLEAN DestroyRecording(U32BIT recording_handle)
238 FUNCTION_START(DestroyRecording);
243 if (recording_handle != 0)
246 if (IsPlayingHandle(&handle) == TRUE)
248 if (handle == recording_handle)
250 APP_PRINT_PVR_REC((
"DestroyRecording: stop playing recording 0x%x", recording_handle));
260 if (handle == recording_handle)
264 APP_PRINT_PVR_REC((
"DestroyRecording: StopRecordingType for path %d finished", path));
270 if (retval && (recording_handle != paused_recording))
272 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_APPLICATION, EV_PVR_RECORDING_DELETED,
273 &recording_handle,
sizeof(recording_handle));
277 FUNCTION_FINISH(DestroyRecording);
295 static BOOLEAN IsPlayingHandle(U32BIT *recording_handle_ptr)
300 FUNCTION_START(IsPlayingHandle);
304 if (playback_path != INVALID_RES_ID)
306 path = playback_path;
313 if (path != INVALID_RES_ID)
321 FUNCTION_FINISH(IsPlayingHandle);
333 static S16BIT IsPidInList(U16BIT pid,
S_PVR_PID_INFO *pid_array, U16BIT num_pids)
340 for (i = 0; i < num_pids; i++)
342 if (pid_array[i].pid == pid)
359 static U16BIT FillPidList(
void *service,
S_PVR_PID_INFO **pid_array)
371 U16BIT *ca_pid_array;
374 FUNCTION_START(FillPidList);
382 if (pmt_data != NULL)
387 max_pids += num_ca_pids;
405 rec_pids[num_pids].type = PVR_PID_TYPE_PCR;
406 rec_pids[num_pids].pid = pid;
412 if ((num_streams > 0) && (stream_list != NULL))
414 for (i = 0; i < num_streams; i++)
420 if ((index = IsPidInList(pid, rec_pids, num_pids)) >= 0)
422 if (rec_pids[index].type == PVR_PID_TYPE_PCR)
431 rec_pids[num_pids].type = PVR_PID_TYPE_VIDEO;
432 rec_pids[num_pids].pid = pid;
436 case ADB_VIDEO_STREAM:
437 rec_pids[num_pids].u.video_codec = AV_VIDEO_CODEC_MPEG2;
440 case ADB_H264_VIDEO_STREAM:
441 rec_pids[num_pids].u.video_codec = AV_VIDEO_CODEC_H264;
444 case ADB_H265_VIDEO_STREAM:
445 rec_pids[num_pids].u.video_codec = AV_VIDEO_CODEC_H265;
449 rec_pids[num_pids].u.video_codec = AV_VIDEO_CODEC_AUTO;
463 if ((num_streams > 0) && (stream_list != NULL))
465 for (i = 0; i < num_streams; i++)
471 if ((index = IsPidInList(pid, rec_pids, num_pids)) >= 0)
473 if (rec_pids[index].type == PVR_PID_TYPE_PCR)
482 rec_pids[num_pids].type = PVR_PID_TYPE_AUDIO;
483 rec_pids[num_pids].pid = pid;
487 case ADB_AUDIO_STREAM:
488 rec_pids[num_pids].u.audio_codec = AV_AUDIO_CODEC_MP2;
491 case ADB_AAC_AUDIO_STREAM:
492 rec_pids[num_pids].u.audio_codec = AV_AUDIO_CODEC_AAC;
495 case ADB_HEAAC_AUDIO_STREAM:
496 rec_pids[num_pids].u.audio_codec = AV_AUDIO_CODEC_HEAAC;
499 case ADB_AC3_AUDIO_STREAM:
500 rec_pids[num_pids].u.audio_codec = AV_AUDIO_CODEC_AC3;
503 case ADB_EAC3_AUDIO_STREAM:
504 rec_pids[num_pids].u.audio_codec = AV_AUDIO_CODEC_EAC3;
508 rec_pids[num_pids].u.audio_codec = AV_AUDIO_CODEC_AUTO;
520 ADB_GetStreamList(service, ADB_SUBTITLE_LIST_STREAM, &stream_list, &num_streams);
521 if ((num_streams > 0) && (stream_list != NULL))
523 for (i = 0; i < num_streams; i++)
526 if ((pid != 0) && (IsPidInList(pid, rec_pids, num_pids) < 0))
528 rec_pids[num_pids].type = PVR_PID_TYPE_SUBTITLES;
529 rec_pids[num_pids].pid = pid;
538 if ((num_streams > 0) && (stream_list != NULL))
540 for (i = 0; i < num_streams; i++)
543 if ((pid != 0) && (IsPidInList(pid, rec_pids, num_pids) < 0))
545 rec_pids[num_pids].type = PVR_PID_TYPE_TELETEXT;
546 rec_pids[num_pids].pid = pid;
554 rec_pids[num_pids].type = PVR_PID_TYPE_SECTION;
555 rec_pids[num_pids].pid = PAT_PID;
558 rec_pids[num_pids].type = PVR_PID_TYPE_SECTION;
559 rec_pids[num_pids].pid = CAT_PID;
562 rec_pids[num_pids].type = PVR_PID_TYPE_SECTION;
563 rec_pids[num_pids].pid = EIT_PID;
567 if ((pid != 0) && (pid != 0xFFFF))
569 rec_pids[num_pids].type = PVR_PID_TYPE_SECTION;
570 rec_pids[num_pids].pid = pid;
576 for (i = 0; i < num_ca_pids; i++)
578 if (IsPidInList(ca_pid_array[i], rec_pids, num_pids) < 0)
580 rec_pids[num_pids].type = PVR_PID_TYPE_SECTION;
581 rec_pids[num_pids].pid = ca_pid_array[i];
589 *pid_array = rec_pids;
594 fprintf(pvr_log,
"FillPidList: LCN=%u, num_pids=%u\n",
ADB_GetServiceLcn(service), num_pids);
598 FUNCTION_FINISH(FillPidList);
610 static void SetupForRecording(U8BIT path,
void *service, BOOLEAN update)
615 U16BIT serv_id, ts_id, onet_id;
617 FUNCTION_START(SetupForRecording);
619 if ((num_pids = FillPidList(service, &rec_pids)) > 0)
645 FUNCTION_FINISH(SetupForRecording);
655 #ifdef COMMON_INTERFACE 664 paused_recording = 0;
665 paused_disk_id = INVALID_DISK_ID;
666 timeshift_buffer_size = (U16BIT)
APP_NvmRead(TIMESHIFT_BUFFER_SIZE_NVM);
668 tuned_service_ptr = NULL;
670 is_trick_mode_mute_on = FALSE;
671 trick_mode_copy_volume_value = 0;
673 encrypt_recordings = FALSE;
675 playback_path = INVALID_RES_ID;
678 if (eit_update_queue != NULL)
680 process_crids_task =
STB_OSCreateTask(EitUpdatedTask, eit_update_queue, 4096, 7, (U8BIT *)
"ProcessCrids");
686 #ifdef COMMON_INTERFACE 689 if ((cam_record_start_timer = (U32BIT *)
STB_AppGetMemory(num_paths *
sizeof(U32BIT))) != NULL)
691 for (i = 0; i < num_paths; i++)
693 cam_record_start_timer[i] = INVALID_TIMER_HANDLE;
698 DBG_PVR((
"APVR_Initialise: done"));
711 if (eit_update_queue != NULL)
713 if (process_crids_task)
717 STB_OSWriteQueue(eit_update_queue, (
void *)&q_msg,
sizeof(q_msg), TIMEOUT_NOW);
720 while (eit_update_queue != NULL);
723 process_crids_task = 0;
727 #ifdef COMMON_INTERFACE 728 if (cam_record_start_timer != NULL)
743 BOOLEAN initialised_ok;
751 return(initialised_ok);
766 APP_NvmSave(PVR_NOTIFY_TIME_NVM, (U32BIT)notify_time, TRUE);
792 APP_NvmSave(RECORD_START_PADDING_NVM, (U32BIT)padding, TRUE);
807 APP_NvmSave(RECORD_END_PADDING_NVM, (U32BIT)padding, TRUE);
820 return((S32BIT)
APP_NvmRead(RECORD_START_PADDING_NVM));
831 return((S32BIT)
APP_NvmRead(RECORD_END_PADDING_NVM));
853 U16BIT
APVR_GetPlayList(U32BIT **handle_list, U8BIT ***name_list, U32BIT **rec_status_list,
854 U32BIT **locked_list, U32BIT **selected_list, U32BIT **split_list)
868 for (index = 0; index < list_size; index++)
870 if ((*handle_list)[index] == paused_recording)
873 for (index++; index < list_size; index++)
875 (*handle_list)[index-1] = (*handle_list)[index];
888 if ((*name_list != NULL) && (*rec_status_list != NULL) &&
889 (*locked_list != NULL) && (*selected_list != NULL) &&
890 (*split_list != NULL))
893 for (index = 0; index < list_size; index++)
895 handle = (*handle_list)[index];
911 (*split_list)[index] = FALSE;
922 if (*name_list != NULL)
928 if (*rec_status_list != NULL)
931 *rec_status_list = NULL;
934 if (*locked_list != NULL)
940 if (*selected_list != NULL)
943 *selected_list = NULL;
946 if (*split_list != NULL)
959 *rec_status_list = NULL;
961 *selected_list = NULL;
979 U32BIT *locked_list, U32BIT *selected_list, U32BIT *split_list)
983 if (handle_list != NULL)
988 if (name_list != NULL)
993 if (rec_status_list != NULL)
998 if (locked_list != NULL)
1003 if (selected_list != NULL)
1008 if (split_list != NULL)
1033 BOOLEAN playback_started;
1035 U16BIT serv_id, ts_id, orig_net_id;
1039 playback_started = FALSE;
1041 APP_PRINT_PVR_PLAY_TUNE((
"APVR_PlayRecording(0x%lx, resume=%u, monitor_service=%p)",
1042 recording_handle, resume_playback, monitor_service));
1046 playback_started = TRUE;
1049 if (monitor_service == NULL)
1051 if (path != INVALID_RES_ID)
1056 tuned_service_ptr = monitor_service;
1060 tuned_service_ptr = NULL;
1063 else if (path != INVALID_RES_ID)
1069 APP_PRINT_PVR_PLAY_TUNE((
"APVR_PlayRecording: tuned_service_ptr = Ox%x", tuned_service_ptr));
1071 if (path != INVALID_RES_ID)
1078 if (playback_path == INVALID_RES_ID)
1082 playback_service = CreatePlaybackService(serv_id);
1084 APP_PRINT_PVR_PLAY_TUNE((
"Acquired playback path %u", playback_path));
1087 if (playback_path != INVALID_RES_ID)
1092 playback_handle = recording_handle;
1095 if (playback_started)
1100 APP_PRINT_PVR_PLAY_TUNE((
"Setting APP_SI_MODE_UPDATE on playback path %u", playback_path));
1105 if (monitor_service != NULL)
1109 APP_PRINT_PVR_PLAY_TUNE((
"Path for monitoring SI data=%u", monitor_si_path));
1110 if (monitor_si_path != INVALID_RES_ID)
1118 playback_handle = 0;
1121 playback_path = INVALID_RES_ID;
1123 FreePlaybackService(playback_service);
1124 playback_service = NULL;
1127 if (tuned_service_ptr != NULL)
1130 tuned_service_ptr = NULL;
1138 return(playback_started);
1149 return(playback_handle);
1158 BOOLEAN is_playing_file;
1160 U32BIT recording_handle;
1164 is_playing_file = FALSE;
1166 if (playback_path != INVALID_RES_ID)
1168 path = playback_path;
1175 if (path != INVALID_RES_ID)
1179 is_playing_file = TRUE;
1180 APP_PRINT_PVR_PLAY_STATUS((
"APVR_IsDecodingFile: STB_PVRIsPlaying(%u,...) returned TRUE", path));
1184 APP_PRINT_PVR_PLAY_STATUS((
"APVR_IsDecodingFile: STB_PVRIsPlaying(%u,...) returned FALSE", path));
1190 return(is_playing_file);
1205 if (playback_path != INVALID_RES_ID)
1231 U8BIT audio_decoder, video_decoder;
1242 if (path != INVALID_RES_ID)
1247 if ((audio_decoder == INVALID_RES_ID) ||
1258 if ((length_hour > 0) || (length_min > 0) || (length_sec > 0))
1261 *progress = ((*hours * 3600 + *mins * 60 + *secs) * 100) /
1262 (length_hour * 3600 + length_min * 60 + length_sec);
1287 if (playback_path != INVALID_RES_ID)
1294 APP_PRINT_PVR_PLAY_STATUS((
"Normal Play"));
1306 U32BIT recording_handle;
1313 APP_PRINT_PVR_PLAY_TUNE((
"Stop Play: recording 0x%x", recording_handle));
1316 if (playback_path != INVALID_RES_ID)
1332 playback_path = INVALID_RES_ID;
1334 FreePlaybackService(playback_service);
1335 playback_service = NULL;
1338 if (monitor_si_path != INVALID_RES_ID)
1342 monitor_si_path = INVALID_RES_ID;
1349 if (tuned_service_ptr != NULL)
1355 tuned_service_ptr = NULL;
1356 for (path = 0; (path <
STB_DPGetNumPaths()) && (tuned_service_ptr == NULL); path++)
1362 APP_PRINT_PVR_PLAY_TUNE((
"APVR_StopPlay: returning to service = Ox%x", tuned_service_ptr));
1363 if (tuned_service_ptr != NULL)
1366 tuned_service_ptr = NULL;
1383 if (playback_path != INVALID_RES_ID)
1385 path = playback_path;
1392 if (path != INVALID_RES_ID)
1396 APP_PRINT_PVR_PLAY_STATUS((
"Pause Play(%d): already paused so FrameInc", path));
1401 APP_PRINT_PVR_PLAY_STATUS((
"Pause Play(%d): ", path));
1422 if (playback_path != INVALID_RES_ID)
1424 path = playback_path;
1431 if (path != INVALID_RES_ID)
1437 APP_PRINT_PVR_PLAY_STATUS((
"Fast Forward(%d): Paused so go into slow motion play", path));
1444 if ((play_speed >= PVR_NORMAL_PLAY_SPEED) ||
1445 (play_speed <= -PVR_NORMAL_PLAY_SPEED))
1447 APP_PRINT_PVR_PLAY_STATUS((
"Fast Forward(%d): Not slow motion, play faster", path));
1453 APP_PRINT_PVR_PLAY_STATUS((
"Fast Forward(%d): Slow motion, play faster", path));
1475 if (playback_path != INVALID_RES_ID)
1477 path = playback_path;
1484 if (path != INVALID_RES_ID)
1490 APP_PRINT_PVR_PLAY_STATUS((
"Fast Rewind(%d): Paused so go into slow motion play", path));
1496 APP_PRINT_PVR_PLAY_STATUS((
"Fast Rewind(%d): speed=%d", play_speed));
1498 if ((play_speed >= PVR_NORMAL_PLAY_SPEED) ||
1499 (play_speed <= -PVR_NORMAL_PLAY_SPEED))
1501 APP_PRINT_PVR_PLAY_STATUS((
"Fast Rewind(%d): Not slow motion, play slower", path));
1507 APP_PRINT_PVR_PLAY_STATUS((
"Fast Rewind(%d): Slow motion, play slower", path));
1525 if (playback_path != INVALID_RES_ID)
1527 path = playback_path;
1534 if (path != INVALID_RES_ID)
1538 if (inc_speed == TRUE)
1540 APP_PRINT_PVR_PLAY_STATUS((
"Slow Motion(%d): play medium and inc_speed = FALSE", path));
1547 APP_PRINT_PVR_PLAY_STATUS((
"Slow Motion(%d): APVR_FFPlay()", path));
1552 APP_PRINT_PVR_PLAY_STATUS((
"Slow Motion(%d): APVR_FRPlay()", path));
1576 APP_PRINT_PVR_PLAY_STATUS((
"Quick Replay: TBD - so do nothing"));
1597 APP_PRINT_PVR_PLAY_STATUS((
"Jump To Live: TBD so do nothing"));
1608 U8BIT audio_decoder, video_decoder;
1609 E_PVR_PLAY_STATUS play_mode;
1615 play_mode = PVR_PLAY_STATUS_NULL;
1617 if (playback_path != INVALID_RES_ID)
1619 path = playback_path;
1626 if (path != INVALID_RES_ID)
1635 if (play_speed == 100)
1637 play_mode = PVR_PLAY_STATUS_NORMAL;
1639 else if (play_speed > PVR_NORMAL_PLAY_SPEED)
1641 play_mode = PVR_PLAY_STATUS_FF;
1643 else if (play_speed < -PVR_NORMAL_PLAY_SPEED)
1645 play_mode = PVR_PLAY_STATUS_FR;
1647 else if ((play_speed > 0) && (play_speed < PVR_NORMAL_PLAY_SPEED))
1649 play_mode = PVR_PLAY_STATUS_SF;
1651 else if ((play_speed < 0) && (play_speed > -PVR_NORMAL_PLAY_SPEED))
1653 play_mode = PVR_PLAY_STATUS_SR;
1655 else if (play_speed == 0)
1657 play_mode = PVR_PLAY_STATUS_PAUSE;
1662 play_mode = PVR_PLAY_STATUS_STOP;
1685 if (playback_path != INVALID_RES_ID)
1687 path = playback_path;
1694 if (path != INVALID_RES_ID)
1716 if (playback_path != INVALID_RES_ID)
1720 #ifdef INTEGRATE_HBBTV 1741 U8BIT audio_decoder;
1745 if (!is_trick_mode_mute_on && (playback_path != INVALID_RES_ID))
1748 if (audio_decoder != INVALID_RES_ID)
1750 is_trick_mode_mute_on = TRUE;
1764 U8BIT audio_decoder;
1768 if (is_trick_mode_mute_on && (playback_path != INVALID_RES_ID))
1771 if (audio_decoder != INVALID_RES_ID)
1773 is_trick_mode_mute_on = FALSE;
1775 trick_mode_copy_volume_value = 0;
1801 path = INVALID_RES_ID;
1802 *new_tuned_service = FALSE;
1806 APP_PRINT_PVR_REC((
"APVR_PrepareNewRecording(onet=0x%04x, tid=0x%04x, sid=0x%04x): preparing recording on service %p",
1807 onet_id, trans_id, service_id, s_ptr));
1811 owner_info.owner = RES_OWNER_DVB;
1812 owner_info.data = NULL;
1813 owner_info.data_size = 0;
1815 if ((path =
ACTL_TuneToService(INVALID_RES_ID, &owner_info, s_ptr, FALSE, FALSE)) != INVALID_RES_ID)
1838 U8BIT *prog_crid, U8BIT *other_crid, U32BIT *rec_handle)
1840 BOOLEAN recording_started_ok;
1844 U8BIT guidance_type;
1845 U8BIT guidance_mode;
1847 #ifdef COMMON_INTERFACE 1852 U8BIT uri[CIP_URI_LEN];
1854 U8BIT pin_str[CIP_MAX_PIN_LENGTH + 1];
1859 U8BIT rec_hour, rec_min, rec_secs;
1865 recording_started_ok = FALSE;
1868 if (recording_name == NULL)
1870 APP_PRINT_PVR_REC((
"APVR_StartNewRecording(%d): Start Record (name!)", path));
1874 APP_PRINT_PVR_REC((
"APVR_StartNewRecording(%d): Start Record (%s)", path, recording_name));
1889 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: Create Recording"));
1895 if ((event_id == 0) || ((event_ptr =
ADB_GetEvent(service, event_id)) == NULL))
1905 if (event_ptr != NULL)
1909 DBG_PVR((
">> This recording(event) needs to be encrypted\n"));
1923 DBG_PVR((
">> This recording(service) needs to be encrypted\n"));
1943 SetupForRecording(path, service, FALSE);
1950 fprintf(pvr_log,
"Start recording \"%s\", event id %u, path %u",
1951 recording_name, event_id, path);
1953 if (service != NULL)
1956 fprintf(pvr_log,
", on %s", name);
1959 if ((prog_crid != NULL) && (strlen((
char *)prog_crid) > 0))
1961 fprintf(pvr_log,
", crid=%s", (
char *)prog_crid);
1963 fprintf(pvr_log,
", handle=0x%08lx\n", *rec_handle);
1966 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: recording 0x%x, \"%s\" started on path %d",
1967 *rec_handle, recording_name, path));
1969 recording_started_ok = TRUE;
1971 if (service != NULL)
1981 if ((prog_crid != NULL) && (strlen((
char *)prog_crid) > 0))
1986 if ((other_crid != NULL) && (strlen((
char *)other_crid) > 0))
1991 if (event_ptr != NULL)
2011 if (guidance != NULL)
2017 #ifdef COMMON_INTERFACE 2019 if (slot_id != INVALID_RES_ID)
2035 STB_PVRRecordingAddURI(*rec_handle, uri);
2048 sprintf((
char *)pin_str,
"%lu", (
unsigned long)cam_pin);
2052 cam_record_start_timer[path] = NewCountdownTimer(10);
2058 cam_record_start_timer[path] = INVALID_TIMER_HANDLE;
2061 recording_started_ok = FALSE;
2068 recording_started_ok = FALSE;
2069 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: Failed to pause recording"));
2076 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: Setting APP_SI_MODE_UPDATE on record path %u", path));
2085 fprintf(pvr_log,
"Failed to start recording \"%s\", event id %u, path %u",
2086 recording_name, event_id, path);
2087 if (service != NULL)
2090 fprintf(pvr_log,
", on %s", name);
2093 fprintf(pvr_log,
"\n");
2096 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: failed to start recording 0x%x, \"%s\", path %d",
2097 *rec_handle, recording_name, path));
2102 if (event_ptr != NULL)
2107 if (recording_started_ok)
2109 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_APPLICATION, EV_PVR_RECORDING_STARTED,
2110 &path,
sizeof(path));
2115 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: Failed to create recording"));
2122 fprintf(pvr_log,
"Failed to start recording \"%s\", event id %u, path %u, no disk",
2123 recording_name, event_id, path);
2124 fprintf(pvr_log,
"\n");
2127 APP_PRINT_PVR_REC((
"APVR_StartNewRecording: No disk available to record onto"));
2133 UI_GetString(STR_PVR_REC_FAIL_NO_DISK), recording_name,
2138 if (pvr_err_msg != NULL)
2148 return(recording_started_ok);
2159 BOOLEAN recording_stopped;
2161 #ifdef COMMON_INTERFACE 2167 recording_stopped = FALSE;
2174 #ifdef COMMON_INTERFACE 2181 APP_PRINT_PVR_REC((
"APVR_StopRecording: recording 0x%x is using path %d", recording_handle, path));
2191 recording_stopped = TRUE;
2195 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_APPLICATION, EV_PVR_RECORDING_STOPPED,
2196 &handle,
sizeof(handle));
2203 return(recording_stopped);
2215 U8BIT list_size = 0;
2218 BOOLEAN is_recording;
2219 U32BIT recording_handle;
2226 for (path = 0; path < num_paths; path++)
2230 if (is_recording == TRUE)
2240 if (*handle_list != NULL)
2243 for (path = 0; path < num_paths; path++)
2247 if (is_recording == TRUE)
2249 if (index < list_size)
2251 *handle_list[index] = recording_handle;
2263 *handle_list = NULL;
2277 FUNCTION_START(PVR_ReleaseActiveRecordingList);
2279 if (handle_list != NULL)
2297 BOOLEAN recording_list_ok;
2301 recording_list_ok = GetRecording(path, name_ptr);
2303 if (recording_list_ok)
2305 APP_PRINT_PVR_REC((
"APVR_GetTunerRecordingName(%d): recording \"%s\" is playing", path, *name_ptr));
2310 return(recording_list_ok);
2322 BOOLEAN recording_deleted_ok;
2328 recording_deleted_ok = DestroyRecording(handle);
2332 recording_deleted_ok = FALSE;
2337 return(recording_deleted_ok);
2350 BOOLEAN recording_deleted;
2355 recording_deleted = FALSE;
2357 if ((handles != NULL) && (num_handles > 0))
2359 for (i = 0; i < num_handles; i++)
2363 DestroyRecording(handles[i]);
2364 recording_deleted = TRUE;
2371 return(recording_deleted);
2383 if ((handles != NULL) && (num_handles > 0))
2385 for (i = 0; i < num_handles; i++)
2402 BOOLEAN recording_selected;
2407 recording_selected = FALSE;
2409 if ((handles != NULL) && (num_handles > 0))
2411 for (i = 0; (i < num_handles) && !recording_selected; i++)
2419 return(recording_selected);
2434 timeshift_buffer_size = time_in_mins;
2435 APP_NvmSave(TIMESHIFT_BUFFER_SIZE_NVM, time_in_mins, TRUE);
2447 return((U16BIT)
APP_NvmRead(TIMESHIFT_BUFFER_SIZE_NVM));
2460 if ((pause_path != INVALID_RES_ID) && (playback_path != INVALID_RES_ID))
2485 if ((path != INVALID_RES_ID) && (pause_path == path))
2510 if ((handle != STB_PVR_INVALID_HANDLE) && (paused_recording == handle))
2540 BOOLEAN new_tuned_service;
2541 BOOLEAN record_started;
2542 #ifdef COMMON_INTERFACE 2548 pause_path = INVALID_RES_ID;
2554 if (live_path != INVALID_RES_ID)
2557 if ((serv_ptr != NULL) && (disk_id != INVALID_DISK_ID))
2568 trans_id = ADB_INVALID_DVB_ID;
2569 onet_id = ADB_INVALID_DVB_ID;
2573 tuned_service_ptr = serv_ptr;
2575 record_started = FALSE;
2577 #ifdef INTEGRATE_HBBTV 2587 if (pause_path != INVALID_RES_ID)
2592 #ifdef COMMON_INTERFACE 2599 if (
APVR_StartNewRecording(disk_id, pause_path, (U8BIT *)
"PauseLiveTV", 0, 0, 0, &paused_recording) == TRUE)
2601 paused_disk_id = disk_id;
2602 APP_PRINT_PVR_PAUSE((
"APVR_StartPauseRecord: Recording live, handle=0x%04x", paused_recording));
2603 record_started = TRUE;
2605 #ifdef APP_PRINT_PVR_PAUSE 2608 APP_PRINT_PVR_PAUSE((
"APVR_StartPauseRecord: Failed to start recording"));
2612 if (!record_started)
2617 pause_path = INVALID_RES_ID;
2620 #if defined(APP_PRINT_PVR_PAUSE) || defined(INTEGRATE_HBBTV) 2623 APP_PRINT_PVR_PAUSE((
"APVR_StartPauseRecord: Failed to get a path for recording"));
2624 #ifdef INTEGRATE_HBBTV 2647 U16BIT serv_id, ts_id, orig_net_id;
2651 playback_path = INVALID_RES_ID;
2653 if (paused_recording != 0)
2656 if (live_path != INVALID_RES_ID)
2664 playback_service = CreatePlaybackService(serv_id);
2667 if (playback_path != INVALID_RES_ID)
2678 APP_PRINT_PVR_PAUSE((
"%s: Setting APP_SI_MODE_UPDATE on playback path for live pause %u",
2679 __FUNCTION__, playback_path));
2685 playback_handle = paused_recording;
2690 APP_PRINT_PVR_PAUSE((
"APVR_StartPausePlay: Path for monitoring SI data=%u", monitor_si_path));
2691 if (monitor_si_path != INVALID_RES_ID)
2696 #ifdef INTEGRATE_HBBTV 2703 APP_PRINT_PVR_PAUSE((
"APVR_StartPausePlay: Failed to start paused playback"));
2706 playback_path = INVALID_RES_ID;
2708 FreePlaybackService(playback_service);
2709 playback_service = NULL;
2712 #ifdef APP_PRINT_PVR_PAUSE 2715 APP_PRINT_PVR_PAUSE((
"APVR_StartPausePlay: Failed to get a playback path"));
2722 return(playback_path);
2737 if (playback_path != INVALID_RES_ID)
2741 FreePlaybackService(playback_service);
2742 playback_service = NULL;
2752 playback_path = INVALID_RES_ID;
2755 if (pause_path != INVALID_RES_ID)
2761 pause_path = INVALID_RES_ID;
2764 if (paused_recording != 0)
2767 APP_PRINT_PVR_PAUSE((
"APVR_StopPauseRecord: stop and destroy recording 0x%x", paused_recording));
2768 DestroyRecording(paused_recording);
2769 paused_recording = 0;
2772 if (monitor_si_path != INVALID_RES_ID)
2774 APP_PRINT_PVR_PAUSE((
"APVR_StopPauseRecord: Stop monitoring SI on path %u", monitor_si_path));
2778 monitor_si_path = INVALID_RES_ID;
2783 APP_PRINT_PVR_PAUSE((
"APVR_StopPauseRecord: Return to live service %p", tuned_service_ptr));
2787 #ifdef INTEGRATE_HBBTV 2800 U8BIT path, num_paths;
2801 U32BIT recording_handle;
2802 BOOLEAN is_recording, recordings;
2810 for (path = 0; path < num_paths; path++)
2814 if ((is_recording) && (recording_handle == paused_recording))
2817 is_recording = FALSE;
2820 if (is_recording == TRUE)
2840 BOOLEAN is_recording;
2841 U32BIT recording_handle_found;
2845 is_recording = FALSE;
2847 if (path != INVALID_RES_ID)
2851 if (recording_handle == recording_handle_found)
2853 is_recording = TRUE;
2860 return(is_recording);
2872 BOOLEAN is_recording;
2876 is_recording = FALSE;
2881 APP_PRINT_PVR_REC((
"APVR_GetRecordingHandle(%d): found 0x%x", path, recording_handle_ptr));
2882 is_recording = TRUE;
2887 return(is_recording);
2925 U16BIT total_time_needed;
2926 U16BIT total_space_left;
2931 APVR_GetDiskTime(disk_id, &used_hour, &used_min, &free_hour, &free_min, &size_hour, &size_min);
2934 total_time_needed = (hours * 60) + mins;
2935 total_space_left = (free_hour * 60) + free_min;
2938 if (total_time_needed < total_space_left)
2963 (U8BIT)(DHMS_DAYS(duration) * 24) + DHMS_HOUR(duration), DHMS_MINS(duration));
2976 U8BIT total_space_used;
2982 total_space_used = 100;
2991 total_space_used = (U8BIT)((used * 100) / size);
2995 total_space_used = 100;
3001 return(total_space_used);
3015 U8BIT *used_hour_ptr, U8BIT *used_min_ptr,
3016 U8BIT *free_hour_ptr, U8BIT *free_min_ptr,
3017 U8BIT *size_hour_ptr, U8BIT *size_min_ptr)
3039 total_min = (U16BIT)(*used_min_ptr) + (U16BIT)(*free_min_ptr);
3040 *size_min_ptr = (U8BIT)(total_min % 60);
3041 *size_hour_ptr = (*used_hour_ptr) + (*free_hour_ptr) + (U8BIT)(total_min / 60);
3054 void APVR_GetDiskMbyte(U16BIT disk_id, U32BIT *used_mbyte_ptr, U32BIT *free_mbyte_ptr, U32BIT *size_mbyte_ptr)
3062 *used_mbyte_ptr = 0;
3063 *free_mbyte_ptr = 0;
3064 *size_mbyte_ptr = 0;
3070 *used_mbyte_ptr = (used_percent * (*size_mbyte_ptr)) / PVR_100_PERCENT;
3071 *free_mbyte_ptr = ((PVR_100_PERCENT - used_percent) * (*size_mbyte_ptr)) / PVR_100_PERCENT;
3085 U8BIT audio_decoder;
3086 U8BIT video_decoder;
3087 U8BIT length_hour, length_min, length_sec;
3088 U8BIT elapsed_hour, elapsed_min, elapsed_sec;
3089 U32BIT length, elapsed;
3097 if (paused_recording != 0)
3101 if (playback_path != INVALID_RES_ID)
3107 &elapsed_min, &elapsed_sec))
3110 length = length_hour * 3600 + length_min * 60 + length_sec;
3111 elapsed = elapsed_hour * 3600 + elapsed_min * 60 + elapsed_sec;
3113 pause_time = length - elapsed;
3130 U8BIT audio_decoder;
3131 U8BIT video_decoder;
3132 U8BIT elapsed_hour, elapsed_min, elapsed_sec;
3139 if (playback_path != INVALID_RES_ID)
3145 &elapsed_min, &elapsed_sec))
3148 elapsed = elapsed_hour * 3600 + elapsed_min * 60 + elapsed_sec;
3164 U8BIT audio_decoder;
3165 U8BIT video_decoder;
3170 if (playback_path != INVALID_RES_ID)
3193 return(playback_path);
3196 #ifdef FREESAT_BUILD 3203 BOOLEAN APVR_IsRecordingPinLocked(U32BIT handle)
3207 U16BIT date, local_date;
3208 U8BIT hours, mins, secs;
3209 U8BIT local_hours, local_mins, local_secs;
3211 FUNCTION_START(APVR_IsRecordingPinLocked);
3221 !ACFG_IsOutsideWatershedHours(country_id, hours, mins)))
3227 &local_mins, &local_secs, CONV_LOCAL);
3229 if (!ACFG_IsOutsideWatershedHours(country_id, local_hours, local_mins))
3235 FUNCTION_FINISH(APVR_IsRecordingPinLocked);
3250 BOOLEAN recording_found;
3258 return(recording_found);
3272 void *alt_event_ptr;
3273 U16BIT num_services;
3275 U8BIT *series_crid_str;
3276 U8BIT *event_series_crid;
3280 U8BIT ci, num_series_crids;
3281 U16BIT onet_id, tran_id, serv_id;
3284 BOOLEAN proceed_with_recording;
3291 if ((num_services > 0) && (slist != NULL))
3295 for (si = 0; si != num_services; si++)
3303 if ((num_events > 0) && (elist != NULL))
3308 for (ei = 0; ei != num_events; ei++)
3310 event_ptr = elist[ei];
3317 for (ci = 0; ci < num_series_crids; ci++)
3320 if (event_series_crid != NULL)
3326 proceed_with_recording = TRUE;
3333 if ((prog_crid != NULL) && (strlen((
char *)prog_crid) > 0))
3338 proceed_with_recording = FALSE;
3347 if ((series_crid != NULL) &&
3351 proceed_with_recording = FALSE;
3356 proceed_with_recording = FALSE;
3367 #ifdef APP_PRINT_PVR_FP 3368 if (proceed_with_recording)
3370 APP_PRINT_PVR_FP((
" recording series event with prog crid=\"%s\"", prog_crid));
3381 proceed_with_recording = FALSE;
3383 #ifdef APP_PRINT_PVR_FP 3386 APP_PRINT_PVR_FP((
" recording series event from service 0x%x with event ID %d",
3387 serv_id, event_id));
3392 if (proceed_with_recording)
3396 if ((alt_event_ptr != NULL) && (alt_event_ptr != event_ptr))
3402 if (prog_crid != NULL)
3437 void *alt_event_ptr;
3438 U16BIT num_services;
3440 U8BIT *rec_crid_str;
3441 U8BIT *event_series_crid;
3444 U8BIT ci, num_series_crids;
3445 U16BIT onet_id, tran_id, serv_id;
3447 BOOLEAN proceed_with_recording;
3453 if ((num_services > 0) && (slist != NULL))
3457 for (si = 0; si < num_services; si++)
3465 if ((num_events > 0) && (elist != NULL))
3467 for (ei = 0; ei < num_events; ei++)
3469 proceed_with_recording = TRUE;
3475 if (prog_crid != NULL)
3486 if ((alt_event_ptr != NULL) && (alt_event_ptr != elist[ei]))
3494 proceed_with_recording = FALSE;
3500 if (proceed_with_recording)
3505 for (ci = 0; ci < num_series_crids; ci++)
3508 if (event_series_crid != NULL)
3519 if (prog_crid != NULL)
3526 proceed_with_recording = FALSE;
3536 proceed_with_recording = FALSE;
3540 if (proceed_with_recording)
3545 if ((alt_event_ptr != NULL) && (alt_event_ptr != elist[ei]))
3551 if (prog_crid != NULL)
3585 BOOLEAN found_next_recording;
3589 found_next_recording = FALSE;
3591 if (playback_path != INVALID_RES_ID)
3598 return(found_next_recording);
3611 return((
void *)playback_service);
3622 #ifdef COMMON_INTERFACE 3624 U32BIT recording_handle;
3631 #ifdef COMMON_INTERFACE 3634 if (timer_handle == cam_record_start_timer[path])
3649 cam_record_start_timer[path] = INVALID_TIMER_HANDLE;
3652 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_APPLICATION, EV_PVR_RECORDING_FAILED, NULL, 0);
3656 USE_UNWANTED_PARAM(timer_handle);
3664 #ifdef COMMON_INTERFACE 3672 void APVR_CIRecordReplyReceived(BOOLEAN start_succeeded, U8BIT slot_id)
3675 U32BIT recording_handle;
3677 BOOLEAN stop_recording;
3679 FUNCTION_START(APVR_CIRecordReplyReceived);
3683 path = INVALID_RES_ID;
3686 stop_recording = FALSE;
3693 cam_record_start_timer[path] = INVALID_TIMER_HANDLE;
3695 if (start_succeeded)
3701 stop_recording = TRUE;
3707 stop_recording = TRUE;
3717 owner_info.owner = RES_OWNER_DVB;
3718 owner_info.data = NULL;
3719 owner_info.data_size = 0;
3726 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_APPLICATION, EV_PVR_RECORDING_FAILED, NULL, 0);
3731 FUNCTION_FINISH(APVR_CIRecordReplyReceived);
3740 FUNCTION_START(CreatePlaybackService);
3743 if (service != NULL)
3746 service->serv_id = service_id;
3749 FUNCTION_FINISH(CreatePlaybackService);
3756 FUNCTION_START(FreePlaybackService);
3763 FUNCTION_FINISH(FreePlaybackService);
3776 if (eit_update_queue != NULL)
3778 STB_OSWriteQueue(eit_update_queue, (
void *)&q_msg,
sizeof(q_msg), TIMEOUT_NOW);
3801 if (service != NULL)
3803 SetupForRecording(path, service, TRUE);
3821 encrypt_recordings = state;
3829 static void EitUpdatedTask(
void *queue)
3836 FUNCTION_START(EitUpdatedTask);
3844 while (q_msg != 0xFF)
3853 if ((
STB_OSGetClockDiff(last_update_time) >= 60000) && (num_q_reads != 0) && q_msg != 0xFF)
3862 ProcessCridRecords();
3867 eit_update_queue = NULL;
3870 FUNCTION_FINISH(EitUpdatedTask);
3879 static void ProcessCridRecords(
void)
3881 void **crid_rec_list;
3882 U16BIT num_crid_recs;
3885 U32DHMS start_time, end_time, now_time;
3886 U16BIT eit_date, gmt_date;
3891 FUNCTION_START(ProcessCridRecords);
3894 #ifdef APP_PRINT_PVR_FP 3895 if (num_crid_recs > 0)
3897 APP_PRINT_PVR_FP((
"### Processing %d CRID records", num_crid_recs));
3903 for (i = 0; i < num_crid_recs; i++)
3914 APP_PRINT_PVR_FP((
" %d: Programme, CRID=\"%s\", time=%d.%d, service=0x%x", i, crid_str,
3915 DHMS_HOUR(start_time), DHMS_MINS(start_time), serv_id));
3923 if ((crid_str != NULL) && (serv_ptr != NULL) && (end_time >= now_time))
3942 if (gmt_date - eit_date >= CRID_DATE_TIMEOUT)
3944 APP_PRINT_PVR_FP((
" %d: CRID record for \"%s\" has expired, GMT=%d, last seen=%d", i,
3954 if (event_ptr != NULL)
3966 APP_PRINT_PVR_FP((
" %d: Series, CRID=\"%s\" for \"%s\"", i,
3972 APP_PRINT_PVR_FP((
" %d: Recommendation, CRID=\"%s\" for \"%s\"", i,
3978 APP_PRINT_PVR_FP((
" %d: Unrecognised type of CRID record! CRID=\"%s\" for \"%s\"", i,
3985 if (crid_rec_list != NULL)
3990 #ifdef APP_PRINT_PVR_FP 3991 if (num_crid_recs > 0)
3993 APP_PRINT_PVR_FP((
" Finished processing %d CRID records", num_crid_recs));
3997 FUNCTION_FINISH(ProcessCridRecords);
4000 #ifdef COMMON_INTERFACE 4007 static U32BIT NewCountdownTimer(U32BIT seconds)
4012 U8BIT hrs, mins, secs;
4014 FUNCTION_START(NewCountdownTimer);
4016 days = seconds / (3600 * 24);
4017 hrs = (seconds / 3600) % 24;
4018 mins = (seconds / 60) % 60;
4019 secs = seconds % 60;
4027 FUNCTION_FINISH(NewCountdownTimer);
U8BIT APVR_GetPlaybackPath(void)
Returns the path currently acquired fro playback.
void APVR_SlowMoPlay(void)
Play in slow mothing mode.
void APVR_RecordSeries(void *crid_ptr)
Seaches the schedule for events that are part of the given series and that haven't already been recor...
BOOLEAN APVR_DeleteAllSelectedRecordings(U32BIT *handles, U16BIT num_handles)
Delete all the recordings marked as selected but not locked in the given list, including all files as...
BOOLEAN STB_PVRCreateRecording(U16BIT disk_id, U8BIT *name, U32BIT *handle)
Create a new recording and return the handle.
Application level CI control functions.
U32DHMS ADB_GetEventDuration(void *event_ptr)
Returns a value representing the duration of the given event.
U32DHMS STB_GCCalculateDHMS(U32DHMS dhms, U32DHMS period, E_STB_GC_CALCTYPE calc)
Calculates the date/time when the period is added/subtracted to/from dhms.
void STB_PVRPlayMedium(U8BIT decoder)
Sets play speed to medium (1x) - has no effect when decoding from demux.
BOOLEAN STB_PVRRecordingGetParentalLock(U32BIT handle)
Returns the parental lock state of the given recording.
U8BIT * ADB_GetEventSeriesCrid(U8BIT index, void *serv_ptr, void *event_ptr)
Returns the full series CRID of the given event The returned string should be freed using STB_AppFree...
BOOLEAN STB_PVRCanDiskBeUsed(U16BIT disk_id)
Checks whether the given disk can be used for PVR functions.
BOOLEAN STB_DPIsRecording(U8BIT path, U32BIT *handle)
Returns status of recording on specified path.
U32BIT STB_DSKGetUsed(U16BIT disk_id)
Returns the amount of space used on the disk.
void STB_PVRRecordingSetServiceName(U32BIT handle, U8BIT *service_name)
Sets the service name for a recording and saves the database file.
U8BIT STB_DPAcquirePlaybackPath(void *service)
Acquires a decode path and all the required resources (demux, audio and video decoders) for playing b...
void STB_PVRRecordingSetOtherCrid(U32BIT handle, U8BIT *crid)
Sets the series/recommendation CRID for a recording and saves the database file.
macros and function prototypes for public use
BOOLEAN APVR_IsInitialised(void)
Use to query whether the PVR function is available and ready to be used.
void APVR_GetDiskMbyte(U16BIT disk_id, U32BIT *used_mbyte_ptr, U32BIT *free_mbyte_ptr, U32BIT *size_mbyte_ptr)
Ges disk space in Mbytes: used, free and size.
U8BIT STB_DPGetPathCISlot(U8BIT path)
Returns the CI slot id associated with the given path.
void STB_PVRStartRecordPaused(U8BIT path, U32BIT timeshift_seconds)
Set to start recording in paused mode for timeshift recording.
void * ADB_GetServiceTransportPtr(void *s_ptr)
Returns a pointer to the service's parent transport record.
BOOLEAN STB_CiCcAuthenticated(U8BIT slot_id)
Tell whether authenticated CI+ module is in the slot.
BOOLEAN APVR_IsTimeshiftRecording(U32BIT handle)
Checks whether the given recording handle is the timeshift recording handle.
BOOLEAN ATMR_RecordSplitEvent(void *serv_ptr, U8BIT *prog_crid, U32DHMS start_date_time, BOOLEAN do_not_delete, BOOLEAN search_forward)
Searches for events within 3 hours of the given start date/time for an event with the given programme...
void * ADB_GetEvent(void *serv_ptr, U16BIT event_id)
Returns a copy of the event with the given event ID on the given service.
BOOLEAN STB_DPIsLivePath(U8BIT path)
Is the given decode path being used for live viewing.
U8BIT * STB_GCGetDateString(U16BIT code, U8BIT hour, U8BIT min, E_STB_GC_DATETYPE format)
Supplies specifed date as local date string, in format requested.
void APVR_EitUpdated(void)
Ensures that any EIT updates are processed to handle scenarios such as checking for new series record...
BOOLEAN APVR_DeleteRecording(U32BIT handle)
Delete the given recording, including all files associated with it and remove it from the database of...
BOOLEAN ADB_GetServiceLockedFlag(void *s_ptr)
Returns the status of the 'locked' flag of the given service, which is used by the parental control...
U8BIT APVR_GetTotalSpacePercentUsed(U16BIT disk_id)
get total percentage of recording space used
Application configuration.
void APVR_ReleaseActiveRecordingList(U32BIT *handle_list)
Frees the arrays allocated by APVR_GetActiveRecordingList.
Application database control.
U32DHMS STB_GCNowDHMSGmt(void)
Reads the current GMT date code and time.
U32BIT STB_OSGetClockDiff(U32BIT timestamp)
Get Difference between Given Time and Current Time.
Header file - macros and function prototypes for public use.
void ACTL_TuneOff(U8BIT path)
Stops tuning on the given path.
U32DHMS ADB_GetCridDateTime(void *c_ptr)
Returns a value representing the date & time held in the given CRID record.
Header file for NVM data handling functions.
BOOLEAN APVR_CheckSpaceForDuration(U16BIT disk_id, U8BIT hours, U8BIT mins)
Check if there is enough space for the recording of the given duration to take place.
S16BIT STB_PVRGetPlaySpeed(U8BIT audio_decoder, U8BIT video_decoder)
Returns the current playback speed.
BOOLEAN ADB_GetServiceDoNotScramble(void *s_ptr)
Returns the do_not_scramble flag for the service which is based on the presence of an FTA descriptor...
void ADB_ReleaseStreamList(void **streamlist_ptr, U16BIT num_entries)
Frees the memory allocated for a stream list using ADB_GetStreamList.
U8BIT STB_DPIsCISlotInUse(U8BIT start_path, U8BIT slot_id, U8BIT ignore_path)
Checks whether a given CI slot is in use.
BOOLEAN STB_PVRRecordingSetGuidance(U32BIT handle, U8BIT *text)
Sets the guidance text of a recording.
U32DHMS ADB_GetEventStartDateTime(void *event_ptr)
Returns a value representing the date and time of the start of the given event.
void * STB_AppGetMemory(U32BIT bytes)
Attempts to allocate memory from the application heap.
void STB_CiCcGetUsageRulesInfo(U8BIT slot_id, U16BIT service_id, U8BIT uri[CIP_URI_LEN])
Return the current URI for the given service.
BOOLEAN APVR_HandlePrivateTimer(U32BIT timer_handle)
Deals with any private timers started by the PVR module.
void STB_DPStartSI(U8BIT path)
Requests start of SI engine, mode is determined by flags in general control.
U32BIT ATMR_GetRecordingHandle(U32BIT handle)
Returns the recording handle associated with a PVR recording timer.
void ATMR_DeleteRecordingTimer(U32BIT recording_handle)
Delete the PVR record timer with the given recording handle.
U8BIT * ADB_GetEventProgrammeCrid(void *serv_ptr, void *event_ptr)
Returns the programme CRID of the given event (excluding IMI) The returned string should be freed usi...
void STB_DPStopRecording(U8BIT path)
Requests stop of recording on specified path.
void STB_PVRPlayFaster(U8BIT decoder, BOOLEAN include_slow_speeds)
Increase play speed - has no effect when decoding from demux.
void APVR_ReleasePlayList(U32BIT *handle_list, U8BIT **name_list, U32BIT *rec_status_list, U32BIT *locked_list, U32BIT *selected_list, U32BIT *split_list)
Frees the arrays allocated by APVR_GetPlayList.
void APVR_JTLPlay(void)
quick replay current playing recording
U8BIT * ADB_GetEventDescription(void *event_ptr)
Returns the short event description text of the event as a UTF-8 string. The returned string should b...
BOOLEAN STB_PVRFindNextSplitRecording(U32BIT curr_handle, U32BIT *next_handle)
Returns the handle of a split event recording that follows on from curr_handle.
BOOLEAN STB_CiCcSendRecordStop(U8BIT slot_id)
Called by the app when a recording is stopped or completes.
U8BIT STB_DPGetPathVideoDecoder(U8BIT path)
Returns the video decoder ID acquired by the given decode path.
BOOLEAN APVR_CheckSpaceDuration(U16BIT disk_id, U32BIT duration)
Check if there is enough space for the recording of the given duration to take place.
BOOLEAN APVR_PlayRecording(U32BIT recording_handle, BOOLEAN resume_playback, void *monitor_service)
Starts playback of the given recording.
BOOLEAN STB_PVRRecordingGetLocked(U32BIT handle)
Returns whether the given recording is locked.
BOOLEAN ADB_IsRecommendationCrid(void *c_ptr)
Returns TRUE if the CRID record given represents a recommendation.
void STB_DPSetSearchMode(U8BIT path, BOOLEAN state)
Writes SI search mode flag into decode path store.
void STB_PVRStartPlayRunning(U8BIT decoder)
Set to start playback in running mode.
PVR messages database access functions header file.
void APVR_TrickModeMuteOn(void)
Mute for trick mode.
Header file - Function prototypes for A/V control.
BOOLEAN APVR_GetRecordingHandle(U8BIT path, U32BIT *recording_handle_ptr)
Returns the handle of the recording taking place on the given decode path.
void APVR_SetStartPadding(S32BIT padding)
Sets the default time that will be added to the start of all recording timers created after this valu...
BOOLEAN ACTL_CanServiceBeViewed(void *s_ptr)
Checks whether there's a tuner available to view the given service. This takes into account whether t...
U16BIT ADB_GetStreamPID(void *stream_ptr)
Returns the PID for the given stream.
S32BIT APVR_GetEndPadding(void)
Returns the current setting for the end padding time added to all recording timers.
void STB_GCConvertDateTime(U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U16BIT *rcode, U8BIT *rhour, U8BIT *rmin, U8BIT *rsecs, E_STB_GC_CONVTYPE conv)
Converts specified date / time to another.
U32BIT APP_NvmRead(E_NVM_ITEMS nvm_item)
Returns the current value for the given DVB setting.
void APVR_EncryptRecordings(BOOLEAN state)
Used to set whether all recordings should be encrypted or not. The default is that recordings aren't ...
BOOLEAN APVR_CheckSpaceForEvent(U16BIT disk_id, void *event_ptr)
Checks if there is enough space for the recording of the given event to take place.
BOOLEAN STB_PVRRecordingSetParentalLock(U32BIT handle, BOOLEAN state)
Sets the parental lock state of a recording.
U8BIT STB_AVGetAudioVolume(U8BIT path)
Returns the current volume of the main audio output.
BOOLEAN STB_CiCaSystemSupported(U8BIT slot_id, U8BIT *pmt_data)
Tell whether CA descriptors were found in PMT and that CA system is supported.
BOOLEAN STB_PVRSetRecordingPids(U8BIT path, U16BIT num_pids, S_PVR_PID_INFO *pid_array)
Saves (takes a copy of) the array of pids to be recorded.
BOOLEAN STB_PVRDestroyRecording(U32BIT handle)
Completely destroys a recording by deleting all files and removing it from the list of recordings...
void * ADB_FindServiceByIds(U16BIT onet_id, U16BIT tid, U16BIT sid)
Returns a pointer to the service matching the given IDs.
BOOLEAN STB_OSDestroyQueue(void *queue)
Destroy Queue.
void STB_OSDestroyTask(void *task)
Delete Task must be called upon termination of each task as it frees all OS specific resources alloca...
U8BIT * ADB_GetServicePMTData(void *s_ptr, U16BIT *data_len)
Returns the current PMT data for the given service.
BOOLEAN APVR_IsTimeshiftStarted(void)
Checks whether timeshift has been started, which includes both recording and playback.
Application timer functions and defines.
void APP_NvmSave(E_NVM_ITEMS nvm_item, U32BIT new_value, BOOLEAN write_to_flash_now)
Sets the current value for the given DVB setting.
void ADB_GetNowNextEvents(void *serv_ptr, void **now_event, void **next_event)
Makes copies of the now and/or next events (EITp/f) for the given service. The returned events should...
BOOLEAN STB_PVRIsInitialised(void)
Returns Initialised status.
BOOLEAN STB_PVRIsValidHandle(U32BIT handle)
Determines whether the given handle is in the recording database.
BOOLEAN STB_DPReleasePath(U8BIT path, E_STB_DP_RES_OWNER owner)
Releases the decode path and all resources no longer needed. The path won't be released if the path i...
BOOLEAN APVR_SetPlaybackTime(U32BIT position_in_secs)
Sets returns the number of seconds in playback buffer.
Header file - macros and function prototypes for public use.
BOOLEAN STB_PVRRecordingSetSelected(U32BIT handle, BOOLEAN state)
Sets the selected state of a recording.
BOOLEAN STB_IsStringEmpty(U8BIT *string_ptr)
Checks for a string of only spaces.
S16BIT APVR_GetPlaySpeed(void)
Returns the current play speed as a signed percentage value representing the speed, where 100% is normal playback speed.
void APVR_SetNotifyTime(U16BIT notify_time)
Sets the time, in seconds, when an event will be sent as a notification that a recording is about to ...
void STB_ERSendEvent(BOOLEAN latched, BOOLEAN repeat, U16BIT path_class, U16BIT type, void *data, U32BIT data_size)
Sends an event to event reporting control module.
BOOLEAN STB_PVRRecordingGetTriplet(U32BIT handle, U16BIT *serv_id, U16BIT *ts_id, U16BIT *orig_net_id)
Read the DVB triplet (service id, transport id, orig net id) for a recording.
void STB_PVRDiskUsed(U16BIT disk_id, U8BIT *hours, U8BIT *mins)
Returns disk space used in hours and minutes.
BOOLEAN STB_PVRSetRecoringTriplet(U8BIT path, U16BIT serv_id, U16BIT ts_id, U16BIT orig_net_id)
Saves the DVB triplet of the service to be recorded.
void STB_PVRRecordingSetCrid(U32BIT handle, U8BIT *crid)
Sets the programme CRID for a recording and saves the database file.
void ATMR_EitUpdated(void)
Checks each recording timer that's linked to an event to see whether the event is still in the schedu...
BOOLEAN ACTL_ParentalControlEnabled(void)
Returns whether parental control is enabled. This will also return TRUE if parental control has been ...
void ADB_GetStreamList(void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type, void ***streamlist_ptr, U16BIT *num_entries_ptr)
Allocates and returns an array of the streams of the given type and for the given service...
BOOLEAN APVR_FindNextSplitEvent(U32BIT curr_handle, U32BIT *next_handle)
If the current playback recording is a split event then the next chronological part of the event is f...
U32BIT STB_PVRDiskSize(U16BIT disk_id)
Returns disk size in MBytes.
U8BIT STB_DPGetNumPaths(void)
Returns the maximum number of decode paths.
BOOLEAN STB_PVRRecordingGetLength(U32BIT handle, U8BIT *length_hours, U8BIT *length_mins, U8BIT *length_secs, U32BIT *rec_size_kb)
Returns the length in time and size in KB of the recording with the given handle. ...
void STB_PVRPlayFrameInc(U8BIT decoder)
Increments play by one frame - has no effect when decoding from demux.
void STB_PVRStopRecording(U8BIT path)
Stop the PVR recording.
void ADB_ReleaseServiceList(void **slist, U16BIT num_servs)
Frees a list of services returned from one of the functions that returns a service list...
void APVR_NormalPlay(void)
If playback has been paused or is subject to some trick mode, calling this function will result in pl...
U8BIT STB_DPGetLivePath(void)
Returns the ID of the decode path being used for live viewing.
BOOLEAN APVR_IsRecordingInProgress(void)
Returns TRUE if there are any recordings currently in progress.
void APVR_Terminate(void)
Destroy all PVR resources: filters, recordings etc.
void APVR_FFPlay(void)
If paused, playback will go into the first available slow motion speed in a forwards direction...
BOOLEAN APVR_StopRecording(U32BIT recording_handle)
Stops the given recording.
void * ATMR_RecordEvent(void *serv_ptr, void *event_ptr, U8BIT *prog_crid, U8BIT *series_crid, BOOLEAN is_series, BOOLEAN check_alternatives, BOOLEAN do_not_delete)
Adds a timer to perform a recording based on the given event and service. Conflicts are checked and a...
Header file - EBU Teletext driver.
void STB_PVRStartPlayPaused(U8BIT decoder)
Set to start playback in paused mode.
void APVR_UnselectAllRecordings(U32BIT *handles, U16BIT num_handles)
Un-select all recordings.
void STB_ReleaseUnicodeString(U8BIT *string)
Releases the specified unicode string, freeing associated heap resources.
U8BIT * ADB_GetCridProgrammeName(void *c_ptr)
Returns the programme name field of the given CRID record. The returned string should be freed using ...
U8BIT APVR_StartPauseRecord(void)
Starts recording the live service ready for timeshift playback. The recording may not have started wh...
U16BIT ADB_GetTransportTid(void *t_ptr)
Returns the transport id of the given transport.
BOOLEAN APVR_IsEventInRecordList(U8BIT *prog_crid)
Determines whether the given programme CRID is already in the list of recorded events.
BOOLEAN APVR_StartNewRecording(U16BIT disk_id, U8BIT path, U8BIT *recording_name, U16BIT event_id, U8BIT *prog_crid, U8BIT *other_crid, U32BIT *rec_handle)
Starts a recording after any tuning has completed and sets the info to be stored with it...
U16BIT ADB_GetServiceLcn(void *s_ptr)
Returns the logical channel number assigned to the given service.
U16BIT APVR_GetTimeshiftBufferSize(void)
Returns the maximum size of the timeshift buffer in minutes.
BOOLEAN STB_PVRIsPlayAudio(U8BIT decoder)
Returns TRUE if play contains audio data.
U8BIT * ADB_GetEventGuidance(void *event_ptr, void *serv_ptr, U8BIT *type, U8BIT *mode)
Returns the guidance text for an event, either from the event itself or the event's service...
Debug functions header file.
Header file - Function prototypes for linked lists.
U32BIT ATMR_FindTimerFromCrid(U8BIT *prog_crid)
Searches the timers for a recording timer with the given programme CRID.
Header file - macros and function prototypes for public use.
void STB_AVSetAudioVolume(U8BIT path, U8BIT vol)
Sets the volume of the main audio output.
BOOLEAN APVR_SetPlaySpeed(S16BIT speed)
Set current play speed as a signed percentage value representing the speed, where 100% is normal play...
Header file - macros and function prototypes for public use.
U16BIT ADB_GetCridService(void *c_ptr)
Returns the service ID held in the given CRID record.
BOOLEAN APVR_IsDecodingFile(void)
Returns the PVR play status.
void * ADB_GetTunedService(U8BIT path)
Returns the tuned service for the given decode path.
BOOLEAN STB_PVRResumeRecording(U8BIT path)
Resumes a recording after it's been paused.
void STB_GCGetGMTDateTime(U16BIT *code, U8BIT *hour, U8BIT *min, U8BIT *secs)
Reads the current GMT date code and time.
BOOLEAN ADB_IsSeriesCrid(void *c_ptr)
Returns TRUE if the CRID record given represents a series.
BOOLEAN STB_PVRUpdateRecordingPids(U8BIT path, U16BIT num_pids, S_PVR_PID_INFO *pid_array)
Saves (takes a copy of) the array of pids to be recorded and pass them to the platform.
U16BIT ADB_GetNumStreams(void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type)
Returns the number of streams of the given type for the given service.
BOOLEAN STB_PVRIsPlayPause(U8BIT decoder)
Returns TRUE if play is paused trick mode.
void STB_PVREncryptRecording(U8BIT path, BOOLEAN state)
Sets whether a recording should be encrypted. Must be set before the recording is started...
void APVR_SetEndPadding(S32BIT padding)
Sets the default time that will be added to the end of all recording timers created after this value ...
S32BIT APVR_GetStartPadding(void)
Returns the current setting for the start padding time added to all recording timers.
void ASI_SetAppSiMode(U8BIT path, E_APP_SI_MODE si_mode)
Sets application SI mode - used before STB_DPStartSI() is called.
U16BIT ADB_GetTransportOriginalNetworkId(void *t_ptr)
Returns the original network id of the given transport.
void APVR_PidsUpdated(U8BIT path)
This function should be called when there's an update to the PIDs for a service that's being recorded...
Header file - Function prototypes for Event Reporting.
void APVR_SetTimeshiftBufferSize(U16BIT time_in_mins)
Sets the size of the timeshift buffer so that it's able to store a recording of the given length befo...
Header for STB unicode string handling routines.
BOOLEAN STB_PVRFindRecordingFromCrid(U8BIT *prog_crid, U32BIT *handle)
Returns the handle of the recording with the given programme CRID.
void APVR_PausePlay(void)
Pause playback.
U8BIT * STB_PVRRecordingGetName(U32BIT handle)
Gets the name for a recording.
BOOLEAN STB_PVRPauseRecording(U8BIT path)
Pauses recording after it's been started.
void * ADB_FindEventFromCrid(U8BIT *prog_crid, void *original_event_ptr, void **serv_ptr)
Finds an alternative event for the given programme CRID and returns a pointer to a copy of the event ...
U8BIT STB_DPGetPathAudioDecoder(U8BIT path)
Returns the audio decoder ID acquired by the given decode path.
U8BIT ACTL_TuneToService(U8BIT path, S_ACTL_OWNER_INFO *owner_info, void *s_ptr, BOOLEAN override_lock, BOOLEAN for_live)
Starts the process of tuning to the specified service. If the service is to be tuned on the live path...
Glue layer between DVB and conditional access systems.
void APVR_StopPlay(BOOLEAN return_to_live)
Stops playback and optionally returns to live TV.
U32BIT STB_DSKGetSize(U16BIT disk_id)
Returns the size (capacity) of the disk.
void ADB_GetServiceList(U32BIT list_type, void ***slist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all services in the database for the given list type.
BOOLEAN APVR_IsTimeshiftRecordingPath(U8BIT path)
Checks whether the given path is the one that's being used for timeshift recording.
void STB_CAReleaseRecordingPids(U16BIT *pid_array, U16BIT num_pids)
Called to free the array of PIDs allocated by STB_CAGetRecordingPids.
U8BIT APVR_StartPausePlay(void)
Starts playback of a live timeshift recording started with APVR_StartPauseRecord. This function shoul...
U16BIT ADB_GetServiceId(void *s_ptr)
Returns the signalled service id of the given service.
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)
void STB_PVRRecordingSetName(U32BIT handle, U8BIT *name)
Sets the name for a recording.
void STB_PVRRecordingSetExtendedDescription(U32BIT handle, U8BIT *description)
Sets the extended description for a recorded programme.
BOOLEAN ACTL_IsTuned(U8BIT path)
Returns whether the given path is currently tuned.
application level SI task
void APVR_Initialise(void)
Initialise all PVR resources: filters, recordings etc.
U32BIT APVR_GetPlaybackHandle(void)
Returns the handle of the recording currently being played back.
Application stb layer control.
U8BIT APVR_PrepareNewRecording(U16BIT onet_id, U16BIT trans_id, U16BIT service_id, BOOLEAN *new_tuned_service)
Acquires a decode path for recording the given service and tunes to it.
void ADB_GetCridRecordList(void ***clist_ptr, U16BIT *num_entries_ptr, BOOLEAN inc_series_crids, BOOLEAN inc_rec_crids, BOOLEAN inc_prog_crids)
Creates an array of CRID record pointers to pass back to the caller with the number of entries in the...
BOOLEAN STB_OSWriteQueue(void *queue, void *msg, U16BIT msg_size, U16BIT timeout)
Write a message to the queue.
Header file - Function prototypes for operating system.
System Wide Global Technical Data Type Definitions.
BOOLEAN APVR_IsRecordingHandle(U8BIT path, U32BIT recording_handle)
Returns TRUE if given recording handle is still in progress on the given decode path.
void STB_DPStopSI(U8BIT path)
Requests stop of SI engine.
U16BIT APVR_GetNotifyTime(void)
Returns the current recording notification time in seconds.
S32BIT ACI_ReadPinForSlot(U8BIT slot_id)
Checks if a pin has been saved for the CAM in the given slot and returns it.
void STB_PVRDiskFree(U16BIT disk_id, U8BIT *hours, U8BIT *mins)
Returns disk space free in hours and minutes.
void STB_AppFreeMemory(void *addr)
Releases previously allocated application heap memory.
Application level HBBTV callback functions.
U16BIT ADB_GetCridEitDate(void *c_ptr)
Returns the EIT update date contained in the given CRID record.
void APVR_QRPlay(void)
quick replay current playing recording
Header file - macros and function prototypes for public use.
void STB_PVRSavePlayPosition(U8BIT path)
Saves the bookmark holding the playback position. This bookmark is used to resume a playback when STB...
BOOLEAN STB_PVRRecordingHasGuidance(U32BIT handle)
Returns whether the given recording has guidance.
U8BIT * ADB_GetCridString(void *c_ptr)
Returns the CRID string from the given CRID record. The returned value should not be freed...
BOOLEAN STB_PVRIsRecording(U8BIT path, U32BIT *handle)
Reads the PVR record status.
U32BIT ATMR_AddTimer(S_TIMER_INFO *info)
Creates a new timer based on the information supplied.
BOOLEAN ATMR_InitialiseTimer(S_TIMER_INFO *timer_info, E_TIMER_TYPE timer_type, void *serv_ptr, void *event_ptr)
Sets up the given timer info structure with default values for the given timer type using the service...
BOOLEAN STB_PVRRecordingGetSelected(U32BIT handle)
Returns whether the given recording is selected.
void STB_PVRReleaseRecordingHandles(U32BIT *handle_array)
Frees the given array of handles allocated by the preceding function.
BOOLEAN STB_PVRIsPlayForward(U8BIT decoder)
Returns TRUE if play is forwards trick mode.
U16BIT STB_PVRGetRecordingHandles(U32BIT **handle_array)
Allocates and returns an array of all the recording handles.
void APVR_GetDiskTime(U16BIT disk_id, U8BIT *used_hour_ptr, U8BIT *used_min_ptr, U8BIT *free_hour_ptr, U8BIT *free_min_ptr, U8BIT *size_hour_ptr, U8BIT *size_min_ptr)
Gets an estimate of disk space in time (hour / min): used, free and size.
BOOLEAN STB_PVRAddMessage(U8BIT *message)
Adds a message to the end of the list of existing messages.
BOOLEAN STB_PVRIsPlayStarted(U8BIT audio_decoder, U8BIT video_decoder)
Returns status of playback with the given decoders.
U16BIT APVR_GetPlayList(U32BIT **handle_list, U8BIT ***name_list, U32BIT **rec_status_list, U32BIT **locked_list, U32BIT **selected_list, U32BIT **split_list)
Returns a list of all the existing recordings that can be played. All the arrays returned will be all...
U32BIT ATMR_FindTimerFromEvent(U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, U16BIT event_id)
Searches the timers for a recording timer with the given event and service IDs.
void HBBTV_NotifyPlaySpeedChanged(S16BIT speed)
Notify the video broadcast object that the timeshift play speed has changed.
void * STB_OSCreateTask(void(*function)(void *), void *param, U32BIT stack, U8BIT priority, U8BIT *name)
Create a New Task to the calling process. Upon success, the created task runs on its own stack...
void * STB_OSCreateQueue(U16BIT msg_size, U16BIT msg_max)
Create Queue of given number of messages and size of message.
U16BIT ADB_GetServicePCRPid(void *s_ptr)
Returns the PCR PID for the given service.
S8BIT STB_CompareStringsIgnoreCase(U8BIT *string1_ptr, U8BIT *string2_ptr)
Compares the contents of the two given ASCII strings and returns the status (as per strcmp) but ignor...
BOOLEAN APVR_GetPlaybackElapsedTime(U32BIT handle, U8BIT *hours, U8BIT *mins, U8BIT *secs, U8BIT *progress)
Returns the playback progress in time and as a percentage.
Header file - Function prototypes for DVB subtitles api.
Header file - Function prototypes for heap memory.
void ADB_GetServiceIds(void *s_ptr, U16BIT *onet_id, U16BIT *trans_id, U16BIT *serv_id)
Returns the original network id, transport id and service id for the given service.
void * APVR_GetPlaybackService(void)
A service instance is associated to the playback, this function returns its pointer. The handle can be used, for example, to call ADB_ServiceHasSubtitles as it's done for live channels.
void ACTL_StartDecoding(U8BIT path, void *s_ptr)
Sets up and starts decoding for the given service. This is used for PVR playback, but could also be u...
BOOLEAN ATMR_DeleteTimer(U32BIT handle)
Deletes the timer with the given handle.
U8BIT * ADB_GetEventExtendedDescription(void *event_ptr)
Returns the extended event description text of the event as a UTF-8 string. The returned string shoul...
BOOLEAN STB_PVRStartPlaying(U8BIT path, U32BIT handle, BOOLEAN resume)
Start the PVR playing.
BOOLEAN STB_PVRIsPlaying(U8BIT path, U32BIT *handle)
Reads the PVR play status.
BOOLEAN STB_DPStartRecording(U8BIT path, U32BIT param)
Requests start of recording on specified path.
BOOLEAN STB_OSReadQueue(void *queue, void *msg, U16BIT msg_size, U16BIT timeout)
Read a message from a queue.
Function prototypes for disk functions.
void APVR_TrickModeMuteOff(void)
Unmute for trick mode.
void HBBTV_NotifyRecordingEvent(U32BIT id, E_HBBTV_RECORDING_EVENT event)
Notifies the HbbTV engine of a recording event.
BOOLEAN ADB_GetEventDoNotScramble(void *event_ptr)
Returns the do_not_scramble flag for the event, which will have been found by looking backwards in th...
void ADB_UpdateCridEitDate(void *c_ptr)
Updates the time the CRID was last seen in the EIT.
void STB_OSTaskDelay(U16BIT timeout)
Delay Task for Specifed Time Period.
U16BIT STB_GCGetGMTDate(void)
Reads the current GMT date code.
void ADB_GetEventSchedule(BOOLEAN include_old_events, void *serv_ptr, void ***elist_ptr, U16BIT *num_entries_ptr)
Allocates and returns an array containing copies of events for the given service from the service's E...
E_PVR_PLAY_STATUS APVR_GetPlayMode(void)
Returns the current play mode according to the current play speed.
void ACTL_DecodeOff(U8BIT path)
Stops decoding on the given path.
U16BIT ADB_GetEventId(void *event_ptr)
Returns the event id for the given event.
void STB_CiCcSetRecordOperatingMode(U8BIT slot_id, U32BIT mode, U16BIT service_id)
Sets the record operating mode for the given slot id.
void APVR_StopPauseRecord(BOOLEAN return_to_live)
Stops timeshifted playback and recording and optionally restarts decoding of the live signal...
void STB_PVRRecordingSetDescription(U32BIT handle, U8BIT *description)
Sets the short description for a recorded programme.
BOOLEAN ADB_IsProgrammeCrid(void *c_ptr)
Returns TRUE if the CRID record given represents a programme (split event)
BOOLEAN STB_PVRRecordingGetDateTime(U32BIT handle, U16BIT *date, U8BIT *hours, U8BIT *mins, U8BIT *secs)
Gets the date and time for a recording.
BOOLEAN APVR_IsPlaying(void)
Returns whether playback is in progress.
void STB_PVRPlaySlower(U8BIT decoder, BOOLEAN include_slow_speeds)
Decrease play speed - has no effect when decoding from demux.
U32BIT STB_OSGetClockMilliseconds(void)
Get Current Computer Clock Time.
U32BIT APVR_GetPauseProgress(void)
Calculates and returns the number of seconds behind live TV.
void STB_AVBlankVideo(U8BIT path, BOOLEAN blank)
Blanks or unblanks the video display.
void STB_PVRPlayPause(U8BIT decoder)
Pauses play - has no effect when decoding from demux.
BOOLEAN APVR_AreSelectedRecordings(U32BIT *handles, U16BIT num_handles)
Checks if any recording in a list is selected.
U32BIT APVR_GetPlaybackTime(void)
Calculates and returns the number of seconds in playback buffer.
U16BIT ADB_GetServicePmtPid(void *s_ptr)
Returns the current PMT PID for the given service.
U8BIT * ADB_GetEventName(void *event_ptr)
Returns the name of the event as a UTF-8 string. The returned string should be freed using STB_Releas...
void ADB_ReleaseEventList(void **elist, U16BIT num_entries)
Frees all teh events in the given list and all associated memory for those events.
U8BIT APVR_GetActiveRecordingList(U32BIT **handle_list)
Returns an array of recordings currently in progress. Use APVR_ReleaseActiveRecordingList to free the...
U8BIT ACTL_AcquirePathForService(void *s_ptr, BOOLEAN with_decoders, BOOLEAN for_recording, S_ACTL_OWNER_INFO *owner)
Acquires a decode path suitable for tuning to the given service.
void STB_PVRUpdateRecordings(BOOLEAN force_load)
Called when a disk is added or removed and updates the disk database and the recordings that are now ...
void ADB_DeleteCridRecord(void *c_ptr)
Deletes the given CRID record from the database.
BOOLEAN STB_PVRSetPlaySpeed(U8BIT audio_decoder, U8BIT video_decoder, S16BIT speed)
Set the play speed for the specified decoder.
U8BIT * ATMR_GetOtherCrid(U32BIT handle)
Returns a pointer to the other CRID string from a recording timer. This will either be a series or re...
U16BIT STB_PVRGetDefaultDisk(void)
Returns the set default disk, or finds the first mounted (usable) disk if a default hasn't been set...
void STB_PVRStopPlaying(U8BIT path)
Stop the PVR play back.
BOOLEAN APVR_GetPathRecordingName(U8BIT path, U8BIT **name_ptr)
Get the name of the recording currently taking place on the given decode path.
U8BIT ADB_GetEventNumSeriesCrids(void *event_ptr)
Returns the number of series CRIDs for the given event.
U8BIT * ADB_GetServiceFullName(void *s_ptr, BOOLEAN use_pref_name)
Returns the full name of the given service as a UTF-8 string. The returned string should be freed usi...
void ADB_DeleteServiceRec(void *s_ptr)
Deletes the given service from the database.
U8BIT * STB_GCGetTimeString(U16BIT code, U8BIT hour, U8BIT min, E_STB_GC_TIMETYPE format)
Supplies specified time as local time string, in format requested.
void APVR_FRPlay(void)
If paused, playback will go into the first available slow motion speed in a reverse direction...
U8BIT * STB_FormatUnicodeString(BOOLEAN strip_DVB_cntrl_char, BOOLEAN *reverse_dir, const U8BIT *const format_ptr,...)
Unicode version of sprintf.
Application database access functions.
U16BIT STB_CAGetRecordingPids(U8BIT *pmt_data, U16BIT **pid_array)
This function is called to get an array of PIDs that need to be recorded for the CA system required f...
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.
BOOLEAN STB_PVRIsBeingRecorded(U32BIT handle)
Returns whether the recording with the given handle is currently being recorded.
ADB_STREAM_TYPE ADB_GetStreamType(void *stream_ptr)
Returns the type of the given stream.
void STB_PVRPlayNormal(U8BIT decoder)
Restarts playback (no trick mode) - has no effect when decoding from demux.
BOOLEAN ADB_GetCridDoNotDelete(void *c_ptr)
Returns the value of the do not delete flag for the given CRID record.
Header file - macros and function prototypes for public use.
E_STB_GC_WEEKDAY STB_GCGetDateWeekDay(U16BIT code)
Returns the weekday number of the specified date code.
BOOLEAN STB_CiCcSendRecordStart(U8BIT slot_id, U16BIT program_number, U8BIT *pin_string)
Called by the app when a recording is to be started on a CA protected service.
BOOLEAN ADB_IsSplitProgrammeCrid(U8BIT *crid)
Returns TRUE if the given CRID represents a split event (i.e. it contains an Instance Metadata Identi...
BOOLEAN STB_PVRRecordingGetCrid(U32BIT handle, U8BIT *crid, U16BIT name_len)
Gets the programme CRID for a given recording.
void ADB_ReleaseEventData(void *event_ptr)
Frees any memory allocated for the given event and the event itself.
void APVR_RecordRecommendations(void *crid_ptr)
Searches the schedule for events that are part of the given recommendation and that haven't already b...