blob: 524e6276fb22fc90f91c433a988e7daf2fd7727f [file] [log] [blame]
wei.dubcc2ed22021-05-19 07:16:10 -04001/*
2 * Copyright (C) 2021 Amlogic Corporation.
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#ifndef AML_AVSYNC_PCR_MONITOR_H
17#define AML_AVSYNC_PCR_MONITOR_H
18
19struct pcr_info {
20 long long pts; //unit as us
21 long long monoclk; //unint as us
22};
23
24enum pcr_monitor_status {
25 UNINITIALIZE = 0,
26 RECORDING,
27 CONSTRUCT_MONITOR,
28 WAIT_DEVIATION_STABLE,
29 DEVIATION_READY,
30 DEVIATION_LONG_TERM_READY,
31};
32
33int pcr_monitor_init(void ** monitor_handle);
34int pcr_monitor_process(void *monitor_handle, struct pcr_info *pcr);
35enum pcr_monitor_status pcr_monitor_get_status(void *monitor_handle);
36int pcr_monitor_get_deviation(void *monitor_handle, int *ppm);
37int pcr_monitor_destroy(void *monitor_handle);
38
39#endif