openMSX
PostProcessor.hh
Go to the documentation of this file.
1 #ifndef POSTPROCESSOR_HH
2 #define POSTPROCESSOR_HH
3 
4 #include "FrameSource.hh"
5 #include "VideoLayer.hh"
6 #include "EmuTime.hh"
7 #include <memory>
8 
9 namespace openmsx {
10 
11 class Display;
12 class RenderSettings;
13 class RawFrame;
14 class DeinterlacedFrame;
15 class DoubledFrame;
16 class SuperImposedFrame;
17 class AviRecorder;
18 class CliComm;
19 
26 class PostProcessor : public VideoLayer
27 {
28 public:
29  virtual ~PostProcessor();
30 
31  // Layer interface:
32  virtual void paint(OutputSurface& output) = 0;
33 
46  virtual std::unique_ptr<RawFrame> rotateFrames(
47  std::unique_ptr<RawFrame> finishedFrame, FrameSource::FieldType field,
48  EmuTime::param time);
49 
56  void setSuperimposeVideoFrame(const RawFrame* videoSource);
57 
63  void setSuperimposeVdpFrame(const FrameSource* vdpSource);
64 
71 
75  bool isRecording() const;
76 
80  unsigned getBpp() const;
81 
86  FrameSource* getPaintFrame() const { return paintFrame; }
87 
88  // VideoLayer
89  virtual void takeRawScreenShot(unsigned height, const std::string& filename);
90 
91 
93 
94 protected:
97  static unsigned getLineWidth(FrameSource* frame, unsigned y, unsigned step);
98 
100  MSXMotherBoard& motherBoard, Display& display,
101  OutputSurface& screen, const std::string& videoSource,
102  unsigned maxWidth, unsigned height, bool canDoInterlace);
103 
106 
109 
111  std::unique_ptr<RawFrame> currFrame;
112 
114  std::unique_ptr<RawFrame> prevFrame;
115 
117  std::unique_ptr<DeinterlacedFrame> deinterlacedFrame;
118 
120  std::unique_ptr<DoubledFrame> interlacedFrame;
121 
123  std::unique_ptr<SuperImposedFrame> superImposedFrame;
124 
130 
133 
138 
139 private:
140  void getScaledFrame(unsigned height, const void** lines);
141 
142  Display& display;
143 
148  const bool canDoInterlace;
149 };
150 
151 } // namespace openmsx
152 
153 #endif // POSTPROCESSOR_HH