-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhlstranscode.h
More file actions
49 lines (40 loc) · 940 Bytes
/
hlstranscode.h
File metadata and controls
49 lines (40 loc) · 940 Bytes
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
#ifndef HLSTRANSCODE_H
#define HLSTRANSCODE_H
#include <QObject>
#include <QProcess>
class HlsTranscode : public QObject
{
Q_OBJECT
public:
explicit HlsTranscode(QString subs, QString ffmpegPath, QString streamPath, QObject *parent = 0);
~HlsTranscode();
int getCompletedSegments()
{
return completedSegments;
}
qint64 getPendingBytes()
{
return pendingBytes;
}
void pipeInput(QByteArray *in);
bool isReadyForData() {
return readyForData;
}
void stop();
private:
void startFfmpeg();
QProcess ffmpeg;
QString ffmpegPath, streamPath, subs;
int completedSegments;
int pendingBytes;
bool readyForData;
private slots:
void segmentComplete();
void transcodeError();
void ffmpegTerminated(int code);
void bytesWritten(qint64);
void ffmpegStarted();
signals:
void segmentAvailable(int);
};
#endif // HLSTRANSCODE_H