Skip to content

Commit

Permalink
Rename ForwardingFilter to Connector
Browse files Browse the repository at this point in the history
  • Loading branch information
FelonEkonom committed Nov 19, 2024
1 parent d71bb3b commit 45f99bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1.2.0
* Add `:max_instances` option for dynamic pads. [#876](https://github.com/membraneframework/membrane_core/pull/876)
* Implement `Membrane.ForwardingFilter`. [#904](https://github.com/membraneframework/membrane_core/pull/904)
* Implement `Membrane.Connector`. [#904](https://github.com/membraneframework/membrane_core/pull/904)

## 1.1.2
* Add new callback `handle_child_terminated/3` along with new assertions. [#894](https://github.com/membraneframework/membrane_core/pull/894)
Expand Down
2 changes: 1 addition & 1 deletion lib/membrane/forwarding_filter.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.ForwardingFilter do
defmodule Membrane.Connector do
@moduledoc """
Membrane Filter with input and output dynamic pads, that forwards incoming data to the opposite
side than the one from which it came.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
defmodule Membrane.Integration.ForwardingFilterTest do
defmodule Membrane.Integration.ConnectorTest do
use ExUnit.Case, async: true

import Membrane.ChildrenSpec
import Membrane.Testing.Assertions

alias Membrane.Buffer
alias Membrane.ForwardingFilter
alias Membrane.Connector
alias Membrane.Testing

require Membrane.Pad, as: Pad
Expand All @@ -23,12 +23,12 @@ defmodule Membrane.Integration.ForwardingFilterTest do
do: {[{action, {:output, item}}], state}
end

test "Membrane.ForwardingFilter buffers data until output pad is linked" do
test "Membrane.Connector buffers data until output pad is linked" do
pipeline =
Testing.Pipeline.start_link_supervised!(
spec:
child(:source, Source)
|> child(:filter, %ForwardingFilter{
|> child(:connector, %Connector{
notify_on_event?: true,
notify_on_stream_format?: true
})
Expand Down Expand Up @@ -75,7 +75,7 @@ defmodule Membrane.Integration.ForwardingFilterTest do
Testing.Pipeline.terminate(pipeline)
end

test "Membrane.ForwardingFilter pauses input demand if output pad is not linked" do
test "Membrane.Connector pauses input demand if output pad is not linked" do
atomics_ref = :atomics.new(1, [])
:atomics.put(atomics_ref, 1, 0)

Expand All @@ -90,15 +90,15 @@ defmodule Membrane.Integration.ForwardingFilterTest do
spec =
child(:source, %Testing.Source{output: {nil, generator}})
|> via_in(:input, auto_demand_size: auto_demand_size)
|> child(:forwarding_filter, ForwardingFilter)
|> child(:connector, Connector)

pipeline = Testing.Pipeline.start_link_supervised!(spec: spec)

Process.sleep(500)

assert :atomics.get(atomics_ref, 1) == auto_demand_size

spec = get_child(:forwarding_filter) |> child(:sink, Testing.Sink)
spec = get_child(:connector) |> child(:sink, Testing.Sink)
Testing.Pipeline.execute_actions(pipeline, spec: spec)

Process.sleep(500)
Expand Down

0 comments on commit 45f99bd

Please sign in to comment.