TSDuck v3.40-4163
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
HTTP Live Streaming (HLS)

Classes for HTTP Live Streaming (HLS) More...

Collaboration diagram for HTTP Live Streaming (HLS):

Classes

class  ts::hls::AltPlayList
 Description of an alternative rendition media playlist inside an HLS master playlist. More...
 
class  ts::hls::MediaElement
 Description of a media "element" (sub-playlist or segment) inside an HLS playlist. More...
 
class  ts::hls::MediaPlayList
 Description of a media playlist inside an HLS master playlist. More...
 
class  ts::hls::MediaSegment
 Description of a media segment in an HLS playlist. More...
 
class  ts::hls::PlayList
 Playlist for HTTP Live Streaming (HLS). More...
 
class  ts::hls::TagAttributes
 Attributes of a tag in an HLS playlist. More...
 

Enumerations

enum class  ts::hls::PlayListType {
  ts::hls::PlayListType::UNKNOWN ,
  ts::hls::PlayListType::MASTER ,
  ts::hls::PlayListType::VOD ,
  ts::hls::PlayListType::EVENT ,
  ts::hls::PlayListType::LIVE
}
 Types of .M3U8 playlist. More...
 
enum class  ts::hls::Tag {
  ts::hls::Tag::EXTM3U ,
  ts::hls::Tag::VERSION ,
  ts::hls::Tag::EXTINF ,
  ts::hls::Tag::BYTERANGE ,
  ts::hls::Tag::DISCONTINUITY ,
  ts::hls::Tag::KEY ,
  ts::hls::Tag::MAP ,
  ts::hls::Tag::PROGRAM_DATE_TIME ,
  ts::hls::Tag::GAP ,
  ts::hls::Tag::BITRATE ,
  ts::hls::Tag::PART ,
  ts::hls::Tag::DATERANGE ,
  ts::hls::Tag::SKIP ,
  ts::hls::Tag::PRELOAD_HINT ,
  ts::hls::Tag::RENDITION_REPORT ,
  ts::hls::Tag::TARGETDURATION ,
  ts::hls::Tag::MEDIA_SEQUENCE ,
  ts::hls::Tag::DISCONTINUITY_SEQUENCE ,
  ts::hls::Tag::ENDLIST ,
  ts::hls::Tag::PLAYLIST_TYPE ,
  ts::hls::Tag::I_FRAMES_ONLY ,
  ts::hls::Tag::PART_INF ,
  ts::hls::Tag::SERVER_CONTROL ,
  ts::hls::Tag::MEDIA ,
  ts::hls::Tag::STREAM_INF ,
  ts::hls::Tag::I_FRAME_STREAM_INF ,
  ts::hls::Tag::SESSION_DATA ,
  ts::hls::Tag::SESSION_KEY ,
  ts::hls::Tag::CONTENT_STEERING ,
  ts::hls::Tag::INDEPENDENT_SEGMENTS ,
  ts::hls::Tag::START ,
  ts::hls::Tag::DEFINE
}
 Tags to be used in the .M3U8 playlists. More...
 
enum class  ts::hls::TagFlags {
  ts::hls::TagFlags::NONE = 0x0000 ,
  ts::hls::TagFlags::MASTER = 0x0001 ,
  ts::hls::TagFlags::MEDIA = 0x0002
}
 Properties of playlist tags. More...
 

Functions

const Namests::hls::TagNames ()
 Enumeration description of ts::hls::Tag.
 
TagFlags ts::hls::TagProperties (Tag tag)
 Get the properties of a Tag.
 

Detailed Description

Classes for HTTP Live Streaming (HLS)

Enumeration Type Documentation

◆ PlayListType

enum class ts::hls::PlayListType
strong

Types of .M3U8 playlist.

  • Master playlist. It contains references to media playlists (typically same content with various bitrates). Also called "multivariant playlist" in recent versions of the HLS standard.
  • All other types of playlists are media playlists, they contain references to media segments.
    • VoD playlist. A static media playlist for a fully recorded content. The list of media segments cannot change.
    • Event playlist. A growing media playlist for a running event. It is possible to move backward in the event, up to the beginning. New media segments can be added at the end of the playlist. No segment can be removed.
    • Live playlist. A sliding media playlist for a live channel, without backward browsing. The initial segments are regularly removed. New segments are regularly added at the end of the list.
Enumerator
UNKNOWN 

Type is unknown.

MASTER 

Master playlist, contains references to media playlists.

VOD 

VoD media playlist, reference media segments, static, cannot change.

EVENT 

Event media playlist, reference media segments, can grow.

LIVE 

Live media playlist, reference media segments, sliding window.

◆ Tag

enum class ts::hls::Tag
strong

Tags to be used in the .M3U8 playlists.

See also
RFC 8216, chapter 4.
draft-pantos-hls-rfc8216bis-10
Enumerator
EXTM3U 

#EXTM3U - first line, all playlists.

VERSION 

#EXT-X-VERSION:n - global, version number.

EXTINF 

#EXTINF:duration,[title] - next media segment only, required.

BYTERANGE 

#EXT-X-BYTERANGE:n[@o] - next media segment only.

DISCONTINUITY 

#EXT-X-DISCONTINUITY - next media segment only.

KEY 

#EXT-X-KEY:attribute-list - all media segments until next KEY.

MAP 

#EXT-X-MAP:attribute-list - all media segments until next MAP.

PROGRAM_DATE_TIME 

#EXT-X-PROGRAM-DATE-TIME:date-time-msec - next media segment only.

GAP 

#EXT-X-GAP

BITRATE 

#EXT-X-BITRATE:rate

PART 

#EXT-X-PART:attribute-list

DATERANGE 

#EXT-X-DATERANGE:attribute-list

SKIP 

#EXT-X-SKIP:attribute-list

PRELOAD_HINT 

#EXT-X-PRELOAD-HINT:attribute-list

RENDITION_REPORT 

#EXT-X-RENDITION-REPORT:attribute-list

TARGETDURATION 

#EXT-X-TARGETDURATION:s

MEDIA_SEQUENCE 

#EXT-X-MEDIA-SEQUENCE:number

DISCONTINUITY_SEQUENCE 

#EXT-X-DISCONTINUITY-SEQUENCE:number

ENDLIST 

#EXT-X-ENDLIST

PLAYLIST_TYPE 

#EXT-X-PLAYLIST-TYPE:type (EVENT or VOD).

I_FRAMES_ONLY 

#EXT-X-I-FRAMES-ONLY

PART_INF 

#EXT-X-PART-INF

SERVER_CONTROL 

#EXT-X-SERVER-CONTROL

MEDIA 

#EXT-X-MEDIA:attribute-list

STREAM_INF 

#EXT-X-STREAM-INF:attribute-list - immediately followed by an URI line.

I_FRAME_STREAM_INF 

#EXT-X-I-FRAME-STREAM-INF:attribute-list - global to playlist.

SESSION_DATA 

#EXT-X-SESSION-DATA:attribute-list

SESSION_KEY 

#EXT-X-SESSION-KEY:attribute-list

CONTENT_STEERING 

#EXT-X-CONTENT-STEERING:attribute-list

INDEPENDENT_SEGMENTS 

#EXT-X-INDEPENDENT-SEGMENTS

START 

#EXT-X-START:attribute-list

DEFINE 

#EXT-X-DEFINE:attribute-list

◆ TagFlags

enum class ts::hls::TagFlags
strong

Properties of playlist tags.

Can be used as bitmask.

Enumerator
NONE 

Tag is not allowed anywhere.

MASTER 

The tag is allowed in master playlists.

MEDIA 

The tag is allowed in media playlists.

Function Documentation

◆ TagNames()

const Names & ts::hls::TagNames ( )

Enumeration description of ts::hls::Tag.

The names are the actual tag names from a .M3U8 playlist file.

Returns
A constant reference to the enumeration description.

◆ TagProperties()

TagFlags ts::hls::TagProperties ( Tag  tag)

Get the properties of a Tag.

Parameters
[in]tagThe tag to get the properties of.
Returns
A bitmask of TagFlags.