[mythtv-commits] [MythTV/mythtv] 2cf309: MythSingleDownload: Set a User-Agent

Ian Campbell noreply at github.com
Sat Oct 5 23:21:05 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 2cf309cd0d6fdc17e79de6507fd258c5eeba8187
      https://github.com/MythTV/mythtv/commit/2cf309cd0d6fdc17e79de6507fd258c5eeba8187
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythbase/mythsingledownload.cpp

  Log Message:
  -----------
  MythSingleDownload: Set a User-Agent

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 017440bde745e8ac97131ed6c01f8a1d17057c51)


  Commit: 2d9065e8cc55e2c8c97fcea2ecf41b331c562f3c
      https://github.com/MythTV/mythtv/commit/2d9065e8cc55e2c8c97fcea2ecf41b331c562f3c
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/hlsstreamhandler.cpp

  Log Message:
  -----------
  HLSStreamHandler : add debug log to the constructor mirroring the destructor's

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 88b3020b303fb46a419de8185e2000c789782940)


  Commit: 3d48c63a7137b5952f4b6647dc08c0b88492d717
      https://github.com/MythTV/mythtv/commit/3d48c63a7137b5952f4b6647dc08c0b88492d717
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/hlsstreamhandler.cpp

  Log Message:
  -----------
  HLSStreamHandler : add missing arg to Return() debug log

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 1be10a9c6227e115d9df4bf62ad28287e3cc2f14)


  Commit: 163e1a4a4fec0f3d5dafc7415e1ad15ea45821d2
      https://github.com/MythTV/mythtv/commit/163e1a4a4fec0f3d5dafc7415e1ad15ea45821d2
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythbase/mythsingledownload.cpp

  Log Message:
  -----------
  MythSingleDownload: fix typo in log message in DownloadURL()

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 78b8e7bfbe0018c840a8d424e7b3809b24b31447)


  Commit: 783e0dfd6971d8f10165bf810f4c9dd4e9819da5
      https://github.com/MythTV/mythtv/commit/783e0dfd6971d8f10165bf810f4c9dd4e9819da5
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.h

  Log Message:
  -----------
  HLSReader: fix deadlock in HLSReader cancellation.

The thread running HLSReader::Cancel calls HLSPlaylistWorker::Cancel with the
stream lock held, which blocks waiting for the thread to exit.

The HLSPlaylistWorker::run thread however can be at the point between the
m_cancel check and the call to HLSReader::PlaylistRetrying. Since
PlaylistRetrying also takes the stream lock we are therefore deadlocked.

To address this introduce a separate worker lock covering the m_playlistworker
and m_streamworker fields. This means that HLSReader::Cancel only needs to take
this new lock and therefore cannot deadlock against the use of the stream lock
in HLSReader::PlaylistRetrying.

When they need to be held together the new lock is consistently nested within
the old. Refs #13488

Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 946efc5c303fd651276437294c6afaa10bb95e72)


  Commit: 13976eae2fd69ae93c4496371eb2a91b3d75bce3
      https://github.com/MythTV/mythtv/commit/13976eae2fd69ae93c4496371eb2a91b3d75bce3
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythbase/mythsingledownload.cpp
    M mythtv/libs/libmythbase/mythsingledownload.h

  Log Message:
  -----------
  MythSingleDownload: add option to return final (post-redirect) URL

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 753fdd84c3d891198045f4375925e2e3bcd546f0)


  Commit: 7d1c0d1eb15e13948b4460528b305c9375921e81
      https://github.com/MythTV/mythtv/commit/7d1c0d1eb15e13948b4460528b305c9375921e81
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythbase/mythdownloadmanager.cpp
    M mythtv/libs/libmythbase/mythdownloadmanager.h

  Log Message:
  -----------
  MythDownloadManager: add option to return final (post-redirect) URL

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit bdf652e8f5a771577b3550283fd79d7e026e2c6e)


  Commit: 2b6381407da5c10f29cecae4553c7d61c2f86046
      https://github.com/MythTV/mythtv/commit/2b6381407da5c10f29cecae4553c7d61c2f86046
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.h
    M mythtv/libs/libmythtv/iptvtuningdata.h

  Log Message:
  -----------
  IPTVChannelInfo: explictly set IPTVTuningData protocol to invalid

... 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 at mythtv.org>
(cherry picked from commit 896f0c816c175125291897b48a2850963c388175)


  Commit: 10691b473af7871e85329281dd800d691055a23b
      https://github.com/MythTV/mythtv/commit/10691b473af7871e85329281dd800d691055a23b
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.h
    M mythtv/libs/libmythtv/recorders/HLS/HLSStream.cpp
    M mythtv/libs/libmythtv/recorders/HLS/HLSStream.h

  Log Message:
  -----------
  HLSStream/Reader: rename m_url field to m_m3u8_url throughout

This makes space for subsequently recording the final base URL to use for the
individual streams, in the case where the m3u8 is behind a redirect.

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit ed0cb56d3e3f4d7eada82422d488998e7eaa954d)


  Commit: 3e61fef82049b62aa3441ac2011eaa342aeab6ef
      https://github.com/MythTV/mythtv/commit/3e61fef82049b62aa3441ac2011eaa342aeab6ef
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.h
    M mythtv/libs/libmythtv/recorders/HLS/HLSStream.cpp
    M mythtv/libs/libmythtv/recorders/HLS/HLSStream.h

  Log Message:
  -----------
  HLS: deal with m3u8 behind a 302 redirect

By recording the final m3u8 URL and using that as the basis for calculating
the stream URLs.

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 1c846b682e21ab0c31a7b380b410f0e631dd182f)


  Commit: a2ac6aa62f86bd33c9863d2b917b1496ac53f164
      https://github.com/MythTV/mythtv/commit/a2ac6aa62f86bd33c9863d2b917b1496ac53f164
  Author: Ian Campbell <ijc at hellion.org.uk>
  Date:   2019-10-06 (Sun, 06 Oct 2019)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp

  Log Message:
  -----------
  HLSReader: Only try to combine overlapping playlists if the diff is >= 0

Otherwise `Inew += diff` results in going off the front of the array and a crash.

Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit a59a4f0749edaed960d8b9f5fd35dff2c67d4c02)


Compare: https://github.com/MythTV/mythtv/compare/b351dca24329...a2ac6aa62f86


More information about the mythtv-commits mailing list