Skip to content

Commit

Permalink
IPTVChannelInfo: explictly set IPTVTuningData protocol to invalid
Browse files Browse the repository at this point in the history
... and avoid the protocol probe. The uses in the channel fetching code do not
require it and this avoids hitting every single URL during a channel scan
(which some providers do not appreciate).

The channel fetcher code doesn't need the protocol, since it calls none of the
relevant methods.

Since the IPTVTuningData contructor argument list has changed we know that
there are no other users of that particular form.

While there constify `IsHLSPlaylist`

Refs #13488
Signed-off-by: Paul Harrison <pharrison@mythtv.org>
(cherry picked from commit 896f0c8)
  • Loading branch information
ijc authored and Paul Harrison committed Oct 5, 2019
1 parent 7d1c0d1 commit 2b63814
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 2 additions & 6 deletions mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.h
Expand Up @@ -39,15 +39,11 @@ class IPTVChannelInfo
uint programnumber) :
m_name(name), m_xmltvid(xmltvid), m_programNumber(programnumber),
m_tuning(data_url, data_bitrate,
fec_type, fec_url0, fec_bitrate0, fec_url1, fec_bitrate1)
fec_type, fec_url0, fec_bitrate0, fec_url1, fec_bitrate1,
IPTVTuningData::inValid)
{
}

bool IsValid(void) const
{
return !m_name.isEmpty() && m_tuning.IsValid();
}

public:
QString m_name;
QString m_xmltvid;
Expand Down
9 changes: 5 additions & 4 deletions mythtv/libs/libmythtv/iptvtuningdata.h
Expand Up @@ -71,11 +71,12 @@ class MTV_PUBLIC IPTVTuningData
IPTVTuningData(const QString &data_url, uint data_bitrate,
const QString &fec_type,
const QString &fec_url0, uint fec_bitrate0,
const QString &fec_url1, uint fec_bitrate1) :
const QString &fec_url1, uint fec_bitrate1,
const IPTVProtocol protocol) :
m_data_url(data_url),
m_fec_type(kNone), m_fec_url0(fec_url0), m_fec_url1(fec_url1)
m_fec_type(kNone), m_fec_url0(fec_url0), m_fec_url1(fec_url1),
m_protocol(protocol)
{
GuessProtocol();
m_bitrate[0] = data_bitrate;
m_bitrate[1] = fec_bitrate0;
m_bitrate[2] = fec_bitrate1;
Expand Down Expand Up @@ -218,7 +219,7 @@ class MTV_PUBLIC IPTVTuningData
}

protected:
bool IsHLSPlaylist(void)
bool IsHLSPlaylist(void) const
{
if (!qApp)
{
Expand Down

0 comments on commit 2b63814

Please sign in to comment.