output/httpd: migrate from class Error to C++ exceptions
This commit is contained in:
parent
dce211dbba
commit
9dbdc75689
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user