<commit_before>//
// ogles_gpgpu project - GPGPU for mobile devices and embedded systems using OpenGL ES 2.0
//
// Author: <NAME> <<EMAIL>>, Winter 2014/2015, http://www.mkonrad.net
//         <NAME>
//
// See LICENSE file in project repository root for the license.
//

/**
 * Helper class to simply display an output.
 */
#ifndef OGLES_GPGPU_COMMON_VIDEO
#define OGLES_GPGPU_COMMON_VIDEO

#include "../common_includes.h"
#include "base/procinterface.h"
#include "base/procbase.h"
#include "yuv2rgb.h"

namespace ogles_gpgpu {

#if __ANDROID__
#  define DFLT_PIX_FORMAT GL_RGBA
#else
#  define DFLT_PIX_FORMAT GL_BGRA
#endif

/**
 * Image source class
 */

class VideoSource {
public:

    VideoSource();
    
    VideoSource(const Size2d &size, GLenum inputPixFormat);
    
    void operator()(const Size2d &size, void* pixelBuffer, bool useRawPixels, GLuint inputTexture=0, GLenum inputPixFormat=DFLT_PIX_FORMAT);

    void set(ProcBase *p) {
        pipeline = p;
    }
    
protected:

    void setInputData(const unsigned char *data);
    
    void configurePipeline(const Size2d &size, GLenum inputPixFormat);
    
    bool firstFrame = true;
    
    Size2d frameSize;
    
    ProcBase* pipeline = nullptr;

    std::shared_ptr<ogles_gpgpu::Yuv2RgbProc> yuv2RgbProc;

};
}

#endif // OGLES_GPGPU_COMMON_VIDEO<commit_msg>Changed to VideoSource::set(ProcInterface *)<commit_after>//
// ogles_gpgpu project - GPGPU for mobile devices and embedded systems using OpenGL ES 2.0
//
// Author: <NAME> <<EMAIL>>, Winter 2014/2015, http://www.mkonrad.net
//         <NAME>
//
// See LICENSE file in project repository root for the license.
//

/**
 * Helper class to simply display an output.
 */
#ifndef OGLES_GPGPU_COMMON_VIDEO
#define OGLES_GPGPU_COMMON_VIDEO

#include "../common_includes.h"
#include "base/procinterface.h"
#include "base/procbase.h"
#include "yuv2rgb.h"

namespace ogles_gpgpu {

#if __ANDROID__
#  define DFLT_PIX_FORMAT GL_RGBA
#else
#  define DFLT_PIX_FORMAT GL_BGRA
#endif

/**
 * Image source class
 */

class VideoSource {
public:

    VideoSource();
    
    VideoSource(const Size2d &size, GLenum inputPixFormat);
    
    void operator()(const Size2d &size, void* pixelBuffer, bool useRawPixels, GLuint inputTexture=0, GLenum inputPixFormat=DFLT_PIX_FORMAT);

    void set(ProcInterface *p) {
        pipeline = p;
    }
    
protected:

    void setInputData(const unsigned char *data);
    
    void configurePipeline(const Size2d &size, GLenum inputPixFormat);
    
    bool firstFrame = true;
    
    Size2d frameSize;
    
    ProcInterface* pipeline = nullptr;

    std::shared_ptr<ogles_gpgpu::Yuv2RgbProc> yuv2RgbProc;

};
}

#endif // OGLES_GPGPU_COMMON_VIDEO
{'fraction_non_alphanumeric': 0.10559466469062616, 'fraction_numerical': 0.01333827343460541, 'mean_word_length': 3.5762711864406778, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4099322', 'n_tokens_mistral': 974, 'n_tokens_neox': 949, 'n_words': 232}