-
Notifications
You must be signed in to change notification settings - Fork 1
Media events no simulcast #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
94cfc9c
Add protobufs for media events
Karolk99 424d693
Format media events
Karolk99 973189b
Add ADR document open for discussion
Karolk99 8eaa618
Add protobufs for media events (no simulcast)
Karolk99 0f7d4ce
Fix lint warnings
Karolk99 0addea9
Requested changes
Karolk99 964527e
Requested changes
Karolk99 8c4edab
Requested changes
Karolk99 2190cd9
Remove simulcast track variants
Karolk99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package fishjam.media_events.peer; | ||
|
|
||
| import "fishjam/media_events/shared.proto"; | ||
|
|
||
| // Defines any type of message sent from Peer to Membrane RTC Engine | ||
| message MediaEvent { | ||
| // SCHEMAS | ||
| message VariantBitrate { | ||
| media_events.Variant variant = 1; | ||
| int32 bitrate = 2; | ||
| } | ||
|
|
||
| message TrackIdToMetadata { | ||
| string track_id = 1; | ||
| media_events.Metadata metadata = 2; | ||
| } | ||
|
|
||
| message TrackIdToBitrates { | ||
| oneof tracks { | ||
| TrackBitrate track_bitrate = 1; | ||
| } | ||
| } | ||
|
|
||
| // MEDIA EVENTS | ||
|
|
||
| // Sent when a peer wants to join WebRTC Endpoint. | ||
| message Connect { | ||
| media_events.Metadata metadata = 1; | ||
| } | ||
|
|
||
| // Sent when a peer disconnects from WebRTC Endpoint. | ||
| message Disconnect {} | ||
|
|
||
| // Sent when a peer wants to update its metadata | ||
| message UpdateEndpointMetadata { | ||
| media_events.Metadata metadata = 1; | ||
| } | ||
|
|
||
| // Sent when a peer wants to update its track's metadata | ||
| message UpdateTrackMetadata { | ||
| string track_id = 1; | ||
| media_events.Metadata metadata = 2; | ||
| } | ||
|
|
||
| // Sent when peer wants to renegatiate connection due to adding a track or removing a track | ||
| message RenegotiateTracks {} | ||
|
|
||
| // Sent as a response to `offerData` media event during renegotiation | ||
| // Maps contain only information about current peer's `sendonly` tracks. | ||
| // The "mid" is an identifier used to associate an RTP packet with an MLine from the SDP offer/answer. | ||
| message SdpOffer { | ||
| string sdp_offer = 1; | ||
| repeated TrackIdToMetadata track_id_to_metadata = 2; | ||
| repeated TrackIdToBitrates track_id_to_bitrates = 3; | ||
| repeated media_events.MidToTrackId mid_to_track_id = 4; | ||
| } | ||
|
|
||
| // Sent when Peer wants to update its track's bitrate | ||
| message TrackBitrate { | ||
| string track_id = 1; | ||
| int32 bitrate = 2; | ||
| } | ||
|
|
||
| oneof content { | ||
| Connect connect = 1; | ||
| Disconnect disconnect = 2; | ||
| UpdateEndpointMetadata update_endpoint_metadata = 3; | ||
| UpdateTrackMetadata update_track_metadata = 4; | ||
| RenegotiateTracks renegotiate_tracks = 5; | ||
| media_events.Candidate candidate = 6; | ||
| SdpOffer sdp_offer = 7; | ||
| TrackBitrate track_bitrate = 8; | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package fishjam.media_events.server; | ||
|
|
||
| import "fishjam/media_events/shared.proto"; | ||
|
|
||
| // Defines any type of message sent from Membrane RTC Engine to Peer | ||
| message MediaEvent { | ||
| // SCHEMAS | ||
| message Track { | ||
| string track_id = 1; | ||
| media_events.Metadata metadata = 2; | ||
| } | ||
|
|
||
| message Endpoint { | ||
| string endpoint_id = 1; | ||
| string endpoint_type = 2; | ||
| media_events.Metadata metadata = 3; | ||
| repeated Track tracks = 4; | ||
| } | ||
|
|
||
| // MEDIA EVENTS | ||
|
|
||
| // Sent when metadata of one of the endpoints was updated | ||
| message EndpointUpdated { | ||
| string endpoint_id = 1; | ||
| media_events.Metadata metadata = 2; | ||
| } | ||
|
|
||
| // Sent when metadata of one of the tracks was updated | ||
| message TrackUpdated { | ||
| string endpoint_id = 1; | ||
| string track_id = 2; | ||
| media_events.Metadata metadata = 3; | ||
| } | ||
|
|
||
| // Sent to informs that one of the peers has added one or more tracks. | ||
| message TracksAdded { | ||
| string endpoint_id = 1; | ||
| repeated Track tracks = 2; | ||
| } | ||
|
|
||
| // Sent to informs that one of the peers has removed one or more tracks. | ||
| message TracksRemoved { | ||
| string endpoint_id = 1; | ||
| repeated string track_ids = 2; | ||
| } | ||
|
|
||
| // Sent to all peers in the room after a new endpoint was added. | ||
| message EndpointAdded { | ||
| string endpoint_id = 1; | ||
| media_events.Metadata metadata = 2; | ||
| } | ||
|
|
||
| // Sent to the peer after connecting to the WebRTC Endpoint. | ||
| message Connected { | ||
| string endpoint_id = 1; | ||
| repeated Endpoint endpoints = 2; | ||
| } | ||
|
|
||
| // Sent to all remaining peers in the room after some endpoint was removed. | ||
| message EndpointRemoved { | ||
| string endpoint_id = 1; | ||
| } | ||
|
|
||
| // Sent to inform that an error occurred on the server providing a message to show | ||
| message Error { | ||
| string message = 1; | ||
| } | ||
|
|
||
| // Sent to inform about the number of audio and video tracks that will be sent from the engine to the peer | ||
| message OfferData { | ||
| message TrackTypes { | ||
| int32 audio = 1; | ||
| int32 video = 2; | ||
| } | ||
|
|
||
| TrackTypes tracks_types = 1; | ||
| } | ||
|
|
||
| // Sent after receiving `SdpOffer` from Peer | ||
| message SdpAnswer { | ||
| string sdp_answer = 1; | ||
| repeated media_events.MidToTrackId mid_to_track_id = 2; | ||
| } | ||
|
|
||
| // Sent to inform that the track denoted by `trackId` has changed their voice actiivty | ||
| // For this notification to work, the server must be configured to use VAD extension | ||
| // and the sender must support it. | ||
| message VadNotification { | ||
| enum Status { | ||
| STATUS_UNSPECIFIED = 0; | ||
| STATUS_SILENCE = 1; | ||
| STATUS_SPEECH = 2; | ||
| } | ||
|
|
||
| string track_id = 1; | ||
| Status status = 2; | ||
| } | ||
|
|
||
| oneof content { | ||
| EndpointUpdated endpoint_updated = 1; | ||
| TrackUpdated track_updated = 2; | ||
| TracksAdded tracks_added = 3; | ||
| TracksRemoved tracks_removed = 4; | ||
| EndpointAdded endpoint_added = 5; | ||
| EndpointRemoved endpoint_removed = 6; | ||
| Connected connected = 7; | ||
| Error error = 8; | ||
| OfferData offer_data = 9; | ||
| media_events.Candidate candidate = 10; | ||
| SdpAnswer sdp_answer = 11; | ||
| VadNotification vad_notification = 12; | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package fishjam.media_events; | ||
|
|
||
| enum Variant { | ||
| VARIANT_UNSPECIFIED = 0; | ||
| VARIANT_LOW = 1; | ||
| VARIANT_MEDIUM = 2; | ||
| VARIANT_HIGH = 3; | ||
| } | ||
|
|
||
| message Metadata { | ||
| string json = 1; | ||
| } | ||
|
|
||
| message MidToTrackId { | ||
| string mid = 1; | ||
| string track_id = 2; | ||
| } | ||
|
|
||
| // Contains information about an ICE candidate which will be sent to the peer/server | ||
| message Candidate { | ||
| string candidate = 1; | ||
| int32 sdp_m_line_index = 2; | ||
| string sdp_mid = 3; | ||
| string username_fragment = 4; | ||
| } |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.