-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add fishjam_protos library * Fix CI rewrite fishjam_protos README * Fix CI * Add end line in compile_proto.sh
- Loading branch information
Showing
12 changed files
with
921 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,4 @@ | ||
# Used by "mix format" | ||
[ | ||
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] | ||
] |
This file contains 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,26 @@ | ||
# The directory Mix will write compiled artifacts to. | ||
/_build/ | ||
|
||
# If you run "mix test --cover", coverage assets end up here. | ||
/cover/ | ||
|
||
# The directory Mix downloads your dependencies sources to. | ||
/deps/ | ||
|
||
# Where third-party dependencies like ExDoc output generated docs. | ||
/doc/ | ||
|
||
# Ignore .fetch files in case you like to edit your project deps locally. | ||
/.fetch | ||
|
||
# If the VM crashes, it generates a dump, let's ignore it too. | ||
erl_crash.dump | ||
|
||
# Also ignore archive artifacts (built via "mix archive.build"). | ||
*.ez | ||
|
||
# Ignore package tarball (built via "mix hex.build"). | ||
fishjam_protos-*.tar | ||
|
||
# Temporary files, for example, from tests. | ||
/tmp/ |
This file contains 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,16 @@ | ||
# FishjamProtos | ||
|
||
Elixir protobuf modules for Fishjam and [MembraneRTCEngine](https://github.com/fishjam-cloud/membrane_rtc_engine) | ||
|
||
## Installation | ||
|
||
The package can be installed by adding `fishjam_protos` to your list of dependencies in `mix.exs`: | ||
|
||
```elixir | ||
def deps do | ||
[ | ||
{:fishjam_protos, "~> 0.1.0"} | ||
] | ||
end | ||
``` | ||
|
This file contains 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,19 @@ | ||
#!/bin/bash | ||
|
||
# Terminate on errors | ||
set -e | ||
|
||
cd .. | ||
|
||
files=$(find fishjam -name "*.proto") | ||
|
||
printf "Compiling:\n" | ||
count=1 | ||
total=${#files[@]} | ||
|
||
for file in $files; do | ||
printf "Compile file %s %s ... " $count $file | ||
protoc --elixir_out=./fishjam_protos/lib $file | ||
printf "DONE\n" | ||
count=$(($count + 1)) | ||
done |
146 changes: 146 additions & 0 deletions
146
fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex
This file contains 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,146 @@ | ||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.VariantBitrate do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:variant, 1, type: Fishjam.MediaEvents.Variant, enum: true) | ||
field(:bitrate, 2, type: :int32) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.TrackIdToMetadata do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:track_id, 1, type: :string, json_name: "trackId") | ||
field(:metadata, 2, type: Fishjam.MediaEvents.Metadata) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.TrackIdToBitrates do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
oneof(:tracks, 0) | ||
|
||
field(:track_bitrate, 1, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrate, | ||
json_name: "trackBitrate", | ||
oneof: 0 | ||
) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.Connect do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:metadata, 1, type: Fishjam.MediaEvents.Metadata) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.Disconnect do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.UpdateEndpointMetadata do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:metadata, 1, type: Fishjam.MediaEvents.Metadata) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.UpdateTrackMetadata do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:track_id, 1, type: :string, json_name: "trackId") | ||
field(:metadata, 2, type: Fishjam.MediaEvents.Metadata) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.RenegotiateTracks do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:sdp_offer, 1, type: :string, json_name: "sdpOffer") | ||
|
||
field(:track_id_to_metadata, 2, | ||
repeated: true, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.TrackIdToMetadata, | ||
json_name: "trackIdToMetadata" | ||
) | ||
|
||
field(:track_id_to_bitrates, 3, | ||
repeated: true, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.TrackIdToBitrates, | ||
json_name: "trackIdToBitrates" | ||
) | ||
|
||
field(:mid_to_track_id, 4, | ||
repeated: true, | ||
type: Fishjam.MediaEvents.MidToTrackId, | ||
json_name: "midToTrackId" | ||
) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrate do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
field(:track_id, 1, type: :string, json_name: "trackId") | ||
field(:bitrate, 2, type: :int32) | ||
end | ||
|
||
defmodule Fishjam.MediaEvents.Peer.MediaEvent do | ||
@moduledoc false | ||
|
||
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0" | ||
|
||
oneof(:content, 0) | ||
|
||
field(:connect, 1, type: Fishjam.MediaEvents.Peer.MediaEvent.Connect, oneof: 0) | ||
field(:disconnect, 2, type: Fishjam.MediaEvents.Peer.MediaEvent.Disconnect, oneof: 0) | ||
|
||
field(:update_endpoint_metadata, 3, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.UpdateEndpointMetadata, | ||
json_name: "updateEndpointMetadata", | ||
oneof: 0 | ||
) | ||
|
||
field(:update_track_metadata, 4, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.UpdateTrackMetadata, | ||
json_name: "updateTrackMetadata", | ||
oneof: 0 | ||
) | ||
|
||
field(:renegotiate_tracks, 5, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.RenegotiateTracks, | ||
json_name: "renegotiateTracks", | ||
oneof: 0 | ||
) | ||
|
||
field(:candidate, 6, type: Fishjam.MediaEvents.Candidate, oneof: 0) | ||
|
||
field(:sdp_offer, 7, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer, | ||
json_name: "sdpOffer", | ||
oneof: 0 | ||
) | ||
|
||
field(:track_bitrate, 8, | ||
type: Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrate, | ||
json_name: "trackBitrate", | ||
oneof: 0 | ||
) | ||
end |
Oops, something went wrong.