summaryrefslogtreecommitdiff
path: root/encoders
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-03-03 12:33:05 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2011-03-03 12:33:05 +0100
commit3568ebefab593ba03f3d874d5b2e130aec4f1a89 (patch)
treedaa5491b4a0c10be9d0a96a0bbb6c9a6a6af340c /encoders
parentdd62185d31b2967a98a1fa58bf869db46ab8284b (diff)
Fixed content-type and range handling.
Diffstat (limited to 'encoders')
-rw-r--r--encoders/lame_encoder.cpp4
-rw-r--r--encoders/lame_encoder.h1
-rw-r--r--encoders/vorbis_encoder.cpp4
-rw-r--r--encoders/vorbis_encoder.h1
4 files changed, 10 insertions, 0 deletions
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