<commit_before>#include <sys/prctl.h>

#include <omxil_mf/component.hpp>
#include <omxil_mf/port.hpp>
#include <omxil_mf/scoped_log.hpp>

#include "api/consts.hpp"
#include "util/omx_enum_name.hpp"

//port クラス

namespace mf {

port::port(int ind, component *c)
	: shutting_read(false), shutting_write(false), comp(c),
	port_index(ind), dir(OMX_DirMax),
	buffer_count_actual(0), buffer_count_min(0), buffer_size(0),
	f_enabled(OMX_TRUE), f_populated(OMX_FALSE),
	domain(OMX_PortDomainMax),
	buffers_contiguous(OMX_FALSE), buffer_alignment(0),
	f_no_buffer(OMX_TRUE),
	default_format(-1),
	ring_send(nullptr), bound_send(nullptr),
	ring_ret(nullptr), bound_ret(nullptr), th_ret(nullptr)
{
	scoped_log_begin;

	try {
		//creating ring buffer for sending OpenMAX buffers
		ring_send  = new ring_buffer<port_buffer>(nullptr, OMX_MF_BUFS_DEPTH + 1);
		bound_send = new bounded_buffer<ring_buffer<port_buffer>, port_buffer>(*ring_send);

		//creating ring buffer for returning OpenMAX buffers
		ring_ret  = new ring_buffer<port_buffer>(nullptr, OMX_MF_BUFS_DEPTH + 1);
		bound_ret = new bounded_buffer<ring_buffer<port_buffer>, port_buffer>(*ring_ret);

		//start returning OpenMAX buffers thread
		th_ret = new std::thread(buffer_done_thread_main, this);
	} catch (const std::bad_alloc& e) {
		errprint("failed to construct '%s'.\n", e.what());

		delete th_ret;
		th_ret = nullptr;

		delete bound_ret;
		bound_ret = nullptr;<commit_msg>Initialize member variables of tunneled mode in port class.<commit_after>#include <sys/prctl.h>

#include <omxil_mf/component.hpp>
#include <omxil_mf/port.hpp>
#include <omxil_mf/scoped_log.hpp>

#include "api/consts.hpp"
#include "util/omx_enum_name.hpp"

//port クラス

namespace mf {

port::port(int ind, component *c)
	: shutting_read(false), shutting_write(false), comp(c),
	port_index(ind), dir(OMX_DirMax),
	buffer_count_actual(0), buffer_count_min(0), buffer_size(0),
	f_enabled(OMX_TRUE), f_populated(OMX_FALSE),
	domain(OMX_PortDomainMax),
	buffers_contiguous(OMX_FALSE), buffer_alignment(0),
	f_no_buffer(OMX_TRUE),
	f_tunneled(OMX_FALSE), tunneled_comp(nullptr),
	tunneled_port(0), f_tunneled_supplier(OMX_FALSE),
	default_format(-1),
	ring_send(nullptr), bound_send(nullptr),
	ring_ret(nullptr), bound_ret(nullptr), th_ret(nullptr)
{
	scoped_log_begin;

	try {
		//creating ring buffer for sending OpenMAX buffers
		ring_send  = new ring_buffer<port_buffer>(nullptr, OMX_MF_BUFS_DEPTH + 1);
		bound_send = new bounded_buffer<ring_buffer<port_buffer>, port_buffer>(*ring_send);

		//creating ring buffer for returning OpenMAX buffers
		ring_ret  = new ring_buffer<port_buffer>(nullptr, OMX_MF_BUFS_DEPTH + 1);
		bound_ret = new bounded_buffer<ring_buffer<port_buffer>, port_buffer>(*ring_ret);

		//start returning OpenMAX buffers thread
		th_ret = new std::thread(buffer_done_thread_main, this);
	} catch (const std::bad_alloc& e) {
		errprint("failed to construct '%s'.\n", e.what());

		delete th_ret;
		th_ret = nullptr;

		delete bound_ret;
		bound_ret = nullptr;
{'fraction_non_alphanumeric': 0.12529079428381523, 'fraction_numerical': 0.004985044865403789, 'mean_word_length': 6.6395939086294415, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '5180098', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1136, 'n_words': 211}