Rialto 0.1
Rialto media pipeline API
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Variables
MediaCommon.h File Reference
#include <limits>
#include <optional>
#include <stddef.h>
#include <stdint.h>
#include <utility>
#include <vector>
Include dependency graph for MediaCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  firebolt::rialto::AudioConfig
 Audio specific configuration. More...
 
struct  firebolt::rialto::SubSamplePair
 A pair describing the clear and encrypted bytes in a sub-sample. More...
 
struct  firebolt::rialto::VideoRequirements
 Video decoder requirements used to allocate a suitable decoder for a MediaPipeline session. More...
 
struct  firebolt::rialto::MediaPlayerShmInfo
 Information about the shared memory required for writting data. More...
 
struct  firebolt::rialto::QosInfo
 The information provided in a QOS update. More...
 
struct  firebolt::rialto::WebAudioShmInfo
 Information about the shared memory required for writting data for the web audio playback. More...
 
struct  firebolt::rialto::WebAudioPcmConfig
 Pcm config information. More...
 
union  firebolt::rialto::WebAudioConfig
 Type dependent configuration data. More...
 
struct  firebolt::rialto::Fraction
 Fraction type. More...
 
struct  firebolt::rialto::CodecData
 Codec data with type. More...
 

Typedefs

typedef std::vector< std::pair< std::vector< unsigned char >, KeyStatus > > firebolt::rialto::KeyStatusVector
 A vector of key ID/key status pairs.
 

Enumerations

enum class  firebolt::rialto::MediaSourceType { UNKNOWN , AUDIO , VIDEO , SUBTITLE }
 The supported types of media source.
 
enum class  firebolt::rialto::SourceConfigType {
  UNKNOWN , AUDIO , VIDEO , VIDEO_DOLBY_VISION ,
  SUBTITLE
}
 Shows the types of source configuration.
 
enum class  firebolt::rialto::AudioEaseType { LINEAR = 0 , INCUBIC , OUTCUBIC }
 The supported audio ease types.
 
enum class  firebolt::rialto::MediaType { UNKNOWN , MSE }
 The media type of media to be played. More...
 
enum class  firebolt::rialto::MediaSourceStatus {
  OK , EOS , ERROR , CODEC_CHANGED ,
  NO_AVAILABLE_SAMPLES
}
 The media source status. This is the status of the source after a read. More...
 
enum class  firebolt::rialto::NetworkState {
  UNKNOWN , IDLE , BUFFERING , BUFFERING_PROGRESS ,
  BUFFERED , STALLED , FORMAT_ERROR , NETWORK_ERROR ,
  DECODE_ERROR
}
 The Network State. More...
 
enum class  firebolt::rialto::PlaybackState {
  UNKNOWN , IDLE , PLAYING , PAUSED ,
  SEEKING , SEEK_DONE , STOPPED , END_OF_STREAM ,
  FAILURE
}
 The Playback State. More...
 
enum class  firebolt::rialto::Format {
  S8 , U8 , S16LE , S16BE ,
  U16LE , U16BE , S24_32LE , S24_32BE ,
  U24_32LE , U24_32BE , S32LE , S32BE ,
  U32LE , U32BE , S24LE , S24BE ,
  U24LE , U24BE , S20LE , S20BE ,
  U20LE , U20BE , S18LE , S18BE ,
  U18LE , U18BE , F32LE , F32BE ,
  F64LE , F64BE
}
 The Format of the audio samples. Used by the raw audio media types.
 
enum class  firebolt::rialto::Layout { INTERLEAVED , NON_INTERLEAVED }
 The layout of channels within a buffer. Used by the raw audio media types.
 
enum class  firebolt::rialto::AddSegmentStatus { OK , NO_SPACE , ERROR }
 AddSegmentStatus. More...
 
enum class  firebolt::rialto::MediaKeyErrorStatus {
  OK , FAIL , BAD_SESSION_ID , NOT_SUPPORTED ,
  INVALID_STATE , INTERFACE_NOT_IMPLEMENTED , BUFFER_TOO_SMALL
}
 The error return status for session management methods. More...
 
enum class  firebolt::rialto::KeySessionType { UNKNOWN , TEMPORARY , PERSISTENT_LICENCE , PERSISTENT_RELEASE_MESSAGE }
 The media key session type. More...
 
enum class  firebolt::rialto::InitDataType {
  UNKNOWN , CENC , KEY_IDS , WEBM ,
  DRMHEADER
}
 The init data type. More...
 
enum class  firebolt::rialto::KeyStatus {
  USABLE , EXPIRED , OUTPUT_RESTRICTED , PENDING ,
  INTERNAL_ERROR , RELEASED
}
 The key status.
 
enum class  firebolt::rialto::SegmentAlignment { UNDEFINED , NAL , AU }
 The alignment of media segment.
 
enum class  firebolt::rialto::StreamFormat {
  UNDEFINED , RAW , AVC , BYTE_STREAM ,
  HVC1 , HEV1
}
 The Stream Format of media segment.
 
enum class  firebolt::rialto::WebAudioPlayerState {
  UNKNOWN , IDLE , PLAYING , PAUSED ,
  END_OF_STREAM , FAILURE
}
 The Web Audio Player State. More...
 
enum class  firebolt::rialto::CipherMode {
  UNKNOWN , CENC , CBC1 , CENS ,
  CBCS
}
 Cipher mode for common encryption, see https://www.iso.org/obp/ui/#iso:std:iso-iec:23001:-7:ed-3:v1:en.
 
enum class  firebolt::rialto::CodecDataType { BUFFER , STRING }
 Codec data type.
 
enum class  firebolt::rialto::PlaybackError { UNKNOWN , DECRYPTION }
 None fatal asynchronous errors reported by the player.
 
enum class  firebolt::rialto::EaseType { EASE_LINEAR , EASE_IN_CUBIC , EASE_OUT_CUBIC }
 Ease type for audio volume changes.
 

Variables

constexpr int32_t firebolt::rialto::kInvalidSessionId {-1}
 The value of an invalid key session.
 
constexpr uint32_t firebolt::rialto::kInvalidAudioChannels {0}
 The value of an invalid audio channels number.
 
constexpr uint32_t firebolt::rialto::kInvalidAudioSampleRate {0}
 The value of an invalid audio sampling rate.
 
constexpr int32_t firebolt::rialto::kUndefinedSize {0}
 The value of an undefined size.
 
constexpr uint32_t firebolt::rialto::kInvalidLimitBuffering {std::numeric_limits<uint32_t>::max()}
 The value of an invalid limitBuffering.
 
constexpr uint64_t firebolt::rialto::kUndefinedPosition {std::numeric_limits<uint64_t>::max()}
 The value of undefined position.
 

Detailed Description

The definition of the Rialto Common types

Enumeration Type Documentation

◆ AddSegmentStatus

AddSegmentStatus.

The add segment status. This is the status adding new segment to Rialto

Enumerator
OK 

Segment accepted.

NO_SPACE 

Too many frames sent or Rialto does not currently have space for this segment.

ERROR 

Unexpected error.

◆ InitDataType

enum class firebolt::rialto::InitDataType
strong

The init data type.

Enumerator
UNKNOWN 

The init data type is unknown.

CENC 

The init data is in CENC format.

KEY_IDS 

The init data is key ids.

WEBM 

The init data is in WEBM format.

DRMHEADER 

The init data is in DrmHeader format.

◆ KeySessionType

The media key session type.

Enumerator
UNKNOWN 

The session type is unknown.

TEMPORARY 

The session is a temporary session.

PERSISTENT_LICENCE 

The session is a persistent session.

PERSISTENT_RELEASE_MESSAGE 

The session's persistent licence should be released.

◆ MediaKeyErrorStatus

The error return status for session management methods.

Enumerator
OK 

No error.

FAIL 

An unspecified error occurred.

BAD_SESSION_ID 

The session id is not recognised.

NOT_SUPPORTED 

The request parameters are not supported.

INVALID_STATE 

The object is in an invalid state for the operation.

INTERFACE_NOT_IMPLEMENTED 

The interface is not implemented.

BUFFER_TOO_SMALL 

The size of the buffer is too small.

◆ MediaSourceStatus

The media source status. This is the status of the source after a read.

Enumerator
OK 

Source data provided without error.

EOS 

Source reached the end of stream.

ERROR 

There was an error providing source data.

CODEC_CHANGED 

The codec has changed and the decoder must be reconfigured

NO_AVAILABLE_SAMPLES 

Could not retrieve media samples.

◆ MediaType

enum class firebolt::rialto::MediaType
strong

The media type of media to be played.

Enumerator
UNKNOWN 

Media type not known.

MSE 

Media is MSE and will request data.

◆ NetworkState

enum class firebolt::rialto::NetworkState
strong

The Network State.

The network state reflects the state of the network. For backend streaming, say using MediaPipelineURLDelegate, this is important as the backend uses the network to obtain the media data directly.

For streaming that uses the browser to obtain data, say Media Source Extensions playback, only the states NetworkState::IDLE, NetworkState::BUFFERED and NetworkState::DECODE_ERROR should be indicated by the backend.

Enumerator
UNKNOWN 

An unknown or undefined network state.

IDLE 

The network is idle.

BUFFERING 

The network is buffering data before playing.

BUFFERING_PROGRESS 

The network is buffering data whilst playing.

BUFFERED 

All the data is buffered.

STALLED 

The network has stalled but may recover.

FORMAT_ERROR 

The data is the wrong format.

NETWORK_ERROR 

There has been a network error. Playback stops.

DECODE_ERROR 

There has been a decode error of the data.

◆ PlaybackState

The Playback State.

The player will start IDLE. Once play() has been called the player will be PLAYING, or once pause() has been called the player will be PAUSED. A seek() request will result in SEEKING and once the seek is complete SEEK_DONE will be issued followed by PLAYING. The STOPPED state will be issued after a stop() request.

Enumerator
UNKNOWN 

An unknown or undefined playback state.

IDLE 

The backend player is idle.

PLAYING 

The backend player is playing media.

PAUSED 

The backend player is paused.

SEEKING 

The backend player is seeking a new playback position.

SEEK_DONE 

The backend player has finished seek.

STOPPED 

The backend player has stopped playback.

END_OF_STREAM 

The backend player has got to the end of playback.

FAILURE 

The backend player failed to set playback state.

◆ WebAudioPlayerState

The Web Audio Player State.

Enumerator
UNKNOWN 

An unknown or undefined playback state.

IDLE 

The player is ready to play media.

PLAYING 

The player is playing media.

PAUSED 

The player is has paused media playback.

END_OF_STREAM 

The player has got to the end of playback.

FAILURE 

The player failed to set playback state.