-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipipelinebuilder.h
65 lines (53 loc) · 1.92 KB
/
ipipelinebuilder.h
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
#ifndef IPIPELINEBUILDER_H
#define IPIPELINEBUILDER_H
#include <QObject>
#include <memory>
#include <string>
#include "gst/gst.h"
#include "gst/video/videooverlay.h"
struct Pipeline{
GstElement* bin;
GstElement* source;
GstElement* volume; // for audio
GstElement* level; // for audio
GstElement* demuxer; // only for recorded video
GstElement* videoqueue;
GstElement* videodepayloader; // only for live video
GstElement* videodecoder;
GstElement* videosink;
GstElement* audioqueue;
GstElement* audiodepayloader; // only for live video
GstElement* audiodecoder;
GstElement* audioconvertor; // only for live video
GstElement* audiosink;
GstBus* bus;
GstState state;
bool isLive;
};
class IPipelineBuilder : public QObject{
Q_OBJECT
virtual void setBin(std::string) = 0;
virtual void setSource(std::string, std::string) = 0;
virtual void setVolume(std::string, std::string) = 0;
virtual void setLevel(std::string, std::string) = 0;
virtual void setVideoQueue(std::string, std::string) = 0;
virtual void setVideoDecoder(std::string, std::string) = 0;
virtual void setVideoSink(std::string, std::string) = 0;
virtual void setAudioQueue(std::string, std::string) = 0;
virtual void setAudioDecoder(std::string, std::string) = 0;
virtual void setAudioSink(std::string, std::string) = 0;
virtual void setState(GstState) = 0;
virtual void setLiveness(bool) = 0;
virtual void setPropertiesOfGstElement(std::string, long long int) = 0;
virtual void addElements() = 0;
virtual void linkElements() = 0;
virtual void setBus() = 0;
virtual void destroyPipeline() = 0;
public:
virtual void buildPipeline(std::string, long long int) = 0;
virtual ~IPipelineBuilder(){}
virtual Pipeline & getPipeline() = 0;
signals:
void resetVideo();
};
#endif // IPIPELINEBUILDER_H