Skip to content

Commit

Permalink
[StreamUtils] Detect the use of inputstream property
Browse files Browse the repository at this point in the history
If the channel specify the use of inputstream.adaptive must use the inputstream adaptive behaviour
  • Loading branch information
CastagnaIT committed Aug 22, 2024
1 parent 1644a10 commit f9054e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/iptvsimple/utilities/StreamUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ void StreamUtils::SetAllStreamProperties(std::vector<kodi::addon::PVRStreamPrope
if (streamType == StreamType::OTHER_TYPE)
streamType = StreamUtils::InspectStreamType(streamURL, channel);

// Verify if the channel has explicitly set up the use of inputstream.adaptive
const bool isISAdaptiveSet = channel.GetProperty(PVR_STREAM_PROPERTY_INPUTSTREAM) == INPUTSTREAM_ADAPTIVE;

// Using kodi's built in inputstreams
if (StreamUtils::UseKodiInputstreams(streamType, settings))
if (!isISAdaptiveSet && StreamUtils::UseKodiInputstreams(streamType, settings))
{
std::string ffmpegStreamURL = StreamUtils::GetURLWithFFmpegReconnectOptions(streamURL, streamType, channel, settings);

Expand Down Expand Up @@ -122,7 +125,8 @@ void StreamUtils::SetAllStreamProperties(std::vector<kodi::addon::PVRStreamPrope
if (!streamUrlSet)
properties.emplace_back(PVR_STREAM_PROPERTY_STREAMURL, streamURL);

properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, INPUTSTREAM_ADAPTIVE);
if (!isISAdaptiveSet)
properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, INPUTSTREAM_ADAPTIVE);

if (streamType == StreamType::HLS || streamType == StreamType::DASH ||
streamType == StreamType::SMOOTH_STREAMING)
Expand Down

0 comments on commit f9054e3

Please sign in to comment.