DragonSourceOptions Class

Per-source playback options, currently the crossfade duration. More...

Header: #include <DragonSourceOptions>
CMake: find_package(DragonMediaBackend REQUIRED COMPONENTS DragonMediaBackend)
target_link_libraries(mytarget PRIVATE DragonMediaBackend::DragonMediaBackend)
In QML: dragonSourceOptions

Properties

Public Functions

DragonSourceOptions()
DragonSourceOptions(const DragonSourceOptions &other)
DragonSourceOptions(DragonSourceOptions &&other)
~DragonSourceOptions()
std::chrono::milliseconds crossfadeDuration() const
void setCrossfadeDuration(std::chrono::milliseconds duration)
bool operator!=(const DragonSourceOptions &other) const
DragonSourceOptions &operator=(DragonSourceOptions &&other)
DragonSourceOptions &operator=(const DragonSourceOptions &other)
bool operator==(const DragonSourceOptions &other) const

Detailed Description

DragonSourceOptions is passed to the DragonPlayer::setSource(const QUrl &, const DragonSourceOptions &) overload to request an overlapped crossfade when switching between tracks while playing.

The class is implicitly shared, so copying one is cheap. Setting a duration detaches the shared data, following copy-on-write semantics.

See also DragonPlayer::setSource().

Property Documentation

crossfadeDuration : DragonDuration

How long the crossfade between tracks takes.

Access functions:

std::chrono::milliseconds crossfadeDuration() const
void setCrossfadeDuration(std::chrono::milliseconds duration)

Member Function Documentation

DragonSourceOptions::DragonSourceOptions()

Constructs options without any crossfade.

DragonSourceOptions::DragonSourceOptions(const DragonSourceOptions &other)

Copies other. The underlying data is implicitly shared.

[noexcept] DragonSourceOptions::DragonSourceOptions(DragonSourceOptions &&other)

Move-constructs from other.

[noexcept] DragonSourceOptions::~DragonSourceOptions()

Destroys the options.

bool DragonSourceOptions::operator!=(const DragonSourceOptions &other) const

Returns true if other requests a different crossfade duration.

[noexcept] DragonSourceOptions &DragonSourceOptions::operator=(DragonSourceOptions &&other)

Move-assigns other to this object.

DragonSourceOptions &DragonSourceOptions::operator=(const DragonSourceOptions &other)

Assigns other to this object. The underlying data is implicitly shared.

bool DragonSourceOptions::operator==(const DragonSourceOptions &other) const

Returns true if other requests the same crossfade duration.