-
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
ca51a5e
commit 0a4645c
Showing
38 changed files
with
1,610 additions
and
837 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
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,36 @@ | ||
// | ||
// Copyright © 2024 Stream.io Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import StreamWebRTC | ||
|
||
public enum AudioCodec: String, Sendable, Hashable { | ||
case none, opus, red | ||
|
||
public var description: String { | ||
rawValue | ||
} | ||
|
||
init(_ source: RTCRtpCodecParameters) { | ||
switch source.name.lowercased() { | ||
case AudioCodec.opus.rawValue: | ||
self = .opus | ||
case AudioCodec.red.rawValue: | ||
self = .red | ||
default: | ||
self = .none | ||
} | ||
} | ||
|
||
init(_ source: Stream_Video_Sfu_Models_Codec) { | ||
switch source.name.lowercased() { | ||
case AudioCodec.opus.rawValue: | ||
self = .opus | ||
case AudioCodec.red.rawValue: | ||
self = .red | ||
default: | ||
self = .none | ||
} | ||
} | ||
} |
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
Oops, something went wrong.