Skip to content

Extract ex_moq - #7

Open
kidq330 wants to merge 21 commits into
masterfrom
kidq330/extract_ex_moq
Open

Extract ex_moq#7
kidq330 wants to merge 21 commits into
masterfrom
kidq330/extract_ex_moq

Conversation

@kidq330

@kidq330 kidq330 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@kidq330 kidq330 self-assigned this Aug 26, 2026
@kidq330 kidq330 added this to Smackore Aug 26, 2026
@kidq330 kidq330 moved this to In Review in Smackore Aug 26, 2026
@kidq330
kidq330 marked this pull request as ready for review August 26, 2026 15:33
@kidq330
kidq330 force-pushed the kidq330/extract_ex_moq branch from fa962f8 to 375add5 Compare August 26, 2026 15:35

@varsill varsill left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[NIT] Remember to remove Rust's target/ from .gitignore ;)

Comment thread mix.exs
{:membrane_aac_format, "~> 0.8.0"},
{:membrane_opus_format, "~> 0.3.0"},
# TODO: change to released version once it's public
{:ex_moq, github: "membraneframework/ex_moq", branch: "kidq330/group_loss_fixed"},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm shouldn't it point now to kidq330/initial?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yup that's a leftover from debugging CI

Comment thread lib/source.ex
Membrane.Logger.debug("MoQ subscriber closed while connecting: #{inspect(reason)}")

{[setup: :complete, notify_parent: {:disconnected, reason}],
%{state | status: :disconnect_pending}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you need to update moduledoc and describe that :disconnected notification is also sent when MoQ subscriber closes while connecting

@kidq330 kidq330 Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Currently it is documented like this:

  * `{:disconnected, reason :: String.t() | ExMoQ.Native.close_reason()}`
        when the broadcast goes away or the session drops.
        The source sends `:end_of_stream` to all active pads.

I added this clause because there's a window between :moq_connected (session with relay established, otherwise the source crashes due to invalid url etc) and :moq_broadcast_ready where the session can disconnect, sending :moq_disconnected. status: :connecting can be misleading but it just means the element is still trying to connect to the particular broadcast.

The :disconnected notif is always sent after setup finishes, so I don't see a reason for the moduledoc to explicitly differentiate if the disconnect happened before or after :moq_broadcast_ready, it shouldn't matter to the parent IMO.

Comment thread mix.exs
{:ex_moq, github: "membraneframework/ex_moq", branch: "kidq330/group_loss_fixed"},
{:muontrap, ">= 0.0.0", only: :test},
{:membrane_aac_plugin, "~> 0.19", only: :test},
{:muontrap, "~> 1.8", only: :test},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[NIT] I would leave ~> 1.8

Comment thread lib/source/catalog.ex
@spec update(t(), [{Native.track(), Native.track_format()}]) :: {diff(), t()}
def update(catalog, renditions) do
new = Map.new(renditions)
@spec update(t(), %{Native.track() => Native.track_format()}) :: {diff(), t()}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm is it always Native.track_format()? Cannot it be :unrecognized?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I guess we could add a type alias for this map to ex_moq but it's not used anywhere, only as a message contract

Comment thread .github/workflows/ci.yml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we configure it to install moq relay binary here just as you did in https://github.com/membraneframework/ex_moq/blob/f51d9d10af953f6703af34b01ad67b6acdd7630c/.github/workflows/ci.yml

?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We should once we enable integration tests on CI, right now it would be dead weight, and I'm leaving it for a follow-up PR as discussed in DMs

@kidq330
kidq330 requested a review from varsill September 3, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants