Skip to content

Commit ae51e42

Browse files
authored
Merge pull request #5 from harlanhaskins/harlan/its-about-sending-a-message
Mark playlist types sendable
2 parents a8db615 + 242e2ae commit ae51e42

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Sources/M3U8Decoder/MasterPlaylist.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import Foundation
2929
/// #EXT-X-SESSION-DATA:<attribute-list>
3030
///
3131
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.4
32-
public struct EXT_X_SESSION_DATA: Decodable {
32+
public struct EXT_X_SESSION_DATA: Decodable, Sendable {
3333
/// The value of DATA-ID is a quoted-string that identifies a particular data value. This attribute is REQUIRED.
3434
public let data_id: String
3535
/// VALUE is a quoted-string. It contains the data identified by DATA-ID. This attribute is REQUIRED.
@@ -45,7 +45,7 @@ public struct EXT_X_SESSION_DATA: Decodable {
4545
/// #EXT-X-START:<attribute-list>
4646
///
4747
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.5.2
48-
public struct EXT_X_START: Decodable {
48+
public struct EXT_X_START: Decodable, Sendable {
4949
/// The value of TIME-OFFSET is a signed-decimal-floating-point number of seconds. This attribute is REQUIRED.
5050
public let time_offset: Int
5151
/// The value is an enumerated-string; valid strings are YES and NO. This attribute is OPTIONAL.
@@ -57,7 +57,7 @@ public struct EXT_X_START: Decodable {
5757
/// #EXT-X-MEDIA:<attribute-list>
5858
///
5959
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.1
60-
public struct EXT_X_MEDIA: Decodable {
60+
public struct EXT_X_MEDIA: Decodable, Sendable {
6161
/// The value is an enumerated-string; valid strings are AUDIO, VIDEO, SUBTITLES, and CLOSED-CAPTIONS. This attribute is REQUIRED.
6262
public let type: String
6363
/// The value is a quoted-string that specifies the group to which the Rendition belongs. This attribute is REQUIRED.
@@ -89,7 +89,7 @@ public struct EXT_X_MEDIA: Decodable {
8989
/// RESOLUTION=<width>x<height>
9090
///
9191
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.2
92-
public struct RESOLUTION: Decodable {
92+
public struct RESOLUTION: Decodable, Sendable {
9393
/// Width of a video.
9494
public let width: Int
9595
/// Height of a video.
@@ -101,7 +101,7 @@ public struct RESOLUTION: Decodable {
101101
/// #EXT-X-STREAM-INF:<attribute-list>
102102
///
103103
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.2
104-
public struct EXT_X_STREAM_INF: Decodable {
104+
public struct EXT_X_STREAM_INF: Decodable, Sendable {
105105
/// The value is a decimal-integer of bits per second. This attribute is REQUIRED.
106106
public let bandwidth: Int
107107
/// The value is a decimal-integer of bits per second. This attribute is OPTIONAL.
@@ -129,7 +129,7 @@ public struct EXT_X_STREAM_INF: Decodable {
129129
/// #EXT-X-I-FRAME-STREAM-INF:<attribute-list>
130130
///
131131
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.3
132-
public struct EXT_X_I_FRAME_STREAM_INF: Decodable {
132+
public struct EXT_X_I_FRAME_STREAM_INF: Decodable, Sendable {
133133
/// The value is a decimal-integer of bits per second. This attribute is REQUIRED.
134134
public let bandwidth: Int
135135
/// The value is a decimal-integer of bits per second. This attribute is OPTIONAL.
@@ -147,7 +147,7 @@ public struct EXT_X_I_FRAME_STREAM_INF: Decodable {
147147
}
148148

149149
/// Specifies a Variant Stream by `#EXT-X-STREAM-INF` tag followed by a `<URI>`.
150-
public struct VariantStream: Decodable {
150+
public struct VariantStream: Decodable, Sendable {
151151
/// Specifies a Variant Stream, which is a set of Renditions that can be combined to play the presentation.
152152
public let ext_x_stream_inf: EXT_X_STREAM_INF
153153
/// Specifies a Media Playlist that carries a Rendition of the Variant Stream.

Sources/M3U8Decoder/MediaPlaylist.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import Foundation
3131
/// #EXT-X-MAP:<attribute-list>
3232
///
3333
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.5
34-
public struct EXT_X_MAP: Decodable {
34+
public struct EXT_X_MAP: Decodable, Sendable {
3535
/// The value is a quoted-string containing a URI that identifies a resource that contains the Media Initialization Section. This attribute is REQUIRED.
3636
public let uri: String
3737
/// The value is a quoted-string specifying a byte range into the resource identified by the URI attribute. This attribute is OPTIONAL.
@@ -44,7 +44,7 @@ public struct EXT_X_MAP: Decodable {
4444
/// #EXT_X_SESSION_KEY:<attribute-list>
4545
///
4646
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.4
47-
public struct EXT_X_KEY: Decodable {
47+
public struct EXT_X_KEY: Decodable, Sendable {
4848
/// The value is an enumerated-string that specifies the encryption method. This attribute is REQUIRED.
4949
public let method: String
5050
/// The value is a quoted-string that specifies how the key is represented in the resource identified by the URI. This attribute is OPTIONAL.
@@ -62,7 +62,7 @@ public struct EXT_X_KEY: Decodable {
6262
/// #EXT-X-DATERANGE:<attribute-list>
6363
///
6464
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.7
65-
public struct EXT_X_DATERANGE: Decodable {
65+
public struct EXT_X_DATERANGE: Decodable, Sendable {
6666
/// A quoted-string that uniquely identifies a Date Range in the Playlist. This attribute is REQUIRED.
6767
public let id: String
6868
/// A client-defined quoted-string that specifies some set of attributes and their associated value semantics. This attribute is OPTIONAL.
@@ -90,7 +90,7 @@ public struct EXT_X_DATERANGE: Decodable {
9090
/// #EXTINF:<duration>,[<title>]
9191
///
9292
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.1
93-
public struct EXTINF: Decodable {
93+
public struct EXTINF: Decodable, Sendable {
9494
/// Specifies the duration of the Media Segment in seconds. This attribute is REQUIRED.
9595
public let duration: Double
9696
/// Human-readable informative title of the Media Segment. This attribute is OPTIONAL.
@@ -102,15 +102,15 @@ public struct EXTINF: Decodable {
102102
/// #EXT-X-BYTERANGE:<n>[@<o>]
103103
///
104104
/// RFC: https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.2
105-
public struct EXT_X_BYTERANGE: Decodable {
105+
public struct EXT_X_BYTERANGE: Decodable, Sendable {
106106
/// n is a decimal-integer indicating the length of the sub-range in bytes. This attribute is REQUIRED.
107107
public let length: Int
108108
/// o is a decimal-integer indicating the start of the sub-range, as a byte offset from the beginning of the resource. This attribute is OPTIONAL.
109109
public let start: Int?
110110
}
111111

112112
/// Specifies a Media Segment by a series of tags followed by a `<URI>`.
113-
public struct MediaSegment: Decodable {
113+
public struct MediaSegment: Decodable, Sendable {
114114
/// Specifies the duration of a Media Segment.
115115
public let extinf: EXTINF
116116
/// Indicates that a Media Segment is a sub-range of the resource identified by its URI.

0 commit comments

Comments
 (0)