mirror of
https://github.com/sile/hls_m3u8.git
synced 2025-01-03 17:08: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::utils::tag;
|
||||||
use crate::{Error, RequiredVersion};
|
use crate::{Error, RequiredVersion};
|
||||||
|
|
||||||
/// # [4.4.3.4. EXT-X-ENDLIST]
|
/// Indicates that no more [`MediaSegment`]s will be added to the
|
||||||
///
|
/// [`MediaPlaylist`] file.
|
||||||
/// The [`ExtXEndList`] tag indicates, that no more [`MediaSegment`]s will be
|
|
||||||
/// added to the [`MediaPlaylist`] file.
|
|
||||||
///
|
///
|
||||||
/// [`MediaSegment`]: crate::MediaSegment
|
/// [`MediaSegment`]: crate::MediaSegment
|
||||||
/// [`MediaPlaylist`]: crate::MediaPlaylist
|
/// [`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)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
pub struct ExtXEndList;
|
pub(crate) struct ExtXEndList;
|
||||||
|
|
||||||
impl ExtXEndList {
|
impl ExtXEndList {
|
||||||
pub(crate) const PREFIX: &'static str = "#EXT-X-ENDLIST";
|
pub(crate) const PREFIX: &'static str = "#EXT-X-ENDLIST";
|
||||||
|
|
|
@ -6,7 +6,7 @@ mod playlist_type;
|
||||||
mod target_duration;
|
mod target_duration;
|
||||||
|
|
||||||
pub use discontinuity_sequence::*;
|
pub use discontinuity_sequence::*;
|
||||||
pub use end_list::*;
|
pub(crate) use end_list::*;
|
||||||
pub use i_frames_only::*;
|
pub use i_frames_only::*;
|
||||||
pub use media_sequence::*;
|
pub use media_sequence::*;
|
||||||
pub use playlist_type::*;
|
pub use playlist_type::*;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
use std::time::Duration;
|
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::types::PlaylistType;
|
||||||
use hls_m3u8::{MediaPlaylist, MediaSegment};
|
use hls_m3u8::{MediaPlaylist, MediaSegment};
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
|
@ -99,7 +99,7 @@ generate_tests! {
|
||||||
// .unknown(vec![
|
// .unknown(vec![
|
||||||
// "#ZEN-TOTAL-DURATION:57.9911".into()
|
// "#ZEN-TOTAL-DURATION:57.9911".into()
|
||||||
// ])
|
// ])
|
||||||
.end_list(ExtXEndList)
|
.has_end_list(true)
|
||||||
.build()
|
.build()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
concat!(
|
concat!(
|
||||||
|
@ -227,7 +227,7 @@ generate_tests! {
|
||||||
.build()
|
.build()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
])
|
])
|
||||||
.end_list(ExtXEndList)
|
.has_end_list(true)
|
||||||
.unknown(vec![
|
.unknown(vec![
|
||||||
// deprecated tag:
|
// deprecated tag:
|
||||||
"#EXT-X-ALLOW-CACHE:YES".into()
|
"#EXT-X-ALLOW-CACHE:YES".into()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use hls_m3u8::tags::{
|
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::types::{DecryptionKey, EncryptionMethod, MediaType, StreamData};
|
||||||
use hls_m3u8::{MasterPlaylist, MediaPlaylist, MediaSegment};
|
use hls_m3u8::{MasterPlaylist, MediaPlaylist, MediaSegment};
|
||||||
|
@ -42,7 +42,7 @@ generate_tests! {
|
||||||
.build()
|
.build()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
])
|
])
|
||||||
.end_list(ExtXEndList)
|
.has_end_list(true)
|
||||||
.build()
|
.build()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
concat!(
|
concat!(
|
||||||
|
|
Loading…
Reference in a new issue