1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-05-24 19:28:31 +00:00

internalize ExtXEndList

This commit is contained in:
Luro02 2020-03-25 12:41:36 +01:00
parent 112c3998b8
commit 285d2eccb8
No known key found for this signature in database
GPG key ID: B66FD4F74501A9CF
4 changed files with 9 additions and 13 deletions

View file

@ -5,17 +5,13 @@ use crate::types::ProtocolVersion;
use crate::utils::tag;
use crate::{Error, RequiredVersion};
/// # [4.4.3.4. EXT-X-ENDLIST]
///
/// The [`ExtXEndList`] tag indicates, that no more [`MediaSegment`]s will be
/// added to the [`MediaPlaylist`] file.
/// Indicates that no more [`MediaSegment`]s will be added to the
/// [`MediaPlaylist`] file.
///
/// [`MediaSegment`]: crate::MediaSegment
/// [`MediaPlaylist`]: crate::MediaPlaylist
/// [4.4.3.4. EXT-X-ENDLIST]:
/// https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-04#section-4.4.3.4
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ExtXEndList;
pub(crate) struct ExtXEndList;
impl ExtXEndList {
pub(crate) const PREFIX: &'static str = "#EXT-X-ENDLIST";

View file

@ -6,7 +6,7 @@ mod playlist_type;
mod target_duration;
pub use discontinuity_sequence::*;
pub use end_list::*;
pub(crate) use end_list::*;
pub use i_frames_only::*;
pub use media_sequence::*;
pub use playlist_type::*;

View file

@ -5,7 +5,7 @@
use std::time::Duration;
use hls_m3u8::tags::{ExtInf, ExtXByteRange, ExtXEndList, ExtXMediaSequence, ExtXTargetDuration};
use hls_m3u8::tags::{ExtInf, ExtXByteRange, ExtXMediaSequence, ExtXTargetDuration};
use hls_m3u8::types::PlaylistType;
use hls_m3u8::{MediaPlaylist, MediaSegment};
use pretty_assertions::assert_eq;
@ -99,7 +99,7 @@ generate_tests! {
// .unknown(vec![
// "#ZEN-TOTAL-DURATION:57.9911".into()
// ])
.end_list(ExtXEndList)
.has_end_list(true)
.build()
.unwrap(),
concat!(
@ -227,7 +227,7 @@ generate_tests! {
.build()
.unwrap(),
])
.end_list(ExtXEndList)
.has_end_list(true)
.unknown(vec![
// deprecated tag:
"#EXT-X-ALLOW-CACHE:YES".into()

View file

@ -2,7 +2,7 @@
use std::time::Duration;
use hls_m3u8::tags::{
ExtInf, ExtXEndList, ExtXKey, ExtXMedia, ExtXMediaSequence, ExtXTargetDuration, VariantStream,
ExtInf, ExtXKey, ExtXMedia, ExtXMediaSequence, ExtXTargetDuration, VariantStream,
};
use hls_m3u8::types::{DecryptionKey, EncryptionMethod, MediaType, StreamData};
use hls_m3u8::{MasterPlaylist, MediaPlaylist, MediaSegment};
@ -42,7 +42,7 @@ generate_tests! {
.build()
.unwrap(),
])
.end_list(ExtXEndList)
.has_end_list(true)
.build()
.unwrap(),
concat!(