summaryrefslogtreecommitdiff
path: root/decoders/mpg123_decoder.h
blob: bc35ed9261066c44b4e33c93b25c60cde6bbf343 (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
#ifndef DECODER_MPG123_H
#define DECODER_MPG123_H

#include "decoder.h"

#include <fstream>
#include <mpg123.h>
// needed for uint8_t
#include <boost/cstdint.hpp>

class DecoderMpg123 : public Decoder {
	private:
		mpg123_handle *handle;
		std::ifstream ifile;
		
		size_t decode(const uint8_t *input, size_t input_size, uint8_t *output, size_t output_size);
	
	public:
		DecoderMpg123(const std::string& filename);
		~DecoderMpg123();
		
		virtual std::size_t read(char* buf, std::size_t buf_size);
};

#endif