AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VideoReader.hpp
Go to the documentation of this file.
1 #ifndef _AV_TRANSCODER_VIDEOREADER_HPP
2 #define _AV_TRANSCODER_VIDEOREADER_HPP
3 
4 #include "IReader.hpp"
5 
9 
10 namespace avtranscoder
11 {
12 
13 class AvExport VideoReader : public IReader
14 {
15 public:
16  //@{
17  // @note Transform the input stream to rgb24 pixel format (to display).
18  // @see updateOutput
19  VideoReader(const std::string& filename, const size_t videoStreamIndex = 0);
20  VideoReader(InputFile& inputFile, const size_t videoStreamIndex = 0);
21  //@}
22 
23  ~VideoReader();
24 
25  /**
26  * @brief Update width, height and pixelFormat of the output.
27  * @note Will transform the decoded data when read the stream.
28  */
29  void updateOutput(const size_t width, const size_t height, const std::string& pixelFormat);
30 
31  //@{
32  // @brief Output info
33  size_t getOutputWidth() const { return _outputWidth; }
34  size_t getOutputHeight() const { return _outputHeight; }
35  size_t getOutputNbComponents() const { return _outputPixelProperties.getNbComponents(); }
36  size_t getOutputBitDepth() const { return _outputPixelProperties.getBitsPerPixel(); }
37  AVPixelFormat getOutputPixelFormat() const { return _outputPixelProperties.getAVPixelFormat(); }
38  //@}
39 
40  // @brief Get source video properties
41  const VideoProperties* getSourceVideoProperties() const { return _videoStreamProperties; }
42 
43 private:
44  void init();
45 
46 private:
47  const VideoProperties* _videoStreamProperties; ///< Properties of the source video stream read (no ownership, has link)
48 
49  //@{
50  // @brief Output info
51  size_t _outputWidth;
52  size_t _outputHeight;
54  //@}
55 };
56 }
57 
58 #endif
const VideoProperties * _videoStreamProperties
Properties of the source video stream read (no ownership, has link)
Definition: VideoReader.hpp:47
PixelProperties _outputPixelProperties
Definition: VideoReader.hpp:53
Based class to read a stream.
Definition: IReader.hpp:18
size_t getOutputHeight() const
Definition: VideoReader.hpp:34
AVPixelFormat getOutputPixelFormat() const
Definition: VideoReader.hpp:37
const VideoProperties * getSourceVideoProperties() const
Definition: VideoReader.hpp:41
#define AVPixelFormat
Definition: common.hpp:43
size_t getOutputBitDepth() const
Definition: VideoReader.hpp:36
size_t getOutputNbComponents() const
Definition: VideoReader.hpp:35
size_t getOutputWidth() const
Definition: VideoReader.hpp:33
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy