UniMRCP  1.7.0
mpf_scheduler.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Arsen Chaloyan
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MPF_SCHEDULER_H
18 #define MPF_SCHEDULER_H
19 
20 /**
21  * @file mpf_scheduler.h
22  * @brief MPF Scheduler (High Resolution Clock for Media Processing and Timer)
23  */
24 
25 #include "mpf_types.h"
26 
28 
29 /** Prototype of scheduler callback */
30 typedef void (*mpf_scheduler_proc_f)(mpf_scheduler_t *scheduler, void *obj);
31 
32 /** Create scheduler */
34 
35 /** Destroy scheduler */
37 
38 /** Set media processing clock */
40  mpf_scheduler_t *scheduler,
41  unsigned long resolution,
43  void *obj);
44 
45 /** Set timer clock */
47  mpf_scheduler_t *scheduler,
48  unsigned long resolution,
50  void *obj);
51 
52 /** Set scheduler rate (n times faster than real-time) */
54  mpf_scheduler_t *scheduler,
55  unsigned long rate);
56 
57 /** Start scheduler */
59 
60 /** Stop scheduler */
62 
63 
65 
66 #endif /* MPF_SCHEDULER_H */
void mpf_scheduler_destroy(mpf_scheduler_t *scheduler)
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
#define MPF_DECLARE(type)
Definition: mpf.h:40
apt_bool_t mpf_scheduler_media_clock_set(mpf_scheduler_t *scheduler, unsigned long resolution, mpf_scheduler_proc_f proc, void *obj)
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
MPF Types Declarations.
apt_bool_t mpf_scheduler_stop(mpf_scheduler_t *scheduler)
struct mpf_scheduler_t mpf_scheduler_t
Definition: mpf_types.h:36
apt_bool_t mpf_scheduler_timer_clock_set(mpf_scheduler_t *scheduler, unsigned long resolution, mpf_scheduler_proc_f proc, void *obj)
apt_bool_t mpf_scheduler_rate_set(mpf_scheduler_t *scheduler, unsigned long rate)
apt_bool_t mpf_scheduler_start(mpf_scheduler_t *scheduler)
mpf_scheduler_t * mpf_scheduler_create(apr_pool_t *pool)
APT_BEGIN_EXTERN_C typedef void(* mpf_scheduler_proc_f)(mpf_scheduler_t *scheduler, void *obj)
Definition: mpf_scheduler.h:30