encoder/Interface: convert PreparedEncoder to abstract class
This commit is contained in:
@@ -76,8 +76,7 @@ class RecorderOutput {
|
||||
:base(recorder_output_plugin) {}
|
||||
|
||||
~RecorderOutput() {
|
||||
if (prepared_encoder != nullptr)
|
||||
prepared_encoder->Dispose();
|
||||
delete prepared_encoder;
|
||||
}
|
||||
|
||||
bool Initialize(const ConfigBlock &block, Error &error_r) {
|
||||
|
@@ -45,7 +45,7 @@ class EventLoop;
|
||||
class ServerSocket;
|
||||
class HttpdClient;
|
||||
class Page;
|
||||
struct PreparedEncoder;
|
||||
class PreparedEncoder;
|
||||
class Encoder;
|
||||
struct Tag;
|
||||
|
||||
|
@@ -63,9 +63,7 @@ HttpdOutput::~HttpdOutput()
|
||||
if (metadata != nullptr)
|
||||
metadata->Unref();
|
||||
|
||||
if (prepared_encoder != nullptr)
|
||||
prepared_encoder->Dispose();
|
||||
|
||||
delete prepared_encoder;
|
||||
}
|
||||
|
||||
inline bool
|
||||
@@ -128,7 +126,7 @@ HttpdOutput::Configure(const ConfigBlock &block, Error &error)
|
||||
return false;
|
||||
|
||||
/* determine content type */
|
||||
content_type = encoder_get_mime_type(prepared_encoder);
|
||||
content_type = prepared_encoder->GetMimeType();
|
||||
if (content_type == nullptr)
|
||||
content_type = "application/octet-stream";
|
||||
|
||||
|
Reference in New Issue
Block a user