2017-08-08 00:04:43 +00:00
|
|
|
/*
|
2020-04-13 22:56:35 +00:00
|
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2017-08-08 00:04:43 +00:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
|
|
* You may not use this file except in compliance with the License.
|
|
|
|
* A copy of the License is located at
|
|
|
|
*
|
|
|
|
* http://aws.amazon.com/apache2.0/
|
|
|
|
*
|
|
|
|
* or in the "license" file accompanying this file. This file is distributed
|
|
|
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
|
|
* express or implied. See the License for the specific language governing
|
|
|
|
* permissions and limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <chrono>
|
|
|
|
#include <condition_variable>
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <mutex>
|
2017-08-08 00:04:43 +00:00
|
|
|
#include <thread>
|
2017-10-02 22:59:05 +00:00
|
|
|
#include <unordered_map>
|
2017-08-08 00:04:43 +00:00
|
|
|
|
|
|
|
#include <gmock/gmock.h>
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
|
2017-08-08 00:04:43 +00:00
|
|
|
#include <AVSCommon/Utils/Logger/Logger.h>
|
2017-10-02 22:59:05 +00:00
|
|
|
#include <AVSCommon/Utils/Memory/Memory.h>
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
|
|
|
|
#include "PlaylistParser/MockContentFetcher.h"
|
2017-08-08 00:04:43 +00:00
|
|
|
#include "PlaylistParser/PlaylistParser.h"
|
|
|
|
|
|
|
|
namespace alexaClientSDK {
|
|
|
|
namespace playlistParser {
|
|
|
|
namespace test {
|
|
|
|
|
|
|
|
using namespace avsCommon::utils::playlistParser;
|
|
|
|
using namespace ::testing;
|
2017-10-02 22:59:05 +00:00
|
|
|
using namespace avsCommon::sdkInterfaces;
|
|
|
|
using namespace avsCommon::avs;
|
2017-08-08 00:04:43 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
/// A mock factory that creates mock content fetchers
|
|
|
|
class MockContentFetcherFactory : public avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface {
|
|
|
|
std::unique_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterface> create(const std::string& url) {
|
|
|
|
return avsCommon::utils::memory::make_unique<MockContentFetcher>(url);
|
|
|
|
}
|
|
|
|
};
|
2017-08-08 00:04:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Mock AttachmentReader.
|
|
|
|
*/
|
|
|
|
class TestParserObserver : public avsCommon::utils::playlistParser::PlaylistParserObserverInterface {
|
|
|
|
public:
|
2017-10-02 22:59:05 +00:00
|
|
|
/// A struct used for bookkeeping of parse results
|
|
|
|
struct ParseResult {
|
|
|
|
int requestId;
|
|
|
|
std::string url;
|
|
|
|
avsCommon::utils::playlistParser::PlaylistParseResult parseResult;
|
2017-12-09 00:07:37 +00:00
|
|
|
std::chrono::milliseconds duration;
|
2017-10-02 22:59:05 +00:00
|
|
|
};
|
|
|
|
|
Version 1.11 alexa-client-sdk
Changes in this update:
**Enhancements**
* Added support for the new Alexa [DoNotDisturb](https://developer.amazon.com/docs/alexa-voice-service/donotdisturb.html) interface, which enables users to toggle the do not disturb (DND) function on their Alexa built-in products.
* The SDK now supports [Opus](https://opus-codec.org/license/) encoding, which is optional. To enable Opus, you must [set the CMake flag to `-DOPUS=ON`](https://github.com/alexa/avs-device-sdk/wiki/Build-Options#Opus-encoding), and include the [libopus library](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies) dependency in your build.
* The MediaPlayer reference implementation has been expanded to support the SAMPLE-AES and AES-128 encryption methods for HLS streaming.
* AES-128 encryption is dependent on libcrypto, which is part of the required openSSL library, and is enabled by default.
* To enable [SAMPLE-AES](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies/Enable-SAMPLE-AES-decryption) encryption, you must set the `-DSAMPLE_AES=ON` in your CMake command, and include the [FFMPEG](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies/Enable-SAMPLE-AES-decryption) library dependency in your build.
* A new configuration for [deviceSettings](https://github.com/alexa/avs-device-sdk/blob/v1.11.0/Integration/AlexaClientSDKConfig.json#L59) has been added.This configuration allows you to specify the location of the device settings database.
* Added locale support for es-MX.
**Bug Fixes**
* Fixed an issue where music wouldn't resume playback in the Android app.
* Now all equalizer capabilities are fully disabled when equalizer is turned off in configuration file. Previously, devices were unconditionally required to provide support for equalizer in order to run the SDK.
* [Issue 1106](https://github.com/alexa/avs-device-sdk/issues/1106) - Fixed an issue in which the `CBLAuthDelegate` wasn't using the correct timeout during request refresh.
* [Issue 1128](https://github.com/alexa/avs-device-sdk/issues/1128) - Fixed an issue in which the `AudioPlayer` instance persisted at shutdown, due to a shared dependency with the `ProgressTimer`.
* Fixed in issue that occurred when a connection to streaming content was interrupted, the SDK did not attempt to resume the connection, and appeared to assume that the content had been fully downloaded. This triggered the next track to be played, assuming it was a playlist.
* [Issue 1040](https://github.com/alexa/avs-device-sdk/issues/1040) - Fixed an issue where alarms would continue to play after user barge-in.
**Known Issues**
* `PlaylistParser` and `IterativePlaylistParser` generate two HTTP requests (one to fetch the content type, and one to fetch the audio data) for each audio stream played.
* Music playback history isn't being displayed in the Alexa app for certain account and device types.
* On GCC 8+, issues related to `-Wclass-memaccess` will trigger warnings. However, this won't cause the build to fail, and these warnings can be ignored.
* In order to use Bluetooth source and sink PulseAudio, you must manually load and unload PulseAudio modules after the SDK starts.
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* `make integration` is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* When the sample app is restarted and network connection is lost, alerts don't play.
* When network connection is lost, lost connection status is not returned via local Text-to Speech (TTS).
2018-12-19 19:13:36 +00:00
|
|
|
void onPlaylistEntryParsed(int requestId, PlaylistEntry entry) {
|
2017-10-02 22:59:05 +00:00
|
|
|
std::lock_guard<std::mutex> lock{m_mutex};
|
Version 1.11 alexa-client-sdk
Changes in this update:
**Enhancements**
* Added support for the new Alexa [DoNotDisturb](https://developer.amazon.com/docs/alexa-voice-service/donotdisturb.html) interface, which enables users to toggle the do not disturb (DND) function on their Alexa built-in products.
* The SDK now supports [Opus](https://opus-codec.org/license/) encoding, which is optional. To enable Opus, you must [set the CMake flag to `-DOPUS=ON`](https://github.com/alexa/avs-device-sdk/wiki/Build-Options#Opus-encoding), and include the [libopus library](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies) dependency in your build.
* The MediaPlayer reference implementation has been expanded to support the SAMPLE-AES and AES-128 encryption methods for HLS streaming.
* AES-128 encryption is dependent on libcrypto, which is part of the required openSSL library, and is enabled by default.
* To enable [SAMPLE-AES](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies/Enable-SAMPLE-AES-decryption) encryption, you must set the `-DSAMPLE_AES=ON` in your CMake command, and include the [FFMPEG](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies/Enable-SAMPLE-AES-decryption) library dependency in your build.
* A new configuration for [deviceSettings](https://github.com/alexa/avs-device-sdk/blob/v1.11.0/Integration/AlexaClientSDKConfig.json#L59) has been added.This configuration allows you to specify the location of the device settings database.
* Added locale support for es-MX.
**Bug Fixes**
* Fixed an issue where music wouldn't resume playback in the Android app.
* Now all equalizer capabilities are fully disabled when equalizer is turned off in configuration file. Previously, devices were unconditionally required to provide support for equalizer in order to run the SDK.
* [Issue 1106](https://github.com/alexa/avs-device-sdk/issues/1106) - Fixed an issue in which the `CBLAuthDelegate` wasn't using the correct timeout during request refresh.
* [Issue 1128](https://github.com/alexa/avs-device-sdk/issues/1128) - Fixed an issue in which the `AudioPlayer` instance persisted at shutdown, due to a shared dependency with the `ProgressTimer`.
* Fixed in issue that occurred when a connection to streaming content was interrupted, the SDK did not attempt to resume the connection, and appeared to assume that the content had been fully downloaded. This triggered the next track to be played, assuming it was a playlist.
* [Issue 1040](https://github.com/alexa/avs-device-sdk/issues/1040) - Fixed an issue where alarms would continue to play after user barge-in.
**Known Issues**
* `PlaylistParser` and `IterativePlaylistParser` generate two HTTP requests (one to fetch the content type, and one to fetch the audio data) for each audio stream played.
* Music playback history isn't being displayed in the Alexa app for certain account and device types.
* On GCC 8+, issues related to `-Wclass-memaccess` will trigger warnings. However, this won't cause the build to fail, and these warnings can be ignored.
* In order to use Bluetooth source and sink PulseAudio, you must manually load and unload PulseAudio modules after the SDK starts.
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* `make integration` is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* When the sample app is restarted and network connection is lost, alerts don't play.
* When network connection is lost, lost connection status is not returned via local Text-to Speech (TTS).
2018-12-19 19:13:36 +00:00
|
|
|
m_parseResults.push_back({requestId, entry.url, entry.parseResult, entry.duration});
|
2017-10-02 22:59:05 +00:00
|
|
|
m_callbackOccurred.notify_one();
|
|
|
|
}
|
2017-08-08 00:04:43 +00:00
|
|
|
|
|
|
|
/**
|
2017-10-02 22:59:05 +00:00
|
|
|
* Waits for the PlaylistParserObserverInterface##onPlaylistEntryParsed() call N times.
|
2017-08-08 00:04:43 +00:00
|
|
|
*
|
2017-10-02 22:59:05 +00:00
|
|
|
* @param numCallbacksExpected The number of callbacks expected.
|
|
|
|
* @param timeout The amount of time to wait for the calls.
|
|
|
|
* @return The parse results that actually occurred.
|
2017-08-08 00:04:43 +00:00
|
|
|
*/
|
2017-10-02 22:59:05 +00:00
|
|
|
std::vector<ParseResult> waitForNCallbacks(
|
|
|
|
size_t numCallbacksExpected,
|
|
|
|
std::chrono::milliseconds timeout = SHORT_TIMEOUT) {
|
|
|
|
std::unique_lock<std::mutex> lock{m_mutex};
|
|
|
|
m_callbackOccurred.wait_for(
|
|
|
|
lock, timeout, [this, numCallbacksExpected]() { return m_parseResults.size() == numCallbacksExpected; });
|
|
|
|
return m_parseResults;
|
|
|
|
}
|
2017-08-08 00:04:43 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
private:
|
|
|
|
/// The detection results that have occurred.
|
|
|
|
std::vector<ParseResult> m_parseResults;
|
2017-08-08 00:04:43 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
/// A mutex to guard against new callbacks.
|
2017-08-08 00:04:43 +00:00
|
|
|
std::mutex m_mutex;
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
/// A condition variable to wait for callbacks.
|
|
|
|
std::condition_variable m_callbackOccurred;
|
2017-08-08 00:04:43 +00:00
|
|
|
};
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
class PlaylistParserTest : public ::testing::Test {
|
|
|
|
protected:
|
|
|
|
void SetUp() {
|
|
|
|
mockFactory = std::make_shared<MockContentFetcherFactory>();
|
|
|
|
playlistParser = PlaylistParser::create(mockFactory);
|
|
|
|
testObserver = std::make_shared<TestParserObserver>();
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
2017-12-09 00:07:37 +00:00
|
|
|
void TearDown() {
|
|
|
|
playlistParser->shutdown();
|
|
|
|
}
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
/// A mock factory to create mock content fetchers
|
|
|
|
std::shared_ptr<MockContentFetcherFactory> mockFactory;
|
2017-08-08 00:04:43 +00:00
|
|
|
|
|
|
|
/// Instance of the @c PlaylistParser.
|
2017-10-02 22:59:05 +00:00
|
|
|
std::shared_ptr<PlaylistParser> playlistParser;
|
2017-08-08 00:04:43 +00:00
|
|
|
|
|
|
|
/// Instance of the @c TestParserObserver.
|
2017-10-02 22:59:05 +00:00
|
|
|
std::shared_ptr<TestParserObserver> testObserver;
|
2017-08-08 00:04:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tests parsing of an empty playlist. Calls @c parsePlaylist and expects it returns false.
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, test_emptyUrl) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_FALSE(playlistParser->parsePlaylist("", testObserver));
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tests passing a @c nullptr for the observer.
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, test_nullObserver) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_FALSE(playlistParser->parsePlaylist("blah", nullptr));
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-10-02 22:59:05 +00:00
|
|
|
* Tests parsing of a simple M3U playlist.
|
2017-08-08 00:04:43 +00:00
|
|
|
* Calls @c parsePlaylist and expects that the result of the parsing is successful.
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, testTimer_parsingPlaylist) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_TRUE(playlistParser->parsePlaylist(TEST_M3U_PLAYLIST_URL, testObserver));
|
|
|
|
auto results = testObserver->waitForNCallbacks(TEST_M3U_PLAYLIST_URL_EXPECTED_PARSES);
|
|
|
|
ASSERT_EQ(TEST_M3U_PLAYLIST_URL_EXPECTED_PARSES, results.size());
|
|
|
|
for (unsigned int i = 0; i < results.size(); ++i) {
|
|
|
|
ASSERT_EQ(results.at(i).url, TEST_M3U_PLAYLIST_URLS.at(i));
|
2017-12-09 00:07:37 +00:00
|
|
|
ASSERT_EQ(results.at(i).duration, TEST_M3U_DURATIONS.at(i));
|
2017-10-02 22:59:05 +00:00
|
|
|
if (i == results.size() - 1) {
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::FINISHED);
|
2017-10-02 22:59:05 +00:00
|
|
|
} else {
|
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::STILL_ONGOING);
|
|
|
|
}
|
|
|
|
}
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-10-02 22:59:05 +00:00
|
|
|
* Tests parsing of a simple M3U playlist with relative urls.
|
2017-08-08 00:04:43 +00:00
|
|
|
* Calls @c parsePlaylist and expects that the result of the parsing is successful.
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, testTimer_parsingRelativePlaylist) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_TRUE(playlistParser->parsePlaylist(TEST_M3U_RELATIVE_PLAYLIST_URL, testObserver));
|
|
|
|
auto results = testObserver->waitForNCallbacks(TEST_M3U_RELATIVE_PLAYLIST_URL_EXPECTED_PARSES);
|
|
|
|
ASSERT_EQ(TEST_M3U_RELATIVE_PLAYLIST_URL_EXPECTED_PARSES, results.size());
|
|
|
|
for (unsigned int i = 0; i < results.size(); ++i) {
|
|
|
|
ASSERT_EQ(results.at(i).url, TEST_M3U_RELATIVE_PLAYLIST_URLS.at(i));
|
|
|
|
if (i == results.size() - 1) {
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::FINISHED);
|
2017-10-02 22:59:05 +00:00
|
|
|
} else {
|
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::STILL_ONGOING);
|
|
|
|
}
|
|
|
|
}
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-10-02 22:59:05 +00:00
|
|
|
* Tests parsing of an extended M3U/HLS playlist.
|
|
|
|
* Calls @c parsePlaylist and expects that the result of the parsing is successful.
|
2017-08-08 00:04:43 +00:00
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, testTimer_parsingHlsPlaylist) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_TRUE(playlistParser->parsePlaylist(TEST_HLS_PLAYLIST_URL, testObserver));
|
|
|
|
auto results = testObserver->waitForNCallbacks(TEST_HLS_PLAYLIST_URL_EXPECTED_PARSES);
|
|
|
|
ASSERT_EQ(TEST_HLS_PLAYLIST_URL_EXPECTED_PARSES, results.size());
|
|
|
|
for (unsigned int i = 0; i < results.size(); ++i) {
|
|
|
|
ASSERT_EQ(results.at(i).url, TEST_HLS_PLAYLIST_URLS.at(i));
|
2017-12-09 00:07:37 +00:00
|
|
|
ASSERT_EQ(results.at(i).duration, TEST_HLS_DURATIONS.at(i));
|
2017-10-02 22:59:05 +00:00
|
|
|
if (i == results.size() - 1) {
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::FINISHED);
|
2017-10-02 22:59:05 +00:00
|
|
|
} else {
|
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::STILL_ONGOING);
|
|
|
|
}
|
|
|
|
}
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-10-02 22:59:05 +00:00
|
|
|
* Tests parsing of a PLS playlist.
|
|
|
|
* Calls @c parsePlaylist and expects that the result of the parsing is successful.
|
2017-08-08 00:04:43 +00:00
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, testTimer_parsingPlsPlaylist) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_TRUE(playlistParser->parsePlaylist(TEST_PLS_PLAYLIST_URL, testObserver));
|
|
|
|
auto results = testObserver->waitForNCallbacks(TEST_PLS_PLAYLIST_URL_EXPECTED_PARSES);
|
|
|
|
ASSERT_EQ(TEST_PLS_PLAYLIST_URL_EXPECTED_PARSES, results.size());
|
|
|
|
for (unsigned int i = 0; i < results.size(); ++i) {
|
|
|
|
ASSERT_EQ(results.at(i).url, TEST_PLS_PLAYLIST_URLS.at(i));
|
|
|
|
if (i == results.size() - 1) {
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::FINISHED);
|
2017-10-02 22:59:05 +00:00
|
|
|
} else {
|
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::STILL_ONGOING);
|
|
|
|
}
|
|
|
|
}
|
2017-08-08 00:04:43 +00:00
|
|
|
}
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
/**
|
|
|
|
* Tests that the playlist parser skips parsing of unwanted playlist types.
|
|
|
|
* Calls @c parsePlaylist and expects that the result of the parsing is successful.
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, testTimer_notParsingCertainPlaylistTypes) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_TRUE(
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
playlistParser->parsePlaylist(TEST_HLS_PLAYLIST_URL, testObserver, {PlaylistParser::PlaylistType::EXT_M3U}));
|
2017-10-02 22:59:05 +00:00
|
|
|
auto results = testObserver->waitForNCallbacks(1);
|
|
|
|
ASSERT_EQ(NUM_PARSES_EXPECTED_WHEN_NO_PARSING, results.size());
|
|
|
|
ASSERT_EQ(results.at(0).url, TEST_HLS_PLAYLIST_URL);
|
|
|
|
}
|
|
|
|
|
2017-12-09 00:07:37 +00:00
|
|
|
/**
|
|
|
|
* Tests parsing of a live stream HLS playlist.
|
|
|
|
* Calls @c parsePlaylist and expects that the result of the parsing is successful.
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(PlaylistParserTest, testTimer_parsingLiveStreamPlaylist) {
|
2017-12-09 00:07:37 +00:00
|
|
|
ASSERT_TRUE(playlistParser->parsePlaylist(TEST_HLS_LIVE_STREAM_PLAYLIST_URL, testObserver));
|
|
|
|
auto results = testObserver->waitForNCallbacks(TEST_HLS_LIVE_STREAM_PLAYLIST_EXPECTED_PARSES);
|
|
|
|
ASSERT_EQ(TEST_HLS_LIVE_STREAM_PLAYLIST_EXPECTED_PARSES, results.size());
|
|
|
|
for (unsigned int i = 0; i < results.size(); ++i) {
|
|
|
|
ASSERT_EQ(results.at(i).url, TEST_HLS_LIVE_STREAM_PLAYLIST_URLS.at(i));
|
|
|
|
ASSERT_EQ(results.at(i).duration, TEST_HLS_LIVE_STREAM_DURATIONS.at(i));
|
|
|
|
if (i == results.size() - 1) {
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::FINISHED);
|
2017-12-09 00:07:37 +00:00
|
|
|
} else {
|
|
|
|
ASSERT_EQ(results.at(i).parseResult, avsCommon::utils::playlistParser::PlaylistParseResult::STILL_ONGOING);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
} // namespace test
|
|
|
|
} // namespace playlistParser
|
2018-01-12 23:45:42 +00:00
|
|
|
} // namespace alexaClientSDK
|