AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IDecoder.hpp
Go to the documentation of this file.
1 #ifndef _AV_TRANSCODER_ESSENCE_STREAM_IDECODER_HPP_
2 #define _AV_TRANSCODER_ESSENCE_STREAM_IDECODER_HPP_
3 
7 
8 namespace avtranscoder
9 {
10 
11 class AvExport IDecoder
12 {
13 public:
14  virtual ~IDecoder(){};
15 
16  /**
17  * @brief Setup the decoder
18  * @param profile: set decoder parameters from the given profile
19  * @note Open the decoder.
20  */
21  virtual void setupDecoder(const ProfileLoader::Profile& profile = ProfileLoader::Profile()) {}
22 
23  /**
24  * @brief Decode next frame
25  * @param frameBuffer: the frame decoded
26  * @warn the frameBuffer reference belongs to the decoder and is valid only until the
27  * next call to this function or until closing or flushing the
28  * decoder. The caller may not write to it.
29  * @return status of decoding
30  */
31  virtual bool decodeNextFrame(Frame& frameBuffer) = 0;
32 
33  /**
34  * @brief Decode substream of next frame
35  * @param frameBuffer: the frame decoded
36  * @param channelIndex: index of channel to extract
37  * @return status of decoding
38  */
39  virtual bool decodeNextFrame(Frame& frameBuffer, const size_t channelIndex) = 0;
40 
41  /**
42  * @brief Set the next frame of the input stream (which bypass the work of decoding)
43  * @note Not yet implemented for VideoDecoder and AudioDecoder
44  * @param inputFrame: the new next frame
45  */
46  virtual void setNextFrame(Frame& inputFrame) {}
47 
48  /**
49  * @brief Reset the internal decoder state / flush internal buffers.
50  * @note Should be called when seeking or when switching to a different stream.
51  * @note Not sense for generators.
52  */
53  virtual void flushDecoder() {}
54 };
55 }
56 
57 #endif
std::map< std::string, std::string > Profile
virtual void setupDecoder(const ProfileLoader::Profile &profile=ProfileLoader::Profile())
Setup the decoder.
Definition: IDecoder.hpp:21
virtual void flushDecoder()
Reset the internal decoder state / flush internal buffers.
Definition: IDecoder.hpp:53
virtual void setNextFrame(Frame &inputFrame)
Set the next frame of the input stream (which bypass the work of decoding)
Definition: IDecoder.hpp:46
This class describes decoded (raw) audio or video data.
Definition: Frame.hpp:16
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