Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Which file to decide that use the BaseStreamSource.cpp or UrlSource.cpp??? #408

Closed
captainpanther opened this issue Dec 22, 2017 · 3 comments

Comments

@captainpanther
Copy link

in AVS Device SDK,

in source code, i just see the MediaPlayerInterface own BaseStreamSource.cpp and UrlSource.cpp two types source.

But Can i know that which source code to decide that use BaseStreamSource.cpp or UrlSource.cpp??

@kjkh
Copy link

kjkh commented Dec 22, 2017

Hi @captainpanther,

There are actually three different source classes:

  • AttachmentReaderSource : BaseStreamSource
  • IStreamSource : BaseStreamSource
  • UrlSource

UrlSource is deprecated and will mostly likely be removed in a future release. It's not currently used anywhere. Its purpose has been replaced by a combination of the AttachmentReaderSource and HTTP content retrieval classes.

However, those should not be confused with the sources that MediaPlayer supports. The MediaPlayerInterface (and our implementation) currently support three different sources:

  • SourceId setSource(std::shared_ptravsCommon::avs::attachment::AttachmentReader attachmentReader);
  • SourceId setSource(std::shared_ptrstd::istream stream, bool repeat);
  • SourceId setSource(const std::string& url, std::chrono::milliseconds offset = std::chrono::milliseconds::zero());

Hope this helps.

@captainpanther
Copy link
Author

Thank ur reply, but i want to know which file decide to use BaseStreamSource.cpp or UrlSource.cpp in source code project.
is MediaPlayerInterface ?

@mradulan
Copy link
Contributor

BaseStreamSource.cpp

celinval added a commit that referenced this issue Feb 12, 2018
Changes in this update:

**Enhancements**
* Added the `ExternalMediaPlayer` Capability Agent. This allows playback from music providers that control their own playback queue. Example: Spotify.
* Added support for AU and NZ to the `SampleApp`.
* Firmware version can now be sent to Alexa via the `SoftwareInfo` event. The firmware version is specified in the config file under the `sampleApp` object as an integer value named [`firmwareVersion`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L52).
* The new `f` command was added to the `SampleApp` which allows the firmware version to be updated at run-time.
* Optional configuration changes have been introduced. Now a [default log level](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L93) can be set for `ACSDK_LOG_MODULE` components, globally or individually. This value is specified under a new root level configuration object called `logger`, and the value itself is named `logLevel`. This allows you to limit the degree of logging to that default value, such as `ERROR`or `INFO`.

**Bug Fixes**
* Fixed bug where `AudioPlayer` progress reports were not being sent, or were being sent incorrectly.
* [Issue 408](#408) - Irrelevant code related to `UrlSource` was removed from the `GStreamer-based MediaPlayer` implementation.
* The `TZ` variable no longer needs to be set to `UTC` when building the `SampleApp`.
* Fixed a bug where `CurlEasyHandleWrapper` logged unwanted data on failure conditions.
* Fixed a bug to improve `SIGPIPE` handling.
* Fixed a bug where the filename and classname were mismatched. Changed `UrlToAttachmentConverter.h` to `UrlContentToAttachmentConverter.h`,and `UrlToAttachmentConverter.cpp` to `UrlContentToAttachmentConverter.cpp`

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* Display Cards for Kindle don't render.
* If using the GStreamer-based `MediaPlayer` implementation, after muting and un-muting an audio item, the next item in the queue will begin playing rather than continuing playback of the originally muted audio item.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
padillag pushed a commit to padillag/avs-device-sdk-intel-speech-enabling-kit that referenced this issue May 11, 2018
Changes in this update:

**Enhancements**
* Added the `ExternalMediaPlayer` Capability Agent. This allows playback from music providers that control their own playback queue. Example: Spotify.
* Added support for AU and NZ to the `SampleApp`.
* Firmware version can now be sent to Alexa via the `SoftwareInfo` event. The firmware version is specified in the config file under the `sampleApp` object as an integer value named [`firmwareVersion`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L52).
* The new `f` command was added to the `SampleApp` which allows the firmware version to be updated at run-time.
* Optional configuration changes have been introduced. Now a [default log level](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L93) can be set for `ACSDK_LOG_MODULE` components, globally or individually. This value is specified under a new root level configuration object called `logger`, and the value itself is named `logLevel`. This allows you to limit the degree of logging to that default value, such as `ERROR`or `INFO`.

**Bug Fixes**
* Fixed bug where `AudioPlayer` progress reports were not being sent, or were being sent incorrectly.
* [Issue 408](alexa/avs-device-sdk#408) - Irrelevant code related to `UrlSource` was removed from the `GStreamer-based MediaPlayer` implementation.
* The `TZ` variable no longer needs to be set to `UTC` when building the `SampleApp`.
* Fixed a bug where `CurlEasyHandleWrapper` logged unwanted data on failure conditions.
* Fixed a bug to improve `SIGPIPE` handling.
* Fixed a bug where the filename and classname were mismatched. Changed `UrlToAttachmentConverter.h` to `UrlContentToAttachmentConverter.h`,and `UrlToAttachmentConverter.cpp` to `UrlContentToAttachmentConverter.cpp`

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* Display Cards for Kindle don't render.
* If using the GStreamer-based `MediaPlayer` implementation, after muting and un-muting an audio item, the next item in the queue will begin playing rather than continuing playback of the originally muted audio item.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
padillag pushed a commit to padillag/avs-device-sdk-intel-speech-enabling-kit that referenced this issue May 11, 2018
Changes in this update:

**Enhancements**
* Added the `ExternalMediaPlayer` Capability Agent. This allows playback from music providers that control their own playback queue. Example: Spotify.
* Added support for AU and NZ to the `SampleApp`.
* Firmware version can now be sent to Alexa via the `SoftwareInfo` event. The firmware version is specified in the config file under the `sampleApp` object as an integer value named [`firmwareVersion`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L52).
* The new `f` command was added to the `SampleApp` which allows the firmware version to be updated at run-time.
* Optional configuration changes have been introduced. Now a [default log level](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L93) can be set for `ACSDK_LOG_MODULE` components, globally or individually. This value is specified under a new root level configuration object called `logger`, and the value itself is named `logLevel`. This allows you to limit the degree of logging to that default value, such as `ERROR`or `INFO`.

**Bug Fixes**
* Fixed bug where `AudioPlayer` progress reports were not being sent, or were being sent incorrectly.
* [Issue 408](alexa/avs-device-sdk#408) - Irrelevant code related to `UrlSource` was removed from the `GStreamer-based MediaPlayer` implementation.
* The `TZ` variable no longer needs to be set to `UTC` when building the `SampleApp`.
* Fixed a bug where `CurlEasyHandleWrapper` logged unwanted data on failure conditions.
* Fixed a bug to improve `SIGPIPE` handling.
* Fixed a bug where the filename and classname were mismatched. Changed `UrlToAttachmentConverter.h` to `UrlContentToAttachmentConverter.h`,and `UrlToAttachmentConverter.cpp` to `UrlContentToAttachmentConverter.cpp`

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* Display Cards for Kindle don't render.
* If using the GStreamer-based `MediaPlayer` implementation, after muting and un-muting an audio item, the next item in the queue will begin playing rather than continuing playback of the originally muted audio item.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants