-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5502a9
commit 503e96a
Showing
4 changed files
with
608 additions
and
535 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
59 changes: 59 additions & 0 deletions
59
StreamVideoTests/Utilities/Dummy/Stream_Video_Sfu_Models_TrackInfo+Dummy.swift
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,59 @@ | ||
// | ||
// Copyright © 2024 Stream.io Inc. All rights reserved. | ||
// | ||
|
||
@testable import StreamVideo | ||
|
||
extension Stream_Video_Sfu_Models_TrackInfo { | ||
static func dummy( | ||
trackID: String = .unique, | ||
trackType: Stream_Video_Sfu_Models_TrackType, | ||
layers: [Stream_Video_Sfu_Models_VideoLayer] = [], | ||
mid: String | ||
) -> Stream_Video_Sfu_Models_TrackInfo { | ||
var result = Stream_Video_Sfu_Models_TrackInfo() | ||
result.trackID = trackID | ||
result.trackType = trackType | ||
result.layers = layers | ||
result.mid = mid | ||
return result | ||
} | ||
} | ||
|
||
extension Stream_Video_Sfu_Models_VideoLayer { | ||
static func dummy( | ||
rid: String = .unique, | ||
videoDimension: Stream_Video_Sfu_Models_VideoDimension = .dummy(), | ||
bitrate: UInt32 = 1000, | ||
fps: UInt32 = 30, | ||
quality: Stream_Video_Sfu_Models_VideoQuality = .high | ||
) -> Stream_Video_Sfu_Models_VideoLayer { | ||
var result = Stream_Video_Sfu_Models_VideoLayer() | ||
result.rid = rid | ||
result.videoDimension = videoDimension | ||
result.bitrate = bitrate | ||
result.fps = fps | ||
result.quality = quality | ||
return result | ||
} | ||
} | ||
|
||
extension Stream_Video_Sfu_Models_VideoDimension { | ||
static func dummy( | ||
width: UInt32 = 1920, | ||
height: UInt32 = 1080 | ||
) -> Stream_Video_Sfu_Models_VideoDimension { | ||
var result = Stream_Video_Sfu_Models_VideoDimension() | ||
result.width = width | ||
result.height = height | ||
return result | ||
} | ||
} | ||
|
||
extension Stream_Video_Sfu_Models_VideoQuality { | ||
static func dummy( | ||
rawValue: Int = 2 | ||
) -> Stream_Video_Sfu_Models_VideoQuality { | ||
Stream_Video_Sfu_Models_VideoQuality(rawValue: rawValue) ?? .high | ||
} | ||
} |
Oops, something went wrong.