vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / media / plugins / musepack / MusePackDecoder.h
blob205c5a98aa7a76259ede48c224417eb2c1b396d5
1 /*
2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the MIT License.
4 */
5 #ifndef MUSEPACK_DECODER_H
6 #define MUSEPACK_DECODER_H
9 #include "DecoderPlugin.h"
10 #include <MediaFormats.h>
12 #include "mpc/mpc_dec.h"
15 class MusePackDecoder : public Decoder {
16 public:
17 MusePackDecoder();
18 ~MusePackDecoder();
20 void GetCodecInfo(media_codec_info *info);
22 status_t Setup(media_format *ioEncodedFormat,
23 const void *infoBuffer, size_t infoSize);
25 status_t NegotiateOutputFormat(media_format *ioDecodedFormat);
27 status_t SeekedTo(int64 frame, bigtime_t time);
29 status_t Decode(void *buffer, int64 *frameCount,
30 media_header *mediaHeader, media_decode_info *info);
32 private:
33 MPC_decoder *fDecoder;
34 StreamInfo *fInfo;
35 float fFrameRate;
36 int64 fFramePosition;
39 #endif /* MUSEPACK_DECODER_H */