aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/mpeg/mpeg.pro
blob: 8583016ca3e5dfe5e029fd70d785023691a3c6a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
include(../../plugins.pri)

TARGET = $$PLUGINS_PREFIX/Input/mpeg

HEADERS += decodermpegfactory.h \
    settingsdialog.h \
    tagextractor.h \
    mpegmetadatamodel.h

SOURCES += decodermpegfactory.cpp \
    settingsdialog.cpp \
    tagextractor.cpp \
    mpegmetadatamodel.cpp

contains(CONFIG, WITH_MAD){
    HEADERS += decoder_mad.h
    SOURCES += decoder_mad.cpp
    DEFINES += WITH_MAD
}

contains(CONFIG, WITH_MPG123){
    HEADERS += decoder_mpg123.h
    SOURCES += decoder_mpg123.cpp
    DEFINES += WITH_MPG123
}

FORMS += settingsdialog.ui

RESOURCES = translations/translations.qrc

unix {
    target.path = $$PLUGIN_DIR/Input
    INSTALLS += target
    PKGCONFIG += taglib
    contains(CONFIG, WITH_MAD):PKGCONFIG += mad
    contains(CONFIG, WITH_MPG123):PKGCONFIG += libmpg123
}

win32 {
    LIBS += -ltag.dll
    contains(CONFIG, WITH_MAD):LIBS += -lmad
    contains(CONFIG, WITH_MPG123):LIBS += -lmpg123.dll
}
183d60dd067c5d5de30e8422b724'>dcac31a0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
                                                                            
                                                                            

















                                                                             
                            



                                                                                             
                                              
                                                       
                                                       

















                                     



                                            
/***************************************************************************
 *   Copyright (C) 2009-2012 by Ilya Kotov                                 *
 *   forkotov02@hotmail.ru                                                 *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "mmsstreamreader.h"
#include "mmsinputsource.h"

MMSInputSource::MMSInputSource(const QString &url, QObject *parent) : InputSource(url,parent)
{
    m_reader = new MMSStreamReader(url, this);
    connect(m_reader, SIGNAL(ready()),SIGNAL(ready()));
    connect(m_reader, SIGNAL(error()),SIGNAL(error()));
}

QIODevice *MMSInputSource::ioDevice()
{
    return m_reader;
}

bool MMSInputSource::initialize()
{
    m_reader->downloadFile();
    return true;
}

bool MMSInputSource::isReady()
{
    return m_reader->isOpen();
}

QString  MMSInputSource::contentType() const
{
    return "audio/x-ms-wma";
}