AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface Class Referenceabstract

#include <FFmpegInputControllerInterface.h>

Inheritance diagram for alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface:
Inheritance graph
[legend]

Public Types

enum  Result { Result::OK, Result::OK_EMPTY, Result::TRY_AGAIN, Result::ERROR }
 Enumeration class that represents the possible return values for getContext. More...
 

Public Member Functions

virtual bool hasNext () const =0
 
virtual bool next ()=0
 
virtual std::tuple< Result, std::shared_ptr< AVFormatContext >, std::chrono::milliseconds > getCurrentFormatContext ()=0
 
virtual ~FFmpegInputControllerInterface ()=default
 

Detailed Description

Interface for an input controller. The controller should provide a AVFormatContext that will be used to configure how the decoder will read the current input media.

For custom buffer operations, the context may set which read function the FFmpeg decoder will call.

The interface also offers hasNext() and next() methods for playing multiple medias in a row. The derived classes that do not support multiple media playing should just return false for both methods.

Member Enumeration Documentation

◆ Result

Enumeration class that represents the possible return values for getContext.

Enumerator
OK 

Get context succeeded. The returned AVFormatContext shall be valid.

OK_EMPTY 

Get context succeeded. The returned AVFormatContext is null because there is no input to read.

TRY_AGAIN 

There is not enough input data available to generate the context. Decoder should try again later.

ERROR 

A unrecoverable error was found while trying to create the AVFormatContext.

Constructor & Destructor Documentation

◆ ~FFmpegInputControllerInterface()

virtual alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface::~FFmpegInputControllerInterface ( )
virtualdefault

Destructor

Member Function Documentation

◆ getCurrentFormatContext()

virtual std::tuple<Result, std::shared_ptr<AVFormatContext>, std::chrono::milliseconds> alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface::getCurrentFormatContext ( )
pure virtual

This method will initialize the ffmpeg format context that represents the current input stream.

Returns
A tuple with the return result, a pointer to AVFormatContext and the initial playback position.

Implemented in alexaClientSDK::mediaPlayer::android::FFmpegAttachmentInputController, alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController, and alexaClientSDK::mediaPlayer::android::FFmpegStreamInputController.

◆ hasNext()

virtual bool alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface::hasNext ( ) const
pure virtual

◆ next()

virtual bool alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface::next ( )
pure virtual

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

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0