21 #ifndef GSTPLAYBACKPIPELINE_H_
22 #define GSTPLAYBACKPIPELINE_H_
24 #include "PipelineExtensions/Changeable.h"
25 #include "PipelineExtensions/Fadeable.h"
26 #include "PipelineExtensions/DelayedPlayable.h"
27 #include "Utils/Pimpl.h"
49 void sig_about_to_finish(MilliSeconds ms);
50 void sig_pos_changed_ms(MilliSeconds ms);
51 void sig_data(Byte* data, uint64_t size);
54 explicit Pipeline(
const QString& name, QObject *parent=
nullptr);
57 bool init(
Engine* engine, GstState state=GST_STATE_NULL);
58 bool prepare(
const QString& uri);
60 void set_data(Byte* data, uint64_t size);
64 bool has_element(GstElement* e)
const;
65 GstState state()
const;
67 void check_position();
68 void check_about_to_finish();
70 void enable_visualizer(
bool b);
71 void enable_broadcasting(
bool b);
74 void set_recording_path(
const QString& session_path);
76 MilliSeconds duration_ms()
const;
77 MilliSeconds position_ms()
const;
78 MilliSeconds time_to_go()
const;
86 void set_equalizer_band(
int band_name,
int val);
88 NanoSeconds seek_rel(
double percent, NanoSeconds ref_ns);
89 NanoSeconds seek_abs(NanoSeconds ns );
93 void s_volume_changed();
94 void s_show_visualizer_changed();
95 void s_mute_changed();
96 void s_speed_active_changed();
97 void s_speed_changed();
98 void s_sink_changed();
102 bool create_elements();
103 bool create_source(
const QString& uri);
104 void remove_source();
105 GstElement* create_sink(
const QString& name);
107 bool add_and_link_elements();
108 void configure_elements();
110 MilliSeconds get_about_to_finish_time()
const;
112 void set_position_element(GstElement* element);
113 GstElement* position_element();
115 void fade_in_handler()
override;
116 void fade_out_handler()
override;