#include <BaseStreamSource.h>
◆ BaseStreamSource()
| alexaClientSDK::mediaPlayer::BaseStreamSource::BaseStreamSource |
( |
PipelineInterface * |
pipeline, |
|
|
const std::string & |
className |
|
) |
| |
Constructor.
- Parameters
-
| pipeline | The PipelineInterface through which the source of the AudioPipeline may be set. |
| className | The name of the class to be passed to RequiresShutdown. |
◆ ~BaseStreamSource()
| alexaClientSDK::mediaPlayer::BaseStreamSource::~BaseStreamSource |
( |
| ) |
|
|
override |
◆ addObserver()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::addObserver |
( |
std::shared_ptr< SourceObserverInterface > |
observer | ) |
|
|
overridevirtual |
◆ clearOnReadDataHandler()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::clearOnReadDataHandler |
( |
| ) |
|
|
protected |
Clear out the tracking of the onReadData() handler callback. This is used when gstreamer is known to have uninstalled the handler on its own.
◆ close()
| virtual void alexaClientSDK::mediaPlayer::BaseStreamSource::close |
( |
| ) |
|
|
protectedpure virtual |
◆ getAppSrc()
| GstAppSrc* alexaClientSDK::mediaPlayer::BaseStreamSource::getAppSrc |
( |
| ) |
const |
|
protected |
Get the AppSrc to which this instance should feed audio data.
- Returns
- The AppSrc to which this instance should feed audio data.
◆ handleEndOfStream()
| bool alexaClientSDK::mediaPlayer::BaseStreamSource::handleEndOfStream |
( |
| ) |
|
|
overridevirtual |
Internally, a source may need additional processing after EOS is reached. This function will process that data.
- Returns
- A boolean indicating whether the process operation was successful.
Implements alexaClientSDK::mediaPlayer::SourceInterface.
◆ handleReadData()
| virtual gboolean alexaClientSDK::mediaPlayer::BaseStreamSource::handleReadData |
( |
| ) |
|
|
protectedpure virtual |
Reads data from this instance and pushes it into appsrc element.
- Returns
false if there is an error or end of data from this source, else true.
◆ handleSeekData()
| virtual gboolean alexaClientSDK::mediaPlayer::BaseStreamSource::handleSeekData |
( |
guint64 |
offset | ) |
|
|
protectedpure virtual |
Seeks to the appropriate offset. Any data pushed after this should come from the new offset.
- Returns
false if the seek failed, or true otherwise.
◆ hasAdditionalData()
| bool alexaClientSDK::mediaPlayer::BaseStreamSource::hasAdditionalData |
( |
| ) |
|
|
overridevirtual |
◆ init()
Initializes a source. Creates all the necessary pipeline elements such that audio output from the final element should be decoded output that can be input to the converter of the AudioPipeline. Adding the elements to the pipeline of the AudioPipeline, linking the elements and setting up the callbacks for signals should be handled.
- Parameters
-
| audioFormat | The audioFormat to be used when playing raw PCM data. |
- Returns
true if the initialization was successful else false.
◆ installOnReadDataHandler()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::installOnReadDataHandler |
( |
| ) |
|
|
protected |
Install the onReadData() handler. If it is already installed, reset the retry count.
◆ isOpen()
| virtual bool alexaClientSDK::mediaPlayer::BaseStreamSource::isOpen |
( |
| ) |
|
|
protectedpure virtual |
Return whether the audio source is still open.
- Returns
- whether the audio source is still open.
◆ notifyObserversOnReadData()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::notifyObserversOnReadData |
( |
| ) |
|
|
protected |
A utility function to notify the observers of this object when data has been read.
◆ preprocess()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::preprocess |
( |
| ) |
|
|
overridevirtual |
◆ removeObserver()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::removeObserver |
( |
std::shared_ptr< SourceObserverInterface > |
observer | ) |
|
|
overridevirtual |
◆ signalEndOfData()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::signalEndOfData |
( |
| ) |
|
|
protected |
Signal gstreamer about the end of data from this instance.
◆ uninstallOnReadDataHandler()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::uninstallOnReadDataHandler |
( |
| ) |
|
|
protected |
Uninstall the onReadData() handler.
◆ updateOnReadDataHandler()
| void alexaClientSDK::mediaPlayer::BaseStreamSource::updateOnReadDataHandler |
( |
| ) |
|
|
protected |
Update when to call onReadData() handler based upon the number of retries since data was last read.
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/MediaPlayer/GStreamerMediaPlayer/include/MediaPlayer/BaseStreamSource.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0