-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathVideoReader.hpp
More file actions
57 lines (45 loc) · 1.64 KB
/
Copy pathVideoReader.hpp
File metadata and controls
57 lines (45 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
#ifndef _AV_TRANSCODER_VIDEOREADER_HPP
#define _AV_TRANSCODER_VIDEOREADER_HPP
#include "IReader.hpp"
#include <AvTranscoder/file/InputFile.hpp>
#include <AvTranscoder/properties/PixelProperties.hpp>
#include <AvTranscoder/properties/VideoProperties.hpp>
namespace avtranscoder
{
class AvExport VideoReader : public IReader
{
public:
//@{
// @note Transform the input stream to rgb24 pixel format (to display).
// @see updateOutput
VideoReader(const InputStreamDesc& inputDesc);
//@}
~VideoReader();
/**
* @brief Update width, height and pixelFormat of the output.
* @note Will transform the decoded data when read the stream.
*/
void updateOutput(const size_t width, const size_t height, const std::string& pixelFormat);
//@{
// @brief Output info
size_t getOutputWidth() const { return _outputWidth; }
size_t getOutputHeight() const { return _outputHeight; }
size_t getOutputNbComponents() const { return _outputPixelProperties.getNbComponents(); }
size_t getOutputBitDepth() const { return _outputPixelProperties.getBitsPerPixel(); }
AVPixelFormat getOutputPixelFormat() const { return _outputPixelProperties.getAVPixelFormat(); }
//@}
// @brief Get source video properties
const VideoProperties* getSourceVideoProperties() const { return _videoStreamProperties; }
private:
void init();
private:
const VideoProperties* _videoStreamProperties; ///< Properties of the source video stream read (no ownership, has link)
//@{
// @brief Output info
size_t _outputWidth;
size_t _outputHeight;
PixelProperties _outputPixelProperties;
//@}
};
}
#endif