From f0d29226b2612a4d4c59cfd5a3808ba96fa7652d Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Mon, 6 Nov 2023 16:40:13 +0100 Subject: [PATCH 1/4] Add info about change in default flow control value --- guides/upgrading/v1.0.0.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/guides/upgrading/v1.0.0.md b/guides/upgrading/v1.0.0.md index 6d484d4a8..ba00235aa 100644 --- a/guides/upgrading/v1.0.0.md +++ b/guides/upgrading/v1.0.0.md @@ -51,6 +51,24 @@ end end ``` +### Adjust to change in default `flow_control` (aka. `mode`/`demand_mode`) value. + +Now, if definition of pad in element does specify type of + +Now, the default value of `flow_control` option in `def_input_pad` and `def_output_pad` in Elements is `:auto`. Until `v0.12.9`, pads that sepcified neither `flow_control`, `mode` nor `demand_mode` explicitly would have `:manual` `flow_control`. Therefore, `:manual` pads that haven't specified `flow_control` value, now have to do it explicitly. + +```diff +- def_input_pad :input, accepted_format: %MyStruct{field: :value} ++ def_input_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :manual +``` + +Moreover, you can remove `flow_control: :auto` from the pad definitions, if you want to. + +```diff +- def_input_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :auto ++ def_input_pad :input, accepted_format: %MyStruct{field: :value} +``` + ### Change `mode` and `demand_mode` options to `flow_control` in pads' definitions in elements For input pads, change: From 774e62e34b04a5e13983c4a963f67779ce088c9b Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Mon, 6 Nov 2023 17:16:18 +0100 Subject: [PATCH 2/4] fix bug in diff --- guides/upgrading/v1.0.0.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guides/upgrading/v1.0.0.md b/guides/upgrading/v1.0.0.md index ba00235aa..47b32313c 100644 --- a/guides/upgrading/v1.0.0.md +++ b/guides/upgrading/v1.0.0.md @@ -58,8 +58,13 @@ Now, if definition of pad in element does specify type of Now, the default value of `flow_control` option in `def_input_pad` and `def_output_pad` in Elements is `:auto`. Until `v0.12.9`, pads that sepcified neither `flow_control`, `mode` nor `demand_mode` explicitly would have `:manual` `flow_control`. Therefore, `:manual` pads that haven't specified `flow_control` value, now have to do it explicitly. ```diff -- def_input_pad :input, accepted_format: %MyStruct{field: :value} -+ def_input_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :manual +- def_output_pad :input, accepted_format: %MyStruct{field: :value} ++ def_output_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :manual +``` + +```diff +- def_input_pad :input, accepted_format: %MyStruct{field: :value}, demand_unit: :buffers ++ def_input_pad :input, accepted_format: %MyStruct{field: :value}, demand_unit: :buffers, flow_control: :manual ``` Moreover, you can remove `flow_control: :auto` from the pad definitions, if you want to. From c01a1910d532c0585be12ff19e568c4522df069e Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Tue, 7 Nov 2023 11:26:28 +0100 Subject: [PATCH 3/4] Swap paragraphs --- guides/upgrading/v1.0.0.md | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/guides/upgrading/v1.0.0.md b/guides/upgrading/v1.0.0.md index 47b32313c..a8ec92c13 100644 --- a/guides/upgrading/v1.0.0.md +++ b/guides/upgrading/v1.0.0.md @@ -51,29 +51,6 @@ end end ``` -### Adjust to change in default `flow_control` (aka. `mode`/`demand_mode`) value. - -Now, if definition of pad in element does specify type of - -Now, the default value of `flow_control` option in `def_input_pad` and `def_output_pad` in Elements is `:auto`. Until `v0.12.9`, pads that sepcified neither `flow_control`, `mode` nor `demand_mode` explicitly would have `:manual` `flow_control`. Therefore, `:manual` pads that haven't specified `flow_control` value, now have to do it explicitly. - -```diff -- def_output_pad :input, accepted_format: %MyStruct{field: :value} -+ def_output_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :manual -``` - -```diff -- def_input_pad :input, accepted_format: %MyStruct{field: :value}, demand_unit: :buffers -+ def_input_pad :input, accepted_format: %MyStruct{field: :value}, demand_unit: :buffers, flow_control: :manual -``` - -Moreover, you can remove `flow_control: :auto` from the pad definitions, if you want to. - -```diff -- def_input_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :auto -+ def_input_pad :input, accepted_format: %MyStruct{field: :value} -``` - ### Change `mode` and `demand_mode` options to `flow_control` in pads' definitions in elements For input pads, change: @@ -113,6 +90,29 @@ use Membrane.Filter Check `t:Membrane.Pad.element_spec/0` for details. +### Adjust to change in default `flow_control` (aka. `mode`/`demand_mode`) value. + +Now, if definition of pad in element does specify type of + +Now, the default value of `flow_control` option in `def_input_pad` and `def_output_pad` in Elements is `:auto`. Until `v0.12.9`, pads that sepcified neither `flow_control`, `mode` nor `demand_mode` explicitly would have `:manual` `flow_control`. Therefore, `:manual` pads that haven't specified `flow_control` value, now have to do it explicitly. + +```diff +- def_output_pad :input, accepted_format: %MyStruct{field: :value} ++ def_output_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :manual +``` + +```diff +- def_input_pad :input, accepted_format: %MyStruct{field: :value}, demand_unit: :buffers ++ def_input_pad :input, accepted_format: %MyStruct{field: :value}, demand_unit: :buffers, flow_control: :manual +``` + +Moreover, you can remove `flow_control: :auto` from the pad definitions, if you want to. + +```diff +- def_input_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :auto ++ def_input_pad :input, accepted_format: %MyStruct{field: :value} +``` + ### Remove `mode` and `demand_unit` from pads definitions in bins ```diff From 91be1f53e5ff091c8cc7a7705faedd0a9e5b8d41 Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Tue, 7 Nov 2023 14:32:35 +0100 Subject: [PATCH 4/4] Fix typos --- guides/upgrading/v1.0.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/upgrading/v1.0.0.md b/guides/upgrading/v1.0.0.md index a8ec92c13..e99510ad8 100644 --- a/guides/upgrading/v1.0.0.md +++ b/guides/upgrading/v1.0.0.md @@ -97,8 +97,8 @@ Now, if definition of pad in element does specify type of Now, the default value of `flow_control` option in `def_input_pad` and `def_output_pad` in Elements is `:auto`. Until `v0.12.9`, pads that sepcified neither `flow_control`, `mode` nor `demand_mode` explicitly would have `:manual` `flow_control`. Therefore, `:manual` pads that haven't specified `flow_control` value, now have to do it explicitly. ```diff -- def_output_pad :input, accepted_format: %MyStruct{field: :value} -+ def_output_pad :input, accepted_format: %MyStruct{field: :value}, flow_control: :manual +- def_output_pad :output, accepted_format: %MyStruct{field: :value} ++ def_output_pad :output, accepted_format: %MyStruct{field: :value}, flow_control: :manual ``` ```diff