Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
change import name
Browse files Browse the repository at this point in the history
  • Loading branch information
karkakol committed Mar 18, 2024
1 parent a07f972 commit 2355063
Show file tree
Hide file tree
Showing 27 changed files with 49 additions and 42 deletions.
2 changes: 1 addition & 1 deletion MembraneRTC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Pod::Spec.new do |s|
s.swift_version = '5.0'

s.source_files = 'Sources/MembraneRTC/**/*'
s.dependency 'WebRTC-SDK', '=114.5735.08'
s.dependency 'WebRTCMembrane', '=104.5112.17'
s.dependency 'SwiftProtobuf'
s.dependency 'PromisesSwift'
s.dependency 'SwiftPhoenixClient', '~> 4.0.0'
Expand Down
2 changes: 1 addition & 1 deletion MembraneRTCTest/PeerConnectionManagerTest.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane
import XCTest

@testable import MembraneRTC
Expand Down
18 changes: 9 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"object": {
"pins": [
{
"package": "WebRTCMembrane",
"repositoryURL": "https://github.com/jellyfish-dev/ios-webrtc-specs.git",
"state": {
"branch": null,
"revision": "0ca2f6f4786a0592be4ee3046478e9cd138cf043",
"version": "104.5112.17"
}
},
{
"package": "Promises",
"repositoryURL": "https://github.com/google/promises.git",
Expand All @@ -19,15 +28,6 @@
"version": "6.6.0"
}
},
{
"package": "WebRTC",
"repositoryURL": "https://github.com/webrtc-sdk/Specs.git",
"state": {
"branch": null,
"revision": "4fa8d6d647fc759cdd0265fd413d2f28ea2e0e08",
"version": "114.5735.8"
}
},
{
"package": "Starscream",
"repositoryURL": "https://github.com/daltoniam/Starscream.git",
Expand Down
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ let package = Package(
)
],
dependencies: [
.package(name: "WebRTC", url: "https://github.com/webrtc-sdk/Specs.git", .exact("114.5735.08")),
.package(
name: "WebRTCMembrane", url: "https://github.com/jellyfish-dev/ios-webrtc-specs.git", .exact("104.5112.17")),
.package(
name: "SwiftProtobuf", url: "https://github.com/apple/swift-protobuf.git",
.upToNextMajor(from: "1.18.0")),
Expand All @@ -35,7 +36,7 @@ let package = Package(
.target(
name: "MembraneRTC",
dependencies: [
"WebRTC", "SwiftProtobuf", "Promises", "SwiftPhoenixClient",
"WebRTCMembrane", "SwiftProtobuf", "Promises", "SwiftPhoenixClient",
.product(name: "FBLPromises", package: "Promises"),
.product(name: "Logging", package: "swift-log"),
],
Expand Down
2 changes: 1 addition & 1 deletion ScreenBroadcastExt/SampleHandler.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import MembraneRTC
import ReplayKit
import WebRTC
import WebRTCMembrane
import os.log

/// App Group used by the extension to exchange buffers with the target application
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Constants.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

struct Constants {
static func simulcastEncodings() -> [RTCRtpEncodingParameters] {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/BroadcastSampleSource.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CoreMedia
import ReplayKit
import WebRTC
import WebRTCMembrane

/// A class working as a source of screen broadcast samples.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Capturers/CameraCapturer.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// `VideoCapturer` responsible for capturing device's camera.
class CameraCapturer: VideoCapturer {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Capturers/FileCapturer.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// `VideoCapturer` responsible for capturing video from given file
class FileCapturer: VideoCapturer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import WebRTC
import WebRTCMembrane

internal func downscaleResolution(from: Dimensions, to: Dimensions) -> Dimensions {
if from.height > to.height {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Capturers/ScreenCapturer.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ReplayKit
import WebRTC
import WebRTCMembrane

/// `VideoCapturer` responsible for capturing in-app screen, for device screen capture go see `BroadcastScreenCapture`
class ScreenCapturer: RTCVideoCapturer, VideoCapturer {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/AudioTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

public class AudioTrack: MediaTrackProvider, Equatable {
func rtcTrack() -> RTCMediaStreamTrack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/LocalAudioTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// Utility wrapper around a local `RTCAudioTrack` managing a local audio session.
public class LocalAudioTrack: AudioTrack, LocalTrack {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

public protocol LocalScreenBroadcastTrackDelegate: AnyObject {
func started()
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/LocalVideoTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// Utility wrapper around a local `RTCVideoTrack` also managing an instance of `VideoCapturer`
public class LocalVideoTrack: VideoTrack, LocalTrack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/MediaTrackProvider.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

// a utility protocol that allows to hide WebRTC internals from the package's user
// and still alowing the `MembraneRTC` to operate on WebRTC structures
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/RemoteAudioTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// Utility wrapper around a remote `RTCAudioTrack`.
public class RemoteAudioTrack: AudioTrack, RemoteTrack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/RemoteVideoTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// Utility wrapper around a remote `RTCVideoTrack`.
public class RemoteVideoTrack: VideoTrack, RemoteTrack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Media/Tracks/VideoTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

public class VideoTrack: MediaTrackProvider, Equatable {
func rtcTrack() -> RTCMediaStreamTrack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/MembraneRTC.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import Logging
import WebRTC
import WebRTCMembrane

internal var sdkLogger = Logger(label: "org.membrane.ios")
internal let pcLogPrefix = "[PeerConnection]"
Expand Down
8 changes: 4 additions & 4 deletions Sources/MembraneRTC/PeerConnectionFactoryWrapper.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

// class for managing RTCPeerConnection responsible for managing its media sources and
// handling various kinds of notifications
Expand All @@ -11,11 +11,11 @@ internal class PeerConnectionFactoryWrapper {
let decoderFactory = RTCDefaultVideoDecoderFactory()
let encoderFactory = getEncoderFactory(from: encoder)

let simulcastFactory = RTCVideoEncoderFactorySimulcast(
primary: encoderFactory, fallback: RTCDefaultVideoEncoderFactory())
// let simulcastFactory = RTCVideoEncoderFactorySimulcast(
// primary: encoderFactory, fallback: RTCDefaultVideoEncoderFactory())

self.factory = RTCPeerConnectionFactory(
encoderFactory: simulcastFactory, decoderFactory: decoderFactory)
encoderFactory: encoderFactory, decoderFactory: decoderFactory)
}

func createPeerConnection(_ configuration: RTCConfiguration, constraints: RTCMediaConstraints)
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/PeerConnectionListener.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

internal protocol PeerConnectionListener {
func onAddTrack(trackId: String, track: RTCMediaStreamTrack)
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/PeerConnectionManager.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import Logging
import WebRTC
import WebRTCMembrane

internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate {
// `RTCPeerConnection` config
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Types/Encoder.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

/// Enum describing possible encoders.
/// `DEFAULT` - default encoder, most likely software vp8 encoder (libvpx)
Expand Down
14 changes: 10 additions & 4 deletions Sources/MembraneRTC/Types/TrackData.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
public struct TrackData: Codable{
public struct TrackData: Codable {
public let metadata: Metadata
public let simulcastConfig: SimulcastConfig?
public init (metadata : Metadata, simulcastConfig : SimulcastConfig? = nil) {

public init(metadata: Metadata, simulcastConfig: SimulcastConfig? = nil) {
self.metadata = metadata
self.simulcastConfig = simulcastConfig
}


public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.metadata = try container.decodeIfPresent(Metadata.self, forKey: .metadata) ?? Metadata()
self.simulcastConfig = try container.decodeIfPresent(SimulcastConfig.self, forKey: .simulcastConfig)
}

func copyWith(metadata: Metadata? = nil, simulcastConfig: SimulcastConfig? = nil) -> TrackData {
return TrackData(
metadata: metadata ?? self.metadata,
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/UI/VideoView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WebRTC
import WebRTCMembrane

public protocol VideoViewDelegate: AnyObject {
func didChange(dimensions: Dimensions)
Expand Down
2 changes: 1 addition & 1 deletion Sources/MembraneRTC/Utilities/SimulcastUtils.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WebRTC
import WebRTCMembrane

extension RTCRtpEncodingParameters {
static func create(rid: String, active: Bool, scaleResolutionDownBy: NSNumber)
Expand Down

0 comments on commit 2355063

Please sign in to comment.