Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/videoio/src/cap_mfx_writer.hpp
16356 views
1
// This file is part of OpenCV project.
2
// It is subject to the license terms in the LICENSE file found in the top-level directory
3
// of this distribution and at http://opencv.org/license.html
4
5
#ifndef CAP_MFX_WRITER_HPP
6
#define CAP_MFX_WRITER_HPP
7
8
#include "precomp.hpp"
9
10
class MFXVideoSession;
11
class Plugin;
12
class DeviceHandler;
13
class WriteBitstream;
14
class SurfacePool;
15
class MFXVideoDECODE;
16
class MFXVideoENCODE;
17
18
class VideoWriter_IntelMFX : public cv::IVideoWriter
19
{
20
public:
21
VideoWriter_IntelMFX(const cv::String &filename, int _fourcc, double fps, cv::Size frameSize, bool isColor);
22
virtual ~VideoWriter_IntelMFX();
23
virtual double getProperty(int) const;
24
virtual bool setProperty(int, double);
25
virtual bool isOpened() const;
26
virtual void write(cv::InputArray input);
27
static cv::Ptr<VideoWriter_IntelMFX> create(const cv::String& filename, int _fourcc, double fps, cv::Size frameSize, bool isColor);
28
29
virtual int getCaptureDomain() const { return cv::CAP_INTEL_MFX; }
30
protected:
31
bool write_one(cv::InputArray bgr);
32
33
private:
34
VideoWriter_IntelMFX(const VideoWriter_IntelMFX &);
35
VideoWriter_IntelMFX & operator=(const VideoWriter_IntelMFX &);
36
37
private:
38
MFXVideoSession *session;
39
Plugin *plugin;
40
DeviceHandler *deviceHandler;
41
WriteBitstream *bs;
42
MFXVideoENCODE *encoder;
43
SurfacePool *pool;
44
void *outSurface;
45
cv::Size frameSize;
46
bool good;
47
};
48
49
#endif // CAP_MFX_WRITER_HPP
50
51