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

Release v0.19.4 #52

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The package can be installed by adding `membrane_rtp_h264_plugin` to your list o
```elixir
def deps do
[
{:membrane_rtp_h264_plugin, "~> 0.19.3"}
{:membrane_rtp_h264_plugin, "~> 0.19.4"}
]
end
```
Expand Down
24 changes: 24 additions & 0 deletions lib/rtp_h264/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ defmodule Membrane.RTP.H264.Utils do
Utility functions for RTP packets containing H264 encoded frames.
"""

@doc """
Deprecated since `v0.19.4`. Use `keyframe?/2` instead.

Checks whether RTP payload contains H264 keyframe.

By default, with option `look_for` set to `:sps`, will in some cases check
whether the payload contains SPS (NALU payload type 7);
if `look_for` is set to `:idr`, will look exclusively for IDR frames
(NALU payload type 5).
"""
@deprecated "Use #{inspect(__MODULE__)}.keyframe?/2 instead"
@spec is_keyframe(binary(), :sps | :idr) :: boolean()
# credo:disable-for-next-line Credo.Check.Readability.PredicateFunctionNames
def is_keyframe(rtp_payload, look_for \\ :sps)

# credo:disable-for-next-line Credo.Check.Readability.PredicateFunctionNames
def is_keyframe(rtp_payload, _look_for) when byte_size(rtp_payload) < 1, do: false

# credo:disable-for-next-line Credo.Check.Readability.PredicateFunctionNames
def is_keyframe(rtp_payload, look_for) do
<<_f::1, _nri::2, nalu_type::5, rest::binary>> = rtp_payload
do_is_keyframe(nalu_type, rest, look_for)
end

@doc """
Checks whether RTP payload contains H264 keyframe.

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.RTP.H264.MixProject do
use Mix.Project

@version "0.19.3"
@version "0.19.4"
@github_url "https://github.com/membraneframework/membrane_rtp_h264_plugin"

def project do
Expand Down