reload webtv/iptv stream if connection lost

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6345e5bf5a
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2023-07-16 (Sun, 16 Jul 2023)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
BPanther
2023-07-16 21:21:19 +02:00
committed by vanhofen
parent 554c0591b7
commit 6826c5f18f

View File

@@ -1002,12 +1002,24 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
mutex.unlock(); mutex.unlock();
while(webtv_started) { while(webtv_started) {
if (mp->playback->GetPosition(mp->position, mp->duration)) { if (mp->playback->GetPosition(mp->position, mp->duration, mp->isWebChannel)) {
#if 0 #if 0
printf("CMoviePlayerGui::bgPlayThread: position %d duration %d (%d)\n", mp->position, mp->duration, mp->duration-mp->position); printf("CMoviePlayerGui::bgPlayThread: position %d duration %d (%d)\n", mp->position, mp->duration, mp->duration-mp->position);
#endif #endif
if (pos == mp->position && mp->duration > 0) if (pos == mp->position && mp->duration > 0)
eof++; if (mp->isWebChannel)
#if defined (BOXMODEL_VUPLUS_ARM)
eof = 6;
#else
{
if (eof == 5)
eof = 6;
else
eof = 5;
}
#endif
else
eof++;
else else
eof = 0; eof = 0;
if (eof > 5) { if (eof > 5) {
@@ -1545,7 +1557,7 @@ bool CMoviePlayerGui::PlayFileStart(void)
towait = 20; towait = 20;
} }
for(i = 0; i < cnt; i++) { for(i = 0; i < cnt; i++) {
playback->GetPosition(position, duration); playback->GetPosition(position, duration, isWebChannel);
startposition = (duration - position); startposition = (duration - position);
//printf("CMoviePlayerGui::PlayFile: waiting for data, position %d duration %d (%d), start %d\n", position, duration, towait, startposition); //printf("CMoviePlayerGui::PlayFile: waiting for data, position %d duration %d (%d), start %d\n", position, duration, towait, startposition);
@@ -1725,7 +1737,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
FileTimeOSD_tmp++; FileTimeOSD_tmp++;
if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) { if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) {
if (playback->GetPosition(position, duration)) { if (playback->GetPosition(position, duration, isWebChannel)) {
FileTimeOSD->update(position, duration); FileTimeOSD->update(position, duration);
if (FileTimeOSD_tmp > -1 && !FileTimeOSD->IsVisible() && g_settings.movieplayer_timeosd_while_searching) if (FileTimeOSD_tmp > -1 && !FileTimeOSD->IsVisible() && g_settings.movieplayer_timeosd_while_searching)
@@ -2075,7 +2087,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
handleMovieBrowser(CRCInput::RC_0, position); handleMovieBrowser(CRCInput::RC_0, position);
} else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) { } else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) {
bool cancel = true; bool cancel = true;
playback->GetPosition(position, duration); playback->GetPosition(position, duration, isWebChannel);
int ss = position/1000; int ss = position/1000;
int hh = ss/3600; int hh = ss/3600;
ss -= hh * 3600; ss -= hh * 3600;
@@ -2893,7 +2905,7 @@ void CMoviePlayerGui::UpdatePosition()
if (cnt > 5) if (cnt > 5)
break; break;
} }
while (!playback->GetPosition(position, duration)); while (!playback->GetPosition(position, duration, isWebChannel));
if (duration > 100) if (duration > 100)
file_prozent = (unsigned char) (position / (duration / 100)); file_prozent = (unsigned char) (position / (duration / 100));