<commit_before><?php

namespace AC\Component\Transcoding\Preset\Handbrake;

use AC\Component\Transcoding\Preset;
use AC\Component\Transcoding\FileHandlerDefinition;
use AC\Component\Transcoding\MimeMap;

abstract class BasePreset extends Preset
{
    protected $requiredAdapter = 'handbrake';

    protected function buildInputDefinition()
    {
		$allowedMimeTypes = array();
		$extensions_to_check = array('mp4','mov','asf','avi','flv','rm','wmv'); //No swf or 3gp
		$mime_map = new MimeMap();
		$mime_map->setExtension('flv','video/x-flv');
		$ext_map = $mime_map->getExtensionToMimeTypes();
		foreach($extensions_to_check as $ext) {
			foreach($ext_map[$ext] as $type) {
				$allowedMimeTypes[] = $type;
			}
		}
		$allowedMimeTypes[]="application/octet-stream";
        return new FileHandlerDefinition(array(
			'allowedMimeTypes' => $allowedMimeTypes,
            'allowedMimeEncodings' => array('binary'),
			'requiredType' => 'file',
        ));
    }

    /**
     * Output should be a file with and .mp4 extension
     */
    protected function buildOutputDefinition()
    {
        return new FileHandlerDefinition(array(<commit_msg>Edited handbrake/basepreset<commit_after><?php

namespace AC\Component\Transcoding\Preset\Handbrake;

use AC\Component\Transcoding\Preset;
use AC\Component\Transcoding\FileHandlerDefinition;
use AC\Component\Transcoding\MimeMap;

abstract class BasePreset extends Preset
{
    protected $requiredAdapter = 'handbrake';

    protected function buildInputDefinition()
    {
		$allowedMimeTypes = array();
		$extensions_to_check = array('mp4','mov','asf','avi','flv','rm','wmv'); //No swf or 3gp
		$mime_map = new MimeMap();
		$mime_map->addExtensionToMimeType('flv','video/x-flv');
		$ext_map = $mime_map->getExtensionToMimeTypes();
		foreach($extensions_to_check as $ext) {
			foreach($ext_map[$ext] as $type) {
				$allowedMimeTypes[] = $type;
			}
		}
		$allowedMimeTypes[]="application/octet-stream";
        return new FileHandlerDefinition(array(
			'allowedMimeTypes' => $allowedMimeTypes,
            'allowedMimeEncodings' => array('binary'),
			'requiredType' => 'file',
        ));
    }

    /**
     * Output should be a file with and .mp4 extension
     */
    protected function buildOutputDefinition()
    {
        return new FileHandlerDefinition(array(
{'fraction_non_alphanumeric': 0.13785652549697494, 'fraction_numerical': 0.0025929127052722557, 'mean_word_length': 4.178970917225951, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3373467', 'n_tokens_mistral': 785, 'n_tokens_neox': 727, 'n_words': 134}