@@ -15,9 +15,9 @@ defmodule Membrane.RTP.JitterBuffer do
15
15
16
16
@ timestamp_limit Bitwise . bsl ( 1 , 32 )
17
17
18
- def_output_pad :output , accepted_format: RTP , demand_mode : :auto
18
+ def_output_pad :output , accepted_format: RTP , flow_control : :auto
19
19
20
- def_input_pad :input , accepted_format: RTP , demand_mode : :auto
20
+ def_input_pad :input , accepted_format: RTP , flow_control : :auto
21
21
22
22
@ default_latency 200 |> Time . milliseconds ( )
23
23
@@ -66,7 +66,7 @@ defmodule Membrane.RTP.JitterBuffer do
66
66
Process . send_after (
67
67
self ( ) ,
68
68
:initial_latency_passed ,
69
- state . latency |> Time . round_to_milliseconds ( )
69
+ state . latency |> Time . as_milliseconds ( :round )
70
70
)
71
71
72
72
{ [ ] , % { state | waiting?: true } }
@@ -83,7 +83,7 @@ defmodule Membrane.RTP.JitterBuffer do
83
83
end
84
84
85
85
@ impl true
86
- def handle_process ( :input , buffer , _context , % State { store: store , waiting?: true } = state ) do
86
+ def handle_buffer ( :input , buffer , _context , % State { store: store , waiting?: true } = state ) do
87
87
state =
88
88
case BufferStore . insert_buffer ( store , buffer ) do
89
89
{ :ok , result } ->
@@ -98,7 +98,7 @@ defmodule Membrane.RTP.JitterBuffer do
98
98
end
99
99
100
100
@ impl true
101
- def handle_process ( :input , buffer , _context , % State { store: store } = state ) do
101
+ def handle_buffer ( :input , buffer , _context , % State { store: store } = state ) do
102
102
case BufferStore . insert_buffer ( store , buffer ) do
103
103
{ :ok , result } ->
104
104
state = % State { state | store: result }
@@ -147,7 +147,7 @@ defmodule Membrane.RTP.JitterBuffer do
147
147
148
148
buffer_ts ->
149
149
since_insertion = Time . monotonic_time ( ) - buffer_ts
150
- send_after_time = max ( 0 , latency - since_insertion ) |> Time . round_to_milliseconds ( )
150
+ send_after_time = max ( 0 , latency - since_insertion ) |> Time . as_milliseconds ( :round )
151
151
Process . send_after ( self ( ) , :send_buffers , send_after_time )
152
152
end
153
153
0 commit comments