@@ -4,21 +4,21 @@ defmodule Membrane.TemplateEndpoint do
44 """
55 use Membrane.Endpoint
66
7- # def_input_pad :input,
8- # accepted_format: _any,
7+ def_input_pad :input ,
8+ accepted_format: _any ,
9+ flow_control: :auto # | :manual | :push,
910 # availability: :on_request | :always,
1011 # max_instances: positive integer,
11- # flow_control: :manual | :auto | :push,
1212 # demand_unit: :buffers | :bytes,
1313 # options: [
1414 # Same structure as in def_options/1
1515 # ]
1616
17- # def_output_pad :output,
18- # accepted_format: _any,
17+ def_output_pad :output ,
18+ accepted_format: _any ,
19+ flow_control: :auto # | :manual | :push,
1920 # availability: :on_request | :always,
2021 # max_instances: positive integer,
21- # flow_control: :manual | :auto | :push,
2222 # demand_unit: :buffers | :bytes,
2323 # options: [
2424 # Same structure as in def_options/1
@@ -56,14 +56,19 @@ defmodule Membrane.TemplateEndpoint do
5656 # ...
5757 # end
5858
59+ @ impl true
60+ def handle_buffer ( _pad , buffer , _ctx , state ) do
61+ { [ forward: buffer ] , state }
62+ end
63+
5964 # ----------------------------------------------
6065 # --- CALLBACKS WITH DEFAULT IMPLEMENTATIONS ---
6166 # ----------------------------------------------
6267
6368 # Note: by default this callback will return with state set to an empty map %{},
6469 # however we recommend using a dedicated State struct.
6570 @ impl true
66- def handle_init ( _ctx , opts ) do
71+ def handle_init ( _ctx , _opts ) do
6772 { [ ] , % State { } }
6873 end
6974
0 commit comments