mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-25 08:31:00 +00:00
slightly improve ExtInf
This commit is contained in:
parent
870a39cddd
commit
7c26d2f7f1
1 changed files with 5 additions and 6 deletions
|
@ -2,19 +2,18 @@ use std::fmt;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use derive_more::AsRef;
|
||||||
|
|
||||||
use crate::types::ProtocolVersion;
|
use crate::types::ProtocolVersion;
|
||||||
use crate::utils::tag;
|
use crate::utils::tag;
|
||||||
use crate::{Error, RequiredVersion};
|
use crate::{Error, RequiredVersion};
|
||||||
|
|
||||||
/// # [4.3.2.1. EXTINF]
|
/// Specifies the duration of a [`Media Segment`].
|
||||||
///
|
|
||||||
/// The [`ExtInf`] tag specifies the duration of a [`Media Segment`]. It applies
|
|
||||||
/// only to the next [`Media Segment`].
|
|
||||||
///
|
///
|
||||||
/// [`Media Segment`]: crate::media_segment::MediaSegment
|
/// [`Media Segment`]: crate::media_segment::MediaSegment
|
||||||
/// [4.3.2.1. EXTINF]: https://tools.ietf.org/html/rfc8216#section-4.3.2.1
|
#[derive(AsRef, Default, Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
|
||||||
pub struct ExtInf {
|
pub struct ExtInf {
|
||||||
|
#[as_ref]
|
||||||
duration: Duration,
|
duration: Duration,
|
||||||
title: Option<String>,
|
title: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue