summaryrefslogtreecommitdiff
path: root/encoder.h
blob: cdaaaaf1ed32b19d6c803169d4855a97c7f0dfdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef ENCODER_H
#define ENCODER_H

#include "decoder.h"

#include <boost/shared_ptr.hpp>

#include <string>

class Encoder {
	public:
		typedef boost::shared_ptr<Encoder> p;
		
		//! Virtual destructor.
		virtual ~Encoder() {}
		
		//! Initialize encoders.
		static void init();
		
		//! Construct and return requested encoder.
		static p get(const std::string& name, RawAudioSource::p source);
		
		//! Read into provided buffer.
		virtual std::size_t read(char* buf, std::size_t buf_size) = 0;

		//! MIME type of output.
		virtual std::string get_mime_type() = 0;
};

#endif