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
6f1d5105
Commit
6f1d5105
authored
May 21, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TagStream: allow tag_stream_scan() to throw
parent
9a78371b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
TagStream.cxx
src/TagStream.cxx
+4
-8
TagStream.hxx
src/TagStream.hxx
+8
-2
No files found.
src/TagStream.cxx
View file @
6f1d5105
...
...
@@ -73,14 +73,12 @@ tag_stream_scan(InputStream &is, TagHandler &handler) noexcept
}
bool
tag_stream_scan
(
const
char
*
uri
,
TagHandler
&
handler
)
noexcept
try
{
tag_stream_scan
(
const
char
*
uri
,
TagHandler
&
handler
)
{
Mutex
mutex
;
auto
is
=
InputStream
::
OpenReady
(
uri
,
mutex
);
return
tag_stream_scan
(
*
is
,
handler
);
}
catch
(
const
std
::
exception
&
e
)
{
return
false
;
}
bool
...
...
@@ -102,12 +100,10 @@ tag_stream_scan(InputStream &is, TagBuilder &builder,
bool
tag_stream_scan
(
const
char
*
uri
,
TagBuilder
&
builder
,
AudioFormat
*
audio_format
)
noexcept
try
{
AudioFormat
*
audio_format
)
{
Mutex
mutex
;
auto
is
=
InputStream
::
OpenReady
(
uri
,
mutex
);
return
tag_stream_scan
(
*
is
,
builder
,
audio_format
);
}
catch
(
const
std
::
exception
&
e
)
{
return
false
;
}
src/TagStream.hxx
View file @
6f1d5105
...
...
@@ -35,8 +35,11 @@ class TagBuilder;
bool
tag_stream_scan
(
InputStream
&
is
,
TagHandler
&
handler
)
noexcept
;
/**
* Throws on error.
*/
bool
tag_stream_scan
(
const
char
*
uri
,
TagHandler
&
handler
)
noexcept
;
tag_stream_scan
(
const
char
*
uri
,
TagHandler
&
handler
);
/**
* Scan the tags of an #InputStream. Invokes matching decoder
...
...
@@ -50,8 +53,11 @@ bool
tag_stream_scan
(
InputStream
&
is
,
TagBuilder
&
builder
,
AudioFormat
*
audio_format
=
nullptr
)
noexcept
;
/**
* Throws on error.
*/
bool
tag_stream_scan
(
const
char
*
uri
,
TagBuilder
&
builder
,
AudioFormat
*
audio_format
=
nullptr
)
noexcept
;
AudioFormat
*
audio_format
=
nullptr
);
#endif
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