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

Remote controlled pipeline #366

Merged
merged 35 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
343f83a
prototype of Testing.Pipeline.exec_actions
andpodob Dec 13, 2021
31ee7f7
WIP
andpodob Dec 17, 2021
a631506
create working draft of RemoteControlled.Pipeline
andpodob Dec 22, 2021
86b0e5e
add notification handling and tests
andpodob Dec 23, 2021
fe3bd51
add documentation
andpodob Dec 27, 2021
22b5306
fix credo
andpodob Dec 27, 2021
1ac37c9
Update CHANGELOG.md
andpodob Dec 27, 2021
af5233b
add ability to specify pipeline in await
andpodob Dec 28, 2021
2871b3e
Remove bug with pipeline not being pinned in the await function/macro…
varsill Feb 24, 2022
e5b2ed6
Add Message struct instead of tuple
varsill Feb 24, 2022
568f479
Add alternative await macros.
varsill Feb 25, 2022
69f80ef
Decompose message strucutre
varsill Feb 25, 2022
c06736b
Add more tests covering the await functionality. Clean the code. Prov…
varsill Feb 28, 2022
919178d
Extrude the message structure definition to the seperate file
varsill Feb 28, 2022
529d659
Improve formatting
varsill Feb 28, 2022
84b7c0c
Remove await_generic_with_alternative_syntax. Make await_* functions …
varsill Mar 9, 2022
9158e22
improve the documentation by providing usage examples
varsill Mar 9, 2022
3073b06
Add Message.Terminated and await_termination
varsill Mar 9, 2022
055310d
Give meaningful name to '_' variables
varsill Mar 10, 2022
b51acb3
Deal with unused function 'pin_leaf_nodes/1' warning
varsill Mar 11, 2022
623f39c
Merge pull request #401 from membraneframework/remote-controlled-pipe…
varsill Mar 18, 2022
566b14b
Merge branch 'master' into remote-controlled-pipeline
varsill Mar 21, 2022
2183838
Flatten the message structure
varsill Mar 24, 2022
d81f8b6
Improve documentation
varsill Mar 24, 2022
3091e2b
Add line break so that the RemoteControlled.Pipeline description is s…
varsill Mar 24, 2022
9fb21f5
Improve formatting
varsill Mar 24, 2022
c0514a2
Merge branch 'master' into remote-controlled-pipeline
varsill Mar 24, 2022
ec5e589
Improve documentation concerning pipeline termination. Add more meani…
varsill Mar 25, 2022
129d330
Merge branch 'remote-controlled-pipeline' of https://github.com/membr…
varsill Mar 25, 2022
572d6e8
Add typespec for the RemoteControlled.Message
varsill Mar 28, 2022
e072fa2
Update lib/membrane/remote_controlled/message.ex
varsill Mar 30, 2022
dc42429
Merge branch 'master' into remote-controlled-pipeline
varsill Mar 30, 2022
c9c9f33
Add Elixir syntax highlighting to code snippets in documentation. Rep…
varsill Mar 30, 2022
b324893
Remove unnecessary Elixir syntax highliting specifier in the markdown…
varsill Mar 31, 2022
f50ad2e
Merge branch 'master' into remote-controlled-pipeline
varsill Apr 1, 2022
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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

## 0.10.0
* Remove all deprecated stuff [#399](https://github.com/membraneframework/membrane_core/pull/399)
* Add `Membrane.RemoteControlled.Pipeline` - a basic implementation of a `Membrane.Pipeline` that </br>
can be spawned and controlled by an external process [#366](https://github.com/membraneframework/membrane_core/pull/366)
* Disallow sending buffers without sending caps first [#341](https://github.com/membraneframework/membrane_core/issues/341)

## 0.9.0
* Automatic demands [#313](https://github.com/membraneframework/membrane_core/pull/313)
* Stop forwarding notifications by default in bins [#358](https://github.com/membraneframework/membrane_core/pull/358)
* More fine-grained control over emitted metrics [#365](https://github.com/membraneframework/membrane_core/pull/365)

### PRs not influencing public API:
* Added log metadata when reporting init in telemetry [#376](https://github.com/membraneframework/membrane_core/pull/376)
* Fix generation of pad documentation inside an element [#377](https://github.com/membraneframework/membrane_core/pull/377)
* Leaving static pads unlinked and transiting to a playback state other than `:stopped` will result
Expand Down
65 changes: 65 additions & 0 deletions lib/membrane/remote_controlled/message.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
defmodule Membrane.RemoteControlled.Message do
@moduledoc false

defmodule PlaybackState do
@moduledoc """
Message sent when the pipeline changes its playback state
"""
@type t :: %__MODULE__{from: pid(), state: Membrane.PlaybackState.t()}

@enforce_keys [:from, :state]
defstruct @enforce_keys
end

defmodule StartOfStream do
@moduledoc """
Message sent when some element of the pipeline receives the start of stream event on some pad.
"""
@type t :: %__MODULE__{
from: pid(),
element: Membrane.Element.name_t(),
pad: Membrane.Pad.name_t()
}

@enforce_keys [:from, :element, :pad]
defstruct @enforce_keys
end

defmodule EndOfStream do
@moduledoc """
Message sent when some element of the pipeline receives the start of stream event on some pad.
"""
@type t :: %__MODULE__{
from: pid(),
element: Membrane.Element.name_t(),
pad: Membrane.Pad.name_t()
}

@enforce_keys [:from, :element, :pad]
defstruct @enforce_keys
end

defmodule Notification do
@moduledoc """
Message sent when the some element of the pipeline receives a notification.
"""
@type t :: %__MODULE__{
from: pid(),
element: Membrane.Element.name_t(),
data: Membrane.Notification.t()
}

@enforce_keys [:from, :element, :data]
defstruct @enforce_keys
end

defmodule Terminated do
@moduledoc """
Message sent when the pipeline is terminated.
"""
@type t :: %__MODULE__{from: pid(), reason: :normal | :shutdown | {:shutdown, any()} | term()}

@enforce_keys [:from, :reason]
defstruct @enforce_keys
end
end
Loading