Skip to content

Commit

Permalink
Merge pull request #100 from phunkyfish/rt-fix
Browse files Browse the repository at this point in the history
Fully implement IsRealTimeStream()
  • Loading branch information
phunkyfish committed May 16, 2020
2 parents 42fadcc + 66e38f1 commit f0add79
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvr.filmon/addon.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.filmon"
version="3.2.3"
version="3.2.4"
name="PVR Filmon Client"
provider-name="Stephen Denham">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.filmon/changelog.txt
@@ -1,3 +1,6 @@
3.2.4:
- Fully implement IsRealTimeStream()

3.2.3:
- Update PVR API 6.5.0

Expand Down
10 changes: 9 additions & 1 deletion src/client.cpp
Expand Up @@ -24,6 +24,7 @@ ADDON_STATUS m_CurStatus = ADDON_STATUS_UNKNOWN;
PVRFilmonData* m_data = nullptr;
bool m_bIsPlaying = false;
PVRFilmonChannel m_currentChannel;
bool m_bRecordingPlayback = false;

/* User adjustable settings are saved here.
* Default values are defined inside client.h
Expand Down Expand Up @@ -365,6 +366,8 @@ PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel,
if (!m_data)
return PVR_ERROR_SERVER_ERROR;

m_bRecordingPlayback = false;

return m_data->GetChannelStreamProperties(channel, properties, iPropertiesCount);
}

Expand All @@ -375,6 +378,8 @@ PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording,
if (!m_data)
return PVR_ERROR_SERVER_ERROR;

m_bRecordingPlayback = true;

return m_data->GetRecordingStreamProperties(recording, properties, iPropertiesCount);
}

Expand Down Expand Up @@ -440,7 +445,10 @@ bool SeekTime(double time, bool backwards, double* startpts)
}
}
void SetSpeed(int) {}
bool IsRealTimeStream() { return true; }
bool IsRealTimeStream()
{
return !m_bRecordingPlayback;
}
PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording) { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR DeleteAllRecordingsFromTrash() { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR GetRecordingSize(const PVR_RECORDING* recording, int64_t* sizeInBytes) { return PVR_ERROR_NOT_IMPLEMENTED; }
Expand Down

0 comments on commit f0add79

Please sign in to comment.