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(GstElement* src) override;
39  bool init() override;
40 
41 protected slots:
42  void set_cur_position_ms(qint64 ms) override;
43 
44 
45 public slots:
46  void play() override;
47  void stop() override;
48  void pause() override;
49 
50  void jump_abs_ms(quint64 pos_ms) override;
51  void jump_rel_ms(quint64 ms) override;
52  void jump_rel(double percent) override;
53 
54  void change_track(const MetaData&) override;
55  void change_track(const QString&) override;
56 
57  void set_volume(int vol);
58 
59 
60 protected:
61  ConvertPipeline* _pipeline=nullptr;
62  MetaData _md_target;
63  gchar* _target_uri=nullptr;
64 
65  // methods
66  bool set_uri(const MetaData& md);
67 };
68 
69 
70 #endif // ConvertEngine_H
71 
72 
Definition: ConvertPipeline.h:29
Definition: MetaData.h:49
Definition: AbstractEngine.h:40
Definition: ConvertEngine.h:31