Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Sep 17, 2017
1 parent 050c1fa commit 821b303
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 0 additions & 3 deletions Sources/Media/AVMixer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ extension AVMixer: Runnable {
guard !running else {
return
}
if let factory:CIContextFactory = videoIO.contextFactory {
videoIO.context = factory()
}
DispatchQueue.global(qos: .userInteractive).async {
self.session.startRunning()
}
Expand Down
3 changes: 0 additions & 3 deletions Sources/Media/VideoIOComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import CoreImage
import Foundation
import AVFoundation

public typealias CIContextFactory = () -> CIContext

final class VideoIOComponent: IOComponent {
let lockQueue:DispatchQueue = DispatchQueue(label: "com.haishinkit.HaishinKit.VideoIOComponent.lock")
var context:CIContext?
Expand All @@ -22,7 +20,6 @@ final class VideoIOComponent: IOComponent {
}()

var effects:[VisualEffect] = []
var contextFactory:CIContextFactory?

#if os(iOS) || os(macOS)
var fps:Float64 = AVMixer.defaultFPS {
Expand Down
7 changes: 4 additions & 3 deletions Sources/Net/NetStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ open class NetStream: NSObject {
}

open var metadata:[String: Any?] = [:]
open var contextFactory:CIContextFactory? {

open var context:CIContext? {
get {
return mixer.videoIO.contextFactory
return mixer.videoIO.context
}
set {
mixer.videoIO.contextFactory = contextFactory
mixer.videoIO.context = context
}
}

Expand Down

0 comments on commit 821b303

Please sign in to comment.