1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-11-29 02:00:59 +00:00

slightly improve ExtInf

This commit is contained in:
Luro02 2020-03-25 11:41:24 +01:00
parent 870a39cddd
commit 7c26d2f7f1
No known key found for this signature in database
GPG key ID: B66FD4F74501A9CF

View file

@ -2,19 +2,18 @@ use std::fmt;
use std::str::FromStr;
use std::time::Duration;
use derive_more::AsRef;
use crate::types::ProtocolVersion;
use crate::utils::tag;
use crate::{Error, RequiredVersion};
/// # [4.3.2.1. EXTINF]
///
/// The [`ExtInf`] tag specifies the duration of a [`Media Segment`]. It applies
/// only to the next [`Media Segment`].
/// Specifies the duration of a [`Media Segment`].
///
/// [`Media Segment`]: crate::media_segment::MediaSegment
/// [4.3.2.1. EXTINF]: https://tools.ietf.org/html/rfc8216#section-4.3.2.1
#[derive(Default, Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[derive(AsRef, Default, Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ExtInf {
#[as_ref]
duration: Duration,
title: Option<String>,
}