aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/ffmpeg/settingsdialog.cpp
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/settingsdialog.cpp
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/settingsdialog.cpp')
-rw-r--r--src/plugins/Input/ffmpeg/settingsdialog.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/plugins/Input/ffmpeg/settingsdialog.cpp b/src/plugins/Input/ffmpeg/settingsdialog.cpp
index 3691b6e21..be77ebc43 100644
--- a/src/plugins/Input/ffmpeg/settingsdialog.cpp
+++ b/src/plugins/Input/ffmpeg/settingsdialog.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2010 by Ilya Kotov *
+ * Copyright (C) 2008-2011 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -23,25 +23,10 @@
#include <qmmp/qmmp.h>
-extern "C"
-{
-#if defined HAVE_FFMPEG_AVFORMAT_H
-#include <ffmpeg/avformat.h>
-#elif defined HAVE_LIBAVFORMAT_AVFORMAT_H
+extern "C"{
#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 "settingsdialog.h"
SettingsDialog::SettingsDialog(QWidget *parent)
@@ -52,25 +37,16 @@ SettingsDialog::SettingsDialog(QWidget *parent)
QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
QStringList filters;
filters << "*.wma";
-#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(44<<8)+0))
filters << "*.ape";
-#endif
-#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(20<<8)+0))
filters << "*.shn";
-#endif
filters = settings.value("FFMPEG/filters", filters).toStringList();
avcodec_init();
avcodec_register_all();
av_register_all();
ui.wmaCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_WMAV1));
ui.wmaCheckBox->setChecked(filters.contains("*.wma") && avcodec_find_decoder(CODEC_ID_WMAV1));
-#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(44<<8)+0))
ui.apeCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_APE));
ui.apeCheckBox->setChecked(filters.contains("*.ape") && avcodec_find_decoder(CODEC_ID_APE));
-#else
- ui.apeCheckBox->setChecked(false);
- ui.apeCheckBox->setEnabled(false);
-#endif
ui.ttaCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_TTA));
ui.ttaCheckBox->setChecked(filters.contains("*.tta") && avcodec_find_decoder(CODEC_ID_TTA));
ui.alacCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_ALAC));
@@ -83,12 +59,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
ui.mp4CheckBox->setChecked(filters.contains("*.m4a") && avcodec_find_decoder(CODEC_ID_AAC));
ui.raCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_RA_288));
ui.raCheckBox->setChecked(filters.contains("*.ra") && avcodec_find_decoder(CODEC_ID_RA_288));
-#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(20<<8)+0))
ui.shCheckBox->setChecked(filters.contains("*.shn") && avcodec_find_decoder(CODEC_ID_SHORTEN));
-#else
- ui.shCheckBox->setChecked(false);
- ui.shCheckBox->setEnabled(false);
-#endif
}
SettingsDialog::~SettingsDialog()