Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Candidate/2.3.0 #140

Merged
merged 42 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bb5860e
Merge pull request #108 from Comcast/release/2.2.2
Aug 20, 2021
59040de
Fixed a compilation error on Xcode 16 Beta with tvOS 18.
fbernardo Jun 12, 2024
cd65779
Merge pull request #126 from fbernardo/fix/fbernardo/xcode_16_compila…
rmigneco Jul 17, 2024
a53ccc6
Added failing test for media sequence calculation with skip
theRealRobG Aug 31, 2024
9a404e3
Added EXT-X-SKIP tag
theRealRobG Aug 31, 2024
906648e
Accounted for skip tags in media sequence calculation
theRealRobG Aug 31, 2024
bc451b4
Adding multivariant playlist tags defined in draft 15 and still missi…
theRealRobG Sep 1, 2024
1b516be
Add attributes missing from EXT-X-MEDIA as of draft 15
theRealRobG Sep 2, 2024
b638a0e
Updated test comment with up-to-date docs for EXT-X-MEDIA
theRealRobG Sep 2, 2024
2acf718
Add attributes missing from EXT-X-STREAM-INF as of draft 15
theRealRobG Sep 2, 2024
880729d
Add attributes missing from EXT-X-I-FRAME-STREAM-INF as of draft 15
theRealRobG Sep 2, 2024
4d7f23d
Updated encryption method enum with new type
theRealRobG Sep 2, 2024
d50ba53
Added parsing for CHANNELS attribute
theRealRobG Sep 2, 2024
b662467
Added parsing for HDCP-LEVEL
theRealRobG Sep 2, 2024
f7c2e57
Added parsing for VIDEO-RANGE
theRealRobG Sep 3, 2024
f48196c
Added parsing for REQ-VIDEO-LAYOUT
theRealRobG Sep 3, 2024
23ded16
Added parsing for FORMAT in EXT-X-SESSION-DATA
theRealRobG Sep 3, 2024
3ea53bb
Corrected location for EXT-X-SESSION-DATA playlist validation
theRealRobG Sep 3, 2024
e5d22f9
Updated test sample manifest for readability
theRealRobG Sep 4, 2024
b3a8c3b
Updated media sequence calculation logic to avoid unnecessary looping
theRealRobG Sep 4, 2024
bed5de1
Adding action to build and test iOS and tvOS targets
theRealRobG Sep 4, 2024
15023a0
Attempting new way of defining iPhone device for testing
theRealRobG Sep 4, 2024
13db260
Added logging of env variables
theRealRobG Sep 4, 2024
a4b4a04
Cleaned up branches targeted for action
theRealRobG Sep 4, 2024
1240a1b
Favor structs over classes
theRealRobG Sep 7, 2024
692ee64
Favor not double declaring the issue variable
theRealRobG Sep 7, 2024
d064651
Clarified enum naming and favored more terse function syntax
theRealRobG Sep 7, 2024
93dfacf
Favor enums rather than structs holding enums
theRealRobG Sep 7, 2024
2782f2d
Introduce unrecognized cases to keep parsing forward compatible
theRealRobG Sep 7, 2024
576c6c8
Explicitly indicate class is final
theRealRobG Sep 9, 2024
054f272
Merge pull request #135 from Comcast/adding-github-actions-2.x
theRealRobG Sep 9, 2024
d85496d
Merge branch 'develop' into playlist-delta-updates-2.x
theRealRobG Sep 9, 2024
f56c79c
Merge pull request #131 from Comcast/playlist-delta-updates-2.x
theRealRobG Sep 9, 2024
8539920
Merge branch 'develop' into missing-multivariant-playlist-tags-from-d…
theRealRobG Sep 9, 2024
34e7a7d
Merge pull request #133 from Comcast/missing-multivariant-playlist-ta…
theRealRobG Sep 10, 2024
2494a7c
Add code adaptation for Xcode 16.
kimbely0320 Oct 3, 2024
6b412fb
2.2.3
kimbely0320 Oct 3, 2024
2f3f81e
Merge branch 'develop' into release/2.2.2_xcode16
theRealRobG Oct 3, 2024
18535c2
bump all of the MARKETING_VERSION 2.2.3 in ./mamba.xcodeproj/project…
kimbely0320 Oct 3, 2024
24ee325
Merge branch 'release/2.2.2_xcode16' of https://github.com/kimbely032…
kimbely0320 Oct 3, 2024
0fe96b4
Merge pull request #138 from kimbely0320/release/2.2.2_xcode16
theRealRobG Oct 3, 2024
e3efcf6
Update version to 2.3.0
theRealRobG Oct 3, 2024
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
52 changes: 52 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and test

on:
pull_request:
branches: [ "develop", "develop_1.x", "main", "main_1.x" ]

jobs:
define-ios-device:
name: Get iOS simulator device to run iOS tests on
runs-on: macos-latest
outputs:
device: ${{ steps.ios.outputs.device }}
steps:
- id: ios
run: echo "device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`" >> "$GITHUB_OUTPUT"

build:
name: Build and Test mamba and mambaTVOS
runs-on: macos-latest
needs: define-ios-device
strategy:
matrix:
target:
- scheme: mamba
platform: iOS Simulator
device: ${{ needs.define-ios-device.outputs.device }}
- scheme: mambaTVOS
platform: tvOS Simulator
device: Apple TV
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
env:
scheme: ${{ matrix.target.scheme }}
platform: ${{ matrix.target.platform }}
device: ${{ matrix.target.device }}
run: |
echo "scheme = $scheme"
echo "platform = $platform"
echo "device = $device"
xcodebuild build-for-testing -scheme "$scheme" -"workspace" "mamba.xcworkspace" -destination "platform=$platform,name=$device"
- name: Test
env:
scheme: ${{ matrix.target.scheme }}
platform: ${{ matrix.target.platform }}
device: ${{ matrix.target.device }}
run: |
echo "scheme = $scheme"
echo "platform = $platform"
echo "device = $device"
xcodebuild test-without-building -scheme "$scheme" -"workspace" "mamba.xcworkspace" -destination "platform=$platform,name=$device"
2 changes: 1 addition & 1 deletion mamba.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "mamba"
s.version = "2.2.1"
s.version = "2.3.0"
s.license = { :type => 'Apache License, Version 2.0',
:text => <<-LICENSE
Copyright 2017 Comcast Cable Communications Management, LLC
Expand Down
54 changes: 47 additions & 7 deletions mamba.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@

/* Begin PBXBuildFile section */
01CD2E7A1DE4D46F002510E7 /* EXT_X_MAPTagParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01CD2E791DE4D46F002510E7 /* EXT_X_MAPTagParserTests.swift */; };
1447582D2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1447582C2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift */; };
1447582E2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1447582C2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift */; };
1447582F2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1447582C2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift */; };
144758312C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758302C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift */; };
144758322C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758302C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift */; };
144758332C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758302C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift */; };
144758352C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758342C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift */; };
144758362C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758342C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift */; };
144758372C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758342C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift */; };
144758392C8620C000D12CCD /* ChannelsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758382C8620C000D12CCD /* ChannelsTests.swift */; };
1447583A2C8620C000D12CCD /* ChannelsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758382C8620C000D12CCD /* ChannelsTests.swift */; };
1447583B2C8620C000D12CCD /* ChannelsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144758382C8620C000D12CCD /* ChannelsTests.swift */; };
1447583D2C8693E000D12CCD /* VideoLayoutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1447583C2C8693E000D12CCD /* VideoLayoutTests.swift */; };
1447583E2C8693E000D12CCD /* VideoLayoutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1447583C2C8693E000D12CCD /* VideoLayoutTests.swift */; };
1447583F2C8693E000D12CCD /* VideoLayoutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1447583C2C8693E000D12CCD /* VideoLayoutTests.swift */; };
1D28F3451EAA9E500010320B /* hls_ad_master_playlist.m3u8 in Resources */ = {isa = PBXBuildFile; fileRef = 1D28F3401EAA9E500010320B /* hls_ad_master_playlist.m3u8 */; };
1D28F3461EAA9E500010320B /* hls_ad_variant_playlist.m3u8 in Resources */ = {isa = PBXBuildFile; fileRef = 1D28F3411EAA9E500010320B /* hls_ad_variant_playlist.m3u8 */; };
1D28F3471EAA9E500010320B /* hls_master_playlist_sap.m3u8 in Resources */ = {isa = PBXBuildFile; fileRef = 1D28F3421EAA9E500010320B /* hls_master_playlist_sap.m3u8 */; };
Expand Down Expand Up @@ -635,6 +650,11 @@

/* Begin PBXFileReference section */
01CD2E791DE4D46F002510E7 /* EXT_X_MAPTagParserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EXT_X_MAPTagParserTests.swift; sourceTree = "<group>"; };
1447582C2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EXT_X_SESSION_KEYValidator.swift; sourceTree = "<group>"; };
144758302C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EXT_X_SESSION_DATATagValidator.swift; sourceTree = "<group>"; };
144758342C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EXT_X_SESSION_DATAPlaylistValidator.swift; sourceTree = "<group>"; };
144758382C8620C000D12CCD /* ChannelsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelsTests.swift; sourceTree = "<group>"; };
1447583C2C8693E000D12CCD /* VideoLayoutTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoLayoutTests.swift; sourceTree = "<group>"; };
1D28F3401EAA9E500010320B /* hls_ad_master_playlist.m3u8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = hls_ad_master_playlist.m3u8; sourceTree = "<group>"; };
1D28F3411EAA9E500010320B /* hls_ad_variant_playlist.m3u8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = hls_ad_variant_playlist.m3u8; sourceTree = "<group>"; };
1D28F3421EAA9E500010320B /* hls_master_playlist_sap.m3u8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = hls_master_playlist_sap.m3u8; sourceTree = "<group>"; };
Expand Down Expand Up @@ -930,6 +950,9 @@
EC3B01A11DD4D47900B512E3 /* EXT_X_MEDIARenditionGroupNAMEValidator.swift */,
EC3B01A21DD4D47900B512E3 /* EXT_X_MEDIARenditionGroupTYPEValidator.swift */,
43DE4EFC1E564DBE00EEE800 /* EXT_X_MEDIARenditionINSTREAMIDValidator.swift */,
144758342C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift */,
144758302C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift */,
1447582C2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift */,
43DE4EFA1E564DA300EEE800 /* EXT_X_STARTTimeOffsetValidator.swift */,
EC3B01A31DD4D47900B512E3 /* EXT_X_STREAM_INFRenditionGroupValidator.swift */,
EC3B01A41DD4D47900B512E3 /* EXT_X_TARGETDURATIONLengthValidator.swift */,
Expand Down Expand Up @@ -1318,10 +1341,12 @@
EC9BCAA21D749D8B0032BEBE /* Value Types */ = {
isa = PBXGroup;
children = (
144758382C8620C000D12CCD /* ChannelsTests.swift */,
EC7492AF1DD29F8900AF4E20 /* CodecArrayTests.swift */,
EC7492B01DD29F8900AF4E20 /* MediaTypeTests.swift */,
EC7492B21DD29F8900AF4E20 /* ResolutionTests.swift */,
EC7492B11DD29F8900AF4E20 /* PlaylistTypeTests.swift */,
EC7492B21DD29F8900AF4E20 /* ResolutionTests.swift */,
1447583C2C8693E000D12CCD /* VideoLayoutTests.swift */,
);
path = "Value Types";
sourceTree = "<group>";
Expand Down Expand Up @@ -1773,6 +1798,7 @@
EC7491811DD29C3500AF4E20 /* String+Trim.swift in Sources */,
EC7491C31DD29D5C00AF4E20 /* PlaylistValidationIssue.swift in Sources */,
ECDE184C22383230008566BB /* PlaylistParser.swift in Sources */,
144758352C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift in Sources */,
EC74916E1DD29B5D00AF4E20 /* CollectionType+FindExtensions.swift in Sources */,
EC7491DA1DD29D9600AF4E20 /* GenericNoDataTagParser.swift in Sources */,
EC7491C91DD29D5C00AF4E20 /* PlaylistWriter.swift in Sources */,
Expand Down Expand Up @@ -1847,6 +1873,8 @@
EC349ACE2236C3A60077432B /* PlaylistStructureInterface.swift in Sources */,
EC3B01A71DD4D47900B512E3 /* EXT_X_MEDIARenditionGroupAUTOSELECTValidator.swift in Sources */,
F700CD391E78A2BE001C9487 /* MambaStringRef_ConcreteNSString.m in Sources */,
144758312C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift in Sources */,
1447582D2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift in Sources */,
43DE4EFB1E564DA300EEE800 /* EXT_X_STARTTimeOffsetValidator.swift in Sources */,
EC74918A1DD29CCB00AF4E20 /* StringDictionaryParser.swift in Sources */,
ECDE184022381146008566BB /* MasterPlaylist.swift in Sources */,
Expand Down Expand Up @@ -1930,8 +1958,10 @@
ECFBD9101E5CCC2200379FC2 /* ParseArrayTests.m in Sources */,
EC7492B31DD29F8900AF4E20 /* CodecArrayTests.swift in Sources */,
01CD2E7A1DE4D46F002510E7 /* EXT_X_MAPTagParserTests.swift in Sources */,
144758392C8620C000D12CCD /* ChannelsTests.swift in Sources */,
EC7492AB1DD29F7000AF4E20 /* OrderedDictionaryTests.swift in Sources */,
EC7492781DD29EC800AF4E20 /* EXT_X_MEDIATagParserTests.swift in Sources */,
1447583D2C8693E000D12CCD /* VideoLayoutTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -1945,6 +1975,7 @@
EC3B01AA1DD4D47900B512E3 /* EXT_X_MEDIARenditionGroupDEFAULTValidator.swift in Sources */,
EC3B01C41DD4D49A00B512E3 /* PlaylistOneToManyValidator.swift in Sources */,
ECDE184D22383230008566BB /* PlaylistParser.swift in Sources */,
144758362C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift in Sources */,
EC7491821DD29C3500AF4E20 /* String+Trim.swift in Sources */,
EC7491C41DD29D5C00AF4E20 /* PlaylistValidationIssue.swift in Sources */,
EC74916F1DD29B5D00AF4E20 /* CollectionType+FindExtensions.swift in Sources */,
Expand Down Expand Up @@ -2019,6 +2050,8 @@
EC349ACF2236C3A60077432B /* PlaylistStructureInterface.swift in Sources */,
EC7491471DD299B400AF4E20 /* PlaylistTypes.swift in Sources */,
F700CD3A1E78A2BE001C9487 /* MambaStringRef_ConcreteNSString.m in Sources */,
144758322C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift in Sources */,
1447582E2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift in Sources */,
EC3B01A81DD4D47900B512E3 /* EXT_X_MEDIARenditionGroupAUTOSELECTValidator.swift in Sources */,
EC74918B1DD29CCB00AF4E20 /* StringDictionaryParser.swift in Sources */,
ECDE184122381146008566BB /* MasterPlaylist.swift in Sources */,
Expand Down Expand Up @@ -2102,8 +2135,10 @@
ECFBD9111E5CCC2200379FC2 /* ParseArrayTests.m in Sources */,
EC7492B81DD29F8900AF4E20 /* PlaylistTypeTests.swift in Sources */,
EC7492B41DD29F8900AF4E20 /* CodecArrayTests.swift in Sources */,
1447583A2C8620C000D12CCD /* ChannelsTests.swift in Sources */,
EC7492AC1DD29F7000AF4E20 /* OrderedDictionaryTests.swift in Sources */,
EC7492791DD29EC800AF4E20 /* EXT_X_MEDIATagParserTests.swift in Sources */,
1447583E2C8693E000D12CCD /* VideoLayoutTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -2118,6 +2153,7 @@
EC1CCD32209A2CF9006B59FF /* String+Trim.swift in Sources */,
EC1CCD46209A2CF9006B59FF /* GenericSingleTagValidator.swift in Sources */,
ECDE184E22383230008566BB /* PlaylistParser.swift in Sources */,
144758372C83D23100D12CCD /* EXT_X_SESSION_DATAPlaylistValidator.swift in Sources */,
EC1CCD30209A2CF9006B59FF /* String+DateParsing.swift in Sources */,
EC1CCD53209A2CF9006B59FF /* GenericDictionaryTagWriter.swift in Sources */,
EC1CCD55209A2CF9006B59FF /* GenericTagWriter.swift in Sources */,
Expand Down Expand Up @@ -2189,7 +2225,9 @@
EC1CCD4F209A2CF9006B59FF /* PlaylistTagCardinalityValidation.swift in Sources */,
EC1CCD2B209A2CF9006B59FF /* IndeterminateBool.swift in Sources */,
EC349AD02236C3A60077432B /* PlaylistStructureInterface.swift in Sources */,
144758332C83C72B00D12CCD /* EXT_X_SESSION_DATATagValidator.swift in Sources */,
EC1CCD43209A2CF9006B59FF /* EXT_X_STREAM_INFRenditionGroupValidator.swift in Sources */,
1447582F2C83C20800D12CCD /* EXT_X_SESSION_KEYValidator.swift in Sources */,
EC1CCD35209A2CF9006B59FF /* StringDictionaryParser.swift in Sources */,
EC1CCD02209A2CF9006B59FF /* MambaStringRef_ConcreteNSString.m in Sources */,
EC1CCD38209A2CF9006B59FF /* GenericNoDataTagParser.swift in Sources */,
Expand Down Expand Up @@ -2272,10 +2310,12 @@
ECE253FD209A50B500D388CE /* ThirdPartyTagListSupportTests.swift in Sources */,
ECE25408209A50B500D388CE /* ResolutionTests.swift in Sources */,
ECE253F6209A50B500D388CE /* GenericSingleValueTagParserTests.swift in Sources */,
1447583B2C8620C000D12CCD /* ChannelsTests.swift in Sources */,
ECE253FA209A50B500D388CE /* GenericSingleTagValidatorTests.swift in Sources */,
ECE253F1209A50B500D388CE /* EXT_X_KEYTagParserTests.swift in Sources */,
ECE25403209A50B500D388CE /* String+Helio.swift in Sources */,
ECE25400209A50B500D388CE /* IndeterminateBoolTests.swift in Sources */,
1447583F2C8693E000D12CCD /* VideoLayoutTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2317,7 +2357,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.comcast.mamba;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -2345,7 +2385,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.comcast.mamba;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -2410,7 +2450,7 @@
INFOPLIST_FILE = mamba/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.comcast.mamba;
PRODUCT_NAME = mamba;
SDKROOT = appletvos;
Expand Down Expand Up @@ -2441,7 +2481,7 @@
INFOPLIST_FILE = mamba/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.comcast.mamba;
PRODUCT_NAME = mamba;
SDKROOT = appletvos;
Expand Down Expand Up @@ -2520,7 +2560,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.comcast.mamba;
PRODUCT_MODULE_NAME = mamba;
PRODUCT_NAME = mamba;
Expand Down Expand Up @@ -2554,7 +2594,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.comcast.mamba;
PRODUCT_MODULE_NAME = mamba;
PRODUCT_NAME = mamba;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// EXT_X_SESSION_DATAPlaylistValidator.swift
// mamba
//
// Created by Robert Galluccio on 8/31/24.
// Copyright © 2024 Comcast Corporation.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License. All rights reserved.
//

import Foundation

final class EXT_X_SESSION_DATAPlaylistValidator: MasterPlaylistValidator {
static func validate(masterPlaylist: any MasterPlaylistInterface) -> [PlaylistValidationIssue] {
var issues = [PlaylistValidationIssue]()

if let issue = duplicateIssue(
tags: masterPlaylist.tags.filter { $0.tagDescriptor == PantosTag.EXT_X_SESSION_DATA }
) {
issues.append(issue)
}

return issues
}

// A Playlist MAY contain multiple EXT-X-SESSION-DATA tags with the same DATA-ID attribute. A Playlist MUST NOT
// contain more than one EXT-X-SESSION-DATA tag with the same DATA-ID attribute and the same LANGUAGE attribute.
private static func duplicateIssue(tags: [PlaylistTag]) -> PlaylistValidationIssue? {
var dataIdToLanguagesMap = [String: [String?]]()
for tag in tags {
guard let dataId = tag.value(forValueIdentifier: PantosValue.dataId) else { continue }
var existingLanguages = dataIdToLanguagesMap[dataId] ?? []
existingLanguages.append(tag.value(forValueIdentifier: PantosValue.language))
dataIdToLanguagesMap[dataId] = existingLanguages
}
for languages in dataIdToLanguagesMap.values {
if languages.count != Set(languages).count {
return PlaylistValidationIssue(description: .EXT_X_SESSION_DATAPlaylistValidator, severity: .error)
}
}
return nil
}
}
Loading