Sayonara Player
ConvertEngine.h
1 /* ConvertEngine.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef ConvertEngine_H
24 #define ConvertEngine_H
25 
26 #include <QMap>
27 #include <gst/gst.h>
28 #include "Components/Engine/AbstractEngine.h"
29 
30 class ConvertPipeline;
31 class ConvertEngine : public Engine
32 {
33  Q_OBJECT
34 
35 public:
36  explicit ConvertEngine(QObject *parent=nullptr);
37 
38  void set_track_finished() override;
39  bool init() override;
40 
41 
42 
43 protected slots:
44  void set_cur_position_ms(qint64 ms) override;
45 
46 
47 public slots:
48  void play() override;
49  void stop() override;
50  void pause() override;
51 
52  void jump_abs_ms(quint64 pos_ms) override;
53  void jump_rel_ms(quint64 ms) override;
54  void jump_rel(double percent) override;
55 
56  void change_track(const MetaData&) override;
57  void change_track(const QString&) override;
58 
59  void set_volume(int vol);
60 
61 
62 protected:
63  ConvertPipeline* _pipeline=nullptr;
64  MetaData _md_target;
65  gchar* _target_uri=nullptr;
66 
67  // methods
68  bool set_uri(const MetaData& md);
69 };
70 
71 
72 #endif // ConvertEngine_H
73 
74 
Definition: ConvertPipeline.h:29
Definition: MetaData.h:49
Definition: AbstractEngine.h:38
Definition: ConvertEngine.h:31