aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts
blob: eca9398df0c51355142bfb4e3001509349df87b5 (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
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ru">
<context>
    <name>DecoderFFmpegFactory</name>
    <message>
        <location filename="../decoderffmpegfactory.cpp" line="146"/>
        <source>About FFmpeg Audio Plugin</source>
        <translation>Об аудио-модуле FFmpeg</translation>
    </message>
    <message>
        <location filename="../decoderffmpegfactory.cpp" line="148"/>
        <source>Qmmp FFmpeg Audio Plugin</source>
        <translation>Аудио-модуль FFmpeg для Qmmp</translation>
    </message>
    <message>
        <location filename="../decoderffmpegfactory.cpp" line="158"/>
        <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
        <translation>Разработчик: Илья Котов &lt;forkotov02@hotmail.ru&gt;</translation>
    </message>
    <message>
        <location filename="../decoderffmpegfactory.cpp" line="83"/>
        <source>FFmpeg Plugin</source>
        <translation>Модуль FFmpeg</translation>
    </message>
    <message>
        <location filename="../decoderffmpegfactory.cpp" line="85"/>
        <source>FFmpeg Formats</source>
        <translation>Форматы FFmpeg</translation>
    </message>
    <message>
        <location filename="../decoderffmpegfactory.cpp" line="150"/>
        <source>Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6</source>
        <translation>Собрано с libavformat-%1.%2.%3 и libavcodec-%4.%5.%6</translation>
    </message>
</context>
<context>
    <name>FFmpegMetaDataModel</name>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="59"/>
        <source>Length</source>
        <translation>Длительность</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="60"/>
        <source>File size</source>
        <translation>Размер файла</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="60"/>
        <source>KB</source>
        <translation>КБ</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="61"/>
        <source>Bitrate</source>
        <translation>Битовая частота</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="61"/>
        <source>kbps</source>
        <translation>Кб/с</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="72"/>
        <source>Sample rate</source>
        <translation>Дискретизация</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="72"/>
        <source>Hz</source>
        <translation>Гц</translation>
    </message>
    <message>
        <location filename="../ffmpegmetadatamodel.cpp" line="73"/>
        <source>Channels</source>
        <translation>Каналов</translation>
    </message>
</context>
<context>
    <name>SettingsDialog</name>
    <message>
        <location filename="../settingsdialog.ui" line="45"/>
        <source>Formats</source>
        <translation>Форматы</translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="51"/>
        <source>Windows Media Audio</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="58"/>
        <source>Monkey&apos;s Audio</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="65"/>
        <source>True Audio</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="72"/>
        <source>ALAC (Apple Lossless Audio Codec)</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="79"/>
        <source>ADTS AAC</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="93"/>
        <source>MPEG-4 AAC</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="100"/>
        <source>RealAudio 1.0/2.0</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="13"/>
        <source>FFmpeg Plugin Settings</source>
        <translation>Настройки модуля FFmpeg</translation>
    </message>
    <message>
        <location filename="../settingsdialog.ui" line="86"/>
        <source>MP3 (MPEG audio layer 3)</source>
        <translation type="unfinished"></translation>
    </message>
</context>
</TS>
pp?id=fedd13511bbf91914a0250b43c440f43e6d1e8c5'>fedd13511
92f1159a1
fedd13511
92f1159a1

fedd13511
d60ec0e8d
92f19e141



6d1217944
a0c457d7d
6d1217944

a0c457d7d
6d1217944
a0c457d7d

db0834220
40ee4f96d
acdeb971e
245d0ac0c
92f1159a1
245d0ac0c
d60ec0e8d
245d0ac0c
6d1217944
245d0ac0c
8fbf582b6
245d0ac0c
acdeb971e

245d0ac0c
6d1217944
acdeb971e

6d1217944
8fbf582b6
6d1217944


40ee4f96d
ffef94917





0a8086963


ffef94917
ffef94917
e60aa7316
ffef94917


0a8086963

ffef94917
e60aa7316
2e6fa0a14
ffef94917
2e6fa0a14



e60aa7316

ffef94917

810d7042d
0a8086963
810d7042d



b66a8c518
810d7042d







245d0ac0c
810d7042d
245d0ac0c
61f5091df
810d7042d

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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
                                                                            
                                                                            
                                                                            













                                                                            
                                                                            



                                                                             

                      
                 
                         
                           






                                         

                                                             
                      
                     
               
                



                                                                          
                                                      
                                              

                                                       
                                 
                                          



                                                                                        
                                                                      

 
                           
 
                   

 
                                    
 
                      

 
                                               
 
                        

 
                                     
 
                                                               

                                        

                        

     


                                                      
                                                                       
                    






                          
               
     
                                   




                        
                      
                



                        


                                                            
               



                            

                                                     
                                                                
               

 
                            
 
                                       
     

               
     
                                         



               
                                                 
     

               
     
           

 
                                 
 
                      
                             
                                       
                                                                
                                               
                                                             
 
             
     
                                                   

              
                                     
                                                              

            
                                                           
     


                                                         
 





                                                 


                                                                
         
                      
                       


                          

                          
              
                       
                              
                    



                               

            

     
 
                                  



                                                                      
                                                                                







                                                                        
                                                                                               
     
                                                               
                             

     
/***************************************************************************
 *   Copyright (C) 2008-2015 by Ilya Kotov                                 *
 *   forkotov02@ya.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 <QApplication>
#include <QString>
#include <QTranslator>
#include <QLocale>
#include <QTimer>
#include "playlistitem.h"
#include "qmmpuisettings.h"
#include "mediaplayer.h"

MediaPlayer *MediaPlayer::m_instance = 0;

MediaPlayer::MediaPlayer(QObject *parent)
        : QObject(parent)
{
    if(m_instance)
        qFatal("StateHandler: only one instance is allowed");
    m_instance = this;
    m_pl_manager = 0;
    m_core = 0;
    m_skips = 0;
    m_finishTimer = new QTimer(this);
    m_finishTimer->setSingleShot(true);
    m_finishTimer->setInterval(500);
    connect(m_finishTimer, SIGNAL(timeout()), SIGNAL(playbackFinished()));
    QTranslator *translator = new QTranslator(parent);
    QString locale = Qmmp::systemLanguageID();
    translator->load(QString(":/libqmmpui_") + locale);
    qApp->installTranslator(translator);
    m_core = new SoundCore(this);
    m_settings = new QmmpUiSettings(this);
    m_pl_manager = new PlayListManager(this);
    connect(m_core, SIGNAL(nextTrackRequest()), SLOT(updateNextUrl()));
    connect(m_core, SIGNAL(finished()), SLOT(playNext()));
    connect(m_core, SIGNAL(stateChanged(Qmmp::State)), SLOT(processState(Qmmp::State)));
    connect(m_core, SIGNAL(metaDataChanged()),SLOT(updateMetaData()));
}

MediaPlayer::~MediaPlayer()
{
    m_instance = 0;
}

MediaPlayer* MediaPlayer::instance()
{
    return m_instance;
}

PlayListManager *MediaPlayer::playListManager()
{
    return m_pl_manager;
}

void MediaPlayer::play(qint64 offset)
{
    m_pl_manager->currentPlayList()->doCurrentVisibleRequest();
    if (m_core->state() == Qmmp::Paused)
    {
        m_core->pause();
        return;
    }

    if (m_pl_manager->currentPlayList()->count() == 0)
        return;

    QString s = m_pl_manager->currentPlayList()->currentTrack()->url();
    if (s.isEmpty())
    {
        m_nextUrl.clear();
        return;
    }
    if(m_nextUrl == s)
    {
        m_nextUrl.clear();
        return;
    }
    m_core->play(s, false, offset);
}

void MediaPlayer::stop()
{
    m_core->stop();
    m_nextUrl.clear();
    m_skips = 0;
}

void MediaPlayer::next()
{
    bool playNext = m_core->state() != Qmmp::Stopped;
    stop();
    if (m_pl_manager->currentPlayList()->next() && playNext)
        play();
}

void MediaPlayer::previous()
{
    bool playNext = m_core->state() != Qmmp::Stopped;
    stop();
    if (m_pl_manager->currentPlayList()->previous() && playNext)
        play();
}

void MediaPlayer::playNext()
{
    if(m_settings->isRepeatableTrack())
    {
        play();
        return;
    }
    if(m_settings->isNoPlayListAdvance())
    {
        stop();
        return;
    }
    if (!m_pl_manager->currentPlayList()->next())
    {
        stop();
        return;
    }
    play();
}

void MediaPlayer::updateNextUrl()
{
    m_nextUrl.clear();
    PlayListTrack *track = 0;
    if(m_settings->isRepeatableTrack())
        track = m_pl_manager->currentPlayList()->currentTrack();
    else if(!m_settings->isNoPlayListAdvance())
        track = m_pl_manager->currentPlayList()->nextTrack();

    if(track)
    {
        bool ok = m_core->play(track->url(), true);
        if(ok)
        {
            m_nextUrl = track->url();
            qDebug("MediaPlayer: next track state: received");
        }
        else
            qDebug("MediaPlayer: next track state: error");
    }
    else
        qDebug("MediaPlayer: next track state: unknown");

}

void MediaPlayer::processState(Qmmp::State state)
{
    switch ((int) state)
    {
    case Qmmp::NormalError:
        m_core->stop();
        m_nextUrl.clear();
        if (m_skips <= m_pl_manager->currentPlayList()->count())
        {
            m_skips++;
            playNext();
        }
        break;
    case Qmmp::FatalError:
        m_core->stop();
        m_nextUrl.clear();
        break;
    case Qmmp::Playing:
        m_finishTimer->stop();
        m_skips = 0;
        break;
    case Qmmp::Stopped:
        m_finishTimer->start();
        break;
    default:
        ;
    }
}

void MediaPlayer::updateMetaData()
{
    qDebug("===== metadata ======");
    qDebug("ARTIST = %s", qPrintable(m_core->metaData(Qmmp::ARTIST)));
    qDebug("TITLE = %s", qPrintable(m_core->metaData(Qmmp::TITLE)));
    qDebug("ALBUMARTIST = %s", qPrintable(m_core->metaData(Qmmp::ALBUMARTIST)));
    qDebug("ALBUM = %s", qPrintable(m_core->metaData(Qmmp::ALBUM)));
    qDebug("COMMENT = %s", qPrintable(m_core->metaData(Qmmp::COMMENT)));
    qDebug("GENRE = %s", qPrintable(m_core->metaData(Qmmp::GENRE)));
    qDebug("YEAR = %s", qPrintable(m_core->metaData(Qmmp::YEAR)));
    qDebug("TRACK = %s", qPrintable(m_core->metaData(Qmmp::TRACK)));
    qDebug("== end of metadata ==");

    PlayListModel *pl = m_pl_manager->currentPlayList();
    if (pl->currentTrack() && pl->currentTrack()->url() == m_core->metaData().value(Qmmp::URL))
    {
        pl->currentTrack()->updateMetaData(m_core->metaData());
        pl->updateMetaData();
    }
}