summaryrefslogtreecommitdiff
path: root/encoders
diff options
context:
space:
mode:
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