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

#include <FFmpegUrlInputController.h>

Inheritance diagram for alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController:
Collaboration graph
[legend]

Public Member Functions

std::string getCurrentUrl () const
 
 ~FFmpegUrlInputController ()
 
FFmpegInputControllerInterface methods
std::tuple< Result, std::shared_ptr< AVFormatContext >, std::chrono::milliseconds > getCurrentFormatContext () override
 
bool hasNext () const override
 
bool next () override
 
- Public Member Functions inherited from alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface
virtual ~FFmpegInputControllerInterface ()=default
 

Static Public Member Functions

static std::unique_ptr< FFmpegUrlInputControllercreate (std::shared_ptr< avsCommon::utils::playlistParser::IterativePlaylistParserInterface > playlistParser, const std::string &url, const std::chrono::milliseconds &offset, bool repeat)
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface
enum  Result { Result::OK, Result::OK_EMPTY, Result::TRY_AGAIN, Result::ERROR }
 Enumeration class that represents the possible return values for getContext. More...
 

Detailed Description

This class provides the FFmpegDecoder input access to the content of a url (playlist or single media file).

Constructor & Destructor Documentation

◆ ~FFmpegUrlInputController()

alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController::~FFmpegUrlInputController ( )

Destructor.

Member Function Documentation

◆ create()

static std::unique_ptr<FFmpegUrlInputController> alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController::create ( std::shared_ptr< avsCommon::utils::playlistParser::IterativePlaylistParserInterface playlistParser,
const std::string &  url,
const std::chrono::milliseconds &  offset,
bool  repeat 
)
static

Creates an input stream object.

Parameters
playlistParserPointer to a valid playlist parser used to fill up the Playlist.
urlThe playlist / media url that we would like to decode.
offsetThe audio input should start from the given offset.
repeatThe playlist should play in a loop if this is true.
Returns
A pointer to the FFmpegUrlInputReader if succeed; otherwise, nullptr.

◆ getCurrentFormatContext()

std::tuple<Result, std::shared_ptr<AVFormatContext>, std::chrono::milliseconds> alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController::getCurrentFormatContext ( )
overridevirtual

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.

Implements alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface.

◆ getCurrentUrl()

std::string alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController::getCurrentUrl ( ) const

◆ hasNext()

bool alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController::hasNext ( ) const
overridevirtual

Checks if there is a next track to be played.

Returns
true if there is a next track; false, otherwise.

Implements alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface.

◆ next()

bool alexaClientSDK::mediaPlayer::android::FFmpegUrlInputController::next ( )
overridevirtual

Change input to the next track to be played.

Returns
true if it succeeds to change; false, otherwise.

Implements alexaClientSDK::mediaPlayer::android::FFmpegInputControllerInterface.


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