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
7d789a98
Commit
7d789a98
authored
Jan 21, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Plugin: add "noexcept"
parent
d9211148
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
31 additions
and
31 deletions
+31
-31
DecoderPlugin.hxx
src/decoder/DecoderPlugin.hxx
+5
-5
AudiofileDecoderPlugin.cxx
src/decoder/plugins/AudiofileDecoderPlugin.cxx
+1
-1
DsdiffDecoderPlugin.cxx
src/decoder/plugins/DsdiffDecoderPlugin.cxx
+1
-1
DsfDecoderPlugin.cxx
src/decoder/plugins/DsfDecoderPlugin.cxx
+1
-1
FaadDecoderPlugin.cxx
src/decoder/plugins/FaadDecoderPlugin.cxx
+1
-1
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+2
-2
FlacDecoderPlugin.cxx
src/decoder/plugins/FlacDecoderPlugin.cxx
+4
-4
FluidsynthDecoderPlugin.cxx
src/decoder/plugins/FluidsynthDecoderPlugin.cxx
+1
-1
GmeDecoderPlugin.cxx
src/decoder/plugins/GmeDecoderPlugin.cxx
+1
-1
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+1
-1
MikmodDecoderPlugin.cxx
src/decoder/plugins/MikmodDecoderPlugin.cxx
+2
-2
ModplugDecoderPlugin.cxx
src/decoder/plugins/ModplugDecoderPlugin.cxx
+1
-1
MpcdecDecoderPlugin.cxx
src/decoder/plugins/MpcdecDecoderPlugin.cxx
+1
-1
Mpg123DecoderPlugin.cxx
src/decoder/plugins/Mpg123DecoderPlugin.cxx
+2
-2
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+1
-1
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+1
-1
VorbisDecoderPlugin.cxx
src/decoder/plugins/VorbisDecoderPlugin.cxx
+1
-1
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+2
-2
WildmidiDecoderPlugin.cxx
src/decoder/plugins/WildmidiDecoderPlugin.cxx
+2
-2
No files found.
src/decoder/DecoderPlugin.hxx
View file @
7d789a98
...
...
@@ -48,7 +48,7 @@ struct DecoderPlugin {
* Deinitialize a decoder plugin which was initialized
* successfully. Optional method.
*/
void
(
*
finish
)();
void
(
*
finish
)()
noexcept
;
/**
* Decode a stream (data read from an #InputStream object).
...
...
@@ -73,7 +73,7 @@ struct DecoderPlugin {
*/
bool
(
*
scan_file
)(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
);
void
*
handler_ctx
)
noexcept
;
/**
* Scan metadata of a file.
...
...
@@ -82,7 +82,7 @@ struct DecoderPlugin {
*/
bool
(
*
scan_stream
)(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
);
void
*
handler_ctx
)
noexcept
;
/**
* @brief Return a "virtual" filename for subtracks in
...
...
@@ -140,7 +140,7 @@ struct DecoderPlugin {
*/
template
<
typename
P
>
bool
ScanFile
(
P
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
{
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
noexcept
{
return
scan_file
!=
nullptr
?
scan_file
(
path_fs
,
handler
,
handler_ctx
)
:
false
;
...
...
@@ -150,7 +150,7 @@ struct DecoderPlugin {
* Read the tag of a stream.
*/
bool
ScanStream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
{
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
noexcept
{
return
scan_stream
!=
nullptr
?
scan_stream
(
is
,
handler
,
handler_ctx
)
:
false
;
...
...
src/decoder/plugins/AudiofileDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -257,7 +257,7 @@ audiofile_get_duration(InputStream &is) noexcept
static
bool
audiofile_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
const
auto
duration
=
audiofile_get_duration
(
is
);
if
(
duration
.
IsNegative
())
...
...
src/decoder/plugins/DsdiffDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -451,7 +451,7 @@ dsdiff_stream_decode(DecoderClient &client, InputStream &is)
static
bool
dsdiff_scan_stream
(
InputStream
&
is
,
gcc_unused
const
TagHandler
&
handler
,
gcc_unused
void
*
handler_ctx
)
gcc_unused
void
*
handler_ctx
)
noexcept
{
DsdiffMetaData
metadata
;
DsdiffChunkHeader
chunk_header
;
...
...
src/decoder/plugins/DsfDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -327,7 +327,7 @@ dsf_stream_decode(DecoderClient &client, InputStream &is)
static
bool
dsf_scan_stream
(
InputStream
&
is
,
gcc_unused
const
TagHandler
&
handler
,
gcc_unused
void
*
handler_ctx
)
gcc_unused
void
*
handler_ctx
)
noexcept
{
/* check DSF metadata */
DsfMetaData
metadata
;
...
...
src/decoder/plugins/FaadDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -415,7 +415,7 @@ faad_stream_decode(DecoderClient &client, InputStream &is)
static
bool
faad_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
auto
result
=
faad_get_file_time
(
is
);
if
(
!
result
.
first
)
...
...
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -103,7 +103,7 @@ ffmpeg_init(const ConfigBlock &block)
}
static
void
ffmpeg_finish
()
ffmpeg_finish
()
noexcept
{
av_dict_free
(
&
avformat_options
);
}
...
...
@@ -856,7 +856,7 @@ FfmpegScanStream(AVFormatContext &format_context,
static
bool
ffmpeg_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
AVInputFormat
*
input_format
=
ffmpeg_probe
(
nullptr
,
is
);
if
(
input_format
==
nullptr
)
...
...
src/decoder/plugins/FlacDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -70,7 +70,7 @@ flac_write_cb(const FLAC__StreamDecoder *dec, const FLAC__Frame *frame,
static
bool
flac_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
FlacMetadataChain
chain
;
if
(
!
chain
.
Read
(
NarrowPath
(
path_fs
)))
{
...
...
@@ -86,7 +86,7 @@ flac_scan_file(Path path_fs,
static
bool
flac_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
FlacMetadataChain
chain
;
if
(
!
chain
.
Read
(
is
))
{
...
...
@@ -290,7 +290,7 @@ oggflac_init(gcc_unused const ConfigBlock &block)
static
bool
oggflac_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
FlacMetadataChain
chain
;
if
(
!
chain
.
ReadOgg
(
NarrowPath
(
path_fs
)))
{
...
...
@@ -306,7 +306,7 @@ oggflac_scan_file(Path path_fs,
static
bool
oggflac_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
FlacMetadataChain
chain
;
if
(
!
chain
.
ReadOgg
(
is
))
{
...
...
src/decoder/plugins/FluidsynthDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -194,7 +194,7 @@ fluidsynth_file_decode(DecoderClient &client, Path path_fs)
static
bool
fluidsynth_scan_file
(
Path
path_fs
,
gcc_unused
const
TagHandler
&
handler
,
gcc_unused
void
*
handler_ctx
)
gcc_unused
void
*
handler_ctx
)
noexcept
{
return
fluid_is_midifile
(
path_fs
.
c_str
());
}
...
...
src/decoder/plugins/GmeDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -282,7 +282,7 @@ ScanMusicEmu(Music_Emu *emu, unsigned song_num,
static
bool
gme_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
const
auto
container
=
ParseContainerPath
(
path_fs
);
...
...
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -1063,7 +1063,7 @@ mp3_decode(DecoderClient &client, InputStream &input_stream)
static
bool
mad_decoder_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
const
auto
result
=
mad_decoder_total_file_time
(
is
);
if
(
!
result
.
first
)
...
...
src/decoder/plugins/MikmodDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -141,7 +141,7 @@ mikmod_decoder_init(const ConfigBlock &block)
}
static
void
mikmod_decoder_finish
(
void
)
mikmod_decoder_finish
(
)
noexcept
{
MikMod_Exit
();
}
...
...
@@ -186,7 +186,7 @@ mikmod_decoder_file_decode(DecoderClient &client, Path path_fs)
static
bool
mikmod_decoder_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
/* deconstify the path because libmikmod wants a non-const
string pointer */
...
...
src/decoder/plugins/ModplugDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -176,7 +176,7 @@ mod_decode(DecoderClient &client, InputStream &is)
static
bool
modplug_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
ModPlugFile
*
f
=
LoadModPlugFile
(
nullptr
,
is
);
if
(
f
==
nullptr
)
...
...
src/decoder/plugins/MpcdecDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -258,7 +258,7 @@ mpcdec_get_file_duration(InputStream &is)
static
bool
mpcdec_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
const
auto
duration
=
mpcdec_get_file_duration
(
is
);
if
(
duration
.
IsNegative
())
...
...
src/decoder/plugins/Mpg123DecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -45,7 +45,7 @@ mpd_mpg123_init(gcc_unused const ConfigBlock &block)
}
static
void
mpd_mpg123_finish
(
void
)
mpd_mpg123_finish
(
)
noexcept
{
mpg123_exit
();
}
...
...
@@ -280,7 +280,7 @@ mpd_mpg123_file_decode(DecoderClient &client, Path path_fs)
static
bool
mpd_mpg123_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
int
error
;
mpg123_handle
*
const
handle
=
mpg123_new
(
nullptr
,
&
error
);
...
...
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -341,7 +341,7 @@ VisitOpusDuration(InputStream &is, OggSyncState &sync, OggStreamState &stream,
static
bool
mpd_opus_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
InputStreamReader
reader
(
is
);
OggSyncState
oy
(
reader
);
...
...
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -262,7 +262,7 @@ static constexpr struct {
static
bool
sndfile_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
SF_INFO
info
;
...
...
src/decoder/plugins/VorbisDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -363,7 +363,7 @@ VisitVorbisDuration(InputStream &is,
static
bool
vorbis_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
/* initialize libogg */
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -579,7 +579,7 @@ wavpack_filedecode(DecoderClient &client, Path path_fs)
*/
static
bool
wavpack_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
auto
*
wpc
=
WavpackOpenInput
(
path_fs
,
OPEN_DSD_FLAG
,
0
);
AtScopeExit
(
wpc
)
{
...
...
@@ -595,7 +595,7 @@ wavpack_scan_file(Path path_fs,
static
bool
wavpack_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
WavpackInput
isp
(
nullptr
,
is
);
auto
*
wpc
=
WavpackOpenInput
(
&
mpd_is_reader
,
&
isp
,
nullptr
,
...
...
src/decoder/plugins/WildmidiDecoderPlugin.cxx
View file @
7d789a98
...
...
@@ -54,7 +54,7 @@ wildmidi_init(const ConfigBlock &block)
}
static
void
wildmidi_finish
(
void
)
wildmidi_finish
(
)
noexcept
{
WildMidi_Shutdown
();
}
...
...
@@ -127,7 +127,7 @@ wildmidi_file_decode(DecoderClient &client, Path path_fs)
static
bool
wildmidi_scan_file
(
Path
path_fs
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
const
TagHandler
&
handler
,
void
*
handler_ctx
)
noexcept
{
midi
*
wm
=
WildMidi_Open
(
path_fs
.
c_str
());
if
(
wm
==
nullptr
)
...
...
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