3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / plugins / aiff_reader / aiff_reader.h
blob097c270e1df532628dd7c902a589814e057dcd5d
1 /*
2 * Copyright (c) 2003-2004, Marcus Overhagen
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23 * OF THE POSSIBILITY OF SUCH DAMAGE.
25 #ifndef _AIFF_READER_H
26 #define _AIFF_READER_H
28 #include "ReaderPlugin.h"
29 #include "aiff.h"
31 class aiffReader : public Reader
33 public:
34 aiffReader();
35 ~aiffReader();
37 const char *Copyright();
39 status_t Sniff(int32 *streamCount);
41 void GetFileFormatInfo(media_file_format *mff);
43 status_t AllocateCookie(int32 streamNumber, void **cookie);
44 status_t FreeCookie(void *cookie);
46 status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration,
47 media_format *format, const void **infoBuffer, size_t *infoSize);
49 status_t Seek(void *cookie,
50 uint32 seekTo,
51 int64 *frame, bigtime_t *time);
53 status_t GetNextChunk(void *cookie,
54 const void **chunkBuffer, size_t *chunkSize,
55 media_header *mediaHeader);
56 private:
57 uint32 DecodeFrameRate(const void *_80bit_float);
59 BPositionIO *Source() { return fSource; }
61 private:
62 BPositionIO * fSource;
64 media_format fFormat;
65 int64 fDataStart;
66 int64 fDataSize;
68 int64 fFrameCount;
69 bigtime_t fDuration;
71 bool fRaw;
73 int64 fPosition;
75 int fChannelCount;
76 int32 fFrameRate;
77 int fValidBitsPerSample;
78 int fBytesPerSample;
79 int fBytesPerFrame;
80 uint32 fFormatCode;
82 void * fBuffer;
83 int32 fBufferSize;
87 class aiffReaderPlugin : public ReaderPlugin
89 public:
90 Reader *NewReader();
93 MediaPlugin *instantiate_plugin();
95 #endif