<commit_before>#pragma once

#include "ivideotarget.h"
#include "except.h"

namespace gg
{

//!
//! \brief Uses OpenCV's video saving capabilities
//!
class VideoTargetOpenCV : public IVideoTarget
{
protected:
    //!
    //! \brief
    //!
    cv::VideoWriter _writer;

    //!
    //! \brief This buffer will hold BGR data
    //! when writing to file
    //!
    cv::Mat _buffer_bgr;

    //!
    //! \brief
    //!
    std::string _filepath;

    //!
    //! \brief
    //!
    float _framerate;

    //!
    //! \brief FOURCC code
    //! \sa VideoTargetOpenCV
    //!
    std::string _fourcc;

public:
    //!
    //! \brief Constructor featuring a \c fourcc code as in
    //! http://docs.opencv.org/2.4/doc/tutorials/highgui/video-write/video-write.html
    //! \param fourcc
    //! \throw VideoTargetError if \c fourcc not supported
    //!
    VideoTargetOpenCV(const std::string fourcc = "XVID");

    //!
    //! \brief
    //!
    virtual ~VideoTargetOpenCV();

public:
    void init(const std::string filepath, const float framerate);

    void append(const VideoFrame & frame);

    void finalise();
};
<commit_msg>Issue #44: added copy prohibition to OpenCV video target<commit_after>#pragma once

#include "ivideotarget.h"
#include "except.h"

namespace gg
{

//!
//! \brief Uses OpenCV's video saving capabilities
//!
class VideoTargetOpenCV : public IVideoTarget
{
protected:
    //!
    //! \brief
    //!
    cv::VideoWriter _writer;

    //!
    //! \brief This buffer will hold BGR data
    //! when writing to file
    //!
    cv::Mat _buffer_bgr;

    //!
    //! \brief
    //!
    std::string _filepath;

    //!
    //! \brief
    //!
    float _framerate;

    //!
    //! \brief FOURCC code
    //! \sa VideoTargetOpenCV
    //!
    std::string _fourcc;

public:
    //!
    //! \brief Constructor featuring a \c fourcc code as in
    //! http://docs.opencv.org/2.4/doc/tutorials/highgui/video-write/video-write.html
    //! \param fourcc
    //! \throw VideoTargetError if \c fourcc not supported
    //!
    VideoTargetOpenCV(const std::string fourcc = "XVID");

    //!
    //! \brief
    //!
    virtual ~VideoTargetOpenCV();

public:
    void init(const std::string filepath, const float framerate);

    void append(const VideoFrame & frame);

    void finalise();

protected:
    DISALLOW_COPY_AND_ASSIGNMENT(VideoTargetOpenCV);
};

{'fraction_non_alphanumeric': 0.14936708860759493, 'fraction_numerical': 0.002531645569620253, 'mean_word_length': 2.1613333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4490959', 'n_tokens_mistral': 787, 'n_tokens_neox': 754, 'n_words': 188}