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

Rename ForwardingFilter to Connector #908

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename file

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
Loading