mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-12-31 15:58:41 +00:00
internalize ExtXEndList
This commit is contained in:
parent
112c3998b8
commit
285d2eccb8
4 changed files with 9 additions and 13 deletions
|
@ -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";
|
||||
|
|
|
@ -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::*;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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!(
|
||||
|
|
Loading…
Reference in a new issue