/thirdparty/liblastfm2/src/fingerprint/contrib/AacSource.h

http://github.com/tomahawk-player/tomahawk · C Header · 46 lines · 21 code · 6 blank · 19 comment · 0 complexity · d85883fc6497a5c8aaec0a01d9c97d81 MD5 · raw file

  1. /*
  2. Copyright 2009 Last.fm Ltd.
  3. Copyright 2009 John Stamp <jstamp@users.sourceforge.net>
  4. This file is part of liblastfm.
  5. liblastfm is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. liblastfm is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with liblastfm. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef __AAC_SOURCE_H__
  17. #define __AAC_SOURCE_H__
  18. #include <lastfm/FingerprintableSource>
  19. class AacSource : public lastfm::FingerprintableSource
  20. {
  21. public:
  22. AacSource();
  23. ~AacSource();
  24. virtual void getInfo(int& lengthSecs, int& samplerate, int& bitrate, int& nchannels);
  25. virtual void init(const QString& fileName);
  26. virtual int updateBuffer(signed short* pBuffer, size_t bufferSize);
  27. virtual void skip(const int mSecs);
  28. virtual void skipSilence(double silenceThreshold = 0.0001);
  29. virtual bool eof() const { return m_eof; }
  30. private:
  31. int checkHeader();
  32. QString m_fileName;
  33. bool m_eof;
  34. class AAC_File *m_aacFile;
  35. };
  36. #endif