AVPKit
IBufferSink.h
1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 
7 /*
8  * File: BufferSink.h
9  * Author: ayache
10  *
11  * Created on March 9, 2020, 1:25 PM
12  */
13 
14 #ifndef IBUFFERSINK_H
15 #define IBUFFERSINK_H
16 
17 #include <com/avpkit/core/IAudioSamples.h>
18 #include <com/avpkit/core/IMediaFilter.h>
19 
20 
21 namespace com {
22  namespace avpkit {
23  namespace core {
24 
25  class VS_API_AVPKIT IBufferSink : public virtual IMediaFilter {
26  public:
27 
33  virtual int getSampleRate() = 0;
34 
40  virtual int getChannels() = 0;
41 
42 
48  virtual int getWidth() = 0;
49 
55  virtual int getHeight() = 0;
56 
62  virtual IRational* getFrameRate() = 0;
63 
69  virtual IRational* getTimeBase() = 0;
70 
77  virtual void setNumSamples(int frameSize) = 0;
78 
86  virtual int fillAudioSamples(IAudioSamples* samples) = 0;
87 
95  virtual int fillVideoPicture(IVideoPicture* picture) = 0;
96 
97  protected:
98  virtual ~IBufferSink() = default;
99  };
100 
101  }
102  }
103 }
104 
105 #endif /* BUFFERSINK_H */
106 
A set of raw (decoded) samples, plus a timestamp for when to play those samples relative to other ite...
Definition: IAudioSamples.h:38
virtual int getSampleRate()=0
Returns the sample rate of output filtered samples.
virtual int getHeight()=0
Returns the height of output filtered picture.
virtual int getWidth()=0
Returns the width of output filtered picture.
virtual void setNumSamples(int frameSize)=0
Sets the number of samples for each output filtered samples.
virtual int fillVideoPicture(IVideoPicture *picture)=0
Fills this video picture with filtered data.
virtual IRational * getTimeBase()=0
Returns the frame rate output filtered picture.
virtual int fillAudioSamples(IAudioSamples *samples)=0
Fills this audio samples with filtered data.
virtual IRational * getFrameRate()=0
Returns the frame rate output filtered picture.
virtual int getChannels()=0
Returns the channel number of output filtered samples.
This class wraps represents a Rational number for the AVPKit.
Definition: IRational.h:43
Represents one raw (undecoded) picture in a video stream, plus a timestamp for when to display that v...
Definition: IVideoPicture.h:40
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...