From 3568ebefab593ba03f3d874d5b2e130aec4f1a89 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 3 Mar 2011 12:33:05 +0100 Subject: Fixed content-type and range handling. --- encoders/lame_encoder.cpp | 4 ++++ encoders/lame_encoder.h | 1 + encoders/vorbis_encoder.cpp | 4 ++++ encoders/vorbis_encoder.h | 1 + 4 files changed, 10 insertions(+) (limited to 'encoders') diff --git a/encoders/lame_encoder.cpp b/encoders/lame_encoder.cpp index f3816bf..28749aa 100644 --- a/encoders/lame_encoder.cpp +++ b/encoders/lame_encoder.cpp @@ -28,3 +28,7 @@ std::size_t EncoderLame::read(char* buf, std::size_t buf_size) { return size; } + +std::string EncoderLame::get_mime_type() { + return "audio/mpeg"; +} diff --git a/encoders/lame_encoder.h b/encoders/lame_encoder.h index 79bc944..717e337 100644 --- a/encoders/lame_encoder.h +++ b/encoders/lame_encoder.h @@ -17,6 +17,7 @@ class EncoderLame : public Encoder { ~EncoderLame(); virtual std::size_t read(char* buf, std::size_t buf_size); + virtual std::string get_mime_type(); }; #endif diff --git a/encoders/vorbis_encoder.cpp b/encoders/vorbis_encoder.cpp index 3704123..4449345 100644 --- a/encoders/vorbis_encoder.cpp +++ b/encoders/vorbis_encoder.cpp @@ -113,3 +113,7 @@ std::size_t VorbisEncoder::read(char* buf, std::size_t buf_size) { return written; } + +std::string VorbisEncoder::get_mime_type() { + return "application/ogg"; +} diff --git a/encoders/vorbis_encoder.h b/encoders/vorbis_encoder.h index cba8c21..5206ace 100644 --- a/encoders/vorbis_encoder.h +++ b/encoders/vorbis_encoder.h @@ -26,6 +26,7 @@ class VorbisEncoder : public Encoder { virtual ~VorbisEncoder (); virtual std::size_t read(char* buf, std::size_t buf_size); + virtual std::string get_mime_type(); }; #endif -- cgit v1.2.3