aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/uihelper.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-02-07 14:24:43 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-02-07 14:24:43 +0000
commit7ba46dbcaf37fbed623467cbb6679c5356969b83 (patch)
tree366b2acfcd23d37763efb8c4ca3277152f10e4ed /src/qmmpui/uihelper.h
parent62f1800c82b5f637e1a6037229e66f1ce36dd8d5 (diff)
downloadqmmp-7ba46dbcaf37fbed623467cbb6679c5356969b83.tar.gz
qmmp-7ba46dbcaf37fbed623467cbb6679c5356969b83.tar.bz2
qmmp-7ba46dbcaf37fbed623467cbb6679c5356969b83.zip
fixed build
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9697 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/uihelper.h')
0 files changed, 0 insertions, 0 deletions
65f9a5e38> 2007-06-23 16:48:01 +0000 committer vovanec <vovanec@90c681e8-e032-0410-971d-27865f9a5e38> 2007-06-23 16:48:01 +0000 moved into qmmp dir' href='/qmmp/commit/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp?h=main&id=2d622fd9bcb8da9dd3f3206e296cd6a701fc9d12'>2d622fd9b
1eef96342
5638a2a1b


9dfbc8436
2d622fd9b
a849e9380
2d622fd9b

2d622fd9b
afd64439f

a81ae71cb


013ee07b5
a81ae71cb
11b7655bb
afd64439f

75719b8c8
afd64439f
75719b8c8
afd64439f
d0e69a239
aa3f57c02
afd64439f
aa3f57c02
013ee07b5
11b7655bb

afd64439f
c6d40b3e6

9dfbc8436
2d622fd9b
951e9bf79
9dfbc8436


79b25e9c3
9dfbc8436

a849e9380




2d622fd9b

f91f63b99
2d622fd9b
45117f6d2
bc2f30063
5638a2a1b
bf0735a1b
5638a2a1b

bf0735a1b
5638a2a1b
1eef96342
bc2f30063


55c166a53
013ee07b5
55c166a53
013ee07b5
55c166a53
013ee07b5
55c166a53
013ee07b5
55c166a53
013ee07b5
55c166a53

bc2f30063


55c166a53
1eef96342



903ae1362


1eef96342

903ae1362
1eef96342

903ae1362
1eef96342
bc2f30063
45117f6d2


2d622fd9b

2d622fd9b
1eef96342
2d622fd9b




7d2e0f57b
6aa98e65d
2d622fd9b





f0a1d05ed
2d622fd9b



72d49c830
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
                                                                            
                                                                            














                                                                            
                                                                            
                                                                             



                      

                           
                              


                                                                                              
                             
                           
                                

                                 
                    

                                                            


                                                             
                    
 
                 

 
                                                                
 
                                 
                                              
                                    
                                  
                                                    
                                                                         
                               

                                   
                      

 
                                                                           
 
                                               


                                         
                                                  

             




                                                                                              

 
                                                                                                                
 
                                            
 
                                                                                              
                                                                 

                                               
                                                                   
      
                                                                    


                               
                                      
                                                                                     
                                       
                                                                                      
                                        
                                                                                       
                                      
                                                                                     
                                      
                                                                                     

                                                     


                                  
                                                             



                               


                                                                                        

                                                              
                                                                                        

                                                                
                                                                                        
     
 


                           

 
                                                  
  




                                                                    
                                                                                  
                                                              





                                                                    
                                              



                                                           
                                             
/***************************************************************************
 *   Copyright (C) 2008-2016 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.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#include <QMessageBox>
#include <QTranslator>
#include <QtPlugin>
#include <taglib/tag.h>
#include <taglib/fileref.h>
#include <taglib/vorbisfile.h>
#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8))
#include <taglib/tfilestream.h>
#endif
#include "replaygainreader.h"
#include "decoder_vorbis.h"
#include "vorbismetadatamodel.h"
#include "decodervorbisfactory.h"

// DecoderOggFactory
bool DecoderVorbisFactory::canDecode(QIODevice *input) const
{
    char buf[36];
    if (input->peek(buf, 36) == 36 && !memcmp(buf, "OggS", 4)
            && !memcmp(buf + 29, "vorbis", 6))
        return true;

    return false;
}

const DecoderProperties DecoderVorbisFactory::properties() const
{
    DecoderProperties properties;
    properties.name = tr("Ogg Vorbis Plugin");
    properties.shortName = "vorbis";
    properties.filters << "*.ogg";
    properties.description = tr("Ogg Vorbis Files");
    properties.contentTypes << "application/ogg" << "audio/x-vorbis+ogg";
    properties.hasAbout = true;
    properties.hasSettings = false;
    properties.noInput = false;
    return properties;
}

Decoder *DecoderVorbisFactory::create(const QString &url, QIODevice *input)
{
    Decoder *d = new DecoderVorbis(url, input);
    if(!url.contains("://")) //local file
    {
        ReplayGainReader rg(url);
        d->setReplayGainInfo(rg.replayGainInfo());
    }
    return d;
}

MetaDataModel* DecoderVorbisFactory::createMetaDataModel(const QString &path, QObject *parent)
{
    return new VorbisMetaDataModel(path, parent);
}

QList<FileInfo *> DecoderVorbisFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *)
{
    FileInfo *info = new FileInfo(fileName);

#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8))