Commit graph

77 commits

Author SHA1 Message Date
rutgersc
303d0ecfce
Merge pull request #33 from rafaelcaricio/apply-fmt-and-clippy
Apply cargo fmt and clippy suggestions
2021-10-19 18:54:21 +02:00
3d5599fa28
Apply clippy suggestions 2021-10-18 11:48:30 +02:00
39aab3a2ac
Apply cargo fmt 2021-10-18 11:41:28 +02:00
rutgersc
359695a25c
Merge pull request #30 from rafaelcaricio/support-segment-unknown-tags
Support parsing of unknown tags on segments
2021-10-16 21:09:02 +02:00
677027e22c
Update readme with new attribute 2021-10-14 21:35:35 +02:00
dc352301a3
Allow unknown tags at the master playlist level 2021-10-14 21:21:03 +02:00
c1ff2b3730
Support parsing of unknown tags on segments 2021-10-12 23:06:47 +02:00
Rutger Schoorstra
06162a8554 Version 2.0.0 2021-04-24 19:06:57 +02:00
rutgersc
46922bdab3
Merge pull request #23 from rutgersc/use-features
Use features to split parser and types
2021-04-24 19:03:49 +02:00
Rutger Schoorstra
dc576c8e3c Add parser as default feature 2021-04-24 18:43:57 +02:00
Rutger Schoorstra
c3ef5bc16e Split code into parser/types 2021-04-24 18:39:25 +02:00
rutgersc
5a72e1e875
Merge pull request #24 from thaytan/20-multiple-session-data-keys
Fixes for session data and keys handling
2021-04-24 17:29:44 +02:00
Jan Schmidt
05669cab68 Support multiple session data and key tags.
Collect Vecs of session_data and session_key tags to
allow for multiples of each. Doesn't do any validation
as to disallowed duplicated values.

Fixes #20
2021-04-25 00:44:08 +10:00
Jan Schmidt
870ca830d3 SessionData: Must have either VALUE or URI, but not both.
If SessionData has a value, don't write the URI and vice-versa.

As per https://tools.ietf.org/html/rfc8216#section-4.3.4.4
EXT-X-SESSION-DATA must have one or the other, not both.
2021-04-25 00:44:08 +10:00
rutgersc
85b0826103
Merge pull request #26 from thaytan/update-to-rfc8216
Add HDCP-LEVEL and CHANNELS fields.
2021-04-21 18:20:16 +02:00
Jan Schmidt
5fe3fc309c Add HDCP-LEVEL and CHANNELS fields.
Add support for parsing / generating HDCP-LEVEL in a VariantStream
and CHANNELS in AlternativeMedia. The fields were added after
draft-pantos-http-live-streaming-19.txt and brings things up to date
with RFC 8216.
2021-04-21 13:44:17 +10:00
rutgersc
b75379437d
Merge pull request #16 from rafaelcaricio/master
Expose unknown tags
2021-04-20 19:35:58 +02:00
3e74f7787f Expose unknown tags 2021-04-20 19:29:04 +02:00
rutgersc
302ff22f31
Merge pull request #21 from rutgersc/fix/alternatives
Move alternatives to MasterPlaylist
2021-04-20 18:47:33 +02:00
Rutger Schoorstra
b44f6518c8 Version 1.0.8 2021-04-18 12:51:43 +02:00
rutgersc
37acdb304d
Merge pull request #22 from rutgersc/fix/line-ending
Fix "Last URL in m3u8 file not found unless a new line is found"
2021-04-18 12:07:38 +02:00
Rutger Schoorstra
087c47bddd Fix consume_line not returning line when line doesn't end with a newline 2021-04-18 11:59:31 +02:00
Rutger Schoorstra
57d60ba438 Move alternatives to MasterPlaylist 2021-04-16 21:20:30 +02:00
rutgersc
cd9402051e
Merge pull request #18 from thaytan/17-fix-master-playlists
Handle blank lines when checking for master playlist tags.
2021-04-16 19:05:22 +02:00
Rutger Schoorstra
64de5e4d9b Version 1.0.7 2021-03-17 17:16:40 +01:00
Jan Schmidt
978e6a7e58 Handle blank lines when checking for master playlist tags.
Fix a bug where a blank line in a master playlist before the first
master playlist tag will make the parser think it's a media playlist.

Fixes #17
2021-03-17 06:41:35 +11:00
Rutger Schoorstra
76aab26b20 Create rust.yml 2020-07-01 17:13:26 +02:00
rutgersc
1b18c7902c
Create rust-windows.yml 2020-07-01 17:08:06 +02:00
rutgersc
e2822e4521
Merge pull request #11 from vagetman/vagetman-nom-5.1.0
Upgraded macros to Nom 5
2020-07-01 16:43:30 +02:00
Vadim Getmanshchuk
7a882e5df0
fixed warning: unused std::result::Result
```
warning: unused `std::result::Result` that must be used
```

I forgot `?` for the error propagation
2020-03-21 21:23:03 -07:00
Vadim Getmanshchuk
a081b462d1 Stops #X-EXT-KEY and #X-EXT-MAP tags replication 2020-03-15 11:02:35 +01:00
Vadim Getmanshchuk
3fee7b9983
Merge pull request #1 from rutgersc/vaget/vagetman-nom-5.1.0-extra
Updated docs, tests to nom 5.1.0
2020-03-08 12:15:03 -07:00
rutgersc
ca9c41d823
Merge pull request #10 from vagetman/patch-1
Version update in README to match the current
2020-03-07 10:43:42 +01:00
Rutger Schoorstra
100a57078a Fix failed test on CLRF 2020-03-07 10:23:06 +01:00
Rutger Schoorstra
ab9c554eb4 Upgraded tests to Nom 5 2020-03-07 10:23:06 +01:00
Rutger Schoorstra
13405a09eb Upgraded docs to Nom 5 2020-03-07 10:23:06 +01:00
Vadim Getmanshchuk
b810687652
fixed issue with #EXTINF without titles
in #EXTINF tag, when comma `,` after segment duration immediately follows by `\n` the `title` is not getting populated and is not printed with `writeln!`

The problem is created by the nom 5 conversion, where `take_until_either_and_consume!` macro was replaced with `is_not!` + `take!(1)`. However, in case when `opt!(take_until_either_and_consume!` is used, everything gets way too hairy. I couldn't to expressed that in a fairly elegant manner and instead fixed the data presentation, when a new manifest is produced. While storing `\n` in a form of `title` is a nice hack, I'm also convinced this is a better approach to data handling.
2020-03-06 21:52:22 -08:00
Vadim Getmanshchuk
4ed378772b
added forgotten use for map 2020-03-04 20:12:50 -08:00
Vadim Getmanshchuk
350109e29a
map cleanup, leftovers 2020-02-26 22:57:05 -08:00
Vadim Getmanshchuk
f7587aa264
cleanup, fn map renamed
Local `fn map` -> `fn extmap` that allows to use map from Nom directly, without `nom::combinator::`
2020-02-26 22:52:20 -08:00
Vadim Getmanshchuk
e4e1717b0a
Back ported 1.0.6 release 2020-02-26 17:17:13 -08:00
Vadim Getmanshchuk
b9d377bfa4
Upgraded macros to Nom 5
Changes:

IResult::Done - IResult::Ok
chain! -> do_parse!
   slightly different syntax with `?` ->  opt!
digit -> digit1
space? -> space0
multispace? -> multispace0
many0!() -> many0!(complete!())
take_until_either! -> is_not!
take_until_and_consume! -> take_until! + take!(1)
take_until_either_and_consume! -> is_not! + take!(1)
2020-02-26 17:05:14 -08:00
Vadim Getmanshchuk
fc9f45dd18
Fix tag duplication
The fix is addressing duplication for #EXT-X-KEY and #EXT-X-MAP tags in a media manifest produced
2020-02-26 16:21:06 -08:00
Vadim Getmanshchuk
ed0d35b3a3
Update README.md 2020-02-26 16:15:27 -08:00
Vadim Getmanshchuk
e982070d59
Version update in README to match the current
The current is 1.0.6. It should match one with the README
2020-02-26 12:17:45 -08:00
Rutger Schoorstra
43c7321fb2 Version 1.0.6 2020-02-15 16:02:58 +01:00
Rutger Schoorstra
31e78801f9 CODECS should be optional
https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/creating_a_master_playlist
> While the CODECS parameter is optional, every EXT-X-STREAM-INF tag should include the attribute.
2020-02-15 16:02:45 +01:00
Rutger Schoorstra
03ec1a4544 Added quick parse roundtrip test 2020-02-15 16:01:30 +01:00
Rutger Schoorstra
b2150f26e5 Remove unneeded macro_use 2020-02-15 16:00:10 +01:00
rutgersc
e594ec5792
Merge pull request #7 from vagetman/master
A comma added before the URI for fn write_to
2020-02-15 15:47:45 +01:00