Skip to content

Commit

Permalink
Merge pull request #308 from flubshi/omega_hls_ia
Browse files Browse the repository at this point in the history
Fix hls playback using inputstream.adaptive
  • Loading branch information
flubshi authored May 26, 2024
2 parents 3c2570b + 3b09b18 commit 9825e40
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
8 changes: 2 additions & 6 deletions pvr.waipu/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.waipu"
version="21.6.3"
version="21.6.4"
name="waipu.tv PVR Client"
provider-name="flubshi">
<requires>@ADDON_DEPENDS@
Expand All @@ -26,11 +26,7 @@
<screenshot>resources/screenshots/screenshot-02.jpg</screenshot>
</assets>
<news>
v21.6.3
- Translations updates from Weblate
- af_za, am_et, ar_sa, ast_es, az_az, be_by, bg_bg, bs_ba, ca_es, cs_cz, cy_gb, da_dk, de_de, el_gr, en_au, en_nz, en_us, eo, es_ar, es_es, es_mx, et_ee, eu_es, fa_af, fa_ir, fi_fi, fo_fo, fr_ca, fr_fr, gl_es, he_il, hi_in, hr_hr, hu_hu, hy_am, id_id, is_is, it_it, ja_jp, ko_kr, lt_lt, lv_lv, mi, mk_mk, ml_in, mn_mn, ms_my, mt_mt, my_mm, nb_no, nl_nl, pl_pl, pt_br, pt_pt, ro_ro, ru_ru, si_lk, sk_sk, sl_si, sq_al, sr_rs, sr_rs@latin, sv_se, szl, ta_in, te_in, tg_tj, th_th, tr_tr, uk_ua, uz_uz, vi_vn, zh_cn, zh_tw

- Experimental: New EPG API
- Fix hls playback using inputstream.adaptive
</news>
<summary lang="da_DK">waipu.tv PVR-klient</summary>
<summary lang="de_DE">waipu.tv PVR Client</summary>
Expand Down
17 changes: 12 additions & 5 deletions src/WaipuData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,6 @@ void WaipuData::SetStreamProperties(std::vector<kodi::addon::PVRStreamProperty>&
"https://drm.wpstr.tv/license-proxy-widevine/cenc/"
"|Content-Type=text%2Fxml&x-dt-custom-data=" +
license + "|R{SSM}|JBlicense");

properties.emplace_back("inputstream.adaptive.manifest_update_parameter", "full");
}
else if (protocol == "hls" && kodi::addon::GetSettingBoolean("streaming_use_ffmpegdirect", false))
{
Expand All @@ -731,14 +729,23 @@ void WaipuData::SetStreamProperties(std::vector<kodi::addon::PVRStreamProperty>&
properties.emplace_back(PVR_STREAM_PROPERTY_MIMETYPE, "application/x-mpegURL");
properties.emplace_back("inputstream.ffmpegdirect.is_realtime_stream", realtime ? "true" : "false");
}
else if (protocol == "hls")
else if (protocol == "hls" && Utils::CheckInputstreamInstalledAndEnabled("inputstream.adaptive"))
{
kodi::Log(ADDON_LOG_DEBUG, "[SetStreamProperties] play protocol '%s' using internal player",
kodi::Log(ADDON_LOG_DEBUG, "[SetStreamProperties] play protocol '%s' using inputstream adaptive",
protocol.c_str());

properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "inputstream.adaptive");
properties.emplace_back("inputstream.adaptive.manifest_type", "hls");
properties.emplace_back(PVR_STREAM_PROPERTY_MIMETYPE, "application/x-mpegURL");

if (playTimeshiftBuffer)
{
properties.emplace_back("inputstream.adaptive.play_timeshift_buffer", "true");
}
}
else
{
kodi::Log(ADDON_LOG_ERROR, "[SetStreamProperties] called with invalid protocol '%s'",
kodi::Log(ADDON_LOG_ERROR, "[SetStreamProperties] called with invalid protocol '%s' or missing inputstream addon.",
protocol.c_str());
}
}
Expand Down

0 comments on commit 9825e40

Please sign in to comment.