Shaka Player Embedded
|
#include <decoder.h>
Public Member Functions | |
Decoder () | |
virtual | ~ Decoder () |
Decoder (const Decoder &)=delete | |
Decoder & | operator= (const Decoder &)=delete |
Decoder (Decoder &&)=delete | |
Decoder & | operator= (Decoder &&)=delete |
virtual MediaCapabilitiesInfo | DecodingInfo (const MediaDecodingConfiguration &config) const =0 |
virtual void | ResetDecoder ()=0 |
virtual MediaStatus | Decode (std::shared_ptr< EncodedFrame > input, const eme::Implementation *eme, std::vector< std::shared_ptr< DecodedFrame >> *frames, std::string *extra_info)=0 |
Static Public Member Functions | |
static std::unique_ptr< Decoder > | CreateDefaultDecoder () |
This is used by the DefaultMediaPlayer to decode EncodedFrame objects into DecodedFrame objects. If using a custom MediaPlayer, this type doesn't have to be used.
This object is used to decode a single stream type (e.g. audio or video), but this needs to support switching between different streams for adaptation.
With the exception of DecodingInfo, this is only used on a single background thread.
shaka::media::Decoder::Decoder | ( | ) |
|
virtual |
|
delete |
|
delete |
|
static |
Creates a new instance of the built-in decoder. This returns nullptr if the built-in decoder was removed from the build.
Definition at line 31 of file decoder.cc.
|
pure virtual |
Attempts to decode the given frame into some number of full frames.
This is given frames in DTS order, starting with a keyframe. The caller will call ResetDecoder if there is a seek before passing new frames. This may be given frames from different sub-streams, but changes will always start with a keyframe.
input | The frame to decode. This can be nullptr to flush the decoder. |
eme | The EME implementation used to decrypt frames, or nullptr if not using EME. |
frames | [OUT] Where to insert newly created frames. |
extra_info | [OUT] If this returns FatalError, this argument will be set to a description of what error happened. |
Implemented in shaka::media::apple::AppleDecoder, and shaka::media::ffmpeg::FFmpegDecoder.
|
pure virtual |
Implemented in shaka::media::apple::AppleDecoder, and shaka::media::ffmpeg::FFmpegDecoder.
|
pure virtual |
Resets any internal state due to a seek. The next frame given will be a keyframe. This is not called for changing sub-streams.
Implemented in shaka::media::apple::AppleDecoder, and shaka::media::ffmpeg::FFmpegDecoder.