NaCl Player API
NaCl Player API Documentation
media_common.h File Reference
#include <cstdint>
#include <string>
#include "nacl_player/common.h"
Include dependency graph for media_common.h:

Go to the source code of this file.

Classes

struct  Samsung::NaClPlayer::VideoTrackInfo
 Structure describing video track from played media. More...
 
struct  Samsung::NaClPlayer::AudioTrackInfo
 Structure describing audio track from played media. More...
 
struct  Samsung::NaClPlayer::TextTrackInfo
 Structure describing text/subtitles track from played media. More...
 
struct  Samsung::NaClPlayer::ESPacket
 
struct  Samsung::NaClPlayer::EncryptedSubsampleDescription
 
struct  Samsung::NaClPlayer::ESPacketEncryptionInfo
 Structure describing encrypted packet. More...
 
struct  Samsung::NaClPlayer::TrustZoneReference
 Structure describing TrustZone memory reference. More...
 

Enumerations

enum  Samsung::NaClPlayer::ElementaryStreamType {
  Samsung::NaClPlayer::ElementaryStreamType_Unknown = -1, Samsung::NaClPlayer::ElementaryStreamType_Video = 0, Samsung::NaClPlayer::ElementaryStreamType_Audio = 1, Samsung::NaClPlayer::ElementaryStreamType_Text = 2,
  Samsung::NaClPlayer::ElementaryStreamType_Max = 3
}
 
enum  Samsung::NaClPlayer::MediaPlayerState {
  Samsung::NaClPlayer::MediaPlayerState_None = 0, Samsung::NaClPlayer::MediaPlayerState_Uninitialized = 1, Samsung::NaClPlayer::MediaPlayerState_Ready = 2, Samsung::NaClPlayer::MediaPlayerState_Playing = 3,
  Samsung::NaClPlayer::MediaPlayerState_Paused = 4
}
 States of the media player. More...
 
enum  Samsung::NaClPlayer::MediaPlayerError {
  Samsung::NaClPlayer::MediaPlayerError_None = 0, Samsung::NaClPlayer::MediaPlayerError_BadArgument = 1, Samsung::NaClPlayer::MediaPlayerError_Network = 2, Samsung::NaClPlayer::MediaPlayerError_Demux = 3,
  Samsung::NaClPlayer::MediaPlayerError_Decrypt = 4, Samsung::NaClPlayer::MediaPlayerError_Decode = 5, Samsung::NaClPlayer::MediaPlayerError_Render = 6, Samsung::NaClPlayer::MediaPlayerError_UnsupportedCodec = 7,
  Samsung::NaClPlayer::MediaPlayerError_UnsupportedContainer = 8, Samsung::NaClPlayer::MediaPlayerError_Resource = 9, Samsung::NaClPlayer::MediaPlayerError_Unknown = 10, Samsung::NaClPlayer::MediaPlayerError_UnsupportedSubtitleFormat = 11
}
 List of errors which might be reported by the player. More...
 
enum  Samsung::NaClPlayer::DRMType {
  Samsung::NaClPlayer::DRMType_Unknown = 0, Samsung::NaClPlayer::DRMType_Playready = 1, Samsung::NaClPlayer::DRMType_Marlin = 2, Samsung::NaClPlayer::DRMType_VeriMatrix = 3,
  Samsung::NaClPlayer::DRMType_WidevineClassic = 4, Samsung::NaClPlayer::DRMType_WidevineModular = 5, Samsung::NaClPlayer::DRMType_Securemedia = 6, Samsung::NaClPlayer::DRMType_SDRM = 7
}
 List of supported types of DRM systems. More...
 
enum  Samsung::NaClPlayer::DRMOperation {
  Samsung::NaClPlayer::DRMOperation_SetProperties = 1, Samsung::NaClPlayer::DRMOperation_GenChallenge = 2, Samsung::NaClPlayer::DRMOperation_InstallLicense = 3, Samsung::NaClPlayer::DRMOperation_DeleteLicense = 4,
  Samsung::NaClPlayer::DRMOperation_ProcessInitiatior = 5, Samsung::NaClPlayer::DRMOperation_GetVersion = 6
}
 List of possible DRM system operation. More...
 
enum  Samsung::NaClPlayer::StreamInitializationMode { Samsung::NaClPlayer::StreamInitializationMode_Full = 0, Samsung::NaClPlayer::StreamInitializationMode_Minimal = 1 }
 
enum  Samsung::NaClPlayer::StreamingProperty {
  Samsung::NaClPlayer::StreamingProperty_Cookie = 1, Samsung::NaClPlayer::StreamingProperty_UserAgent = 2, Samsung::NaClPlayer::StreamingProperty_AdaptiveInfo = 3, Samsung::NaClPlayer::StreamingProperty_Type = 4,
  Samsung::NaClPlayer::StreamingProperty_AvailableBitrates = 5, Samsung::NaClPlayer::StreamingProperty_Throughput = 6, Samsung::NaClPlayer::StreamingProperty_Duration = 7, Samsung::NaClPlayer::StreamingProperty_CurrentBitrate = 8
}
 

Detailed Description

Defines common media data structures and enumerations used by NaCl Player.

Definition in file media_common.h.

Enumeration Type Documentation

◆ DRMOperation

List of possible DRM system operation.

Enumerator
DRMOperation_SetProperties 

Setting properties of a DRM instance.

DRMOperation_GenChallenge 

Enabling challenge message instead of DRM’s connecting to a license server.

DRMOperation_InstallLicense 

Installing a license into a DRM instance.

DRMOperation_DeleteLicense 

Deleting a license from a DRM instance.

DRMOperation_ProcessInitiatior 

Requesting key to DRM license server with the initiator information.

DRMOperation_GetVersion 

Querying the version of DRM system.

Definition at line 125 of file media_common.h.

◆ DRMType

List of supported types of DRM systems.

Enumerator
DRMType_Unknown 

Unknown DRM system.

DRMType_Playready 

Playready DRM system.

DRMType_Marlin 

Marlin DRM system.

DRMType_VeriMatrix 

Verimatrix DRM system.

DRMType_WidevineClassic 

Widevine classic DRM system.

DRMType_WidevineModular 

Widevine modular (used with MPEG-DASH) DRM system.

DRMType_Securemedia 

Securemedia DRM system.

DRMType_SDRM 

SDRM system.

Definition at line 98 of file media_common.h.

◆ ElementaryStreamType

List of elementary stream types of which played media container can consists of.

Values of valid elementary streams can be used to index array.

Enumerator
ElementaryStreamType_Unknown 

Unknown/Invalid Elementary Stream.

ElementaryStreamType_Video 

Video Elementary Stream.

ElementaryStreamType_Audio 

Audio Elementary Stream.

ElementaryStreamType_Text 

Text/Subtitles Elementary Stream.

ElementaryStreamType_Max 

Number of valid Elementary Streams, which can be used as an array size.

Definition at line 22 of file media_common.h.

◆ MediaPlayerError

List of errors which might be reported by the player.

Enumerator
MediaPlayerError_None 

No error has occurred.

MediaPlayerError_BadArgument 

Input error has occured.

MediaPlayerError_Network 

Network error has occurred.

MediaPlayerError_Demux 

Demuxer error has occured.

MediaPlayerError_Decrypt 

Decryptor error has occured.

MediaPlayerError_Decode 

Decoder error has occurred.

MediaPlayerError_Render 

Rendering error has occurred.

MediaPlayerError_UnsupportedCodec 

Media is encoded using unsupported codec.

MediaPlayerError_UnsupportedContainer 

Container is not supported.

MediaPlayerError_Resource 

Resource error has occured (i.e. no space left on device, no such file)

MediaPlayerError_Unknown 

Unknown error has occurred.

MediaPlayerError_UnsupportedSubtitleFormat 

Subtitles file format is not supported.

Definition at line 59 of file media_common.h.

◆ MediaPlayerState

States of the media player.

Enumerator
MediaPlayerState_None 

Indicates invalid state for the player.

MediaPlayerState_Uninitialized 

Player has been created but no data sources hasn't been attached yet.

MediaPlayerState_Ready 

Player has been created and data sources has been attached. Playback is ready to be started.

MediaPlayerState_Playing 

Player is playing media. Media time is advancing.

MediaPlayerState_Paused 

Playback has been paused and can be resumed.

Definition at line 40 of file media_common.h.

◆ StreamingProperty

Enum describing available streaming properties which can be set by the user.

Enumerator
StreamingProperty_Cookie 

The cookie for streaming playback.

StreamingProperty_UserAgent 

The user agent for streaming playback.

StreamingProperty_AdaptiveInfo 

Sets adaptive streaming format specific properties.

Eg. for smooth streaming (strings should be concatenated): "|BITRATES=50000~2500000" "|STARTBITRATE=150000" "|SKIPBITRATE=100000"

Eg. for DRM (strings should be concatenated): "|DEVICE_ID=null" "|DEVICET_TYPE_ID=60" "|DRM_URL=https://..."

StreamingProperty_Type 

Sets streaming type.

Eg. : "WIDEVINE" "HLS" "VUDU" "HAS" "SMOOTH"

StreamingProperty_AvailableBitrates 

Gets available bitrates.

Eg. (values are concatenated and separated by '|'): "100|500|1000"

StreamingProperty_Throughput 

Gets current troughput in bps.

Throughput is how much data actually does travel through the 'channel' successfully.

StreamingProperty_Duration 

Gets duration of the clip in seconds.

StreamingProperty_CurrentBitrate 

Gets current bitrate in bps.

Definition at line 179 of file media_common.h.

◆ StreamInitializationMode

Lists possible Elementary Stream initialization modes.

Values of this enumeration are used to signal how much information describing Elementary Stream itself (metadata) was extracted by the plugin.

Enumerator
StreamInitializationMode_Full 

Full initialization mode.

In this mode all information related to the stream configuration are extracted by the plugin (demuxer) and passed to the browser.

StreamInitializationMode_Minimal 

Minimal initialization mode.

In this mode only basic stream information like codec and maximal resolution (for Video Elementary Stream) is extracted by the plugin (demuxer). All other information is extracted from the Elementary Stream by the browser (decoder).

As the browser may use H/W decoder to extract such information, this mode may speed up overall time of pipeline initialization in MPEG2-TS channel change scenarios.

Minimal information requried to be provided by the plugin:

  1. Audio Elementary Stream:
    • codec type
  2. Video Elementary Stream:
    • codec type
    • maximal video resolution (width and height)

Definition at line 150 of file media_common.h.