aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/ffmpeg/decoder_ffmpeg.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-04-15 18:08:40 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-04-15 18:08:40 +0000
commit2ee8fd4c12b9da5418365c2716eb0e9423fd4e08 (patch)
treeddb9882d71c08db2f737250edb1084fc00603f32 /src/plugins/Input/ffmpeg/decoder_ffmpeg.h
parentb48e843ac11ed8ffbb5d8155ad91160b42841d93 (diff)
downloadqmmp-2ee8fd4c12b9da5418365c2716eb0e9423fd4e08.tar.gz
qmmp-2ee8fd4c12b9da5418365c2716eb0e9423fd4e08.tar.bz2
qmmp-2ee8fd4c12b9da5418365c2716eb0e9423fd4e08.zip
added latest ffmpeg support, fixed bug with ape seeking, removed legacy
code git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2162 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/ffmpeg/decoder_ffmpeg.h')
-rw-r--r--src/plugins/Input/ffmpeg/decoder_ffmpeg.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h
index 5dc3085b9..cd30dc4c1 100644
--- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h
+++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006-2009 by Ilya Kotov *
+ * Copyright (C) 2006-2011 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -22,23 +22,8 @@
#define __decoder_ffmeg_h
extern "C"{
-
-#if defined HAVE_FFMPEG_AVFORMAT_H
-#include <ffmpeg/avformat.h>
-#elif defined HAVE_LIBAVFORMAT_AVFORMAT_H
#include <libavformat/avformat.h>
-#else
-#include <avformat.h>
-#endif
-
-
-#if defined HAVE_FFMPEG_AVCODEC_H
-#include <ffmpeg/avcodec.h>
-#elif defined HAVE_LIBAVCODEC_AVCODEC_H
#include <libavcodec/avcodec.h>
-#else
-#include <avcodec.h>
-#endif
}
#include <qmmp/decoder.h>
@@ -57,7 +42,7 @@ public:
qint64 read(char *audio, qint64 maxSize);
void seek(qint64 time);
-private:
+private:
//helper functions
void fillBuffer();
qint64 ffmpeg_decode(uint8_t *audio);
@@ -72,13 +57,19 @@ private:
AVPacket m_pkt;
AVPacket m_temp_pkt;
- ByteIOContext m_stream;
+
+#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(102<<8)+0))
+ AVIOContext *m_stream;
+#else
+ ByteIOContext *m_stream;
+#endif
+
uint8_t *m_output_buf;
qint64 m_output_at;
uchar m_input_buf[INPUT_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
int64_t m_seekTime;
- qint64 m_skipBytes;
+ qint64 m_skipBytes;
};