Skip to content

Commit

Permalink
Revert "Add flush callback"
Browse files Browse the repository at this point in the history
This reverts commit d1504a6.
  • Loading branch information
dmorn committed Aug 22, 2023
1 parent d1504a6 commit a649112
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions lib/membrane/hls/segment_content_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ defprotocol Membrane.HLS.SegmentContentBuilder do
@spec drop_buffers_in_segment(t(), Segment.t()) :: {t(), [Buffer.t()]}
def drop_buffers_in_segment(impl, segment)

@spec flush(t()) :: t()
def flush(impl)

@spec is_empty?(t()) :: boolean()
def is_empty?(impl)
end
2 changes: 1 addition & 1 deletion lib/membrane/hls/sink.ex
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ defmodule Membrane.HLS.Sink do
def handle_end_of_stream(_pad, _ctx, state) do
if state.timer != nil, do: Process.cancel_timer(state.timer)

flush_and_write_playlist(%{state | content_builder: SCB.flush(state.content_builder)}, [])
flush_and_write_playlist(state, [])
end

defp flush_and_write_playlist(state, acc) do
Expand Down
3 changes: 0 additions & 3 deletions test/support/segment_content_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ defimpl Membrane.HLS.SegmentContentBuilder, for: Support.SegmentContentBuilder d
{%SCB{acc: future}, valid}
end

@impl true
def flush(state), do: state

@impl true
def is_empty?(state), do: Enum.empty?(state.acc)
end

0 comments on commit a649112

Please sign in to comment.