Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions framework/GPUImage.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Sunset Lake Software LLC";
TargetAttributes = {
BC6E7CAA1C39A9D8006DF678 = {
Expand All @@ -1313,10 +1313,11 @@
};
buildConfigurationList = BC6E7CA51C39A9D8006DF678 /* Build configuration list for PBXProject "GPUImage" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = BC6E7CA11C39A9D8006DF678;
productRefGroup = BC6E7CAC1C39A9D8006DF678 /* Products */;
Expand Down Expand Up @@ -1749,6 +1750,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -1809,6 +1811,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down
4 changes: 2 additions & 2 deletions framework/Source/Mac/MovieOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@ public class MovieOutput: ImageConsumer, AudioEncodingTarget {


public extension Timestamp {
public init(_ time:CMTime) {
init(_ time:CMTime) {
self.value = time.value
self.timescale = time.timescale
self.flags = TimestampFlags(rawValue:time.flags.rawValue)
self.epoch = time.epoch
}

public var asCMTime:CMTime {
var asCMTime:CMTime {
get {
return CMTimeMakeWithEpoch(value, timescale, epoch)
}
Expand Down
6 changes: 3 additions & 3 deletions framework/Source/Mac/PictureOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,21 @@ public class PictureOutput: ImageConsumer {
}

public extension ImageSource {
public func saveNextFrameToURL(_ url:URL, format:PictureFileFormat) {
func saveNextFrameToURL(_ url:URL, format:PictureFileFormat) {
let pictureOutput = PictureOutput()
pictureOutput.saveNextFrameToURL(url, format:format)
self --> pictureOutput
}
}

public extension NSImage {
public func filterWithOperation<T:ImageProcessingOperation>(_ operation:T) -> NSImage {
func filterWithOperation<T:ImageProcessingOperation>(_ operation:T) -> NSImage {
return filterWithPipeline{input, output in
input --> operation --> output
}
}

public func filterWithPipeline(_ pipeline:(PictureInput, PictureOutput) -> ()) -> NSImage {
func filterWithPipeline(_ pipeline:(PictureInput, PictureOutput) -> ()) -> NSImage {
let picture = PictureInput(image:self)
var outputImage:NSImage?
let pictureOutput = PictureOutput()
Expand Down
4 changes: 2 additions & 2 deletions framework/Source/Matrix.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func orthographicMatrix(_ left:Float, right:Float, bottom:Float, top:Float, near

#if !os(Linux)
public extension Matrix4x4 {
public init (_ transform3D:CATransform3D) {
init (_ transform3D:CATransform3D) {
self.m11 = Float(transform3D.m11)
self.m12 = Float(transform3D.m12)
self.m13 = Float(transform3D.m13)
Expand All @@ -117,7 +117,7 @@ public extension Matrix4x4 {
self.m44 = Float(transform3D.m44)
}

public init (_ transform:CGAffineTransform) {
init (_ transform:CGAffineTransform) {
self.init(CATransform3DMakeAffineTransform(transform))
}
}
Expand Down
12 changes: 6 additions & 6 deletions framework/Source/Pipeline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ infix operator --> : AdditionPrecedence
// MARK: Extensions and supporting types

public extension ImageSource {
public func addTarget(_ target:ImageConsumer, atTargetIndex:UInt? = nil) {
func addTarget(_ target:ImageConsumer, atTargetIndex:UInt? = nil) {
if let targetIndex = atTargetIndex {
target.setSource(self, atIndex:targetIndex)
targets.append(target, indexAtTarget:targetIndex)
Expand All @@ -44,14 +44,14 @@ public extension ImageSource {
}
}

public func removeAllTargets() {
func removeAllTargets() {
for (target, index) in targets {
target.removeSourceAtIndex(index)
}
targets.removeAll()
}

public func updateTargetsWithFramebuffer(_ framebuffer:Framebuffer) {
func updateTargetsWithFramebuffer(_ framebuffer:Framebuffer) {
if targets.count == 0 { // Deal with the case where no targets are attached by immediately returning framebuffer to cache
framebuffer.lock()
framebuffer.unlock()
Expand All @@ -68,15 +68,15 @@ public extension ImageSource {
}

public extension ImageConsumer {
public func addSource(_ source:ImageSource) -> UInt? {
func addSource(_ source:ImageSource) -> UInt? {
return sources.append(source, maximumInputs:maximumInputs)
}

public func setSource(_ source:ImageSource, atIndex:UInt) {
func setSource(_ source:ImageSource, atIndex:UInt) {
_ = sources.insert(source, atIndex:atIndex, maximumInputs:maximumInputs)
}

public func removeSourceAtIndex(_ index:UInt) {
func removeSourceAtIndex(_ index:UInt) {
sources.removeAtIndex(index)
}
}
Expand Down
10 changes: 5 additions & 5 deletions framework/Source/SerialDispatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ public protocol SerialDispatch {
}

public extension SerialDispatch {
public func runOperationAsynchronously(_ operation:@escaping () -> ()) {
func runOperationAsynchronously(_ operation:@escaping () -> ()) {
self.serialDispatchQueue.async {
self.makeCurrentContext()
operation()
}
}

public func runOperationSynchronously(_ operation:() -> ()) {
func runOperationSynchronously(_ operation:() -> ()) {
// TODO: Verify this works as intended
if (DispatchQueue.getSpecific(key:self.dispatchQueueKey) == 81) {
operation()
Expand All @@ -87,7 +87,7 @@ public extension SerialDispatch {
}
}

public func runOperationSynchronously(_ operation:() throws -> ()) throws {
func runOperationSynchronously(_ operation:() throws -> ()) throws {
var caughtError:Error? = nil
runOperationSynchronously {
do {
Expand All @@ -99,15 +99,15 @@ public extension SerialDispatch {
if (caughtError != nil) {throw caughtError!}
}

public func runOperationSynchronously<T>(_ operation:() throws -> T) throws -> T {
func runOperationSynchronously<T>(_ operation:() throws -> T) throws -> T {
var returnedValue: T!
try runOperationSynchronously {
returnedValue = try operation()
}
return returnedValue
}

public func runOperationSynchronously<T>(_ operation:() -> T) -> T {
func runOperationSynchronously<T>(_ operation:() -> T) -> T {
var returnedValue: T!
runOperationSynchronously {
returnedValue = operation()
Expand Down