Skip to content

Commit 1f53885

Browse files
authored
Merge pull request #41 from membraneframework/fix/code_snippes_styling
removing extra line at some code snippets
2 parents 3471c59 + 605bf34 commit 1f53885

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

basic_pipeline/03_Source.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ defmodule Basic.Elements.Source do
2727
alias Basic.Formats.Packet
2828
...
2929
end
30-
3130
```
3231

3332
## Pads and options
@@ -43,7 +42,6 @@ defmodule Basic.Elements.Source do
4342
def_output_pad :output, [caps: {Packet, type: :custom_packets}, mode: :pull]
4443
...
4544
end
46-
4745
```
4846

4947
The first macro, `def_options` allows us to define the parameters which are expected to be passed while instantiating the element. The parameters will be passed as an automatically generated structure `%Basic.Elements.Source{}`. In our case, we will have a `:location` field inside of that structure. This parameter is about to be a path to the files which will contain input [packets](../glossary/glossary.md#packet).
@@ -114,7 +112,6 @@ defmodule Basic.Elements.Source do
114112
end
115113
...
116114
end
117-
118115
```
119116

120117
In the case of the first callback, `handle_stopped_to_prepared/2`, what we do is that we are reading the file from the location specified in the options structure (which we have saved in the state of the element).
@@ -147,7 +144,6 @@ defmodule Basic.Elements.Source do
147144
end
148145
...
149146
end
150-
151147
```
152148

153149
The callback's body describes the situation in which some buffers were requested. Then we are checking if we have any packets left in the list persisting in the state of the element. If that list is empty, we are sending an `end_of_stream` action, indicating that there will be no more buffers sent through the `:output` pad and that is why there is no point in requesting more buffers.

basic_pipeline/07_Redemands.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def handle_demand(:output, _size, unit, context, state) do
3737
actions = [buffer: %Membrane.Buffer(payload: payload), redemand: :output]
3838
{ {:ok, actions}, state}
3939
end
40-
4140
```
4241

4342
## In Filter elements

basic_pipeline/11_Pipeline.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@ Please add the following callback signature to our `Basic.Pipeline` module:
2727
```Elixir
2828

2929
defmodule Basic.Pipeline do
30-
...
30+
...
3131
@impl true
3232
def handle_init(_opts) do
3333

3434
end
3535
end
36-
3736
```
3837

3938
As you can see, we can initialize the pipeline with some options, but in our case, we do not need them.

basic_pipeline_extension/03_DynamicPads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def handle_init(_opts) do
1616
depayloader3: %Basic.Elements.Depayloader{packets_per_frame: 4},
1717
...
1818
}
19-
19+
2020
links = [
2121
...
2222
link(:input3) |> to(:ordering_buffer3) |> to(:depayloader3),

videoroom/5_ImplementingServerRoom.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The room should dispatch messages sent from RTC Engine to appropriate peer chann
55
Let's start by creating `lib/videoroom/room.ex` file with a declaration of Videoroom.Room module:
66

77
**_`lib/videoroom/room.ex`_**
8+
89
```elixir
910
defmodule Videoroom.Room do
1011
@moduledoc false
@@ -24,6 +25,7 @@ We will be using OTP's [GenServer](https://elixir-lang.org/getting-started/mix-o
2425
Let's start by adding wrappers for GenServer's `start` and `start_link` functions:
2526

2627
**_`lib/videoroom/room.ex`_**
28+
2729
```elixir
2830
def start(init_arg, opts) do
2931
GenServer.start(__MODULE__, init_arg, opts)
@@ -37,6 +39,7 @@ end
3739
Then we are providing the implementation of `init/1` callback:
3840

3941
**_`lib/videoroom/room.ex`_**
42+
4043
```elixir
4144
@impl true
4245
def init(room_id) do
@@ -166,7 +169,6 @@ def handle_info(%Message.PeerLeft{peer: peer}, state) do
166169
Membrane.Logger.info("Peer #{inspect(peer.id)} left RTC Engine")
167170
{:noreply, state}
168171
end
169-
170172
```
171173

172174
In case RTC Engine wants to communicate with the client during the [signaling](../glossary/glossary.md#signaling) process, we know how to react - we are simply passing the message to the appropriate `PeerChannel`.

0 commit comments

Comments
 (0)