aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-09-09 19:45:15 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-09-09 19:45:15 +0000
commit0e860ae0ba0c6ed9f14b9d01a28b44ae64d91532 (patch)
tree33da2a2b96d40e270b4bbe3a124bdf7e23b788f5 /src/plugins/Input
parent3188ada336102df3bf8d77cdafdab1a8f65f4d86 (diff)
downloadqmmp-0e860ae0ba0c6ed9f14b9d01a28b44ae64d91532.tar.gz
qmmp-0e860ae0ba0c6ed9f14b9d01a28b44ae64d91532.tar.bz2
qmmp-0e860ae0ba0c6ed9f14b9d01a28b44ae64d91532.zip
new libqmmp api, a lot of features has been temporary disabled
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@546 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input')
-rw-r--r--src/plugins/Input/CMakeLists.txt14
-rw-r--r--src/plugins/Input/Input.pro10
-rw-r--r--src/plugins/Input/mad/decoder_mad.cpp51
-rw-r--r--src/plugins/Input/mad/decoder_mad.h4
4 files changed, 40 insertions, 39 deletions
diff --git a/src/plugins/Input/CMakeLists.txt b/src/plugins/Input/CMakeLists.txt
index a1f91866d..57df47d99 100644
--- a/src/plugins/Input/CMakeLists.txt
+++ b/src/plugins/Input/CMakeLists.txt
@@ -17,29 +17,29 @@ add_subdirectory(mad)
ENDIF(USE_MAD AND TAGLIB_FOUND)
IF(USE_FLAC AND TAGLIB_FOUND)
-add_subdirectory(flac)
+#add_subdirectory(flac)
ENDIF(USE_FLAC AND TAGLIB_FOUND)
IF(USE_VORBIS AND TAGLIB_FOUND)
-add_subdirectory(vorbis)
+#add_subdirectory(vorbis)
ENDIF(USE_VORBIS AND TAGLIB_FOUND)
IF(USE_FFMPEG)
-add_subdirectory(ffmpeg)
+#add_subdirectory(ffmpeg)
ENDIF(USE_FFMPEG)
IF(USE_MPC AND TAGLIB_FOUND)
-add_subdirectory(mpc)
+#add_subdirectory(mpc)
ENDIF(USE_MPC AND TAGLIB_FOUND)
IF(USE_SNDFILE)
-add_subdirectory(sndfile)
+#add_subdirectory(sndfile)
ENDIF(USE_SNDFILE)
IF(USE_WAVPACK)
-add_subdirectory(wavpack)
+#add_subdirectory(wavpack)
ENDIF(USE_WAVPACK)
IF(USE_MODPLUG)
-add_subdirectory(modplug)
+#add_subdirectory(modplug)
ENDIF(USE_MODPLUG)
diff --git a/src/plugins/Input/Input.pro b/src/plugins/Input/Input.pro
index 2b75906fb..6dff07146 100644
--- a/src/plugins/Input/Input.pro
+++ b/src/plugins/Input/Input.pro
@@ -1,31 +1,31 @@
include(../../../qmmp.pri)
-SUBDIRS += mad vorbis sndfile wavpack
+SUBDIRS += mad# vorbis sndfile wavpack
TEMPLATE = subdirs
contains(CONFIG, MODPLUG_PLUGIN){
- SUBDIRS += modplug
+# SUBDIRS += modplug
message(***************************)
message(* Modplug plugin enabled *)
message(***************************)
}
contains(CONFIG, MUSEPACK_PLUGIN){
- SUBDIRS += mpc
+# SUBDIRS += mpc
message(***************************)
message(* Musepack plugin enabled *)
message(***************************)
}
contains(CONFIG, FLAC_PLUGIN){
- SUBDIRS += flac
+# SUBDIRS += flac
message(***********************)
message(* FLAC plugin enabled *)
message(***********************)
}
contains(CONFIG, FFMPEG_PLUGIN){
- SUBDIRS += ffmpeg
+# SUBDIRS += ffmpeg
message(*************************)
message(* FFMPEG plugin enabled *)
message(*************************)
diff --git a/src/plugins/Input/mad/decoder_mad.cpp b/src/plugins/Input/mad/decoder_mad.cpp
index 7c8cc8f1b..98e437075 100644
--- a/src/plugins/Input/mad/decoder_mad.cpp
+++ b/src/plugins/Input/mad/decoder_mad.cpp
@@ -25,7 +25,7 @@ DecoderMAD::DecoderMAD(QObject *parent, DecoderFactory *d, QIODevice *i, Output
inited = false;
user_stop = false;
done = false;
- finish = false;
+ m_finish = false;
derror = false;
eof = false;
useeq = false;
@@ -72,7 +72,7 @@ bool DecoderMAD::initialize()
inited = false;
user_stop = false;
done = false;
- finish = false;
+ m_finish = false;
derror = false;
eof = false;
totalTime = 0.;
@@ -88,7 +88,7 @@ bool DecoderMAD::initialize()
if (! input())
{
- error("DecoderMAD: cannot initialize. No input.");
+ qWarning("DecoderMAD: cannot initialize. No input.");
return FALSE;
}
@@ -102,8 +102,8 @@ bool DecoderMAD::initialize()
{
if (! input()->open(QIODevice::ReadOnly))
{
- error("DecoderMAD: Failed to open input. Error " +
- QString::number(input()->isOpen()) + ".");
+ /*qWarning("DecoderMAD: Failed to open input. Error " +
+ QString::number(input()->isOpen()) + ".");*/
return FALSE;
}
}
@@ -112,8 +112,8 @@ bool DecoderMAD::initialize()
{
TagExtractor extractor(input());
FileTag tag = extractor.id3v2tag();
- if (!tag.isEmpty())
- dispatch(extractor.id3v2tag());
+ // if (!tag.isEmpty())
+// dispatch(extractor.id3v2tag());
}
mad_stream_init(&stream);
@@ -131,7 +131,7 @@ bool DecoderMAD::initialize()
mad_frame_mute (&frame);
stream.next_frame = NULL;
stream.sync = 0;
- configure(freq, channels, 16, bitrate);
+ configure(freq, channels, 16);
inited = TRUE;
return TRUE;
@@ -150,7 +150,7 @@ void DecoderMAD::deinit()
inited = false;
user_stop = false;
done = false;
- finish = false;
+ m_finish = false;
derror = false;
eof = false;
useeq = false;
@@ -339,7 +339,7 @@ bool DecoderMAD::findHeader()
return TRUE;
}
-double DecoderMAD::lengthInSeconds()
+qint64 DecoderMAD::lengthInSeconds()
{
if (! inited)
return 0.;
@@ -360,11 +360,11 @@ void DecoderMAD::flush(bool final)
{
ulong min = final ? 0 : bks;
- while ((! done && ! finish) && output_bytes > min)
+ while ((! done && ! m_finish) && output_bytes > min)
{
output()->recycler()->mutex()->lock();
- while ((! done && ! finish) && output()->recycler()->full())
+ while ((! done && ! m_finish) && output()->recycler()->full())
{
mutex()->unlock();
output()->recycler()->cond()->wait(output()->recycler()->mutex());
@@ -373,7 +373,7 @@ void DecoderMAD::flush(bool final)
done = user_stop;
}
- if (user_stop || finish)
+ if (user_stop || m_finish)
{
inited = FALSE;
done = TRUE;
@@ -406,13 +406,13 @@ void DecoderMAD::run()
}
- DecoderState::Type stat = DecoderState::Decoding;
+ //DecoderState::Type stat = DecoderState::Decoding;
mutex()->unlock();
- dispatch(stat);
+ //dispatch(stat);
- while (! done && ! finish && ! derror)
+ while (! done && ! m_finish && ! derror)
{
mutex()->lock();
@@ -433,7 +433,7 @@ void DecoderMAD::run()
eof = false;
}
- finish = eof;
+ m_finish = eof;
if (! eof)
{
@@ -469,7 +469,7 @@ void DecoderMAD::run()
mutex()->unlock();
// decode
- while (! done && ! finish && ! derror)
+ while (! done && ! m_finish && ! derror)
{
if (mad_frame_decode(&frame, &stream) == -1)
{
@@ -530,17 +530,18 @@ void DecoderMAD::run()
done = TRUE;
if (! user_stop)
- finish = TRUE;
+ m_finish = TRUE;
}
- if (finish)
- stat = DecoderState::Finished;
- else if (user_stop)
- stat = DecoderState::Stopped;
+ if (m_finish)
+ finish();
+// stat = DecoderState::Finished;
+ //else if (user_stop)
+ // stat = DecoderState::Stopped;
mutex()->unlock();
- dispatch(stat);
+ //dispatch(stat);
if (input())
input()->close();
@@ -617,7 +618,7 @@ enum mad_flow DecoderMAD::madOutput()
}
}
- if (done || finish)
+ if (done || m_finish)
{
return MAD_FLOW_STOP;
}
diff --git a/src/plugins/Input/mad/decoder_mad.h b/src/plugins/Input/mad/decoder_mad.h
index f37016657..55c662737 100644
--- a/src/plugins/Input/mad/decoder_mad.h
+++ b/src/plugins/Input/mad/decoder_mad.h
@@ -27,7 +27,7 @@ public:
// standard decoder API
bool initialize();
- double lengthInSeconds();
+ qint64 lengthInSeconds();
void seek(double);
void stop();
@@ -43,7 +43,7 @@ private:
void deinit();
bool findHeader();
bool findXingHeader(struct mad_bitptr, unsigned int);
- bool inited, user_stop, done, finish, derror, eof, useeq;
+ bool inited, user_stop, done, m_finish, derror, eof, useeq;
double totalTime, seekTime;
int channels;
unsigned long bitrate;