![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Class that handles the streaming of urls containing media into Attachments.
More...
#include <UrlContentToAttachmentConverter.h>


Classes | |
| class | ErrorObserverInterface |
Class to observe errors that arise from converting a URL to to an Attachment. More... | |
| class | WriteCompleteObserverInterface |
| Class to allow notification when writing to the attachment is complete. More... | |
Public Member Functions | |
| std::shared_ptr< avsCommon::avs::attachment::InProcessAttachment > | getAttachment () |
| std::chrono::milliseconds | getStartStreamingPoint () |
| std::chrono::milliseconds | getDesiredStreamingPoint () |
| void | doShutdown () override |
Public Member Functions inherited from alexaClientSDK::avsCommon::utils::playlistParser::PlaylistParserObserverInterface | |
| virtual | ~PlaylistParserObserverInterface ()=default |
Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown | |
| RequiresShutdown (const std::string &name) | |
| virtual | ~RequiresShutdown () |
| Destructor. More... | |
| const std::string & | name () const |
| void | shutdown () |
| bool | isShutdown () const |
Static Public Member Functions | |
| static std::shared_ptr< UrlContentToAttachmentConverter > | create (std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > contentFetcherFactory, const std::string &url, std::shared_ptr< ErrorObserverInterface > observer, std::chrono::milliseconds startTime=std::chrono::milliseconds::zero(), std::shared_ptr< WriteCompleteObserverInterface > writeCompleteObserver=nullptr, size_t numOfReaders=1) |
Additional Inherited Members |
Class that handles the streaming of urls containing media into Attachments.
|
static |
Creates a converter object. Note that calling this function will commence the parsing and streaming of the URL into the internal attachment. If a desired start time is specified, this function will attempt to start streaming at that offset, based on available metadata if the URL points to a playlist file. If no such information is available, streaming will begin from the beginning. It is up to the caller of this function to make a call to getStartStreamingPoint() to find out the actual offset from which streaming began.
| contentFetcherFactory | Used to create HTTPContentFetchers. |
| url | The URL to stream from. |
| observer | An observer to be notified of any errors that may happen during streaming. |
| startTime | The desired time to attempt to start streaming from. Note that this will only succeed in cases where the URL points to a playlist with metadata about individual chunks within it. If none are found, streaming will begin from the beginning. |
| writeCompleteObserver | An observer to be notified when data written to the attachment is complete. Optional. |
| numOfReaders | Maximum number of readers to this contentFetcher. |
std::shared_ptr to the new UrlContentToAttachmentConverter object or nullptr on failure.convertPlaylistToAttachment() will fail.
|
overridevirtual |
Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.
Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.
| std::shared_ptr<avsCommon::avs::attachment::InProcessAttachment> alexaClientSDK::playlistParser::UrlContentToAttachmentConverter::getAttachment | ( | ) |
Returns the attachment into which the URL content was streamed into.
std::shared_ptr of an InProcessAttachment or nullptr on failure. | std::chrono::milliseconds alexaClientSDK::playlistParser::UrlContentToAttachmentConverter::getDesiredStreamingPoint | ( | ) |
Gets the initial desired point of steaming.
| std::chrono::milliseconds alexaClientSDK::playlistParser::UrlContentToAttachmentConverter::getStartStreamingPoint | ( | ) |
Gets the actual point from which streaming began.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0