Skip to content

Commit

Permalink
layout
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Nov 27, 2024
1 parent d2e4c04 commit 7caa8b7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ type publishOptions struct {
videoRepublish time.Duration
videoOnly bool
videoTrackID string

layout string
}

type fileOptions struct {
Expand Down Expand Up @@ -92,7 +94,7 @@ func (r *Runner) build(test *testCase) *rpc.StartEgressRequest {
case types.RequestTypeRoomComposite:
room := &livekit.RoomCompositeEgressRequest{
RoomName: r.RoomName,
Layout: "speaker",
Layout: test.layout,
AudioOnly: test.audioOnly,
VideoOnly: test.videoOnly,
}
Expand Down
2 changes: 1 addition & 1 deletion test/ffprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func verify(t *testing.T, in string, p *config.PipelineConfig, res *livekit.Egre
}

// Check source type
if p.RequestType == types.RequestTypeRoomComposite && p.VideoEnabled {
if p.RequestType == types.RequestTypeRoomComposite && (p.VideoEnabled || p.Layout != "") {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType)
} else {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_SDK, res.SourceType)
Expand Down
2 changes: 2 additions & 0 deletions test/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (r *Runner) testFile(t *testing.T) {
requestType: types.RequestTypeRoomComposite, publishOptions: publishOptions{
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeH264,
layout: "speaker",
},
fileOptions: &fileOptions{
filename: "r_{room_name}_{time}.mp4",
Expand All @@ -54,6 +55,7 @@ func (r *Runner) testFile(t *testing.T) {
requestType: types.RequestTypeRoomComposite, publishOptions: publishOptions{
videoCodec: types.MimeTypeH264,
videoOnly: true,
layout: "speaker",
},
encodingOptions: &livekit.EncodingOptions{
VideoCodec: livekit.VideoCodec_H264_HIGH,
Expand Down
1 change: 1 addition & 0 deletions test/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func (r *Runner) testImages(t *testing.T) {
publishOptions: publishOptions{
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeH264,
layout: "speaker",
},
encodingOptions: &livekit.EncodingOptions{
Width: 640,
Expand Down
1 change: 1 addition & 0 deletions test/segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (r *Runner) testSegments(t *testing.T) {
publishOptions: publishOptions{
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeVP8,
layout: "speaker",
},
encodingOptions: &livekit.EncodingOptions{
AudioCodec: livekit.AudioCodec_AAC,
Expand Down
1 change: 1 addition & 0 deletions test/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func (r *Runner) testStream(t *testing.T) {
publishOptions: publishOptions{
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeVP8,
layout: "speaker",
},
streamOptions: &streamOptions{
streamUrls: []string{rtmpUrl1, badRtmpUrl1},
Expand Down

0 comments on commit 7caa8b7

Please sign in to comment.