Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Apr 23, 2024
1 parent f5bcde5 commit 0f03479
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Sora/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ public struct Configuration {
/// H264 向け映像コーデックパラメーター
public var videoH264Params: Encodable?

/// H265 向け映像コーデックパラメーター
public var videoH265Params: Encodable?

// MARK: - イベントハンドラ

/// WebSocket チャネルに関するイベントハンドラ
Expand Down
3 changes: 2 additions & 1 deletion Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
forwardingFilter: configuration.forwardingFilter,
vp9Params: configuration.videoVp9Params,
av1Params: configuration.videoAv1Params,
h264Params: configuration.videoH264Params
h264Params: configuration.videoH264Params,
h265Params: configuration.videoH265Params
)

Logger.debug(type: .peerChannel, message: "send connect")
Expand Down
9 changes: 9 additions & 0 deletions Sora/Signaling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ public struct SignalingConnect {

/// H264 向け映像コーデックパラメーター
public var h264Params: Encodable?

/// H265 向け映像コーデックパラメーター
public var h265Params: Encodable?
}

/**
Expand Down Expand Up @@ -789,6 +792,7 @@ extension SignalingConnect: Codable {
case vp9_params
case av1_params
case h264_params
case h265_params
}

enum AudioCodingKeys: String, CodingKey {
Expand Down Expand Up @@ -844,6 +848,11 @@ extension SignalingConnect: Codable {
let h264ParamsEnc = videoContainer.superEncoder(forKey: .h264_params)
try h264Params.encode(to: h264ParamsEnc)
}

if let h265Params {
let h265ParamsEnc = videoContainer.superEncoder(forKey: .h265_params)
try h265Params.encode(to: h265ParamsEnc)
}
}
} else {
try container.encode(false, forKey: .video)
Expand Down

0 comments on commit 0f03479

Please sign in to comment.