Use NotSync Parameter Instead Of DependsOnOthers
This commit is contained in:
parent
91dbcd3a49
commit
fd29d05f07
|
@ -10,15 +10,6 @@ extension CMSampleBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
var dependsOnOthers: Bool {
|
||||
get {
|
||||
return getAttachmentValue(for: kCMSampleAttachmentKey_DependsOnOthers) ?? true
|
||||
}
|
||||
set {
|
||||
setAttachmentValue(for: kCMSampleAttachmentKey_DependsOnOthers, value: newValue)
|
||||
}
|
||||
}
|
||||
|
||||
var dataBuffer: CMBlockBuffer? {
|
||||
get {
|
||||
return CMSampleBufferGetDataBuffer(self)
|
||||
|
|
|
@ -262,7 +262,7 @@ extension TSWriter: VideoEncoderDelegate {
|
|||
count: UInt32(length),
|
||||
presentationTimeStamp: sampleBuffer.presentationTimeStamp,
|
||||
decodeTimeStamp: sampleBuffer.decodeTimeStamp,
|
||||
randomAccessIndicator: !sampleBuffer.dependsOnOthers
|
||||
randomAccessIndicator: !sampleBuffer.isNotSync
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ extension RTMPMuxer: VideoEncoderDelegate {
|
|||
}
|
||||
|
||||
func sampleOutput(video sampleBuffer: CMSampleBuffer) {
|
||||
let keyframe: Bool = !sampleBuffer.dependsOnOthers
|
||||
let keyframe: Bool = !sampleBuffer.isNotSync
|
||||
var compositionTime: Int32 = 0
|
||||
let presentationTimeStamp: CMTime = sampleBuffer.presentationTimeStamp
|
||||
var decodeTimeStamp: CMTime = sampleBuffer.decodeTimeStamp
|
||||
|
|
Loading…
Reference in New Issue