Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4650a903
Commit
4650a903
authored
Jul 05, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Bridge: add `noexcept`
parent
94c9fafe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
16 deletions
+25
-16
FingerprintCommands.cxx
src/command/FingerprintCommands.cxx
+4
-2
Bridge.cxx
src/decoder/Bridge.cxx
+2
-2
Bridge.hxx
src/decoder/Bridge.hxx
+3
-2
Client.hxx
src/decoder/Client.hxx
+4
-2
DecoderClient.cxx
src/lib/chromaprint/DecoderClient.cxx
+4
-2
DecoderClient.hxx
src/lib/chromaprint/DecoderClient.hxx
+3
-2
DumpDecoderClient.cxx
test/DumpDecoderClient.cxx
+2
-2
DumpDecoderClient.hxx
test/DumpDecoderClient.hxx
+3
-2
No files found.
src/command/FingerprintCommands.cxx
View file @
4650a903
...
...
@@ -83,7 +83,8 @@ private:
/* virtual methods from class DecoderClient */
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
override
;
/* virtual methods from class InputStreamHandler */
void
OnInputStreamReady
()
noexcept
override
{
...
...
@@ -285,7 +286,8 @@ GetChromaprintCommand::OpenUri(const char *uri2)
}
size_t
GetChromaprintCommand
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
GetChromaprintCommand
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
{
/* overriding ChromaprintDecoderClient's implementation to
make it cancellable */
...
...
src/decoder/Bridge.cxx
View file @
4650a903
...
...
@@ -255,7 +255,7 @@ DecoderBridge::UpdateStreamTag(InputStream *is) noexcept
void
DecoderBridge
::
Ready
(
const
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
bool
seekable
,
SignedSongTime
duration
)
noexcept
{
assert
(
convert
==
nullptr
);
assert
(
stream_tag
==
nullptr
);
...
...
@@ -401,7 +401,7 @@ DecoderBridge::OpenUri(const char *uri)
}
size_t
DecoderBridge
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
DecoderBridge
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
try
{
assert
(
buffer
!=
nullptr
);
assert
(
dc
.
state
==
DecoderState
::
START
||
...
...
src/decoder/Bridge.hxx
View file @
4650a903
...
...
@@ -161,14 +161,15 @@ public:
/* virtual methods from DecoderClient */
void
Ready
(
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
override
;
bool
seekable
,
SignedSongTime
duration
)
noexcept
override
;
DecoderCommand
GetCommand
()
noexcept
override
;
void
CommandFinished
()
noexcept
override
;
SongTime
GetSeekTime
()
noexcept
override
;
uint64_t
GetSeekFrame
()
noexcept
override
;
void
SeekError
()
noexcept
override
;
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
override
;
void
SubmitTimestamp
(
FloatDuration
t
)
noexcept
override
;
DecoderCommand
SubmitData
(
InputStream
*
is
,
const
void
*
data
,
size_t
length
,
...
...
src/decoder/Client.hxx
View file @
4650a903
...
...
@@ -48,7 +48,8 @@ public:
* unknown
*/
virtual
void
Ready
(
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
=
0
;
bool
seekable
,
SignedSongTime
duration
)
noexcept
=
0
;
/**
* Determines the pending decoder command.
...
...
@@ -106,7 +107,8 @@ public:
* @return the number of bytes read, or 0 if one of the following
* occurs: end of file; error; command (like SEEK or STOP).
*/
virtual
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
=
0
;
virtual
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
=
0
;
/**
* Sets the time stamp for the next data chunk [seconds]. The MPD
...
...
src/lib/chromaprint/DecoderClient.cxx
View file @
4650a903
...
...
@@ -44,7 +44,8 @@ ChromaprintDecoderClient::Finish()
}
void
ChromaprintDecoderClient
::
Ready
(
AudioFormat
audio_format
,
bool
,
SignedSongTime
)
ChromaprintDecoderClient
::
Ready
(
AudioFormat
audio_format
,
bool
,
SignedSongTime
)
noexcept
{
/* feed the first two minutes into libchromaprint */
remaining_bytes
=
audio_format
.
TimeToSize
(
std
::
chrono
::
minutes
(
2
));
...
...
@@ -87,7 +88,8 @@ ChromaprintDecoderClient::SubmitData(InputStream *,
}
size_t
ChromaprintDecoderClient
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
ChromaprintDecoderClient
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
{
try
{
return
is
.
LockRead
(
buffer
,
length
);
...
...
src/lib/chromaprint/DecoderClient.hxx
View file @
4650a903
...
...
@@ -68,7 +68,7 @@ public:
/* virtual methods from DecoderClient */
void
Ready
(
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
override
;
bool
seekable
,
SignedSongTime
duration
)
noexcept
override
;
DecoderCommand
GetCommand
()
noexcept
override
{
return
!
error
&&
remaining_bytes
>
0
...
...
@@ -90,7 +90,8 @@ public:
//InputStreamPtr OpenUri(const char *) override;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
override
;
void
SubmitTimestamp
(
FloatDuration
)
noexcept
override
{}
DecoderCommand
SubmitData
(
InputStream
*
is
,
...
...
test/DumpDecoderClient.cxx
View file @
4650a903
...
...
@@ -29,7 +29,7 @@
void
DumpDecoderClient
::
Ready
(
const
AudioFormat
audio_format
,
gcc_unused
bool
seekable
,
SignedSongTime
duration
)
SignedSongTime
duration
)
noexcept
{
assert
(
!
initialized
);
assert
(
audio_format
.
IsValid
());
...
...
@@ -76,7 +76,7 @@ DumpDecoderClient::OpenUri(const char *uri)
}
size_t
DumpDecoderClient
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
DumpDecoderClient
::
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
{
try
{
return
is
.
LockRead
(
buffer
,
length
);
...
...
test/DumpDecoderClient.hxx
View file @
4650a903
...
...
@@ -41,14 +41,15 @@ public:
/* virtual methods from DecoderClient */
void
Ready
(
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
override
;
bool
seekable
,
SignedSongTime
duration
)
noexcept
override
;
DecoderCommand
GetCommand
()
noexcept
override
;
void
CommandFinished
()
noexcept
override
;
SongTime
GetSeekTime
()
noexcept
override
;
uint64_t
GetSeekFrame
()
noexcept
override
;
void
SeekError
()
noexcept
override
;
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
noexcept
override
;
void
SubmitTimestamp
(
FloatDuration
t
)
noexcept
override
;
DecoderCommand
SubmitData
(
InputStream
*
is
,
const
void
*
data
,
size_t
length
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment