Skip to content

Commit

Permalink
Merge pull request #51 from phunkyfish/rt-fix-leia
Browse files Browse the repository at this point in the history
Fully implement IsRealTimeStream() - Leia
  • Loading branch information
aassif authored May 16, 2020
2 parents d2a27b4 + 4b1fa27 commit a850e6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvr.freebox/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.freebox"
version="2.0.3"
version="2.0.4"
name="PVR Freebox TV"
provider-name="aassif">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
11 changes: 10 additions & 1 deletion src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ bool colors = PVR_FREEBOX_DEFAULT_COLORS;
bool init = false;
ADDON_STATUS status = ADDON_STATUS_UNKNOWN;
Freebox * data = nullptr;
bool isRecordingPlayback = false;

CHelper_libXBMC_addon * XBMC = nullptr;
CHelper_libXBMC_pvr * PVR = nullptr;
Expand Down Expand Up @@ -275,6 +276,8 @@ PVR_ERROR GetChannels (ADDON_HANDLE handle, bool radio)

PVR_ERROR GetChannelStreamProperties (const PVR_CHANNEL * channel, PVR_NAMED_VALUE * properties, unsigned int * count)
{
isRecordingPlayback = false;

return data ? data->GetChannelStreamProperties (channel, properties, count) : PVR_ERROR_SERVER_ERROR;
}

Expand Down Expand Up @@ -305,6 +308,8 @@ PVR_ERROR GetRecordings (ADDON_HANDLE handle, bool deleted)

PVR_ERROR GetRecordingStreamProperties (const PVR_RECORDING * recording, PVR_NAMED_VALUE * properties, unsigned int * count)
{
isRecordingPlayback = true;

return data ? data->GetRecordingStreamProperties (recording, properties, count) : PVR_ERROR_SERVER_ERROR;
}

Expand Down Expand Up @@ -356,6 +361,11 @@ PVR_ERROR CallMenuHook (const PVR_MENUHOOK & hook, const PVR_MENUHOOK_DATA & d)
return data ? data->MenuHook (hook, d) : PVR_ERROR_SERVER_ERROR;
}

bool IsRealTimeStream()
{
return !isRecordingPlayback;
}

/** UNUSED API FUNCTIONS */
bool CanPauseStream () {return false;}
PVR_ERROR OpenDialogChannelScan () {return PVR_ERROR_NOT_IMPLEMENTED;}
Expand All @@ -382,7 +392,6 @@ PVR_ERROR GetRecordingEdl (const PVR_RECORDING &, PVR_EDL_ENTRY [], int *) {retu
void DemuxAbort () {}
bool IsTimeshifting () {return false;}
DemuxPacket * DemuxRead () {return NULL;}
bool IsRealTimeStream () {return true;}
void PauseStream (bool) {}
bool CanSeekStream () {return false;}
bool SeekTime (double, bool, double *) {return false;}
Expand Down

0 comments on commit a850e6b

Please sign in to comment.