RTMP refactor events parsing#1808
Merged
wkozyra95 merged 3 commits into@wkozyra95/mp4-pausefrom Mar 16, 2026
Merged
Conversation
f57ee9d to
4a883e6
Compare
4a883e6 to
069bec4
Compare
Contributor
There was a problem hiding this comment.
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, andDataMessagevariants and update server/client connection threads accordingly. - Replace FLV
ScriptDatametadata parsing with direct AMF0 value handling foronMetaData. - 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.
wkazmierczak
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.