Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Updated] Allow streams to be pausable and seekable #1078

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/service/servicedvb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1509,10 +1509,12 @@ RESULT eDVBServicePlay::connectEvent(const sigc::slot<void(iPlayableService*,int

RESULT eDVBServicePlay::pause(ePtr<iPauseableService> &ptr)
{
eServiceReferenceDVB sRelayOrigSref;
bool isSRService = ((const eServiceReferenceDVB&)m_reference).getSROriginal(sRelayOrigSref);
/* note: we check for timeshift to be enabled,
not neccessary active. if you pause when timeshift
is not active, you should activate it when unpausing */
if ((!m_is_pvr) && (!m_timeshift_enabled))
if ((!m_is_pvr) && (!m_timeshift_enabled) && (m_reference.path.empty() || isSRService))
{
ptr = nullptr;
return -1;
Expand Down Expand Up @@ -1617,7 +1619,9 @@ RESULT eDVBServicePlay::setFastForward_internal(int ratio, bool final_seek)

RESULT eDVBServicePlay::seek(ePtr<iSeekableService> &ptr)
{
if (m_is_pvr || m_timeshift_enabled)
eServiceReferenceDVB sRelayOrigSref;
bool isSRService = ((const eServiceReferenceDVB&)m_reference).getSROriginal(sRelayOrigSref);
if (m_is_pvr || m_timeshift_enabled || (!m_reference.path.empty() && !isSRService))
{
ptr = this;
return 0;
Expand Down