Skip to content

Commit

Permalink
Merge pull request #5 from membraneframework/new-naming
Browse files Browse the repository at this point in the history
Apply new naming convention
  • Loading branch information
Qizot authored Jul 16, 2020
2 parents eff249b + 285283d commit d0776af
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 64 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The package can be installed by adding `membrane_element_rtp_h264` to your list
```elixir
def deps do
[
{:membrane_element_rtp_h264, "~> 0.2.0"}
{:membrane_element_rtp_h264, "~> 0.3.0-alpha"}
]
end
```
Expand Down
11 changes: 0 additions & 11 deletions lib/rtp_h264.ex

This file was deleted.

9 changes: 5 additions & 4 deletions lib/rtp_h264/depayloader.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Element.RTP.H264.Depayloader do
defmodule Membrane.RTP.H264.Depayloader do
@moduledoc """
Depayloads H264 RTP payloads into H264 NAL Units.
Expand All @@ -10,9 +10,10 @@ defmodule Membrane.Element.RTP.H264.Depayloader do
use Membrane.Log

alias Membrane.Buffer
alias Membrane.Caps.{RTP, Video.H264}
alias Membrane.RTP
alias Membrane.Caps.Video.H264
alias Membrane.Event.Discontinuity
alias Membrane.Element.RTP.H264.{FU, NAL, StapA}
alias Membrane.RTP.H264.{FU, NAL, StapA}

@frame_prefix <<1::32>>
@type sequence_number :: 0..65_535
Expand All @@ -21,7 +22,7 @@ defmodule Membrane.Element.RTP.H264.Depayloader do
caps: {H264, stream_format: :byte_stream}

def_input_pad :input,
caps: {RTP, payload_type: :dynamic},
caps: {RTP, payload_type: range(96, 127)},
demand_unit: :buffers

defmodule State do
Expand Down
6 changes: 3 additions & 3 deletions lib/rtp_h264/nal_formats/fu.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defmodule Membrane.Element.RTP.H264.FU do
defmodule Membrane.RTP.H264.FU do
@moduledoc """
Module responsible for parsing H264 Fragmentation Unit.
"""
use Bunch
alias Membrane.Element.RTP.H264.FU.Header
alias Membrane.Element.RTP.H264.{Depayloader, NAL}
alias Membrane.RTP.H264.FU.Header
alias Membrane.RTP.H264.{Depayloader, NAL}

defstruct [:last_seq_num, data: []]

Expand Down
4 changes: 2 additions & 2 deletions lib/rtp_h264/nal_formats/fu/header.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Element.RTP.H264.FU.Header do
defmodule Membrane.RTP.H264.FU.Header do
@moduledoc """
Defines a structure representing Fragmentation Unit (FU) header
which is defined in [RFC6184](https://tools.ietf.org/html/rfc6184#page-31)
Expand All @@ -12,7 +12,7 @@ defmodule Membrane.Element.RTP.H264.FU.Header do
```
"""

alias Membrane.Element.RTP.H264.NAL
alias Membrane.RTP.H264.NAL

@typedoc """
MUST be set to true only in the first packet in a sequence.
Expand Down
2 changes: 1 addition & 1 deletion lib/rtp_h264/nal_formats/stap_a.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Element.RTP.H264.StapA do
defmodule Membrane.RTP.H264.StapA do
@moduledoc """
Module responsible for parsing Single Time Agregation Packets type A.
Expand Down
2 changes: 1 addition & 1 deletion lib/rtp_h264/nal_header.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Element.RTP.H264.NAL.Header do
defmodule Membrane.RTP.H264.NAL.Header do
@moduledoc """
Defines a structure representing Network Abstraction Layer Unit Header
Expand Down
7 changes: 4 additions & 3 deletions lib/rtp_h264/payloader.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Element.RTP.H264.Payloader do
defmodule Membrane.RTP.H264.Payloader do
@moduledoc """
Payloads H264 NAL Units into H264 RTP payloads.
Expand All @@ -11,8 +11,9 @@ defmodule Membrane.Element.RTP.H264.Payloader do
use Membrane.Log

alias Membrane.Buffer
alias Membrane.Caps.{RTP, Video.H264}
alias Membrane.Element.RTP.H264.{FU, NAL, StapA}
alias Membrane.RTP
alias Membrane.Caps.Video.H264
alias Membrane.RTP.H264.{FU, NAL, StapA}

@frame_prefix_shorter <<1::24>>
@frame_prefix_longer <<1::32>>
Expand Down
25 changes: 13 additions & 12 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
defmodule Membrane.Element.RTP.H264.MixProject do
defmodule Membrane.RTP.H264.MixProject do
use Mix.Project

@version "0.2.0"
@github_url "https://github.com/membraneframework/membrane-element-rtp-h264"
@version "0.3.0-alpha"
@github_url "https://github.com/membraneframework/membrane_rtp_h264_plugin"

def project do
[
app: :membrane_element_rtp_h264,
app: :membrane_rtp_h264_plugin,
version: @version,
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
description: "Membrane Multimedia Framework (RTP H264 Element)",
description: "Membrane Multimedia Framework (RTP H264 Plugin)",
package: package(),
name: "Membrane Element: H264",
name: "Membrane Plugin: RTP H264",
source_url: @github_url,
docs: docs(),
homepage_url: "https://membraneframework.org",
Expand All @@ -39,7 +39,7 @@ defmodule Membrane.Element.RTP.H264.MixProject do
extras: ["README.md"],
source_ref: "v#{@version}",
nest_modules_by_prefix: [
Membrane.Element.RTP.H264
Membrane.RTP.H264
]
]
end
Expand All @@ -57,13 +57,14 @@ defmodule Membrane.Element.RTP.H264.MixProject do

defp deps do
[
{:membrane_core, git: "https://github.com/membraneframework/membrane-core"},
{:ex_doc, "~> 0.19", only: :dev, runtime: false},
{:dialyxir, "~> 1.0.0-rc.6", only: [:dev], runtime: false},
{:bunch, "~> 1.2"},
{:membrane_caps_rtp, "~> 0.1"},
{:membrane_core, "~> 0.5.1"},
{:membrane_rtp_format, "~> 0.2.0-alpha"},
{:membrane_caps_video_h264, "~> 0.1"},
{:credo, "~> 1.0.0", only: [:dev], runtime: false}
# Dev
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:credo, "~> 1.0", only: :dev, runtime: false}
]
end
end
25 changes: 13 additions & 12 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
"bunch": {:hex, :bunch, "1.3.0", "51b4423088b7fb9e21eae6d6bc5e5d219d955ea5556fbd6130bfb6213df4be32", [:mix], [], "hexpm", "9ad233a2bacc0dae8aa6553a9b9057f27446443b1c5903c3479b6f9f3820ce2d"},
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
"coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"},
"credo": {:hex, :credo, "1.0.5", "fdea745579f8845315fe6a3b43e2f9f8866839cfbc8562bb72778e9fdaa94214", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "16105fac37c5c4b3f6e1f70ba0784511fec4275cd8bb979386e3c739cf4e6455"},
"dialyxir": {:hex, :dialyxir, "1.0.0-rc.7", "6287f8f2cb45df8584317a4be1075b8c9b8a69de8eeb82b4d9e6c761cf2664cd", [:mix], [{:erlex, ">= 0.2.5", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "506294d6c543e4e5282d4852aead19ace8a35bedeb043f9256a06a6336827122"},
"earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm", "8cf8a291ebf1c7b9539e3cddb19e9cef066c2441b1640f13c34c1d3cfc825fec"},
"erlex": {:hex, :erlex, "0.2.5", "e51132f2f472e13d606d808f0574508eeea2030d487fc002b46ad97e738b0510", [:mix], [], "hexpm", "756d3e19b056339af674b715fdd752c5dac468cf9d0e2d1a03abf4574e99fbf8"},
"ex_doc": {:hex, :ex_doc, "0.21.3", "857ec876b35a587c5d9148a2512e952e24c24345552259464b98bfbb883c7b42", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "0db1ee8d1547ab4877c5b5dffc6604ef9454e189928d5ba8967d4a58a801f161"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fdf843bca858203ae1de16da2ee206f53416bbda5dc8c9e78f43243de4bc3afe"},
"makeup": {:hex, :makeup, "1.0.0", "671df94cf5a594b739ce03b0d0316aa64312cee2574b6a44becb83cd90fb05dc", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "a10c6eb62cca416019663129699769f0c2ccf39428b3bb3c0cb38c718a0c186d"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "d4b316c7222a85bbaa2fd7c6e90e37e953257ad196dc229505137c5e505e9eff"},
"credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"},
"dialyxir": {:hex, :dialyxir, "1.0.0", "6a1fa629f7881a9f5aaf3a78f094b2a51a0357c843871b8bc98824e7342d00a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "aeb06588145fac14ca08d8061a142d52753dbc2cf7f0d00fc1013f53f8654654"},
"earmark": {:hex, :earmark, "1.4.4", "4821b8d05cda507189d51f2caeef370cf1e18ca5d7dfb7d31e9cafe6688106a4", [:mix], [], "hexpm", "1f93aba7340574847c0f609da787f0d79efcab51b044bb6e242cae5aca9d264d"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.22.1", "9bb6d51508778193a4ea90fa16eac47f8b67934f33f8271d5e1edec2dc0eee4c", [:mix], [{:earmark, "~> 1.4.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "d957de1b75cb9f78d3ee17820733dc4460114d8b1e11f7ee4fd6546e69b1db60"},
"jason": {:hex, :jason, "1.2.1", "12b22825e22f468c02eb3e4b9985f3d0cb8dc40b9bd704730efa11abd2708c44", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b659b8571deedf60f79c5a608e15414085fa141344e2716fbd6988a084b5f993"},
"makeup": {:hex, :makeup, "1.0.2", "0b9f7bfb7a88bed961341b359bc2cc1b233517af891ba4890ec5a580ffe738b4", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "43833299231c6a6983afc75a34e43eeba638521d5527ff89809fa6372424fd7e"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
"membrane_caps_rtp": {:hex, :membrane_caps_rtp, "0.1.0", "a6fcdac65d81c4a59d068c7b18fa90a0dc27b2ca21261e279c97dd3fea80ce55", [:mix], [], "hexpm", "5a15745ae9521ec241e138bcc0790e90bba62cf63d8f8373a1f08568e9d66fe7"},
"membrane_caps_video_h264": {:hex, :membrane_caps_video_h264, "0.1.0", "d10eb30fdc00175aaeb4bb0d5cb4c031cc319e29330b5585bef2044352161584", [:mix], [], "hexpm", "a301e03328008f822edf08c6f76aa4f1b92abf3a7175e8022ad6acab693c6011"},
"membrane_core": {:git, "https://github.com/membraneframework/membrane-core", "956d81e034c12feb80e67803b1f1ab2156b7ed92", []},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm", "589b5af56f4afca65217a1f3eb3fee7e79b09c40c742fddc1c312b3ac0b3399f"},
"numbers": {:hex, :numbers, "5.2.0", "34515afc34b005b347128ea1bf5a5807f69b07836d9f09611471282e04adabf3", [:mix], [{:coerce, "~> 1.0", [hex: :coerce, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "a0565589e41a9a76834f2666abfac022601cf391218862725dae4e794216712e"},
"membrane_core": {:hex, :membrane_core, "0.5.2", "c657e184dc330f8c533d6592615800319802e1c0081c8589020f46ecd77cc35a", [:mix], [{:bunch, "~> 1.2", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 2.0", [hex: :ratio, repo: "hexpm", optional: false]}], "hexpm", "51c2e67b1764296a7aee50a3c3aef9a3da5a9c34dd01f969e90f2896eff9ae15"},
"membrane_rtp_format": {:hex, :membrane_rtp_format, "0.2.0-alpha", "b843aa4f0a16b612154f42990ca628338d894ae293ca4cec84791bdcdf2899be", [:mix], [], "hexpm", "c90ced3cc6381253aa28ee6f3742d1a233e126c6fc8e396662cee945a24b0d18"},
"nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"},
"numbers": {:hex, :numbers, "5.2.1", "8a6e9eeacfb19f4ac30a52c304f565dc53f8e0813b7193812a5b15b93210780c", [:mix], [{:coerce, "~> 1.0", [hex: :coerce, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "1fd66efe26b67456ad0b80a038f553b89702d073a6942ecd34ce1a3e10af4c92"},
"qex": {:hex, :qex, "0.5.0", "5a3a9becf67d4006377c4c247ffdaaa8ae5b3634a0caadb788dc24d6125068f4", [:mix], [], "hexpm", "4ad6f6421163cd8204509a119a5c9813cbb969cfb8d802a9dc49b968bffbac2a"},
"ratio": {:hex, :ratio, "2.4.0", "bd073c82871ea9d900243bc0b351e5274484ec469f7e91eaa83de6468ae9cdcf", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:numbers, "~> 5.2.0", [hex: :numbers, repo: "hexpm", optional: false]}], "hexpm", "3623a323a29b7a2b51914efe3a612cca812bd354f1dd2ffc4ac62058b72447e8"},
"ratio": {:hex, :ratio, "2.4.1", "ecf989f3a1483cf892b867ab00ffe8e0784cbe748cd32a610a4ac4c4fd11f46d", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:numbers, "~> 5.2.0", [hex: :numbers, repo: "hexpm", optional: false]}], "hexpm", "3988235b59285b8fef9a55867c0b82125b59915ac80808de064b33ff57b0d54c"},
}
2 changes: 1 addition & 1 deletion test/depayloader_pipeline_test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.Element.RTP.H264.DepayloaderPipelineTest do
defmodule Membrane.RTP.H264.DepayloaderPipelineTest do
use ExUnit.Case

import Membrane.Testing.Assertions
Expand Down
4 changes: 2 additions & 2 deletions test/depayloader_test.exs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
defmodule Membrane.Element.RTP.H264.DepayloaderTest do
defmodule Membrane.RTP.H264.DepayloaderTest do
use ExUnit.Case
use Bunch

alias Membrane.Buffer
alias Membrane.Element.RTP.H264.{Depayloader, FU}
alias Membrane.RTP.H264.{Depayloader, FU}
alias Membrane.Support.Formatters.{FUFactory, RBSPNaluFactory, STAPFactory}

@empty_state %Depayloader.State{}
Expand Down
4 changes: 2 additions & 2 deletions test/nal_formaters/fu/header_test.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Membrane.Element.RTP.H264.FU.HeaderTest do
defmodule Membrane.RTP.H264.FU.HeaderTest do
use ExUnit.Case
alias Membrane.Element.RTP.H264.FU.Header
alias Membrane.RTP.H264.FU.Header

describe "Fragmentation Unit Header parser" do
test "returns error when invalid data is being parsed" do
Expand Down
4 changes: 2 additions & 2 deletions test/nal_formaters/fu_a_test.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Membrane.Element.RTP.H264.FUTest do
defmodule Membrane.RTP.H264.FUTest do
use ExUnit.Case
use Bunch

alias Membrane.Element.RTP.H264.FU
alias Membrane.RTP.H264.FU
alias Membrane.Support.Formatters.FUFactory

@base_seq_num 4567
Expand Down
4 changes: 2 additions & 2 deletions test/nal_formaters/stap_a_test.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Membrane.Element.RTP.H264.StapATest do
defmodule Membrane.RTP.H264.StapATest do
use ExUnit.Case
use Bunch

alias Membrane.Element.RTP.H264.StapA
alias Membrane.RTP.H264.StapA
alias Membrane.Support.Formatters.STAPFactory

describe "Single Time Agregation Packet parser" do
Expand Down
6 changes: 3 additions & 3 deletions test/payloader_pipeline_test.exs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
defmodule Membrane.Element.RTP.H264.PayloaderPipelineTest do
defmodule Membrane.RTP.H264.PayloaderPipelineTest do
use ExUnit.Case

import Membrane.Testing.Assertions

alias Membrane.Buffer
alias Membrane.Testing.Source
alias Membrane.Element.RTP.H264.NAL
alias Membrane.Element.RTP.H264.StapA
alias Membrane.RTP.H264.NAL
alias Membrane.RTP.H264.StapA
alias Membrane.Support.{Helper, PayloaderTestingPipeline}

@big_size 16_384
Expand Down
2 changes: 1 addition & 1 deletion test/support/depayloader_testing_pipeline.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Membrane.Support.DepayloaderTestingPipeline do
@moduledoc false
alias Membrane.Element.RTP.H264.Depayloader
alias Membrane.RTP.H264.Depayloader
alias Membrane.Testing
alias Testing.Pipeline

Expand Down
2 changes: 1 addition & 1 deletion test/support/payloader_testing_pipeline.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Membrane.Support.PayloaderTestingPipeline do
@moduledoc false
alias Membrane.Element.RTP.H264.Payloader
alias Membrane.RTP.H264.Payloader
alias Membrane.Testing
alias Testing.Pipeline

Expand Down

0 comments on commit d0776af

Please sign in to comment.