mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 06:48:33 +00:00
commit b3466f12a82fcfe9261d6af57fb8ad74d5140bc0
Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date: Sun Nov 22 19:30:30 2009 +0000
Provided the same functionality to change scheduler rate (if needed) without modifying existing API (ensured backward compatibility)
git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1297 f001bc3a-424a-0410-80a0-a715b8f413a8
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15615 d0543943-73ff-0310-b7d9-9358b9ac24b2
67 lines
1.9 KiB
C
67 lines
1.9 KiB
C
/*
|
|
* Copyright 2008 Arsen Chaloyan
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef __MPF_SCHEDULER_H__
|
|
#define __MPF_SCHEDULER_H__
|
|
|
|
/**
|
|
* @file mpf_scheduler.h
|
|
* @brief MPF Scheduler (High Resolution Clock for Media Processing and Timer)
|
|
*/
|
|
|
|
#include "mpf_types.h"
|
|
|
|
APT_BEGIN_EXTERN_C
|
|
|
|
/** Prototype of scheduler callback */
|
|
typedef void (*mpf_scheduler_proc_f)(mpf_scheduler_t *scheduler, void *obj);
|
|
|
|
/** Create scheduler */
|
|
MPF_DECLARE(mpf_scheduler_t*) mpf_scheduler_create(apr_pool_t *pool);
|
|
|
|
/** Destroy scheduler */
|
|
MPF_DECLARE(void) mpf_scheduler_destroy(mpf_scheduler_t *scheduler);
|
|
|
|
/** Set media processing clock */
|
|
MPF_DECLARE(apt_bool_t) mpf_scheduler_media_clock_set(
|
|
mpf_scheduler_t *scheduler,
|
|
unsigned long resolution,
|
|
mpf_scheduler_proc_f proc,
|
|
void *obj);
|
|
|
|
/** Set timer clock */
|
|
MPF_DECLARE(apt_bool_t) mpf_scheduler_timer_clock_set(
|
|
mpf_scheduler_t *scheduler,
|
|
unsigned long resolution,
|
|
mpf_scheduler_proc_f proc,
|
|
void *obj);
|
|
|
|
/** Set scheduler rate (n times faster than real-time) */
|
|
MPF_DECLARE(apt_bool_t) mpf_scheduler_rate_set(
|
|
mpf_scheduler_t *scheduler,
|
|
unsigned long rate);
|
|
|
|
/** Start scheduler */
|
|
MPF_DECLARE(apt_bool_t) mpf_scheduler_start(mpf_scheduler_t *scheduler);
|
|
|
|
/** Stop scheduler */
|
|
MPF_DECLARE(apt_bool_t) mpf_scheduler_stop(mpf_scheduler_t *scheduler);
|
|
|
|
|
|
APT_END_EXTERN_C
|
|
|
|
#endif /*__MPF_SCHEDULER_H__*/
|