Skip to content

RTMP refactor events parsing#1808

Merged
wkozyra95 merged 3 commits into@wkozyra95/mp4-pausefrom
@wkozyra95/debug-rtmp-pause
Mar 16, 2026
Merged

RTMP refactor events parsing#1808
wkozyra95 merged 3 commits into@wkozyra95/mp4-pausefrom
@wkozyra95/debug-rtmp-pause

Conversation

@wkozyra95
Copy link
Copy Markdown
Member

No description provided.

@wkozyra95 wkozyra95 force-pushed the @wkozyra95/debug-rtmp-pause branch 2 times, most recently from f57ee9d to 4a883e6 Compare March 13, 2026 13:36
@wkozyra95 wkozyra95 force-pushed the @wkozyra95/debug-rtmp-pause branch from 4a883e6 to 069bec4 Compare March 16, 2026 09:22
@wkozyra95 wkozyra95 changed the title [WIP] RTMP refactor events parsing RTMP refactor events parsing Mar 16, 2026
@wkozyra95 wkozyra95 marked this pull request as ready for review March 16, 2026 10:31
Copy link
Copy Markdown
Contributor

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

Refactors RTMP message/event handling to parse media and metadata into typed RTMP message variants (Audio/Video/Data) instead of a single Event wrapper, and adjusts some connection/protocol constants and shutdown behavior.

Changes:

  • Split RTMP parsing/serialization into AudioMessage, VideoMessage, and DataMessage variants and update server/client connection threads accordingly.
  • Replace FLV ScriptData metadata parsing with direct AMF0 value handling for onMetaData.
  • Minor protocol tweaks (peer bandwidth constant, chunk stream id naming) and connection shutdown handling.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
smelter-core/src/pipeline/rtmp/rtmp_input/connection.rs Renames “decoder channel closed” error variant and maps send failures to the new name.
rtmp/src/server/negotiation.rs Updates PEER_BANDWIDTH constant.
rtmp/src/server/connection_thread.rs Converts parsed RtmpMessage variants into RtmpEvent and forwards them to the pipeline.
rtmp/src/protocol/message_stream.rs Uses RtmpMessage::is_media_packet() for log level selection.
rtmp/src/message/mod.rs Introduces new RtmpMessage variants (Audio/Video/Data) and is_media_packet() helper.
rtmp/src/message/parse.rs Parses raw RTMP messages into the new typed RtmpMessage variants.
rtmp/src/message/serialize.rs Serializes new typed message variants (AMF0 data message + audio/video raw serialization).
rtmp/src/message/audio.rs New: audio message parse/serialize implementation.
rtmp/src/message/video.rs New: video message parse/serialize implementation.
rtmp/src/message/data.rs New: AMF0 data message parsing for onMetaData.
rtmp/src/message/event.rs Removed legacy event-based parsing/serialization.
rtmp/src/flv/scriptdata.rs Removed legacy ScriptData representation.
rtmp/src/flv/mod.rs Removes ScriptData re-exports.
rtmp/src/events.rs Updates RtmpEvent variants for unknown media + metadata payload type.
rtmp/src/client.rs Sends typed messages instead of RtmpMessage::Event and emits DeleteStream on drop.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment thread rtmp/src/message/data.rs Outdated
Comment thread rtmp/src/message/video.rs
Comment thread rtmp/src/message/data.rs
@wkozyra95 wkozyra95 merged commit 8556b01 into @wkozyra95/mp4-pause Mar 16, 2026
4 checks passed
@wkozyra95 wkozyra95 deleted the @wkozyra95/debug-rtmp-pause branch March 16, 2026 11:06
@wkozyra95 wkozyra95 restored the @wkozyra95/debug-rtmp-pause branch March 16, 2026 11:06
@wkozyra95 wkozyra95 deleted the @wkozyra95/debug-rtmp-pause branch March 16, 2026 11:08
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.

3 participants