-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix CAN-SKIP-UNTIL
and delta generation
#88
Conversation
test/membrane_http_adaptive_stream/integration_test/sink_bin_integration_test.exs
Outdated
Show resolved
Hide resolved
latest_full_segments <- | ||
track.segments | ||
# For some reason, Dialyzer complains without the following line. | ||
# See discussion in https://github.com/membraneframework/membrane_http_adaptive_stream_plugin/pull/88 | ||
|> Function.identity() | ||
|> Qex.reverse() | ||
|> Enum.drop_while(&(&1.type == :partial)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really strange. Without the pipe to Function.identity
or IO.inspect
, Dialyzer gives the following errors:
lib/membrane_http_adaptive_stream/hls.ex:123:pattern_match
The pattern can never match the type.
Pattern:
{:create_delta, _delta_ctx}
Type:
:dont_create_delta
________________________________________________________________________________
lib/membrane_http_adaptive_stream/hls.ex:179:pattern_match
The pattern can never match the type.
Pattern:
_track = %Membrane.HTTPAdaptiveStream.Manifest.Track{}, [{:delta?, true}]
Type:
atom() | map(), [{:delta?, false}, ...]
________________________________________________________________________________
lib/membrane_http_adaptive_stream/hls.ex:303:guard_fail
The guard clause:
when _segments_to_skip_count :: 0 > 0
can never succeed.
________________________________________________________________________________
lib/membrane_http_adaptive_stream/hls.ex:405:guard_fail
The guard clause:
when _duration :: 0 > 0
can never succeed.
________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2
Seems to be a bug in the utility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want to merge it before the dialyzer fix I would prefer to use the @dialyzer
tag to skip checking this function and some comment then Function.identity()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want to merge it before the dialyzer fix I would prefer to use the @dialyzer tag to skip checking this function and some comment then Function.identity()
a3028d3
to
6fa9154
Compare
Bumped playlist version for deltas to 9, as per https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-8
Sources for
CAN-SKIP-UNTIL
calculation:As per comments in tests, delta can be created whenever the sum of durations of full segments in playlist exceeds
6 * TARGET-DURATION