Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Serializer #2

Merged
merged 4 commits into from
Aug 5, 2021
Merged

Add Serializer #2

merged 4 commits into from
Aug 5, 2021

Conversation

sheldak
Copy link
Contributor

@sheldak sheldak commented Aug 2, 2021

No description provided.

@sheldak sheldak self-assigned this Aug 2, 2021
@sheldak sheldak added the enhancement New feature or request label Aug 2, 2021
@sheldak sheldak added this to In progress in What's happening in Membrane? via automation Aug 2, 2021
@sheldak sheldak marked this pull request as ready for review August 2, 2021 14:07
@sheldak sheldak moved this from In progress to In Review in What's happening in Membrane? Aug 2, 2021
README.md Outdated
@@ -4,7 +4,7 @@
[![API Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_wav_plugin)
[![CircleCI](https://circleci.com/gh/membraneframework/membrane_wav_plugin.svg?style=svg)](https://circleci.com/gh/membraneframework/membrane_wav_plugin)

This repository provides WAV Parser.
Plugin providing elements for managing WAV format.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Word managing seem a bit out of place here

Suggested change
Plugin providing elements for managing WAV format.
Plugin providing elements handling audio in WAV file format.

def_output_pad :output,
mode: :pull,
availability: :always,
caps: Caps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically you're not outputing Raw format but rather WAV, so this requires a new _format definition

caps: Caps

@impl true
def handle_init(state) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, put init doesn't receive state but rather options struct passed defining pipeline spec

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, I will change also in Parser

lib/membrane_wav/serializer.ex Show resolved Hide resolved
lib/membrane_wav/serializer.ex Outdated Show resolved Hide resolved
lib/membrane_wav/serializer.ex Outdated Show resolved Hide resolved
lib/membrane_wav/serializer.ex Outdated Show resolved Hide resolved
What's happening in Membrane? automation moved this from In Review to In progress Aug 4, 2021
@sheldak sheldak moved this from In progress to In Review in What's happening in Membrane? Aug 4, 2021
lib/membrane_wav/parser.ex Outdated Show resolved Hide resolved
lib/membrane_wav/serializer.ex Outdated Show resolved Hide resolved
size = buffers_count * Caps.frames_to_bytes(frames, caps)

{{:ok, demand: {:input, size}}, state}
end

@impl true
def handle_process(:input, buffer, _context, state) do
def handle_process(:input, buffer, _context, %{header_created: true} = state) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still add an explicit case raising with human readable error - now it might not be obvious why the element is failing from "Function clause error"

What's happening in Membrane? automation moved this from In Review to In progress Aug 4, 2021
@agga1 agga1 moved this from In progress to In Review in What's happening in Membrane? Aug 5, 2021
@sheldak sheldak merged commit 2c59437 into master Aug 5, 2021
What's happening in Membrane? automation moved this from In Review to Done Aug 5, 2021
@sheldak sheldak deleted the serializer branch August 5, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants