-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathIInputStream.hpp
More file actions
62 lines (51 loc) · 1.64 KB
/
Copy pathIInputStream.hpp
File metadata and controls
62 lines (51 loc) · 1.64 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
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef _AV_TRANSCODER_CODED_STREAM_I_INPUT_STREAM_HPP_
#define _AV_TRANSCODER_CODED_STREAM_I_INPUT_STREAM_HPP_
#include <AvTranscoder/properties/StreamProperties.hpp>
#include <AvTranscoder/codec/AudioCodec.hpp>
#include <AvTranscoder/codec/VideoCodec.hpp>
#include <AvTranscoder/codec/DataCodec.hpp>
#include <AvTranscoder/data/coded/CodedData.hpp>
namespace avtranscoder
{
class AvExport IInputStream
{
public:
virtual ~IInputStream(){};
/**
* @brief Read the next packet of the stream
* @param data: data of next packet read
* @return if next packet was read succefully
**/
virtual bool readNextPacket(CodedData& data) = 0;
/**
* @note The returned object could be cast depending on the type of the stream (video, audio...)
* @see VideoProperties, AudioProperties...
* @return the properties of the stream
*/
virtual const StreamProperties& getProperties() const = 0;
/**
* @return the index of the stream
*/
virtual size_t getStreamIndex() const = 0;
//@{
/**
* Return the codec informations of the stream
* @exception Raise a runtime error if the stream is not of the corresponding type
*/
virtual VideoCodec& getVideoCodec() = 0;
virtual AudioCodec& getAudioCodec() = 0;
virtual DataCodec& getDataCodec() = 0;
//@}
//@{
/**
* @brief Functions about buffering
* Activate the stream will buffered its data when read packets.
* @see IInputStream methods
*/
virtual void activate(const bool activate = true) = 0;
virtual bool isActivated() const = 0;
virtual void clearBuffering() = 0;
//@}
};
}
#endif