decoder/Client: add noexcept
This commit is contained in:
@@ -272,7 +272,7 @@ DecoderBridge::GetCommand() noexcept
|
||||
}
|
||||
|
||||
void
|
||||
DecoderBridge::CommandFinished()
|
||||
DecoderBridge::CommandFinished() noexcept
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(dc.mutex);
|
||||
|
||||
@@ -335,7 +335,7 @@ DecoderBridge::GetSeekFrame() noexcept
|
||||
}
|
||||
|
||||
void
|
||||
DecoderBridge::SeekError()
|
||||
DecoderBridge::SeekError() noexcept
|
||||
{
|
||||
assert(dc.pipe != nullptr);
|
||||
|
||||
@@ -411,7 +411,7 @@ try {
|
||||
}
|
||||
|
||||
void
|
||||
DecoderBridge::SubmitTimestamp(FloatDuration t)
|
||||
DecoderBridge::SubmitTimestamp(FloatDuration t) noexcept
|
||||
{
|
||||
assert(t.count() >= 0);
|
||||
|
||||
@@ -422,7 +422,7 @@ DecoderBridge::SubmitTimestamp(FloatDuration t)
|
||||
DecoderCommand
|
||||
DecoderBridge::SubmitData(InputStream *is,
|
||||
const void *data, size_t length,
|
||||
uint16_t kbit_rate)
|
||||
uint16_t kbit_rate) noexcept
|
||||
{
|
||||
assert(dc.state == DecoderState::DECODE);
|
||||
assert(dc.pipe != nullptr);
|
||||
@@ -539,7 +539,7 @@ DecoderBridge::SubmitData(InputStream *is,
|
||||
}
|
||||
|
||||
DecoderCommand
|
||||
DecoderBridge::SubmitTag(InputStream *is, Tag &&tag)
|
||||
DecoderBridge::SubmitTag(InputStream *is, Tag &&tag) noexcept
|
||||
{
|
||||
DecoderCommand cmd;
|
||||
|
||||
@@ -575,7 +575,7 @@ DecoderBridge::SubmitTag(InputStream *is, Tag &&tag)
|
||||
}
|
||||
|
||||
void
|
||||
DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info)
|
||||
DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info) noexcept
|
||||
{
|
||||
if (new_replay_gain_info != nullptr) {
|
||||
static unsigned serial;
|
||||
@@ -607,7 +607,7 @@ DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info)
|
||||
}
|
||||
|
||||
void
|
||||
DecoderBridge::SubmitMixRamp(MixRampInfo &&mix_ramp)
|
||||
DecoderBridge::SubmitMixRamp(MixRampInfo &&mix_ramp) noexcept
|
||||
{
|
||||
dc.SetMixRamp(std::move(mix_ramp));
|
||||
}
|
||||
|
@@ -139,19 +139,19 @@ public:
|
||||
void Ready(AudioFormat audio_format,
|
||||
bool seekable, SignedSongTime duration) override;
|
||||
DecoderCommand GetCommand() noexcept override;
|
||||
void CommandFinished() override;
|
||||
void CommandFinished() noexcept override;
|
||||
SongTime GetSeekTime() noexcept override;
|
||||
uint64_t GetSeekFrame() noexcept override;
|
||||
void SeekError() override;
|
||||
void SeekError() noexcept override;
|
||||
InputStreamPtr OpenUri(const char *uri) override;
|
||||
size_t Read(InputStream &is, void *buffer, size_t length) override;
|
||||
void SubmitTimestamp(FloatDuration t) override;
|
||||
void SubmitTimestamp(FloatDuration t) noexcept override;
|
||||
DecoderCommand SubmitData(InputStream *is,
|
||||
const void *data, size_t length,
|
||||
uint16_t kbit_rate) override;
|
||||
DecoderCommand SubmitTag(InputStream *is, Tag &&tag) override ;
|
||||
void SubmitReplayGain(const ReplayGainInfo *replay_gain_info) override;
|
||||
void SubmitMixRamp(MixRampInfo &&mix_ramp) override;
|
||||
uint16_t kbit_rate) noexcept override;
|
||||
DecoderCommand SubmitTag(InputStream *is, Tag &&tag) noexcept override;
|
||||
void SubmitReplayGain(const ReplayGainInfo *replay_gain_info) noexcept override;
|
||||
void SubmitMixRamp(MixRampInfo &&mix_ramp) noexcept override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
* (dc->command). This function resets dc->command and wakes up the
|
||||
* player thread.
|
||||
*/
|
||||
virtual void CommandFinished() = 0;
|
||||
virtual void CommandFinished() noexcept = 0;
|
||||
|
||||
/**
|
||||
* Call this when you have received the DecoderCommand::SEEK command.
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
* Call this instead of CommandFinished() when seeking has
|
||||
* failed.
|
||||
*/
|
||||
virtual void SeekError() = 0;
|
||||
virtual void SeekError() noexcept = 0;
|
||||
|
||||
/**
|
||||
* Open a new #InputStream and wait until it's ready.
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
* use this function if it thinks that adding to the time stamp based
|
||||
* on the buffer size won't work.
|
||||
*/
|
||||
virtual void SubmitTimestamp(FloatDuration t) = 0;
|
||||
virtual void SubmitTimestamp(FloatDuration t) noexcept = 0;
|
||||
|
||||
/**
|
||||
* This function is called by the decoder plugin when it has
|
||||
@@ -129,11 +129,11 @@ public:
|
||||
*/
|
||||
virtual DecoderCommand SubmitData(InputStream *is,
|
||||
const void *data, size_t length,
|
||||
uint16_t kbit_rate) = 0;
|
||||
uint16_t kbit_rate) noexcept = 0;
|
||||
|
||||
DecoderCommand SubmitData(InputStream &is,
|
||||
const void *data, size_t length,
|
||||
uint16_t kbit_rate) {
|
||||
uint16_t kbit_rate) noexcept {
|
||||
return SubmitData(&is, data, length, kbit_rate);
|
||||
}
|
||||
|
||||
@@ -147,9 +147,9 @@ public:
|
||||
* @return the current command, or DecoderCommand::NONE if there is no
|
||||
* command pending
|
||||
*/
|
||||
virtual DecoderCommand SubmitTag(InputStream *is, Tag &&tag) = 0 ;
|
||||
virtual DecoderCommand SubmitTag(InputStream *is, Tag &&tag) noexcept = 0 ;
|
||||
|
||||
DecoderCommand SubmitTag(InputStream &is, Tag &&tag) {
|
||||
DecoderCommand SubmitTag(InputStream &is, Tag &&tag) noexcept {
|
||||
return SubmitTag(&is, std::move(tag));
|
||||
}
|
||||
|
||||
@@ -159,12 +159,12 @@ public:
|
||||
* @param replay_gain_info the replay_gain_info object; may be nullptr
|
||||
* to invalidate the previous replay gain values
|
||||
*/
|
||||
virtual void SubmitReplayGain(const ReplayGainInfo *replay_gain_info) = 0;
|
||||
virtual void SubmitReplayGain(const ReplayGainInfo *replay_gain_info) noexcept = 0;
|
||||
|
||||
/**
|
||||
* Store MixRamp tags.
|
||||
*/
|
||||
virtual void SubmitMixRamp(MixRampInfo &&mix_ramp) = 0;
|
||||
virtual void SubmitMixRamp(MixRampInfo &&mix_ramp) noexcept = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user