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

Create Decoders #1

Merged
merged 16 commits into from
Jun 27, 2024
Prev Previous commit
Next Next commit
Fix warnings
  • Loading branch information
Noarkhh committed Jun 18, 2024
commit 974a365570545a8288738e65272254997448aed8
2 changes: 1 addition & 1 deletion c_src/membrane_vpx_plugin/vpx_decoder.c
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ UNIFEX_TERM decode_frame(UnifexEnv *env, UnifexPayload *frame, State *state) {
vpx_codec_iter_t iter = NULL;
vpx_image_t *img = NULL;
unsigned int frames_cnt = 0, max_frames = 2;
PixelFormat pixel_format;
PixelFormat pixel_format = PIXEL_FORMAT_I420;
UnifexPayload **output_frames =
unifex_alloc(max_frames * sizeof(*output_frames));

7 changes: 6 additions & 1 deletion lib/membrane_vpx/decoder/vpx_decoder.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
defmodule Membrane.VPx.Decoder do
@moduledoc """
Common behaviors for VP8 and VP9 Decoders
"""
alias Membrane.{Buffer, VP8, VP9}
alias Membrane.Element.CallbackContext
alias Membrane.VPx.Decoder.Native

defmodule State do
@moduledoc false
@moduledoc """
State of a decoder
"""
@type t :: %__MODULE__{
codec: :vp8 | :vp9,
codec_module: VP8 | VP9,