Bump to 0.5.10 and delete wrong code

This commit is contained in:
shogo4405 2017-01-30 03:00:07 +09:00
parent b3d66984af
commit aed6102bd9
3 changed files with 4 additions and 9 deletions

View File

@ -47,8 +47,6 @@ final class AVCEncoder: NSObject {
var muted:Bool = false
var locked:atomic_flag = atomic_flag()
var scalingMode:String = AVCEncoder.defaultScalingMode {
didSet {
guard scalingMode != oldValue else {
@ -99,9 +97,7 @@ final class AVCEncoder: NSObject {
}
}
}
var lockQueue:DispatchQueue = DispatchQueue(
label: "com.github.shogo4405.lf.AVCEncoder.lock", attributes: []
)
var lockQueue:DispatchQueue = DispatchQueue(label: "com.github.shogo4405.lf.AVCEncoder.lock")
var expectedFPS:Float64 = AVMixer.defaultFPS {
didSet {
guard expectedFPS != oldValue else {
@ -265,7 +261,7 @@ final class AVCEncoder: NSObject {
}
func encodeImageBuffer(_ imageBuffer:CVImageBuffer, presentationTimeStamp:CMTime, duration:CMTime) {
guard running && !atomic_flag_test_and_set(&locked) else {
guard running else {
return
}
if (invalidateSession) {

View File

@ -654,12 +654,11 @@ extension RTMPStream: RTMPMuxerDelegate {
return
}
let type:FLVTagType = .video
atomic_flag_test_and_set_explicit(&mixer.videoIO.encoder.locked, memory_order(rawValue: 0))
let length:Int = rtmpConnection.socket.doOutput(chunk: RTMPChunk(
type: chunkTypes[type] == nil ? .zero : .one,
streamId: type.streamId,
message: type.message(with: id, timestamp: UInt32(videoTimestamp), buffer: buffer)
), locked: &mixer.videoIO.encoder.locked)
), locked: nil)
chunkTypes[type] = true
OSAtomicAdd64(Int64(length), &info.byteCount)
videoTimestamp = withTimestamp + (videoTimestamp - floor(videoTimestamp))

View File

@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "lf"
s.version = "0.5.9"
s.version = "0.5.10"
s.summary = "Camera and Microphone streaming library via RTMP, HLS for iOS, macOS."
s.description = <<-DESC