Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 71 additions & 71 deletions doc/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@

- [Variant](#fishjam-media_events-Variant)

- [fishjam/notifications/shared.proto](#fishjam_notifications_shared-proto)
- [Track](#fishjam-notifications-Track)

- [TrackEncoding](#fishjam-notifications-TrackEncoding)
- [TrackType](#fishjam-notifications-TrackType)

- [fishjam/peer_notifications.proto](#fishjam_peer_notifications-proto)
- [PeerMessage](#fishjam-PeerMessage)
- [PeerMessage.AuthRequest](#fishjam-PeerMessage-AuthRequest)
Expand Down Expand Up @@ -103,12 +109,6 @@

- [ServerMessage.EventType](#fishjam-ServerMessage-EventType)

- [fishjam/shared_notifications.proto](#fishjam_shared_notifications-proto)
- [Track](#fishjam-Track)

- [TrackEncoding](#fishjam-TrackEncoding)
- [TrackType](#fishjam-TrackType)

- [Scalar Value Types](#scalar-value-types)


Expand Down Expand Up @@ -146,7 +146,7 @@ Request to add a track of the specified type

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| track | [Track](#fishjam-Track) | | Specification of the track to be added |
| track | [notifications.Track](#fishjam-notifications-Track) | | Specification of the track to be added |
| codec_params | [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters) | | Parameters of the input data stream |


Expand All @@ -162,7 +162,7 @@ Request to add a track of the specified type

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| encoding | [TrackEncoding](#fishjam-TrackEncoding) | | The format of the input stream, defaults to pcm16 |
| encoding | [notifications.TrackEncoding](#fishjam-notifications-TrackEncoding) | | The format of the input stream, defaults to pcm16 |
| sample_rate | [uint32](#uint32) | | The sample rate of the input stream, may be omitted for opus |
| channels | [uint32](#uint32) | | The number of channels. 1 means mono, 2 means stereo |

Expand Down Expand Up @@ -252,7 +252,7 @@ Notification containing a chunk of a track's data stream
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| peer_id | [string](#string) | | |
| track | [Track](#fishjam-Track) | | |
| track | [notifications.Track](#fishjam-notifications-Track) | | |
| data | [bytes](#bytes) | | |


Expand Down Expand Up @@ -1023,6 +1023,65 @@ Contains information about an ICE candidate which will be sent to the peer/serve



<a name="fishjam_notifications_shared-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## fishjam/notifications/shared.proto



<a name="fishjam-notifications-Track"></a>

### Track
Describes a media track


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
| type | [TrackType](#fishjam-notifications-TrackType) | | |
| metadata | [string](#string) | | |








<a name="fishjam-notifications-TrackEncoding"></a>

### TrackEncoding


| Name | Number | Description |
| ---- | ------ | ----------- |
| TRACK_ENCODING_UNSPECIFIED | 0 | |
| TRACK_ENCODING_PCM16 | 1 | |
| TRACK_ENCODING_OPUS | 2 | |



<a name="fishjam-notifications-TrackType"></a>

### TrackType
Defines types of tracks being published by peers and component

| Name | Number | Description |
| ---- | ------ | ----------- |
| TRACK_TYPE_UNSPECIFIED | 0 | |
| TRACK_TYPE_VIDEO | 1 | |
| TRACK_TYPE_AUDIO | 2 | |










<a name="fishjam_peer_notifications-proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down Expand Up @@ -1481,7 +1540,7 @@ Notification sent when peer or component adds new track
| room_id | [string](#string) | | |
| peer_id | [string](#string) | | |
| component_id | [string](#string) | | |
| track | [Track](#fishjam-Track) | | |
| track | [notifications.Track](#fishjam-notifications-Track) | | |



Expand All @@ -1499,7 +1558,7 @@ Notification sent when metadata of a multimedia track is updated
| room_id | [string](#string) | | |
| peer_id | [string](#string) | | |
| component_id | [string](#string) | | |
| track | [Track](#fishjam-Track) | | |
| track | [notifications.Track](#fishjam-notifications-Track) | | |



Expand All @@ -1517,7 +1576,7 @@ Notification sent when a track is removed
| room_id | [string](#string) | | |
| peer_id | [string](#string) | | |
| component_id | [string](#string) | | |
| track | [Track](#fishjam-Track) | | |
| track | [notifications.Track](#fishjam-notifications-Track) | | |



Expand Down Expand Up @@ -1577,65 +1636,6 @@ Defines message groups for which peer can subscribe



<a name="fishjam_shared_notifications-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## fishjam/shared_notifications.proto



<a name="fishjam-Track"></a>

### Track
Describes a media track


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
| type | [TrackType](#fishjam-TrackType) | | |
| metadata | [string](#string) | | |








<a name="fishjam-TrackEncoding"></a>

### TrackEncoding


| Name | Number | Description |
| ---- | ------ | ----------- |
| TRACK_ENCODING_UNSPECIFIED | 0 | |
| TRACK_ENCODING_PCM16 | 1 | |
| TRACK_ENCODING_OPUS | 2 | |



<a name="fishjam-TrackType"></a>

### TrackType
Defines types of tracks being published by peers and component

| Name | Number | Description |
| ---- | ------ | ----------- |
| TRACK_TYPE_UNSPECIFIED | 0 | |
| TRACK_TYPE_VIDEO | 1 | |
| TRACK_TYPE_AUDIO | 2 | |










## Scalar Value Types

| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
Expand Down
8 changes: 4 additions & 4 deletions fishjam/agent_notifications.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package fishjam;

import "fishjam/shared_notifications.proto";
import "fishjam/notifications/shared.proto";

// Defines any type of message passed from agent peer to Fishjam
message AgentRequest {
Expand All @@ -15,15 +15,15 @@ message AgentRequest {
message AddTrack {
message CodecParameters {
// The format of the input stream, defaults to pcm16
fishjam.TrackEncoding encoding = 1;
notifications.TrackEncoding encoding = 1;
// The sample rate of the input stream, may be omitted for opus
uint32 sample_rate = 2;
// The number of channels. 1 means mono, 2 means stereo
uint32 channels = 3;
}

// Specification of the track to be added
fishjam.Track track = 1;
notifications.Track track = 1;
// Parameters of the input data stream
CodecParameters codec_params = 2;
}
Expand Down Expand Up @@ -55,7 +55,7 @@ message AgentResponse {
// Notification containing a chunk of a track's data stream
message TrackData {
string peer_id = 1;
fishjam.Track track = 2;
notifications.Track track = 2;
bytes data = 3;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package fishjam;
package fishjam.notifications;

// Defines types of tracks being published by peers and component
enum TrackType {
Expand Down
8 changes: 4 additions & 4 deletions fishjam/server_notifications.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package fishjam;

import "fishjam/shared_notifications.proto";
import "fishjam/notifications/shared.proto";

// Defines any type of message passed between FJ and server peer
message ServerMessage {
Expand Down Expand Up @@ -113,7 +113,7 @@ message ServerMessage {
string peer_id = 2;
string component_id = 3;
}
fishjam.Track track = 4;
notifications.Track track = 4;
}

// Notification sent when a track is removed
Expand All @@ -123,7 +123,7 @@ message ServerMessage {
string peer_id = 2;
string component_id = 3;
}
fishjam.Track track = 4;
notifications.Track track = 4;
}

// Notification sent when metadata of a multimedia track is updated
Expand All @@ -133,7 +133,7 @@ message ServerMessage {
string peer_id = 2;
string component_id = 3;
}
fishjam.Track track = 4;
notifications.Track track = 4;
}

// Notification sent when streamer successfully connects
Expand Down
6 changes: 3 additions & 3 deletions fishjam_protos/lib/fishjam/agent_notifications.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Fishjam.AgentRequest.AddTrack.CodecParameters do

use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3

field :encoding, 1, type: Fishjam.TrackEncoding, enum: true
field :encoding, 1, type: Fishjam.Notifications.TrackEncoding, enum: true
field :sample_rate, 2, type: :uint32, json_name: "sampleRate"
field :channels, 3, type: :uint32
end
Expand All @@ -21,7 +21,7 @@ defmodule Fishjam.AgentRequest.AddTrack do

use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3

field :track, 1, type: Fishjam.Track
field :track, 1, type: Fishjam.Notifications.Track

field :codec_params, 2,
type: Fishjam.AgentRequest.AddTrack.CodecParameters,
Expand Down Expand Up @@ -79,7 +79,7 @@ defmodule Fishjam.AgentResponse.TrackData do
use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3

field :peer_id, 1, type: :string, json_name: "peerId"
field :track, 2, type: Fishjam.Track
field :track, 2, type: Fishjam.Notifications.Track
field :data, 3, type: :bytes
end

Expand Down
29 changes: 29 additions & 0 deletions fishjam_protos/lib/fishjam/notifications/shared.pb.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
defmodule Fishjam.Notifications.TrackType do
@moduledoc false

use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3

field :TRACK_TYPE_UNSPECIFIED, 0
field :TRACK_TYPE_VIDEO, 1
field :TRACK_TYPE_AUDIO, 2
end

defmodule Fishjam.Notifications.TrackEncoding do
@moduledoc false

use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3

field :TRACK_ENCODING_UNSPECIFIED, 0
field :TRACK_ENCODING_PCM16, 1
field :TRACK_ENCODING_OPUS, 2
end

defmodule Fishjam.Notifications.Track do
@moduledoc false

use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3

field :id, 1, type: :string
field :type, 2, type: Fishjam.Notifications.TrackType, enum: true
field :metadata, 3, type: :string
end
6 changes: 3 additions & 3 deletions fishjam_protos/lib/fishjam/server_notifications.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ defmodule Fishjam.ServerMessage.TrackAdded do
field :room_id, 1, type: :string, json_name: "roomId"
field :peer_id, 2, type: :string, json_name: "peerId", oneof: 0
field :component_id, 3, type: :string, json_name: "componentId", oneof: 0
field :track, 4, type: Fishjam.Track
field :track, 4, type: Fishjam.Notifications.Track
end

defmodule Fishjam.ServerMessage.TrackRemoved do
Expand All @@ -174,7 +174,7 @@ defmodule Fishjam.ServerMessage.TrackRemoved do
field :room_id, 1, type: :string, json_name: "roomId"
field :peer_id, 2, type: :string, json_name: "peerId", oneof: 0
field :component_id, 3, type: :string, json_name: "componentId", oneof: 0
field :track, 4, type: Fishjam.Track
field :track, 4, type: Fishjam.Notifications.Track
end

defmodule Fishjam.ServerMessage.TrackMetadataUpdated do
Expand All @@ -187,7 +187,7 @@ defmodule Fishjam.ServerMessage.TrackMetadataUpdated do
field :room_id, 1, type: :string, json_name: "roomId"
field :peer_id, 2, type: :string, json_name: "peerId", oneof: 0
field :component_id, 3, type: :string, json_name: "componentId", oneof: 0
field :track, 4, type: Fishjam.Track
field :track, 4, type: Fishjam.Notifications.Track
end

defmodule Fishjam.ServerMessage.StreamConnected do
Expand Down
Loading