Packages

A small, correct, hard-to-crash RTMP ingest server. Handles the handshake, chunk streams, AMF0 commands and FLV tag parsing (AAC, H.264), and hands timestamped frames to a behaviour you implement.

Current section

Files

Jump to
rtmp mix.exs
Raw

mix.exs

defmodule RTMP.MixProject do
  use Mix.Project

  @version "0.1.0"
  @source_url "https://github.com/Adeyeye93/rtmp"

  def project do
    [
      app: :rtmp,
      version: @version,
      elixir: "~> 1.15",
      start_permanent: Mix.env() == :prod,
      elixirc_paths: elixirc_paths(Mix.env()),
      deps: deps(),
      description: description(),
      package: package(),
      docs: docs(),
      source_url: @source_url
    ]
  end

  def application do
    [extra_applications: [:logger, :crypto]]
  end

  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  defp deps do
    [
      {:thousand_island, "~> 1.3"},
      {:telemetry, "~> 1.0"},
      {:stream_data, "~> 1.0", only: [:dev, :test]},
      {:ex_doc, "~> 0.34", only: :dev, runtime: false}
    ]
  end

  defp description do
    "A small, correct, hard-to-crash RTMP ingest server. Handles the handshake, " <>
      "chunk streams, AMF0 commands and FLV tag parsing (AAC, H.264), and hands " <>
      "timestamped frames to a behaviour you implement."
  end

  defp package do
    [
      licenses: ["MIT"],
      links: %{"GitHub" => @source_url},
      files: ~w(lib mix.exs README.md LICENSE CHANGELOG.md .formatter.exs)
    ]
  end

  defp docs do
    [
      main: "readme",
      source_ref: "v#{@version}",
      extras: [
        "README.md",
        "examples/flv_saver/README.md": [
          filename: "example-flv-saver",
          title: "Example: FLV saver"
        ],
        "CHANGELOG.md": [],
        LICENSE: [title: "License"]
      ],
      groups_for_modules: [
        "Server API": [RTMP, RTMP.Handler, RTMP.Listener, RTMP.Frame, RTMP.Limits, RTMP.Telemetry],
        Protocol: [
          RTMP.Handshake,
          RTMP.ChunkStream,
          RTMP.ControlMessages,
          RTMP.AMF0,
          RTMP.Commands
        ],
        FLV: [RTMP.FLV.AudioTag, RTMP.FLV.VideoTag, RTMP.FLV.Metadata]
      ]
    ]
  end
end