diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2012-01-17 18:00:00 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2012-01-17 18:00:00 +0000 |
| commit | cb6023902e4282e05caa45f6bac488f6d3b59d98 (patch) | |
| tree | aa0c49308eb2142e2382b5d8ceb513be0f16573b /src/plugins/Input/ffmpeg/decoder_ffmpeg.h | |
| parent | 2783c49ba9f3c9515d57cca6bd0a727f49e084b8 (diff) | |
| download | qmmp-cb6023902e4282e05caa45f6bac488f6d3b59d98.tar.gz qmmp-cb6023902e4282e05caa45f6bac488f6d3b59d98.tar.bz2 qmmp-cb6023902e4282e05caa45f6bac488f6d3b59d98.zip | |
legacy ffmpeg support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2539 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/ffmpeg/decoder_ffmpeg.h')
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoder_ffmpeg.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h index 4c87fc291..ee1be2871 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2011 by Ilya Kotov * + * Copyright (C) 2006-2012 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -25,8 +25,12 @@ extern "C"{ #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libavutil/mathematics.h> +#if (LIBAVUTIL_VERSION_INT >= ((51<<16)+(32<<8)+0)) #include <libavutil/dict.h> +#endif } + + #include <qmmp/decoder.h> #define PROBE_BUFFER_SIZE 8192 @@ -48,26 +52,40 @@ public: private: //helper functions void fillBuffer(); - qint64 ffmpeg_decode(); AVFormatContext *ic; AVCodecContext *c; + uint wma_st_buff, wma_idx2; int m_bitrate, wma_idx; + QString m_path; qint64 m_totalTime; - AVPacket m_pkt; AVPacket m_temp_pkt; + qint64 m_output_at; + uchar m_input_buf[INPUT_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; + int64_t m_seekTime; + qint64 m_skipBytes; +#if (LIBAVCODEC_VERSION_INT >= ((53<<16)+(42<<8)+4)) + qint64 ffmpeg_decode(); AVIOContext *m_stream; AVFrame *m_decoded_frame; - qint64 m_output_at; - uchar m_input_buf[INPUT_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; +#else + qint64 ffmpeg_decode(uint8_t *audio); + bool m_skip; - int64_t m_seekTime; - qint64 m_skipBytes; +#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(102<<8)+0)) + AVIOContext *m_stream; +#else + ByteIOContext *m_stream; +#endif + + uint8_t *m_output_buf; + +#endif }; |
