Skip to content

Conversation

@gBillal
Copy link
Collaborator

@gBillal gBillal commented Dec 17, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the RTMP server implementation to support only one stream per connection, simplifying the architecture by removing multi-stream support. The change aligns the codebase with typical RTMP usage patterns where each connection handles a single stream.

Key changes include:

  • Simplified handler callbacks by removing stream_id parameters from all handler methods
  • Replaced multi-stream state tracking (streams_state map) with single stream tracking (stream_id field)
  • Updated state machine to track connection-level state (:init, :connected, :publishing, :playing) instead of per-stream state
  • Upgraded ex_flv dependency from 0.1.0 to 0.2.0 with corresponding API updates

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/ex_rtmp/server/handler.ex Removed stream_id parameters from all handler callbacks and removed handle_create_stream callback; updated handle_delete_stream return type to support :close signal
lib/ex_rtmp/server/client_session.ex Replaced multi-stream tracking with single stream support; simplified message handling for audio/video/metadata; refactored state management from per-stream to connection-level
test/support/server_handler.ex Updated to use new handler API without stream_id parameters; changed alias from AVCVideoPacket to VideoData.AVC for ex_flv 0.2.0 compatibility
mix.exs Updated ex_flv dependency constraint from ~> 0.1.0 to ~> 0.2.0
mix.lock Locked ex_flv to version 0.2.1
lib/ex_rtmp/server.ex Added info-level logging when server starts listening
lib/ex_rtmp/client/media_processor.ex Updated to use parse! instead of parse for ex_flv 0.2.0 API
lib/ex_rtmp/client.ex Minor improvement: replaced unused pattern match 0::32 with _::32 in handshake

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gBillal gBillal merged commit 957564d into master Dec 17, 2025
@gBillal gBillal deleted the allow-only-stream-per-connection branch December 17, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants