Shaka Player Embedded
Classes | Public Member Functions | Public Attributes | List of all members
shaka::media::EncodedFrame Class Reference

#include <frames.h>

Inheritance diagram for shaka::media::EncodedFrame:
shaka::media::BaseFrame shaka::media::ffmpeg::FFmpegEncodedFrame

Classes

class  Impl
 

Public Member Functions

 EncodedFrame (std::shared_ptr< const StreamInfo > stream, double pts, double dts, double duration, bool is_key_frame, const uint8_t *data, size_t data_size, double timestamp_offset, std::shared_ptr< eme::FrameEncryptionInfo > encryption_info)
 
 ~EncodedFrame () override
 
virtual MediaStatus Decrypt (const eme::Implementation *implementation, uint8_t *dest) const
 
size_t EstimateSize () const override
 
- Public Member Functions inherited from shaka::media::BaseFrame
 BaseFrame (std::shared_ptr< const StreamInfo > stream_info, double pts, double dts, double duration, bool is_key_frame)
 
virtual ~BaseFrame ()
 
 BaseFrame (const BaseFrame &)=delete
 
BaseFrameoperator= (const BaseFrame &)=delete
 
 BaseFrame (BaseFrame &&)=delete
 
BaseFrameoperator= (BaseFrame &&)=delete
 

Public Attributes

const uint8_t *const data
 
const size_t data_size
 
const double timestamp_offset
 
const std::shared_ptr< eme::FrameEncryptionInfoencryption_info
 
- Public Attributes inherited from shaka::media::BaseFrame
const std::shared_ptr< const StreamInfostream_info
 
const double pts
 
const double dts
 
const double duration
 
const bool is_key_frame
 

Detailed Description

Defines an encoded frame. This can be used as-is, or can be subclassed to support different frame types.

Definition at line 233 of file frames.h.

Constructor & Destructor Documentation

§ EncodedFrame()

shaka::media::EncodedFrame::EncodedFrame ( std::shared_ptr< const StreamInfo stream,
double  pts,
double  dts,
double  duration,
bool  is_key_frame,
const uint8_t *  data,
size_t  data_size,
double  timestamp_offset,
std::shared_ptr< eme::FrameEncryptionInfo encryption_info 
)

Definition at line 131 of file frames.cc.

§ ~EncodedFrame()

shaka::media::EncodedFrame::~EncodedFrame ( )
override

Definition at line 141 of file frames.cc.

Member Function Documentation

§ Decrypt()

MediaStatus shaka::media::EncodedFrame::Decrypt ( const eme::Implementation implementation,
uint8_t *  dest 
) const
virtual

Attempts to decrypt the frame's data into the given buffer. This may not be supported for some frame types or some EME implementations. This is only used by the DefaultMediaPlayer.

Definition at line 143 of file frames.cc.

§ EstimateSize()

size_t shaka::media::EncodedFrame::EstimateSize ( ) const
overridevirtual

Estimates the size of this frame. This can be used to restrict the number of frames stored or to monitor/debug memory usage. This should only be used as an estimate and may not accurately measure the size.

Returns
The estimated size of the frame, in bytes.

Reimplemented from shaka::media::BaseFrame.

Reimplemented in shaka::media::ffmpeg::FFmpegEncodedFrame.

Definition at line 162 of file frames.cc.

Member Data Documentation

§ data

const uint8_t* const shaka::media::EncodedFrame::data

The buffer that contains the frame data. This may contain encrypted data.

Definition at line 244 of file frames.h.

§ data_size

const size_t shaka::media::EncodedFrame::data_size

The number of bytes in data.

Definition at line 247 of file frames.h.

§ encryption_info

const std::shared_ptr<eme::FrameEncryptionInfo> shaka::media::EncodedFrame::encryption_info

Contains info on how this frame is encrypted. If this is nullptr, this frame is clear.

Definition at line 259 of file frames.h.

§ timestamp_offset

const double shaka::media::EncodedFrame::timestamp_offset

The offset, in seconds, that the times in the frame should be adjusted when decoding.

Definition at line 253 of file frames.h.


The documentation for this class was generated from the following files: