<commit_before>/**
 * This file is part of libcseg library, which belongs to ffmpeg_ivr
 * project. 
 * 
 * Copyright (C) 2014  OpenSight (www.opensight.cn)
 * 
 * ffmpeg_ivr is an extension of ffmpeg to implements the new feature for IVR
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>

#include "vf_intf.h"

#include "min_cached_segment.h"


static int32_t io_timeout = 30000;   /* 30 sec */
static uint64_t start_sequence = 0; 

#define AAC_SAMPLE_PER_FRAME   1024

#define MIN_TIMESTAMP   (time_t)1000000000

#define START_PTS       (int64_t)90000

#define PTS_MS_250      22500
#define PTS_MS_500      45000

#define CST_DIFF        (-28800.0)

#define  BUF_INIT_SIZE    (32768)    //32KB

int vf_init_cseg_muxer(const char * filename,
                       av_stream_t* streams, uint8_t stream_count,
                       double segment_time,
                       int max_nb_segments,
                       uint32_t max_seg_size, 
                       double pre_recoding_time, 
                       double start_ts,
                       int need_cst_adjust,
                       CachedSegmentContext **cseg)
{
    vf_private * vf = NULL;
    int i;
    int ret = 0;
    int video_index = -1;

    <commit_msg>adjust timeout from 30 to 20 for vf interface<commit_after>/**
 * This file is part of libcseg library, which belongs to ffmpeg_ivr
 * project. 
 * 
 * Copyright (C) 2014  OpenSight (www.opensight.cn)
 * 
 * ffmpeg_ivr is an extension of ffmpeg to implements the new feature for IVR
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>

#include "vf_intf.h"

#include "min_cached_segment.h"


static int32_t io_timeout = 20000;   /* 20 sec */
static uint64_t start_sequence = 0; 

#define AAC_SAMPLE_PER_FRAME   1024

#define MIN_TIMESTAMP   (time_t)1000000000

#define START_PTS       (int64_t)90000

#define PTS_MS_250      22500
#define PTS_MS_500      45000

#define CST_DIFF        (-28800.0)

#define  BUF_INIT_SIZE    (32768)    //32KB

int vf_init_cseg_muxer(const char * filename,
                       av_stream_t* streams, uint8_t stream_count,
                       double segment_time,
                       int max_nb_segments,
                       uint32_t max_seg_size, 
                       double pre_recoding_time, 
                       double start_ts,
                       int need_cst_adjust,
                       CachedSegmentContext **cseg)
{
    vf_private * vf = NULL;
    int i;
    int ret = 0;
    int video_index = -1;

    
{'fraction_non_alphanumeric': 0.07225288509784245, 'fraction_numerical': 0.03712995484194681, 'mean_word_length': 2.544, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4466054', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1201, 'n_words': 436}