Skip to content

Commit ce5a12c

Browse files
authored
simplify change publish options (#879)
* simplify change publish options * better comments
1 parent 4e6e4a9 commit ce5a12c

File tree

6 files changed

+513
-496
lines changed

6 files changed

+513
-496
lines changed

protobuf/video/sfu/event/events.pb.go

Lines changed: 371 additions & 386 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protobuf/video/sfu/event/events.proto

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,14 @@ message SfuEvent {
7777
ParticipantUpdated participant_updated = 24;
7878
// ParticipantMigrationComplete is sent when the participant migration is complete
7979
ParticipantMigrationComplete participant_migration_complete = 25;
80-
// ChangePublishOptionsComplete is sent to signal the completion of a ChangePublishOptions request.
81-
ChangePublishOptionsComplete change_publish_options_complete = 26;
8280
// ChangePublishOptions is sent to signal the change in publish options such as a new codec or simulcast layers
8381
ChangePublishOptions change_publish_options = 27;
8482
}
8583
}
8684

8785
message ChangePublishOptions {
88-
models.PublishOption publish_option = 1;
86+
repeated models.PublishOption publish_option = 1;
87+
string reason = 2;
8988
}
9089

9190
message ChangePublishOptionsComplete {

protobuf/video/sfu/event/events_vtproto.pb.go

Lines changed: 76 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protobuf/video/sfu/models/models.pb.go

Lines changed: 23 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protobuf/video/sfu/models/models.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,20 @@ message PublishOption {
142142
// - Half resolution (2 layers) = 640x360
143143
// - Quarter resolution (3 layers) = 320x180
144144
VideoDimension video_dimension = 7;
145+
146+
// The unique identifier for the publish request.
147+
// - This `id` is assigned exclusively by the SFU. Any `id` set by the client
148+
// in the `PublishOption` will be ignored and overwritten by the SFU.
149+
// - The primary purpose of this `id` is to uniquely identify each publish
150+
// request, even in scenarios where multiple publish requests for the same
151+
// `track_type` and `codec` are active simultaneously.
152+
// For example:
153+
// - A user may publish two tracks of the same type (e.g., video) and codec
154+
// (e.g., VP9) concurrently.
155+
// - This uniqueness ensures that individual requests can be managed
156+
// independently. For instance, an `id` is critical when stopping a specific
157+
// publish request without affecting others.
158+
int32 id = 8;
145159
}
146160

147161
message Codec {

protobuf/video/sfu/models/models_vtproto.pb.go

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)