From 775fdecf914603099b3ed4c3f079115294290722 Mon Sep 17 00:00:00 2001 From: varsill Date: Wed, 4 May 2022 10:35:43 +0200 Subject: [PATCH 1/7] bump to 0.12.0 --- mix.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.exs b/mix.exs index 64520879..2d8b4177 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Membrane.RTP.Plugin.MixProject do use Mix.Project - @version "0.11.0" + @version "0.12.0" @github_url "https://github.com/membraneframework/membrane_rtp_plugin" def project do @@ -67,7 +67,7 @@ defmodule Membrane.RTP.Plugin.MixProject do defp deps do [ - {:membrane_core, "~> 0.9.0"}, + {:membrane_core, "~> 0.10.0"}, {:membrane_rtp_format, "~> 0.3.1"}, {:ex_libsrtp, "~> 0.3.0", optional: true}, {:qex, "~> 0.5.1"}, From ec34d05602015843a09718927201f72d18120e4a Mon Sep 17 00:00:00 2001 From: varsill Date: Wed, 4 May 2022 10:35:43 +0200 Subject: [PATCH 2/7] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f8b0a60..199988b5 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtp_plugin` to your list of dep ```elixir def deps do [ - {:membrane_rtp_plugin, "~> 0.11.0"} + {:membrane_rtp_plugin, "~> 0.12.0"} {:ex_libsrtp, "~> 0.3.0"} # required only if SRTP/SRTCP support is needed ] end From 0282ce9e47f08d037fc571e4f1fbb97a95383198 Mon Sep 17 00:00:00 2001 From: varsill Date: Thu, 5 May 2022 09:41:27 +0200 Subject: [PATCH 3/7] Remove usage of deprecated functions. Update the dependencies so that they use sources which send caps. Repair tests --- lib/membrane/rtcp/parser.ex | 6 ++++ mix.exs | 10 +++---- mix.lock | 28 +++++++++---------- .../rtp/jitter_buffer/pipeline_test.exs | 5 ++-- test/membrane/rtp/parser_test.exs | 4 +-- test/membrane/rtp/pipeline_test.exs | 4 +-- test/membrane/rtp/session_bin_test.exs | 10 +++++-- test/membrane/rtp/stream_receive_bin_test.exs | 8 ++---- test/membrane/rtp/stream_send_bin_test.exs | 14 +++------- 9 files changed, 42 insertions(+), 47 deletions(-) diff --git a/lib/membrane/rtcp/parser.ex b/lib/membrane/rtcp/parser.ex index d55c7c68..7f2a34db 100644 --- a/lib/membrane/rtcp/parser.ex +++ b/lib/membrane/rtcp/parser.ex @@ -22,6 +22,12 @@ defmodule Membrane.RTCP.Parser do {:ok, %{}} end + @impl true + def handle_prepared_to_playing(_ctx, state) do + # NOT SURE IF THIS IS A CORRECT SOLUTION + {{:ok, caps: {:rtcp_output, %RTCP{}}}, state} + end + @impl true def handle_caps(:input, _caps, _ctx, state) do {{:ok, caps: {:output, %RTCP{}}}, state} diff --git a/mix.exs b/mix.exs index 2d8b4177..a82883f5 100644 --- a/mix.exs +++ b/mix.exs @@ -76,12 +76,12 @@ defmodule Membrane.RTP.Plugin.MixProject do {:bimap, "~> 1.1.0"}, # Test - {:membrane_rtp_h264_plugin, "~> 0.9", only: :test}, - {:membrane_rtp_mpegaudio_plugin, "~> 0.8", only: :test}, - {:membrane_h264_ffmpeg_plugin, "~> 0.18", only: :test}, + {:membrane_rtp_h264_plugin, "~> 0.11", only: :test}, + {:membrane_rtp_mpegaudio_plugin, "~> 0.9", only: :test}, + {:membrane_h264_ffmpeg_plugin, "~> 0.19", only: :test}, {:membrane_pcap_plugin, - github: "membraneframework/membrane_pcap_plugin", tag: "v0.5.0", only: :test}, - {:membrane_hackney_plugin, "~> 0.7", only: :test}, + github: "membraneframework/membrane_pcap_plugin", tag: "v0.6.1", only: :test}, + {:membrane_hackney_plugin, "~> 0.8.1", only: :test}, # Dev {:ex_doc, "~> 0.21", only: :dev, runtime: false}, diff --git a/mix.lock b/mix.lock index bf418303..4c880d79 100644 --- a/mix.lock +++ b/mix.lock @@ -1,16 +1,16 @@ %{ "bimap": {:hex, :bimap, "1.1.1", "783a5f31423ffd608040985de1fc9bc17bd73c813fe79f3b3576ff574ad81d1c", [:mix], [], "hexpm", "861b630d470934ad4c5063ed795f865409473c41d80d9b897ae07f11049045ab"}, - "bunch": {:hex, :bunch, "1.3.0", "51b4423088b7fb9e21eae6d6bc5e5d219d955ea5556fbd6130bfb6213df4be32", [:mix], [], "hexpm", "9ad233a2bacc0dae8aa6553a9b9057f27446443b1c5903c3479b6f9f3820ce2d"}, + "bunch": {:hex, :bunch, "1.3.1", "f8fe80042f9eb474ef2801ae2c9372f9b13d11e7053265dcfc24b9d912e3750b", [:mix], [], "hexpm", "00e21b16ff9bb698b728a01a2fc4b3bf7fc0e87c4bb9c6e4a442324aa8c5e567"}, "bunch_native": {:hex, :bunch_native, "0.4.0", "9214f73b753c7c4201fc0a1145d9720a15e45effa02d9eea8237d98ae53b36e5", [:mix], [{:bundlex, "~> 0.5.0", [hex: :bundlex, repo: "hexpm", optional: false]}], "hexpm", "4bf7e84250614994383870092e883bc8b7e213c3854506b1a03493bd9a6a1ba2"}, "bundlex": {:hex, :bundlex, "0.5.1", "a164ba822102476db7a11db8bb7e8adca0630bdff448e00e5ba1138e3df27839", [:mix], [{:bunch, "~> 1.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.5", [hex: :qex, repo: "hexpm", optional: false]}, {:secure_random, "~> 0.5", [hex: :secure_random, repo: "hexpm", optional: false]}], "hexpm", "b3348db967dfa880c9e3d311af7e366ab515202429264334baeeaef04fa7a4e2"}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, - "credo": {:hex, :credo, "1.6.3", "0a9f8925dbc8f940031b789f4623fc9a0eea99d3eed600fe831e403eb96c6a83", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1167cde00e6661d740fc54da2ee268e35d3982f027399b64d3e2e83af57a1180"}, + "credo": {:hex, :credo, "1.6.4", "ddd474afb6e8c240313f3a7b0d025cc3213f0d171879429bf8535d7021d9ad78", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c28f910b61e1ff829bffa056ef7293a8db50e87f2c57a9b5c3f57eee124536b7"}, "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.20", "89970db71b11b6b89759ce16807e857df154f8df3e807b2920a8c39834a9e5cf", [:mix], [], "hexpm", "1eb0d2dabeeeff200e0d17dc3048a6045aab271f73ebb82e416464832eb57bdd"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.25", "2024618731c55ebfcc5439d756852ec4e85978a39d0d58593763924d9a15916f", [:mix], [], "hexpm", "56749c5e1c59447f7b7a23ddb235e4b3defe276afc220a6227237f3efe83f51e"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.28.2", "e031c7d1a9fc40959da7bf89e2dc269ddc5de631f9bd0e326cbddf7d8085a9da", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "51ee866993ffbd0e41c084a7677c570d0fc50cb85c6b5e76f8d936d9587fa719"}, + "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, "ex_libsrtp": {:hex, :ex_libsrtp, "0.3.0", "964cf207fc44357b9ef103ade78e99004de70df8ee44bf1c8f6a18051d0d3667", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:unifex, "~> 0.7.0", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "62c2c40f6481ee670c864d26aa6496ad851c9b694bbd5367111bc93f3be2e44a"}, "ex_pcap": {:git, "https://github.com/membraneframework/expcap.git", "07c5bfa25280ea6a28d022d3a206ececf9b9913a", []}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, @@ -19,23 +19,23 @@ "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.15.2", "dc72dfe17eb240552857465cc00cce390960d9a0c055c4ccd38b70629227e97c", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "fd23ae48d09b32eff49d4ced2b43c9f086d402ee4fd4fcb2d7fad97fa8823e75"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, "membrane_caps_audio_mpeg": {:hex, :membrane_caps_audio_mpeg, "0.2.0", "9cf9a63f03e25b31cf31445325aa68e60a07d36ee1e759caa1422fa45df49367", [:mix], [], "hexpm", "f7a80e4841d46164c148be880932ac7425329f4bcc32eb36ad2e47eafe5f23e4"}, - "membrane_common_c": {:hex, :membrane_common_c, "0.11.0", "1706631a80b065725bddb34cf182e17af04aa1a753efc47a0043fa20715ac57b", [:mix], [{:membrane_core, "~> 0.9.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:shmex, "~> 0.4.0", [hex: :shmex, repo: "hexpm", optional: false]}, {:unifex, "~> 0.7.0", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "2c0f5a21116466bfa3242fe00aea56097c6336029d1d7558e6bd1dd2c02b4b09"}, - "membrane_core": {:hex, :membrane_core, "0.9.0", "91a79636c6b2fcc6ae2e611670cdca33a0b38ff4dabe8fb7c1d56cba426db787", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 2.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ab252e7aa944d23fbb22ce0e8bc75b088cfe3ed1c2c7ba203b1cc2fd794a85ed"}, - "membrane_h264_ffmpeg_plugin": {:hex, :membrane_h264_ffmpeg_plugin, "0.18.0", "1dd71fb26911974710fb76489796ebb39b913f2d49aa5195a3a0abd2e6019af4", [:mix], [{:bunch, "~> 1.3.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_common_c, "~> 0.11.0", [hex: :membrane_common_c, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.9.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_raw_video_format, "~> 0.2.0", [hex: :membrane_raw_video_format, repo: "hexpm", optional: false]}, {:ratio, "~> 2.4.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:unifex, "~> 0.7.2", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "6e2eb920288e88a8070141e00f80675c06dec2ef52205c1ec3a8a0e50f11ea60"}, + "membrane_common_c": {:hex, :membrane_common_c, "0.12.0", "5b84c6367340b3de3705daaa7f16fbb6dfb9ff9af258f749cea9441724be06ca", [:mix], [{:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:shmex, "~> 0.4.0", [hex: :shmex, repo: "hexpm", optional: false]}, {:unifex, "~> 0.7.0", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "c1b35267641b86f4cc3adc709d90e037db34a2127a44538ba197d79453bcf2c0"}, + "membrane_core": {:hex, :membrane_core, "0.10.0", "1d010bc632f6abb575c60e37607a0cb56fbf88bbb9d0d78a4b5410611563239a", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 2.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "64d63514aabf71c93136ee86093b7ca60cf4317a09b137e0c08e064caa34636f"}, + "membrane_h264_ffmpeg_plugin": {:hex, :membrane_h264_ffmpeg_plugin, "0.19.0", "40f0cb032cce614b1284b196995c15486a8572411ae402b455f9788a53745395", [:mix], [{:bunch, "~> 1.3.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_common_c, "~> 0.12.0", [hex: :membrane_common_c, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_raw_video_format, "~> 0.2.0", [hex: :membrane_raw_video_format, repo: "hexpm", optional: false]}, {:ratio, "~> 2.4.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:unifex, "~> 0.7.2", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "bd796aaf690b431b2cd5b838c36e928133db7f28a81e5cc6f556b53bb558f5f3"}, "membrane_h264_format": {:hex, :membrane_h264_format, "0.3.0", "84426aac86c3f4d3e8110438c3514ad94aa528e7002650d40e3b3862e2af5e3e", [:mix], [], "hexpm", "8254e52cea3c5d7c078c960a32f1ba338eeae9e301515302fd293f1683fa8dd9"}, - "membrane_hackney_plugin": {:hex, :membrane_hackney_plugin, "0.7.0", "fbeb449addf3e9df1d7eb44db0f0509ca81d0fa13ea563afb5441a0b4fa472d0", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.9.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:mockery, "~> 2.3", [hex: :mockery, repo: "hexpm", optional: false]}], "hexpm", "2c973b46895b50f0136adeb60f31b4da01357dd67798ff66eead488f9fe81390"}, - "membrane_pcap_plugin": {:git, "https://github.com/membraneframework/membrane_pcap_plugin.git", "5be29fe0a609914eb8190c4dffff48e5c6e35437", [tag: "v0.5.0"]}, + "membrane_hackney_plugin": {:hex, :membrane_hackney_plugin, "0.8.1", "261bc12475a09d55b0e31ccfbbac15c4a0a37423a8bd8eded233f9b96d0f4bd5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:mockery, "~> 2.3", [hex: :mockery, repo: "hexpm", optional: false]}], "hexpm", "21f7d23401bd5dd0e2c97e615857df4bf058f3a44aa5189fc5cef64d48e1236c"}, + "membrane_pcap_plugin": {:git, "https://github.com/membraneframework/membrane_pcap_plugin.git", "2bab35e62ac87e5a2c5d514dfb0b51de12a3ed96", [tag: "v0.6.1"]}, "membrane_raw_video_format": {:hex, :membrane_raw_video_format, "0.2.0", "cda8eb207cf65c93690a19001aba3edbb2ba5d22abc8068a1f6a785ba871e8cf", [:mix], [], "hexpm", "6b716fc24f60834323637c95aaaa0f99be23fcc6a84a21af70195ef50185b634"}, "membrane_rtp_format": {:hex, :membrane_rtp_format, "0.3.1", "c6920fdb58660d90e264fcf3587dbb5994fb2f3643d234e59608c82598baebaf", [:mix], [], "hexpm", "d225f453715d165ded7dcb287c45360a4d653ac4a6d3ff70b4acdd244c45fa84"}, - "membrane_rtp_h264_plugin": {:hex, :membrane_rtp_h264_plugin, "0.9.0", "42f18f2d558176cc009099d7af1daaf0a9ebb73806e3980cc9baa069a3105b03", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.9.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.3.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "2fb3af1328f8656b0cb887ea6633adadbbc74c76eec6ab26b827d0a20e12eab8"}, - "membrane_rtp_mpegaudio_plugin": {:hex, :membrane_rtp_mpegaudio_plugin, "0.8.0", "8909d8a3a5ec3abad4f967007c047cf4b5b57b6f741381c80e7cc55d308f7c4d", [:mix], [{:membrane_caps_audio_mpeg, "~> 0.2.0", [hex: :membrane_caps_audio_mpeg, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.9.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.3.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "eaf451f7b65652c2b89a0ab21d46067bdaffe65423ecc11cc0949fb71d8f709e"}, + "membrane_rtp_h264_plugin": {:hex, :membrane_rtp_h264_plugin, "0.11.0", "c376acc3dc7af59d5ecfb80539f260ebe78811928105ce7afd5cf61d111696ae", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.3.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "fe4c932fe8d8ef58ce26367bc09dee9f3a0f56093f27d97c1f031623c228248a"}, + "membrane_rtp_mpegaudio_plugin": {:hex, :membrane_rtp_mpegaudio_plugin, "0.9.0", "d0361c734b8dbba9591c1fa1a284cb1e786b2661ed307c79cf7046a1dff45cd8", [:mix], [{:membrane_caps_audio_mpeg, "~> 0.2.0", [hex: :membrane_caps_audio_mpeg, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.3.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "c6bea645c26e2d4774448f648fc11af8e2d5b4a6979a00f5c3db889ec4d3f5e2"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "mockery": {:hex, :mockery, "2.3.1", "a02fd60b10ac9ed37a7a2ecf6786c1f1dd5c75d2b079a60594b089fba32dc087", [:mix], [], "hexpm", "1d0971d88ebf084e962da3f2cfee16f0ea8e04ff73a7710428500d4500b947fa"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.2", "b99ca56bbce410e9d5ee4f9155a212e942e224e259c7ebbf8f2c86ac21d4fa3c", [:mix], [], "hexpm", "98d51bd64d5f6a2a9c6bb7586ee8129e27dfaab1140b5a4753f24dac0ba27d2f"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, "numbers": {:hex, :numbers, "5.2.4", "f123d5bb7f6acc366f8f445e10a32bd403c8469bdbce8ce049e1f0972b607080", [:mix], [{:coerce, "~> 1.0", [hex: :coerce, repo: "hexpm", optional: false]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "eeccf5c61d5f4922198395bf87a465b6f980b8b862dd22d28198c5e6fab38582"}, "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, "pkt": {:hex, :pkt, "0.5.0", "6dc345565dd7e8d80e56c1198e1ee07344f191782d9f1e66eca50b40c98b1720", [:rebar3], [], "hexpm", "c285cd1e5fb850d09f7fd98e1c9e291d1348ab41e4171c78fa99d04e04d84fb2"}, @@ -44,7 +44,7 @@ "secure_random": {:hex, :secure_random, "0.5.1", "c5532b37c89d175c328f5196a0c2a5680b15ebce3e654da37129a9fe40ebf51b", [:mix], [], "hexpm", "1b9754f15e3940a143baafd19da12293f100044df69ea12db5d72878312ae6ab"}, "shmex": {:hex, :shmex, "0.4.0", "8a074a984bbd45808d80eddfa0f037d7dfb4d4046e6566cd40adf41e13decf74", [:mix], [{:bunch_native, "~> 0.4.0", [hex: :bunch_native, repo: "hexpm", optional: false]}, {:bundlex, "~> 0.5.0", [hex: :bundlex, repo: "hexpm", optional: false]}], "hexpm", "1018c4eca1db5352ed4dec4813e1ee212b98fc851e1edd302906892538bbfaa8"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, - "telemetry": {:hex, :telemetry, "1.0.0", "0f453a102cdf13d506b7c0ab158324c337c41f1cc7548f0bc0e130bbf0ae9452", [:rebar3], [], "hexpm", "73bc09fa59b4a0284efb4624335583c528e07ec9ae76aca96ea0673850aec57a"}, + "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "unifex": {:hex, :unifex, "0.7.3", "6a6948e7f07766a76624621698c546bbf9fb5acd7fc5770eba650f220288f80d", [:mix], [{:bunch, "~> 1.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:bundlex, "~> 0.5.0", [hex: :bundlex, repo: "hexpm", optional: false]}, {:shmex, "~> 0.4.0", [hex: :shmex, repo: "hexpm", optional: false]}], "hexpm", "a6467834eae67b03e0ebc358bdc95c29dc034597c53c5afde4c88e3832f04fcc"}, } diff --git a/test/membrane/rtp/jitter_buffer/pipeline_test.exs b/test/membrane/rtp/jitter_buffer/pipeline_test.exs index 06392029..e96883aa 100644 --- a/test/membrane/rtp/jitter_buffer/pipeline_test.exs +++ b/test/membrane/rtp/jitter_buffer/pipeline_test.exs @@ -49,7 +49,7 @@ defmodule Membrane.RTP.JitterBuffer.PipelineTest do end end) - {:ok, state} + {{:ok, caps: {:output, %Membrane.RTP{}}}, state} end @impl true @@ -105,7 +105,6 @@ defmodule Membrane.RTP.JitterBuffer.PipelineTest do links: links }) - Membrane.Pipeline.play(pipeline) assert_pipeline_playback_changed(pipeline, _, :prepared) assert_pipeline_playback_changed(pipeline, _, :playing) @@ -136,6 +135,6 @@ defmodule Membrane.RTP.JitterBuffer.PipelineTest do end end) - Membrane.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Membrane.Pipeline.terminate(pipeline, blocking?: true) end end diff --git a/test/membrane/rtp/parser_test.exs b/test/membrane/rtp/parser_test.exs index 7f7fcba5..585925b6 100644 --- a/test/membrane/rtp/parser_test.exs +++ b/test/membrane/rtp/parser_test.exs @@ -60,13 +60,11 @@ defmodule Membrane.RTP.ParserTest do ] }) - Pipeline.play(pipeline) - Enum.each(test_data_base, fn _test_data -> assert_sink_buffer(pipeline, :sink, %Buffer{}, @buffer_receive_timeout) end) - Pipeline.stop_and_terminate(pipeline, blocking?: true) + Pipeline.terminate(pipeline, blocking?: true) end end end diff --git a/test/membrane/rtp/pipeline_test.exs b/test/membrane/rtp/pipeline_test.exs index 139b2ed5..0722c02b 100644 --- a/test/membrane/rtp/pipeline_test.exs +++ b/test/membrane/rtp/pipeline_test.exs @@ -28,12 +28,10 @@ defmodule Membrane.RTP.PipelineTest do ] }) - Pipeline.play(pipeline) - Enum.each(test_data_base, fn _test_data -> assert_sink_buffer(pipeline, :sink, %Buffer{}, @buffer_receive_timeout) end) - Pipeline.stop_and_terminate(pipeline, blocking?: true) + Pipeline.terminate(pipeline, blocking?: true) end end diff --git a/test/membrane/rtp/session_bin_test.exs b/test/membrane/rtp/session_bin_test.exs index 6e22a4eb..5b080436 100644 --- a/test/membrane/rtp/session_bin_test.exs +++ b/test/membrane/rtp/session_bin_test.exs @@ -65,6 +65,11 @@ defmodule Membrane.RTP.Session.BinTest do {:ok, Map.from_struct(opts) |> Map.merge(%{cnt: 0})} end + @impl true + def handle_prepared_to_playing(_ctx, state) do + {{:ok, caps: {:output, %Membrane.RemoteStream{type: :packetized}}}, state} + end + @impl true def handle_demand(:output, size, :buffers, _ctx, %{pause_after: [pause | _]} = state) do {{:ok, demand: {:input, min(size, pause - state.cnt)}}, state} @@ -166,7 +171,7 @@ defmodule Membrane.RTP.Session.BinTest do ] } - {{:ok, spec: spec}, + {{:ok, spec: spec, playback: :playing}, %{fmt_mapping: options.fmt_mapping, payload_and_depayload: options.payload_and_depayload}} end @@ -270,7 +275,6 @@ defmodule Membrane.RTP.Session.BinTest do } |> Testing.Pipeline.start_link() - Testing.Pipeline.play(pipeline) assert_pipeline_playback_changed(pipeline, _, :playing) %{audio: %{ssrc: audio_ssrc}, video: %{ssrc: video_ssrc}} = input @@ -314,7 +318,7 @@ defmodule Membrane.RTP.Session.BinTest do end) assert_end_of_stream(pipeline, {:sink, ^video_ssrc}) - Testing.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Testing.Pipeline.terminate(pipeline, blocking?: true) assert_pipeline_playback_changed(pipeline, _, :stopped) end end diff --git a/test/membrane/rtp/stream_receive_bin_test.exs b/test/membrane/rtp/stream_receive_bin_test.exs index 0f019eba..659c48c4 100644 --- a/test/membrane/rtp/stream_receive_bin_test.exs +++ b/test/membrane/rtp/stream_receive_bin_test.exs @@ -54,8 +54,6 @@ defmodule Membrane.RTP.StreamReceiveBinTest do {:ok, pipeline} = Testing.Pipeline.start_link(opts) - Testing.Pipeline.play(pipeline) - assert_pipeline_playback_changed(pipeline, _, :playing) assert_start_of_stream(pipeline, :rtp_parser) assert_start_of_stream(pipeline, :frame_counter) @@ -64,7 +62,7 @@ defmodule Membrane.RTP.StreamReceiveBinTest do assert_pipeline_notified(pipeline, :frame_counter, {:frame_count, count}) assert count == @frames_count - Testing.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Testing.Pipeline.terminate(pipeline, blocking?: true) end test "RTCP reports are generated properly" do @@ -97,13 +95,11 @@ defmodule Membrane.RTP.StreamReceiveBinTest do {:ok, pipeline} = Testing.Pipeline.start_link(opts) - Testing.Pipeline.play(pipeline) - assert_pipeline_playback_changed(pipeline, _, :playing) assert_start_of_stream(pipeline, :rtp_parser) assert_start_of_stream(pipeline, :sink) assert_end_of_stream(pipeline, :rtp_parser, :input, 4000) assert_end_of_stream(pipeline, :sink) - Testing.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Testing.Pipeline.terminate(pipeline, blocking?: true) end end diff --git a/test/membrane/rtp/stream_send_bin_test.exs b/test/membrane/rtp/stream_send_bin_test.exs index 070577d8..f19f7fdd 100644 --- a/test/membrane/rtp/stream_send_bin_test.exs +++ b/test/membrane/rtp/stream_send_bin_test.exs @@ -119,7 +119,7 @@ defmodule Membrane.RTP.StreamSendBinTest do ] } - {{:ok, spec: spec}, %{}} + {{:ok, spec: spec, playback: :playing}, %{}} end end @@ -136,8 +136,6 @@ defmodule Membrane.RTP.StreamSendBinTest do {:ok, pipeline} = Testing.Pipeline.start_link(opts) - Testing.Pipeline.play(pipeline) - assert_pipeline_playback_changed(pipeline, _, :playing) assert_start_of_stream(pipeline, :rtp_sink) @@ -152,7 +150,7 @@ defmodule Membrane.RTP.StreamSendBinTest do } } = packet - Testing.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Testing.Pipeline.terminate(pipeline, blocking?: true) end test "Depayloaded RTP stream gets payloaded and passed through bin's output properly" do @@ -167,14 +165,12 @@ defmodule Membrane.RTP.StreamSendBinTest do {:ok, pipeline} = Testing.Pipeline.start_link(opts) - Testing.Pipeline.play(pipeline) - assert_pipeline_playback_changed(pipeline, _, :playing) assert_start_of_stream(pipeline, :rtp_sink) assert_end_of_stream(pipeline, :rtp_sink, :input, 4000) - Testing.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Testing.Pipeline.terminate(pipeline, blocking?: true) end test "Payloaded RTP stream passes through bin's output properly" do @@ -189,8 +185,6 @@ defmodule Membrane.RTP.StreamSendBinTest do {:ok, pipeline} = Testing.Pipeline.start_link(opts) - Testing.Pipeline.play(pipeline) - assert_pipeline_playback_changed(pipeline, _, :playing) assert_start_of_stream(pipeline, :rtp_sink) @@ -200,6 +194,6 @@ defmodule Membrane.RTP.StreamSendBinTest do assert_end_of_stream(pipeline, :rtp_sink, :input) - Testing.Pipeline.stop_and_terminate(pipeline, blocking?: true) + Testing.Pipeline.terminate(pipeline, blocking?: true) end end From 89b90ede0adb2395921ef7d4e74949dc9d920869 Mon Sep 17 00:00:00 2001 From: varsill Date: Thu, 5 May 2022 10:56:55 +0200 Subject: [PATCH 4/7] Update dependency to the rtp_format. Rename RTCP parser pads. Add proper caps specification and caps sending in RTCP parser. Update tests --- lib/membrane/rtcp/parser.ex | 7 +++---- lib/membrane/rtp/session_bin.ex | 2 +- mix.exs | 2 +- mix.lock | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/membrane/rtcp/parser.ex b/lib/membrane/rtcp/parser.ex index 7f2a34db..15ccd3b6 100644 --- a/lib/membrane/rtcp/parser.ex +++ b/lib/membrane/rtcp/parser.ex @@ -15,7 +15,7 @@ defmodule Membrane.RTCP.Parser do demand_mode: :auto def_output_pad :output, caps: RTCP, demand_mode: :auto - def_output_pad :rtcp_output, mode: :push, caps: :any + def_output_pad :receiver_report_output, mode: :push, caps: {RemoteStream, type: :packetized, content_format: one_of([nil, RTCP])} @impl true def handle_init(_opts) do @@ -24,8 +24,7 @@ defmodule Membrane.RTCP.Parser do @impl true def handle_prepared_to_playing(_ctx, state) do - # NOT SURE IF THIS IS A CORRECT SOLUTION - {{:ok, caps: {:rtcp_output, %RTCP{}}}, state} + {{:ok, caps: {:receiver_report_output, %RemoteStream{type: :packetized, content_format: RTCP}}}, state} end @impl true @@ -56,7 +55,7 @@ defmodule Membrane.RTCP.Parser do @impl true def handle_event(:output, %RTCPEvent{} = event, _ctx, state) do buffer = %Buffer{payload: RTCP.Packet.serialize(event.rtcp)} - {{:ok, buffer: {:rtcp_output, buffer}}, state} + {{:ok, buffer: {:receiver_report_output, buffer}}, state} end @impl true diff --git a/lib/membrane/rtp/session_bin.ex b/lib/membrane/rtp/session_bin.ex index b68fb255..01867ed7 100644 --- a/lib/membrane/rtp/session_bin.ex +++ b/lib/membrane/rtp/session_bin.ex @@ -362,7 +362,7 @@ defmodule Membrane.RTP.SessionBin do |> via_out(:rtcp_output) |> then(if secure?, do: maybe_link_srtcp_decryptor, else: & &1) |> to({:rtcp_parser, ref}, RTCP.Parser) - |> via_out(:rtcp_output) + |> via_out(:receiver_report_output) |> then(if secure?, do: maybe_link_srtcp_encryptor, else: & &1) |> to_bin_output(rtcp_receiver_output), link({:rtcp_parser, ref}) diff --git a/mix.exs b/mix.exs index a82883f5..3b670236 100644 --- a/mix.exs +++ b/mix.exs @@ -68,7 +68,7 @@ defmodule Membrane.RTP.Plugin.MixProject do defp deps do [ {:membrane_core, "~> 0.10.0"}, - {:membrane_rtp_format, "~> 0.3.1"}, + {:membrane_rtp_format, "~> 0.4.0"}, {:ex_libsrtp, "~> 0.3.0", optional: true}, {:qex, "~> 0.5.1"}, {:bunch, "~> 1.0"}, diff --git a/mix.lock b/mix.lock index 4c880d79..28abb203 100644 --- a/mix.lock +++ b/mix.lock @@ -29,9 +29,9 @@ "membrane_hackney_plugin": {:hex, :membrane_hackney_plugin, "0.8.1", "261bc12475a09d55b0e31ccfbbac15c4a0a37423a8bd8eded233f9b96d0f4bd5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:mockery, "~> 2.3", [hex: :mockery, repo: "hexpm", optional: false]}], "hexpm", "21f7d23401bd5dd0e2c97e615857df4bf058f3a44aa5189fc5cef64d48e1236c"}, "membrane_pcap_plugin": {:git, "https://github.com/membraneframework/membrane_pcap_plugin.git", "2bab35e62ac87e5a2c5d514dfb0b51de12a3ed96", [tag: "v0.6.1"]}, "membrane_raw_video_format": {:hex, :membrane_raw_video_format, "0.2.0", "cda8eb207cf65c93690a19001aba3edbb2ba5d22abc8068a1f6a785ba871e8cf", [:mix], [], "hexpm", "6b716fc24f60834323637c95aaaa0f99be23fcc6a84a21af70195ef50185b634"}, - "membrane_rtp_format": {:hex, :membrane_rtp_format, "0.3.1", "c6920fdb58660d90e264fcf3587dbb5994fb2f3643d234e59608c82598baebaf", [:mix], [], "hexpm", "d225f453715d165ded7dcb287c45360a4d653ac4a6d3ff70b4acdd244c45fa84"}, - "membrane_rtp_h264_plugin": {:hex, :membrane_rtp_h264_plugin, "0.11.0", "c376acc3dc7af59d5ecfb80539f260ebe78811928105ce7afd5cf61d111696ae", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.3.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "fe4c932fe8d8ef58ce26367bc09dee9f3a0f56093f27d97c1f031623c228248a"}, - "membrane_rtp_mpegaudio_plugin": {:hex, :membrane_rtp_mpegaudio_plugin, "0.9.0", "d0361c734b8dbba9591c1fa1a284cb1e786b2661ed307c79cf7046a1dff45cd8", [:mix], [{:membrane_caps_audio_mpeg, "~> 0.2.0", [hex: :membrane_caps_audio_mpeg, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.3.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "c6bea645c26e2d4774448f648fc11af8e2d5b4a6979a00f5c3db889ec4d3f5e2"}, + "membrane_rtp_format": {:hex, :membrane_rtp_format, "0.4.0", "be84e88206c6a91363660eeb7cbf03330cd9a00486fb4bce4a7b86a4172d3a4b", [:mix], [{:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}], "hexpm", "44944956c1031f49269b7d447525b7c3d1026120b100b4f0dfaca5dc228c65e0"}, + "membrane_rtp_h264_plugin": {:hex, :membrane_rtp_h264_plugin, "0.12.0", "922955606a53424e85d5035204f3d33e4d84eee306a316642757d0d4c2a3b605", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.4.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "c886277bf228dfc9882ec0bef4237511b61fbb91aa8854304a67342a1392f5ef"}, + "membrane_rtp_mpegaudio_plugin": {:hex, :membrane_rtp_mpegaudio_plugin, "0.10.0", "cc97d183e246e86c75877a898db440df9ab917f92260643fcd071611fd0c420a", [:mix], [{:membrane_caps_audio_mpeg, "~> 0.2.0", [hex: :membrane_caps_audio_mpeg, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_rtp_format, "~> 0.4.0", [hex: :membrane_rtp_format, repo: "hexpm", optional: false]}], "hexpm", "3f832b5a514bbca149e88c0fa83d10bfd006d5f83af2a48336602288096c5bc3"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "mockery": {:hex, :mockery, "2.3.1", "a02fd60b10ac9ed37a7a2ecf6786c1f1dd5c75d2b079a60594b089fba32dc087", [:mix], [], "hexpm", "1d0971d88ebf084e962da3f2cfee16f0ea8e04ff73a7710428500d4500b947fa"}, From ca9e225e47397f506963bf1bad0cef72ad316a20 Mon Sep 17 00:00:00 2001 From: varsill Date: Thu, 5 May 2022 10:58:13 +0200 Subject: [PATCH 5/7] Improve formatting --- lib/membrane/rtcp/parser.ex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/membrane/rtcp/parser.ex b/lib/membrane/rtcp/parser.ex index 15ccd3b6..03b7d7f0 100644 --- a/lib/membrane/rtcp/parser.ex +++ b/lib/membrane/rtcp/parser.ex @@ -15,7 +15,10 @@ defmodule Membrane.RTCP.Parser do demand_mode: :auto def_output_pad :output, caps: RTCP, demand_mode: :auto - def_output_pad :receiver_report_output, mode: :push, caps: {RemoteStream, type: :packetized, content_format: one_of([nil, RTCP])} + + def_output_pad :receiver_report_output, + mode: :push, + caps: {RemoteStream, type: :packetized, content_format: one_of([nil, RTCP])} @impl true def handle_init(_opts) do @@ -24,7 +27,9 @@ defmodule Membrane.RTCP.Parser do @impl true def handle_prepared_to_playing(_ctx, state) do - {{:ok, caps: {:receiver_report_output, %RemoteStream{type: :packetized, content_format: RTCP}}}, state} + {{:ok, + caps: {:receiver_report_output, %RemoteStream{type: :packetized, content_format: RTCP}}}, + state} end @impl true From ace0c2bf62c3e20ccf2a1314bdaf9c954698a2b8 Mon Sep 17 00:00:00 2001 From: varsill Date: Thu, 5 May 2022 12:52:23 +0200 Subject: [PATCH 6/7] Update dependency to hackney. Set RTCP parser output caps to be RTCP. --- README.md | 2 +- lib/membrane/rtcp/parser.ex | 2 +- mix.exs | 2 +- mix.lock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 199988b5..b838d460 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtp_plugin` to your list of dep ```elixir def deps do [ - {:membrane_rtp_plugin, "~> 0.12.0"} + {:membrane_rtp_plugin, "~> 0.12.0"} {:ex_libsrtp, "~> 0.3.0"} # required only if SRTP/SRTCP support is needed ] end diff --git a/lib/membrane/rtcp/parser.ex b/lib/membrane/rtcp/parser.ex index 03b7d7f0..006f5e25 100644 --- a/lib/membrane/rtcp/parser.ex +++ b/lib/membrane/rtcp/parser.ex @@ -18,7 +18,7 @@ defmodule Membrane.RTCP.Parser do def_output_pad :receiver_report_output, mode: :push, - caps: {RemoteStream, type: :packetized, content_format: one_of([nil, RTCP])} + caps: {RemoteStream, type: :packetized, content_format: RTCP} @impl true def handle_init(_opts) do diff --git a/mix.exs b/mix.exs index 3b670236..16e74e03 100644 --- a/mix.exs +++ b/mix.exs @@ -81,7 +81,7 @@ defmodule Membrane.RTP.Plugin.MixProject do {:membrane_h264_ffmpeg_plugin, "~> 0.19", only: :test}, {:membrane_pcap_plugin, github: "membraneframework/membrane_pcap_plugin", tag: "v0.6.1", only: :test}, - {:membrane_hackney_plugin, "~> 0.8.1", only: :test}, + {:membrane_hackney_plugin, "~> 0.8.2", only: :test}, # Dev {:ex_doc, "~> 0.21", only: :dev, runtime: false}, diff --git a/mix.lock b/mix.lock index 28abb203..295580bd 100644 --- a/mix.lock +++ b/mix.lock @@ -26,7 +26,7 @@ "membrane_core": {:hex, :membrane_core, "0.10.0", "1d010bc632f6abb575c60e37607a0cb56fbf88bbb9d0d78a4b5410611563239a", [:mix], [{:bunch, "~> 1.3", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 2.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "64d63514aabf71c93136ee86093b7ca60cf4317a09b137e0c08e064caa34636f"}, "membrane_h264_ffmpeg_plugin": {:hex, :membrane_h264_ffmpeg_plugin, "0.19.0", "40f0cb032cce614b1284b196995c15486a8572411ae402b455f9788a53745395", [:mix], [{:bunch, "~> 1.3.0", [hex: :bunch, repo: "hexpm", optional: false]}, {:membrane_common_c, "~> 0.12.0", [hex: :membrane_common_c, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:membrane_h264_format, "~> 0.3.0", [hex: :membrane_h264_format, repo: "hexpm", optional: false]}, {:membrane_raw_video_format, "~> 0.2.0", [hex: :membrane_raw_video_format, repo: "hexpm", optional: false]}, {:ratio, "~> 2.4.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:unifex, "~> 0.7.2", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "bd796aaf690b431b2cd5b838c36e928133db7f28a81e5cc6f556b53bb558f5f3"}, "membrane_h264_format": {:hex, :membrane_h264_format, "0.3.0", "84426aac86c3f4d3e8110438c3514ad94aa528e7002650d40e3b3862e2af5e3e", [:mix], [], "hexpm", "8254e52cea3c5d7c078c960a32f1ba338eeae9e301515302fd293f1683fa8dd9"}, - "membrane_hackney_plugin": {:hex, :membrane_hackney_plugin, "0.8.1", "261bc12475a09d55b0e31ccfbbac15c4a0a37423a8bd8eded233f9b96d0f4bd5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:mockery, "~> 2.3", [hex: :mockery, repo: "hexpm", optional: false]}], "hexpm", "21f7d23401bd5dd0e2c97e615857df4bf058f3a44aa5189fc5cef64d48e1236c"}, + "membrane_hackney_plugin": {:hex, :membrane_hackney_plugin, "0.8.2", "6b83628cc2019aa0b143c09e77f2dd9199a05528599d93c289dcab2e947369fa", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}, {:mockery, "~> 2.3", [hex: :mockery, repo: "hexpm", optional: false]}], "hexpm", "42906166b3692ba2270deb61721225ca7edadd1dbde6a44435664234a93597e2"}, "membrane_pcap_plugin": {:git, "https://github.com/membraneframework/membrane_pcap_plugin.git", "2bab35e62ac87e5a2c5d514dfb0b51de12a3ed96", [tag: "v0.6.1"]}, "membrane_raw_video_format": {:hex, :membrane_raw_video_format, "0.2.0", "cda8eb207cf65c93690a19001aba3edbb2ba5d22abc8068a1f6a785ba871e8cf", [:mix], [], "hexpm", "6b716fc24f60834323637c95aaaa0f99be23fcc6a84a21af70195ef50185b634"}, "membrane_rtp_format": {:hex, :membrane_rtp_format, "0.4.0", "be84e88206c6a91363660eeb7cbf03330cd9a00486fb4bce4a7b86a4172d3a4b", [:mix], [{:membrane_core, "~> 0.10.0", [hex: :membrane_core, repo: "hexpm", optional: false]}], "hexpm", "44944956c1031f49269b7d447525b7c3d1026120b100b4f0dfaca5dc228c65e0"}, From 5fdb5e15473bda100e58e49089ba4bcbdb5bcc6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Kita?= Date: Thu, 5 May 2022 13:00:41 +0200 Subject: [PATCH 7/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b838d460..cfedc691 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtp_plugin` to your list of dep ```elixir def deps do [ - {:membrane_rtp_plugin, "~> 0.12.0"} + {:membrane_rtp_plugin, "~> 0.12.0"} {:ex_libsrtp, "~> 0.3.0"} # required only if SRTP/SRTCP support is needed ] end