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

Buffering and adaptive bitrate switching #732

Merged
merged 33 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
181d600
Multiple segment stored-peak3d
spyderboy92 Jun 17, 2020
810b03d
rework
peak3d Jun 25, 2020
3b78442
Fix manual stream / showcase stream switch
peak3d Jun 27, 2020
2aa43a3
Fix manual stream / showcase chooseRep
peak3d Jun 27, 2020
c1403fc
demo switch bitstream
peak3d Jun 28, 2020
9e9034c
change demo time to 10 segments
peak3d Jun 28, 2020
2e2d90d
Fix / simplify AdaptiveStream::ResolveSegmentBase
peak3d Jul 3, 2020
1150057
Network toggle feature for buffer
spyderboy92 Jul 5, 2020
f1dd951
Correction for buffer prefetch
spyderboy92 Jul 5, 2020
45dbdb8
Slight improvement in code
spyderboy92 Jul 12, 2020
0dfe48d
Seperated ChooseNextRepresentation for further development (mergeable…
spyderboy92 Jul 16, 2020
7d9f1ff
Display resolution + improvements
spyderboy92 Jul 31, 2020
4707c46
Corrected best_rep_
spyderboy92 Jul 31, 2020
9e4a590
Improvement work + (Commented)Grouping of rep
spyderboy92 Aug 30, 2020
7378009
Don't choose new rep if first buffer slot is init seg
glennguy Jul 23, 2021
757164a
Reset offset and read position values when reopening stream
glennguy Jul 23, 2021
6c9a897
Update decrypter caps during InitializeDRM
matthuisman Jul 23, 2021
fe7d0da
best_rep_ and min_rep_ -> adaptationSet
glennguy Jul 23, 2021
72e271f
Choose best bandwidth for best_rep_
glennguy Jul 23, 2021
2eb4e3c
Live streams updated properly after choosing next rep
glennguy Jul 23, 2021
1934abe
HLS - Don't hammer update of tree when filling the buffer
glennguy Jul 23, 2021
e1bb776
[HLS] Fix PTS offsets being set
glennguy Jul 23, 2021
2308bb2
Call ChooseNextRepresentation on periods > 1
glennguy Jul 23, 2021
7e9417f
Return correct initial sequence after stream change
glennguy Jul 23, 2021
c04b705
Ensure representation has been prepared
glennguy Jul 24, 2021
d87a748
Align new rep current segment with old for live streams
glennguy Jul 25, 2021
e2fa724
[HLS] Fix current_segment_ being set
glennguy Jul 25, 2021
e337b4a
Move representation chooser into own file
glennguy Jul 29, 2021
cd2b50d
Remove addon calls from RepresentationChooser
glennguy Jul 29, 2021
f44dac5
Only switch video representations
glennguy Aug 6, 2021
b07f4c2
Fix uninitialised variable
glennguy Aug 19, 2021
b297c7f
Fix tests
glennguy Aug 20, 2021
d69eb7f
Prevent switching reps on last segment of period
glennguy Sep 15, 2021
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ find_package(Kodi REQUIRED)
set(ADP_SOURCES
src/main.cpp
src/common/AdaptiveTree.cpp
src/common/RepresentationChooser.cpp
src/parser/DASHTree.cpp
src/parser/HLSTree.cpp
src/parser/SmoothTree.cpp
Expand All @@ -32,6 +33,7 @@ set(ADP_HEADERS
src/SSD_dll.h
src/common/AdaptiveStream.h
src/common/AdaptiveTree.h
src/common/RepresentationChooser.h
src/parser/DASHTree.h
src/parser/HLSTree.h
src/parser/SmoothTree.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ msgctxt "#30102"
msgid "Max. Bandwidth (Bit/s)"
msgstr ""

# Assured buffer length duration (seconds)
msgctxt "#30200"
msgid "Assured Buffer Duration (sec)"
msgstr ""

# Max buffer length duration (seconds)
msgctxt "#30201"
msgid "Max Buffer Duration (sec)"
msgstr ""

# Ignore Window Display Resolution Change
msgctxt "#30202"
msgid "Ignore Window Change"
msgstr ""

# Absolute path to the folder containing the decrypters
msgctxt "#30103"
msgid "Decrypter path"
Expand Down
15 changes: 15 additions & 0 deletions inputstream.adaptive/resources/settings.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
<default>0</default>
<control type="edit" format="integer" />
</setting>
<setting id="ASSUREDBUFFERDURATION" type="integer" label="30200">
<level>1</level>
<default>60</default>
<control type="edit" format="integer" />
</setting>
<setting id="MAXBUFFERDURATION" type="integer" label="30201">
<level>1</level>
<default>120</default>
<control type="edit" format="integer" />
</setting>
<setting id="IGNOREWINDOWCHANGE" type="boolean" label="30202">
<level>1</level>
<default>true</default>
<control type="toggle" />
</setting>
<setting id="MAXRESOLUTION" type="integer" label="30110">
<level>0</level>
<default>0</default>
Expand Down
3 changes: 2 additions & 1 deletion lib/libbento4/Core/Ap4FragmentSampleTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ AP4_FragmentSampleTable::AddTrun(AP4_TrunAtom* trun,

// dts and cts
sample.SetDts(dts);
if (trun_flags & AP4_TRUN_FLAG_SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT) {
if (trun_flags & AP4_TRUN_FLAG_SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT)
{
sample.SetCtsDelta(entry.sample_composition_time_offset);
}

Expand Down
Loading