-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# SCTE35-SwiftLibrary | ||
|
||
Swift library for parsing [SCTE35](https://www.scte.org/SCTEDocs/Standards/ANSI_SCTE%2035%202019r1.pdf) data either via base64 or hex string | ||
|
||
## Features | ||
|
||
* SCTE35 Binary Parsing | ||
|
||
## API | ||
|
||
Parse From Base64 String | ||
|
||
```Swift | ||
let scte35Base64Str = "/DA4AAAAAAAA///wBQb+AAAAAAAiAiBDVUVJAAAAA3//AAApPWwDDEFCQ0QwMTIzNDU2SBAAAGgCL9A=" | ||
let converter = SCTE35Converter() | ||
do { | ||
let result: SpliceInfoSection = try converter.parseFrom(base64String: scte35Base64Str) | ||
} catch { | ||
// error parsing scte data | ||
// error is of type SCTE35ParsingError | ||
} | ||
``` | ||
|
||
Parse from Hex String | ||
|
||
```Swift | ||
let scte35HexStr = "0xFC3034000000000000FFFFF00506FE72BD0050001E021C435545494800008E7FCF0001A599B00808000000002CA0A18A3402009AC9D17E" | ||
let converter = SCTE35Converter() | ||
do { | ||
let result: SpliceInfoSection = try converter.parseFrom(hexString: scte35HexStr) | ||
} catch { | ||
// error parsing scte data | ||
// error is of type SCTE35ParsingError | ||
} | ||
``` | ||
|
||
>SpliceInfoSection is the Swifty version of SCTE-35 Standards as defined in [SCTE35 Standards](https://www.scte.org/SCTEDocs/Standards/SCTE%2035%202019r1.pdf) | ||
>For Reference on Terminology and definitions see [SCTE35 Standards]. | ||
>Definitions of properties are copied and pasted from here | ||
>See Page 12 for definitions and abbreviations | ||
For more examples refer to the unit tests | ||
|
||
## Contributing | ||
|
||
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see LICENSE file for details |