Merge tag 'v0.20.9'
release v0.20.9
This commit is contained in:
@@ -277,7 +277,7 @@ DecoderBridge::Ready(const AudioFormat audio_format,
|
||||
}
|
||||
|
||||
DecoderCommand
|
||||
DecoderBridge::GetCommand()
|
||||
DecoderBridge::GetCommand() noexcept
|
||||
{
|
||||
return LockGetVirtualCommand();
|
||||
}
|
||||
@@ -326,7 +326,7 @@ DecoderBridge::CommandFinished()
|
||||
}
|
||||
|
||||
SongTime
|
||||
DecoderBridge::GetSeekTime()
|
||||
DecoderBridge::GetSeekTime() noexcept
|
||||
{
|
||||
assert(dc.pipe != nullptr);
|
||||
|
||||
@@ -341,7 +341,7 @@ DecoderBridge::GetSeekTime()
|
||||
}
|
||||
|
||||
uint64_t
|
||||
DecoderBridge::GetSeekFrame()
|
||||
DecoderBridge::GetSeekFrame() noexcept
|
||||
{
|
||||
return GetSeekTime().ToScale<uint64_t>(dc.in_audio_format.sample_rate);
|
||||
}
|
||||
|
@@ -134,10 +134,10 @@ public:
|
||||
/* virtual methods from DecoderClient */
|
||||
void Ready(AudioFormat audio_format,
|
||||
bool seekable, SignedSongTime duration) override;
|
||||
DecoderCommand GetCommand() override;
|
||||
DecoderCommand GetCommand() noexcept override;
|
||||
void CommandFinished() override;
|
||||
SongTime GetSeekTime() override;
|
||||
uint64_t GetSeekFrame() override;
|
||||
SongTime GetSeekTime() noexcept override;
|
||||
uint64_t GetSeekFrame() noexcept override;
|
||||
void SeekError() override;
|
||||
InputStreamPtr OpenUri(const char *uri) override;
|
||||
size_t Read(InputStream &is, void *buffer, size_t length) override;
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
* command pending
|
||||
*/
|
||||
gcc_pure
|
||||
virtual DecoderCommand GetCommand() = 0;
|
||||
virtual DecoderCommand GetCommand() noexcept = 0;
|
||||
|
||||
/**
|
||||
* Called by the decoder when it has performed the requested command
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
* @return the destination position for the seek in milliseconds
|
||||
*/
|
||||
gcc_pure
|
||||
virtual SongTime GetSeekTime() = 0;
|
||||
virtual SongTime GetSeekTime() noexcept = 0;
|
||||
|
||||
/**
|
||||
* Call this when you have received the DecoderCommand::SEEK command.
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* @return the destination position for the seek in frames
|
||||
*/
|
||||
gcc_pure
|
||||
virtual uint64_t GetSeekFrame() = 0;
|
||||
virtual uint64_t GetSeekFrame() noexcept = 0;
|
||||
|
||||
/**
|
||||
* Call this instead of CommandFinished() when seeking has
|
||||
|
@@ -54,11 +54,11 @@ public:
|
||||
size_t _size)
|
||||
:client(_client), is(_is), buffer(_size) {}
|
||||
|
||||
const InputStream &GetStream() const {
|
||||
const InputStream &GetStream() const noexcept {
|
||||
return is;
|
||||
}
|
||||
|
||||
void Clear() {
|
||||
void Clear() noexcept {
|
||||
buffer.Clear();
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
* How many bytes are stored in the buffer?
|
||||
*/
|
||||
gcc_pure
|
||||
size_t GetAvailable() const {
|
||||
size_t GetAvailable() const noexcept {
|
||||
return buffer.GetAvailable();
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
* you have to call Consume() to do that. The returned buffer
|
||||
* becomes invalid after a Fill() or a Consume() call.
|
||||
*/
|
||||
ConstBuffer<void> Read() const {
|
||||
ConstBuffer<void> Read() const noexcept {
|
||||
auto r = buffer.Read();
|
||||
return { r.data, r.size };
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
*
|
||||
* @param nbytes the number of bytes to consume
|
||||
*/
|
||||
void Consume(size_t nbytes) {
|
||||
void Consume(size_t nbytes) noexcept {
|
||||
buffer.Consume(nbytes);
|
||||
}
|
||||
|
||||
|
@@ -227,29 +227,29 @@ struct DecoderControl {
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
bool LockIsIdle() const {
|
||||
bool LockIsIdle() const noexcept {
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
return IsIdle();
|
||||
}
|
||||
|
||||
bool IsStarting() const {
|
||||
bool IsStarting() const noexcept {
|
||||
return state == DecoderState::START;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
bool LockIsStarting() const {
|
||||
bool LockIsStarting() const noexcept {
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
return IsStarting();
|
||||
}
|
||||
|
||||
bool HasFailed() const {
|
||||
bool HasFailed() const noexcept {
|
||||
assert(command == DecoderCommand::NONE);
|
||||
|
||||
return state == DecoderState::ERROR;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
bool LockHasFailed() const {
|
||||
bool LockHasFailed() const noexcept {
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
return HasFailed();
|
||||
}
|
||||
|
@@ -881,7 +881,8 @@ ffmpeg_scan_stream(InputStream &is,
|
||||
* more formats.
|
||||
*/
|
||||
static const char *const ffmpeg_suffixes[] = {
|
||||
"16sv", "3g2", "3gp", "4xm", "8svx", "aa3", "aac", "ac3", "afc", "aif",
|
||||
"16sv", "3g2", "3gp", "4xm", "8svx",
|
||||
"aa3", "aac", "ac3", "adx", "afc", "aif",
|
||||
"aifc", "aiff", "al", "alaw", "amr", "anim", "apc", "ape", "asf",
|
||||
"atrac", "au", "aud", "avi", "avm2", "avs", "bap", "bfi", "c93", "cak",
|
||||
"cin", "cmv", "cpk", "daud", "dct", "divx", "dts", "dv", "dvd", "dxa",
|
||||
@@ -934,6 +935,7 @@ static const char *const ffmpeg_mime_types[] = {
|
||||
"audio/x-16sv",
|
||||
"audio/x-aac",
|
||||
"audio/x-ac3",
|
||||
"audio/x-adx",
|
||||
"audio/x-aiff"
|
||||
"audio/x-alaw",
|
||||
"audio/x-au",
|
||||
|
@@ -42,25 +42,27 @@ public:
|
||||
return chain;
|
||||
}
|
||||
|
||||
bool Read(const char *path) {
|
||||
bool Read(const char *path) noexcept {
|
||||
return ::FLAC__metadata_chain_read(chain, path);
|
||||
}
|
||||
|
||||
bool Read(FLAC__IOHandle handle, FLAC__IOCallbacks callbacks) {
|
||||
bool Read(FLAC__IOHandle handle,
|
||||
FLAC__IOCallbacks callbacks) noexcept {
|
||||
return ::FLAC__metadata_chain_read_with_callbacks(chain,
|
||||
handle,
|
||||
callbacks);
|
||||
}
|
||||
|
||||
bool Read(InputStream &is) {
|
||||
bool Read(InputStream &is) noexcept {
|
||||
return Read(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is));
|
||||
}
|
||||
|
||||
bool ReadOgg(const char *path) {
|
||||
bool ReadOgg(const char *path) noexcept {
|
||||
return ::FLAC__metadata_chain_read_ogg(chain, path);
|
||||
}
|
||||
|
||||
bool ReadOgg(FLAC__IOHandle handle, FLAC__IOCallbacks callbacks) {
|
||||
bool ReadOgg(FLAC__IOHandle handle,
|
||||
FLAC__IOCallbacks callbacks) noexcept {
|
||||
return ::FLAC__metadata_chain_read_ogg_with_callbacks(chain,
|
||||
handle,
|
||||
callbacks);
|
||||
@@ -71,12 +73,12 @@ public:
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
FLAC__Metadata_ChainStatus GetStatus() const {
|
||||
FLAC__Metadata_ChainStatus GetStatus() const noexcept {
|
||||
return ::FLAC__metadata_chain_status(chain);
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
const char *GetStatusString() const {
|
||||
const char *GetStatusString() const noexcept {
|
||||
return FLAC__Metadata_ChainStatusString[GetStatus()];
|
||||
}
|
||||
|
||||
@@ -99,12 +101,12 @@ public:
|
||||
::FLAC__metadata_iterator_delete(iterator);
|
||||
}
|
||||
|
||||
bool Next() {
|
||||
bool Next() noexcept {
|
||||
return ::FLAC__metadata_iterator_next(iterator);
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
FLAC__StreamMetadata *GetBlock() {
|
||||
FLAC__StreamMetadata *GetBlock() noexcept {
|
||||
return ::FLAC__metadata_iterator_get_block(iterator);
|
||||
}
|
||||
};
|
||||
|
@@ -52,14 +52,14 @@ static constexpr unsigned opus_output_buffer_frames = opus_sample_rate / 4;
|
||||
|
||||
gcc_pure
|
||||
static bool
|
||||
IsOpusHead(const ogg_packet &packet)
|
||||
IsOpusHead(const ogg_packet &packet) noexcept
|
||||
{
|
||||
return packet.bytes >= 8 && memcmp(packet.packet, "OpusHead", 8) == 0;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
static bool
|
||||
IsOpusTags(const ogg_packet &packet)
|
||||
IsOpusTags(const ogg_packet &packet) noexcept
|
||||
{
|
||||
return packet.bytes >= 8 && memcmp(packet.packet, "OpusTags", 8) == 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user