Sayonara Player
ConvertEngine.h
1 /* ConvertEngine.h */
2 
3 /* Copyright (C) 2011-2017 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 #ifndef ConvertEngine_H
22 #define ConvertEngine_H
23 
24 #include <QMap>
25 #include <gst/gst.h>
26 #include "Components/Engine/AbstractEngine.h"
27 
28 class ConvertPipeline;
29 class ConvertEngine : public Engine
30 {
31  Q_OBJECT
32 
33 public:
34  explicit ConvertEngine(QObject *parent=nullptr);
35 
36  void set_track_finished(GstElement* src) override;
37  bool init() override;
38 
39 protected slots:
40  void set_cur_position_ms(qint64 ms) override;
41 
42 
43 public slots:
44  void play() override;
45  void stop() override;
46  void pause() override;
47 
48  void jump_abs_ms(quint64 pos_ms) override;
49  void jump_rel_ms(quint64 ms) override;
50  void jump_rel(double percent) override;
51 
52  void change_track(const MetaData&) override;
53  void change_track(const QString&) override;
54 
55  void set_volume(int vol);
56 
57 
58 protected:
59  ConvertPipeline* _pipeline=nullptr;
60  MetaData _md_target;
61  gchar* _target_uri=nullptr;
62 
63  // methods
64  bool set_uri(const MetaData& md);
65 };
66 
67 #endif // ConvertEngine_H
68 
69 
Definition: ConvertPipeline.h:27
The MetaData class.
Definition: MetaData.h:55
The Engine class.
Definition: AbstractEngine.h:49
Definition: ConvertEngine.h:29