forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputStreamDesc.hpp
More file actions
77 lines (63 loc) · 1.91 KB
/
Copy pathInputStreamDesc.hpp
File metadata and controls
77 lines (63 loc) · 1.91 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef _AV_TRANSCODER_INPUT_STREAM_DESC_HPP_
#define _AV_TRANSCODER_INPUT_STREAM_DESC_HPP_
#include <AvTranscoder/common.hpp>
#include <string>
#include <vector>
namespace avtranscoder
{
/**
* @brief Structure to describe the source data to extract.
*/
struct InputStreamDesc
{
InputStreamDesc()
: _filename()
, _streamIndex(0)
, _channelIndexArray()
{
}
InputStreamDesc(const std::string& filename, const size_t streamIndex, const std::vector<size_t>& channelIndexArray)
: _filename(filename)
, _streamIndex(streamIndex)
, _channelIndexArray(channelIndexArray)
{
}
InputStreamDesc(const std::string& filename, const size_t streamIndex, const size_t channelIndex)
: _filename(filename)
, _streamIndex(streamIndex)
, _channelIndexArray()
{
_channelIndexArray.push_back(channelIndex);
}
/**
* @brief Read all the channels of the indicated stream.
*/
InputStreamDesc(const std::string& filename, const size_t streamIndex)
: _filename(filename)
, _streamIndex(streamIndex)
, _channelIndexArray()
{
}
/**
* @brief Read all the channels of the stream at index 0.
*/
InputStreamDesc(const std::string& filename)
: _filename(filename)
, _streamIndex(0)
, _channelIndexArray()
{
}
/**
* @return If a demultiplexing step will be done to extract the expected data.
*/
bool demultiplexing() const { return !_channelIndexArray.empty(); }
public:
std::string _filename; ///< Source file path.
size_t _streamIndex; ///< Source stream to extract.
std::vector<size_t> _channelIndexArray; ///< List of source channels to extract from the stream
};
#ifndef SWIG
AvExport std::ostream& operator<<(std::ostream& flux, const InputStreamDesc& inputStreamDesc);
#endif
}
#endif