forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathInputStream.hpp
More file actions
50 lines (35 loc) · 1.29 KB
/
Copy pathInputStream.hpp
File metadata and controls
50 lines (35 loc) · 1.29 KB
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
#ifndef _AV_TRANSCODER_STREAM_INPUT_STREAM_HPP_
#define _AV_TRANSCODER_STREAM_INPUT_STREAM_HPP_
#include "IInputStream.hpp"
#include <queue>
struct AVStream;
namespace avtranscoder
{
class InputFile;
class AvExport InputStream : public IInputStream
{
private:
InputStream(const InputStream& inputStream);
InputStream& operator=(const InputStream& inputStream);
public:
InputStream(InputFile& inputFile, const size_t streamIndex);
~InputStream();
bool readNextPacket(CodedData& data);
const StreamProperties& getProperties() const;
size_t getStreamIndex() const { return _streamIndex; }
VideoCodec& getVideoCodec();
AudioCodec& getAudioCodec();
DataCodec& getDataCodec();
void activate(const bool activate = true) { _isActivated = activate; };
bool isActivated() const { return _isActivated; };
void addPacket(const AVPacket& packet);
void clearBuffering();
private:
InputFile* _inputFile; ///< Has link (no ownership)
ICodec* _codec; ///< Has ownership
std::queue<CodedData> _streamCache; ///< Cache of packet data already read and corresponding to this stream
size_t _streamIndex; ///< Index of the stream in the input file
bool _isActivated; ///< If the stream is activated, data read from it will be buffered
};
}
#endif