diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-09-14 06:58:15 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-09-14 06:58:15 +0000 |
| commit | 868b4f765de568c38604389ecfa53c088d312695 (patch) | |
| tree | 48b6c06f245ac5361bae3c4fb08a25c03576c9cb | |
| parent | d894be75f42dead336c4ac591d98ff1b91474368 (diff) | |
| download | qmmp-868b4f765de568c38604389ecfa53c088d312695.tar.gz qmmp-868b4f765de568c38604389ecfa53c088d312695.tar.bz2 qmmp-868b4f765de568c38604389ecfa53c088d312695.zip | |
changed decoder api
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6715 90c681e8-e032-0410-971d-27865f9a5e38
33 files changed, 85 insertions, 80 deletions
diff --git a/src/plugins/Input/aac/decoder_aac.cpp b/src/plugins/Input/aac/decoder_aac.cpp index 657833c85..db3853012 100644 --- a/src/plugins/Input/aac/decoder_aac.cpp +++ b/src/plugins/Input/aac/decoder_aac.cpp @@ -184,12 +184,12 @@ qint64 DecoderAAC::read(unsigned char *audio, qint64 maxSize) return size; } -qint64 DecoderAAC::totalTime() +qint64 DecoderAAC::totalTime() const { return m_totalTime; } -int DecoderAAC::bitrate() +int DecoderAAC::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/aac/decoder_aac.h b/src/plugins/Input/aac/decoder_aac.h index f873118f8..834007e73 100644 --- a/src/plugins/Input/aac/decoder_aac.h +++ b/src/plugins/Input/aac/decoder_aac.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2014 by Ilya Kotov * + * Copyright (C) 2006-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -45,8 +45,8 @@ public: } // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp index 1b0be129c..9fa35dbd5 100644 --- a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp +++ b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2014 by Ilya Kotov * + * Copyright (C) 2009-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -459,12 +459,12 @@ bool DecoderCDAudio::initialize() } -qint64 DecoderCDAudio::totalTime() +qint64 DecoderCDAudio::totalTime() const { return m_totalTime; } -int DecoderCDAudio::bitrate() +int DecoderCDAudio::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/cdaudio/decoder_cdaudio.h b/src/plugins/Input/cdaudio/decoder_cdaudio.h index cdc21f3c1..1ae705c9c 100644 --- a/src/plugins/Input/cdaudio/decoder_cdaudio.h +++ b/src/plugins/Input/cdaudio/decoder_cdaudio.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2012 by Ilya Kotov * + * Copyright (C) 2009-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -52,8 +52,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/cue/decoder_cue.cpp b/src/plugins/Input/cue/decoder_cue.cpp index 29853ea2a..226e0749e 100644 --- a/src/plugins/Input/cue/decoder_cue.cpp +++ b/src/plugins/Input/cue/decoder_cue.cpp @@ -111,7 +111,7 @@ bool DecoderCUE::initialize() return true; } -qint64 DecoderCUE::totalTime() +qint64 DecoderCUE::totalTime() const { return m_decoder ? m_length : 0; } @@ -168,7 +168,7 @@ qint64 DecoderCUE::read(unsigned char *data, qint64 size) return len2; } -int DecoderCUE::bitrate() +int DecoderCUE::bitrate() const { return m_decoder->bitrate(); } diff --git a/src/plugins/Input/cue/decoder_cue.h b/src/plugins/Input/cue/decoder_cue.h index 08834cf60..a7dbd547c 100644 --- a/src/plugins/Input/cue/decoder_cue.h +++ b/src/plugins/Input/cue/decoder_cue.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -36,10 +36,10 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); + qint64 totalTime() const; void seek(qint64); qint64 read(unsigned char *data, qint64 size); - int bitrate(); + int bitrate() const; const QString nextURL() const; void next(); diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp index d6e52a1ad..8232c4735 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp @@ -314,12 +314,12 @@ bool DecoderFFmpeg::initialize() return true; } -qint64 DecoderFFmpeg::totalTime() +qint64 DecoderFFmpeg::totalTime() const { return m_totalTime; } -int DecoderFFmpeg::bitrate() +int DecoderFFmpeg::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h index 0ab85046a..fe0261843 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h @@ -42,8 +42,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.cpp index 6b7917c33..022a4b8ae 100644 --- a/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.cpp +++ b/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2013 by Ilya Kotov * + * Copyright (C) 2006-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -252,12 +252,12 @@ bool DecoderFFmpeg::initialize() } -qint64 DecoderFFmpeg::totalTime() +qint64 DecoderFFmpeg::totalTime() const { return m_totalTime; } -int DecoderFFmpeg::bitrate() +int DecoderFFmpeg::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.h index b35a82506..cb93a1759 100644 --- a/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.h +++ b/src/plugins/Input/ffmpeg_legacy/decoder_ffmpeg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2013 by Ilya Kotov * + * Copyright (C) 2006-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -44,8 +44,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp index 96868de6a..43e0a7972 100644 --- a/src/plugins/Input/flac/decoder_flac.cpp +++ b/src/plugins/Input/flac/decoder_flac.cpp @@ -436,14 +436,14 @@ bool DecoderFLAC::initialize() return true; } -qint64 DecoderFLAC::totalTime() +qint64 DecoderFLAC::totalTime() const { if(m_parser) return m_length; return data()->length; } -int DecoderFLAC::bitrate() +int DecoderFLAC::bitrate() const { return data()->bitrate; } diff --git a/src/plugins/Input/flac/decoder_flac.h b/src/plugins/Input/flac/decoder_flac.h index c69cba210..5502001dc 100644 --- a/src/plugins/Input/flac/decoder_flac.h +++ b/src/plugins/Input/flac/decoder_flac.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2014 by Ilya Kotov * + * Copyright (C) 2006-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -65,8 +65,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *data, qint64 maxSize); void seek(qint64 time); const QString nextURL() const; @@ -77,6 +77,11 @@ public: return m_data; } + const struct flac_data *data() const + { + return m_data; + } + private: // helper functions diff --git a/src/plugins/Input/gme/decoder_gme.cpp b/src/plugins/Input/gme/decoder_gme.cpp index 822852302..f5146c3a9 100644 --- a/src/plugins/Input/gme/decoder_gme.cpp +++ b/src/plugins/Input/gme/decoder_gme.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -77,7 +77,7 @@ bool DecoderGme::initialize() return true; } -qint64 DecoderGme::totalTime() +qint64 DecoderGme::totalTime() const { return m_totalTime; } @@ -87,7 +87,7 @@ void DecoderGme::seek(qint64 pos) gme_seek(m_emu, pos); } -int DecoderGme::bitrate() +int DecoderGme::bitrate() const { return 8; } diff --git a/src/plugins/Input/gme/decoder_gme.h b/src/plugins/Input/gme/decoder_gme.h index 29a88a96d..ac99175f2 100644 --- a/src/plugins/Input/gme/decoder_gme.h +++ b/src/plugins/Input/gme/decoder_gme.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -37,8 +37,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *data, qint64 size); void seek(qint64); diff --git a/src/plugins/Input/mad/decoder_mad.cpp b/src/plugins/Input/mad/decoder_mad.cpp index 57924f620..7c1339ece 100644 --- a/src/plugins/Input/mad/decoder_mad.cpp +++ b/src/plugins/Input/mad/decoder_mad.cpp @@ -308,14 +308,14 @@ bool DecoderMAD::findHeader() return true; } -qint64 DecoderMAD::totalTime() +qint64 DecoderMAD::totalTime() const { if (!m_inited) return 0; return m_totalTime; } -int DecoderMAD::bitrate() +int DecoderMAD::bitrate() const { return int(m_bitrate); } diff --git a/src/plugins/Input/mad/decoder_mad.h b/src/plugins/Input/mad/decoder_mad.h index 73dc43f3b..d74754a38 100644 --- a/src/plugins/Input/mad/decoder_mad.h +++ b/src/plugins/Input/mad/decoder_mad.h @@ -43,8 +43,8 @@ public: // standard decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *data, qint64 size); void seek(qint64); diff --git a/src/plugins/Input/modplug/decoder_modplug.cpp b/src/plugins/Input/modplug/decoder_modplug.cpp index 35ec524cb..51c2854ea 100644 --- a/src/plugins/Input/modplug/decoder_modplug.cpp +++ b/src/plugins/Input/modplug/decoder_modplug.cpp @@ -95,12 +95,12 @@ bool DecoderModPlug::initialize() return true; } -qint64 DecoderModPlug::totalTime() +qint64 DecoderModPlug::totalTime() const { return m_totalTime; } -int DecoderModPlug::bitrate() +int DecoderModPlug::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/modplug/decoder_modplug.h b/src/plugins/Input/modplug/decoder_modplug.h index 91f4c349d..3c5f45437 100644 --- a/src/plugins/Input/modplug/decoder_modplug.h +++ b/src/plugins/Input/modplug/decoder_modplug.h @@ -35,8 +35,8 @@ public: static DecoderModPlug* instance(); // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/mpc/decoder_mpc.cpp b/src/plugins/Input/mpc/decoder_mpc.cpp index 1d273da66..edb5901d6 100644 --- a/src/plugins/Input/mpc/decoder_mpc.cpp +++ b/src/plugins/Input/mpc/decoder_mpc.cpp @@ -179,12 +179,12 @@ bool DecoderMPC::initialize() return true; } -qint64 DecoderMPC::totalTime() +qint64 DecoderMPC::totalTime() const { return m_totalTime; } -int DecoderMPC::bitrate() +int DecoderMPC::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/mpc/decoder_mpc.h b/src/plugins/Input/mpc/decoder_mpc.h index caae0e9c8..ad2268785 100644 --- a/src/plugins/Input/mpc/decoder_mpc.h +++ b/src/plugins/Input/mpc/decoder_mpc.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2015 by Ilya Kotov * + * Copyright (C) 2006-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -53,8 +53,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/opus/decoder_opus.cpp b/src/plugins/Input/opus/decoder_opus.cpp index 7823337c8..7dae07044 100644 --- a/src/plugins/Input/opus/decoder_opus.cpp +++ b/src/plugins/Input/opus/decoder_opus.cpp @@ -132,14 +132,14 @@ bool DecoderOpus::initialize() return true; } -qint64 DecoderOpus::totalTime() +qint64 DecoderOpus::totalTime() const { if (!m_opusfile) return 0; return m_totalTime; } -int DecoderOpus::bitrate() +int DecoderOpus::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/opus/decoder_opus.h b/src/plugins/Input/opus/decoder_opus.h index f2395f347..30460c7be 100644 --- a/src/plugins/Input/opus/decoder_opus.h +++ b/src/plugins/Input/opus/decoder_opus.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013-2015 by Ilya Kotov * + * Copyright (C) 2013-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -35,8 +35,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; private: virtual qint64 read(unsigned char *data, qint64 maxSize); diff --git a/src/plugins/Input/sid/decoder_sid.cpp b/src/plugins/Input/sid/decoder_sid.cpp index 4f8bd1392..65d707238 100644 --- a/src/plugins/Input/sid/decoder_sid.cpp +++ b/src/plugins/Input/sid/decoder_sid.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -148,7 +148,7 @@ bool DecoderSID::initialize() return true; } -qint64 DecoderSID::totalTime() +qint64 DecoderSID::totalTime() const { return 0; } @@ -158,7 +158,7 @@ void DecoderSID::seek(qint64 pos) Q_UNUSED(pos); } -int DecoderSID::bitrate() +int DecoderSID::bitrate() const { return 8; } diff --git a/src/plugins/Input/sid/decoder_sid.h b/src/plugins/Input/sid/decoder_sid.h index 66704d0e9..d18d67000 100644 --- a/src/plugins/Input/sid/decoder_sid.h +++ b/src/plugins/Input/sid/decoder_sid.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013-2014 by Ilya Kotov * + * Copyright (C) 2013-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -37,8 +37,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *data, qint64 size); void seek(qint64); diff --git a/src/plugins/Input/sndfile/decoder_sndfile.cpp b/src/plugins/Input/sndfile/decoder_sndfile.cpp index 182e809d8..3c10dc209 100644 --- a/src/plugins/Input/sndfile/decoder_sndfile.cpp +++ b/src/plugins/Input/sndfile/decoder_sndfile.cpp @@ -136,12 +136,12 @@ void DecoderSndFile::deinit() m_sndfile = 0; } -qint64 DecoderSndFile::totalTime() +qint64 DecoderSndFile::totalTime() const { return m_totalTime; } -int DecoderSndFile::bitrate() +int DecoderSndFile::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/sndfile/decoder_sndfile.h b/src/plugins/Input/sndfile/decoder_sndfile.h index b1a7459cd..3856c95a7 100644 --- a/src/plugins/Input/sndfile/decoder_sndfile.h +++ b/src/plugins/Input/sndfile/decoder_sndfile.h @@ -37,8 +37,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *audio, qint64 maxSize); void seek(qint64 time); diff --git a/src/plugins/Input/vorbis/decoder_vorbis.cpp b/src/plugins/Input/vorbis/decoder_vorbis.cpp index 13e7dbab4..e4c852bb2 100644 --- a/src/plugins/Input/vorbis/decoder_vorbis.cpp +++ b/src/plugins/Input/vorbis/decoder_vorbis.cpp @@ -135,14 +135,14 @@ bool DecoderVorbis::initialize() } -qint64 DecoderVorbis::totalTime() +qint64 DecoderVorbis::totalTime() const { if (!m_inited) return 0; return m_totalTime; } -int DecoderVorbis::bitrate() +int DecoderVorbis::bitrate() const { return m_bitrate; } diff --git a/src/plugins/Input/vorbis/decoder_vorbis.h b/src/plugins/Input/vorbis/decoder_vorbis.h index b7cbfdea3..82ed9b3d5 100644 --- a/src/plugins/Input/vorbis/decoder_vorbis.h +++ b/src/plugins/Input/vorbis/decoder_vorbis.h @@ -20,8 +20,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; private: virtual qint64 read(unsigned char *data, qint64 maxSize); diff --git a/src/plugins/Input/wavpack/decoder_wavpack.cpp b/src/plugins/Input/wavpack/decoder_wavpack.cpp index f4a37d3d3..9a6a18c1f 100644 --- a/src/plugins/Input/wavpack/decoder_wavpack.cpp +++ b/src/plugins/Input/wavpack/decoder_wavpack.cpp @@ -155,14 +155,14 @@ bool DecoderWavPack::initialize() return true; } -int DecoderWavPack::bitrate() +int DecoderWavPack::bitrate() const { if(m_context) return int(WavpackGetInstantBitrate(m_context)/1000); return 0; } -qint64 DecoderWavPack::totalTime() +qint64 DecoderWavPack::totalTime() const { if(m_parser) return m_length; diff --git a/src/plugins/Input/wavpack/decoder_wavpack.h b/src/plugins/Input/wavpack/decoder_wavpack.h index 981f1dff4..91b2c6d15 100644 --- a/src/plugins/Input/wavpack/decoder_wavpack.h +++ b/src/plugins/Input/wavpack/decoder_wavpack.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2015 by Ilya Kotov * + * Copyright (C) 2008-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -36,8 +36,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *data, qint64 maxSize); void seek(qint64 time); const QString nextURL() const; diff --git a/src/plugins/Input/wildmidi/decoder_wildmidi.cpp b/src/plugins/Input/wildmidi/decoder_wildmidi.cpp index ef45482c0..f802e2ce8 100644 --- a/src/plugins/Input/wildmidi/decoder_wildmidi.cpp +++ b/src/plugins/Input/wildmidi/decoder_wildmidi.cpp @@ -67,7 +67,7 @@ bool DecoderWildMidi::initialize() return true; } -qint64 DecoderWildMidi::totalTime() +qint64 DecoderWildMidi::totalTime() const { return m_totalTime; } @@ -78,7 +78,7 @@ void DecoderWildMidi::seek(qint64 pos) WildMidi_FastSeek(midi_ptr, &sample); } -int DecoderWildMidi::bitrate() +int DecoderWildMidi::bitrate() const { return 8; } diff --git a/src/plugins/Input/wildmidi/decoder_wildmidi.h b/src/plugins/Input/wildmidi/decoder_wildmidi.h index b4f93d59f..343d0e3e3 100644 --- a/src/plugins/Input/wildmidi/decoder_wildmidi.h +++ b/src/plugins/Input/wildmidi/decoder_wildmidi.h @@ -34,8 +34,8 @@ public: // Standard Decoder API bool initialize(); - qint64 totalTime(); - int bitrate(); + qint64 totalTime() const; + int bitrate() const; qint64 read(unsigned char *data, qint64 size); void seek(qint64); diff --git a/src/qmmp/decoder.h b/src/qmmp/decoder.h index 340722b06..87412b502 100644 --- a/src/qmmp/decoder.h +++ b/src/qmmp/decoder.h @@ -44,7 +44,7 @@ public: * Returns the total time in milliseconds. * Subclass should reimplement this function. */ - virtual qint64 totalTime() = 0; + virtual qint64 totalTime() const = 0; /*! * Requests a seek to the time \b time indicated, specified in milliseconds. * Subclass should reimplement this function. @@ -60,7 +60,7 @@ public: * Returns current bitrate (in kbps). * Subclass should reimplement this function. */ - virtual int bitrate() = 0; + virtual int bitrate() const = 0; /*! * Tells decoder that it should play next track. * By default this function does nothing. |
