From 0b9597b56b7152b2f00e16269afc6140a45a0993 Mon Sep 17 00:00:00 2001 From: Scott Driggers Date: Fri, 14 Jun 2024 21:32:54 -0400 Subject: [PATCH] Making Packet Sendable --- Sources/RTP/Packet.swift | 4 ++-- Sources/RTP/Types.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/RTP/Packet.swift b/Sources/RTP/Packet.swift index 0b34ecf..62351c6 100644 --- a/Sources/RTP/Packet.swift +++ b/Sources/RTP/Packet.swift @@ -1,7 +1,7 @@ import Foundation // Packet represents an individual RTP packet. -public struct Packet { +public struct Packet: Sendable { static let version: UInt8 = 2 static let versionMask: UInt8 = 0b1100_0000 static let paddingMask: UInt8 = 0b0010_0000 @@ -172,7 +172,7 @@ public struct Packet { } // Extension represents an RTP extension. -public struct Extension { +public struct Extension: Sendable { public typealias ProfileID = UInt16 static let headerSize = 4 diff --git a/Sources/RTP/Types.swift b/Sources/RTP/Types.swift index 5fa02ce..c77e34f 100644 --- a/Sources/RTP/Types.swift +++ b/Sources/RTP/Types.swift @@ -10,7 +10,7 @@ public enum EncodingError: Error { case tooManyCSRCs(_ count: Int) } -public struct PayloadType: ExpressibleByIntegerLiteral, RawRepresentable, Equatable { +public struct PayloadType: ExpressibleByIntegerLiteral, RawRepresentable, Equatable, Sendable { public typealias IntegerLiteralType = UInt8 public static let marker: Self = 0b1000_0000