Skip to content

Commit

Permalink
Merge pull request #100 from membraneframework/cleanup-docs
Browse files Browse the repository at this point in the history
Cleanup docs
  • Loading branch information
DominikWolek authored Apr 14, 2023
2 parents 45cbe74 + 5323c53 commit 3561fc0
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 19 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The package can be installed by adding `membrane_video_compositor_plugin` to you
```elixir
def deps do
[
{:membrane_video_compositor_plugin, "~> 0.2.2"}
{:membrane_video_compositor_plugin, "~> 0.3.0"}
]
end
```
Expand All @@ -24,7 +24,9 @@ Since parts of this package are implemented in Rust, you need to have a Rust ins

## Usage

TODO
Before jumping into Livebook, check out this [installation guide](https://github.com/membraneframework/guide/tree/master/livebook_examples).

[![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fmembraneframework%2Fguide%2Fblob%2Fmaster%2Flivebook_examples%2Fvideo_compositor%2Fvideo_compositor.livemd)

## Copyright and License

Expand Down
2 changes: 1 addition & 1 deletion lib/membrane/video_compositor/examples/hard.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Membrane.VideoCompositor.Examples.Hard do
- The third video is turned into a ball and put in the middle bottom of the screen
"""

alias Membrane.VideoCompositor.VideoTransformations.TextureTransformations.CornersRounding
alias Membrane.VideoCompositor.TextureTransformations.CornersRounding

alias Membrane.VideoCompositor.Examples.Mock.Layouts.{Grid, Merging}
alias Membrane.VideoCompositor.Examples.Mock.Transformations.{Rotate, ToBall}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.VideoCompositor.VideoTransformations.TextureTransformations do
defmodule Membrane.VideoCompositor.TextureTransformations do
@moduledoc """
Describes all texture transformations applied to video.
Texture transformations can change resolution of frame.
Expand All @@ -10,7 +10,7 @@ defmodule Membrane.VideoCompositor.VideoTransformations.TextureTransformations d
this type definition.
"""

alias Membrane.VideoCompositor.VideoTransformations.TextureTransformations.{
alias Membrane.VideoCompositor.TextureTransformations.{
CornersRounding,
Cropping
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.VideoCompositor.VideoTransformations.TextureTransformations.CornersRounding do
defmodule Membrane.VideoCompositor.TextureTransformations.CornersRounding do
@moduledoc """
Describe corners rounding texture transformation parameter.
Corner rounding transformation can be imagined as placing four circles with specified radius
Expand All @@ -10,10 +10,10 @@ defmodule Membrane.VideoCompositor.VideoTransformations.TextureTransformations.C
## Examples
Example struct describing transformation which rounds corners with 100 pixel radius:
iex> alias Membrane.VideoCompositor.VideoTransformations.TextureTransformations.CornersRounding
Membrane.VideoCompositor.VideoTransformations.TextureTransformations.CornersRounding
iex> alias Membrane.VideoCompositor.TextureTransformations.CornersRounding
Membrane.VideoCompositor.TextureTransformations.CornersRounding
iex> %CornersRounding{ border_radius: 100 }
%Membrane.VideoCompositor.VideoTransformations.TextureTransformations.CornersRounding{
%Membrane.VideoCompositor.TextureTransformations.CornersRounding{
border_radius: 100
}
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Membrane.VideoCompositor.VideoTransformations.TextureTransformations.Cropping do
defmodule Membrane.VideoCompositor.TextureTransformations.Cropping do
@moduledoc """
Describe cropping texture transformation parameters.
## Values
Expand Down
3 changes: 1 addition & 2 deletions lib/membrane/video_compositor/video_transformations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ defmodule Membrane.VideoCompositor.VideoTransformations do
applied in the order in which they appear in the list.
"""

alias Membrane.VideoCompositor.VideoTransformations
alias Membrane.VideoCompositor.VideoTransformations.TextureTransformations
alias Membrane.VideoCompositor.{TextureTransformations, VideoTransformations}

@type t :: %__MODULE__{
texture_transformations: list(TextureTransformations.t())
Expand Down
10 changes: 6 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.VideoCompositor.Mixfile do
use Mix.Project

@version "0.2.2"
@version "0.3.0"
@github_url "https://github.com/membraneframework/membrane_video_compositor_plugin"

def project do
Expand Down Expand Up @@ -94,13 +94,15 @@ defmodule Membrane.VideoCompositor.Mixfile do
extras: ["README.md", "LICENSE"],
formatters: ["html"],
source_ref: "v#{@version}",
filter_modules:
~r/Membrane\.VideoCompositor(\.VideoTransformations$|\.TextureTransformations.*|\.RustStructs\.BaseVideoPlacement|$)/,
nest_modules_by_prefix: [
Membrane.VideoCompositor,
Membrane.VideoCompositor.VideoTransformations
Membrane.VideoCompositor.TextureTransformations
],
groups_for_modules: [
"Video transformations": [
~r/^Membrane\.VideoCompositor\.VideoTransformations($|\.)/
"Texture transformations": [
~r/^Membrane\.VideoCompositor\.TextureTransformations($|\.)/
]
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Into<Box<dyn TextureTransformation>> for ElixirTextureTransformations {

/// Elixir struct wrapping parameters describing corner rounding texture transformation
#[derive(Debug, rustler::NifStruct, Clone, Copy)]
#[module = "Membrane.VideoCompositor.VideoTransformations.TextureTransformations.CornersRounding"]
#[module = "Membrane.VideoCompositor.TextureTransformations.CornersRounding"]
pub struct ElixirCornersRounding {
pub border_radius: u32,
}
Expand All @@ -104,7 +104,7 @@ impl Into<Box<dyn TextureTransformation>> for ElixirCornersRounding {

/// Elixir struct wrapping parameters describing cropping texture transformation
#[derive(Debug, rustler::NifStruct, Clone, Copy)]
#[module = "Membrane.VideoCompositor.VideoTransformations.TextureTransformations.Cropping"]
#[module = "Membrane.VideoCompositor.TextureTransformations.Cropping"]
pub struct ElixirCropping {
pub crop_top_left_corner: (f32, f32),
pub crop_size: (f32, f32),
Expand Down
2 changes: 1 addition & 1 deletion test/texture_transformations_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Membrane.VideoCompositor.Test.TextureTransformations do
alias Membrane.VideoCompositor.Test.Support.Utils
alias Membrane.VideoCompositor.VideoTransformations

alias Membrane.VideoCompositor.VideoTransformations.TextureTransformations.{
alias Membrane.VideoCompositor.TextureTransformations.{
CornersRounding,
Cropping
}
Expand Down

0 comments on commit 3561fc0

Please sign in to comment.