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
9dbdc756
Commit
9dbdc756
authored
Nov 09, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/httpd: migrate from class Error to C++ exceptions
parent
dce211db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
HttpdInternal.hxx
src/output/plugins/httpd/HttpdInternal.hxx
+1
-2
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+6
-8
No files found.
src/output/plugins/httpd/HttpdInternal.hxx
View file @
9dbdc756
...
...
@@ -40,7 +40,6 @@
#include <list>
struct
ConfigBlock
;
class
Error
;
class
EventLoop
;
class
ServerSocket
;
class
HttpdClient
;
...
...
@@ -246,7 +245,7 @@ public:
void
SendTag
(
const
Tag
&
tag
);
size_t
Play
(
const
void
*
chunk
,
size_t
size
,
Error
&
error
);
size_t
Play
(
const
void
*
chunk
,
size_t
size
);
void
CancelAllClients
();
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
9dbdc756
...
...
@@ -33,7 +33,6 @@
#include "IOThread.hxx"
#include "event/Call.hxx"
#include "util/RuntimeError.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "util/DeleteDisposer.hxx"
#include "Log.hxx"
...
...
@@ -419,7 +418,7 @@ HttpdOutput::EncodeAndPlay(const void *chunk, size_t size)
}
inline
size_t
HttpdOutput
::
Play
(
const
void
*
chunk
,
size_t
size
,
Error
&
)
HttpdOutput
::
Play
(
const
void
*
chunk
,
size_t
size
)
{
if
(
LockHasClients
())
EncodeAndPlay
(
chunk
,
size
);
...
...
@@ -433,11 +432,11 @@ HttpdOutput::Play(const void *chunk, size_t size, Error &)
static
size_t
httpd_output_play
(
AudioOutput
*
ao
,
const
void
*
chunk
,
size_t
size
,
Error
&
error
)
Error
&
)
{
HttpdOutput
*
httpd
=
HttpdOutput
::
Cast
(
ao
);
return
httpd
->
Play
(
chunk
,
size
,
error
);
return
httpd
->
Play
(
chunk
,
size
);
}
static
bool
...
...
@@ -447,11 +446,10 @@ httpd_output_pause(AudioOutput *ao)
if
(
httpd
->
LockHasClients
())
{
static
const
char
silence
[
1020
]
=
{
0
};
return
httpd_output_play
(
ao
,
silence
,
sizeof
(
silence
),
IgnoreError
())
>
0
;
}
else
{
return
true
;
httpd
->
Play
(
silence
,
sizeof
(
silence
));
}
return
true
;
}
inline
void
...
...
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